minikai 0.1.1__py3-none-any.whl → 0.1.3__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 +1 -1
- minikai/api/__init__.py +1 -1
- minikai/api/groups/__init__.py +1 -1
- minikai/api/groups/add_minis_to_group.py +53 -33
- minikai/api/groups/add_users_to_group.py +53 -33
- minikai/api/groups/create_group.py +45 -27
- minikai/api/groups/delete_group.py +29 -9
- minikai/api/groups/get_group.py +47 -28
- minikai/api/groups/get_group_minis.py +52 -33
- minikai/api/groups/get_group_users.py +52 -33
- minikai/api/groups/get_groups.py +56 -34
- minikai/api/groups/remove_minis_from_group.py +53 -33
- minikai/api/groups/remove_users_from_group.py +53 -33
- minikai/api/groups/update_group.py +51 -33
- minikai/api/minis/__init__.py +1 -1
- minikai/api/minis/create_mini.py +45 -27
- minikai/api/minis/delete_mini.py +29 -9
- minikai/api/minis/get_external_mini.py +52 -33
- minikai/api/minis/get_minis.py +56 -34
- minikai/api/minis/patch_mini.py +51 -33
- minikai/api/minis/update_mini.py +51 -33
- minikai/api/records/__init__.py +1 -1
- minikai/api/records/add_attachments.py +59 -38
- minikai/api/records/add_relations.py +65 -43
- minikai/api/records/create_record.py +48 -28
- minikai/api/records/delete_record.py +29 -9
- minikai/api/records/download_attachment.py +119 -0
- minikai/api/records/get_records_by_external.py +68 -45
- minikai/api/records/remove_attachments.py +33 -11
- minikai/api/records/remove_relations.py +33 -11
- minikai/api/records/update_attachments.py +59 -38
- minikai/api/records/update_record.py +53 -33
- minikai/api/records/update_relations.py +65 -43
- minikai/api/users/__init__.py +1 -1
- minikai/api/users/delete_api_users_minis.py +31 -11
- minikai/api/users/get_api_users_minis.py +52 -33
- minikai/api/users/get_users.py +56 -34
- minikai/api/users/post_api_users_minis.py +52 -33
- minikai/client.py +6 -3
- minikai/errors.py +1 -3
- minikai/models/__init__.py +7 -3
- minikai/models/add_attachments_body.py +45 -13
- minikai/models/create_group_command.py +35 -10
- minikai/models/create_mini_command.py +34 -10
- minikai/models/create_record_command.py +87 -41
- minikai/models/create_record_command_tags.py +22 -3
- minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
- minikai/models/document_file_dto.py +37 -13
- minikai/models/document_file_metadata_dto.py +27 -7
- minikai/models/form_field.py +38 -12
- minikai/models/form_field_dto.py +48 -16
- minikai/models/form_field_type.py +2 -8
- minikai/models/group_dto.py +50 -19
- minikai/models/http_validation_problem_details.py +41 -16
- minikai/models/http_validation_problem_details_errors.py +26 -3
- minikai/models/json_node.py +49 -24
- minikai/models/json_node_options.py +26 -7
- minikai/models/mini_dto.py +62 -27
- minikai/models/mini_template_dto.py +50 -18
- minikai/models/paginated_list_of_record_dto.py +39 -16
- minikai/models/patch_mini_command.py +30 -8
- minikai/models/problem_details.py +34 -11
- minikai/models/record.py +143 -61
- minikai/models/record_attachment.py +56 -27
- minikai/models/record_attachment_dto.py +56 -27
- minikai/models/record_attachment_dto_metadata_type_0.py +22 -3
- minikai/models/record_attachment_metadata_type_0.py +22 -3
- minikai/models/record_authorization.py +41 -9
- minikai/models/record_authorization_dto.py +41 -9
- minikai/models/record_dto.py +113 -54
- minikai/models/record_dto_tags.py +22 -3
- minikai/models/record_relation.py +35 -11
- minikai/models/record_relation_dto.py +35 -11
- minikai/models/record_tag.py +159 -0
- minikai/models/record_tag_dto.py +68 -0
- minikai/models/slim_mini_dto.py +51 -22
- minikai/models/tool_dto.py +29 -10
- minikai/models/update_attachments_body.py +45 -13
- minikai/models/update_group_command.py +37 -11
- minikai/models/update_mini_command.py +35 -11
- minikai/models/update_mini_template_workspaces_command.py +30 -7
- minikai/models/update_record_command.py +87 -42
- minikai/models/update_record_command_tags.py +22 -3
- minikai/models/user_dto.py +50 -17
- minikai/models/user_to_mini_dto.py +30 -9
- minikai/models/workspace_dto.py +30 -9
- minikai/types.py +5 -6
- {minikai-0.1.1.dist-info → minikai-0.1.3.dist-info}/METADATA +1 -1
- minikai-0.1.3.dist-info/RECORD +91 -0
- minikai/models/record_tags.py +0 -44
- minikai-0.1.1.dist-info/RECORD +0 -88
- {minikai-0.1.1.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
minikai/models/record_dto.py
CHANGED
|
@@ -1,47 +1,57 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
from collections.abc import Mapping
|
|
3
|
-
from typing import
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
4
3
|
|
|
5
4
|
from attrs import define as _attrs_define
|
|
6
|
-
from
|
|
5
|
+
from attrs import field as _attrs_field
|
|
7
6
|
|
|
8
7
|
from ..types import UNSET, Unset
|
|
9
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
|
+
|
|
10
16
|
if TYPE_CHECKING:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
from ..models.record_attachment_dto import RecordAttachmentDto
|
|
18
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
19
|
+
from ..models.record_relation_dto import RecordRelationDto
|
|
20
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
21
|
+
from ..models.json_node import JsonNode
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
16
25
|
|
|
17
26
|
|
|
18
27
|
T = TypeVar("T", bound="RecordDto")
|
|
19
28
|
|
|
20
29
|
|
|
30
|
+
|
|
21
31
|
@_attrs_define
|
|
22
32
|
class RecordDto:
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
"""
|
|
34
|
+
Attributes:
|
|
35
|
+
id (Union[Unset, str]):
|
|
36
|
+
title (Union[Unset, str]):
|
|
37
|
+
description (Union[None, Unset, str]):
|
|
38
|
+
created_at (Union[Unset, datetime.datetime]):
|
|
39
|
+
updated_at (Union[Unset, datetime.datetime]):
|
|
40
|
+
event_date (Union[None, Unset, datetime.datetime]):
|
|
41
|
+
created_by (Union[Unset, str]):
|
|
42
|
+
updated_by (Union[None, Unset, str]):
|
|
43
|
+
searchable (Union[Unset, bool]):
|
|
44
|
+
ttl (Union[None, Unset, int]):
|
|
45
|
+
archived (Union[Unset, bool]):
|
|
46
|
+
schema (Union['JsonNode', None, Unset]):
|
|
47
|
+
content (Union['JsonNode', None, Unset]):
|
|
48
|
+
attachments (Union[Unset, list['RecordAttachmentDto']]):
|
|
49
|
+
authorization (Union[Unset, RecordAuthorizationDto]):
|
|
50
|
+
relations (Union[Unset, list['RecordRelationDto']]):
|
|
51
|
+
external_uri (Union[None, Unset, str]):
|
|
52
|
+
labels (Union[Unset, list[str]]):
|
|
53
|
+
tags (Union[Unset, RecordDtoTags]):
|
|
54
|
+
"""
|
|
45
55
|
|
|
46
56
|
id: Union[Unset, str] = UNSET
|
|
47
57
|
title: Union[Unset, str] = UNSET
|
|
@@ -54,18 +64,25 @@ class RecordDto:
|
|
|
54
64
|
searchable: Union[Unset, bool] = UNSET
|
|
55
65
|
ttl: Union[None, Unset, int] = UNSET
|
|
56
66
|
archived: Union[Unset, bool] = UNSET
|
|
57
|
-
schema: Union[
|
|
58
|
-
content: Union[
|
|
59
|
-
attachments: Union[Unset, list[
|
|
60
|
-
authorization: Union[Unset,
|
|
61
|
-
relations: Union[Unset, list[
|
|
67
|
+
schema: Union['JsonNode', None, Unset] = UNSET
|
|
68
|
+
content: Union['JsonNode', None, Unset] = UNSET
|
|
69
|
+
attachments: Union[Unset, list['RecordAttachmentDto']] = UNSET
|
|
70
|
+
authorization: Union[Unset, 'RecordAuthorizationDto'] = UNSET
|
|
71
|
+
relations: Union[Unset, list['RecordRelationDto']] = UNSET
|
|
62
72
|
external_uri: Union[None, Unset, str] = UNSET
|
|
63
73
|
labels: Union[Unset, list[str]] = UNSET
|
|
64
|
-
tags: Union[Unset,
|
|
74
|
+
tags: Union[Unset, 'RecordDtoTags'] = UNSET
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
65
79
|
|
|
66
80
|
def to_dict(self) -> dict[str, Any]:
|
|
81
|
+
from ..models.record_attachment_dto import RecordAttachmentDto
|
|
82
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
83
|
+
from ..models.record_relation_dto import RecordRelationDto
|
|
84
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
67
85
|
from ..models.json_node import JsonNode
|
|
68
|
-
|
|
69
86
|
id = self.id
|
|
70
87
|
|
|
71
88
|
title = self.title
|
|
@@ -133,6 +150,8 @@ class RecordDto:
|
|
|
133
150
|
attachments_item = attachments_item_data.to_dict()
|
|
134
151
|
attachments.append(attachments_item)
|
|
135
152
|
|
|
153
|
+
|
|
154
|
+
|
|
136
155
|
authorization: Union[Unset, dict[str, Any]] = UNSET
|
|
137
156
|
if not isinstance(self.authorization, Unset):
|
|
138
157
|
authorization = self.authorization.to_dict()
|
|
@@ -144,6 +163,8 @@ class RecordDto:
|
|
|
144
163
|
relations_item = relations_item_data.to_dict()
|
|
145
164
|
relations.append(relations_item)
|
|
146
165
|
|
|
166
|
+
|
|
167
|
+
|
|
147
168
|
external_uri: Union[None, Unset, str]
|
|
148
169
|
if isinstance(self.external_uri, Unset):
|
|
149
170
|
external_uri = UNSET
|
|
@@ -154,13 +175,17 @@ class RecordDto:
|
|
|
154
175
|
if not isinstance(self.labels, Unset):
|
|
155
176
|
labels = self.labels
|
|
156
177
|
|
|
178
|
+
|
|
179
|
+
|
|
157
180
|
tags: Union[Unset, dict[str, Any]] = UNSET
|
|
158
181
|
if not isinstance(self.tags, Unset):
|
|
159
182
|
tags = self.tags.to_dict()
|
|
160
183
|
|
|
184
|
+
|
|
161
185
|
field_dict: dict[str, Any] = {}
|
|
162
186
|
|
|
163
|
-
field_dict.update({
|
|
187
|
+
field_dict.update({
|
|
188
|
+
})
|
|
164
189
|
if id is not UNSET:
|
|
165
190
|
field_dict["id"] = id
|
|
166
191
|
if title is not UNSET:
|
|
@@ -202,14 +227,15 @@ class RecordDto:
|
|
|
202
227
|
|
|
203
228
|
return field_dict
|
|
204
229
|
|
|
230
|
+
|
|
231
|
+
|
|
205
232
|
@classmethod
|
|
206
233
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
207
|
-
from ..models.json_node import JsonNode
|
|
208
234
|
from ..models.record_attachment_dto import RecordAttachmentDto
|
|
209
235
|
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
210
|
-
from ..models.record_dto_tags import RecordDtoTags
|
|
211
236
|
from ..models.record_relation_dto import RecordRelationDto
|
|
212
|
-
|
|
237
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
238
|
+
from ..models.json_node import JsonNode
|
|
213
239
|
d = dict(src_dict)
|
|
214
240
|
id = d.pop("id", UNSET)
|
|
215
241
|
|
|
@@ -224,20 +250,27 @@ class RecordDto:
|
|
|
224
250
|
|
|
225
251
|
description = _parse_description(d.pop("description", UNSET))
|
|
226
252
|
|
|
253
|
+
|
|
227
254
|
_created_at = d.pop("createdAt", UNSET)
|
|
228
255
|
created_at: Union[Unset, datetime.datetime]
|
|
229
|
-
if isinstance(_created_at,
|
|
256
|
+
if isinstance(_created_at, Unset):
|
|
230
257
|
created_at = UNSET
|
|
231
258
|
else:
|
|
232
259
|
created_at = isoparse(_created_at)
|
|
233
260
|
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
234
264
|
_updated_at = d.pop("updatedAt", UNSET)
|
|
235
265
|
updated_at: Union[Unset, datetime.datetime]
|
|
236
|
-
if isinstance(_updated_at,
|
|
266
|
+
if isinstance(_updated_at, Unset):
|
|
237
267
|
updated_at = UNSET
|
|
238
268
|
else:
|
|
239
269
|
updated_at = isoparse(_updated_at)
|
|
240
270
|
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
241
274
|
def _parse_event_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
242
275
|
if data is None:
|
|
243
276
|
return data
|
|
@@ -248,13 +281,16 @@ class RecordDto:
|
|
|
248
281
|
raise TypeError()
|
|
249
282
|
event_date_type_0 = isoparse(data)
|
|
250
283
|
|
|
284
|
+
|
|
285
|
+
|
|
251
286
|
return event_date_type_0
|
|
252
|
-
except:
|
|
287
|
+
except: # noqa: E722
|
|
253
288
|
pass
|
|
254
289
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
255
290
|
|
|
256
291
|
event_date = _parse_event_date(d.pop("eventDate", UNSET))
|
|
257
292
|
|
|
293
|
+
|
|
258
294
|
created_by = d.pop("createdBy", UNSET)
|
|
259
295
|
|
|
260
296
|
def _parse_updated_by(data: object) -> Union[None, Unset, str]:
|
|
@@ -266,6 +302,7 @@ class RecordDto:
|
|
|
266
302
|
|
|
267
303
|
updated_by = _parse_updated_by(d.pop("updatedBy", UNSET))
|
|
268
304
|
|
|
305
|
+
|
|
269
306
|
searchable = d.pop("searchable", UNSET)
|
|
270
307
|
|
|
271
308
|
def _parse_ttl(data: object) -> Union[None, Unset, int]:
|
|
@@ -277,9 +314,10 @@ class RecordDto:
|
|
|
277
314
|
|
|
278
315
|
ttl = _parse_ttl(d.pop("ttl", UNSET))
|
|
279
316
|
|
|
317
|
+
|
|
280
318
|
archived = d.pop("archived", UNSET)
|
|
281
319
|
|
|
282
|
-
def _parse_schema(data: object) -> Union[
|
|
320
|
+
def _parse_schema(data: object) -> Union['JsonNode', None, Unset]:
|
|
283
321
|
if data is None:
|
|
284
322
|
return data
|
|
285
323
|
if isinstance(data, Unset):
|
|
@@ -289,14 +327,17 @@ class RecordDto:
|
|
|
289
327
|
raise TypeError()
|
|
290
328
|
schema_type_0 = JsonNode.from_dict(data)
|
|
291
329
|
|
|
330
|
+
|
|
331
|
+
|
|
292
332
|
return schema_type_0
|
|
293
|
-
except:
|
|
333
|
+
except: # noqa: E722
|
|
294
334
|
pass
|
|
295
|
-
return cast(Union[
|
|
335
|
+
return cast(Union['JsonNode', None, Unset], data)
|
|
296
336
|
|
|
297
337
|
schema = _parse_schema(d.pop("schema", UNSET))
|
|
298
338
|
|
|
299
|
-
|
|
339
|
+
|
|
340
|
+
def _parse_content(data: object) -> Union['JsonNode', None, Unset]:
|
|
300
341
|
if data is None:
|
|
301
342
|
return data
|
|
302
343
|
if isinstance(data, Unset):
|
|
@@ -306,34 +347,46 @@ class RecordDto:
|
|
|
306
347
|
raise TypeError()
|
|
307
348
|
content_type_0 = JsonNode.from_dict(data)
|
|
308
349
|
|
|
350
|
+
|
|
351
|
+
|
|
309
352
|
return content_type_0
|
|
310
|
-
except:
|
|
353
|
+
except: # noqa: E722
|
|
311
354
|
pass
|
|
312
|
-
return cast(Union[
|
|
355
|
+
return cast(Union['JsonNode', None, Unset], data)
|
|
313
356
|
|
|
314
357
|
content = _parse_content(d.pop("content", UNSET))
|
|
315
358
|
|
|
359
|
+
|
|
316
360
|
attachments = []
|
|
317
361
|
_attachments = d.pop("attachments", UNSET)
|
|
318
|
-
for attachments_item_data in _attachments or []:
|
|
362
|
+
for attachments_item_data in (_attachments or []):
|
|
319
363
|
attachments_item = RecordAttachmentDto.from_dict(attachments_item_data)
|
|
320
364
|
|
|
365
|
+
|
|
366
|
+
|
|
321
367
|
attachments.append(attachments_item)
|
|
322
368
|
|
|
369
|
+
|
|
323
370
|
_authorization = d.pop("authorization", UNSET)
|
|
324
371
|
authorization: Union[Unset, RecordAuthorizationDto]
|
|
325
|
-
if isinstance(_authorization,
|
|
372
|
+
if isinstance(_authorization, Unset):
|
|
326
373
|
authorization = UNSET
|
|
327
374
|
else:
|
|
328
375
|
authorization = RecordAuthorizationDto.from_dict(_authorization)
|
|
329
376
|
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
330
380
|
relations = []
|
|
331
381
|
_relations = d.pop("relations", UNSET)
|
|
332
|
-
for relations_item_data in _relations or []:
|
|
382
|
+
for relations_item_data in (_relations or []):
|
|
333
383
|
relations_item = RecordRelationDto.from_dict(relations_item_data)
|
|
334
384
|
|
|
385
|
+
|
|
386
|
+
|
|
335
387
|
relations.append(relations_item)
|
|
336
388
|
|
|
389
|
+
|
|
337
390
|
def _parse_external_uri(data: object) -> Union[None, Unset, str]:
|
|
338
391
|
if data is None:
|
|
339
392
|
return data
|
|
@@ -343,15 +396,20 @@ class RecordDto:
|
|
|
343
396
|
|
|
344
397
|
external_uri = _parse_external_uri(d.pop("externalUri", UNSET))
|
|
345
398
|
|
|
399
|
+
|
|
346
400
|
labels = cast(list[str], d.pop("labels", UNSET))
|
|
347
401
|
|
|
402
|
+
|
|
348
403
|
_tags = d.pop("tags", UNSET)
|
|
349
404
|
tags: Union[Unset, RecordDtoTags]
|
|
350
|
-
if isinstance(_tags,
|
|
405
|
+
if isinstance(_tags, Unset):
|
|
351
406
|
tags = UNSET
|
|
352
407
|
else:
|
|
353
408
|
tags = RecordDtoTags.from_dict(_tags)
|
|
354
409
|
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
355
413
|
record_dto = cls(
|
|
356
414
|
id=id,
|
|
357
415
|
title=title,
|
|
@@ -375,3 +433,4 @@ class RecordDto:
|
|
|
375
433
|
)
|
|
376
434
|
|
|
377
435
|
return record_dto
|
|
436
|
+
|
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
7
15
|
T = TypeVar("T", bound="RecordDtoTags")
|
|
8
16
|
|
|
9
17
|
|
|
18
|
+
|
|
10
19
|
@_attrs_define
|
|
11
20
|
class RecordDtoTags:
|
|
12
|
-
"""
|
|
21
|
+
"""
|
|
22
|
+
"""
|
|
13
23
|
|
|
14
24
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
25
|
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
16
30
|
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
|
|
17
32
|
field_dict: dict[str, Any] = {}
|
|
18
33
|
field_dict.update(self.additional_properties)
|
|
19
34
|
|
|
20
35
|
return field_dict
|
|
21
36
|
|
|
37
|
+
|
|
38
|
+
|
|
22
39
|
@classmethod
|
|
23
40
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
41
|
d = dict(src_dict)
|
|
25
|
-
record_dto_tags = cls(
|
|
42
|
+
record_dto_tags = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
26
45
|
|
|
27
46
|
record_dto_tags.additional_properties = d
|
|
28
47
|
return record_dto_tags
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
from collections.abc import Mapping
|
|
3
|
-
from typing import Any, TypeVar,
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
4
3
|
|
|
5
4
|
from attrs import define as _attrs_define
|
|
6
|
-
from
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
7
8
|
|
|
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
|
+
|
|
9
20
|
|
|
10
21
|
T = TypeVar("T", bound="RecordRelation")
|
|
11
22
|
|
|
12
23
|
|
|
24
|
+
|
|
13
25
|
@_attrs_define
|
|
14
26
|
class RecordRelation:
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
id (Union[Unset, str]):
|
|
30
|
+
relationship (Union[Unset, str]):
|
|
31
|
+
since (Union[None, Unset, datetime.datetime]):
|
|
32
|
+
"""
|
|
21
33
|
|
|
22
34
|
id: Union[Unset, str] = UNSET
|
|
23
35
|
relationship: Union[Unset, str] = UNSET
|
|
24
36
|
since: Union[None, Unset, datetime.datetime] = UNSET
|
|
25
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
def to_dict(self) -> dict[str, Any]:
|
|
27
43
|
id = self.id
|
|
28
44
|
|
|
@@ -36,9 +52,11 @@ class RecordRelation:
|
|
|
36
52
|
else:
|
|
37
53
|
since = self.since
|
|
38
54
|
|
|
55
|
+
|
|
39
56
|
field_dict: dict[str, Any] = {}
|
|
40
57
|
|
|
41
|
-
field_dict.update({
|
|
58
|
+
field_dict.update({
|
|
59
|
+
})
|
|
42
60
|
if id is not UNSET:
|
|
43
61
|
field_dict["id"] = id
|
|
44
62
|
if relationship is not UNSET:
|
|
@@ -48,6 +66,8 @@ class RecordRelation:
|
|
|
48
66
|
|
|
49
67
|
return field_dict
|
|
50
68
|
|
|
69
|
+
|
|
70
|
+
|
|
51
71
|
@classmethod
|
|
52
72
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
73
|
d = dict(src_dict)
|
|
@@ -65,13 +85,16 @@ class RecordRelation:
|
|
|
65
85
|
raise TypeError()
|
|
66
86
|
since_type_0 = isoparse(data)
|
|
67
87
|
|
|
88
|
+
|
|
89
|
+
|
|
68
90
|
return since_type_0
|
|
69
|
-
except:
|
|
91
|
+
except: # noqa: E722
|
|
70
92
|
pass
|
|
71
93
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
72
94
|
|
|
73
95
|
since = _parse_since(d.pop("since", UNSET))
|
|
74
96
|
|
|
97
|
+
|
|
75
98
|
record_relation = cls(
|
|
76
99
|
id=id,
|
|
77
100
|
relationship=relationship,
|
|
@@ -79,3 +102,4 @@ class RecordRelation:
|
|
|
79
102
|
)
|
|
80
103
|
|
|
81
104
|
return record_relation
|
|
105
|
+
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
from collections.abc import Mapping
|
|
3
|
-
from typing import Any, TypeVar,
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
4
3
|
|
|
5
4
|
from attrs import define as _attrs_define
|
|
6
|
-
from
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
7
8
|
|
|
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
|
+
|
|
9
20
|
|
|
10
21
|
T = TypeVar("T", bound="RecordRelationDto")
|
|
11
22
|
|
|
12
23
|
|
|
24
|
+
|
|
13
25
|
@_attrs_define
|
|
14
26
|
class RecordRelationDto:
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
id (Union[Unset, str]):
|
|
30
|
+
relationship (Union[Unset, str]):
|
|
31
|
+
since (Union[None, Unset, datetime.datetime]):
|
|
32
|
+
"""
|
|
21
33
|
|
|
22
34
|
id: Union[Unset, str] = UNSET
|
|
23
35
|
relationship: Union[Unset, str] = UNSET
|
|
24
36
|
since: Union[None, Unset, datetime.datetime] = UNSET
|
|
25
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
def to_dict(self) -> dict[str, Any]:
|
|
27
43
|
id = self.id
|
|
28
44
|
|
|
@@ -36,9 +52,11 @@ class RecordRelationDto:
|
|
|
36
52
|
else:
|
|
37
53
|
since = self.since
|
|
38
54
|
|
|
55
|
+
|
|
39
56
|
field_dict: dict[str, Any] = {}
|
|
40
57
|
|
|
41
|
-
field_dict.update({
|
|
58
|
+
field_dict.update({
|
|
59
|
+
})
|
|
42
60
|
if id is not UNSET:
|
|
43
61
|
field_dict["id"] = id
|
|
44
62
|
if relationship is not UNSET:
|
|
@@ -48,6 +66,8 @@ class RecordRelationDto:
|
|
|
48
66
|
|
|
49
67
|
return field_dict
|
|
50
68
|
|
|
69
|
+
|
|
70
|
+
|
|
51
71
|
@classmethod
|
|
52
72
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
73
|
d = dict(src_dict)
|
|
@@ -65,13 +85,16 @@ class RecordRelationDto:
|
|
|
65
85
|
raise TypeError()
|
|
66
86
|
since_type_0 = isoparse(data)
|
|
67
87
|
|
|
88
|
+
|
|
89
|
+
|
|
68
90
|
return since_type_0
|
|
69
|
-
except:
|
|
91
|
+
except: # noqa: E722
|
|
70
92
|
pass
|
|
71
93
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
72
94
|
|
|
73
95
|
since = _parse_since(d.pop("since", UNSET))
|
|
74
96
|
|
|
97
|
+
|
|
75
98
|
record_relation_dto = cls(
|
|
76
99
|
id=id,
|
|
77
100
|
relationship=relationship,
|
|
@@ -79,3 +102,4 @@ class RecordRelationDto:
|
|
|
79
102
|
)
|
|
80
103
|
|
|
81
104
|
return record_relation_dto
|
|
105
|
+
|