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.
- 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 +196 -0
- minikai/api/groups/add_users_to_group.py +196 -0
- minikai/api/groups/create_group.py +178 -0
- minikai/api/groups/delete_group.py +115 -0
- minikai/api/groups/get_group.py +170 -0
- minikai/api/groups/get_group_minis.py +175 -0
- minikai/api/groups/get_group_users.py +175 -0
- minikai/api/groups/get_groups.py +150 -0
- minikai/api/groups/remove_minis_from_group.py +196 -0
- minikai/api/groups/remove_users_from_group.py +196 -0
- minikai/api/groups/update_group.py +195 -0
- minikai/api/minis/__init__.py +1 -0
- minikai/api/minis/create_mini.py +178 -0
- minikai/api/minis/delete_mini.py +115 -0
- minikai/api/minis/get_external_mini.py +183 -0
- minikai/api/minis/get_minis.py +150 -0
- minikai/api/minis/patch_mini.py +195 -0
- minikai/api/minis/update_mini.py +195 -0
- minikai/api/records/__init__.py +1 -0
- minikai/api/records/add_attachments.py +203 -0
- minikai/api/records/add_relations.py +209 -0
- minikai/api/records/create_record.py +182 -0
- minikai/api/records/delete_record.py +115 -0
- minikai/api/records/download_attachment.py +119 -0
- minikai/api/records/get_created_by.py +202 -0
- minikai/api/records/get_labels.py +194 -0
- minikai/api/records/get_records_by_external.py +248 -0
- minikai/api/records/get_states.py +194 -0
- minikai/api/records/get_updated_by.py +202 -0
- minikai/api/records/remove_attachments.py +132 -0
- minikai/api/records/remove_relations.py +132 -0
- minikai/api/records/update_attachments.py +203 -0
- minikai/api/records/update_record.py +199 -0
- minikai/api/records/update_relations.py +209 -0
- minikai/api/records/upsert_records_by_external_uri.py +182 -0
- minikai/api/users/__init__.py +1 -0
- minikai/api/users/delete_api_users_minis.py +122 -0
- minikai/api/users/get_api_users_minis.py +175 -0
- minikai/api/users/get_users.py +150 -0
- minikai/api/users/post_api_users_minis.py +187 -0
- minikai/client.py +271 -0
- minikai/errors.py +14 -0
- minikai/models/__init__.py +103 -0
- minikai/models/add_attachments_body.py +140 -0
- minikai/models/batch_upsert_result.py +124 -0
- minikai/models/create_group_command.py +127 -0
- minikai/models/create_mini_command.py +144 -0
- minikai/models/create_record_command.py +263 -0
- minikai/models/create_record_command_tags.py +63 -0
- minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
- minikai/models/document_file_dto.py +171 -0
- minikai/models/document_file_metadata_dto.py +72 -0
- minikai/models/failed_upsert_item.py +83 -0
- minikai/models/form_field.py +138 -0
- minikai/models/form_field_dto.py +181 -0
- minikai/models/form_field_type.py +10 -0
- minikai/models/group_dto.py +155 -0
- minikai/models/http_validation_problem_details.py +198 -0
- minikai/models/http_validation_problem_details_errors.py +74 -0
- minikai/models/mini_dto.py +224 -0
- minikai/models/mini_template_dto.py +167 -0
- minikai/models/paginated_list_of_record_dto.py +124 -0
- minikai/models/patch_mini_command.py +102 -0
- minikai/models/problem_details.py +174 -0
- minikai/models/record.py +441 -0
- minikai/models/record_attachment.py +265 -0
- minikai/models/record_attachment_dto.py +265 -0
- minikai/models/record_attachment_dto_metadata_type_0.py +63 -0
- minikai/models/record_attachment_metadata_type_0.py +63 -0
- minikai/models/record_authorization.py +107 -0
- minikai/models/record_authorization_dto.py +107 -0
- minikai/models/record_dto.py +385 -0
- minikai/models/record_dto_tags.py +63 -0
- minikai/models/record_relation.py +105 -0
- minikai/models/record_relation_dto.py +105 -0
- minikai/models/record_state.py +10 -0
- minikai/models/record_tag.py +159 -0
- minikai/models/record_tag_dto.py +68 -0
- minikai/models/slim_mini_dto.py +197 -0
- minikai/models/tool_dto.py +95 -0
- minikai/models/update_attachments_body.py +140 -0
- minikai/models/update_group_command.py +148 -0
- minikai/models/update_mini_command.py +153 -0
- minikai/models/update_mini_template_workspaces_command.py +74 -0
- minikai/models/update_record_command.py +274 -0
- minikai/models/update_record_command_tags.py +63 -0
- minikai/models/upsert_record_dto.py +275 -0
- minikai/models/upsert_record_dto_tags.py +63 -0
- minikai/models/upsert_records_by_external_uri_command.py +79 -0
- minikai/models/user_dto.py +215 -0
- minikai/models/user_to_mini_dto.py +99 -0
- minikai/models/workspace_dto.py +99 -0
- minikai/py.typed +1 -0
- minikai/types.py +53 -0
- minikai-0.1.7.dist-info/METADATA +133 -0
- minikai-0.1.7.dist-info/RECORD +100 -0
- minikai-0.1.7.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,265 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ..models.record_attachment_dto_metadata_type_0 import RecordAttachmentDtoMetadataType0
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
T = TypeVar("T", bound="RecordAttachmentDto")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@_attrs_define
|
|
28
|
+
class RecordAttachmentDto:
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
id (Union[Unset, str]):
|
|
32
|
+
file_name (Union[Unset, str]):
|
|
33
|
+
content_type (Union[Unset, str]):
|
|
34
|
+
size (Union[Unset, int]):
|
|
35
|
+
checksum (Union[None, Unset, str]):
|
|
36
|
+
uri (Union[Unset, str]):
|
|
37
|
+
created_at (Union[None, Unset, datetime.datetime]):
|
|
38
|
+
updated_at (Union[None, Unset, datetime.datetime]):
|
|
39
|
+
created_by (Union[None, Unset, str]):
|
|
40
|
+
updated_by (Union[None, Unset, str]):
|
|
41
|
+
metadata (Union['RecordAttachmentDtoMetadataType0', None, Unset]):
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
id: Union[Unset, str] = UNSET
|
|
45
|
+
file_name: Union[Unset, str] = UNSET
|
|
46
|
+
content_type: Union[Unset, str] = UNSET
|
|
47
|
+
size: Union[Unset, int] = UNSET
|
|
48
|
+
checksum: Union[None, Unset, str] = UNSET
|
|
49
|
+
uri: Union[Unset, str] = UNSET
|
|
50
|
+
created_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
51
|
+
updated_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
52
|
+
created_by: Union[None, Unset, str] = UNSET
|
|
53
|
+
updated_by: Union[None, Unset, str] = UNSET
|
|
54
|
+
metadata: Union['RecordAttachmentDtoMetadataType0', None, Unset] = UNSET
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> dict[str, Any]:
|
|
61
|
+
from ..models.record_attachment_dto_metadata_type_0 import RecordAttachmentDtoMetadataType0
|
|
62
|
+
id = self.id
|
|
63
|
+
|
|
64
|
+
file_name = self.file_name
|
|
65
|
+
|
|
66
|
+
content_type = self.content_type
|
|
67
|
+
|
|
68
|
+
size = self.size
|
|
69
|
+
|
|
70
|
+
checksum: Union[None, Unset, str]
|
|
71
|
+
if isinstance(self.checksum, Unset):
|
|
72
|
+
checksum = UNSET
|
|
73
|
+
else:
|
|
74
|
+
checksum = self.checksum
|
|
75
|
+
|
|
76
|
+
uri = self.uri
|
|
77
|
+
|
|
78
|
+
created_at: Union[None, Unset, str]
|
|
79
|
+
if isinstance(self.created_at, Unset):
|
|
80
|
+
created_at = UNSET
|
|
81
|
+
elif isinstance(self.created_at, datetime.datetime):
|
|
82
|
+
created_at = self.created_at.isoformat()
|
|
83
|
+
else:
|
|
84
|
+
created_at = self.created_at
|
|
85
|
+
|
|
86
|
+
updated_at: Union[None, Unset, str]
|
|
87
|
+
if isinstance(self.updated_at, Unset):
|
|
88
|
+
updated_at = UNSET
|
|
89
|
+
elif isinstance(self.updated_at, datetime.datetime):
|
|
90
|
+
updated_at = self.updated_at.isoformat()
|
|
91
|
+
else:
|
|
92
|
+
updated_at = self.updated_at
|
|
93
|
+
|
|
94
|
+
created_by: Union[None, Unset, str]
|
|
95
|
+
if isinstance(self.created_by, Unset):
|
|
96
|
+
created_by = UNSET
|
|
97
|
+
else:
|
|
98
|
+
created_by = self.created_by
|
|
99
|
+
|
|
100
|
+
updated_by: Union[None, Unset, str]
|
|
101
|
+
if isinstance(self.updated_by, Unset):
|
|
102
|
+
updated_by = UNSET
|
|
103
|
+
else:
|
|
104
|
+
updated_by = self.updated_by
|
|
105
|
+
|
|
106
|
+
metadata: Union[None, Unset, dict[str, Any]]
|
|
107
|
+
if isinstance(self.metadata, Unset):
|
|
108
|
+
metadata = UNSET
|
|
109
|
+
elif isinstance(self.metadata, RecordAttachmentDtoMetadataType0):
|
|
110
|
+
metadata = self.metadata.to_dict()
|
|
111
|
+
else:
|
|
112
|
+
metadata = self.metadata
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
field_dict: dict[str, Any] = {}
|
|
116
|
+
|
|
117
|
+
field_dict.update({
|
|
118
|
+
})
|
|
119
|
+
if id is not UNSET:
|
|
120
|
+
field_dict["id"] = id
|
|
121
|
+
if file_name is not UNSET:
|
|
122
|
+
field_dict["fileName"] = file_name
|
|
123
|
+
if content_type is not UNSET:
|
|
124
|
+
field_dict["contentType"] = content_type
|
|
125
|
+
if size is not UNSET:
|
|
126
|
+
field_dict["size"] = size
|
|
127
|
+
if checksum is not UNSET:
|
|
128
|
+
field_dict["checksum"] = checksum
|
|
129
|
+
if uri is not UNSET:
|
|
130
|
+
field_dict["uri"] = uri
|
|
131
|
+
if created_at is not UNSET:
|
|
132
|
+
field_dict["createdAt"] = created_at
|
|
133
|
+
if updated_at is not UNSET:
|
|
134
|
+
field_dict["updatedAt"] = updated_at
|
|
135
|
+
if created_by is not UNSET:
|
|
136
|
+
field_dict["createdBy"] = created_by
|
|
137
|
+
if updated_by is not UNSET:
|
|
138
|
+
field_dict["updatedBy"] = updated_by
|
|
139
|
+
if metadata is not UNSET:
|
|
140
|
+
field_dict["metadata"] = metadata
|
|
141
|
+
|
|
142
|
+
return field_dict
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
148
|
+
from ..models.record_attachment_dto_metadata_type_0 import RecordAttachmentDtoMetadataType0
|
|
149
|
+
d = dict(src_dict)
|
|
150
|
+
id = d.pop("id", UNSET)
|
|
151
|
+
|
|
152
|
+
file_name = d.pop("fileName", UNSET)
|
|
153
|
+
|
|
154
|
+
content_type = d.pop("contentType", UNSET)
|
|
155
|
+
|
|
156
|
+
size = d.pop("size", UNSET)
|
|
157
|
+
|
|
158
|
+
def _parse_checksum(data: object) -> Union[None, Unset, str]:
|
|
159
|
+
if data is None:
|
|
160
|
+
return data
|
|
161
|
+
if isinstance(data, Unset):
|
|
162
|
+
return data
|
|
163
|
+
return cast(Union[None, Unset, str], data)
|
|
164
|
+
|
|
165
|
+
checksum = _parse_checksum(d.pop("checksum", UNSET))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
uri = d.pop("uri", UNSET)
|
|
169
|
+
|
|
170
|
+
def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
171
|
+
if data is None:
|
|
172
|
+
return data
|
|
173
|
+
if isinstance(data, Unset):
|
|
174
|
+
return data
|
|
175
|
+
try:
|
|
176
|
+
if not isinstance(data, str):
|
|
177
|
+
raise TypeError()
|
|
178
|
+
created_at_type_0 = isoparse(data)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
return created_at_type_0
|
|
183
|
+
except: # noqa: E722
|
|
184
|
+
pass
|
|
185
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
186
|
+
|
|
187
|
+
created_at = _parse_created_at(d.pop("createdAt", UNSET))
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
191
|
+
if data is None:
|
|
192
|
+
return data
|
|
193
|
+
if isinstance(data, Unset):
|
|
194
|
+
return data
|
|
195
|
+
try:
|
|
196
|
+
if not isinstance(data, str):
|
|
197
|
+
raise TypeError()
|
|
198
|
+
updated_at_type_0 = isoparse(data)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
return updated_at_type_0
|
|
203
|
+
except: # noqa: E722
|
|
204
|
+
pass
|
|
205
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
206
|
+
|
|
207
|
+
updated_at = _parse_updated_at(d.pop("updatedAt", UNSET))
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def _parse_created_by(data: object) -> Union[None, Unset, str]:
|
|
211
|
+
if data is None:
|
|
212
|
+
return data
|
|
213
|
+
if isinstance(data, Unset):
|
|
214
|
+
return data
|
|
215
|
+
return cast(Union[None, Unset, str], data)
|
|
216
|
+
|
|
217
|
+
created_by = _parse_created_by(d.pop("createdBy", UNSET))
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def _parse_updated_by(data: object) -> Union[None, Unset, str]:
|
|
221
|
+
if data is None:
|
|
222
|
+
return data
|
|
223
|
+
if isinstance(data, Unset):
|
|
224
|
+
return data
|
|
225
|
+
return cast(Union[None, Unset, str], data)
|
|
226
|
+
|
|
227
|
+
updated_by = _parse_updated_by(d.pop("updatedBy", UNSET))
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def _parse_metadata(data: object) -> Union['RecordAttachmentDtoMetadataType0', None, Unset]:
|
|
231
|
+
if data is None:
|
|
232
|
+
return data
|
|
233
|
+
if isinstance(data, Unset):
|
|
234
|
+
return data
|
|
235
|
+
try:
|
|
236
|
+
if not isinstance(data, dict):
|
|
237
|
+
raise TypeError()
|
|
238
|
+
metadata_type_0 = RecordAttachmentDtoMetadataType0.from_dict(data)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
return metadata_type_0
|
|
243
|
+
except: # noqa: E722
|
|
244
|
+
pass
|
|
245
|
+
return cast(Union['RecordAttachmentDtoMetadataType0', None, Unset], data)
|
|
246
|
+
|
|
247
|
+
metadata = _parse_metadata(d.pop("metadata", UNSET))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
record_attachment_dto = cls(
|
|
251
|
+
id=id,
|
|
252
|
+
file_name=file_name,
|
|
253
|
+
content_type=content_type,
|
|
254
|
+
size=size,
|
|
255
|
+
checksum=checksum,
|
|
256
|
+
uri=uri,
|
|
257
|
+
created_at=created_at,
|
|
258
|
+
updated_at=updated_at,
|
|
259
|
+
created_by=created_by,
|
|
260
|
+
updated_by=updated_by,
|
|
261
|
+
metadata=metadata,
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
return record_attachment_dto
|
|
265
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="RecordAttachmentDtoMetadataType0")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class RecordAttachmentDtoMetadataType0:
|
|
21
|
+
"""
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
record_attachment_dto_metadata_type_0 = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
record_attachment_dto_metadata_type_0.additional_properties = d
|
|
47
|
+
return record_attachment_dto_metadata_type_0
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def additional_keys(self) -> list[str]:
|
|
51
|
+
return list(self.additional_properties.keys())
|
|
52
|
+
|
|
53
|
+
def __getitem__(self, key: str) -> Any:
|
|
54
|
+
return self.additional_properties[key]
|
|
55
|
+
|
|
56
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
57
|
+
self.additional_properties[key] = value
|
|
58
|
+
|
|
59
|
+
def __delitem__(self, key: str) -> None:
|
|
60
|
+
del self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __contains__(self, key: str) -> bool:
|
|
63
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="RecordAttachmentMetadataType0")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class RecordAttachmentMetadataType0:
|
|
21
|
+
"""
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
record_attachment_metadata_type_0 = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
record_attachment_metadata_type_0.additional_properties = d
|
|
47
|
+
return record_attachment_metadata_type_0
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def additional_keys(self) -> list[str]:
|
|
51
|
+
return list(self.additional_properties.keys())
|
|
52
|
+
|
|
53
|
+
def __getitem__(self, key: str) -> Any:
|
|
54
|
+
return self.additional_properties[key]
|
|
55
|
+
|
|
56
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
57
|
+
self.additional_properties[key] = value
|
|
58
|
+
|
|
59
|
+
def __delitem__(self, key: str) -> None:
|
|
60
|
+
del self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __contains__(self, key: str) -> bool:
|
|
63
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,107 @@
|
|
|
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 Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="RecordAuthorization")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class RecordAuthorization:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
users (Union[Unset, list[str]]):
|
|
27
|
+
minis (Union[Unset, list[str]]):
|
|
28
|
+
organizations (Union[Unset, list[str]]):
|
|
29
|
+
sessions (Union[Unset, list[str]]):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
users: Union[Unset, list[str]] = UNSET
|
|
33
|
+
minis: Union[Unset, list[str]] = UNSET
|
|
34
|
+
organizations: Union[Unset, list[str]] = UNSET
|
|
35
|
+
sessions: Union[Unset, list[str]] = UNSET
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> dict[str, Any]:
|
|
42
|
+
users: Union[Unset, list[str]] = UNSET
|
|
43
|
+
if not isinstance(self.users, Unset):
|
|
44
|
+
users = self.users
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
minis: Union[Unset, list[str]] = UNSET
|
|
49
|
+
if not isinstance(self.minis, Unset):
|
|
50
|
+
minis = self.minis
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
organizations: Union[Unset, list[str]] = UNSET
|
|
55
|
+
if not isinstance(self.organizations, Unset):
|
|
56
|
+
organizations = self.organizations
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
sessions: Union[Unset, list[str]] = UNSET
|
|
61
|
+
if not isinstance(self.sessions, Unset):
|
|
62
|
+
sessions = self.sessions
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
field_dict: dict[str, Any] = {}
|
|
68
|
+
|
|
69
|
+
field_dict.update({
|
|
70
|
+
})
|
|
71
|
+
if users is not UNSET:
|
|
72
|
+
field_dict["users"] = users
|
|
73
|
+
if minis is not UNSET:
|
|
74
|
+
field_dict["minis"] = minis
|
|
75
|
+
if organizations is not UNSET:
|
|
76
|
+
field_dict["organizations"] = organizations
|
|
77
|
+
if sessions is not UNSET:
|
|
78
|
+
field_dict["sessions"] = sessions
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
d = dict(src_dict)
|
|
87
|
+
users = cast(list[str], d.pop("users", UNSET))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
minis = cast(list[str], d.pop("minis", UNSET))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
organizations = cast(list[str], d.pop("organizations", UNSET))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
sessions = cast(list[str], d.pop("sessions", UNSET))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
record_authorization = cls(
|
|
100
|
+
users=users,
|
|
101
|
+
minis=minis,
|
|
102
|
+
organizations=organizations,
|
|
103
|
+
sessions=sessions,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return record_authorization
|
|
107
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
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 Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="RecordAuthorizationDto")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class RecordAuthorizationDto:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
users (Union[Unset, list[str]]):
|
|
27
|
+
minis (Union[Unset, list[str]]):
|
|
28
|
+
organizations (Union[Unset, list[str]]):
|
|
29
|
+
sessions (Union[Unset, list[str]]):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
users: Union[Unset, list[str]] = UNSET
|
|
33
|
+
minis: Union[Unset, list[str]] = UNSET
|
|
34
|
+
organizations: Union[Unset, list[str]] = UNSET
|
|
35
|
+
sessions: Union[Unset, list[str]] = UNSET
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> dict[str, Any]:
|
|
42
|
+
users: Union[Unset, list[str]] = UNSET
|
|
43
|
+
if not isinstance(self.users, Unset):
|
|
44
|
+
users = self.users
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
minis: Union[Unset, list[str]] = UNSET
|
|
49
|
+
if not isinstance(self.minis, Unset):
|
|
50
|
+
minis = self.minis
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
organizations: Union[Unset, list[str]] = UNSET
|
|
55
|
+
if not isinstance(self.organizations, Unset):
|
|
56
|
+
organizations = self.organizations
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
sessions: Union[Unset, list[str]] = UNSET
|
|
61
|
+
if not isinstance(self.sessions, Unset):
|
|
62
|
+
sessions = self.sessions
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
field_dict: dict[str, Any] = {}
|
|
68
|
+
|
|
69
|
+
field_dict.update({
|
|
70
|
+
})
|
|
71
|
+
if users is not UNSET:
|
|
72
|
+
field_dict["users"] = users
|
|
73
|
+
if minis is not UNSET:
|
|
74
|
+
field_dict["minis"] = minis
|
|
75
|
+
if organizations is not UNSET:
|
|
76
|
+
field_dict["organizations"] = organizations
|
|
77
|
+
if sessions is not UNSET:
|
|
78
|
+
field_dict["sessions"] = sessions
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
d = dict(src_dict)
|
|
87
|
+
users = cast(list[str], d.pop("users", UNSET))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
minis = cast(list[str], d.pop("minis", UNSET))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
organizations = cast(list[str], d.pop("organizations", UNSET))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
sessions = cast(list[str], d.pop("sessions", UNSET))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
record_authorization_dto = cls(
|
|
100
|
+
users=users,
|
|
101
|
+
minis=minis,
|
|
102
|
+
organizations=organizations,
|
|
103
|
+
sessions=sessions,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return record_authorization_dto
|
|
107
|
+
|