windmill-api 1.483.1__py3-none-any.whl → 1.484.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 (58) hide show
  1. windmill_api/api/app/create_app_raw.py +105 -0
  2. windmill_api/api/app/update_app_raw.py +113 -0
  3. windmill_api/models/create_app_raw_multipart_data.py +111 -0
  4. windmill_api/models/create_app_raw_multipart_data_app.py +112 -0
  5. windmill_api/models/create_app_raw_multipart_data_app_policy.py +187 -0
  6. windmill_api/models/create_app_raw_multipart_data_app_policy_allowed_s3_keys_item.py +66 -0
  7. windmill_api/models/create_app_raw_multipart_data_app_policy_execution_mode.py +10 -0
  8. windmill_api/models/create_app_raw_multipart_data_app_policy_s3_inputs_item.py +44 -0
  9. windmill_api/models/create_app_raw_multipart_data_app_policy_triggerables.py +66 -0
  10. windmill_api/models/create_app_raw_multipart_data_app_policy_triggerables_additional_property.py +44 -0
  11. windmill_api/models/create_app_raw_multipart_data_app_policy_triggerables_v2.py +70 -0
  12. windmill_api/models/create_app_raw_multipart_data_app_policy_triggerables_v2_additional_property.py +44 -0
  13. windmill_api/models/create_gcp_trigger_json_body.py +61 -15
  14. windmill_api/models/{gcp_create_update_subscription_delivery_config.py → create_gcp_trigger_json_body_delivery_config.py} +5 -12
  15. windmill_api/models/{gcp_create_update_subscription_delivery_type.py → create_gcp_trigger_json_body_delivery_type.py} +1 -1
  16. windmill_api/models/create_gcp_trigger_json_body_subscription_mode.py +6 -66
  17. windmill_api/models/gcp_trigger.py +10 -0
  18. windmill_api/models/gcp_trigger_data.py +161 -0
  19. windmill_api/models/{gcp_existing_subscription.py → gcp_trigger_data_delivery_config.py} +21 -18
  20. windmill_api/models/gcp_trigger_data_delivery_type.py +9 -0
  21. windmill_api/models/{gcp_subscription_mode_config_subscription_mode.py → gcp_trigger_data_subscription_mode.py} +1 -1
  22. windmill_api/models/gcp_trigger_delivery_config.py +0 -7
  23. windmill_api/models/{new_gcp_trigger_subscription_mode_subscription_mode.py → gcp_trigger_subscription_mode.py} +1 -1
  24. windmill_api/models/get_gcp_trigger_response_200.py +10 -0
  25. windmill_api/models/get_gcp_trigger_response_200_delivery_config.py +0 -7
  26. windmill_api/models/{create_gcp_trigger_json_body_subscription_mode_subscription_mode.py → get_gcp_trigger_response_200_subscription_mode.py} +1 -1
  27. windmill_api/models/list_apps_response_200_item.py +8 -0
  28. windmill_api/models/list_gcp_triggers_response_200_item.py +12 -0
  29. windmill_api/models/list_gcp_triggers_response_200_item_delivery_config.py +0 -7
  30. windmill_api/models/{edit_gcp_trigger_subscription_mode_subscription_mode.py → list_gcp_triggers_response_200_item_subscription_mode.py} +1 -1
  31. windmill_api/models/listable_app.py +8 -0
  32. windmill_api/models/push_config.py +0 -7
  33. windmill_api/models/teams_channel.py +79 -0
  34. windmill_api/models/update_app_raw_multipart_data.py +111 -0
  35. windmill_api/models/update_app_raw_multipart_data_app.py +112 -0
  36. windmill_api/models/update_app_raw_multipart_data_app_policy.py +187 -0
  37. windmill_api/models/update_app_raw_multipart_data_app_policy_allowed_s3_keys_item.py +66 -0
  38. windmill_api/models/update_app_raw_multipart_data_app_policy_execution_mode.py +10 -0
  39. windmill_api/models/update_app_raw_multipart_data_app_policy_s3_inputs_item.py +44 -0
  40. windmill_api/models/update_app_raw_multipart_data_app_policy_triggerables.py +66 -0
  41. windmill_api/models/update_app_raw_multipart_data_app_policy_triggerables_additional_property.py +44 -0
  42. windmill_api/models/update_app_raw_multipart_data_app_policy_triggerables_v2.py +70 -0
  43. windmill_api/models/update_app_raw_multipart_data_app_policy_triggerables_v2_additional_property.py +44 -0
  44. windmill_api/models/update_gcp_trigger_json_body.py +72 -26
  45. windmill_api/models/update_gcp_trigger_json_body_delivery_config.py +68 -0
  46. windmill_api/models/update_gcp_trigger_json_body_delivery_type.py +9 -0
  47. windmill_api/models/update_gcp_trigger_json_body_subscription_mode.py +6 -66
  48. {windmill_api-1.483.1.dist-info → windmill_api-1.484.0.dist-info}/METADATA +1 -1
  49. {windmill_api-1.483.1.dist-info → windmill_api-1.484.0.dist-info}/RECORD +51 -31
  50. windmill_api/models/edit_gcp_trigger.py +0 -114
  51. windmill_api/models/edit_gcp_trigger_subscription_mode.py +0 -66
  52. windmill_api/models/gcp_create_update_subscription.py +0 -91
  53. windmill_api/models/gcp_subscription_mode_config.py +0 -66
  54. windmill_api/models/new_gcp_trigger.py +0 -114
  55. windmill_api/models/new_gcp_trigger_subscription_mode.py +0 -66
  56. windmill_api/models/update_gcp_trigger_json_body_subscription_mode_subscription_mode.py +0 -9
  57. {windmill_api-1.483.1.dist-info → windmill_api-1.484.0.dist-info}/LICENSE +0 -0
  58. {windmill_api-1.483.1.dist-info → windmill_api-1.484.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,105 @@
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.create_app_raw_multipart_data import CreateAppRawMultipartData
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ multipart_data: CreateAppRawMultipartData,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ multipart_multipart_data = multipart_data.to_multipart()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/apps/create_raw".format(
24
+ workspace=workspace,
25
+ ),
26
+ "files": multipart_multipart_data,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
31
+ if client.raise_on_unexpected_status:
32
+ raise errors.UnexpectedStatus(response.status_code, response.content)
33
+ else:
34
+ return None
35
+
36
+
37
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
38
+ return Response(
39
+ status_code=HTTPStatus(response.status_code),
40
+ content=response.content,
41
+ headers=response.headers,
42
+ parsed=_parse_response(client=client, response=response),
43
+ )
44
+
45
+
46
+ def sync_detailed(
47
+ workspace: str,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ multipart_data: CreateAppRawMultipartData,
51
+ ) -> Response[Any]:
52
+ """create app raw
53
+
54
+ Args:
55
+ workspace (str):
56
+ multipart_data (CreateAppRawMultipartData):
57
+
58
+ Raises:
59
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
61
+
62
+ Returns:
63
+ Response[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ multipart_data=multipart_data,
69
+ )
70
+
71
+ response = client.get_httpx_client().request(
72
+ **kwargs,
73
+ )
74
+
75
+ return _build_response(client=client, response=response)
76
+
77
+
78
+ async def asyncio_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ multipart_data: CreateAppRawMultipartData,
83
+ ) -> Response[Any]:
84
+ """create app raw
85
+
86
+ Args:
87
+ workspace (str):
88
+ multipart_data (CreateAppRawMultipartData):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ workspace=workspace,
100
+ multipart_data=multipart_data,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -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_app_raw_multipart_data import UpdateAppRawMultipartData
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ *,
16
+ multipart_data: UpdateAppRawMultipartData,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ multipart_multipart_data = multipart_data.to_multipart()
21
+
22
+ return {
23
+ "method": "post",
24
+ "url": "/w/{workspace}/apps/update_raw/{path}".format(
25
+ workspace=workspace,
26
+ path=path,
27
+ ),
28
+ "files": multipart_multipart_data,
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
+ multipart_data: UpdateAppRawMultipartData,
54
+ ) -> Response[Any]:
55
+ """update app
56
+
57
+ Args:
58
+ workspace (str):
59
+ path (str):
60
+ multipart_data (UpdateAppRawMultipartData):
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
+ multipart_data=multipart_data,
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
+ multipart_data: UpdateAppRawMultipartData,
89
+ ) -> Response[Any]:
90
+ """update app
91
+
92
+ Args:
93
+ workspace (str):
94
+ path (str):
95
+ multipart_data (UpdateAppRawMultipartData):
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
+ multipart_data=multipart_data,
109
+ )
110
+
111
+ response = await client.get_async_httpx_client().request(**kwargs)
112
+
113
+ return _build_response(client=client, response=response)
@@ -0,0 +1,111 @@
1
+ import json
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.create_app_raw_multipart_data_app import CreateAppRawMultipartDataApp
11
+
12
+
13
+ T = TypeVar("T", bound="CreateAppRawMultipartData")
14
+
15
+
16
+ @_attrs_define
17
+ class CreateAppRawMultipartData:
18
+ """
19
+ Attributes:
20
+ app (Union[Unset, CreateAppRawMultipartDataApp]):
21
+ js (Union[Unset, str]):
22
+ css (Union[Unset, str]):
23
+ """
24
+
25
+ app: Union[Unset, "CreateAppRawMultipartDataApp"] = UNSET
26
+ js: Union[Unset, str] = UNSET
27
+ css: Union[Unset, str] = UNSET
28
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> Dict[str, Any]:
31
+ app: Union[Unset, Dict[str, Any]] = UNSET
32
+ if not isinstance(self.app, Unset):
33
+ app = self.app.to_dict()
34
+
35
+ js = self.js
36
+ css = self.css
37
+
38
+ field_dict: Dict[str, Any] = {}
39
+ field_dict.update(self.additional_properties)
40
+ field_dict.update({})
41
+ if app is not UNSET:
42
+ field_dict["app"] = app
43
+ if js is not UNSET:
44
+ field_dict["js"] = js
45
+ if css is not UNSET:
46
+ field_dict["css"] = css
47
+
48
+ return field_dict
49
+
50
+ def to_multipart(self) -> Dict[str, Any]:
51
+ app: Union[Unset, Tuple[None, bytes, str]] = UNSET
52
+ if not isinstance(self.app, Unset):
53
+ app = (None, json.dumps(self.app.to_dict()).encode(), "application/json")
54
+
55
+ js = self.js if isinstance(self.js, Unset) else (None, str(self.js).encode(), "text/plain")
56
+ css = self.css if isinstance(self.css, Unset) else (None, str(self.css).encode(), "text/plain")
57
+
58
+ field_dict: Dict[str, Any] = {}
59
+ field_dict.update(
60
+ {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()}
61
+ )
62
+ field_dict.update({})
63
+ if app is not UNSET:
64
+ field_dict["app"] = app
65
+ if js is not UNSET:
66
+ field_dict["js"] = js
67
+ if css is not UNSET:
68
+ field_dict["css"] = css
69
+
70
+ return field_dict
71
+
72
+ @classmethod
73
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
74
+ from ..models.create_app_raw_multipart_data_app import CreateAppRawMultipartDataApp
75
+
76
+ d = src_dict.copy()
77
+ _app = d.pop("app", UNSET)
78
+ app: Union[Unset, CreateAppRawMultipartDataApp]
79
+ if isinstance(_app, Unset):
80
+ app = UNSET
81
+ else:
82
+ app = CreateAppRawMultipartDataApp.from_dict(_app)
83
+
84
+ js = d.pop("js", UNSET)
85
+
86
+ css = d.pop("css", UNSET)
87
+
88
+ create_app_raw_multipart_data = cls(
89
+ app=app,
90
+ js=js,
91
+ css=css,
92
+ )
93
+
94
+ create_app_raw_multipart_data.additional_properties = d
95
+ return create_app_raw_multipart_data
96
+
97
+ @property
98
+ def additional_keys(self) -> List[str]:
99
+ return list(self.additional_properties.keys())
100
+
101
+ def __getitem__(self, key: str) -> Any:
102
+ return self.additional_properties[key]
103
+
104
+ def __setitem__(self, key: str, value: Any) -> None:
105
+ self.additional_properties[key] = value
106
+
107
+ def __delitem__(self, key: str) -> None:
108
+ del self.additional_properties[key]
109
+
110
+ def __contains__(self, key: str) -> bool:
111
+ return key in self.additional_properties
@@ -0,0 +1,112 @@
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_app_raw_multipart_data_app_policy import CreateAppRawMultipartDataAppPolicy
10
+
11
+
12
+ T = TypeVar("T", bound="CreateAppRawMultipartDataApp")
13
+
14
+
15
+ @_attrs_define
16
+ class CreateAppRawMultipartDataApp:
17
+ """
18
+ Attributes:
19
+ path (str):
20
+ value (Any):
21
+ summary (str):
22
+ policy (CreateAppRawMultipartDataAppPolicy):
23
+ draft_only (Union[Unset, bool]):
24
+ deployment_message (Union[Unset, str]):
25
+ custom_path (Union[Unset, str]):
26
+ """
27
+
28
+ path: str
29
+ value: Any
30
+ summary: str
31
+ policy: "CreateAppRawMultipartDataAppPolicy"
32
+ draft_only: Union[Unset, bool] = UNSET
33
+ deployment_message: Union[Unset, str] = UNSET
34
+ custom_path: Union[Unset, str] = UNSET
35
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
36
+
37
+ def to_dict(self) -> Dict[str, Any]:
38
+ path = self.path
39
+ value = self.value
40
+ summary = self.summary
41
+ policy = self.policy.to_dict()
42
+
43
+ draft_only = self.draft_only
44
+ deployment_message = self.deployment_message
45
+ custom_path = self.custom_path
46
+
47
+ field_dict: Dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update(
50
+ {
51
+ "path": path,
52
+ "value": value,
53
+ "summary": summary,
54
+ "policy": policy,
55
+ }
56
+ )
57
+ if draft_only is not UNSET:
58
+ field_dict["draft_only"] = draft_only
59
+ if deployment_message is not UNSET:
60
+ field_dict["deployment_message"] = deployment_message
61
+ if custom_path is not UNSET:
62
+ field_dict["custom_path"] = custom_path
63
+
64
+ return field_dict
65
+
66
+ @classmethod
67
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
68
+ from ..models.create_app_raw_multipart_data_app_policy import CreateAppRawMultipartDataAppPolicy
69
+
70
+ d = src_dict.copy()
71
+ path = d.pop("path")
72
+
73
+ value = d.pop("value")
74
+
75
+ summary = d.pop("summary")
76
+
77
+ policy = CreateAppRawMultipartDataAppPolicy.from_dict(d.pop("policy"))
78
+
79
+ draft_only = d.pop("draft_only", UNSET)
80
+
81
+ deployment_message = d.pop("deployment_message", UNSET)
82
+
83
+ custom_path = d.pop("custom_path", UNSET)
84
+
85
+ create_app_raw_multipart_data_app = cls(
86
+ path=path,
87
+ value=value,
88
+ summary=summary,
89
+ policy=policy,
90
+ draft_only=draft_only,
91
+ deployment_message=deployment_message,
92
+ custom_path=custom_path,
93
+ )
94
+
95
+ create_app_raw_multipart_data_app.additional_properties = d
96
+ return create_app_raw_multipart_data_app
97
+
98
+ @property
99
+ def additional_keys(self) -> List[str]:
100
+ return list(self.additional_properties.keys())
101
+
102
+ def __getitem__(self, key: str) -> Any:
103
+ return self.additional_properties[key]
104
+
105
+ def __setitem__(self, key: str, value: Any) -> None:
106
+ self.additional_properties[key] = value
107
+
108
+ def __delitem__(self, key: str) -> None:
109
+ del self.additional_properties[key]
110
+
111
+ def __contains__(self, key: str) -> bool:
112
+ return key in self.additional_properties
@@ -0,0 +1,187 @@
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 ..models.create_app_raw_multipart_data_app_policy_execution_mode import (
7
+ CreateAppRawMultipartDataAppPolicyExecutionMode,
8
+ )
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.create_app_raw_multipart_data_app_policy_allowed_s3_keys_item import (
13
+ CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem,
14
+ )
15
+ from ..models.create_app_raw_multipart_data_app_policy_s3_inputs_item import (
16
+ CreateAppRawMultipartDataAppPolicyS3InputsItem,
17
+ )
18
+ from ..models.create_app_raw_multipart_data_app_policy_triggerables import (
19
+ CreateAppRawMultipartDataAppPolicyTriggerables,
20
+ )
21
+ from ..models.create_app_raw_multipart_data_app_policy_triggerables_v2 import (
22
+ CreateAppRawMultipartDataAppPolicyTriggerablesV2,
23
+ )
24
+
25
+
26
+ T = TypeVar("T", bound="CreateAppRawMultipartDataAppPolicy")
27
+
28
+
29
+ @_attrs_define
30
+ class CreateAppRawMultipartDataAppPolicy:
31
+ """
32
+ Attributes:
33
+ triggerables (Union[Unset, CreateAppRawMultipartDataAppPolicyTriggerables]):
34
+ triggerables_v2 (Union[Unset, CreateAppRawMultipartDataAppPolicyTriggerablesV2]):
35
+ s3_inputs (Union[Unset, List['CreateAppRawMultipartDataAppPolicyS3InputsItem']]):
36
+ allowed_s3_keys (Union[Unset, List['CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem']]):
37
+ execution_mode (Union[Unset, CreateAppRawMultipartDataAppPolicyExecutionMode]):
38
+ on_behalf_of (Union[Unset, str]):
39
+ on_behalf_of_email (Union[Unset, str]):
40
+ """
41
+
42
+ triggerables: Union[Unset, "CreateAppRawMultipartDataAppPolicyTriggerables"] = UNSET
43
+ triggerables_v2: Union[Unset, "CreateAppRawMultipartDataAppPolicyTriggerablesV2"] = UNSET
44
+ s3_inputs: Union[Unset, List["CreateAppRawMultipartDataAppPolicyS3InputsItem"]] = UNSET
45
+ allowed_s3_keys: Union[Unset, List["CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem"]] = UNSET
46
+ execution_mode: Union[Unset, CreateAppRawMultipartDataAppPolicyExecutionMode] = UNSET
47
+ on_behalf_of: Union[Unset, str] = UNSET
48
+ on_behalf_of_email: Union[Unset, str] = UNSET
49
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
50
+
51
+ def to_dict(self) -> Dict[str, Any]:
52
+ triggerables: Union[Unset, Dict[str, Any]] = UNSET
53
+ if not isinstance(self.triggerables, Unset):
54
+ triggerables = self.triggerables.to_dict()
55
+
56
+ triggerables_v2: Union[Unset, Dict[str, Any]] = UNSET
57
+ if not isinstance(self.triggerables_v2, Unset):
58
+ triggerables_v2 = self.triggerables_v2.to_dict()
59
+
60
+ s3_inputs: Union[Unset, List[Dict[str, Any]]] = UNSET
61
+ if not isinstance(self.s3_inputs, Unset):
62
+ s3_inputs = []
63
+ for s3_inputs_item_data in self.s3_inputs:
64
+ s3_inputs_item = s3_inputs_item_data.to_dict()
65
+
66
+ s3_inputs.append(s3_inputs_item)
67
+
68
+ allowed_s3_keys: Union[Unset, List[Dict[str, Any]]] = UNSET
69
+ if not isinstance(self.allowed_s3_keys, Unset):
70
+ allowed_s3_keys = []
71
+ for allowed_s3_keys_item_data in self.allowed_s3_keys:
72
+ allowed_s3_keys_item = allowed_s3_keys_item_data.to_dict()
73
+
74
+ allowed_s3_keys.append(allowed_s3_keys_item)
75
+
76
+ execution_mode: Union[Unset, str] = UNSET
77
+ if not isinstance(self.execution_mode, Unset):
78
+ execution_mode = self.execution_mode.value
79
+
80
+ on_behalf_of = self.on_behalf_of
81
+ on_behalf_of_email = self.on_behalf_of_email
82
+
83
+ field_dict: Dict[str, Any] = {}
84
+ field_dict.update(self.additional_properties)
85
+ field_dict.update({})
86
+ if triggerables is not UNSET:
87
+ field_dict["triggerables"] = triggerables
88
+ if triggerables_v2 is not UNSET:
89
+ field_dict["triggerables_v2"] = triggerables_v2
90
+ if s3_inputs is not UNSET:
91
+ field_dict["s3_inputs"] = s3_inputs
92
+ if allowed_s3_keys is not UNSET:
93
+ field_dict["allowed_s3_keys"] = allowed_s3_keys
94
+ if execution_mode is not UNSET:
95
+ field_dict["execution_mode"] = execution_mode
96
+ if on_behalf_of is not UNSET:
97
+ field_dict["on_behalf_of"] = on_behalf_of
98
+ if on_behalf_of_email is not UNSET:
99
+ field_dict["on_behalf_of_email"] = on_behalf_of_email
100
+
101
+ return field_dict
102
+
103
+ @classmethod
104
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
105
+ from ..models.create_app_raw_multipart_data_app_policy_allowed_s3_keys_item import (
106
+ CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem,
107
+ )
108
+ from ..models.create_app_raw_multipart_data_app_policy_s3_inputs_item import (
109
+ CreateAppRawMultipartDataAppPolicyS3InputsItem,
110
+ )
111
+ from ..models.create_app_raw_multipart_data_app_policy_triggerables import (
112
+ CreateAppRawMultipartDataAppPolicyTriggerables,
113
+ )
114
+ from ..models.create_app_raw_multipart_data_app_policy_triggerables_v2 import (
115
+ CreateAppRawMultipartDataAppPolicyTriggerablesV2,
116
+ )
117
+
118
+ d = src_dict.copy()
119
+ _triggerables = d.pop("triggerables", UNSET)
120
+ triggerables: Union[Unset, CreateAppRawMultipartDataAppPolicyTriggerables]
121
+ if isinstance(_triggerables, Unset):
122
+ triggerables = UNSET
123
+ else:
124
+ triggerables = CreateAppRawMultipartDataAppPolicyTriggerables.from_dict(_triggerables)
125
+
126
+ _triggerables_v2 = d.pop("triggerables_v2", UNSET)
127
+ triggerables_v2: Union[Unset, CreateAppRawMultipartDataAppPolicyTriggerablesV2]
128
+ if isinstance(_triggerables_v2, Unset):
129
+ triggerables_v2 = UNSET
130
+ else:
131
+ triggerables_v2 = CreateAppRawMultipartDataAppPolicyTriggerablesV2.from_dict(_triggerables_v2)
132
+
133
+ s3_inputs = []
134
+ _s3_inputs = d.pop("s3_inputs", UNSET)
135
+ for s3_inputs_item_data in _s3_inputs or []:
136
+ s3_inputs_item = CreateAppRawMultipartDataAppPolicyS3InputsItem.from_dict(s3_inputs_item_data)
137
+
138
+ s3_inputs.append(s3_inputs_item)
139
+
140
+ allowed_s3_keys = []
141
+ _allowed_s3_keys = d.pop("allowed_s3_keys", UNSET)
142
+ for allowed_s3_keys_item_data in _allowed_s3_keys or []:
143
+ allowed_s3_keys_item = CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem.from_dict(
144
+ allowed_s3_keys_item_data
145
+ )
146
+
147
+ allowed_s3_keys.append(allowed_s3_keys_item)
148
+
149
+ _execution_mode = d.pop("execution_mode", UNSET)
150
+ execution_mode: Union[Unset, CreateAppRawMultipartDataAppPolicyExecutionMode]
151
+ if isinstance(_execution_mode, Unset):
152
+ execution_mode = UNSET
153
+ else:
154
+ execution_mode = CreateAppRawMultipartDataAppPolicyExecutionMode(_execution_mode)
155
+
156
+ on_behalf_of = d.pop("on_behalf_of", UNSET)
157
+
158
+ on_behalf_of_email = d.pop("on_behalf_of_email", UNSET)
159
+
160
+ create_app_raw_multipart_data_app_policy = cls(
161
+ triggerables=triggerables,
162
+ triggerables_v2=triggerables_v2,
163
+ s3_inputs=s3_inputs,
164
+ allowed_s3_keys=allowed_s3_keys,
165
+ execution_mode=execution_mode,
166
+ on_behalf_of=on_behalf_of,
167
+ on_behalf_of_email=on_behalf_of_email,
168
+ )
169
+
170
+ create_app_raw_multipart_data_app_policy.additional_properties = d
171
+ return create_app_raw_multipart_data_app_policy
172
+
173
+ @property
174
+ def additional_keys(self) -> List[str]:
175
+ return list(self.additional_properties.keys())
176
+
177
+ def __getitem__(self, key: str) -> Any:
178
+ return self.additional_properties[key]
179
+
180
+ def __setitem__(self, key: str, value: Any) -> None:
181
+ self.additional_properties[key] = value
182
+
183
+ def __delitem__(self, key: str) -> None:
184
+ del self.additional_properties[key]
185
+
186
+ def __contains__(self, key: str) -> bool:
187
+ 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="CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem")
9
+
10
+
11
+ @_attrs_define
12
+ class CreateAppRawMultipartDataAppPolicyAllowedS3KeysItem:
13
+ """
14
+ Attributes:
15
+ s3_path (Union[Unset, str]):
16
+ resource (Union[Unset, str]):
17
+ """
18
+
19
+ s3_path: Union[Unset, str] = UNSET
20
+ resource: Union[Unset, str] = UNSET
21
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
22
+
23
+ def to_dict(self) -> Dict[str, Any]:
24
+ s3_path = self.s3_path
25
+ resource = self.resource
26
+
27
+ field_dict: Dict[str, Any] = {}
28
+ field_dict.update(self.additional_properties)
29
+ field_dict.update({})
30
+ if s3_path is not UNSET:
31
+ field_dict["s3_path"] = s3_path
32
+ if resource is not UNSET:
33
+ field_dict["resource"] = resource
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
+ s3_path = d.pop("s3_path", UNSET)
41
+
42
+ resource = d.pop("resource", UNSET)
43
+
44
+ create_app_raw_multipart_data_app_policy_allowed_s3_keys_item = cls(
45
+ s3_path=s3_path,
46
+ resource=resource,
47
+ )
48
+
49
+ create_app_raw_multipart_data_app_policy_allowed_s3_keys_item.additional_properties = d
50
+ return create_app_raw_multipart_data_app_policy_allowed_s3_keys_item
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