windmill-api 1.540.2__py3-none-any.whl → 1.541.1__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.
- windmill_api/api/email_trigger/__init__.py +0 -0
- windmill_api/api/email_trigger/create_email_trigger.py +105 -0
- windmill_api/api/email_trigger/delete_email_trigger.py +101 -0
- windmill_api/api/email_trigger/exists_email_local_part.py +164 -0
- windmill_api/api/email_trigger/exists_email_trigger.py +160 -0
- windmill_api/api/email_trigger/get_email_trigger.py +166 -0
- windmill_api/api/email_trigger/list_email_triggers.py +237 -0
- windmill_api/api/email_trigger/update_email_trigger.py +113 -0
- windmill_api/models/add_granular_acls_kind.py +1 -0
- windmill_api/models/capture_config_trigger_kind.py +1 -0
- windmill_api/models/capture_trigger_kind.py +1 -0
- windmill_api/models/create_email_trigger_json_body.py +139 -0
- windmill_api/models/create_email_trigger_json_body_error_handler_args.py +44 -0
- windmill_api/models/create_email_trigger_json_body_retry.py +107 -0
- windmill_api/models/create_email_trigger_json_body_retry_constant.py +66 -0
- windmill_api/models/create_email_trigger_json_body_retry_exponential.py +82 -0
- windmill_api/models/create_email_trigger_json_body_retry_retry_if.py +58 -0
- windmill_api/models/edit_email_trigger.py +137 -0
- windmill_api/models/edit_email_trigger_error_handler_args.py +44 -0
- windmill_api/models/edit_email_trigger_retry.py +107 -0
- windmill_api/models/edit_email_trigger_retry_constant.py +66 -0
- windmill_api/models/edit_email_trigger_retry_exponential.py +82 -0
- windmill_api/models/edit_email_trigger_retry_retry_if.py +58 -0
- windmill_api/models/email_trigger.py +177 -0
- windmill_api/models/email_trigger_error_handler_args.py +44 -0
- windmill_api/models/email_trigger_extra_perms.py +44 -0
- windmill_api/models/email_trigger_retry.py +107 -0
- windmill_api/models/email_trigger_retry_constant.py +66 -0
- windmill_api/models/email_trigger_retry_exponential.py +82 -0
- windmill_api/models/email_trigger_retry_retry_if.py +58 -0
- windmill_api/models/exists_email_local_part_json_body.py +76 -0
- windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +1 -0
- windmill_api/models/get_capture_response_200_trigger_kind.py +1 -0
- windmill_api/models/get_email_trigger_response_200.py +180 -0
- windmill_api/models/get_email_trigger_response_200_error_handler_args.py +44 -0
- windmill_api/models/get_email_trigger_response_200_extra_perms.py +44 -0
- windmill_api/models/get_email_trigger_response_200_retry.py +107 -0
- windmill_api/models/get_email_trigger_response_200_retry_constant.py +66 -0
- windmill_api/models/get_email_trigger_response_200_retry_exponential.py +82 -0
- windmill_api/models/get_email_trigger_response_200_retry_retry_if.py +58 -0
- windmill_api/models/get_granular_acls_kind.py +1 -0
- windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
- windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
- windmill_api/models/get_used_triggers_response_200.py +7 -0
- windmill_api/models/list_captures_response_200_item_trigger_kind.py +1 -0
- windmill_api/models/list_captures_trigger_kind.py +1 -0
- windmill_api/models/list_email_triggers_response_200_item.py +184 -0
- windmill_api/models/list_email_triggers_response_200_item_error_handler_args.py +44 -0
- windmill_api/models/list_email_triggers_response_200_item_extra_perms.py +44 -0
- windmill_api/models/list_email_triggers_response_200_item_retry.py +119 -0
- windmill_api/models/list_email_triggers_response_200_item_retry_constant.py +66 -0
- windmill_api/models/list_email_triggers_response_200_item_retry_exponential.py +82 -0
- windmill_api/models/list_email_triggers_response_200_item_retry_retry_if.py +58 -0
- windmill_api/models/new_email_trigger.py +136 -0
- windmill_api/models/new_email_trigger_error_handler_args.py +44 -0
- windmill_api/models/new_email_trigger_retry.py +107 -0
- windmill_api/models/new_email_trigger_retry_constant.py +66 -0
- windmill_api/models/new_email_trigger_retry_exponential.py +82 -0
- windmill_api/models/new_email_trigger_retry_retry_if.py +58 -0
- windmill_api/models/ping_capture_config_trigger_kind.py +1 -0
- windmill_api/models/remove_granular_acls_kind.py +1 -0
- windmill_api/models/set_capture_config_json_body_trigger_kind.py +1 -0
- windmill_api/models/triggers_count.py +8 -0
- windmill_api/models/update_email_trigger_json_body.py +140 -0
- windmill_api/models/update_email_trigger_json_body_error_handler_args.py +44 -0
- windmill_api/models/update_email_trigger_json_body_retry.py +107 -0
- windmill_api/models/update_email_trigger_json_body_retry_constant.py +66 -0
- windmill_api/models/update_email_trigger_json_body_retry_exponential.py +82 -0
- windmill_api/models/update_email_trigger_json_body_retry_retry_if.py +58 -0
- {windmill_api-1.540.2.dist-info → windmill_api-1.541.1.dist-info}/METADATA +1 -1
- {windmill_api-1.540.2.dist-info → windmill_api-1.541.1.dist-info}/RECORD +73 -19
- {windmill_api-1.540.2.dist-info → windmill_api-1.541.1.dist-info}/LICENSE +0 -0
- {windmill_api-1.540.2.dist-info → windmill_api-1.541.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.list_email_triggers_response_200_item import ListEmailTriggersResponse200Item
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
page: Union[Unset, None, int] = UNSET,
|
|
16
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
17
|
+
path: Union[Unset, None, str] = UNSET,
|
|
18
|
+
is_flow: Union[Unset, None, bool] = UNSET,
|
|
19
|
+
path_start: Union[Unset, None, str] = UNSET,
|
|
20
|
+
) -> Dict[str, Any]:
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
params: Dict[str, Any] = {}
|
|
24
|
+
params["page"] = page
|
|
25
|
+
|
|
26
|
+
params["per_page"] = per_page
|
|
27
|
+
|
|
28
|
+
params["path"] = path
|
|
29
|
+
|
|
30
|
+
params["is_flow"] = is_flow
|
|
31
|
+
|
|
32
|
+
params["path_start"] = path_start
|
|
33
|
+
|
|
34
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
"method": "get",
|
|
38
|
+
"url": "/w/{workspace}/email_triggers/list".format(
|
|
39
|
+
workspace=workspace,
|
|
40
|
+
),
|
|
41
|
+
"params": params,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _parse_response(
|
|
46
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
47
|
+
) -> Optional[List["ListEmailTriggersResponse200Item"]]:
|
|
48
|
+
if response.status_code == HTTPStatus.OK:
|
|
49
|
+
response_200 = []
|
|
50
|
+
_response_200 = response.json()
|
|
51
|
+
for response_200_item_data in _response_200:
|
|
52
|
+
response_200_item = ListEmailTriggersResponse200Item.from_dict(response_200_item_data)
|
|
53
|
+
|
|
54
|
+
response_200.append(response_200_item)
|
|
55
|
+
|
|
56
|
+
return response_200
|
|
57
|
+
if client.raise_on_unexpected_status:
|
|
58
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
59
|
+
else:
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _build_response(
|
|
64
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
65
|
+
) -> Response[List["ListEmailTriggersResponse200Item"]]:
|
|
66
|
+
return Response(
|
|
67
|
+
status_code=HTTPStatus(response.status_code),
|
|
68
|
+
content=response.content,
|
|
69
|
+
headers=response.headers,
|
|
70
|
+
parsed=_parse_response(client=client, response=response),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def sync_detailed(
|
|
75
|
+
workspace: str,
|
|
76
|
+
*,
|
|
77
|
+
client: Union[AuthenticatedClient, Client],
|
|
78
|
+
page: Union[Unset, None, int] = UNSET,
|
|
79
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
80
|
+
path: Union[Unset, None, str] = UNSET,
|
|
81
|
+
is_flow: Union[Unset, None, bool] = UNSET,
|
|
82
|
+
path_start: Union[Unset, None, str] = UNSET,
|
|
83
|
+
) -> Response[List["ListEmailTriggersResponse200Item"]]:
|
|
84
|
+
"""list email triggers
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
workspace (str):
|
|
88
|
+
page (Union[Unset, None, int]):
|
|
89
|
+
per_page (Union[Unset, None, int]):
|
|
90
|
+
path (Union[Unset, None, str]):
|
|
91
|
+
is_flow (Union[Unset, None, bool]):
|
|
92
|
+
path_start (Union[Unset, None, str]):
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
96
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[List['ListEmailTriggersResponse200Item']]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
kwargs = _get_kwargs(
|
|
103
|
+
workspace=workspace,
|
|
104
|
+
page=page,
|
|
105
|
+
per_page=per_page,
|
|
106
|
+
path=path,
|
|
107
|
+
is_flow=is_flow,
|
|
108
|
+
path_start=path_start,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
response = client.get_httpx_client().request(
|
|
112
|
+
**kwargs,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
return _build_response(client=client, response=response)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def sync(
|
|
119
|
+
workspace: str,
|
|
120
|
+
*,
|
|
121
|
+
client: Union[AuthenticatedClient, Client],
|
|
122
|
+
page: Union[Unset, None, int] = UNSET,
|
|
123
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
124
|
+
path: Union[Unset, None, str] = UNSET,
|
|
125
|
+
is_flow: Union[Unset, None, bool] = UNSET,
|
|
126
|
+
path_start: Union[Unset, None, str] = UNSET,
|
|
127
|
+
) -> Optional[List["ListEmailTriggersResponse200Item"]]:
|
|
128
|
+
"""list email triggers
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
workspace (str):
|
|
132
|
+
page (Union[Unset, None, int]):
|
|
133
|
+
per_page (Union[Unset, None, int]):
|
|
134
|
+
path (Union[Unset, None, str]):
|
|
135
|
+
is_flow (Union[Unset, None, bool]):
|
|
136
|
+
path_start (Union[Unset, None, str]):
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
List['ListEmailTriggersResponse200Item']
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
return sync_detailed(
|
|
147
|
+
workspace=workspace,
|
|
148
|
+
client=client,
|
|
149
|
+
page=page,
|
|
150
|
+
per_page=per_page,
|
|
151
|
+
path=path,
|
|
152
|
+
is_flow=is_flow,
|
|
153
|
+
path_start=path_start,
|
|
154
|
+
).parsed
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
async def asyncio_detailed(
|
|
158
|
+
workspace: str,
|
|
159
|
+
*,
|
|
160
|
+
client: Union[AuthenticatedClient, Client],
|
|
161
|
+
page: Union[Unset, None, int] = UNSET,
|
|
162
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
163
|
+
path: Union[Unset, None, str] = UNSET,
|
|
164
|
+
is_flow: Union[Unset, None, bool] = UNSET,
|
|
165
|
+
path_start: Union[Unset, None, str] = UNSET,
|
|
166
|
+
) -> Response[List["ListEmailTriggersResponse200Item"]]:
|
|
167
|
+
"""list email triggers
|
|
168
|
+
|
|
169
|
+
Args:
|
|
170
|
+
workspace (str):
|
|
171
|
+
page (Union[Unset, None, int]):
|
|
172
|
+
per_page (Union[Unset, None, int]):
|
|
173
|
+
path (Union[Unset, None, str]):
|
|
174
|
+
is_flow (Union[Unset, None, bool]):
|
|
175
|
+
path_start (Union[Unset, None, str]):
|
|
176
|
+
|
|
177
|
+
Raises:
|
|
178
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
179
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
180
|
+
|
|
181
|
+
Returns:
|
|
182
|
+
Response[List['ListEmailTriggersResponse200Item']]
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
kwargs = _get_kwargs(
|
|
186
|
+
workspace=workspace,
|
|
187
|
+
page=page,
|
|
188
|
+
per_page=per_page,
|
|
189
|
+
path=path,
|
|
190
|
+
is_flow=is_flow,
|
|
191
|
+
path_start=path_start,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
195
|
+
|
|
196
|
+
return _build_response(client=client, response=response)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
async def asyncio(
|
|
200
|
+
workspace: str,
|
|
201
|
+
*,
|
|
202
|
+
client: Union[AuthenticatedClient, Client],
|
|
203
|
+
page: Union[Unset, None, int] = UNSET,
|
|
204
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
205
|
+
path: Union[Unset, None, str] = UNSET,
|
|
206
|
+
is_flow: Union[Unset, None, bool] = UNSET,
|
|
207
|
+
path_start: Union[Unset, None, str] = UNSET,
|
|
208
|
+
) -> Optional[List["ListEmailTriggersResponse200Item"]]:
|
|
209
|
+
"""list email triggers
|
|
210
|
+
|
|
211
|
+
Args:
|
|
212
|
+
workspace (str):
|
|
213
|
+
page (Union[Unset, None, int]):
|
|
214
|
+
per_page (Union[Unset, None, int]):
|
|
215
|
+
path (Union[Unset, None, str]):
|
|
216
|
+
is_flow (Union[Unset, None, bool]):
|
|
217
|
+
path_start (Union[Unset, None, str]):
|
|
218
|
+
|
|
219
|
+
Raises:
|
|
220
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
221
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
222
|
+
|
|
223
|
+
Returns:
|
|
224
|
+
List['ListEmailTriggersResponse200Item']
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
await asyncio_detailed(
|
|
229
|
+
workspace=workspace,
|
|
230
|
+
client=client,
|
|
231
|
+
page=page,
|
|
232
|
+
per_page=per_page,
|
|
233
|
+
path=path,
|
|
234
|
+
is_flow=is_flow,
|
|
235
|
+
path_start=path_start,
|
|
236
|
+
)
|
|
237
|
+
).parsed
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.update_email_trigger_json_body import UpdateEmailTriggerJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
path: str,
|
|
15
|
+
*,
|
|
16
|
+
json_body: UpdateEmailTriggerJsonBody,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
json_json_body = json_body.to_dict()
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
"method": "post",
|
|
24
|
+
"url": "/w/{workspace}/email_triggers/update/{path}".format(
|
|
25
|
+
workspace=workspace,
|
|
26
|
+
path=path,
|
|
27
|
+
),
|
|
28
|
+
"json": json_json_body,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
33
|
+
if client.raise_on_unexpected_status:
|
|
34
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
35
|
+
else:
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
40
|
+
return Response(
|
|
41
|
+
status_code=HTTPStatus(response.status_code),
|
|
42
|
+
content=response.content,
|
|
43
|
+
headers=response.headers,
|
|
44
|
+
parsed=_parse_response(client=client, response=response),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def sync_detailed(
|
|
49
|
+
workspace: str,
|
|
50
|
+
path: str,
|
|
51
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
json_body: UpdateEmailTriggerJsonBody,
|
|
54
|
+
) -> Response[Any]:
|
|
55
|
+
"""update email trigger
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
workspace (str):
|
|
59
|
+
path (str):
|
|
60
|
+
json_body (UpdateEmailTriggerJsonBody):
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
64
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Response[Any]
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
kwargs = _get_kwargs(
|
|
71
|
+
workspace=workspace,
|
|
72
|
+
path=path,
|
|
73
|
+
json_body=json_body,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = client.get_httpx_client().request(
|
|
77
|
+
**kwargs,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
return _build_response(client=client, response=response)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
async def asyncio_detailed(
|
|
84
|
+
workspace: str,
|
|
85
|
+
path: str,
|
|
86
|
+
*,
|
|
87
|
+
client: Union[AuthenticatedClient, Client],
|
|
88
|
+
json_body: UpdateEmailTriggerJsonBody,
|
|
89
|
+
) -> Response[Any]:
|
|
90
|
+
"""update email trigger
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
workspace (str):
|
|
94
|
+
path (str):
|
|
95
|
+
json_body (UpdateEmailTriggerJsonBody):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Response[Any]
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
kwargs = _get_kwargs(
|
|
106
|
+
workspace=workspace,
|
|
107
|
+
path=path,
|
|
108
|
+
json_body=json_body,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
112
|
+
|
|
113
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,139 @@
|
|
|
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.create_email_trigger_json_body_error_handler_args import CreateEmailTriggerJsonBodyErrorHandlerArgs
|
|
10
|
+
from ..models.create_email_trigger_json_body_retry import CreateEmailTriggerJsonBodyRetry
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="CreateEmailTriggerJsonBody")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class CreateEmailTriggerJsonBody:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
path (str):
|
|
21
|
+
script_path (str):
|
|
22
|
+
local_part (str):
|
|
23
|
+
is_flow (bool):
|
|
24
|
+
workspaced_local_part (Union[Unset, bool]):
|
|
25
|
+
error_handler_path (Union[Unset, str]):
|
|
26
|
+
error_handler_args (Union[Unset, CreateEmailTriggerJsonBodyErrorHandlerArgs]): The arguments to pass to the
|
|
27
|
+
script or flow
|
|
28
|
+
retry (Union[Unset, CreateEmailTriggerJsonBodyRetry]):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
path: str
|
|
32
|
+
script_path: str
|
|
33
|
+
local_part: str
|
|
34
|
+
is_flow: bool
|
|
35
|
+
workspaced_local_part: Union[Unset, bool] = UNSET
|
|
36
|
+
error_handler_path: Union[Unset, str] = UNSET
|
|
37
|
+
error_handler_args: Union[Unset, "CreateEmailTriggerJsonBodyErrorHandlerArgs"] = UNSET
|
|
38
|
+
retry: Union[Unset, "CreateEmailTriggerJsonBodyRetry"] = UNSET
|
|
39
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
42
|
+
path = self.path
|
|
43
|
+
script_path = self.script_path
|
|
44
|
+
local_part = self.local_part
|
|
45
|
+
is_flow = self.is_flow
|
|
46
|
+
workspaced_local_part = self.workspaced_local_part
|
|
47
|
+
error_handler_path = self.error_handler_path
|
|
48
|
+
error_handler_args: Union[Unset, Dict[str, Any]] = UNSET
|
|
49
|
+
if not isinstance(self.error_handler_args, Unset):
|
|
50
|
+
error_handler_args = self.error_handler_args.to_dict()
|
|
51
|
+
|
|
52
|
+
retry: Union[Unset, Dict[str, Any]] = UNSET
|
|
53
|
+
if not isinstance(self.retry, Unset):
|
|
54
|
+
retry = self.retry.to_dict()
|
|
55
|
+
|
|
56
|
+
field_dict: Dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update(
|
|
59
|
+
{
|
|
60
|
+
"path": path,
|
|
61
|
+
"script_path": script_path,
|
|
62
|
+
"local_part": local_part,
|
|
63
|
+
"is_flow": is_flow,
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
if workspaced_local_part is not UNSET:
|
|
67
|
+
field_dict["workspaced_local_part"] = workspaced_local_part
|
|
68
|
+
if error_handler_path is not UNSET:
|
|
69
|
+
field_dict["error_handler_path"] = error_handler_path
|
|
70
|
+
if error_handler_args is not UNSET:
|
|
71
|
+
field_dict["error_handler_args"] = error_handler_args
|
|
72
|
+
if retry is not UNSET:
|
|
73
|
+
field_dict["retry"] = retry
|
|
74
|
+
|
|
75
|
+
return field_dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
79
|
+
from ..models.create_email_trigger_json_body_error_handler_args import (
|
|
80
|
+
CreateEmailTriggerJsonBodyErrorHandlerArgs,
|
|
81
|
+
)
|
|
82
|
+
from ..models.create_email_trigger_json_body_retry import CreateEmailTriggerJsonBodyRetry
|
|
83
|
+
|
|
84
|
+
d = src_dict.copy()
|
|
85
|
+
path = d.pop("path")
|
|
86
|
+
|
|
87
|
+
script_path = d.pop("script_path")
|
|
88
|
+
|
|
89
|
+
local_part = d.pop("local_part")
|
|
90
|
+
|
|
91
|
+
is_flow = d.pop("is_flow")
|
|
92
|
+
|
|
93
|
+
workspaced_local_part = d.pop("workspaced_local_part", UNSET)
|
|
94
|
+
|
|
95
|
+
error_handler_path = d.pop("error_handler_path", UNSET)
|
|
96
|
+
|
|
97
|
+
_error_handler_args = d.pop("error_handler_args", UNSET)
|
|
98
|
+
error_handler_args: Union[Unset, CreateEmailTriggerJsonBodyErrorHandlerArgs]
|
|
99
|
+
if isinstance(_error_handler_args, Unset):
|
|
100
|
+
error_handler_args = UNSET
|
|
101
|
+
else:
|
|
102
|
+
error_handler_args = CreateEmailTriggerJsonBodyErrorHandlerArgs.from_dict(_error_handler_args)
|
|
103
|
+
|
|
104
|
+
_retry = d.pop("retry", UNSET)
|
|
105
|
+
retry: Union[Unset, CreateEmailTriggerJsonBodyRetry]
|
|
106
|
+
if isinstance(_retry, Unset):
|
|
107
|
+
retry = UNSET
|
|
108
|
+
else:
|
|
109
|
+
retry = CreateEmailTriggerJsonBodyRetry.from_dict(_retry)
|
|
110
|
+
|
|
111
|
+
create_email_trigger_json_body = cls(
|
|
112
|
+
path=path,
|
|
113
|
+
script_path=script_path,
|
|
114
|
+
local_part=local_part,
|
|
115
|
+
is_flow=is_flow,
|
|
116
|
+
workspaced_local_part=workspaced_local_part,
|
|
117
|
+
error_handler_path=error_handler_path,
|
|
118
|
+
error_handler_args=error_handler_args,
|
|
119
|
+
retry=retry,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
create_email_trigger_json_body.additional_properties = d
|
|
123
|
+
return create_email_trigger_json_body
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def additional_keys(self) -> List[str]:
|
|
127
|
+
return list(self.additional_properties.keys())
|
|
128
|
+
|
|
129
|
+
def __getitem__(self, key: str) -> Any:
|
|
130
|
+
return self.additional_properties[key]
|
|
131
|
+
|
|
132
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
133
|
+
self.additional_properties[key] = value
|
|
134
|
+
|
|
135
|
+
def __delitem__(self, key: str) -> None:
|
|
136
|
+
del self.additional_properties[key]
|
|
137
|
+
|
|
138
|
+
def __contains__(self, key: str) -> bool:
|
|
139
|
+
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="CreateEmailTriggerJsonBodyErrorHandlerArgs")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CreateEmailTriggerJsonBodyErrorHandlerArgs:
|
|
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
|
+
create_email_trigger_json_body_error_handler_args = cls()
|
|
26
|
+
|
|
27
|
+
create_email_trigger_json_body_error_handler_args.additional_properties = d
|
|
28
|
+
return create_email_trigger_json_body_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,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.create_email_trigger_json_body_retry_constant import CreateEmailTriggerJsonBodyRetryConstant
|
|
10
|
+
from ..models.create_email_trigger_json_body_retry_exponential import CreateEmailTriggerJsonBodyRetryExponential
|
|
11
|
+
from ..models.create_email_trigger_json_body_retry_retry_if import CreateEmailTriggerJsonBodyRetryRetryIf
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="CreateEmailTriggerJsonBodyRetry")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class CreateEmailTriggerJsonBodyRetry:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
constant (Union[Unset, CreateEmailTriggerJsonBodyRetryConstant]):
|
|
22
|
+
exponential (Union[Unset, CreateEmailTriggerJsonBodyRetryExponential]):
|
|
23
|
+
retry_if (Union[Unset, CreateEmailTriggerJsonBodyRetryRetryIf]):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
constant: Union[Unset, "CreateEmailTriggerJsonBodyRetryConstant"] = UNSET
|
|
27
|
+
exponential: Union[Unset, "CreateEmailTriggerJsonBodyRetryExponential"] = UNSET
|
|
28
|
+
retry_if: Union[Unset, "CreateEmailTriggerJsonBodyRetryRetryIf"] = 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.create_email_trigger_json_body_retry_constant import CreateEmailTriggerJsonBodyRetryConstant
|
|
59
|
+
from ..models.create_email_trigger_json_body_retry_exponential import CreateEmailTriggerJsonBodyRetryExponential
|
|
60
|
+
from ..models.create_email_trigger_json_body_retry_retry_if import CreateEmailTriggerJsonBodyRetryRetryIf
|
|
61
|
+
|
|
62
|
+
d = src_dict.copy()
|
|
63
|
+
_constant = d.pop("constant", UNSET)
|
|
64
|
+
constant: Union[Unset, CreateEmailTriggerJsonBodyRetryConstant]
|
|
65
|
+
if isinstance(_constant, Unset):
|
|
66
|
+
constant = UNSET
|
|
67
|
+
else:
|
|
68
|
+
constant = CreateEmailTriggerJsonBodyRetryConstant.from_dict(_constant)
|
|
69
|
+
|
|
70
|
+
_exponential = d.pop("exponential", UNSET)
|
|
71
|
+
exponential: Union[Unset, CreateEmailTriggerJsonBodyRetryExponential]
|
|
72
|
+
if isinstance(_exponential, Unset):
|
|
73
|
+
exponential = UNSET
|
|
74
|
+
else:
|
|
75
|
+
exponential = CreateEmailTriggerJsonBodyRetryExponential.from_dict(_exponential)
|
|
76
|
+
|
|
77
|
+
_retry_if = d.pop("retry_if", UNSET)
|
|
78
|
+
retry_if: Union[Unset, CreateEmailTriggerJsonBodyRetryRetryIf]
|
|
79
|
+
if isinstance(_retry_if, Unset):
|
|
80
|
+
retry_if = UNSET
|
|
81
|
+
else:
|
|
82
|
+
retry_if = CreateEmailTriggerJsonBodyRetryRetryIf.from_dict(_retry_if)
|
|
83
|
+
|
|
84
|
+
create_email_trigger_json_body_retry = cls(
|
|
85
|
+
constant=constant,
|
|
86
|
+
exponential=exponential,
|
|
87
|
+
retry_if=retry_if,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
create_email_trigger_json_body_retry.additional_properties = d
|
|
91
|
+
return create_email_trigger_json_body_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
|