windmill-api 1.418.0__py3-none-any.whl → 1.419.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. windmill_api/api/index_search/count_search_logs_index.py +211 -0
  2. windmill_api/api/index_search/search_logs_index.py +241 -0
  3. windmill_api/models/count_search_logs_index_response_200.py +85 -0
  4. windmill_api/models/count_search_logs_index_response_200_count_per_host.py +44 -0
  5. windmill_api/models/create_websocket_trigger_json_body.py +82 -0
  6. windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
  7. windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
  8. windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
  9. windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
  10. windmill_api/models/create_websocket_trigger_json_body_url_runnable_args.py +44 -0
  11. windmill_api/models/edit_websocket_trigger.py +71 -1
  12. windmill_api/models/edit_websocket_trigger_initial_messages_item_type_0.py +58 -0
  13. windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1.py +68 -0
  14. windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
  15. windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
  16. windmill_api/models/edit_websocket_trigger_url_runnable_args.py +44 -0
  17. windmill_api/models/get_websocket_trigger_response_200.py +82 -0
  18. windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_0.py +58 -0
  19. windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1.py +70 -0
  20. windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result.py +83 -0
  21. windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result_args.py +44 -0
  22. windmill_api/models/get_websocket_trigger_response_200_url_runnable_args.py +44 -0
  23. windmill_api/models/list_websocket_triggers_response_200_item.py +84 -0
  24. windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_0.py +58 -0
  25. windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1.py +70 -0
  26. windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result.py +83 -0
  27. windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result_args.py +46 -0
  28. windmill_api/models/list_websocket_triggers_response_200_item_url_runnable_args.py +44 -0
  29. windmill_api/models/log_search_hit.py +58 -0
  30. windmill_api/models/new_websocket_trigger.py +66 -0
  31. windmill_api/models/new_websocket_trigger_initial_messages_item_type_0.py +58 -0
  32. windmill_api/models/new_websocket_trigger_initial_messages_item_type_1.py +68 -0
  33. windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
  34. windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
  35. windmill_api/models/new_websocket_trigger_url_runnable_args.py +44 -0
  36. windmill_api/models/search_logs_index_response_200.py +86 -0
  37. windmill_api/models/search_logs_index_response_200_hits_item.py +58 -0
  38. windmill_api/models/test_smtp_json_body_smtp.py +7 -0
  39. windmill_api/models/update_websocket_trigger_json_body.py +83 -1
  40. windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
  41. windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
  42. windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
  43. windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
  44. windmill_api/models/update_websocket_trigger_json_body_url_runnable_args.py +44 -0
  45. windmill_api/models/websocket_trigger.py +60 -0
  46. windmill_api/models/websocket_trigger_initial_message_type_0.py +58 -0
  47. windmill_api/models/websocket_trigger_initial_message_type_1_runnable_result_args.py +44 -0
  48. windmill_api/models/websocket_trigger_initial_messages_item_type_0.py +58 -0
  49. windmill_api/models/websocket_trigger_initial_messages_item_type_1.py +68 -0
  50. windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
  51. windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
  52. windmill_api/models/websocket_trigger_url_runnable_args.py +44 -0
  53. {windmill_api-1.418.0.dist-info → windmill_api-1.419.0.dist-info}/METADATA +1 -1
  54. {windmill_api-1.418.0.dist-info → windmill_api-1.419.0.dist-info}/RECORD +56 -12
  55. {windmill_api-1.418.0.dist-info → windmill_api-1.419.0.dist-info}/LICENSE +0 -0
  56. {windmill_api-1.418.0.dist-info → windmill_api-1.419.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,68 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ if TYPE_CHECKING:
7
+ from ..models.new_websocket_trigger_initial_messages_item_type_1_runnable_result import (
8
+ NewWebsocketTriggerInitialMessagesItemType1RunnableResult,
9
+ )
10
+
11
+
12
+ T = TypeVar("T", bound="NewWebsocketTriggerInitialMessagesItemType1")
13
+
14
+
15
+ @_attrs_define
16
+ class NewWebsocketTriggerInitialMessagesItemType1:
17
+ """
18
+ Attributes:
19
+ runnable_result (NewWebsocketTriggerInitialMessagesItemType1RunnableResult):
20
+ """
21
+
22
+ runnable_result: "NewWebsocketTriggerInitialMessagesItemType1RunnableResult"
23
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> Dict[str, Any]:
26
+ runnable_result = self.runnable_result.to_dict()
27
+
28
+ field_dict: Dict[str, Any] = {}
29
+ field_dict.update(self.additional_properties)
30
+ field_dict.update(
31
+ {
32
+ "runnable_result": runnable_result,
33
+ }
34
+ )
35
+
36
+ return field_dict
37
+
38
+ @classmethod
39
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
40
+ from ..models.new_websocket_trigger_initial_messages_item_type_1_runnable_result import (
41
+ NewWebsocketTriggerInitialMessagesItemType1RunnableResult,
42
+ )
43
+
44
+ d = src_dict.copy()
45
+ runnable_result = NewWebsocketTriggerInitialMessagesItemType1RunnableResult.from_dict(d.pop("runnable_result"))
46
+
47
+ new_websocket_trigger_initial_messages_item_type_1 = cls(
48
+ runnable_result=runnable_result,
49
+ )
50
+
51
+ new_websocket_trigger_initial_messages_item_type_1.additional_properties = d
52
+ return new_websocket_trigger_initial_messages_item_type_1
53
+
54
+ @property
55
+ def additional_keys(self) -> List[str]:
56
+ return list(self.additional_properties.keys())
57
+
58
+ def __getitem__(self, key: str) -> Any:
59
+ return self.additional_properties[key]
60
+
61
+ def __setitem__(self, key: str, value: Any) -> None:
62
+ self.additional_properties[key] = value
63
+
64
+ def __delitem__(self, key: str) -> None:
65
+ del self.additional_properties[key]
66
+
67
+ def __contains__(self, key: str) -> bool:
68
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ if TYPE_CHECKING:
7
+ from ..models.new_websocket_trigger_initial_messages_item_type_1_runnable_result_args import (
8
+ NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs,
9
+ )
10
+
11
+
12
+ T = TypeVar("T", bound="NewWebsocketTriggerInitialMessagesItemType1RunnableResult")
13
+
14
+
15
+ @_attrs_define
16
+ class NewWebsocketTriggerInitialMessagesItemType1RunnableResult:
17
+ """
18
+ Attributes:
19
+ path (str):
20
+ args (NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs):
21
+ is_flow (bool):
22
+ """
23
+
24
+ path: str
25
+ args: "NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs"
26
+ is_flow: bool
27
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> Dict[str, Any]:
30
+ path = self.path
31
+ args = self.args.to_dict()
32
+
33
+ is_flow = self.is_flow
34
+
35
+ field_dict: Dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "path": path,
40
+ "args": args,
41
+ "is_flow": is_flow,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
49
+ from ..models.new_websocket_trigger_initial_messages_item_type_1_runnable_result_args import (
50
+ NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs,
51
+ )
52
+
53
+ d = src_dict.copy()
54
+ path = d.pop("path")
55
+
56
+ args = NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs.from_dict(d.pop("args"))
57
+
58
+ is_flow = d.pop("is_flow")
59
+
60
+ new_websocket_trigger_initial_messages_item_type_1_runnable_result = cls(
61
+ path=path,
62
+ args=args,
63
+ is_flow=is_flow,
64
+ )
65
+
66
+ new_websocket_trigger_initial_messages_item_type_1_runnable_result.additional_properties = d
67
+ return new_websocket_trigger_initial_messages_item_type_1_runnable_result
68
+
69
+ @property
70
+ def additional_keys(self) -> List[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs")
7
+
8
+
9
+ @_attrs_define
10
+ class NewWebsocketTriggerInitialMessagesItemType1RunnableResultArgs:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+ field_dict.update({})
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
24
+ d = src_dict.copy()
25
+ new_websocket_trigger_initial_messages_item_type_1_runnable_result_args = cls()
26
+
27
+ new_websocket_trigger_initial_messages_item_type_1_runnable_result_args.additional_properties = d
28
+ return new_websocket_trigger_initial_messages_item_type_1_runnable_result_args
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="NewWebsocketTriggerUrlRunnableArgs")
7
+
8
+
9
+ @_attrs_define
10
+ class NewWebsocketTriggerUrlRunnableArgs:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+ field_dict.update({})
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
24
+ d = src_dict.copy()
25
+ new_websocket_trigger_url_runnable_args = cls()
26
+
27
+ new_websocket_trigger_url_runnable_args.additional_properties = d
28
+ return new_websocket_trigger_url_runnable_args
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,86 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ if TYPE_CHECKING:
9
+ from ..models.search_logs_index_response_200_hits_item import SearchLogsIndexResponse200HitsItem
10
+
11
+
12
+ T = TypeVar("T", bound="SearchLogsIndexResponse200")
13
+
14
+
15
+ @_attrs_define
16
+ class SearchLogsIndexResponse200:
17
+ """
18
+ Attributes:
19
+ query_parse_errors (Union[Unset, List[str]]): a list of the terms that couldn't be parsed (and thus ignored)
20
+ hits (Union[Unset, List['SearchLogsIndexResponse200HitsItem']]): log files that matched the query
21
+ """
22
+
23
+ query_parse_errors: Union[Unset, List[str]] = UNSET
24
+ hits: Union[Unset, List["SearchLogsIndexResponse200HitsItem"]] = UNSET
25
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> Dict[str, Any]:
28
+ query_parse_errors: Union[Unset, List[str]] = UNSET
29
+ if not isinstance(self.query_parse_errors, Unset):
30
+ query_parse_errors = self.query_parse_errors
31
+
32
+ hits: Union[Unset, List[Dict[str, Any]]] = UNSET
33
+ if not isinstance(self.hits, Unset):
34
+ hits = []
35
+ for hits_item_data in self.hits:
36
+ hits_item = hits_item_data.to_dict()
37
+
38
+ hits.append(hits_item)
39
+
40
+ field_dict: Dict[str, Any] = {}
41
+ field_dict.update(self.additional_properties)
42
+ field_dict.update({})
43
+ if query_parse_errors is not UNSET:
44
+ field_dict["query_parse_errors"] = query_parse_errors
45
+ if hits is not UNSET:
46
+ field_dict["hits"] = hits
47
+
48
+ return field_dict
49
+
50
+ @classmethod
51
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
52
+ from ..models.search_logs_index_response_200_hits_item import SearchLogsIndexResponse200HitsItem
53
+
54
+ d = src_dict.copy()
55
+ query_parse_errors = cast(List[str], d.pop("query_parse_errors", UNSET))
56
+
57
+ hits = []
58
+ _hits = d.pop("hits", UNSET)
59
+ for hits_item_data in _hits or []:
60
+ hits_item = SearchLogsIndexResponse200HitsItem.from_dict(hits_item_data)
61
+
62
+ hits.append(hits_item)
63
+
64
+ search_logs_index_response_200 = cls(
65
+ query_parse_errors=query_parse_errors,
66
+ hits=hits,
67
+ )
68
+
69
+ search_logs_index_response_200.additional_properties = d
70
+ return search_logs_index_response_200
71
+
72
+ @property
73
+ def additional_keys(self) -> List[str]:
74
+ return list(self.additional_properties.keys())
75
+
76
+ def __getitem__(self, key: str) -> Any:
77
+ return self.additional_properties[key]
78
+
79
+ def __setitem__(self, key: str, value: Any) -> None:
80
+ self.additional_properties[key] = value
81
+
82
+ def __delitem__(self, key: str) -> None:
83
+ del self.additional_properties[key]
84
+
85
+ def __contains__(self, key: str) -> bool:
86
+ return key in self.additional_properties
@@ -0,0 +1,58 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="SearchLogsIndexResponse200HitsItem")
9
+
10
+
11
+ @_attrs_define
12
+ class SearchLogsIndexResponse200HitsItem:
13
+ """
14
+ Attributes:
15
+ dancer (Union[Unset, str]):
16
+ """
17
+
18
+ dancer: Union[Unset, str] = UNSET
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ dancer = self.dancer
23
+
24
+ field_dict: Dict[str, Any] = {}
25
+ field_dict.update(self.additional_properties)
26
+ field_dict.update({})
27
+ if dancer is not UNSET:
28
+ field_dict["dancer"] = dancer
29
+
30
+ return field_dict
31
+
32
+ @classmethod
33
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
34
+ d = src_dict.copy()
35
+ dancer = d.pop("dancer", UNSET)
36
+
37
+ search_logs_index_response_200_hits_item = cls(
38
+ dancer=dancer,
39
+ )
40
+
41
+ search_logs_index_response_200_hits_item.additional_properties = d
42
+ return search_logs_index_response_200_hits_item
43
+
44
+ @property
45
+ def additional_keys(self) -> List[str]:
46
+ return list(self.additional_properties.keys())
47
+
48
+ def __getitem__(self, key: str) -> Any:
49
+ return self.additional_properties[key]
50
+
51
+ def __setitem__(self, key: str, value: Any) -> None:
52
+ self.additional_properties[key] = value
53
+
54
+ def __delitem__(self, key: str) -> None:
55
+ del self.additional_properties[key]
56
+
57
+ def __contains__(self, key: str) -> bool:
58
+ return key in self.additional_properties
@@ -16,6 +16,7 @@ class TestSmtpJsonBodySmtp:
16
16
  port (int):
17
17
  from_ (str):
18
18
  tls_implicit (bool):
19
+ disable_tls (bool):
19
20
  """
20
21
 
21
22
  host: str
@@ -24,6 +25,7 @@ class TestSmtpJsonBodySmtp:
24
25
  port: int
25
26
  from_: str
26
27
  tls_implicit: bool
28
+ disable_tls: bool
27
29
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
28
30
 
29
31
  def to_dict(self) -> Dict[str, Any]:
@@ -33,6 +35,7 @@ class TestSmtpJsonBodySmtp:
33
35
  port = self.port
34
36
  from_ = self.from_
35
37
  tls_implicit = self.tls_implicit
38
+ disable_tls = self.disable_tls
36
39
 
37
40
  field_dict: Dict[str, Any] = {}
38
41
  field_dict.update(self.additional_properties)
@@ -44,6 +47,7 @@ class TestSmtpJsonBodySmtp:
44
47
  "port": port,
45
48
  "from": from_,
46
49
  "tls_implicit": tls_implicit,
50
+ "disable_tls": disable_tls,
47
51
  }
48
52
  )
49
53
 
@@ -64,6 +68,8 @@ class TestSmtpJsonBodySmtp:
64
68
 
65
69
  tls_implicit = d.pop("tls_implicit")
66
70
 
71
+ disable_tls = d.pop("disable_tls")
72
+
67
73
  test_smtp_json_body_smtp = cls(
68
74
  host=host,
69
75
  username=username,
@@ -71,6 +77,7 @@ class TestSmtpJsonBodySmtp:
71
77
  port=port,
72
78
  from_=from_,
73
79
  tls_implicit=tls_implicit,
80
+ disable_tls=disable_tls,
74
81
  )
75
82
 
76
83
  test_smtp_json_body_smtp.additional_properties = d
@@ -1,10 +1,19 @@
1
- from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
6
  if TYPE_CHECKING:
7
7
  from ..models.update_websocket_trigger_json_body_filters_item import UpdateWebsocketTriggerJsonBodyFiltersItem
8
+ from ..models.update_websocket_trigger_json_body_initial_messages_item_type_0 import (
9
+ UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0,
10
+ )
11
+ from ..models.update_websocket_trigger_json_body_initial_messages_item_type_1 import (
12
+ UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1,
13
+ )
14
+ from ..models.update_websocket_trigger_json_body_url_runnable_args import (
15
+ UpdateWebsocketTriggerJsonBodyUrlRunnableArgs,
16
+ )
8
17
 
9
18
 
10
19
  T = TypeVar("T", bound="UpdateWebsocketTriggerJsonBody")
@@ -19,6 +28,9 @@ class UpdateWebsocketTriggerJsonBody:
19
28
  script_path (str):
20
29
  is_flow (bool):
21
30
  filters (List['UpdateWebsocketTriggerJsonBodyFiltersItem']):
31
+ initial_messages (List[Union['UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0',
32
+ 'UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1']]):
33
+ url_runnable_args (UpdateWebsocketTriggerJsonBodyUrlRunnableArgs):
22
34
  """
23
35
 
24
36
  url: str
@@ -26,9 +38,20 @@ class UpdateWebsocketTriggerJsonBody:
26
38
  script_path: str
27
39
  is_flow: bool
28
40
  filters: List["UpdateWebsocketTriggerJsonBodyFiltersItem"]
41
+ initial_messages: List[
42
+ Union[
43
+ "UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0",
44
+ "UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1",
45
+ ]
46
+ ]
47
+ url_runnable_args: "UpdateWebsocketTriggerJsonBodyUrlRunnableArgs"
29
48
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
49
 
31
50
  def to_dict(self) -> Dict[str, Any]:
51
+ from ..models.update_websocket_trigger_json_body_initial_messages_item_type_0 import (
52
+ UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0,
53
+ )
54
+
32
55
  url = self.url
33
56
  path = self.path
34
57
  script_path = self.script_path
@@ -39,6 +62,20 @@ class UpdateWebsocketTriggerJsonBody:
39
62
 
40
63
  filters.append(filters_item)
41
64
 
65
+ initial_messages = []
66
+ for initial_messages_item_data in self.initial_messages:
67
+ initial_messages_item: Dict[str, Any]
68
+
69
+ if isinstance(initial_messages_item_data, UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0):
70
+ initial_messages_item = initial_messages_item_data.to_dict()
71
+
72
+ else:
73
+ initial_messages_item = initial_messages_item_data.to_dict()
74
+
75
+ initial_messages.append(initial_messages_item)
76
+
77
+ url_runnable_args = self.url_runnable_args.to_dict()
78
+
42
79
  field_dict: Dict[str, Any] = {}
43
80
  field_dict.update(self.additional_properties)
44
81
  field_dict.update(
@@ -48,6 +85,8 @@ class UpdateWebsocketTriggerJsonBody:
48
85
  "script_path": script_path,
49
86
  "is_flow": is_flow,
50
87
  "filters": filters,
88
+ "initial_messages": initial_messages,
89
+ "url_runnable_args": url_runnable_args,
51
90
  }
52
91
  )
53
92
 
@@ -56,6 +95,15 @@ class UpdateWebsocketTriggerJsonBody:
56
95
  @classmethod
57
96
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
58
97
  from ..models.update_websocket_trigger_json_body_filters_item import UpdateWebsocketTriggerJsonBodyFiltersItem
98
+ from ..models.update_websocket_trigger_json_body_initial_messages_item_type_0 import (
99
+ UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0,
100
+ )
101
+ from ..models.update_websocket_trigger_json_body_initial_messages_item_type_1 import (
102
+ UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1,
103
+ )
104
+ from ..models.update_websocket_trigger_json_body_url_runnable_args import (
105
+ UpdateWebsocketTriggerJsonBodyUrlRunnableArgs,
106
+ )
59
107
 
60
108
  d = src_dict.copy()
61
109
  url = d.pop("url")
@@ -73,12 +121,46 @@ class UpdateWebsocketTriggerJsonBody:
73
121
 
74
122
  filters.append(filters_item)
75
123
 
124
+ initial_messages = []
125
+ _initial_messages = d.pop("initial_messages")
126
+ for initial_messages_item_data in _initial_messages:
127
+
128
+ def _parse_initial_messages_item(
129
+ data: object,
130
+ ) -> Union[
131
+ "UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0",
132
+ "UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1",
133
+ ]:
134
+ try:
135
+ if not isinstance(data, dict):
136
+ raise TypeError()
137
+ initial_messages_item_type_0 = UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0.from_dict(
138
+ data
139
+ )
140
+
141
+ return initial_messages_item_type_0
142
+ except: # noqa: E722
143
+ pass
144
+ if not isinstance(data, dict):
145
+ raise TypeError()
146
+ initial_messages_item_type_1 = UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1.from_dict(data)
147
+
148
+ return initial_messages_item_type_1
149
+
150
+ initial_messages_item = _parse_initial_messages_item(initial_messages_item_data)
151
+
152
+ initial_messages.append(initial_messages_item)
153
+
154
+ url_runnable_args = UpdateWebsocketTriggerJsonBodyUrlRunnableArgs.from_dict(d.pop("url_runnable_args"))
155
+
76
156
  update_websocket_trigger_json_body = cls(
77
157
  url=url,
78
158
  path=path,
79
159
  script_path=script_path,
80
160
  is_flow=is_flow,
81
161
  filters=filters,
162
+ initial_messages=initial_messages,
163
+ url_runnable_args=url_runnable_args,
82
164
  )
83
165
 
84
166
  update_websocket_trigger_json_body.additional_properties = d
@@ -0,0 +1,58 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0")
7
+
8
+
9
+ @_attrs_define
10
+ class UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0:
11
+ """
12
+ Attributes:
13
+ raw_message (str):
14
+ """
15
+
16
+ raw_message: str
17
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> Dict[str, Any]:
20
+ raw_message = self.raw_message
21
+
22
+ field_dict: Dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+ field_dict.update(
25
+ {
26
+ "raw_message": raw_message,
27
+ }
28
+ )
29
+
30
+ return field_dict
31
+
32
+ @classmethod
33
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
34
+ d = src_dict.copy()
35
+ raw_message = d.pop("raw_message")
36
+
37
+ update_websocket_trigger_json_body_initial_messages_item_type_0 = cls(
38
+ raw_message=raw_message,
39
+ )
40
+
41
+ update_websocket_trigger_json_body_initial_messages_item_type_0.additional_properties = d
42
+ return update_websocket_trigger_json_body_initial_messages_item_type_0
43
+
44
+ @property
45
+ def additional_keys(self) -> List[str]:
46
+ return list(self.additional_properties.keys())
47
+
48
+ def __getitem__(self, key: str) -> Any:
49
+ return self.additional_properties[key]
50
+
51
+ def __setitem__(self, key: str, value: Any) -> None:
52
+ self.additional_properties[key] = value
53
+
54
+ def __delitem__(self, key: str) -> None:
55
+ del self.additional_properties[key]
56
+
57
+ def __contains__(self, key: str) -> bool:
58
+ return key in self.additional_properties