windmill-api 1.474.0__py3-none-any.whl → 1.475.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/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.0.dist-info}/METADATA +1 -1
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/RECORD +108 -34
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
from ..models.list_mqtt_triggers_response_200_item_subscribe_topics_item_qos import (
|
|
7
|
+
ListMqttTriggersResponse200ItemSubscribeTopicsItemQos,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="ListMqttTriggersResponse200ItemSubscribeTopicsItem")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class ListMqttTriggersResponse200ItemSubscribeTopicsItem:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
qos (ListMqttTriggersResponse200ItemSubscribeTopicsItemQos):
|
|
18
|
+
topic (str):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
qos: ListMqttTriggersResponse200ItemSubscribeTopicsItemQos
|
|
22
|
+
topic: str
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
qos = self.qos.value
|
|
27
|
+
|
|
28
|
+
topic = self.topic
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"qos": qos,
|
|
35
|
+
"topic": topic,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
43
|
+
d = src_dict.copy()
|
|
44
|
+
qos = ListMqttTriggersResponse200ItemSubscribeTopicsItemQos(d.pop("qos"))
|
|
45
|
+
|
|
46
|
+
topic = d.pop("topic")
|
|
47
|
+
|
|
48
|
+
list_mqtt_triggers_response_200_item_subscribe_topics_item = cls(
|
|
49
|
+
qos=qos,
|
|
50
|
+
topic=topic,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
list_mqtt_triggers_response_200_item_subscribe_topics_item.additional_properties = d
|
|
54
|
+
return list_mqtt_triggers_response_200_item_subscribe_topics_item
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> List[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,58 @@
|
|
|
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="ListMqttTriggersResponse200ItemV3Config")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class ListMqttTriggersResponse200ItemV3Config:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
clean_session (Union[Unset, bool]):
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
clean_session: Union[Unset, bool] = UNSET
|
|
19
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
22
|
+
clean_session = self.clean_session
|
|
23
|
+
|
|
24
|
+
field_dict: Dict[str, Any] = {}
|
|
25
|
+
field_dict.update(self.additional_properties)
|
|
26
|
+
field_dict.update({})
|
|
27
|
+
if clean_session is not UNSET:
|
|
28
|
+
field_dict["clean_session"] = clean_session
|
|
29
|
+
|
|
30
|
+
return field_dict
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
34
|
+
d = src_dict.copy()
|
|
35
|
+
clean_session = d.pop("clean_session", UNSET)
|
|
36
|
+
|
|
37
|
+
list_mqtt_triggers_response_200_item_v3_config = cls(
|
|
38
|
+
clean_session=clean_session,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
list_mqtt_triggers_response_200_item_v3_config.additional_properties = d
|
|
42
|
+
return list_mqtt_triggers_response_200_item_v3_config
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def additional_keys(self) -> List[str]:
|
|
46
|
+
return list(self.additional_properties.keys())
|
|
47
|
+
|
|
48
|
+
def __getitem__(self, key: str) -> Any:
|
|
49
|
+
return self.additional_properties[key]
|
|
50
|
+
|
|
51
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
52
|
+
self.additional_properties[key] = value
|
|
53
|
+
|
|
54
|
+
def __delitem__(self, key: str) -> None:
|
|
55
|
+
del self.additional_properties[key]
|
|
56
|
+
|
|
57
|
+
def __contains__(self, key: str) -> bool:
|
|
58
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
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="ListMqttTriggersResponse200ItemV5Config")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class ListMqttTriggersResponse200ItemV5Config:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
clean_start (Union[Unset, bool]):
|
|
16
|
+
topic_alias (Union[Unset, float]):
|
|
17
|
+
session_expiry_interval (Union[Unset, float]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
clean_start: Union[Unset, bool] = UNSET
|
|
21
|
+
topic_alias: Union[Unset, float] = UNSET
|
|
22
|
+
session_expiry_interval: Union[Unset, float] = UNSET
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
clean_start = self.clean_start
|
|
27
|
+
topic_alias = self.topic_alias
|
|
28
|
+
session_expiry_interval = self.session_expiry_interval
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if clean_start is not UNSET:
|
|
34
|
+
field_dict["clean_start"] = clean_start
|
|
35
|
+
if topic_alias is not UNSET:
|
|
36
|
+
field_dict["topic_alias"] = topic_alias
|
|
37
|
+
if session_expiry_interval is not UNSET:
|
|
38
|
+
field_dict["session_expiry_interval"] = session_expiry_interval
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
44
|
+
d = src_dict.copy()
|
|
45
|
+
clean_start = d.pop("clean_start", UNSET)
|
|
46
|
+
|
|
47
|
+
topic_alias = d.pop("topic_alias", UNSET)
|
|
48
|
+
|
|
49
|
+
session_expiry_interval = d.pop("session_expiry_interval", UNSET)
|
|
50
|
+
|
|
51
|
+
list_mqtt_triggers_response_200_item_v5_config = cls(
|
|
52
|
+
clean_start=clean_start,
|
|
53
|
+
topic_alias=topic_alias,
|
|
54
|
+
session_expiry_interval=session_expiry_interval,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
list_mqtt_triggers_response_200_item_v5_config.additional_properties = d
|
|
58
|
+
return list_mqtt_triggers_response_200_item_v5_config
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> List[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
from ..models.mqtt_subscribe_topic_qos import MqttSubscribeTopicQos
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="MqttSubscribeTopic")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class MqttSubscribeTopic:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
qos (MqttSubscribeTopicQos):
|
|
16
|
+
topic (str):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
qos: MqttSubscribeTopicQos
|
|
20
|
+
topic: str
|
|
21
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
24
|
+
qos = self.qos.value
|
|
25
|
+
|
|
26
|
+
topic = self.topic
|
|
27
|
+
|
|
28
|
+
field_dict: Dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"qos": qos,
|
|
33
|
+
"topic": topic,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
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
|
+
qos = MqttSubscribeTopicQos(d.pop("qos"))
|
|
43
|
+
|
|
44
|
+
topic = d.pop("topic")
|
|
45
|
+
|
|
46
|
+
mqtt_subscribe_topic = cls(
|
|
47
|
+
qos=qos,
|
|
48
|
+
topic=topic,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
mqtt_subscribe_topic.additional_properties = d
|
|
52
|
+
return mqtt_subscribe_topic
|
|
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
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
from dateutil.parser import isoparse
|
|
7
|
+
|
|
8
|
+
from ..models.mqtt_trigger_client_version import MqttTriggerClientVersion
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.mqtt_trigger_extra_perms import MqttTriggerExtraPerms
|
|
13
|
+
from ..models.mqtt_trigger_subscribe_topics_item import MqttTriggerSubscribeTopicsItem
|
|
14
|
+
from ..models.mqtt_trigger_v3_config import MqttTriggerV3Config
|
|
15
|
+
from ..models.mqtt_trigger_v5_config import MqttTriggerV5Config
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="MqttTrigger")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class MqttTrigger:
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
mqtt_resource_path (str):
|
|
26
|
+
subscribe_topics (List['MqttTriggerSubscribeTopicsItem']):
|
|
27
|
+
enabled (bool):
|
|
28
|
+
path (str):
|
|
29
|
+
script_path (str):
|
|
30
|
+
email (str):
|
|
31
|
+
extra_perms (MqttTriggerExtraPerms):
|
|
32
|
+
workspace_id (str):
|
|
33
|
+
edited_by (str):
|
|
34
|
+
edited_at (datetime.datetime):
|
|
35
|
+
is_flow (bool):
|
|
36
|
+
v3_config (Union[Unset, MqttTriggerV3Config]):
|
|
37
|
+
v5_config (Union[Unset, MqttTriggerV5Config]):
|
|
38
|
+
client_id (Union[Unset, str]):
|
|
39
|
+
client_version (Union[Unset, MqttTriggerClientVersion]):
|
|
40
|
+
server_id (Union[Unset, str]):
|
|
41
|
+
last_server_ping (Union[Unset, datetime.datetime]):
|
|
42
|
+
error (Union[Unset, str]):
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
mqtt_resource_path: str
|
|
46
|
+
subscribe_topics: List["MqttTriggerSubscribeTopicsItem"]
|
|
47
|
+
enabled: bool
|
|
48
|
+
path: str
|
|
49
|
+
script_path: str
|
|
50
|
+
email: str
|
|
51
|
+
extra_perms: "MqttTriggerExtraPerms"
|
|
52
|
+
workspace_id: str
|
|
53
|
+
edited_by: str
|
|
54
|
+
edited_at: datetime.datetime
|
|
55
|
+
is_flow: bool
|
|
56
|
+
v3_config: Union[Unset, "MqttTriggerV3Config"] = UNSET
|
|
57
|
+
v5_config: Union[Unset, "MqttTriggerV5Config"] = UNSET
|
|
58
|
+
client_id: Union[Unset, str] = UNSET
|
|
59
|
+
client_version: Union[Unset, MqttTriggerClientVersion] = UNSET
|
|
60
|
+
server_id: Union[Unset, str] = UNSET
|
|
61
|
+
last_server_ping: Union[Unset, datetime.datetime] = UNSET
|
|
62
|
+
error: Union[Unset, str] = UNSET
|
|
63
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
mqtt_resource_path = self.mqtt_resource_path
|
|
67
|
+
subscribe_topics = []
|
|
68
|
+
for subscribe_topics_item_data in self.subscribe_topics:
|
|
69
|
+
subscribe_topics_item = subscribe_topics_item_data.to_dict()
|
|
70
|
+
|
|
71
|
+
subscribe_topics.append(subscribe_topics_item)
|
|
72
|
+
|
|
73
|
+
enabled = self.enabled
|
|
74
|
+
path = self.path
|
|
75
|
+
script_path = self.script_path
|
|
76
|
+
email = self.email
|
|
77
|
+
extra_perms = self.extra_perms.to_dict()
|
|
78
|
+
|
|
79
|
+
workspace_id = self.workspace_id
|
|
80
|
+
edited_by = self.edited_by
|
|
81
|
+
edited_at = self.edited_at.isoformat()
|
|
82
|
+
|
|
83
|
+
is_flow = self.is_flow
|
|
84
|
+
v3_config: Union[Unset, Dict[str, Any]] = UNSET
|
|
85
|
+
if not isinstance(self.v3_config, Unset):
|
|
86
|
+
v3_config = self.v3_config.to_dict()
|
|
87
|
+
|
|
88
|
+
v5_config: Union[Unset, Dict[str, Any]] = UNSET
|
|
89
|
+
if not isinstance(self.v5_config, Unset):
|
|
90
|
+
v5_config = self.v5_config.to_dict()
|
|
91
|
+
|
|
92
|
+
client_id = self.client_id
|
|
93
|
+
client_version: Union[Unset, str] = UNSET
|
|
94
|
+
if not isinstance(self.client_version, Unset):
|
|
95
|
+
client_version = self.client_version.value
|
|
96
|
+
|
|
97
|
+
server_id = self.server_id
|
|
98
|
+
last_server_ping: Union[Unset, str] = UNSET
|
|
99
|
+
if not isinstance(self.last_server_ping, Unset):
|
|
100
|
+
last_server_ping = self.last_server_ping.isoformat()
|
|
101
|
+
|
|
102
|
+
error = self.error
|
|
103
|
+
|
|
104
|
+
field_dict: Dict[str, Any] = {}
|
|
105
|
+
field_dict.update(self.additional_properties)
|
|
106
|
+
field_dict.update(
|
|
107
|
+
{
|
|
108
|
+
"mqtt_resource_path": mqtt_resource_path,
|
|
109
|
+
"subscribe_topics": subscribe_topics,
|
|
110
|
+
"enabled": enabled,
|
|
111
|
+
"path": path,
|
|
112
|
+
"script_path": script_path,
|
|
113
|
+
"email": email,
|
|
114
|
+
"extra_perms": extra_perms,
|
|
115
|
+
"workspace_id": workspace_id,
|
|
116
|
+
"edited_by": edited_by,
|
|
117
|
+
"edited_at": edited_at,
|
|
118
|
+
"is_flow": is_flow,
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
if v3_config is not UNSET:
|
|
122
|
+
field_dict["v3_config"] = v3_config
|
|
123
|
+
if v5_config is not UNSET:
|
|
124
|
+
field_dict["v5_config"] = v5_config
|
|
125
|
+
if client_id is not UNSET:
|
|
126
|
+
field_dict["client_id"] = client_id
|
|
127
|
+
if client_version is not UNSET:
|
|
128
|
+
field_dict["client_version"] = client_version
|
|
129
|
+
if server_id is not UNSET:
|
|
130
|
+
field_dict["server_id"] = server_id
|
|
131
|
+
if last_server_ping is not UNSET:
|
|
132
|
+
field_dict["last_server_ping"] = last_server_ping
|
|
133
|
+
if error is not UNSET:
|
|
134
|
+
field_dict["error"] = error
|
|
135
|
+
|
|
136
|
+
return field_dict
|
|
137
|
+
|
|
138
|
+
@classmethod
|
|
139
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
140
|
+
from ..models.mqtt_trigger_extra_perms import MqttTriggerExtraPerms
|
|
141
|
+
from ..models.mqtt_trigger_subscribe_topics_item import MqttTriggerSubscribeTopicsItem
|
|
142
|
+
from ..models.mqtt_trigger_v3_config import MqttTriggerV3Config
|
|
143
|
+
from ..models.mqtt_trigger_v5_config import MqttTriggerV5Config
|
|
144
|
+
|
|
145
|
+
d = src_dict.copy()
|
|
146
|
+
mqtt_resource_path = d.pop("mqtt_resource_path")
|
|
147
|
+
|
|
148
|
+
subscribe_topics = []
|
|
149
|
+
_subscribe_topics = d.pop("subscribe_topics")
|
|
150
|
+
for subscribe_topics_item_data in _subscribe_topics:
|
|
151
|
+
subscribe_topics_item = MqttTriggerSubscribeTopicsItem.from_dict(subscribe_topics_item_data)
|
|
152
|
+
|
|
153
|
+
subscribe_topics.append(subscribe_topics_item)
|
|
154
|
+
|
|
155
|
+
enabled = d.pop("enabled")
|
|
156
|
+
|
|
157
|
+
path = d.pop("path")
|
|
158
|
+
|
|
159
|
+
script_path = d.pop("script_path")
|
|
160
|
+
|
|
161
|
+
email = d.pop("email")
|
|
162
|
+
|
|
163
|
+
extra_perms = MqttTriggerExtraPerms.from_dict(d.pop("extra_perms"))
|
|
164
|
+
|
|
165
|
+
workspace_id = d.pop("workspace_id")
|
|
166
|
+
|
|
167
|
+
edited_by = d.pop("edited_by")
|
|
168
|
+
|
|
169
|
+
edited_at = isoparse(d.pop("edited_at"))
|
|
170
|
+
|
|
171
|
+
is_flow = d.pop("is_flow")
|
|
172
|
+
|
|
173
|
+
_v3_config = d.pop("v3_config", UNSET)
|
|
174
|
+
v3_config: Union[Unset, MqttTriggerV3Config]
|
|
175
|
+
if isinstance(_v3_config, Unset):
|
|
176
|
+
v3_config = UNSET
|
|
177
|
+
else:
|
|
178
|
+
v3_config = MqttTriggerV3Config.from_dict(_v3_config)
|
|
179
|
+
|
|
180
|
+
_v5_config = d.pop("v5_config", UNSET)
|
|
181
|
+
v5_config: Union[Unset, MqttTriggerV5Config]
|
|
182
|
+
if isinstance(_v5_config, Unset):
|
|
183
|
+
v5_config = UNSET
|
|
184
|
+
else:
|
|
185
|
+
v5_config = MqttTriggerV5Config.from_dict(_v5_config)
|
|
186
|
+
|
|
187
|
+
client_id = d.pop("client_id", UNSET)
|
|
188
|
+
|
|
189
|
+
_client_version = d.pop("client_version", UNSET)
|
|
190
|
+
client_version: Union[Unset, MqttTriggerClientVersion]
|
|
191
|
+
if isinstance(_client_version, Unset):
|
|
192
|
+
client_version = UNSET
|
|
193
|
+
else:
|
|
194
|
+
client_version = MqttTriggerClientVersion(_client_version)
|
|
195
|
+
|
|
196
|
+
server_id = d.pop("server_id", UNSET)
|
|
197
|
+
|
|
198
|
+
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
199
|
+
last_server_ping: Union[Unset, datetime.datetime]
|
|
200
|
+
if isinstance(_last_server_ping, Unset):
|
|
201
|
+
last_server_ping = UNSET
|
|
202
|
+
else:
|
|
203
|
+
last_server_ping = isoparse(_last_server_ping)
|
|
204
|
+
|
|
205
|
+
error = d.pop("error", UNSET)
|
|
206
|
+
|
|
207
|
+
mqtt_trigger = cls(
|
|
208
|
+
mqtt_resource_path=mqtt_resource_path,
|
|
209
|
+
subscribe_topics=subscribe_topics,
|
|
210
|
+
enabled=enabled,
|
|
211
|
+
path=path,
|
|
212
|
+
script_path=script_path,
|
|
213
|
+
email=email,
|
|
214
|
+
extra_perms=extra_perms,
|
|
215
|
+
workspace_id=workspace_id,
|
|
216
|
+
edited_by=edited_by,
|
|
217
|
+
edited_at=edited_at,
|
|
218
|
+
is_flow=is_flow,
|
|
219
|
+
v3_config=v3_config,
|
|
220
|
+
v5_config=v5_config,
|
|
221
|
+
client_id=client_id,
|
|
222
|
+
client_version=client_version,
|
|
223
|
+
server_id=server_id,
|
|
224
|
+
last_server_ping=last_server_ping,
|
|
225
|
+
error=error,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
mqtt_trigger.additional_properties = d
|
|
229
|
+
return mqtt_trigger
|
|
230
|
+
|
|
231
|
+
@property
|
|
232
|
+
def additional_keys(self) -> List[str]:
|
|
233
|
+
return list(self.additional_properties.keys())
|
|
234
|
+
|
|
235
|
+
def __getitem__(self, key: str) -> Any:
|
|
236
|
+
return self.additional_properties[key]
|
|
237
|
+
|
|
238
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
239
|
+
self.additional_properties[key] = value
|
|
240
|
+
|
|
241
|
+
def __delitem__(self, key: str) -> None:
|
|
242
|
+
del self.additional_properties[key]
|
|
243
|
+
|
|
244
|
+
def __contains__(self, key: str) -> bool:
|
|
245
|
+
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="MqttTriggerExtraPerms")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class MqttTriggerExtraPerms:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, bool] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
mqtt_trigger_extra_perms = cls()
|
|
26
|
+
|
|
27
|
+
mqtt_trigger_extra_perms.additional_properties = d
|
|
28
|
+
return mqtt_trigger_extra_perms
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> bool:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: bool) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
from ..models.mqtt_trigger_subscribe_topics_item_qos import MqttTriggerSubscribeTopicsItemQos
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="MqttTriggerSubscribeTopicsItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class MqttTriggerSubscribeTopicsItem:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
qos (MqttTriggerSubscribeTopicsItemQos):
|
|
16
|
+
topic (str):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
qos: MqttTriggerSubscribeTopicsItemQos
|
|
20
|
+
topic: str
|
|
21
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
24
|
+
qos = self.qos.value
|
|
25
|
+
|
|
26
|
+
topic = self.topic
|
|
27
|
+
|
|
28
|
+
field_dict: Dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"qos": qos,
|
|
33
|
+
"topic": topic,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
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
|
+
qos = MqttTriggerSubscribeTopicsItemQos(d.pop("qos"))
|
|
43
|
+
|
|
44
|
+
topic = d.pop("topic")
|
|
45
|
+
|
|
46
|
+
mqtt_trigger_subscribe_topics_item = cls(
|
|
47
|
+
qos=qos,
|
|
48
|
+
topic=topic,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
mqtt_trigger_subscribe_topics_item.additional_properties = d
|
|
52
|
+
return mqtt_trigger_subscribe_topics_item
|
|
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
|