minikai 0.1.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 minikai might be problematic. Click here for more details.
- minikai/__init__.py +8 -0
- minikai/api/__init__.py +1 -0
- minikai/api/groups/__init__.py +1 -0
- minikai/api/groups/add_minis_to_group.py +176 -0
- minikai/api/groups/add_users_to_group.py +176 -0
- minikai/api/groups/create_group.py +160 -0
- minikai/api/groups/delete_group.py +95 -0
- minikai/api/groups/get_group.py +151 -0
- minikai/api/groups/get_group_minis.py +156 -0
- minikai/api/groups/get_group_users.py +156 -0
- minikai/api/groups/get_groups.py +128 -0
- minikai/api/groups/remove_minis_from_group.py +176 -0
- minikai/api/groups/remove_users_from_group.py +176 -0
- minikai/api/groups/update_group.py +177 -0
- minikai/api/minis/__init__.py +1 -0
- minikai/api/minis/create_mini.py +160 -0
- minikai/api/minis/delete_mini.py +95 -0
- minikai/api/minis/get_external_mini.py +164 -0
- minikai/api/minis/get_minis.py +128 -0
- minikai/api/minis/patch_mini.py +177 -0
- minikai/api/minis/update_mini.py +177 -0
- minikai/api/records/__init__.py +1 -0
- minikai/api/records/add_attachments.py +182 -0
- minikai/api/records/add_relations.py +187 -0
- minikai/api/records/create_record.py +162 -0
- minikai/api/records/delete_record.py +95 -0
- minikai/api/records/get_records_by_external.py +230 -0
- minikai/api/records/remove_attachments.py +110 -0
- minikai/api/records/remove_relations.py +110 -0
- minikai/api/records/update_attachments.py +182 -0
- minikai/api/records/update_record.py +179 -0
- minikai/api/records/update_relations.py +187 -0
- minikai/api/users/__init__.py +1 -0
- minikai/api/users/delete_api_users_minis.py +102 -0
- minikai/api/users/get_api_users_minis.py +156 -0
- minikai/api/users/get_users.py +128 -0
- minikai/api/users/post_api_users_minis.py +168 -0
- minikai/client.py +268 -0
- minikai/errors.py +16 -0
- minikai/models/__init__.py +89 -0
- minikai/models/add_attachments_body.py +98 -0
- minikai/models/create_group_command.py +102 -0
- minikai/models/create_mini_command.py +120 -0
- minikai/models/create_record_command.py +268 -0
- minikai/models/create_record_command_tags.py +44 -0
- minikai/models/document_file_dto.py +147 -0
- minikai/models/form_field.py +112 -0
- minikai/models/form_field_dto.py +149 -0
- minikai/models/form_field_type.py +16 -0
- minikai/models/group_dto.py +124 -0
- minikai/models/http_validation_problem_details.py +173 -0
- minikai/models/http_validation_problem_details_errors.py +51 -0
- minikai/models/json_node.py +119 -0
- minikai/models/json_node_options.py +42 -0
- minikai/models/mini_dto.py +189 -0
- minikai/models/mini_template_dto.py +135 -0
- minikai/models/paginated_list_of_record_dto.py +101 -0
- minikai/models/patch_mini_command.py +80 -0
- minikai/models/problem_details.py +151 -0
- minikai/models/record.py +379 -0
- minikai/models/record_attachment.py +236 -0
- minikai/models/record_attachment_dto.py +236 -0
- minikai/models/record_attachment_dto_metadata_type_0.py +44 -0
- minikai/models/record_attachment_metadata_type_0.py +44 -0
- minikai/models/record_authorization.py +75 -0
- minikai/models/record_authorization_dto.py +75 -0
- minikai/models/record_dto.py +377 -0
- minikai/models/record_dto_tags.py +44 -0
- minikai/models/record_relation.py +81 -0
- minikai/models/record_relation_dto.py +81 -0
- minikai/models/record_tags.py +44 -0
- minikai/models/slim_mini_dto.py +168 -0
- minikai/models/tool_dto.py +76 -0
- minikai/models/update_attachments_body.py +98 -0
- minikai/models/update_group_command.py +122 -0
- minikai/models/update_mini_command.py +129 -0
- minikai/models/update_mini_template_workspaces_command.py +51 -0
- minikai/models/update_record_command.py +266 -0
- minikai/models/update_record_command_tags.py +44 -0
- minikai/models/user_dto.py +182 -0
- minikai/models/user_to_mini_dto.py +78 -0
- minikai/models/workspace_dto.py +78 -0
- minikai/py.typed +1 -0
- minikai/types.py +54 -0
- minikai-0.1.0.dist-info/METADATA +133 -0
- minikai-0.1.0.dist-info/RECORD +87 -0
- minikai-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.mini_template_dto import MiniTemplateDto
|
|
10
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="SlimMiniDto")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class SlimMiniDto:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
id (Union[Unset, int]):
|
|
21
|
+
name (Union[Unset, str]):
|
|
22
|
+
description (Union[None, Unset, str]):
|
|
23
|
+
instructions (Union[None, Unset, str]):
|
|
24
|
+
template_id (Union[None, Unset, str]):
|
|
25
|
+
template (Union['MiniTemplateDto', None, Unset]):
|
|
26
|
+
workspaces (Union[Unset, list['WorkspaceDto']]):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: Union[Unset, int] = UNSET
|
|
30
|
+
name: Union[Unset, str] = UNSET
|
|
31
|
+
description: Union[None, Unset, str] = UNSET
|
|
32
|
+
instructions: Union[None, Unset, str] = UNSET
|
|
33
|
+
template_id: Union[None, Unset, str] = UNSET
|
|
34
|
+
template: Union["MiniTemplateDto", None, Unset] = UNSET
|
|
35
|
+
workspaces: Union[Unset, list["WorkspaceDto"]] = UNSET
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
from ..models.mini_template_dto import MiniTemplateDto
|
|
39
|
+
|
|
40
|
+
id = self.id
|
|
41
|
+
|
|
42
|
+
name = self.name
|
|
43
|
+
|
|
44
|
+
description: Union[None, Unset, str]
|
|
45
|
+
if isinstance(self.description, Unset):
|
|
46
|
+
description = UNSET
|
|
47
|
+
else:
|
|
48
|
+
description = self.description
|
|
49
|
+
|
|
50
|
+
instructions: Union[None, Unset, str]
|
|
51
|
+
if isinstance(self.instructions, Unset):
|
|
52
|
+
instructions = UNSET
|
|
53
|
+
else:
|
|
54
|
+
instructions = self.instructions
|
|
55
|
+
|
|
56
|
+
template_id: Union[None, Unset, str]
|
|
57
|
+
if isinstance(self.template_id, Unset):
|
|
58
|
+
template_id = UNSET
|
|
59
|
+
else:
|
|
60
|
+
template_id = self.template_id
|
|
61
|
+
|
|
62
|
+
template: Union[None, Unset, dict[str, Any]]
|
|
63
|
+
if isinstance(self.template, Unset):
|
|
64
|
+
template = UNSET
|
|
65
|
+
elif isinstance(self.template, MiniTemplateDto):
|
|
66
|
+
template = self.template.to_dict()
|
|
67
|
+
else:
|
|
68
|
+
template = self.template
|
|
69
|
+
|
|
70
|
+
workspaces: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
71
|
+
if not isinstance(self.workspaces, Unset):
|
|
72
|
+
workspaces = []
|
|
73
|
+
for workspaces_item_data in self.workspaces:
|
|
74
|
+
workspaces_item = workspaces_item_data.to_dict()
|
|
75
|
+
workspaces.append(workspaces_item)
|
|
76
|
+
|
|
77
|
+
field_dict: dict[str, Any] = {}
|
|
78
|
+
|
|
79
|
+
field_dict.update({})
|
|
80
|
+
if id is not UNSET:
|
|
81
|
+
field_dict["id"] = id
|
|
82
|
+
if name is not UNSET:
|
|
83
|
+
field_dict["name"] = name
|
|
84
|
+
if description is not UNSET:
|
|
85
|
+
field_dict["description"] = description
|
|
86
|
+
if instructions is not UNSET:
|
|
87
|
+
field_dict["instructions"] = instructions
|
|
88
|
+
if template_id is not UNSET:
|
|
89
|
+
field_dict["templateId"] = template_id
|
|
90
|
+
if template is not UNSET:
|
|
91
|
+
field_dict["template"] = template
|
|
92
|
+
if workspaces is not UNSET:
|
|
93
|
+
field_dict["workspaces"] = workspaces
|
|
94
|
+
|
|
95
|
+
return field_dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
99
|
+
from ..models.mini_template_dto import MiniTemplateDto
|
|
100
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
101
|
+
|
|
102
|
+
d = dict(src_dict)
|
|
103
|
+
id = d.pop("id", UNSET)
|
|
104
|
+
|
|
105
|
+
name = d.pop("name", UNSET)
|
|
106
|
+
|
|
107
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
108
|
+
if data is None:
|
|
109
|
+
return data
|
|
110
|
+
if isinstance(data, Unset):
|
|
111
|
+
return data
|
|
112
|
+
return cast(Union[None, Unset, str], data)
|
|
113
|
+
|
|
114
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
115
|
+
|
|
116
|
+
def _parse_instructions(data: object) -> Union[None, Unset, str]:
|
|
117
|
+
if data is None:
|
|
118
|
+
return data
|
|
119
|
+
if isinstance(data, Unset):
|
|
120
|
+
return data
|
|
121
|
+
return cast(Union[None, Unset, str], data)
|
|
122
|
+
|
|
123
|
+
instructions = _parse_instructions(d.pop("instructions", UNSET))
|
|
124
|
+
|
|
125
|
+
def _parse_template_id(data: object) -> Union[None, Unset, str]:
|
|
126
|
+
if data is None:
|
|
127
|
+
return data
|
|
128
|
+
if isinstance(data, Unset):
|
|
129
|
+
return data
|
|
130
|
+
return cast(Union[None, Unset, str], data)
|
|
131
|
+
|
|
132
|
+
template_id = _parse_template_id(d.pop("templateId", UNSET))
|
|
133
|
+
|
|
134
|
+
def _parse_template(data: object) -> Union["MiniTemplateDto", None, Unset]:
|
|
135
|
+
if data is None:
|
|
136
|
+
return data
|
|
137
|
+
if isinstance(data, Unset):
|
|
138
|
+
return data
|
|
139
|
+
try:
|
|
140
|
+
if not isinstance(data, dict):
|
|
141
|
+
raise TypeError()
|
|
142
|
+
template_type_0 = MiniTemplateDto.from_dict(data)
|
|
143
|
+
|
|
144
|
+
return template_type_0
|
|
145
|
+
except: # noqa: E722
|
|
146
|
+
pass
|
|
147
|
+
return cast(Union["MiniTemplateDto", None, Unset], data)
|
|
148
|
+
|
|
149
|
+
template = _parse_template(d.pop("template", UNSET))
|
|
150
|
+
|
|
151
|
+
workspaces = []
|
|
152
|
+
_workspaces = d.pop("workspaces", UNSET)
|
|
153
|
+
for workspaces_item_data in _workspaces or []:
|
|
154
|
+
workspaces_item = WorkspaceDto.from_dict(workspaces_item_data)
|
|
155
|
+
|
|
156
|
+
workspaces.append(workspaces_item)
|
|
157
|
+
|
|
158
|
+
slim_mini_dto = cls(
|
|
159
|
+
id=id,
|
|
160
|
+
name=name,
|
|
161
|
+
description=description,
|
|
162
|
+
instructions=instructions,
|
|
163
|
+
template_id=template_id,
|
|
164
|
+
template=template,
|
|
165
|
+
workspaces=workspaces,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
return slim_mini_dto
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="ToolDto")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class ToolDto:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
id (Union[Unset, int]):
|
|
16
|
+
name (Union[Unset, str]):
|
|
17
|
+
description (Union[Unset, str]):
|
|
18
|
+
endpoint (Union[Unset, str]):
|
|
19
|
+
schema (Union[Unset, str]):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
id: Union[Unset, int] = UNSET
|
|
23
|
+
name: Union[Unset, str] = UNSET
|
|
24
|
+
description: Union[Unset, str] = UNSET
|
|
25
|
+
endpoint: Union[Unset, str] = UNSET
|
|
26
|
+
schema: Union[Unset, str] = UNSET
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
id = self.id
|
|
30
|
+
|
|
31
|
+
name = self.name
|
|
32
|
+
|
|
33
|
+
description = self.description
|
|
34
|
+
|
|
35
|
+
endpoint = self.endpoint
|
|
36
|
+
|
|
37
|
+
schema = self.schema
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
|
|
41
|
+
field_dict.update({})
|
|
42
|
+
if id is not UNSET:
|
|
43
|
+
field_dict["id"] = id
|
|
44
|
+
if name is not UNSET:
|
|
45
|
+
field_dict["name"] = name
|
|
46
|
+
if description is not UNSET:
|
|
47
|
+
field_dict["description"] = description
|
|
48
|
+
if endpoint is not UNSET:
|
|
49
|
+
field_dict["endpoint"] = endpoint
|
|
50
|
+
if schema is not UNSET:
|
|
51
|
+
field_dict["schema"] = schema
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
id = d.pop("id", UNSET)
|
|
59
|
+
|
|
60
|
+
name = d.pop("name", UNSET)
|
|
61
|
+
|
|
62
|
+
description = d.pop("description", UNSET)
|
|
63
|
+
|
|
64
|
+
endpoint = d.pop("endpoint", UNSET)
|
|
65
|
+
|
|
66
|
+
schema = d.pop("schema", UNSET)
|
|
67
|
+
|
|
68
|
+
tool_dto = cls(
|
|
69
|
+
id=id,
|
|
70
|
+
name=name,
|
|
71
|
+
description=description,
|
|
72
|
+
endpoint=endpoint,
|
|
73
|
+
schema=schema,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
return tool_dto
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from .. import types
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="UpdateAttachmentsBody")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class UpdateAttachmentsBody:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
files (Union[None, Unset, list[Any]]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
files: Union[None, Unset, list[Any]] = UNSET
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
files: Union[None, Unset, list[Any]]
|
|
25
|
+
if isinstance(self.files, Unset):
|
|
26
|
+
files = UNSET
|
|
27
|
+
elif isinstance(self.files, list):
|
|
28
|
+
files = self.files
|
|
29
|
+
|
|
30
|
+
else:
|
|
31
|
+
files = self.files
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update({})
|
|
36
|
+
if files is not UNSET:
|
|
37
|
+
field_dict["files"] = files
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
42
|
+
files: types.RequestFiles = []
|
|
43
|
+
|
|
44
|
+
if not isinstance(self.files, Unset):
|
|
45
|
+
if isinstance(self.files, list):
|
|
46
|
+
for files_type_0_item_element in self.files:
|
|
47
|
+
files.append(("files", (None, str(files_type_0_item_element).encode(), "text/plain")))
|
|
48
|
+
else:
|
|
49
|
+
files.append(("files", (None, str(self.files).encode(), "text/plain")))
|
|
50
|
+
|
|
51
|
+
for prop_name, prop in self.additional_properties.items():
|
|
52
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
53
|
+
|
|
54
|
+
return files
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
58
|
+
d = dict(src_dict)
|
|
59
|
+
|
|
60
|
+
def _parse_files(data: object) -> Union[None, Unset, list[Any]]:
|
|
61
|
+
if data is None:
|
|
62
|
+
return data
|
|
63
|
+
if isinstance(data, Unset):
|
|
64
|
+
return data
|
|
65
|
+
try:
|
|
66
|
+
if not isinstance(data, list):
|
|
67
|
+
raise TypeError()
|
|
68
|
+
files_type_0 = cast(list[Any], data)
|
|
69
|
+
|
|
70
|
+
return files_type_0
|
|
71
|
+
except: # noqa: E722
|
|
72
|
+
pass
|
|
73
|
+
return cast(Union[None, Unset, list[Any]], data)
|
|
74
|
+
|
|
75
|
+
files = _parse_files(d.pop("files", UNSET))
|
|
76
|
+
|
|
77
|
+
update_attachments_body = cls(
|
|
78
|
+
files=files,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
update_attachments_body.additional_properties = d
|
|
82
|
+
return update_attachments_body
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def additional_keys(self) -> list[str]:
|
|
86
|
+
return list(self.additional_properties.keys())
|
|
87
|
+
|
|
88
|
+
def __getitem__(self, key: str) -> Any:
|
|
89
|
+
return self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
92
|
+
self.additional_properties[key] = value
|
|
93
|
+
|
|
94
|
+
def __delitem__(self, key: str) -> None:
|
|
95
|
+
del self.additional_properties[key]
|
|
96
|
+
|
|
97
|
+
def __contains__(self, key: str) -> bool:
|
|
98
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="UpdateGroupCommand")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class UpdateGroupCommand:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
group_id (Union[Unset, str]):
|
|
16
|
+
name (Union[None, Unset, str]):
|
|
17
|
+
user_ids (Union[None, Unset, list[str]]):
|
|
18
|
+
mini_ids (Union[None, Unset, list[int]]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
group_id: Union[Unset, str] = UNSET
|
|
22
|
+
name: Union[None, Unset, str] = UNSET
|
|
23
|
+
user_ids: Union[None, Unset, list[str]] = UNSET
|
|
24
|
+
mini_ids: Union[None, Unset, list[int]] = UNSET
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
group_id = self.group_id
|
|
28
|
+
|
|
29
|
+
name: Union[None, Unset, str]
|
|
30
|
+
if isinstance(self.name, Unset):
|
|
31
|
+
name = UNSET
|
|
32
|
+
else:
|
|
33
|
+
name = self.name
|
|
34
|
+
|
|
35
|
+
user_ids: Union[None, Unset, list[str]]
|
|
36
|
+
if isinstance(self.user_ids, Unset):
|
|
37
|
+
user_ids = UNSET
|
|
38
|
+
elif isinstance(self.user_ids, list):
|
|
39
|
+
user_ids = self.user_ids
|
|
40
|
+
|
|
41
|
+
else:
|
|
42
|
+
user_ids = self.user_ids
|
|
43
|
+
|
|
44
|
+
mini_ids: Union[None, Unset, list[int]]
|
|
45
|
+
if isinstance(self.mini_ids, Unset):
|
|
46
|
+
mini_ids = UNSET
|
|
47
|
+
elif isinstance(self.mini_ids, list):
|
|
48
|
+
mini_ids = self.mini_ids
|
|
49
|
+
|
|
50
|
+
else:
|
|
51
|
+
mini_ids = self.mini_ids
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
|
|
55
|
+
field_dict.update({})
|
|
56
|
+
if group_id is not UNSET:
|
|
57
|
+
field_dict["groupId"] = group_id
|
|
58
|
+
if name is not UNSET:
|
|
59
|
+
field_dict["name"] = name
|
|
60
|
+
if user_ids is not UNSET:
|
|
61
|
+
field_dict["userIds"] = user_ids
|
|
62
|
+
if mini_ids is not UNSET:
|
|
63
|
+
field_dict["miniIds"] = mini_ids
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
d = dict(src_dict)
|
|
70
|
+
group_id = d.pop("groupId", UNSET)
|
|
71
|
+
|
|
72
|
+
def _parse_name(data: object) -> Union[None, Unset, str]:
|
|
73
|
+
if data is None:
|
|
74
|
+
return data
|
|
75
|
+
if isinstance(data, Unset):
|
|
76
|
+
return data
|
|
77
|
+
return cast(Union[None, Unset, str], data)
|
|
78
|
+
|
|
79
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
80
|
+
|
|
81
|
+
def _parse_user_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
82
|
+
if data is None:
|
|
83
|
+
return data
|
|
84
|
+
if isinstance(data, Unset):
|
|
85
|
+
return data
|
|
86
|
+
try:
|
|
87
|
+
if not isinstance(data, list):
|
|
88
|
+
raise TypeError()
|
|
89
|
+
user_ids_type_0 = cast(list[str], data)
|
|
90
|
+
|
|
91
|
+
return user_ids_type_0
|
|
92
|
+
except: # noqa: E722
|
|
93
|
+
pass
|
|
94
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
95
|
+
|
|
96
|
+
user_ids = _parse_user_ids(d.pop("userIds", UNSET))
|
|
97
|
+
|
|
98
|
+
def _parse_mini_ids(data: object) -> Union[None, Unset, list[int]]:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
if isinstance(data, Unset):
|
|
102
|
+
return data
|
|
103
|
+
try:
|
|
104
|
+
if not isinstance(data, list):
|
|
105
|
+
raise TypeError()
|
|
106
|
+
mini_ids_type_0 = cast(list[int], data)
|
|
107
|
+
|
|
108
|
+
return mini_ids_type_0
|
|
109
|
+
except: # noqa: E722
|
|
110
|
+
pass
|
|
111
|
+
return cast(Union[None, Unset, list[int]], data)
|
|
112
|
+
|
|
113
|
+
mini_ids = _parse_mini_ids(d.pop("miniIds", UNSET))
|
|
114
|
+
|
|
115
|
+
update_group_command = cls(
|
|
116
|
+
group_id=group_id,
|
|
117
|
+
name=name,
|
|
118
|
+
user_ids=user_ids,
|
|
119
|
+
mini_ids=mini_ids,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
return update_group_command
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="UpdateMiniCommand")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class UpdateMiniCommand:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
id (Union[Unset, int]):
|
|
16
|
+
name (Union[Unset, str]):
|
|
17
|
+
description (Union[None, Unset, str]):
|
|
18
|
+
template_id (Union[None, Unset, str]):
|
|
19
|
+
external_id (Union[None, Unset, str]):
|
|
20
|
+
external_source (Union[None, Unset, str]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
id: Union[Unset, int] = UNSET
|
|
24
|
+
name: Union[Unset, str] = UNSET
|
|
25
|
+
description: Union[None, Unset, str] = UNSET
|
|
26
|
+
template_id: Union[None, Unset, str] = UNSET
|
|
27
|
+
external_id: Union[None, Unset, str] = UNSET
|
|
28
|
+
external_source: Union[None, Unset, str] = UNSET
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
id = self.id
|
|
32
|
+
|
|
33
|
+
name = self.name
|
|
34
|
+
|
|
35
|
+
description: Union[None, Unset, str]
|
|
36
|
+
if isinstance(self.description, Unset):
|
|
37
|
+
description = UNSET
|
|
38
|
+
else:
|
|
39
|
+
description = self.description
|
|
40
|
+
|
|
41
|
+
template_id: Union[None, Unset, str]
|
|
42
|
+
if isinstance(self.template_id, Unset):
|
|
43
|
+
template_id = UNSET
|
|
44
|
+
else:
|
|
45
|
+
template_id = self.template_id
|
|
46
|
+
|
|
47
|
+
external_id: Union[None, Unset, str]
|
|
48
|
+
if isinstance(self.external_id, Unset):
|
|
49
|
+
external_id = UNSET
|
|
50
|
+
else:
|
|
51
|
+
external_id = self.external_id
|
|
52
|
+
|
|
53
|
+
external_source: Union[None, Unset, str]
|
|
54
|
+
if isinstance(self.external_source, Unset):
|
|
55
|
+
external_source = UNSET
|
|
56
|
+
else:
|
|
57
|
+
external_source = self.external_source
|
|
58
|
+
|
|
59
|
+
field_dict: dict[str, Any] = {}
|
|
60
|
+
|
|
61
|
+
field_dict.update({})
|
|
62
|
+
if id is not UNSET:
|
|
63
|
+
field_dict["id"] = id
|
|
64
|
+
if name is not UNSET:
|
|
65
|
+
field_dict["name"] = name
|
|
66
|
+
if description is not UNSET:
|
|
67
|
+
field_dict["description"] = description
|
|
68
|
+
if template_id is not UNSET:
|
|
69
|
+
field_dict["templateId"] = template_id
|
|
70
|
+
if external_id is not UNSET:
|
|
71
|
+
field_dict["externalId"] = external_id
|
|
72
|
+
if external_source is not UNSET:
|
|
73
|
+
field_dict["externalSource"] = external_source
|
|
74
|
+
|
|
75
|
+
return field_dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
79
|
+
d = dict(src_dict)
|
|
80
|
+
id = d.pop("id", UNSET)
|
|
81
|
+
|
|
82
|
+
name = d.pop("name", UNSET)
|
|
83
|
+
|
|
84
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
85
|
+
if data is None:
|
|
86
|
+
return data
|
|
87
|
+
if isinstance(data, Unset):
|
|
88
|
+
return data
|
|
89
|
+
return cast(Union[None, Unset, str], data)
|
|
90
|
+
|
|
91
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
92
|
+
|
|
93
|
+
def _parse_template_id(data: object) -> Union[None, Unset, str]:
|
|
94
|
+
if data is None:
|
|
95
|
+
return data
|
|
96
|
+
if isinstance(data, Unset):
|
|
97
|
+
return data
|
|
98
|
+
return cast(Union[None, Unset, str], data)
|
|
99
|
+
|
|
100
|
+
template_id = _parse_template_id(d.pop("templateId", UNSET))
|
|
101
|
+
|
|
102
|
+
def _parse_external_id(data: object) -> Union[None, Unset, str]:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
if isinstance(data, Unset):
|
|
106
|
+
return data
|
|
107
|
+
return cast(Union[None, Unset, str], data)
|
|
108
|
+
|
|
109
|
+
external_id = _parse_external_id(d.pop("externalId", UNSET))
|
|
110
|
+
|
|
111
|
+
def _parse_external_source(data: object) -> Union[None, Unset, str]:
|
|
112
|
+
if data is None:
|
|
113
|
+
return data
|
|
114
|
+
if isinstance(data, Unset):
|
|
115
|
+
return data
|
|
116
|
+
return cast(Union[None, Unset, str], data)
|
|
117
|
+
|
|
118
|
+
external_source = _parse_external_source(d.pop("externalSource", UNSET))
|
|
119
|
+
|
|
120
|
+
update_mini_command = cls(
|
|
121
|
+
id=id,
|
|
122
|
+
name=name,
|
|
123
|
+
description=description,
|
|
124
|
+
template_id=template_id,
|
|
125
|
+
external_id=external_id,
|
|
126
|
+
external_source=external_source,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
return update_mini_command
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="UpdateMiniTemplateWorkspacesCommand")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class UpdateMiniTemplateWorkspacesCommand:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
mini_template_id (Union[Unset, str]):
|
|
16
|
+
workspace_ids (Union[Unset, list[str]]):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
mini_template_id: Union[Unset, str] = UNSET
|
|
20
|
+
workspace_ids: Union[Unset, list[str]] = UNSET
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
mini_template_id = self.mini_template_id
|
|
24
|
+
|
|
25
|
+
workspace_ids: Union[Unset, list[str]] = UNSET
|
|
26
|
+
if not isinstance(self.workspace_ids, Unset):
|
|
27
|
+
workspace_ids = self.workspace_ids
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
|
|
31
|
+
field_dict.update({})
|
|
32
|
+
if mini_template_id is not UNSET:
|
|
33
|
+
field_dict["miniTemplateId"] = mini_template_id
|
|
34
|
+
if workspace_ids is not UNSET:
|
|
35
|
+
field_dict["workspaceIds"] = workspace_ids
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
mini_template_id = d.pop("miniTemplateId", UNSET)
|
|
43
|
+
|
|
44
|
+
workspace_ids = cast(list[str], d.pop("workspaceIds", UNSET))
|
|
45
|
+
|
|
46
|
+
update_mini_template_workspaces_command = cls(
|
|
47
|
+
mini_template_id=mini_template_id,
|
|
48
|
+
workspace_ids=workspace_ids,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return update_mini_template_workspaces_command
|