minikai 0.1.7__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.

Files changed (100) hide show
  1. minikai/__init__.py +8 -0
  2. minikai/api/__init__.py +1 -0
  3. minikai/api/groups/__init__.py +1 -0
  4. minikai/api/groups/add_minis_to_group.py +196 -0
  5. minikai/api/groups/add_users_to_group.py +196 -0
  6. minikai/api/groups/create_group.py +178 -0
  7. minikai/api/groups/delete_group.py +115 -0
  8. minikai/api/groups/get_group.py +170 -0
  9. minikai/api/groups/get_group_minis.py +175 -0
  10. minikai/api/groups/get_group_users.py +175 -0
  11. minikai/api/groups/get_groups.py +150 -0
  12. minikai/api/groups/remove_minis_from_group.py +196 -0
  13. minikai/api/groups/remove_users_from_group.py +196 -0
  14. minikai/api/groups/update_group.py +195 -0
  15. minikai/api/minis/__init__.py +1 -0
  16. minikai/api/minis/create_mini.py +178 -0
  17. minikai/api/minis/delete_mini.py +115 -0
  18. minikai/api/minis/get_external_mini.py +183 -0
  19. minikai/api/minis/get_minis.py +150 -0
  20. minikai/api/minis/patch_mini.py +195 -0
  21. minikai/api/minis/update_mini.py +195 -0
  22. minikai/api/records/__init__.py +1 -0
  23. minikai/api/records/add_attachments.py +203 -0
  24. minikai/api/records/add_relations.py +209 -0
  25. minikai/api/records/create_record.py +182 -0
  26. minikai/api/records/delete_record.py +115 -0
  27. minikai/api/records/download_attachment.py +119 -0
  28. minikai/api/records/get_created_by.py +202 -0
  29. minikai/api/records/get_labels.py +194 -0
  30. minikai/api/records/get_records_by_external.py +248 -0
  31. minikai/api/records/get_states.py +194 -0
  32. minikai/api/records/get_updated_by.py +202 -0
  33. minikai/api/records/remove_attachments.py +132 -0
  34. minikai/api/records/remove_relations.py +132 -0
  35. minikai/api/records/update_attachments.py +203 -0
  36. minikai/api/records/update_record.py +199 -0
  37. minikai/api/records/update_relations.py +209 -0
  38. minikai/api/records/upsert_records_by_external_uri.py +182 -0
  39. minikai/api/users/__init__.py +1 -0
  40. minikai/api/users/delete_api_users_minis.py +122 -0
  41. minikai/api/users/get_api_users_minis.py +175 -0
  42. minikai/api/users/get_users.py +150 -0
  43. minikai/api/users/post_api_users_minis.py +187 -0
  44. minikai/client.py +271 -0
  45. minikai/errors.py +14 -0
  46. minikai/models/__init__.py +103 -0
  47. minikai/models/add_attachments_body.py +140 -0
  48. minikai/models/batch_upsert_result.py +124 -0
  49. minikai/models/create_group_command.py +127 -0
  50. minikai/models/create_mini_command.py +144 -0
  51. minikai/models/create_record_command.py +263 -0
  52. minikai/models/create_record_command_tags.py +63 -0
  53. minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
  54. minikai/models/document_file_dto.py +171 -0
  55. minikai/models/document_file_metadata_dto.py +72 -0
  56. minikai/models/failed_upsert_item.py +83 -0
  57. minikai/models/form_field.py +138 -0
  58. minikai/models/form_field_dto.py +181 -0
  59. minikai/models/form_field_type.py +10 -0
  60. minikai/models/group_dto.py +155 -0
  61. minikai/models/http_validation_problem_details.py +198 -0
  62. minikai/models/http_validation_problem_details_errors.py +74 -0
  63. minikai/models/mini_dto.py +224 -0
  64. minikai/models/mini_template_dto.py +167 -0
  65. minikai/models/paginated_list_of_record_dto.py +124 -0
  66. minikai/models/patch_mini_command.py +102 -0
  67. minikai/models/problem_details.py +174 -0
  68. minikai/models/record.py +441 -0
  69. minikai/models/record_attachment.py +265 -0
  70. minikai/models/record_attachment_dto.py +265 -0
  71. minikai/models/record_attachment_dto_metadata_type_0.py +63 -0
  72. minikai/models/record_attachment_metadata_type_0.py +63 -0
  73. minikai/models/record_authorization.py +107 -0
  74. minikai/models/record_authorization_dto.py +107 -0
  75. minikai/models/record_dto.py +385 -0
  76. minikai/models/record_dto_tags.py +63 -0
  77. minikai/models/record_relation.py +105 -0
  78. minikai/models/record_relation_dto.py +105 -0
  79. minikai/models/record_state.py +10 -0
  80. minikai/models/record_tag.py +159 -0
  81. minikai/models/record_tag_dto.py +68 -0
  82. minikai/models/slim_mini_dto.py +197 -0
  83. minikai/models/tool_dto.py +95 -0
  84. minikai/models/update_attachments_body.py +140 -0
  85. minikai/models/update_group_command.py +148 -0
  86. minikai/models/update_mini_command.py +153 -0
  87. minikai/models/update_mini_template_workspaces_command.py +74 -0
  88. minikai/models/update_record_command.py +274 -0
  89. minikai/models/update_record_command_tags.py +63 -0
  90. minikai/models/upsert_record_dto.py +275 -0
  91. minikai/models/upsert_record_dto_tags.py +63 -0
  92. minikai/models/upsert_records_by_external_uri_command.py +79 -0
  93. minikai/models/user_dto.py +215 -0
  94. minikai/models/user_to_mini_dto.py +99 -0
  95. minikai/models/workspace_dto.py +99 -0
  96. minikai/py.typed +1 -0
  97. minikai/types.py +53 -0
  98. minikai-0.1.7.dist-info/METADATA +133 -0
  99. minikai-0.1.7.dist-info/RECORD +100 -0
  100. minikai-0.1.7.dist-info/WHEEL +4 -0
@@ -0,0 +1,159 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ from ..types import UNSET, Unset
10
+ from dateutil.parser import isoparse
11
+ from typing import cast
12
+ from typing import cast, Union
13
+ from typing import Union
14
+ import datetime
15
+
16
+
17
+
18
+
19
+
20
+
21
+ T = TypeVar("T", bound="RecordTag")
22
+
23
+
24
+
25
+ @_attrs_define
26
+ class RecordTag:
27
+ """
28
+ Attributes:
29
+ key (Union[Unset, str]):
30
+ value_string (Union[None, Unset, str]):
31
+ value_number (Union[None, Unset, float]):
32
+ value_boolean (Union[None, Unset, bool]):
33
+ value_date (Union[None, Unset, datetime.datetime]):
34
+ """
35
+
36
+ key: Union[Unset, str] = UNSET
37
+ value_string: Union[None, Unset, str] = UNSET
38
+ value_number: Union[None, Unset, float] = UNSET
39
+ value_boolean: Union[None, Unset, bool] = UNSET
40
+ value_date: Union[None, Unset, datetime.datetime] = UNSET
41
+
42
+
43
+
44
+
45
+
46
+ def to_dict(self) -> dict[str, Any]:
47
+ key = self.key
48
+
49
+ value_string: Union[None, Unset, str]
50
+ if isinstance(self.value_string, Unset):
51
+ value_string = UNSET
52
+ else:
53
+ value_string = self.value_string
54
+
55
+ value_number: Union[None, Unset, float]
56
+ if isinstance(self.value_number, Unset):
57
+ value_number = UNSET
58
+ else:
59
+ value_number = self.value_number
60
+
61
+ value_boolean: Union[None, Unset, bool]
62
+ if isinstance(self.value_boolean, Unset):
63
+ value_boolean = UNSET
64
+ else:
65
+ value_boolean = self.value_boolean
66
+
67
+ value_date: Union[None, Unset, str]
68
+ if isinstance(self.value_date, Unset):
69
+ value_date = UNSET
70
+ elif isinstance(self.value_date, datetime.datetime):
71
+ value_date = self.value_date.isoformat()
72
+ else:
73
+ value_date = self.value_date
74
+
75
+
76
+ field_dict: dict[str, Any] = {}
77
+
78
+ field_dict.update({
79
+ })
80
+ if key is not UNSET:
81
+ field_dict["key"] = key
82
+ if value_string is not UNSET:
83
+ field_dict["valueString"] = value_string
84
+ if value_number is not UNSET:
85
+ field_dict["valueNumber"] = value_number
86
+ if value_boolean is not UNSET:
87
+ field_dict["valueBoolean"] = value_boolean
88
+ if value_date is not UNSET:
89
+ field_dict["valueDate"] = value_date
90
+
91
+ return field_dict
92
+
93
+
94
+
95
+ @classmethod
96
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
97
+ d = dict(src_dict)
98
+ key = d.pop("key", UNSET)
99
+
100
+ def _parse_value_string(data: object) -> Union[None, Unset, str]:
101
+ if data is None:
102
+ return data
103
+ if isinstance(data, Unset):
104
+ return data
105
+ return cast(Union[None, Unset, str], data)
106
+
107
+ value_string = _parse_value_string(d.pop("valueString", UNSET))
108
+
109
+
110
+ def _parse_value_number(data: object) -> Union[None, Unset, float]:
111
+ if data is None:
112
+ return data
113
+ if isinstance(data, Unset):
114
+ return data
115
+ return cast(Union[None, Unset, float], data)
116
+
117
+ value_number = _parse_value_number(d.pop("valueNumber", UNSET))
118
+
119
+
120
+ def _parse_value_boolean(data: object) -> Union[None, Unset, bool]:
121
+ if data is None:
122
+ return data
123
+ if isinstance(data, Unset):
124
+ return data
125
+ return cast(Union[None, Unset, bool], data)
126
+
127
+ value_boolean = _parse_value_boolean(d.pop("valueBoolean", UNSET))
128
+
129
+
130
+ def _parse_value_date(data: object) -> Union[None, Unset, datetime.datetime]:
131
+ if data is None:
132
+ return data
133
+ if isinstance(data, Unset):
134
+ return data
135
+ try:
136
+ if not isinstance(data, str):
137
+ raise TypeError()
138
+ value_date_type_0 = isoparse(data)
139
+
140
+
141
+
142
+ return value_date_type_0
143
+ except: # noqa: E722
144
+ pass
145
+ return cast(Union[None, Unset, datetime.datetime], data)
146
+
147
+ value_date = _parse_value_date(d.pop("valueDate", UNSET))
148
+
149
+
150
+ record_tag = cls(
151
+ key=key,
152
+ value_string=value_string,
153
+ value_number=value_number,
154
+ value_boolean=value_boolean,
155
+ value_date=value_date,
156
+ )
157
+
158
+ return record_tag
159
+
@@ -0,0 +1,68 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ from ..types import UNSET, Unset
10
+ from typing import Union
11
+
12
+
13
+
14
+
15
+
16
+
17
+ T = TypeVar("T", bound="RecordTagDto")
18
+
19
+
20
+
21
+ @_attrs_define
22
+ class RecordTagDto:
23
+ """
24
+ Attributes:
25
+ key (Union[Unset, str]):
26
+ value (Union[Unset, Any]):
27
+ """
28
+
29
+ key: Union[Unset, str] = UNSET
30
+ value: Union[Unset, Any] = UNSET
31
+
32
+
33
+
34
+
35
+
36
+ def to_dict(self) -> dict[str, Any]:
37
+ key = self.key
38
+
39
+ value = self.value
40
+
41
+
42
+ field_dict: dict[str, Any] = {}
43
+
44
+ field_dict.update({
45
+ })
46
+ if key is not UNSET:
47
+ field_dict["key"] = key
48
+ if value is not UNSET:
49
+ field_dict["value"] = value
50
+
51
+ return field_dict
52
+
53
+
54
+
55
+ @classmethod
56
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
57
+ d = dict(src_dict)
58
+ key = d.pop("key", UNSET)
59
+
60
+ value = d.pop("value", UNSET)
61
+
62
+ record_tag_dto = cls(
63
+ key=key,
64
+ value=value,
65
+ )
66
+
67
+ return record_tag_dto
68
+
@@ -0,0 +1,197 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ from ..types import UNSET, Unset
10
+ from typing import cast
11
+ from typing import cast, Union
12
+ from typing import Union
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.workspace_dto import WorkspaceDto
16
+ from ..models.mini_template_dto import MiniTemplateDto
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="SlimMiniDto")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class SlimMiniDto:
28
+ """
29
+ Attributes:
30
+ id (Union[Unset, int]):
31
+ name (Union[Unset, str]):
32
+ description (Union[None, Unset, str]):
33
+ instructions (Union[None, Unset, str]):
34
+ template_id (Union[None, Unset, str]):
35
+ template (Union['MiniTemplateDto', None, Unset]):
36
+ workspaces (Union[Unset, list['WorkspaceDto']]):
37
+ """
38
+
39
+ id: Union[Unset, int] = UNSET
40
+ name: Union[Unset, str] = UNSET
41
+ description: Union[None, Unset, str] = UNSET
42
+ instructions: Union[None, Unset, str] = UNSET
43
+ template_id: Union[None, Unset, str] = UNSET
44
+ template: Union['MiniTemplateDto', None, Unset] = UNSET
45
+ workspaces: Union[Unset, list['WorkspaceDto']] = UNSET
46
+
47
+
48
+
49
+
50
+
51
+ def to_dict(self) -> dict[str, Any]:
52
+ from ..models.workspace_dto import WorkspaceDto
53
+ from ..models.mini_template_dto import MiniTemplateDto
54
+ id = self.id
55
+
56
+ name = self.name
57
+
58
+ description: Union[None, Unset, str]
59
+ if isinstance(self.description, Unset):
60
+ description = UNSET
61
+ else:
62
+ description = self.description
63
+
64
+ instructions: Union[None, Unset, str]
65
+ if isinstance(self.instructions, Unset):
66
+ instructions = UNSET
67
+ else:
68
+ instructions = self.instructions
69
+
70
+ template_id: Union[None, Unset, str]
71
+ if isinstance(self.template_id, Unset):
72
+ template_id = UNSET
73
+ else:
74
+ template_id = self.template_id
75
+
76
+ template: Union[None, Unset, dict[str, Any]]
77
+ if isinstance(self.template, Unset):
78
+ template = UNSET
79
+ elif isinstance(self.template, MiniTemplateDto):
80
+ template = self.template.to_dict()
81
+ else:
82
+ template = self.template
83
+
84
+ workspaces: Union[Unset, list[dict[str, Any]]] = UNSET
85
+ if not isinstance(self.workspaces, Unset):
86
+ workspaces = []
87
+ for workspaces_item_data in self.workspaces:
88
+ workspaces_item = workspaces_item_data.to_dict()
89
+ workspaces.append(workspaces_item)
90
+
91
+
92
+
93
+
94
+ field_dict: dict[str, Any] = {}
95
+
96
+ field_dict.update({
97
+ })
98
+ if id is not UNSET:
99
+ field_dict["id"] = id
100
+ if name is not UNSET:
101
+ field_dict["name"] = name
102
+ if description is not UNSET:
103
+ field_dict["description"] = description
104
+ if instructions is not UNSET:
105
+ field_dict["instructions"] = instructions
106
+ if template_id is not UNSET:
107
+ field_dict["templateId"] = template_id
108
+ if template is not UNSET:
109
+ field_dict["template"] = template
110
+ if workspaces is not UNSET:
111
+ field_dict["workspaces"] = workspaces
112
+
113
+ return field_dict
114
+
115
+
116
+
117
+ @classmethod
118
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
119
+ from ..models.workspace_dto import WorkspaceDto
120
+ from ..models.mini_template_dto import MiniTemplateDto
121
+ d = dict(src_dict)
122
+ id = d.pop("id", UNSET)
123
+
124
+ name = d.pop("name", UNSET)
125
+
126
+ def _parse_description(data: object) -> Union[None, Unset, str]:
127
+ if data is None:
128
+ return data
129
+ if isinstance(data, Unset):
130
+ return data
131
+ return cast(Union[None, Unset, str], data)
132
+
133
+ description = _parse_description(d.pop("description", UNSET))
134
+
135
+
136
+ def _parse_instructions(data: object) -> Union[None, Unset, str]:
137
+ if data is None:
138
+ return data
139
+ if isinstance(data, Unset):
140
+ return data
141
+ return cast(Union[None, Unset, str], data)
142
+
143
+ instructions = _parse_instructions(d.pop("instructions", UNSET))
144
+
145
+
146
+ def _parse_template_id(data: object) -> Union[None, Unset, str]:
147
+ if data is None:
148
+ return data
149
+ if isinstance(data, Unset):
150
+ return data
151
+ return cast(Union[None, Unset, str], data)
152
+
153
+ template_id = _parse_template_id(d.pop("templateId", UNSET))
154
+
155
+
156
+ def _parse_template(data: object) -> Union['MiniTemplateDto', None, Unset]:
157
+ if data is None:
158
+ return data
159
+ if isinstance(data, Unset):
160
+ return data
161
+ try:
162
+ if not isinstance(data, dict):
163
+ raise TypeError()
164
+ template_type_0 = MiniTemplateDto.from_dict(data)
165
+
166
+
167
+
168
+ return template_type_0
169
+ except: # noqa: E722
170
+ pass
171
+ return cast(Union['MiniTemplateDto', None, Unset], data)
172
+
173
+ template = _parse_template(d.pop("template", UNSET))
174
+
175
+
176
+ workspaces = []
177
+ _workspaces = d.pop("workspaces", UNSET)
178
+ for workspaces_item_data in (_workspaces or []):
179
+ workspaces_item = WorkspaceDto.from_dict(workspaces_item_data)
180
+
181
+
182
+
183
+ workspaces.append(workspaces_item)
184
+
185
+
186
+ slim_mini_dto = cls(
187
+ id=id,
188
+ name=name,
189
+ description=description,
190
+ instructions=instructions,
191
+ template_id=template_id,
192
+ template=template,
193
+ workspaces=workspaces,
194
+ )
195
+
196
+ return slim_mini_dto
197
+
@@ -0,0 +1,95 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ from ..types import UNSET, Unset
10
+ from typing import Union
11
+
12
+
13
+
14
+
15
+
16
+
17
+ T = TypeVar("T", bound="ToolDto")
18
+
19
+
20
+
21
+ @_attrs_define
22
+ class ToolDto:
23
+ """
24
+ Attributes:
25
+ id (Union[Unset, int]):
26
+ name (Union[Unset, str]):
27
+ description (Union[Unset, str]):
28
+ endpoint (Union[Unset, str]):
29
+ schema (Union[Unset, str]):
30
+ """
31
+
32
+ id: Union[Unset, int] = UNSET
33
+ name: Union[Unset, str] = UNSET
34
+ description: Union[Unset, str] = UNSET
35
+ endpoint: Union[Unset, str] = UNSET
36
+ schema: Union[Unset, str] = UNSET
37
+
38
+
39
+
40
+
41
+
42
+ def to_dict(self) -> dict[str, Any]:
43
+ id = self.id
44
+
45
+ name = self.name
46
+
47
+ description = self.description
48
+
49
+ endpoint = self.endpoint
50
+
51
+ schema = self.schema
52
+
53
+
54
+ field_dict: dict[str, Any] = {}
55
+
56
+ field_dict.update({
57
+ })
58
+ if id is not UNSET:
59
+ field_dict["id"] = id
60
+ if name is not UNSET:
61
+ field_dict["name"] = name
62
+ if description is not UNSET:
63
+ field_dict["description"] = description
64
+ if endpoint is not UNSET:
65
+ field_dict["endpoint"] = endpoint
66
+ if schema is not UNSET:
67
+ field_dict["schema"] = schema
68
+
69
+ return field_dict
70
+
71
+
72
+
73
+ @classmethod
74
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
75
+ d = dict(src_dict)
76
+ id = d.pop("id", UNSET)
77
+
78
+ name = d.pop("name", UNSET)
79
+
80
+ description = d.pop("description", UNSET)
81
+
82
+ endpoint = d.pop("endpoint", UNSET)
83
+
84
+ schema = d.pop("schema", UNSET)
85
+
86
+ tool_dto = cls(
87
+ id=id,
88
+ name=name,
89
+ description=description,
90
+ endpoint=endpoint,
91
+ schema=schema,
92
+ )
93
+
94
+ return tool_dto
95
+
@@ -0,0 +1,140 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ import json
7
+ from .. import types
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import File, FileTypes
12
+ from ..types import UNSET, Unset
13
+ from io import BytesIO
14
+ from typing import cast
15
+ from typing import cast, Union
16
+ from typing import Union
17
+
18
+
19
+
20
+
21
+
22
+
23
+ T = TypeVar("T", bound="UpdateAttachmentsBody")
24
+
25
+
26
+
27
+ @_attrs_define
28
+ class UpdateAttachmentsBody:
29
+ """
30
+ Attributes:
31
+ files (Union[None, Unset, list[File]]):
32
+ """
33
+
34
+ files: Union[None, Unset, list[File]] = UNSET
35
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
+
37
+
38
+
39
+
40
+
41
+ def to_dict(self) -> dict[str, Any]:
42
+ files: Union[None, Unset, list[FileTypes]]
43
+ if isinstance(self.files, Unset):
44
+ files = UNSET
45
+ elif isinstance(self.files, list):
46
+ files = []
47
+ for files_type_0_item_data in self.files:
48
+ files_type_0_item = files_type_0_item_data.to_tuple()
49
+
50
+ files.append(files_type_0_item)
51
+
52
+
53
+ else:
54
+ files = self.files
55
+
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update({
60
+ })
61
+ if files is not UNSET:
62
+ field_dict["files"] = files
63
+
64
+ return field_dict
65
+
66
+
67
+ def to_multipart(self) -> types.RequestFiles:
68
+ files: types.RequestFiles = []
69
+
70
+ if not isinstance(self.files, Unset):
71
+ if isinstance(self.files, list):
72
+
73
+ for files_type_0_item_element in self.files:
74
+ files.append(("files", files_type_0_item_element.to_tuple()))
75
+ else:
76
+ files.append(("files", (None, str(self.files).encode(), "text/plain")))
77
+
78
+
79
+
80
+ for prop_name, prop in self.additional_properties.items():
81
+ files.append((prop_name, (None, str(prop).encode(), "text/plain")))
82
+
83
+
84
+
85
+ return files
86
+
87
+
88
+ @classmethod
89
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
90
+ d = dict(src_dict)
91
+ def _parse_files(data: object) -> Union[None, Unset, list[File]]:
92
+ if data is None:
93
+ return data
94
+ if isinstance(data, Unset):
95
+ return data
96
+ try:
97
+ if not isinstance(data, list):
98
+ raise TypeError()
99
+ files_type_0 = []
100
+ _files_type_0 = data
101
+ for files_type_0_item_data in (_files_type_0):
102
+ files_type_0_item = File(
103
+ payload = BytesIO(files_type_0_item_data)
104
+ )
105
+
106
+
107
+
108
+ files_type_0.append(files_type_0_item)
109
+
110
+ return files_type_0
111
+ except: # noqa: E722
112
+ pass
113
+ return cast(Union[None, Unset, list[File]], data)
114
+
115
+ files = _parse_files(d.pop("files", UNSET))
116
+
117
+
118
+ update_attachments_body = cls(
119
+ files=files,
120
+ )
121
+
122
+
123
+ update_attachments_body.additional_properties = d
124
+ return update_attachments_body
125
+
126
+ @property
127
+ def additional_keys(self) -> list[str]:
128
+ return list(self.additional_properties.keys())
129
+
130
+ def __getitem__(self, key: str) -> Any:
131
+ return self.additional_properties[key]
132
+
133
+ def __setitem__(self, key: str, value: Any) -> None:
134
+ self.additional_properties[key] = value
135
+
136
+ def __delitem__(self, key: str) -> None:
137
+ del self.additional_properties[key]
138
+
139
+ def __contains__(self, key: str) -> bool:
140
+ return key in self.additional_properties