minikai 0.1.2__py3-none-any.whl → 0.1.4__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 +5 -5
- 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 +76 -81
- 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/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 +153 -94
- 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 +104 -96
- 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 +40 -13
- 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 +76 -82
- 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.2.dist-info → minikai-0.1.4.dist-info}/METADATA +1 -1
- minikai-0.1.4.dist-info/RECORD +89 -0
- minikai/models/json_node.py +0 -119
- minikai/models/json_node_options.py +0 -42
- minikai-0.1.2.dist-info/RECORD +0 -88
- {minikai-0.1.2.dist-info → minikai-0.1.4.dist-info}/WHEEL +0 -0
minikai/models/record_dto.py
CHANGED
|
@@ -1,47 +1,56 @@
|
|
|
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_relation_dto import RecordRelationDto
|
|
19
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
20
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
|
|
17
25
|
|
|
18
26
|
T = TypeVar("T", bound="RecordDto")
|
|
19
27
|
|
|
20
28
|
|
|
29
|
+
|
|
21
30
|
@_attrs_define
|
|
22
31
|
class RecordDto:
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
"""
|
|
33
|
+
Attributes:
|
|
34
|
+
id (Union[Unset, str]):
|
|
35
|
+
title (Union[Unset, str]):
|
|
36
|
+
description (Union[None, Unset, str]):
|
|
37
|
+
created_at (Union[Unset, datetime.datetime]):
|
|
38
|
+
updated_at (Union[Unset, datetime.datetime]):
|
|
39
|
+
event_date (Union[None, Unset, datetime.datetime]):
|
|
40
|
+
created_by (Union[Unset, str]):
|
|
41
|
+
updated_by (Union[None, Unset, str]):
|
|
42
|
+
searchable (Union[Unset, bool]):
|
|
43
|
+
ttl (Union[None, Unset, int]):
|
|
44
|
+
archived (Union[Unset, bool]):
|
|
45
|
+
schema (Union[Unset, Any]):
|
|
46
|
+
content (Union[Unset, Any]):
|
|
47
|
+
attachments (Union[Unset, list['RecordAttachmentDto']]):
|
|
48
|
+
authorization (Union[Unset, RecordAuthorizationDto]):
|
|
49
|
+
relations (Union[Unset, list['RecordRelationDto']]):
|
|
50
|
+
external_uri (Union[None, Unset, str]):
|
|
51
|
+
labels (Union[Unset, list[str]]):
|
|
52
|
+
tags (Union[Unset, RecordDtoTags]):
|
|
53
|
+
"""
|
|
45
54
|
|
|
46
55
|
id: Union[Unset, str] = UNSET
|
|
47
56
|
title: Union[Unset, str] = UNSET
|
|
@@ -54,18 +63,24 @@ class RecordDto:
|
|
|
54
63
|
searchable: Union[Unset, bool] = UNSET
|
|
55
64
|
ttl: Union[None, Unset, int] = UNSET
|
|
56
65
|
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[
|
|
66
|
+
schema: Union[Unset, Any] = UNSET
|
|
67
|
+
content: Union[Unset, Any] = UNSET
|
|
68
|
+
attachments: Union[Unset, list['RecordAttachmentDto']] = UNSET
|
|
69
|
+
authorization: Union[Unset, 'RecordAuthorizationDto'] = UNSET
|
|
70
|
+
relations: Union[Unset, list['RecordRelationDto']] = UNSET
|
|
62
71
|
external_uri: Union[None, Unset, str] = UNSET
|
|
63
72
|
labels: Union[Unset, list[str]] = UNSET
|
|
64
|
-
tags: Union[Unset,
|
|
73
|
+
tags: Union[Unset, 'RecordDtoTags'] = UNSET
|
|
74
|
+
|
|
75
|
+
|
|
65
76
|
|
|
66
|
-
def to_dict(self) -> dict[str, Any]:
|
|
67
|
-
from ..models.json_node import JsonNode
|
|
68
77
|
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict[str, Any]:
|
|
80
|
+
from ..models.record_attachment_dto import RecordAttachmentDto
|
|
81
|
+
from ..models.record_relation_dto import RecordRelationDto
|
|
82
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
83
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
69
84
|
id = self.id
|
|
70
85
|
|
|
71
86
|
title = self.title
|
|
@@ -110,21 +125,9 @@ class RecordDto:
|
|
|
110
125
|
|
|
111
126
|
archived = self.archived
|
|
112
127
|
|
|
113
|
-
schema
|
|
114
|
-
if isinstance(self.schema, Unset):
|
|
115
|
-
schema = UNSET
|
|
116
|
-
elif isinstance(self.schema, JsonNode):
|
|
117
|
-
schema = self.schema.to_dict()
|
|
118
|
-
else:
|
|
119
|
-
schema = self.schema
|
|
128
|
+
schema = self.schema
|
|
120
129
|
|
|
121
|
-
content
|
|
122
|
-
if isinstance(self.content, Unset):
|
|
123
|
-
content = UNSET
|
|
124
|
-
elif isinstance(self.content, JsonNode):
|
|
125
|
-
content = self.content.to_dict()
|
|
126
|
-
else:
|
|
127
|
-
content = self.content
|
|
130
|
+
content = self.content
|
|
128
131
|
|
|
129
132
|
attachments: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
130
133
|
if not isinstance(self.attachments, Unset):
|
|
@@ -133,6 +136,8 @@ class RecordDto:
|
|
|
133
136
|
attachments_item = attachments_item_data.to_dict()
|
|
134
137
|
attachments.append(attachments_item)
|
|
135
138
|
|
|
139
|
+
|
|
140
|
+
|
|
136
141
|
authorization: Union[Unset, dict[str, Any]] = UNSET
|
|
137
142
|
if not isinstance(self.authorization, Unset):
|
|
138
143
|
authorization = self.authorization.to_dict()
|
|
@@ -144,6 +149,8 @@ class RecordDto:
|
|
|
144
149
|
relations_item = relations_item_data.to_dict()
|
|
145
150
|
relations.append(relations_item)
|
|
146
151
|
|
|
152
|
+
|
|
153
|
+
|
|
147
154
|
external_uri: Union[None, Unset, str]
|
|
148
155
|
if isinstance(self.external_uri, Unset):
|
|
149
156
|
external_uri = UNSET
|
|
@@ -154,13 +161,17 @@ class RecordDto:
|
|
|
154
161
|
if not isinstance(self.labels, Unset):
|
|
155
162
|
labels = self.labels
|
|
156
163
|
|
|
164
|
+
|
|
165
|
+
|
|
157
166
|
tags: Union[Unset, dict[str, Any]] = UNSET
|
|
158
167
|
if not isinstance(self.tags, Unset):
|
|
159
168
|
tags = self.tags.to_dict()
|
|
160
169
|
|
|
170
|
+
|
|
161
171
|
field_dict: dict[str, Any] = {}
|
|
162
172
|
|
|
163
|
-
field_dict.update({
|
|
173
|
+
field_dict.update({
|
|
174
|
+
})
|
|
164
175
|
if id is not UNSET:
|
|
165
176
|
field_dict["id"] = id
|
|
166
177
|
if title is not UNSET:
|
|
@@ -202,14 +213,14 @@ class RecordDto:
|
|
|
202
213
|
|
|
203
214
|
return field_dict
|
|
204
215
|
|
|
216
|
+
|
|
217
|
+
|
|
205
218
|
@classmethod
|
|
206
219
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
207
|
-
from ..models.json_node import JsonNode
|
|
208
220
|
from ..models.record_attachment_dto import RecordAttachmentDto
|
|
209
|
-
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
210
|
-
from ..models.record_dto_tags import RecordDtoTags
|
|
211
221
|
from ..models.record_relation_dto import RecordRelationDto
|
|
212
|
-
|
|
222
|
+
from ..models.record_dto_tags import RecordDtoTags
|
|
223
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
213
224
|
d = dict(src_dict)
|
|
214
225
|
id = d.pop("id", UNSET)
|
|
215
226
|
|
|
@@ -224,20 +235,27 @@ class RecordDto:
|
|
|
224
235
|
|
|
225
236
|
description = _parse_description(d.pop("description", UNSET))
|
|
226
237
|
|
|
238
|
+
|
|
227
239
|
_created_at = d.pop("createdAt", UNSET)
|
|
228
240
|
created_at: Union[Unset, datetime.datetime]
|
|
229
|
-
if isinstance(_created_at,
|
|
241
|
+
if isinstance(_created_at, Unset):
|
|
230
242
|
created_at = UNSET
|
|
231
243
|
else:
|
|
232
244
|
created_at = isoparse(_created_at)
|
|
233
245
|
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
234
249
|
_updated_at = d.pop("updatedAt", UNSET)
|
|
235
250
|
updated_at: Union[Unset, datetime.datetime]
|
|
236
|
-
if isinstance(_updated_at,
|
|
251
|
+
if isinstance(_updated_at, Unset):
|
|
237
252
|
updated_at = UNSET
|
|
238
253
|
else:
|
|
239
254
|
updated_at = isoparse(_updated_at)
|
|
240
255
|
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
241
259
|
def _parse_event_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
242
260
|
if data is None:
|
|
243
261
|
return data
|
|
@@ -248,13 +266,16 @@ class RecordDto:
|
|
|
248
266
|
raise TypeError()
|
|
249
267
|
event_date_type_0 = isoparse(data)
|
|
250
268
|
|
|
269
|
+
|
|
270
|
+
|
|
251
271
|
return event_date_type_0
|
|
252
|
-
except:
|
|
272
|
+
except: # noqa: E722
|
|
253
273
|
pass
|
|
254
274
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
255
275
|
|
|
256
276
|
event_date = _parse_event_date(d.pop("eventDate", UNSET))
|
|
257
277
|
|
|
278
|
+
|
|
258
279
|
created_by = d.pop("createdBy", UNSET)
|
|
259
280
|
|
|
260
281
|
def _parse_updated_by(data: object) -> Union[None, Unset, str]:
|
|
@@ -266,6 +287,7 @@ class RecordDto:
|
|
|
266
287
|
|
|
267
288
|
updated_by = _parse_updated_by(d.pop("updatedBy", UNSET))
|
|
268
289
|
|
|
290
|
+
|
|
269
291
|
searchable = d.pop("searchable", UNSET)
|
|
270
292
|
|
|
271
293
|
def _parse_ttl(data: object) -> Union[None, Unset, int]:
|
|
@@ -277,63 +299,43 @@ class RecordDto:
|
|
|
277
299
|
|
|
278
300
|
ttl = _parse_ttl(d.pop("ttl", UNSET))
|
|
279
301
|
|
|
280
|
-
archived = d.pop("archived", UNSET)
|
|
281
|
-
|
|
282
|
-
def _parse_schema(data: object) -> Union["JsonNode", None, Unset]:
|
|
283
|
-
if data is None:
|
|
284
|
-
return data
|
|
285
|
-
if isinstance(data, Unset):
|
|
286
|
-
return data
|
|
287
|
-
try:
|
|
288
|
-
if not isinstance(data, dict):
|
|
289
|
-
raise TypeError()
|
|
290
|
-
schema_type_0 = JsonNode.from_dict(data)
|
|
291
|
-
|
|
292
|
-
return schema_type_0
|
|
293
|
-
except: # noqa: E722
|
|
294
|
-
pass
|
|
295
|
-
return cast(Union["JsonNode", None, Unset], data)
|
|
296
|
-
|
|
297
|
-
schema = _parse_schema(d.pop("schema", UNSET))
|
|
298
302
|
|
|
299
|
-
|
|
300
|
-
if data is None:
|
|
301
|
-
return data
|
|
302
|
-
if isinstance(data, Unset):
|
|
303
|
-
return data
|
|
304
|
-
try:
|
|
305
|
-
if not isinstance(data, dict):
|
|
306
|
-
raise TypeError()
|
|
307
|
-
content_type_0 = JsonNode.from_dict(data)
|
|
303
|
+
archived = d.pop("archived", UNSET)
|
|
308
304
|
|
|
309
|
-
|
|
310
|
-
except: # noqa: E722
|
|
311
|
-
pass
|
|
312
|
-
return cast(Union["JsonNode", None, Unset], data)
|
|
305
|
+
schema = d.pop("schema", UNSET)
|
|
313
306
|
|
|
314
|
-
content =
|
|
307
|
+
content = d.pop("content", UNSET)
|
|
315
308
|
|
|
316
309
|
attachments = []
|
|
317
310
|
_attachments = d.pop("attachments", UNSET)
|
|
318
|
-
for attachments_item_data in _attachments or []:
|
|
311
|
+
for attachments_item_data in (_attachments or []):
|
|
319
312
|
attachments_item = RecordAttachmentDto.from_dict(attachments_item_data)
|
|
320
313
|
|
|
314
|
+
|
|
315
|
+
|
|
321
316
|
attachments.append(attachments_item)
|
|
322
317
|
|
|
318
|
+
|
|
323
319
|
_authorization = d.pop("authorization", UNSET)
|
|
324
320
|
authorization: Union[Unset, RecordAuthorizationDto]
|
|
325
|
-
if isinstance(_authorization,
|
|
321
|
+
if isinstance(_authorization, Unset):
|
|
326
322
|
authorization = UNSET
|
|
327
323
|
else:
|
|
328
324
|
authorization = RecordAuthorizationDto.from_dict(_authorization)
|
|
329
325
|
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
330
329
|
relations = []
|
|
331
330
|
_relations = d.pop("relations", UNSET)
|
|
332
|
-
for relations_item_data in _relations or []:
|
|
331
|
+
for relations_item_data in (_relations or []):
|
|
333
332
|
relations_item = RecordRelationDto.from_dict(relations_item_data)
|
|
334
333
|
|
|
334
|
+
|
|
335
|
+
|
|
335
336
|
relations.append(relations_item)
|
|
336
337
|
|
|
338
|
+
|
|
337
339
|
def _parse_external_uri(data: object) -> Union[None, Unset, str]:
|
|
338
340
|
if data is None:
|
|
339
341
|
return data
|
|
@@ -343,15 +345,20 @@ class RecordDto:
|
|
|
343
345
|
|
|
344
346
|
external_uri = _parse_external_uri(d.pop("externalUri", UNSET))
|
|
345
347
|
|
|
348
|
+
|
|
346
349
|
labels = cast(list[str], d.pop("labels", UNSET))
|
|
347
350
|
|
|
351
|
+
|
|
348
352
|
_tags = d.pop("tags", UNSET)
|
|
349
353
|
tags: Union[Unset, RecordDtoTags]
|
|
350
|
-
if isinstance(_tags,
|
|
354
|
+
if isinstance(_tags, Unset):
|
|
351
355
|
tags = UNSET
|
|
352
356
|
else:
|
|
353
357
|
tags = RecordDtoTags.from_dict(_tags)
|
|
354
358
|
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
355
362
|
record_dto = cls(
|
|
356
363
|
id=id,
|
|
357
364
|
title=title,
|
|
@@ -375,3 +382,4 @@ class RecordDto:
|
|
|
375
382
|
)
|
|
376
383
|
|
|
377
384
|
return record_dto
|
|
385
|
+
|
|
@@ -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
|
+
|