windmill-api 1.409.4__py3-none-any.whl → 1.410.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.
- windmill_api/api/app/get_app_latest_version.py +166 -0
- windmill_api/api/flow/get_flow_latest_version.py +166 -0
- windmill_api/api/script/get_script_latest_version.py +166 -0
- windmill_api/api/websocket_trigger/__init__.py +0 -0
- windmill_api/api/websocket_trigger/create_websocket_trigger.py +105 -0
- windmill_api/api/websocket_trigger/delete_websocket_trigger.py +101 -0
- windmill_api/api/{http_trigger/used.py → websocket_trigger/exists_websocket_trigger.py} +19 -5
- windmill_api/api/websocket_trigger/get_websocket_trigger.py +166 -0
- windmill_api/api/websocket_trigger/list_websocket_triggers.py +237 -0
- windmill_api/api/websocket_trigger/set_websocket_trigger_enabled.py +113 -0
- windmill_api/api/websocket_trigger/update_websocket_trigger.py +113 -0
- windmill_api/api/workspace/get_used_triggers.py +152 -0
- windmill_api/models/add_granular_acls_kind.py +1 -0
- windmill_api/models/create_websocket_trigger_json_body.py +112 -0
- windmill_api/models/create_websocket_trigger_json_body_filters_item.py +65 -0
- windmill_api/models/edit_websocket_trigger.py +101 -0
- windmill_api/models/edit_websocket_trigger_filters_item.py +65 -0
- windmill_api/models/get_app_latest_version_response_200.py +68 -0
- windmill_api/models/get_flow_latest_version_response_200.py +78 -0
- windmill_api/models/get_granular_acls_kind.py +1 -0
- windmill_api/models/get_script_latest_version_response_200.py +68 -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 +65 -0
- windmill_api/models/get_websocket_trigger_response_200.py +184 -0
- windmill_api/models/get_websocket_trigger_response_200_extra_perms.py +44 -0
- windmill_api/models/get_websocket_trigger_response_200_filters_item.py +65 -0
- windmill_api/models/list_websocket_triggers_response_200_item.py +192 -0
- windmill_api/models/list_websocket_triggers_response_200_item_extra_perms.py +44 -0
- windmill_api/models/list_websocket_triggers_response_200_item_filters_item.py +65 -0
- windmill_api/models/new_websocket_trigger.py +112 -0
- windmill_api/models/new_websocket_trigger_filters_item.py +65 -0
- windmill_api/models/remove_granular_acls_kind.py +1 -0
- windmill_api/models/set_websocket_trigger_enabled_json_body.py +58 -0
- windmill_api/models/triggers_count.py +8 -0
- windmill_api/models/update_websocket_trigger_json_body.py +101 -0
- windmill_api/models/update_websocket_trigger_json_body_filters_item.py +65 -0
- windmill_api/models/websocket_trigger.py +184 -0
- windmill_api/models/websocket_trigger_extra_perms.py +44 -0
- windmill_api/models/websocket_trigger_filters_item.py +65 -0
- {windmill_api-1.409.4.dist-info → windmill_api-1.410.0.dist-info}/METADATA +1 -1
- {windmill_api-1.409.4.dist-info → windmill_api-1.410.0.dist-info}/RECORD +44 -11
- {windmill_api-1.409.4.dist-info → windmill_api-1.410.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.409.4.dist-info → windmill_api-1.410.0.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_websocket_trigger_json_body import UpdateWebsocketTriggerJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
path: str,
|
|
15
|
+
*,
|
|
16
|
+
json_body: UpdateWebsocketTriggerJsonBody,
|
|
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}/websocket_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: UpdateWebsocketTriggerJsonBody,
|
|
54
|
+
) -> Response[Any]:
|
|
55
|
+
"""update websocket trigger
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
workspace (str):
|
|
59
|
+
path (str):
|
|
60
|
+
json_body (UpdateWebsocketTriggerJsonBody):
|
|
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: UpdateWebsocketTriggerJsonBody,
|
|
89
|
+
) -> Response[Any]:
|
|
90
|
+
"""update websocket trigger
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
workspace (str):
|
|
94
|
+
path (str):
|
|
95
|
+
json_body (UpdateWebsocketTriggerJsonBody):
|
|
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,152 @@
|
|
|
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.get_used_triggers_response_200 import GetUsedTriggersResponse200
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/w/{workspace}/workspaces/used_triggers".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _parse_response(
|
|
26
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
+
) -> Optional[GetUsedTriggersResponse200]:
|
|
28
|
+
if response.status_code == HTTPStatus.OK:
|
|
29
|
+
response_200 = GetUsedTriggersResponse200.from_dict(response.json())
|
|
30
|
+
|
|
31
|
+
return response_200
|
|
32
|
+
if client.raise_on_unexpected_status:
|
|
33
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
34
|
+
else:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(
|
|
39
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
40
|
+
) -> Response[GetUsedTriggersResponse200]:
|
|
41
|
+
return Response(
|
|
42
|
+
status_code=HTTPStatus(response.status_code),
|
|
43
|
+
content=response.content,
|
|
44
|
+
headers=response.headers,
|
|
45
|
+
parsed=_parse_response(client=client, response=response),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def sync_detailed(
|
|
50
|
+
workspace: str,
|
|
51
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
) -> Response[GetUsedTriggersResponse200]:
|
|
54
|
+
"""get used triggers
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
workspace (str):
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
61
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Response[GetUsedTriggersResponse200]
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
kwargs = _get_kwargs(
|
|
68
|
+
workspace=workspace,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
response = client.get_httpx_client().request(
|
|
72
|
+
**kwargs,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return _build_response(client=client, response=response)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def sync(
|
|
79
|
+
workspace: str,
|
|
80
|
+
*,
|
|
81
|
+
client: Union[AuthenticatedClient, Client],
|
|
82
|
+
) -> Optional[GetUsedTriggersResponse200]:
|
|
83
|
+
"""get used triggers
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
workspace (str):
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
90
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
GetUsedTriggersResponse200
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
return sync_detailed(
|
|
97
|
+
workspace=workspace,
|
|
98
|
+
client=client,
|
|
99
|
+
).parsed
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
async def asyncio_detailed(
|
|
103
|
+
workspace: str,
|
|
104
|
+
*,
|
|
105
|
+
client: Union[AuthenticatedClient, Client],
|
|
106
|
+
) -> Response[GetUsedTriggersResponse200]:
|
|
107
|
+
"""get used triggers
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
workspace (str):
|
|
111
|
+
|
|
112
|
+
Raises:
|
|
113
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
114
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
115
|
+
|
|
116
|
+
Returns:
|
|
117
|
+
Response[GetUsedTriggersResponse200]
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
kwargs = _get_kwargs(
|
|
121
|
+
workspace=workspace,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
125
|
+
|
|
126
|
+
return _build_response(client=client, response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def asyncio(
|
|
130
|
+
workspace: str,
|
|
131
|
+
*,
|
|
132
|
+
client: Union[AuthenticatedClient, Client],
|
|
133
|
+
) -> Optional[GetUsedTriggersResponse200]:
|
|
134
|
+
"""get used triggers
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
workspace (str):
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
GetUsedTriggersResponse200
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
await asyncio_detailed(
|
|
149
|
+
workspace=workspace,
|
|
150
|
+
client=client,
|
|
151
|
+
)
|
|
152
|
+
).parsed
|
|
@@ -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_websocket_trigger_json_body_filters_item import CreateWebsocketTriggerJsonBodyFiltersItem
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="CreateWebsocketTriggerJsonBody")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class CreateWebsocketTriggerJsonBody:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
path (str):
|
|
20
|
+
script_path (str):
|
|
21
|
+
is_flow (bool):
|
|
22
|
+
url (str):
|
|
23
|
+
filters (List['CreateWebsocketTriggerJsonBodyFiltersItem']):
|
|
24
|
+
enabled (Union[Unset, bool]):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
path: str
|
|
28
|
+
script_path: str
|
|
29
|
+
is_flow: bool
|
|
30
|
+
url: str
|
|
31
|
+
filters: List["CreateWebsocketTriggerJsonBodyFiltersItem"]
|
|
32
|
+
enabled: Union[Unset, bool] = UNSET
|
|
33
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
36
|
+
path = self.path
|
|
37
|
+
script_path = self.script_path
|
|
38
|
+
is_flow = self.is_flow
|
|
39
|
+
url = self.url
|
|
40
|
+
filters = []
|
|
41
|
+
for filters_item_data in self.filters:
|
|
42
|
+
filters_item = filters_item_data.to_dict()
|
|
43
|
+
|
|
44
|
+
filters.append(filters_item)
|
|
45
|
+
|
|
46
|
+
enabled = self.enabled
|
|
47
|
+
|
|
48
|
+
field_dict: Dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"path": path,
|
|
53
|
+
"script_path": script_path,
|
|
54
|
+
"is_flow": is_flow,
|
|
55
|
+
"url": url,
|
|
56
|
+
"filters": filters,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
if enabled is not UNSET:
|
|
60
|
+
field_dict["enabled"] = enabled
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
66
|
+
from ..models.create_websocket_trigger_json_body_filters_item import CreateWebsocketTriggerJsonBodyFiltersItem
|
|
67
|
+
|
|
68
|
+
d = src_dict.copy()
|
|
69
|
+
path = d.pop("path")
|
|
70
|
+
|
|
71
|
+
script_path = d.pop("script_path")
|
|
72
|
+
|
|
73
|
+
is_flow = d.pop("is_flow")
|
|
74
|
+
|
|
75
|
+
url = d.pop("url")
|
|
76
|
+
|
|
77
|
+
filters = []
|
|
78
|
+
_filters = d.pop("filters")
|
|
79
|
+
for filters_item_data in _filters:
|
|
80
|
+
filters_item = CreateWebsocketTriggerJsonBodyFiltersItem.from_dict(filters_item_data)
|
|
81
|
+
|
|
82
|
+
filters.append(filters_item)
|
|
83
|
+
|
|
84
|
+
enabled = d.pop("enabled", UNSET)
|
|
85
|
+
|
|
86
|
+
create_websocket_trigger_json_body = cls(
|
|
87
|
+
path=path,
|
|
88
|
+
script_path=script_path,
|
|
89
|
+
is_flow=is_flow,
|
|
90
|
+
url=url,
|
|
91
|
+
filters=filters,
|
|
92
|
+
enabled=enabled,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
create_websocket_trigger_json_body.additional_properties = d
|
|
96
|
+
return create_websocket_trigger_json_body
|
|
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,65 @@
|
|
|
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="CreateWebsocketTriggerJsonBodyFiltersItem")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CreateWebsocketTriggerJsonBodyFiltersItem:
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
key (str):
|
|
14
|
+
value (Any):
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
key: str
|
|
18
|
+
value: Any
|
|
19
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
22
|
+
key = self.key
|
|
23
|
+
value = self.value
|
|
24
|
+
|
|
25
|
+
field_dict: Dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"key": key,
|
|
30
|
+
"value": value,
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
return field_dict
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
38
|
+
d = src_dict.copy()
|
|
39
|
+
key = d.pop("key")
|
|
40
|
+
|
|
41
|
+
value = d.pop("value")
|
|
42
|
+
|
|
43
|
+
create_websocket_trigger_json_body_filters_item = cls(
|
|
44
|
+
key=key,
|
|
45
|
+
value=value,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
create_websocket_trigger_json_body_filters_item.additional_properties = d
|
|
49
|
+
return create_websocket_trigger_json_body_filters_item
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def additional_keys(self) -> List[str]:
|
|
53
|
+
return list(self.additional_properties.keys())
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, key: str) -> Any:
|
|
56
|
+
return self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
59
|
+
self.additional_properties[key] = value
|
|
60
|
+
|
|
61
|
+
def __delitem__(self, key: str) -> None:
|
|
62
|
+
del self.additional_properties[key]
|
|
63
|
+
|
|
64
|
+
def __contains__(self, key: str) -> bool:
|
|
65
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ..models.edit_websocket_trigger_filters_item import EditWebsocketTriggerFiltersItem
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="EditWebsocketTrigger")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class EditWebsocketTrigger:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
url (str):
|
|
18
|
+
path (str):
|
|
19
|
+
script_path (str):
|
|
20
|
+
is_flow (bool):
|
|
21
|
+
filters (List['EditWebsocketTriggerFiltersItem']):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
url: str
|
|
25
|
+
path: str
|
|
26
|
+
script_path: str
|
|
27
|
+
is_flow: bool
|
|
28
|
+
filters: List["EditWebsocketTriggerFiltersItem"]
|
|
29
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
32
|
+
url = self.url
|
|
33
|
+
path = self.path
|
|
34
|
+
script_path = self.script_path
|
|
35
|
+
is_flow = self.is_flow
|
|
36
|
+
filters = []
|
|
37
|
+
for filters_item_data in self.filters:
|
|
38
|
+
filters_item = filters_item_data.to_dict()
|
|
39
|
+
|
|
40
|
+
filters.append(filters_item)
|
|
41
|
+
|
|
42
|
+
field_dict: Dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"url": url,
|
|
47
|
+
"path": path,
|
|
48
|
+
"script_path": script_path,
|
|
49
|
+
"is_flow": is_flow,
|
|
50
|
+
"filters": filters,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
return field_dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
58
|
+
from ..models.edit_websocket_trigger_filters_item import EditWebsocketTriggerFiltersItem
|
|
59
|
+
|
|
60
|
+
d = src_dict.copy()
|
|
61
|
+
url = d.pop("url")
|
|
62
|
+
|
|
63
|
+
path = d.pop("path")
|
|
64
|
+
|
|
65
|
+
script_path = d.pop("script_path")
|
|
66
|
+
|
|
67
|
+
is_flow = d.pop("is_flow")
|
|
68
|
+
|
|
69
|
+
filters = []
|
|
70
|
+
_filters = d.pop("filters")
|
|
71
|
+
for filters_item_data in _filters:
|
|
72
|
+
filters_item = EditWebsocketTriggerFiltersItem.from_dict(filters_item_data)
|
|
73
|
+
|
|
74
|
+
filters.append(filters_item)
|
|
75
|
+
|
|
76
|
+
edit_websocket_trigger = cls(
|
|
77
|
+
url=url,
|
|
78
|
+
path=path,
|
|
79
|
+
script_path=script_path,
|
|
80
|
+
is_flow=is_flow,
|
|
81
|
+
filters=filters,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
edit_websocket_trigger.additional_properties = d
|
|
85
|
+
return edit_websocket_trigger
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> List[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,65 @@
|
|
|
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="EditWebsocketTriggerFiltersItem")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class EditWebsocketTriggerFiltersItem:
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
key (str):
|
|
14
|
+
value (Any):
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
key: str
|
|
18
|
+
value: Any
|
|
19
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
22
|
+
key = self.key
|
|
23
|
+
value = self.value
|
|
24
|
+
|
|
25
|
+
field_dict: Dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"key": key,
|
|
30
|
+
"value": value,
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
return field_dict
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
38
|
+
d = src_dict.copy()
|
|
39
|
+
key = d.pop("key")
|
|
40
|
+
|
|
41
|
+
value = d.pop("value")
|
|
42
|
+
|
|
43
|
+
edit_websocket_trigger_filters_item = cls(
|
|
44
|
+
key=key,
|
|
45
|
+
value=value,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
edit_websocket_trigger_filters_item.additional_properties = d
|
|
49
|
+
return edit_websocket_trigger_filters_item
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def additional_keys(self) -> List[str]:
|
|
53
|
+
return list(self.additional_properties.keys())
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, key: str) -> Any:
|
|
56
|
+
return self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
59
|
+
self.additional_properties[key] = value
|
|
60
|
+
|
|
61
|
+
def __delitem__(self, key: str) -> None:
|
|
62
|
+
del self.additional_properties[key]
|
|
63
|
+
|
|
64
|
+
def __contains__(self, key: str) -> bool:
|
|
65
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,68 @@
|
|
|
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="GetAppLatestVersionResponse200")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class GetAppLatestVersionResponse200:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
version (int):
|
|
16
|
+
deployment_msg (Union[Unset, str]):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
version: int
|
|
20
|
+
deployment_msg: 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
|
+
version = self.version
|
|
25
|
+
deployment_msg = self.deployment_msg
|
|
26
|
+
|
|
27
|
+
field_dict: Dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"version": version,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
if deployment_msg is not UNSET:
|
|
35
|
+
field_dict["deployment_msg"] = deployment_msg
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
41
|
+
d = src_dict.copy()
|
|
42
|
+
version = d.pop("version")
|
|
43
|
+
|
|
44
|
+
deployment_msg = d.pop("deployment_msg", UNSET)
|
|
45
|
+
|
|
46
|
+
get_app_latest_version_response_200 = cls(
|
|
47
|
+
version=version,
|
|
48
|
+
deployment_msg=deployment_msg,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
get_app_latest_version_response_200.additional_properties = d
|
|
52
|
+
return get_app_latest_version_response_200
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def additional_keys(self) -> List[str]:
|
|
56
|
+
return list(self.additional_properties.keys())
|
|
57
|
+
|
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
|
59
|
+
return self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
62
|
+
self.additional_properties[key] = value
|
|
63
|
+
|
|
64
|
+
def __delitem__(self, key: str) -> None:
|
|
65
|
+
del self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __contains__(self, key: str) -> bool:
|
|
68
|
+
return key in self.additional_properties
|