minikai 0.1.2__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 +5 -1
- 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 +134 -55
- 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 +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 +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.2.dist-info → minikai-0.1.3.dist-info}/METADATA +1 -1
- minikai-0.1.3.dist-info/RECORD +91 -0
- minikai-0.1.2.dist-info/RECORD +0 -88
- {minikai-0.1.2.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
minikai/models/group_dto.py
CHANGED
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
5
6
|
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
8
14
|
if TYPE_CHECKING:
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
from ..models.user_dto import UserDto
|
|
16
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
|
|
12
21
|
|
|
13
22
|
T = TypeVar("T", bound="GroupDto")
|
|
14
23
|
|
|
15
24
|
|
|
25
|
+
|
|
16
26
|
@_attrs_define
|
|
17
27
|
class GroupDto:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (Union[Unset, str]):
|
|
31
|
+
name (Union[Unset, str]):
|
|
32
|
+
description (Union[None, Unset, str]):
|
|
33
|
+
workspace_id (Union[Unset, str]):
|
|
34
|
+
users (Union[Unset, list['UserDto']]):
|
|
35
|
+
minis (Union[Unset, list['SlimMiniDto']]):
|
|
36
|
+
"""
|
|
27
37
|
|
|
28
38
|
id: Union[Unset, str] = UNSET
|
|
29
39
|
name: Union[Unset, str] = UNSET
|
|
30
40
|
description: Union[None, Unset, str] = UNSET
|
|
31
41
|
workspace_id: Union[Unset, str] = UNSET
|
|
32
|
-
users: Union[Unset, list[
|
|
33
|
-
minis: Union[Unset, list[
|
|
42
|
+
users: Union[Unset, list['UserDto']] = UNSET
|
|
43
|
+
minis: Union[Unset, list['SlimMiniDto']] = UNSET
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
34
48
|
|
|
35
49
|
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.user_dto import UserDto
|
|
51
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
36
52
|
id = self.id
|
|
37
53
|
|
|
38
54
|
name = self.name
|
|
@@ -52,6 +68,8 @@ class GroupDto:
|
|
|
52
68
|
users_item = users_item_data.to_dict()
|
|
53
69
|
users.append(users_item)
|
|
54
70
|
|
|
71
|
+
|
|
72
|
+
|
|
55
73
|
minis: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
56
74
|
if not isinstance(self.minis, Unset):
|
|
57
75
|
minis = []
|
|
@@ -59,9 +77,13 @@ class GroupDto:
|
|
|
59
77
|
minis_item = minis_item_data.to_dict()
|
|
60
78
|
minis.append(minis_item)
|
|
61
79
|
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
62
83
|
field_dict: dict[str, Any] = {}
|
|
63
84
|
|
|
64
|
-
field_dict.update({
|
|
85
|
+
field_dict.update({
|
|
86
|
+
})
|
|
65
87
|
if id is not UNSET:
|
|
66
88
|
field_dict["id"] = id
|
|
67
89
|
if name is not UNSET:
|
|
@@ -77,11 +99,12 @@ class GroupDto:
|
|
|
77
99
|
|
|
78
100
|
return field_dict
|
|
79
101
|
|
|
102
|
+
|
|
103
|
+
|
|
80
104
|
@classmethod
|
|
81
105
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
-
from ..models.slim_mini_dto import SlimMiniDto
|
|
83
106
|
from ..models.user_dto import UserDto
|
|
84
|
-
|
|
107
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
85
108
|
d = dict(src_dict)
|
|
86
109
|
id = d.pop("id", UNSET)
|
|
87
110
|
|
|
@@ -96,22 +119,29 @@ class GroupDto:
|
|
|
96
119
|
|
|
97
120
|
description = _parse_description(d.pop("description", UNSET))
|
|
98
121
|
|
|
122
|
+
|
|
99
123
|
workspace_id = d.pop("workspaceId", UNSET)
|
|
100
124
|
|
|
101
125
|
users = []
|
|
102
126
|
_users = d.pop("users", UNSET)
|
|
103
|
-
for users_item_data in _users or []:
|
|
127
|
+
for users_item_data in (_users or []):
|
|
104
128
|
users_item = UserDto.from_dict(users_item_data)
|
|
105
129
|
|
|
130
|
+
|
|
131
|
+
|
|
106
132
|
users.append(users_item)
|
|
107
133
|
|
|
134
|
+
|
|
108
135
|
minis = []
|
|
109
136
|
_minis = d.pop("minis", UNSET)
|
|
110
|
-
for minis_item_data in _minis or []:
|
|
137
|
+
for minis_item_data in (_minis or []):
|
|
111
138
|
minis_item = SlimMiniDto.from_dict(minis_item_data)
|
|
112
139
|
|
|
140
|
+
|
|
141
|
+
|
|
113
142
|
minis.append(minis_item)
|
|
114
143
|
|
|
144
|
+
|
|
115
145
|
group_dto = cls(
|
|
116
146
|
id=id,
|
|
117
147
|
name=name,
|
|
@@ -122,3 +152,4 @@ class GroupDto:
|
|
|
122
152
|
)
|
|
123
153
|
|
|
124
154
|
return group_dto
|
|
155
|
+
|
|
@@ -1,39 +1,53 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import
|
|
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
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
9
14
|
if TYPE_CHECKING:
|
|
10
|
-
|
|
15
|
+
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
11
19
|
|
|
12
20
|
|
|
13
21
|
T = TypeVar("T", bound="HttpValidationProblemDetails")
|
|
14
22
|
|
|
15
23
|
|
|
24
|
+
|
|
16
25
|
@_attrs_define
|
|
17
26
|
class HttpValidationProblemDetails:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
type_ (Union[None, Unset, str]):
|
|
30
|
+
title (Union[None, Unset, str]):
|
|
31
|
+
status (Union[None, Unset, int]):
|
|
32
|
+
detail (Union[None, Unset, str]):
|
|
33
|
+
instance (Union[None, Unset, str]):
|
|
34
|
+
errors (Union[Unset, HttpValidationProblemDetailsErrors]):
|
|
35
|
+
"""
|
|
27
36
|
|
|
28
37
|
type_: Union[None, Unset, str] = UNSET
|
|
29
38
|
title: Union[None, Unset, str] = UNSET
|
|
30
39
|
status: Union[None, Unset, int] = UNSET
|
|
31
40
|
detail: Union[None, Unset, str] = UNSET
|
|
32
41
|
instance: Union[None, Unset, str] = UNSET
|
|
33
|
-
errors: Union[Unset,
|
|
42
|
+
errors: Union[Unset, 'HttpValidationProblemDetailsErrors'] = UNSET
|
|
34
43
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
44
|
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
36
49
|
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
37
51
|
type_: Union[None, Unset, str]
|
|
38
52
|
if isinstance(self.type_, Unset):
|
|
39
53
|
type_ = UNSET
|
|
@@ -68,9 +82,11 @@ class HttpValidationProblemDetails:
|
|
|
68
82
|
if not isinstance(self.errors, Unset):
|
|
69
83
|
errors = self.errors.to_dict()
|
|
70
84
|
|
|
85
|
+
|
|
71
86
|
field_dict: dict[str, Any] = {}
|
|
72
87
|
field_dict.update(self.additional_properties)
|
|
73
|
-
field_dict.update({
|
|
88
|
+
field_dict.update({
|
|
89
|
+
})
|
|
74
90
|
if type_ is not UNSET:
|
|
75
91
|
field_dict["type"] = type_
|
|
76
92
|
if title is not UNSET:
|
|
@@ -86,12 +102,12 @@ class HttpValidationProblemDetails:
|
|
|
86
102
|
|
|
87
103
|
return field_dict
|
|
88
104
|
|
|
105
|
+
|
|
106
|
+
|
|
89
107
|
@classmethod
|
|
90
108
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
91
109
|
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
92
|
-
|
|
93
110
|
d = dict(src_dict)
|
|
94
|
-
|
|
95
111
|
def _parse_type_(data: object) -> Union[None, Unset, str]:
|
|
96
112
|
if data is None:
|
|
97
113
|
return data
|
|
@@ -101,6 +117,7 @@ class HttpValidationProblemDetails:
|
|
|
101
117
|
|
|
102
118
|
type_ = _parse_type_(d.pop("type", UNSET))
|
|
103
119
|
|
|
120
|
+
|
|
104
121
|
def _parse_title(data: object) -> Union[None, Unset, str]:
|
|
105
122
|
if data is None:
|
|
106
123
|
return data
|
|
@@ -110,6 +127,7 @@ class HttpValidationProblemDetails:
|
|
|
110
127
|
|
|
111
128
|
title = _parse_title(d.pop("title", UNSET))
|
|
112
129
|
|
|
130
|
+
|
|
113
131
|
def _parse_status(data: object) -> Union[None, Unset, int]:
|
|
114
132
|
if data is None:
|
|
115
133
|
return data
|
|
@@ -119,6 +137,7 @@ class HttpValidationProblemDetails:
|
|
|
119
137
|
|
|
120
138
|
status = _parse_status(d.pop("status", UNSET))
|
|
121
139
|
|
|
140
|
+
|
|
122
141
|
def _parse_detail(data: object) -> Union[None, Unset, str]:
|
|
123
142
|
if data is None:
|
|
124
143
|
return data
|
|
@@ -128,6 +147,7 @@ class HttpValidationProblemDetails:
|
|
|
128
147
|
|
|
129
148
|
detail = _parse_detail(d.pop("detail", UNSET))
|
|
130
149
|
|
|
150
|
+
|
|
131
151
|
def _parse_instance(data: object) -> Union[None, Unset, str]:
|
|
132
152
|
if data is None:
|
|
133
153
|
return data
|
|
@@ -137,13 +157,17 @@ class HttpValidationProblemDetails:
|
|
|
137
157
|
|
|
138
158
|
instance = _parse_instance(d.pop("instance", UNSET))
|
|
139
159
|
|
|
160
|
+
|
|
140
161
|
_errors = d.pop("errors", UNSET)
|
|
141
162
|
errors: Union[Unset, HttpValidationProblemDetailsErrors]
|
|
142
|
-
if isinstance(_errors,
|
|
163
|
+
if isinstance(_errors, Unset):
|
|
143
164
|
errors = UNSET
|
|
144
165
|
else:
|
|
145
166
|
errors = HttpValidationProblemDetailsErrors.from_dict(_errors)
|
|
146
167
|
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
147
171
|
http_validation_problem_details = cls(
|
|
148
172
|
type_=type_,
|
|
149
173
|
title=title,
|
|
@@ -153,6 +177,7 @@ class HttpValidationProblemDetails:
|
|
|
153
177
|
errors=errors,
|
|
154
178
|
)
|
|
155
179
|
|
|
180
|
+
|
|
156
181
|
http_validation_problem_details.additional_properties = d
|
|
157
182
|
return http_validation_problem_details
|
|
158
183
|
|
|
@@ -1,29 +1,52 @@
|
|
|
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
|
+
from typing import cast
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
7
16
|
T = TypeVar("T", bound="HttpValidationProblemDetailsErrors")
|
|
8
17
|
|
|
9
18
|
|
|
19
|
+
|
|
10
20
|
@_attrs_define
|
|
11
21
|
class HttpValidationProblemDetailsErrors:
|
|
12
|
-
"""
|
|
22
|
+
"""
|
|
23
|
+
"""
|
|
13
24
|
|
|
14
25
|
additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict)
|
|
15
26
|
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
16
31
|
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
|
|
17
33
|
field_dict: dict[str, Any] = {}
|
|
18
34
|
for prop_name, prop in self.additional_properties.items():
|
|
19
35
|
field_dict[prop_name] = prop
|
|
20
36
|
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
21
40
|
return field_dict
|
|
22
41
|
|
|
42
|
+
|
|
43
|
+
|
|
23
44
|
@classmethod
|
|
24
45
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
25
46
|
d = dict(src_dict)
|
|
26
|
-
http_validation_problem_details_errors = cls(
|
|
47
|
+
http_validation_problem_details_errors = cls(
|
|
48
|
+
)
|
|
49
|
+
|
|
27
50
|
|
|
28
51
|
additional_properties = {}
|
|
29
52
|
for prop_name, prop_dict in d.items():
|
minikai/models/json_node.py
CHANGED
|
@@ -1,36 +1,49 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
5
6
|
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
8
14
|
if TYPE_CHECKING:
|
|
9
|
-
|
|
15
|
+
from ..models.json_node_options import JsonNodeOptions
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
|
|
11
20
|
|
|
12
21
|
T = TypeVar("T", bound="JsonNode")
|
|
13
22
|
|
|
14
23
|
|
|
24
|
+
|
|
15
25
|
@_attrs_define
|
|
16
26
|
class JsonNode:
|
|
17
|
-
"""The base class that represents a single node within a mutable JSON document.
|
|
27
|
+
""" The base class that represents a single node within a mutable JSON document.
|
|
28
|
+
|
|
29
|
+
Attributes:
|
|
30
|
+
options (Union['JsonNodeOptions', None, Unset]): Gets the options to control the behavior.
|
|
31
|
+
parent (Union['JsonNode', None, Unset]): Gets the parent JsonNode.
|
|
32
|
+
If there is no parent, null is returned.
|
|
33
|
+
A parent can either be a JsonObject or a JsonArray.
|
|
34
|
+
root (Union[Unset, JsonNode]): The base class that represents a single node within a mutable JSON document.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
options: Union['JsonNodeOptions', None, Unset] = UNSET
|
|
38
|
+
parent: Union['JsonNode', None, Unset] = UNSET
|
|
39
|
+
root: Union[Unset, 'JsonNode'] = UNSET
|
|
40
|
+
|
|
41
|
+
|
|
18
42
|
|
|
19
|
-
Attributes:
|
|
20
|
-
options (Union['JsonNodeOptions', None, Unset]): Gets the options to control the behavior.
|
|
21
|
-
parent (Union['JsonNode', None, Unset]): Gets the parent JsonNode.
|
|
22
|
-
If there is no parent, null is returned.
|
|
23
|
-
A parent can either be a JsonObject or a JsonArray.
|
|
24
|
-
root (Union[Unset, JsonNode]): The base class that represents a single node within a mutable JSON document.
|
|
25
|
-
"""
|
|
26
43
|
|
|
27
|
-
options: Union["JsonNodeOptions", None, Unset] = UNSET
|
|
28
|
-
parent: Union["JsonNode", None, Unset] = UNSET
|
|
29
|
-
root: Union[Unset, "JsonNode"] = UNSET
|
|
30
44
|
|
|
31
45
|
def to_dict(self) -> dict[str, Any]:
|
|
32
46
|
from ..models.json_node_options import JsonNodeOptions
|
|
33
|
-
|
|
34
47
|
options: Union[None, Unset, dict[str, Any]]
|
|
35
48
|
if isinstance(self.options, Unset):
|
|
36
49
|
options = UNSET
|
|
@@ -51,9 +64,11 @@ class JsonNode:
|
|
|
51
64
|
if not isinstance(self.root, Unset):
|
|
52
65
|
root = self.root.to_dict()
|
|
53
66
|
|
|
67
|
+
|
|
54
68
|
field_dict: dict[str, Any] = {}
|
|
55
69
|
|
|
56
|
-
field_dict.update({
|
|
70
|
+
field_dict.update({
|
|
71
|
+
})
|
|
57
72
|
if options is not UNSET:
|
|
58
73
|
field_dict["options"] = options
|
|
59
74
|
if parent is not UNSET:
|
|
@@ -63,13 +78,13 @@ class JsonNode:
|
|
|
63
78
|
|
|
64
79
|
return field_dict
|
|
65
80
|
|
|
81
|
+
|
|
82
|
+
|
|
66
83
|
@classmethod
|
|
67
84
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
85
|
from ..models.json_node_options import JsonNodeOptions
|
|
69
|
-
|
|
70
86
|
d = dict(src_dict)
|
|
71
|
-
|
|
72
|
-
def _parse_options(data: object) -> Union["JsonNodeOptions", None, Unset]:
|
|
87
|
+
def _parse_options(data: object) -> Union['JsonNodeOptions', None, Unset]:
|
|
73
88
|
if data is None:
|
|
74
89
|
return data
|
|
75
90
|
if isinstance(data, Unset):
|
|
@@ -79,14 +94,17 @@ class JsonNode:
|
|
|
79
94
|
raise TypeError()
|
|
80
95
|
options_type_0 = JsonNodeOptions.from_dict(data)
|
|
81
96
|
|
|
97
|
+
|
|
98
|
+
|
|
82
99
|
return options_type_0
|
|
83
|
-
except:
|
|
100
|
+
except: # noqa: E722
|
|
84
101
|
pass
|
|
85
|
-
return cast(Union[
|
|
102
|
+
return cast(Union['JsonNodeOptions', None, Unset], data)
|
|
86
103
|
|
|
87
104
|
options = _parse_options(d.pop("options", UNSET))
|
|
88
105
|
|
|
89
|
-
|
|
106
|
+
|
|
107
|
+
def _parse_parent(data: object) -> Union['JsonNode', None, Unset]:
|
|
90
108
|
if data is None:
|
|
91
109
|
return data
|
|
92
110
|
if isinstance(data, Unset):
|
|
@@ -96,20 +114,26 @@ class JsonNode:
|
|
|
96
114
|
raise TypeError()
|
|
97
115
|
parent_type_0 = JsonNode.from_dict(data)
|
|
98
116
|
|
|
117
|
+
|
|
118
|
+
|
|
99
119
|
return parent_type_0
|
|
100
|
-
except:
|
|
120
|
+
except: # noqa: E722
|
|
101
121
|
pass
|
|
102
|
-
return cast(Union[
|
|
122
|
+
return cast(Union['JsonNode', None, Unset], data)
|
|
103
123
|
|
|
104
124
|
parent = _parse_parent(d.pop("parent", UNSET))
|
|
105
125
|
|
|
126
|
+
|
|
106
127
|
_root = d.pop("root", UNSET)
|
|
107
128
|
root: Union[Unset, JsonNode]
|
|
108
|
-
if isinstance(_root,
|
|
129
|
+
if isinstance(_root, Unset):
|
|
109
130
|
root = UNSET
|
|
110
131
|
else:
|
|
111
132
|
root = JsonNode.from_dict(_root)
|
|
112
133
|
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
113
137
|
json_node = cls(
|
|
114
138
|
options=options,
|
|
115
139
|
parent=parent,
|
|
@@ -117,3 +141,4 @@ class JsonNode:
|
|
|
117
141
|
)
|
|
118
142
|
|
|
119
143
|
return json_node
|
|
144
|
+
|
|
@@ -1,35 +1,53 @@
|
|
|
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
|
+
from attrs import field as _attrs_field
|
|
5
6
|
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import Union
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
8
17
|
T = TypeVar("T", bound="JsonNodeOptions")
|
|
9
18
|
|
|
10
19
|
|
|
20
|
+
|
|
11
21
|
@_attrs_define
|
|
12
22
|
class JsonNodeOptions:
|
|
13
|
-
"""Options to control JsonNode behavior.
|
|
23
|
+
""" Options to control JsonNode behavior.
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
Attributes:
|
|
26
|
+
property_name_case_insensitive (Union[Unset, bool]): Gets or sets a value that indicates whether property names
|
|
27
|
+
on JsonObject are case insensitive.
|
|
28
|
+
"""
|
|
19
29
|
|
|
20
30
|
property_name_case_insensitive: Union[Unset, bool] = UNSET
|
|
21
31
|
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
22
36
|
def to_dict(self) -> dict[str, Any]:
|
|
23
37
|
property_name_case_insensitive = self.property_name_case_insensitive
|
|
24
38
|
|
|
39
|
+
|
|
25
40
|
field_dict: dict[str, Any] = {}
|
|
26
41
|
|
|
27
|
-
field_dict.update({
|
|
42
|
+
field_dict.update({
|
|
43
|
+
})
|
|
28
44
|
if property_name_case_insensitive is not UNSET:
|
|
29
45
|
field_dict["propertyNameCaseInsensitive"] = property_name_case_insensitive
|
|
30
46
|
|
|
31
47
|
return field_dict
|
|
32
48
|
|
|
49
|
+
|
|
50
|
+
|
|
33
51
|
@classmethod
|
|
34
52
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
53
|
d = dict(src_dict)
|
|
@@ -40,3 +58,4 @@ class JsonNodeOptions:
|
|
|
40
58
|
)
|
|
41
59
|
|
|
42
60
|
return json_node_options
|
|
61
|
+
|