windmill-api 1.474.0__py3-none-any.whl → 1.475.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/folder/exists_folder.py +160 -0
- windmill_api/api/helpers/file_download.py +4 -4
- windmill_api/api/mqtt_trigger/__init__.py +0 -0
- windmill_api/api/mqtt_trigger/create_mqtt_trigger.py +105 -0
- windmill_api/api/mqtt_trigger/delete_mqtt_trigger.py +101 -0
- windmill_api/api/mqtt_trigger/exists_mqtt_trigger.py +160 -0
- windmill_api/api/mqtt_trigger/get_mqtt_trigger.py +166 -0
- windmill_api/api/mqtt_trigger/list_mqtt_triggers.py +237 -0
- windmill_api/api/mqtt_trigger/set_mqtt_trigger_enabled.py +113 -0
- windmill_api/api/mqtt_trigger/test_mqtt_connection.py +105 -0
- windmill_api/api/mqtt_trigger/update_mqtt_trigger.py +113 -0
- windmill_api/models/add_granular_acls_kind.py +1 -0
- windmill_api/models/app_with_last_version_policy.py +22 -0
- windmill_api/models/app_with_last_version_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/app_with_last_version_w_draft_policy.py +26 -0
- windmill_api/models/app_with_last_version_w_draft_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/capture_config_trigger_kind.py +1 -0
- windmill_api/models/capture_trigger_kind.py +1 -0
- windmill_api/models/create_app_json_body_policy.py +22 -0
- windmill_api/models/create_app_json_body_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/create_mqtt_trigger_json_body.py +177 -0
- windmill_api/models/create_mqtt_trigger_json_body_client_version.py +9 -0
- windmill_api/models/create_mqtt_trigger_json_body_subscribe_topics_item.py +70 -0
- windmill_api/models/create_mqtt_trigger_json_body_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/create_mqtt_trigger_json_body_v3_config.py +58 -0
- windmill_api/models/create_mqtt_trigger_json_body_v5_config.py +74 -0
- windmill_api/models/edit_mqtt_trigger.py +171 -0
- windmill_api/models/edit_mqtt_trigger_client_version.py +9 -0
- windmill_api/models/edit_mqtt_trigger_subscribe_topics_item.py +68 -0
- windmill_api/models/edit_mqtt_trigger_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/edit_mqtt_trigger_v3_config.py +58 -0
- windmill_api/models/edit_mqtt_trigger_v5_config.py +74 -0
- windmill_api/models/edit_workspace_deploy_ui_settings_json_body_deploy_ui_settings_include_type_item.py +1 -0
- windmill_api/models/get_app_by_path_response_200_policy.py +26 -0
- windmill_api/models/get_app_by_path_response_200_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/get_app_by_path_with_draft_response_200_policy.py +28 -0
- windmill_api/models/get_app_by_path_with_draft_response_200_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/get_app_by_version_response_200_policy.py +28 -0
- windmill_api/models/get_app_by_version_response_200_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/get_app_lite_by_path_response_200_policy.py +28 -0
- windmill_api/models/get_app_lite_by_path_response_200_policy_allowed_s3_keys_item.py +66 -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_granular_acls_kind.py +1 -0
- windmill_api/models/get_mqtt_trigger_response_200.py +249 -0
- windmill_api/models/get_mqtt_trigger_response_200_client_version.py +9 -0
- windmill_api/models/get_mqtt_trigger_response_200_extra_perms.py +44 -0
- windmill_api/models/get_mqtt_trigger_response_200_subscribe_topics_item.py +70 -0
- windmill_api/models/get_mqtt_trigger_response_200_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/get_mqtt_trigger_response_200v3_config.py +58 -0
- windmill_api/models/get_mqtt_trigger_response_200v5_config.py +74 -0
- windmill_api/models/get_public_app_by_custom_path_response_200_policy.py +28 -0
- windmill_api/models/get_public_app_by_custom_path_response_200_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/get_public_app_by_secret_response_200_policy.py +28 -0
- windmill_api/models/get_public_app_by_secret_response_200_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/get_settings_response_200_deploy_ui_include_type_item.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_mqtt_triggers_response_200_item.py +251 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_client_version.py +9 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_extra_perms.py +44 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_subscribe_topics_item.py +70 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_v3_config.py +58 -0
- windmill_api/models/list_mqtt_triggers_response_200_item_v5_config.py +74 -0
- windmill_api/models/mqtt_client_version.py +9 -0
- windmill_api/models/mqtt_qo_s.py +10 -0
- windmill_api/models/mqtt_subscribe_topic.py +68 -0
- windmill_api/models/mqtt_subscribe_topic_qos.py +10 -0
- windmill_api/models/mqtt_trigger.py +245 -0
- windmill_api/models/mqtt_trigger_client_version.py +9 -0
- windmill_api/models/mqtt_trigger_extra_perms.py +44 -0
- windmill_api/models/mqtt_trigger_subscribe_topics_item.py +68 -0
- windmill_api/models/mqtt_trigger_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/mqtt_trigger_v3_config.py +58 -0
- windmill_api/models/mqtt_trigger_v5_config.py +74 -0
- windmill_api/models/mqtt_v3_config.py +58 -0
- windmill_api/models/mqtt_v5_config.py +74 -0
- windmill_api/models/new_mqtt_trigger.py +173 -0
- windmill_api/models/new_mqtt_trigger_client_version.py +9 -0
- windmill_api/models/new_mqtt_trigger_subscribe_topics_item.py +68 -0
- windmill_api/models/new_mqtt_trigger_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/new_mqtt_trigger_v3_config.py +58 -0
- windmill_api/models/new_mqtt_trigger_v5_config.py +74 -0
- windmill_api/models/ping_capture_config_trigger_kind.py +1 -0
- windmill_api/models/policy.py +22 -0
- windmill_api/models/policy_allowed_s3_keys_item.py +66 -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/set_mqtt_trigger_enabled_json_body.py +58 -0
- windmill_api/models/test_mqtt_connection_json_body.py +64 -0
- windmill_api/models/test_mqtt_connection_json_body_connection.py +44 -0
- windmill_api/models/triggers_count.py +8 -0
- windmill_api/models/update_app_json_body_policy.py +22 -0
- windmill_api/models/update_app_json_body_policy_allowed_s3_keys_item.py +66 -0
- windmill_api/models/update_mqtt_trigger_json_body.py +175 -0
- windmill_api/models/update_mqtt_trigger_json_body_client_version.py +9 -0
- windmill_api/models/update_mqtt_trigger_json_body_subscribe_topics_item.py +70 -0
- windmill_api/models/update_mqtt_trigger_json_body_subscribe_topics_item_qos.py +10 -0
- windmill_api/models/update_mqtt_trigger_json_body_v3_config.py +58 -0
- windmill_api/models/update_mqtt_trigger_json_body_v5_config.py +74 -0
- windmill_api/models/workspace_deploy_ui_settings_include_type_item.py +1 -0
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.1.dist-info}/METADATA +1 -1
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.1.dist-info}/RECORD +109 -34
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.1.dist-info}/LICENSE +0 -0
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.1.dist-info}/WHEEL +0 -0
|
@@ -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_mqtt_trigger_json_body import UpdateMqttTriggerJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
path: str,
|
|
15
|
+
*,
|
|
16
|
+
json_body: UpdateMqttTriggerJsonBody,
|
|
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}/mqtt_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: UpdateMqttTriggerJsonBody,
|
|
54
|
+
) -> Response[Any]:
|
|
55
|
+
"""update mqtt trigger
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
workspace (str):
|
|
59
|
+
path (str):
|
|
60
|
+
json_body (UpdateMqttTriggerJsonBody):
|
|
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: UpdateMqttTriggerJsonBody,
|
|
89
|
+
) -> Response[Any]:
|
|
90
|
+
"""update mqtt trigger
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
workspace (str):
|
|
94
|
+
path (str):
|
|
95
|
+
json_body (UpdateMqttTriggerJsonBody):
|
|
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)
|
|
@@ -7,6 +7,7 @@ from ..models.app_with_last_version_policy_execution_mode import AppWithLastVers
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
+
from ..models.app_with_last_version_policy_allowed_s3_keys_item import AppWithLastVersionPolicyAllowedS3KeysItem
|
|
10
11
|
from ..models.app_with_last_version_policy_s3_inputs_item import AppWithLastVersionPolicyS3InputsItem
|
|
11
12
|
from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
|
|
12
13
|
from ..models.app_with_last_version_policy_triggerables_v2 import AppWithLastVersionPolicyTriggerablesV2
|
|
@@ -22,6 +23,7 @@ class AppWithLastVersionPolicy:
|
|
|
22
23
|
triggerables (Union[Unset, AppWithLastVersionPolicyTriggerables]):
|
|
23
24
|
triggerables_v2 (Union[Unset, AppWithLastVersionPolicyTriggerablesV2]):
|
|
24
25
|
s3_inputs (Union[Unset, List['AppWithLastVersionPolicyS3InputsItem']]):
|
|
26
|
+
allowed_s3_keys (Union[Unset, List['AppWithLastVersionPolicyAllowedS3KeysItem']]):
|
|
25
27
|
execution_mode (Union[Unset, AppWithLastVersionPolicyExecutionMode]):
|
|
26
28
|
on_behalf_of (Union[Unset, str]):
|
|
27
29
|
on_behalf_of_email (Union[Unset, str]):
|
|
@@ -30,6 +32,7 @@ class AppWithLastVersionPolicy:
|
|
|
30
32
|
triggerables: Union[Unset, "AppWithLastVersionPolicyTriggerables"] = UNSET
|
|
31
33
|
triggerables_v2: Union[Unset, "AppWithLastVersionPolicyTriggerablesV2"] = UNSET
|
|
32
34
|
s3_inputs: Union[Unset, List["AppWithLastVersionPolicyS3InputsItem"]] = UNSET
|
|
35
|
+
allowed_s3_keys: Union[Unset, List["AppWithLastVersionPolicyAllowedS3KeysItem"]] = UNSET
|
|
33
36
|
execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode] = UNSET
|
|
34
37
|
on_behalf_of: Union[Unset, str] = UNSET
|
|
35
38
|
on_behalf_of_email: Union[Unset, str] = UNSET
|
|
@@ -52,6 +55,14 @@ class AppWithLastVersionPolicy:
|
|
|
52
55
|
|
|
53
56
|
s3_inputs.append(s3_inputs_item)
|
|
54
57
|
|
|
58
|
+
allowed_s3_keys: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
59
|
+
if not isinstance(self.allowed_s3_keys, Unset):
|
|
60
|
+
allowed_s3_keys = []
|
|
61
|
+
for allowed_s3_keys_item_data in self.allowed_s3_keys:
|
|
62
|
+
allowed_s3_keys_item = allowed_s3_keys_item_data.to_dict()
|
|
63
|
+
|
|
64
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
65
|
+
|
|
55
66
|
execution_mode: Union[Unset, str] = UNSET
|
|
56
67
|
if not isinstance(self.execution_mode, Unset):
|
|
57
68
|
execution_mode = self.execution_mode.value
|
|
@@ -68,6 +79,8 @@ class AppWithLastVersionPolicy:
|
|
|
68
79
|
field_dict["triggerables_v2"] = triggerables_v2
|
|
69
80
|
if s3_inputs is not UNSET:
|
|
70
81
|
field_dict["s3_inputs"] = s3_inputs
|
|
82
|
+
if allowed_s3_keys is not UNSET:
|
|
83
|
+
field_dict["allowed_s3_keys"] = allowed_s3_keys
|
|
71
84
|
if execution_mode is not UNSET:
|
|
72
85
|
field_dict["execution_mode"] = execution_mode
|
|
73
86
|
if on_behalf_of is not UNSET:
|
|
@@ -79,6 +92,7 @@ class AppWithLastVersionPolicy:
|
|
|
79
92
|
|
|
80
93
|
@classmethod
|
|
81
94
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
95
|
+
from ..models.app_with_last_version_policy_allowed_s3_keys_item import AppWithLastVersionPolicyAllowedS3KeysItem
|
|
82
96
|
from ..models.app_with_last_version_policy_s3_inputs_item import AppWithLastVersionPolicyS3InputsItem
|
|
83
97
|
from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
|
|
84
98
|
from ..models.app_with_last_version_policy_triggerables_v2 import AppWithLastVersionPolicyTriggerablesV2
|
|
@@ -105,6 +119,13 @@ class AppWithLastVersionPolicy:
|
|
|
105
119
|
|
|
106
120
|
s3_inputs.append(s3_inputs_item)
|
|
107
121
|
|
|
122
|
+
allowed_s3_keys = []
|
|
123
|
+
_allowed_s3_keys = d.pop("allowed_s3_keys", UNSET)
|
|
124
|
+
for allowed_s3_keys_item_data in _allowed_s3_keys or []:
|
|
125
|
+
allowed_s3_keys_item = AppWithLastVersionPolicyAllowedS3KeysItem.from_dict(allowed_s3_keys_item_data)
|
|
126
|
+
|
|
127
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
128
|
+
|
|
108
129
|
_execution_mode = d.pop("execution_mode", UNSET)
|
|
109
130
|
execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode]
|
|
110
131
|
if isinstance(_execution_mode, Unset):
|
|
@@ -120,6 +141,7 @@ class AppWithLastVersionPolicy:
|
|
|
120
141
|
triggerables=triggerables,
|
|
121
142
|
triggerables_v2=triggerables_v2,
|
|
122
143
|
s3_inputs=s3_inputs,
|
|
144
|
+
allowed_s3_keys=allowed_s3_keys,
|
|
123
145
|
execution_mode=execution_mode,
|
|
124
146
|
on_behalf_of=on_behalf_of,
|
|
125
147
|
on_behalf_of_email=on_behalf_of_email,
|
|
@@ -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="AppWithLastVersionPolicyAllowedS3KeysItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class AppWithLastVersionPolicyAllowedS3KeysItem:
|
|
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
|
+
app_with_last_version_policy_allowed_s3_keys_item = cls(
|
|
45
|
+
s3_path=s3_path,
|
|
46
|
+
resource=resource,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
app_with_last_version_policy_allowed_s3_keys_item.additional_properties = d
|
|
50
|
+
return app_with_last_version_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
|
|
@@ -7,6 +7,9 @@ from ..models.app_with_last_version_w_draft_policy_execution_mode import AppWith
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
+
from ..models.app_with_last_version_w_draft_policy_allowed_s3_keys_item import (
|
|
11
|
+
AppWithLastVersionWDraftPolicyAllowedS3KeysItem,
|
|
12
|
+
)
|
|
10
13
|
from ..models.app_with_last_version_w_draft_policy_s3_inputs_item import AppWithLastVersionWDraftPolicyS3InputsItem
|
|
11
14
|
from ..models.app_with_last_version_w_draft_policy_triggerables import AppWithLastVersionWDraftPolicyTriggerables
|
|
12
15
|
from ..models.app_with_last_version_w_draft_policy_triggerables_v2 import (
|
|
@@ -24,6 +27,7 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
24
27
|
triggerables (Union[Unset, AppWithLastVersionWDraftPolicyTriggerables]):
|
|
25
28
|
triggerables_v2 (Union[Unset, AppWithLastVersionWDraftPolicyTriggerablesV2]):
|
|
26
29
|
s3_inputs (Union[Unset, List['AppWithLastVersionWDraftPolicyS3InputsItem']]):
|
|
30
|
+
allowed_s3_keys (Union[Unset, List['AppWithLastVersionWDraftPolicyAllowedS3KeysItem']]):
|
|
27
31
|
execution_mode (Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode]):
|
|
28
32
|
on_behalf_of (Union[Unset, str]):
|
|
29
33
|
on_behalf_of_email (Union[Unset, str]):
|
|
@@ -32,6 +36,7 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
32
36
|
triggerables: Union[Unset, "AppWithLastVersionWDraftPolicyTriggerables"] = UNSET
|
|
33
37
|
triggerables_v2: Union[Unset, "AppWithLastVersionWDraftPolicyTriggerablesV2"] = UNSET
|
|
34
38
|
s3_inputs: Union[Unset, List["AppWithLastVersionWDraftPolicyS3InputsItem"]] = UNSET
|
|
39
|
+
allowed_s3_keys: Union[Unset, List["AppWithLastVersionWDraftPolicyAllowedS3KeysItem"]] = UNSET
|
|
35
40
|
execution_mode: Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode] = UNSET
|
|
36
41
|
on_behalf_of: Union[Unset, str] = UNSET
|
|
37
42
|
on_behalf_of_email: Union[Unset, str] = UNSET
|
|
@@ -54,6 +59,14 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
54
59
|
|
|
55
60
|
s3_inputs.append(s3_inputs_item)
|
|
56
61
|
|
|
62
|
+
allowed_s3_keys: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
63
|
+
if not isinstance(self.allowed_s3_keys, Unset):
|
|
64
|
+
allowed_s3_keys = []
|
|
65
|
+
for allowed_s3_keys_item_data in self.allowed_s3_keys:
|
|
66
|
+
allowed_s3_keys_item = allowed_s3_keys_item_data.to_dict()
|
|
67
|
+
|
|
68
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
69
|
+
|
|
57
70
|
execution_mode: Union[Unset, str] = UNSET
|
|
58
71
|
if not isinstance(self.execution_mode, Unset):
|
|
59
72
|
execution_mode = self.execution_mode.value
|
|
@@ -70,6 +83,8 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
70
83
|
field_dict["triggerables_v2"] = triggerables_v2
|
|
71
84
|
if s3_inputs is not UNSET:
|
|
72
85
|
field_dict["s3_inputs"] = s3_inputs
|
|
86
|
+
if allowed_s3_keys is not UNSET:
|
|
87
|
+
field_dict["allowed_s3_keys"] = allowed_s3_keys
|
|
73
88
|
if execution_mode is not UNSET:
|
|
74
89
|
field_dict["execution_mode"] = execution_mode
|
|
75
90
|
if on_behalf_of is not UNSET:
|
|
@@ -81,6 +96,9 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
81
96
|
|
|
82
97
|
@classmethod
|
|
83
98
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
99
|
+
from ..models.app_with_last_version_w_draft_policy_allowed_s3_keys_item import (
|
|
100
|
+
AppWithLastVersionWDraftPolicyAllowedS3KeysItem,
|
|
101
|
+
)
|
|
84
102
|
from ..models.app_with_last_version_w_draft_policy_s3_inputs_item import (
|
|
85
103
|
AppWithLastVersionWDraftPolicyS3InputsItem,
|
|
86
104
|
)
|
|
@@ -113,6 +131,13 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
113
131
|
|
|
114
132
|
s3_inputs.append(s3_inputs_item)
|
|
115
133
|
|
|
134
|
+
allowed_s3_keys = []
|
|
135
|
+
_allowed_s3_keys = d.pop("allowed_s3_keys", UNSET)
|
|
136
|
+
for allowed_s3_keys_item_data in _allowed_s3_keys or []:
|
|
137
|
+
allowed_s3_keys_item = AppWithLastVersionWDraftPolicyAllowedS3KeysItem.from_dict(allowed_s3_keys_item_data)
|
|
138
|
+
|
|
139
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
140
|
+
|
|
116
141
|
_execution_mode = d.pop("execution_mode", UNSET)
|
|
117
142
|
execution_mode: Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode]
|
|
118
143
|
if isinstance(_execution_mode, Unset):
|
|
@@ -128,6 +153,7 @@ class AppWithLastVersionWDraftPolicy:
|
|
|
128
153
|
triggerables=triggerables,
|
|
129
154
|
triggerables_v2=triggerables_v2,
|
|
130
155
|
s3_inputs=s3_inputs,
|
|
156
|
+
allowed_s3_keys=allowed_s3_keys,
|
|
131
157
|
execution_mode=execution_mode,
|
|
132
158
|
on_behalf_of=on_behalf_of,
|
|
133
159
|
on_behalf_of_email=on_behalf_of_email,
|
|
@@ -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="AppWithLastVersionWDraftPolicyAllowedS3KeysItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class AppWithLastVersionWDraftPolicyAllowedS3KeysItem:
|
|
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
|
+
app_with_last_version_w_draft_policy_allowed_s3_keys_item = cls(
|
|
45
|
+
s3_path=s3_path,
|
|
46
|
+
resource=resource,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
app_with_last_version_w_draft_policy_allowed_s3_keys_item.additional_properties = d
|
|
50
|
+
return app_with_last_version_w_draft_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
|
|
@@ -7,6 +7,7 @@ from ..models.create_app_json_body_policy_execution_mode import CreateAppJsonBod
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
+
from ..models.create_app_json_body_policy_allowed_s3_keys_item import CreateAppJsonBodyPolicyAllowedS3KeysItem
|
|
10
11
|
from ..models.create_app_json_body_policy_s3_inputs_item import CreateAppJsonBodyPolicyS3InputsItem
|
|
11
12
|
from ..models.create_app_json_body_policy_triggerables import CreateAppJsonBodyPolicyTriggerables
|
|
12
13
|
from ..models.create_app_json_body_policy_triggerables_v2 import CreateAppJsonBodyPolicyTriggerablesV2
|
|
@@ -22,6 +23,7 @@ class CreateAppJsonBodyPolicy:
|
|
|
22
23
|
triggerables (Union[Unset, CreateAppJsonBodyPolicyTriggerables]):
|
|
23
24
|
triggerables_v2 (Union[Unset, CreateAppJsonBodyPolicyTriggerablesV2]):
|
|
24
25
|
s3_inputs (Union[Unset, List['CreateAppJsonBodyPolicyS3InputsItem']]):
|
|
26
|
+
allowed_s3_keys (Union[Unset, List['CreateAppJsonBodyPolicyAllowedS3KeysItem']]):
|
|
25
27
|
execution_mode (Union[Unset, CreateAppJsonBodyPolicyExecutionMode]):
|
|
26
28
|
on_behalf_of (Union[Unset, str]):
|
|
27
29
|
on_behalf_of_email (Union[Unset, str]):
|
|
@@ -30,6 +32,7 @@ class CreateAppJsonBodyPolicy:
|
|
|
30
32
|
triggerables: Union[Unset, "CreateAppJsonBodyPolicyTriggerables"] = UNSET
|
|
31
33
|
triggerables_v2: Union[Unset, "CreateAppJsonBodyPolicyTriggerablesV2"] = UNSET
|
|
32
34
|
s3_inputs: Union[Unset, List["CreateAppJsonBodyPolicyS3InputsItem"]] = UNSET
|
|
35
|
+
allowed_s3_keys: Union[Unset, List["CreateAppJsonBodyPolicyAllowedS3KeysItem"]] = UNSET
|
|
33
36
|
execution_mode: Union[Unset, CreateAppJsonBodyPolicyExecutionMode] = UNSET
|
|
34
37
|
on_behalf_of: Union[Unset, str] = UNSET
|
|
35
38
|
on_behalf_of_email: Union[Unset, str] = UNSET
|
|
@@ -52,6 +55,14 @@ class CreateAppJsonBodyPolicy:
|
|
|
52
55
|
|
|
53
56
|
s3_inputs.append(s3_inputs_item)
|
|
54
57
|
|
|
58
|
+
allowed_s3_keys: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
59
|
+
if not isinstance(self.allowed_s3_keys, Unset):
|
|
60
|
+
allowed_s3_keys = []
|
|
61
|
+
for allowed_s3_keys_item_data in self.allowed_s3_keys:
|
|
62
|
+
allowed_s3_keys_item = allowed_s3_keys_item_data.to_dict()
|
|
63
|
+
|
|
64
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
65
|
+
|
|
55
66
|
execution_mode: Union[Unset, str] = UNSET
|
|
56
67
|
if not isinstance(self.execution_mode, Unset):
|
|
57
68
|
execution_mode = self.execution_mode.value
|
|
@@ -68,6 +79,8 @@ class CreateAppJsonBodyPolicy:
|
|
|
68
79
|
field_dict["triggerables_v2"] = triggerables_v2
|
|
69
80
|
if s3_inputs is not UNSET:
|
|
70
81
|
field_dict["s3_inputs"] = s3_inputs
|
|
82
|
+
if allowed_s3_keys is not UNSET:
|
|
83
|
+
field_dict["allowed_s3_keys"] = allowed_s3_keys
|
|
71
84
|
if execution_mode is not UNSET:
|
|
72
85
|
field_dict["execution_mode"] = execution_mode
|
|
73
86
|
if on_behalf_of is not UNSET:
|
|
@@ -79,6 +92,7 @@ class CreateAppJsonBodyPolicy:
|
|
|
79
92
|
|
|
80
93
|
@classmethod
|
|
81
94
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
95
|
+
from ..models.create_app_json_body_policy_allowed_s3_keys_item import CreateAppJsonBodyPolicyAllowedS3KeysItem
|
|
82
96
|
from ..models.create_app_json_body_policy_s3_inputs_item import CreateAppJsonBodyPolicyS3InputsItem
|
|
83
97
|
from ..models.create_app_json_body_policy_triggerables import CreateAppJsonBodyPolicyTriggerables
|
|
84
98
|
from ..models.create_app_json_body_policy_triggerables_v2 import CreateAppJsonBodyPolicyTriggerablesV2
|
|
@@ -105,6 +119,13 @@ class CreateAppJsonBodyPolicy:
|
|
|
105
119
|
|
|
106
120
|
s3_inputs.append(s3_inputs_item)
|
|
107
121
|
|
|
122
|
+
allowed_s3_keys = []
|
|
123
|
+
_allowed_s3_keys = d.pop("allowed_s3_keys", UNSET)
|
|
124
|
+
for allowed_s3_keys_item_data in _allowed_s3_keys or []:
|
|
125
|
+
allowed_s3_keys_item = CreateAppJsonBodyPolicyAllowedS3KeysItem.from_dict(allowed_s3_keys_item_data)
|
|
126
|
+
|
|
127
|
+
allowed_s3_keys.append(allowed_s3_keys_item)
|
|
128
|
+
|
|
108
129
|
_execution_mode = d.pop("execution_mode", UNSET)
|
|
109
130
|
execution_mode: Union[Unset, CreateAppJsonBodyPolicyExecutionMode]
|
|
110
131
|
if isinstance(_execution_mode, Unset):
|
|
@@ -120,6 +141,7 @@ class CreateAppJsonBodyPolicy:
|
|
|
120
141
|
triggerables=triggerables,
|
|
121
142
|
triggerables_v2=triggerables_v2,
|
|
122
143
|
s3_inputs=s3_inputs,
|
|
144
|
+
allowed_s3_keys=allowed_s3_keys,
|
|
123
145
|
execution_mode=execution_mode,
|
|
124
146
|
on_behalf_of=on_behalf_of,
|
|
125
147
|
on_behalf_of_email=on_behalf_of_email,
|
|
@@ -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="CreateAppJsonBodyPolicyAllowedS3KeysItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class CreateAppJsonBodyPolicyAllowedS3KeysItem:
|
|
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_json_body_policy_allowed_s3_keys_item = cls(
|
|
45
|
+
s3_path=s3_path,
|
|
46
|
+
resource=resource,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
create_app_json_body_policy_allowed_s3_keys_item.additional_properties = d
|
|
50
|
+
return create_app_json_body_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
|