windmill-api 1.540.1__py3-none-any.whl → 1.541.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.

Potentially problematic release.


This version of windmill-api might be problematic. Click here for more details.

Files changed (73) hide show
  1. windmill_api/api/email_trigger/__init__.py +0 -0
  2. windmill_api/api/email_trigger/create_email_trigger.py +105 -0
  3. windmill_api/api/email_trigger/delete_email_trigger.py +101 -0
  4. windmill_api/api/email_trigger/exists_email_local_part.py +164 -0
  5. windmill_api/api/email_trigger/exists_email_trigger.py +160 -0
  6. windmill_api/api/email_trigger/get_email_trigger.py +166 -0
  7. windmill_api/api/email_trigger/list_email_triggers.py +237 -0
  8. windmill_api/api/email_trigger/update_email_trigger.py +113 -0
  9. windmill_api/models/add_granular_acls_kind.py +1 -0
  10. windmill_api/models/capture_config_trigger_kind.py +1 -0
  11. windmill_api/models/capture_trigger_kind.py +1 -0
  12. windmill_api/models/create_email_trigger_json_body.py +139 -0
  13. windmill_api/models/create_email_trigger_json_body_error_handler_args.py +44 -0
  14. windmill_api/models/create_email_trigger_json_body_retry.py +107 -0
  15. windmill_api/models/create_email_trigger_json_body_retry_constant.py +66 -0
  16. windmill_api/models/create_email_trigger_json_body_retry_exponential.py +82 -0
  17. windmill_api/models/create_email_trigger_json_body_retry_retry_if.py +58 -0
  18. windmill_api/models/edit_email_trigger.py +137 -0
  19. windmill_api/models/edit_email_trigger_error_handler_args.py +44 -0
  20. windmill_api/models/edit_email_trigger_retry.py +107 -0
  21. windmill_api/models/edit_email_trigger_retry_constant.py +66 -0
  22. windmill_api/models/edit_email_trigger_retry_exponential.py +82 -0
  23. windmill_api/models/edit_email_trigger_retry_retry_if.py +58 -0
  24. windmill_api/models/email_trigger.py +177 -0
  25. windmill_api/models/email_trigger_error_handler_args.py +44 -0
  26. windmill_api/models/email_trigger_extra_perms.py +44 -0
  27. windmill_api/models/email_trigger_retry.py +107 -0
  28. windmill_api/models/email_trigger_retry_constant.py +66 -0
  29. windmill_api/models/email_trigger_retry_exponential.py +82 -0
  30. windmill_api/models/email_trigger_retry_retry_if.py +58 -0
  31. windmill_api/models/exists_email_local_part_json_body.py +76 -0
  32. windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +1 -0
  33. windmill_api/models/get_capture_response_200_trigger_kind.py +1 -0
  34. windmill_api/models/get_email_trigger_response_200.py +180 -0
  35. windmill_api/models/get_email_trigger_response_200_error_handler_args.py +44 -0
  36. windmill_api/models/get_email_trigger_response_200_extra_perms.py +44 -0
  37. windmill_api/models/get_email_trigger_response_200_retry.py +107 -0
  38. windmill_api/models/get_email_trigger_response_200_retry_constant.py +66 -0
  39. windmill_api/models/get_email_trigger_response_200_retry_exponential.py +82 -0
  40. windmill_api/models/get_email_trigger_response_200_retry_retry_if.py +58 -0
  41. windmill_api/models/get_granular_acls_kind.py +1 -0
  42. windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
  43. windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
  44. windmill_api/models/get_used_triggers_response_200.py +7 -0
  45. windmill_api/models/list_captures_response_200_item_trigger_kind.py +1 -0
  46. windmill_api/models/list_captures_trigger_kind.py +1 -0
  47. windmill_api/models/list_email_triggers_response_200_item.py +184 -0
  48. windmill_api/models/list_email_triggers_response_200_item_error_handler_args.py +44 -0
  49. windmill_api/models/list_email_triggers_response_200_item_extra_perms.py +44 -0
  50. windmill_api/models/list_email_triggers_response_200_item_retry.py +119 -0
  51. windmill_api/models/list_email_triggers_response_200_item_retry_constant.py +66 -0
  52. windmill_api/models/list_email_triggers_response_200_item_retry_exponential.py +82 -0
  53. windmill_api/models/list_email_triggers_response_200_item_retry_retry_if.py +58 -0
  54. windmill_api/models/new_email_trigger.py +136 -0
  55. windmill_api/models/new_email_trigger_error_handler_args.py +44 -0
  56. windmill_api/models/new_email_trigger_retry.py +107 -0
  57. windmill_api/models/new_email_trigger_retry_constant.py +66 -0
  58. windmill_api/models/new_email_trigger_retry_exponential.py +82 -0
  59. windmill_api/models/new_email_trigger_retry_retry_if.py +58 -0
  60. windmill_api/models/ping_capture_config_trigger_kind.py +1 -0
  61. windmill_api/models/remove_granular_acls_kind.py +1 -0
  62. windmill_api/models/set_capture_config_json_body_trigger_kind.py +1 -0
  63. windmill_api/models/triggers_count.py +8 -0
  64. windmill_api/models/update_email_trigger_json_body.py +140 -0
  65. windmill_api/models/update_email_trigger_json_body_error_handler_args.py +44 -0
  66. windmill_api/models/update_email_trigger_json_body_retry.py +107 -0
  67. windmill_api/models/update_email_trigger_json_body_retry_constant.py +66 -0
  68. windmill_api/models/update_email_trigger_json_body_retry_exponential.py +82 -0
  69. windmill_api/models/update_email_trigger_json_body_retry_retry_if.py +58 -0
  70. {windmill_api-1.540.1.dist-info → windmill_api-1.541.0.dist-info}/METADATA +1 -1
  71. {windmill_api-1.540.1.dist-info → windmill_api-1.541.0.dist-info}/RECORD +73 -19
  72. {windmill_api-1.540.1.dist-info → windmill_api-1.541.0.dist-info}/LICENSE +0 -0
  73. {windmill_api-1.540.1.dist-info → windmill_api-1.541.0.dist-info}/WHEEL +0 -0
@@ -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="EditEmailTriggerRetryRetryIf")
7
+
8
+
9
+ @_attrs_define
10
+ class EditEmailTriggerRetryRetryIf:
11
+ """
12
+ Attributes:
13
+ expr (str):
14
+ """
15
+
16
+ expr: str
17
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> Dict[str, Any]:
20
+ expr = self.expr
21
+
22
+ field_dict: Dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+ field_dict.update(
25
+ {
26
+ "expr": expr,
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
+ expr = d.pop("expr")
36
+
37
+ edit_email_trigger_retry_retry_if = cls(
38
+ expr=expr,
39
+ )
40
+
41
+ edit_email_trigger_retry_retry_if.additional_properties = d
42
+ return edit_email_trigger_retry_retry_if
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
@@ -0,0 +1,177 @@
1
+ import datetime
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ from dateutil.parser import isoparse
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ if TYPE_CHECKING:
11
+ from ..models.email_trigger_error_handler_args import EmailTriggerErrorHandlerArgs
12
+ from ..models.email_trigger_extra_perms import EmailTriggerExtraPerms
13
+ from ..models.email_trigger_retry import EmailTriggerRetry
14
+
15
+
16
+ T = TypeVar("T", bound="EmailTrigger")
17
+
18
+
19
+ @_attrs_define
20
+ class EmailTrigger:
21
+ """
22
+ Attributes:
23
+ local_part (str):
24
+ path (str):
25
+ script_path (str):
26
+ email (str):
27
+ extra_perms (EmailTriggerExtraPerms):
28
+ workspace_id (str):
29
+ edited_by (str):
30
+ edited_at (datetime.datetime):
31
+ is_flow (bool):
32
+ workspaced_local_part (Union[Unset, bool]):
33
+ error_handler_path (Union[Unset, str]):
34
+ error_handler_args (Union[Unset, EmailTriggerErrorHandlerArgs]): The arguments to pass to the script or flow
35
+ retry (Union[Unset, EmailTriggerRetry]):
36
+ """
37
+
38
+ local_part: str
39
+ path: str
40
+ script_path: str
41
+ email: str
42
+ extra_perms: "EmailTriggerExtraPerms"
43
+ workspace_id: str
44
+ edited_by: str
45
+ edited_at: datetime.datetime
46
+ is_flow: bool
47
+ workspaced_local_part: Union[Unset, bool] = UNSET
48
+ error_handler_path: Union[Unset, str] = UNSET
49
+ error_handler_args: Union[Unset, "EmailTriggerErrorHandlerArgs"] = UNSET
50
+ retry: Union[Unset, "EmailTriggerRetry"] = UNSET
51
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ local_part = self.local_part
55
+ path = self.path
56
+ script_path = self.script_path
57
+ email = self.email
58
+ extra_perms = self.extra_perms.to_dict()
59
+
60
+ workspace_id = self.workspace_id
61
+ edited_by = self.edited_by
62
+ edited_at = self.edited_at.isoformat()
63
+
64
+ is_flow = self.is_flow
65
+ workspaced_local_part = self.workspaced_local_part
66
+ error_handler_path = self.error_handler_path
67
+ error_handler_args: Union[Unset, Dict[str, Any]] = UNSET
68
+ if not isinstance(self.error_handler_args, Unset):
69
+ error_handler_args = self.error_handler_args.to_dict()
70
+
71
+ retry: Union[Unset, Dict[str, Any]] = UNSET
72
+ if not isinstance(self.retry, Unset):
73
+ retry = self.retry.to_dict()
74
+
75
+ field_dict: Dict[str, Any] = {}
76
+ field_dict.update(self.additional_properties)
77
+ field_dict.update(
78
+ {
79
+ "local_part": local_part,
80
+ "path": path,
81
+ "script_path": script_path,
82
+ "email": email,
83
+ "extra_perms": extra_perms,
84
+ "workspace_id": workspace_id,
85
+ "edited_by": edited_by,
86
+ "edited_at": edited_at,
87
+ "is_flow": is_flow,
88
+ }
89
+ )
90
+ if workspaced_local_part is not UNSET:
91
+ field_dict["workspaced_local_part"] = workspaced_local_part
92
+ if error_handler_path is not UNSET:
93
+ field_dict["error_handler_path"] = error_handler_path
94
+ if error_handler_args is not UNSET:
95
+ field_dict["error_handler_args"] = error_handler_args
96
+ if retry is not UNSET:
97
+ field_dict["retry"] = retry
98
+
99
+ return field_dict
100
+
101
+ @classmethod
102
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
103
+ from ..models.email_trigger_error_handler_args import EmailTriggerErrorHandlerArgs
104
+ from ..models.email_trigger_extra_perms import EmailTriggerExtraPerms
105
+ from ..models.email_trigger_retry import EmailTriggerRetry
106
+
107
+ d = src_dict.copy()
108
+ local_part = d.pop("local_part")
109
+
110
+ path = d.pop("path")
111
+
112
+ script_path = d.pop("script_path")
113
+
114
+ email = d.pop("email")
115
+
116
+ extra_perms = EmailTriggerExtraPerms.from_dict(d.pop("extra_perms"))
117
+
118
+ workspace_id = d.pop("workspace_id")
119
+
120
+ edited_by = d.pop("edited_by")
121
+
122
+ edited_at = isoparse(d.pop("edited_at"))
123
+
124
+ is_flow = d.pop("is_flow")
125
+
126
+ workspaced_local_part = d.pop("workspaced_local_part", UNSET)
127
+
128
+ error_handler_path = d.pop("error_handler_path", UNSET)
129
+
130
+ _error_handler_args = d.pop("error_handler_args", UNSET)
131
+ error_handler_args: Union[Unset, EmailTriggerErrorHandlerArgs]
132
+ if isinstance(_error_handler_args, Unset):
133
+ error_handler_args = UNSET
134
+ else:
135
+ error_handler_args = EmailTriggerErrorHandlerArgs.from_dict(_error_handler_args)
136
+
137
+ _retry = d.pop("retry", UNSET)
138
+ retry: Union[Unset, EmailTriggerRetry]
139
+ if isinstance(_retry, Unset):
140
+ retry = UNSET
141
+ else:
142
+ retry = EmailTriggerRetry.from_dict(_retry)
143
+
144
+ email_trigger = cls(
145
+ local_part=local_part,
146
+ path=path,
147
+ script_path=script_path,
148
+ email=email,
149
+ extra_perms=extra_perms,
150
+ workspace_id=workspace_id,
151
+ edited_by=edited_by,
152
+ edited_at=edited_at,
153
+ is_flow=is_flow,
154
+ workspaced_local_part=workspaced_local_part,
155
+ error_handler_path=error_handler_path,
156
+ error_handler_args=error_handler_args,
157
+ retry=retry,
158
+ )
159
+
160
+ email_trigger.additional_properties = d
161
+ return email_trigger
162
+
163
+ @property
164
+ def additional_keys(self) -> List[str]:
165
+ return list(self.additional_properties.keys())
166
+
167
+ def __getitem__(self, key: str) -> Any:
168
+ return self.additional_properties[key]
169
+
170
+ def __setitem__(self, key: str, value: Any) -> None:
171
+ self.additional_properties[key] = value
172
+
173
+ def __delitem__(self, key: str) -> None:
174
+ del self.additional_properties[key]
175
+
176
+ def __contains__(self, key: str) -> bool:
177
+ 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="EmailTriggerErrorHandlerArgs")
7
+
8
+
9
+ @_attrs_define
10
+ class EmailTriggerErrorHandlerArgs:
11
+ """The arguments to pass to the script or flow"""
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
+ email_trigger_error_handler_args = cls()
26
+
27
+ email_trigger_error_handler_args.additional_properties = d
28
+ return email_trigger_error_handler_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="EmailTriggerExtraPerms")
7
+
8
+
9
+ @_attrs_define
10
+ class EmailTriggerExtraPerms:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, bool] = _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
+ email_trigger_extra_perms = cls()
26
+
27
+ email_trigger_extra_perms.additional_properties = d
28
+ return email_trigger_extra_perms
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> bool:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: bool) -> 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,107 @@
1
+ from typing import TYPE_CHECKING, 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
+ if TYPE_CHECKING:
9
+ from ..models.email_trigger_retry_constant import EmailTriggerRetryConstant
10
+ from ..models.email_trigger_retry_exponential import EmailTriggerRetryExponential
11
+ from ..models.email_trigger_retry_retry_if import EmailTriggerRetryRetryIf
12
+
13
+
14
+ T = TypeVar("T", bound="EmailTriggerRetry")
15
+
16
+
17
+ @_attrs_define
18
+ class EmailTriggerRetry:
19
+ """
20
+ Attributes:
21
+ constant (Union[Unset, EmailTriggerRetryConstant]):
22
+ exponential (Union[Unset, EmailTriggerRetryExponential]):
23
+ retry_if (Union[Unset, EmailTriggerRetryRetryIf]):
24
+ """
25
+
26
+ constant: Union[Unset, "EmailTriggerRetryConstant"] = UNSET
27
+ exponential: Union[Unset, "EmailTriggerRetryExponential"] = UNSET
28
+ retry_if: Union[Unset, "EmailTriggerRetryRetryIf"] = UNSET
29
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> Dict[str, Any]:
32
+ constant: Union[Unset, Dict[str, Any]] = UNSET
33
+ if not isinstance(self.constant, Unset):
34
+ constant = self.constant.to_dict()
35
+
36
+ exponential: Union[Unset, Dict[str, Any]] = UNSET
37
+ if not isinstance(self.exponential, Unset):
38
+ exponential = self.exponential.to_dict()
39
+
40
+ retry_if: Union[Unset, Dict[str, Any]] = UNSET
41
+ if not isinstance(self.retry_if, Unset):
42
+ retry_if = self.retry_if.to_dict()
43
+
44
+ field_dict: Dict[str, Any] = {}
45
+ field_dict.update(self.additional_properties)
46
+ field_dict.update({})
47
+ if constant is not UNSET:
48
+ field_dict["constant"] = constant
49
+ if exponential is not UNSET:
50
+ field_dict["exponential"] = exponential
51
+ if retry_if is not UNSET:
52
+ field_dict["retry_if"] = retry_if
53
+
54
+ return field_dict
55
+
56
+ @classmethod
57
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
58
+ from ..models.email_trigger_retry_constant import EmailTriggerRetryConstant
59
+ from ..models.email_trigger_retry_exponential import EmailTriggerRetryExponential
60
+ from ..models.email_trigger_retry_retry_if import EmailTriggerRetryRetryIf
61
+
62
+ d = src_dict.copy()
63
+ _constant = d.pop("constant", UNSET)
64
+ constant: Union[Unset, EmailTriggerRetryConstant]
65
+ if isinstance(_constant, Unset):
66
+ constant = UNSET
67
+ else:
68
+ constant = EmailTriggerRetryConstant.from_dict(_constant)
69
+
70
+ _exponential = d.pop("exponential", UNSET)
71
+ exponential: Union[Unset, EmailTriggerRetryExponential]
72
+ if isinstance(_exponential, Unset):
73
+ exponential = UNSET
74
+ else:
75
+ exponential = EmailTriggerRetryExponential.from_dict(_exponential)
76
+
77
+ _retry_if = d.pop("retry_if", UNSET)
78
+ retry_if: Union[Unset, EmailTriggerRetryRetryIf]
79
+ if isinstance(_retry_if, Unset):
80
+ retry_if = UNSET
81
+ else:
82
+ retry_if = EmailTriggerRetryRetryIf.from_dict(_retry_if)
83
+
84
+ email_trigger_retry = cls(
85
+ constant=constant,
86
+ exponential=exponential,
87
+ retry_if=retry_if,
88
+ )
89
+
90
+ email_trigger_retry.additional_properties = d
91
+ return email_trigger_retry
92
+
93
+ @property
94
+ def additional_keys(self) -> List[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,66 @@
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="EmailTriggerRetryConstant")
9
+
10
+
11
+ @_attrs_define
12
+ class EmailTriggerRetryConstant:
13
+ """
14
+ Attributes:
15
+ attempts (Union[Unset, int]):
16
+ seconds (Union[Unset, int]):
17
+ """
18
+
19
+ attempts: Union[Unset, int] = UNSET
20
+ seconds: Union[Unset, int] = UNSET
21
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
22
+
23
+ def to_dict(self) -> Dict[str, Any]:
24
+ attempts = self.attempts
25
+ seconds = self.seconds
26
+
27
+ field_dict: Dict[str, Any] = {}
28
+ field_dict.update(self.additional_properties)
29
+ field_dict.update({})
30
+ if attempts is not UNSET:
31
+ field_dict["attempts"] = attempts
32
+ if seconds is not UNSET:
33
+ field_dict["seconds"] = seconds
34
+
35
+ return field_dict
36
+
37
+ @classmethod
38
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
39
+ d = src_dict.copy()
40
+ attempts = d.pop("attempts", UNSET)
41
+
42
+ seconds = d.pop("seconds", UNSET)
43
+
44
+ email_trigger_retry_constant = cls(
45
+ attempts=attempts,
46
+ seconds=seconds,
47
+ )
48
+
49
+ email_trigger_retry_constant.additional_properties = d
50
+ return email_trigger_retry_constant
51
+
52
+ @property
53
+ def additional_keys(self) -> List[str]:
54
+ return list(self.additional_properties.keys())
55
+
56
+ def __getitem__(self, key: str) -> Any:
57
+ return self.additional_properties[key]
58
+
59
+ def __setitem__(self, key: str, value: Any) -> None:
60
+ self.additional_properties[key] = value
61
+
62
+ def __delitem__(self, key: str) -> None:
63
+ del self.additional_properties[key]
64
+
65
+ def __contains__(self, key: str) -> bool:
66
+ return key in self.additional_properties
@@ -0,0 +1,82 @@
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="EmailTriggerRetryExponential")
9
+
10
+
11
+ @_attrs_define
12
+ class EmailTriggerRetryExponential:
13
+ """
14
+ Attributes:
15
+ attempts (Union[Unset, int]):
16
+ multiplier (Union[Unset, int]):
17
+ seconds (Union[Unset, int]):
18
+ random_factor (Union[Unset, int]):
19
+ """
20
+
21
+ attempts: Union[Unset, int] = UNSET
22
+ multiplier: Union[Unset, int] = UNSET
23
+ seconds: Union[Unset, int] = UNSET
24
+ random_factor: Union[Unset, int] = UNSET
25
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> Dict[str, Any]:
28
+ attempts = self.attempts
29
+ multiplier = self.multiplier
30
+ seconds = self.seconds
31
+ random_factor = self.random_factor
32
+
33
+ field_dict: Dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update({})
36
+ if attempts is not UNSET:
37
+ field_dict["attempts"] = attempts
38
+ if multiplier is not UNSET:
39
+ field_dict["multiplier"] = multiplier
40
+ if seconds is not UNSET:
41
+ field_dict["seconds"] = seconds
42
+ if random_factor is not UNSET:
43
+ field_dict["random_factor"] = random_factor
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
49
+ d = src_dict.copy()
50
+ attempts = d.pop("attempts", UNSET)
51
+
52
+ multiplier = d.pop("multiplier", UNSET)
53
+
54
+ seconds = d.pop("seconds", UNSET)
55
+
56
+ random_factor = d.pop("random_factor", UNSET)
57
+
58
+ email_trigger_retry_exponential = cls(
59
+ attempts=attempts,
60
+ multiplier=multiplier,
61
+ seconds=seconds,
62
+ random_factor=random_factor,
63
+ )
64
+
65
+ email_trigger_retry_exponential.additional_properties = d
66
+ return email_trigger_retry_exponential
67
+
68
+ @property
69
+ def additional_keys(self) -> List[str]:
70
+ return list(self.additional_properties.keys())
71
+
72
+ def __getitem__(self, key: str) -> Any:
73
+ return self.additional_properties[key]
74
+
75
+ def __setitem__(self, key: str, value: Any) -> None:
76
+ self.additional_properties[key] = value
77
+
78
+ def __delitem__(self, key: str) -> None:
79
+ del self.additional_properties[key]
80
+
81
+ def __contains__(self, key: str) -> bool:
82
+ return key in self.additional_properties
@@ -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="EmailTriggerRetryRetryIf")
7
+
8
+
9
+ @_attrs_define
10
+ class EmailTriggerRetryRetryIf:
11
+ """
12
+ Attributes:
13
+ expr (str):
14
+ """
15
+
16
+ expr: str
17
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> Dict[str, Any]:
20
+ expr = self.expr
21
+
22
+ field_dict: Dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+ field_dict.update(
25
+ {
26
+ "expr": expr,
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
+ expr = d.pop("expr")
36
+
37
+ email_trigger_retry_retry_if = cls(
38
+ expr=expr,
39
+ )
40
+
41
+ email_trigger_retry_retry_if.additional_properties = d
42
+ return email_trigger_retry_retry_if
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