dart-tools 0.7.1__py3-none-any.whl → 0.7.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 dart-tools might be problematic. Click here for more details.
- dart/dart.py +1 -1
- dart/generated/api/config/get_config.py +11 -14
- dart/generated/api/dartboard/retrieve_dartboard.py +6 -1
- dart/generated/api/doc/delete_doc.py +6 -1
- dart/generated/api/doc/list_docs.py +12 -4
- dart/generated/api/doc/retrieve_doc.py +6 -1
- dart/generated/api/doc/update_doc.py +6 -1
- dart/generated/api/folder/retrieve_folder.py +6 -1
- dart/generated/api/task/delete_task.py +6 -1
- dart/generated/api/task/list_tasks.py +48 -40
- dart/generated/api/task/retrieve_task.py +6 -1
- dart/generated/api/task/update_task.py +6 -1
- dart/generated/api/view/retrieve_view.py +6 -1
- dart/generated/models/__init__.py +42 -0
- dart/generated/models/concise_task.py +78 -17
- dart/generated/models/custom_properties.py +131 -0
- dart/generated/models/task.py +78 -17
- dart/generated/models/task_create.py +76 -25
- dart/generated/models/task_update.py +76 -25
- dart/generated/models/user_space_configuration.py +276 -5
- dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_number_type_def.py +86 -0
- dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +10 -0
- dart/generated/models/user_space_configuration_custom_property_select_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_status_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_text_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_user_type_def.py +82 -0
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/METADATA +7 -7
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/RECORD +36 -26
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/WHEEL +1 -1
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/licenses/LICENSE +1 -1
- dart/generated/py.typed +0 -1
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/entry_points.txt +0 -0
- {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from collections.abc import Mapping
|
|
3
|
-
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
4
4
|
|
|
5
5
|
from attrs import define as _attrs_define
|
|
6
6
|
from attrs import field as _attrs_field
|
|
@@ -8,6 +8,33 @@ from dateutil.parser import isoparse
|
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from ..models.user import User
|
|
11
|
+
from ..models.user_space_configuration_custom_property_checkbox_type_def import (
|
|
12
|
+
UserSpaceConfigurationCustomPropertyCheckboxTypeDef,
|
|
13
|
+
)
|
|
14
|
+
from ..models.user_space_configuration_custom_property_dates_type_def import (
|
|
15
|
+
UserSpaceConfigurationCustomPropertyDatesTypeDef,
|
|
16
|
+
)
|
|
17
|
+
from ..models.user_space_configuration_custom_property_multiselect_type_def import (
|
|
18
|
+
UserSpaceConfigurationCustomPropertyMultiselectTypeDef,
|
|
19
|
+
)
|
|
20
|
+
from ..models.user_space_configuration_custom_property_number_type_def import (
|
|
21
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDef,
|
|
22
|
+
)
|
|
23
|
+
from ..models.user_space_configuration_custom_property_select_type_def import (
|
|
24
|
+
UserSpaceConfigurationCustomPropertySelectTypeDef,
|
|
25
|
+
)
|
|
26
|
+
from ..models.user_space_configuration_custom_property_status_type_def import (
|
|
27
|
+
UserSpaceConfigurationCustomPropertyStatusTypeDef,
|
|
28
|
+
)
|
|
29
|
+
from ..models.user_space_configuration_custom_property_text_type_def import (
|
|
30
|
+
UserSpaceConfigurationCustomPropertyTextTypeDef,
|
|
31
|
+
)
|
|
32
|
+
from ..models.user_space_configuration_custom_property_time_tracking_type_def import (
|
|
33
|
+
UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef,
|
|
34
|
+
)
|
|
35
|
+
from ..models.user_space_configuration_custom_property_user_type_def import (
|
|
36
|
+
UserSpaceConfigurationCustomPropertyUserTypeDef,
|
|
37
|
+
)
|
|
11
38
|
|
|
12
39
|
|
|
13
40
|
T = TypeVar("T", bound="UserSpaceConfiguration")
|
|
@@ -26,7 +53,12 @@ class UserSpaceConfiguration:
|
|
|
26
53
|
assignees (list['User']):
|
|
27
54
|
tags (list[str]):
|
|
28
55
|
priorities (list[str]):
|
|
29
|
-
sizes (list[int]):
|
|
56
|
+
sizes (Union[list[Union[int, str]], str]):
|
|
57
|
+
custom_properties (list[Union['UserSpaceConfigurationCustomPropertyCheckboxTypeDef',
|
|
58
|
+
'UserSpaceConfigurationCustomPropertyDatesTypeDef', 'UserSpaceConfigurationCustomPropertyMultiselectTypeDef',
|
|
59
|
+
'UserSpaceConfigurationCustomPropertyNumberTypeDef', 'UserSpaceConfigurationCustomPropertySelectTypeDef',
|
|
60
|
+
'UserSpaceConfigurationCustomPropertyStatusTypeDef', 'UserSpaceConfigurationCustomPropertyTextTypeDef',
|
|
61
|
+
'UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef', 'UserSpaceConfigurationCustomPropertyUserTypeDef']]):
|
|
30
62
|
"""
|
|
31
63
|
|
|
32
64
|
today: datetime.date
|
|
@@ -38,10 +70,48 @@ class UserSpaceConfiguration:
|
|
|
38
70
|
assignees: list["User"]
|
|
39
71
|
tags: list[str]
|
|
40
72
|
priorities: list[str]
|
|
41
|
-
sizes: list[int]
|
|
73
|
+
sizes: Union[list[Union[int, str]], str]
|
|
74
|
+
custom_properties: list[
|
|
75
|
+
Union[
|
|
76
|
+
"UserSpaceConfigurationCustomPropertyCheckboxTypeDef",
|
|
77
|
+
"UserSpaceConfigurationCustomPropertyDatesTypeDef",
|
|
78
|
+
"UserSpaceConfigurationCustomPropertyMultiselectTypeDef",
|
|
79
|
+
"UserSpaceConfigurationCustomPropertyNumberTypeDef",
|
|
80
|
+
"UserSpaceConfigurationCustomPropertySelectTypeDef",
|
|
81
|
+
"UserSpaceConfigurationCustomPropertyStatusTypeDef",
|
|
82
|
+
"UserSpaceConfigurationCustomPropertyTextTypeDef",
|
|
83
|
+
"UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef",
|
|
84
|
+
"UserSpaceConfigurationCustomPropertyUserTypeDef",
|
|
85
|
+
]
|
|
86
|
+
]
|
|
42
87
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
88
|
|
|
44
89
|
def to_dict(self) -> dict[str, Any]:
|
|
90
|
+
from ..models.user_space_configuration_custom_property_checkbox_type_def import (
|
|
91
|
+
UserSpaceConfigurationCustomPropertyCheckboxTypeDef,
|
|
92
|
+
)
|
|
93
|
+
from ..models.user_space_configuration_custom_property_dates_type_def import (
|
|
94
|
+
UserSpaceConfigurationCustomPropertyDatesTypeDef,
|
|
95
|
+
)
|
|
96
|
+
from ..models.user_space_configuration_custom_property_multiselect_type_def import (
|
|
97
|
+
UserSpaceConfigurationCustomPropertyMultiselectTypeDef,
|
|
98
|
+
)
|
|
99
|
+
from ..models.user_space_configuration_custom_property_number_type_def import (
|
|
100
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDef,
|
|
101
|
+
)
|
|
102
|
+
from ..models.user_space_configuration_custom_property_select_type_def import (
|
|
103
|
+
UserSpaceConfigurationCustomPropertySelectTypeDef,
|
|
104
|
+
)
|
|
105
|
+
from ..models.user_space_configuration_custom_property_status_type_def import (
|
|
106
|
+
UserSpaceConfigurationCustomPropertyStatusTypeDef,
|
|
107
|
+
)
|
|
108
|
+
from ..models.user_space_configuration_custom_property_text_type_def import (
|
|
109
|
+
UserSpaceConfigurationCustomPropertyTextTypeDef,
|
|
110
|
+
)
|
|
111
|
+
from ..models.user_space_configuration_custom_property_time_tracking_type_def import (
|
|
112
|
+
UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef,
|
|
113
|
+
)
|
|
114
|
+
|
|
45
115
|
today = self.today.isoformat()
|
|
46
116
|
|
|
47
117
|
user = self.user.to_dict()
|
|
@@ -63,7 +133,64 @@ class UserSpaceConfiguration:
|
|
|
63
133
|
|
|
64
134
|
priorities = self.priorities
|
|
65
135
|
|
|
66
|
-
sizes
|
|
136
|
+
sizes: Union[list[Union[int, str]], str]
|
|
137
|
+
if isinstance(self.sizes, list):
|
|
138
|
+
sizes = []
|
|
139
|
+
for sizes_type_1_item_data in self.sizes:
|
|
140
|
+
sizes_type_1_item: Union[int, str]
|
|
141
|
+
sizes_type_1_item = sizes_type_1_item_data
|
|
142
|
+
sizes.append(sizes_type_1_item)
|
|
143
|
+
|
|
144
|
+
else:
|
|
145
|
+
sizes = self.sizes
|
|
146
|
+
|
|
147
|
+
custom_properties = []
|
|
148
|
+
for custom_properties_item_data in self.custom_properties:
|
|
149
|
+
custom_properties_item: dict[str, Any]
|
|
150
|
+
if isinstance(
|
|
151
|
+
custom_properties_item_data,
|
|
152
|
+
UserSpaceConfigurationCustomPropertyCheckboxTypeDef,
|
|
153
|
+
):
|
|
154
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
155
|
+
elif isinstance(
|
|
156
|
+
custom_properties_item_data,
|
|
157
|
+
UserSpaceConfigurationCustomPropertyDatesTypeDef,
|
|
158
|
+
):
|
|
159
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
160
|
+
elif isinstance(
|
|
161
|
+
custom_properties_item_data,
|
|
162
|
+
UserSpaceConfigurationCustomPropertyMultiselectTypeDef,
|
|
163
|
+
):
|
|
164
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
165
|
+
elif isinstance(
|
|
166
|
+
custom_properties_item_data,
|
|
167
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDef,
|
|
168
|
+
):
|
|
169
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
170
|
+
elif isinstance(
|
|
171
|
+
custom_properties_item_data,
|
|
172
|
+
UserSpaceConfigurationCustomPropertySelectTypeDef,
|
|
173
|
+
):
|
|
174
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
175
|
+
elif isinstance(
|
|
176
|
+
custom_properties_item_data,
|
|
177
|
+
UserSpaceConfigurationCustomPropertyStatusTypeDef,
|
|
178
|
+
):
|
|
179
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
180
|
+
elif isinstance(
|
|
181
|
+
custom_properties_item_data,
|
|
182
|
+
UserSpaceConfigurationCustomPropertyTextTypeDef,
|
|
183
|
+
):
|
|
184
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
185
|
+
elif isinstance(
|
|
186
|
+
custom_properties_item_data,
|
|
187
|
+
UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef,
|
|
188
|
+
):
|
|
189
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
190
|
+
else:
|
|
191
|
+
custom_properties_item = custom_properties_item_data.to_dict()
|
|
192
|
+
|
|
193
|
+
custom_properties.append(custom_properties_item)
|
|
67
194
|
|
|
68
195
|
field_dict: dict[str, Any] = {}
|
|
69
196
|
field_dict.update(self.additional_properties)
|
|
@@ -79,6 +206,7 @@ class UserSpaceConfiguration:
|
|
|
79
206
|
"tags": tags,
|
|
80
207
|
"priorities": priorities,
|
|
81
208
|
"sizes": sizes,
|
|
209
|
+
"customProperties": custom_properties,
|
|
82
210
|
}
|
|
83
211
|
)
|
|
84
212
|
|
|
@@ -87,6 +215,33 @@ class UserSpaceConfiguration:
|
|
|
87
215
|
@classmethod
|
|
88
216
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
89
217
|
from ..models.user import User
|
|
218
|
+
from ..models.user_space_configuration_custom_property_checkbox_type_def import (
|
|
219
|
+
UserSpaceConfigurationCustomPropertyCheckboxTypeDef,
|
|
220
|
+
)
|
|
221
|
+
from ..models.user_space_configuration_custom_property_dates_type_def import (
|
|
222
|
+
UserSpaceConfigurationCustomPropertyDatesTypeDef,
|
|
223
|
+
)
|
|
224
|
+
from ..models.user_space_configuration_custom_property_multiselect_type_def import (
|
|
225
|
+
UserSpaceConfigurationCustomPropertyMultiselectTypeDef,
|
|
226
|
+
)
|
|
227
|
+
from ..models.user_space_configuration_custom_property_number_type_def import (
|
|
228
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDef,
|
|
229
|
+
)
|
|
230
|
+
from ..models.user_space_configuration_custom_property_select_type_def import (
|
|
231
|
+
UserSpaceConfigurationCustomPropertySelectTypeDef,
|
|
232
|
+
)
|
|
233
|
+
from ..models.user_space_configuration_custom_property_status_type_def import (
|
|
234
|
+
UserSpaceConfigurationCustomPropertyStatusTypeDef,
|
|
235
|
+
)
|
|
236
|
+
from ..models.user_space_configuration_custom_property_text_type_def import (
|
|
237
|
+
UserSpaceConfigurationCustomPropertyTextTypeDef,
|
|
238
|
+
)
|
|
239
|
+
from ..models.user_space_configuration_custom_property_time_tracking_type_def import (
|
|
240
|
+
UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef,
|
|
241
|
+
)
|
|
242
|
+
from ..models.user_space_configuration_custom_property_user_type_def import (
|
|
243
|
+
UserSpaceConfigurationCustomPropertyUserTypeDef,
|
|
244
|
+
)
|
|
90
245
|
|
|
91
246
|
d = dict(src_dict)
|
|
92
247
|
today = isoparse(d.pop("today")).date()
|
|
@@ -112,7 +267,122 @@ class UserSpaceConfiguration:
|
|
|
112
267
|
|
|
113
268
|
priorities = cast(list[str], d.pop("priorities"))
|
|
114
269
|
|
|
115
|
-
|
|
270
|
+
def _parse_sizes(data: object) -> Union[list[Union[int, str]], str]:
|
|
271
|
+
try:
|
|
272
|
+
if not isinstance(data, list):
|
|
273
|
+
raise TypeError()
|
|
274
|
+
sizes_type_1 = []
|
|
275
|
+
_sizes_type_1 = data
|
|
276
|
+
for sizes_type_1_item_data in _sizes_type_1:
|
|
277
|
+
|
|
278
|
+
def _parse_sizes_type_1_item(data: object) -> Union[int, str]:
|
|
279
|
+
return cast(Union[int, str], data)
|
|
280
|
+
|
|
281
|
+
sizes_type_1_item = _parse_sizes_type_1_item(sizes_type_1_item_data)
|
|
282
|
+
|
|
283
|
+
sizes_type_1.append(sizes_type_1_item)
|
|
284
|
+
|
|
285
|
+
return sizes_type_1
|
|
286
|
+
except: # noqa: E722
|
|
287
|
+
pass
|
|
288
|
+
return cast(Union[list[Union[int, str]], str], data)
|
|
289
|
+
|
|
290
|
+
sizes = _parse_sizes(d.pop("sizes"))
|
|
291
|
+
|
|
292
|
+
custom_properties = []
|
|
293
|
+
_custom_properties = d.pop("customProperties")
|
|
294
|
+
for custom_properties_item_data in _custom_properties:
|
|
295
|
+
|
|
296
|
+
def _parse_custom_properties_item(
|
|
297
|
+
data: object,
|
|
298
|
+
) -> Union[
|
|
299
|
+
"UserSpaceConfigurationCustomPropertyCheckboxTypeDef",
|
|
300
|
+
"UserSpaceConfigurationCustomPropertyDatesTypeDef",
|
|
301
|
+
"UserSpaceConfigurationCustomPropertyMultiselectTypeDef",
|
|
302
|
+
"UserSpaceConfigurationCustomPropertyNumberTypeDef",
|
|
303
|
+
"UserSpaceConfigurationCustomPropertySelectTypeDef",
|
|
304
|
+
"UserSpaceConfigurationCustomPropertyStatusTypeDef",
|
|
305
|
+
"UserSpaceConfigurationCustomPropertyTextTypeDef",
|
|
306
|
+
"UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef",
|
|
307
|
+
"UserSpaceConfigurationCustomPropertyUserTypeDef",
|
|
308
|
+
]:
|
|
309
|
+
try:
|
|
310
|
+
if not isinstance(data, dict):
|
|
311
|
+
raise TypeError()
|
|
312
|
+
custom_properties_item_type_0 = UserSpaceConfigurationCustomPropertyCheckboxTypeDef.from_dict(data)
|
|
313
|
+
|
|
314
|
+
return custom_properties_item_type_0
|
|
315
|
+
except: # noqa: E722
|
|
316
|
+
pass
|
|
317
|
+
try:
|
|
318
|
+
if not isinstance(data, dict):
|
|
319
|
+
raise TypeError()
|
|
320
|
+
custom_properties_item_type_1 = UserSpaceConfigurationCustomPropertyDatesTypeDef.from_dict(data)
|
|
321
|
+
|
|
322
|
+
return custom_properties_item_type_1
|
|
323
|
+
except: # noqa: E722
|
|
324
|
+
pass
|
|
325
|
+
try:
|
|
326
|
+
if not isinstance(data, dict):
|
|
327
|
+
raise TypeError()
|
|
328
|
+
custom_properties_item_type_2 = UserSpaceConfigurationCustomPropertyMultiselectTypeDef.from_dict(
|
|
329
|
+
data
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
return custom_properties_item_type_2
|
|
333
|
+
except: # noqa: E722
|
|
334
|
+
pass
|
|
335
|
+
try:
|
|
336
|
+
if not isinstance(data, dict):
|
|
337
|
+
raise TypeError()
|
|
338
|
+
custom_properties_item_type_3 = UserSpaceConfigurationCustomPropertyNumberTypeDef.from_dict(data)
|
|
339
|
+
|
|
340
|
+
return custom_properties_item_type_3
|
|
341
|
+
except: # noqa: E722
|
|
342
|
+
pass
|
|
343
|
+
try:
|
|
344
|
+
if not isinstance(data, dict):
|
|
345
|
+
raise TypeError()
|
|
346
|
+
custom_properties_item_type_4 = UserSpaceConfigurationCustomPropertySelectTypeDef.from_dict(data)
|
|
347
|
+
|
|
348
|
+
return custom_properties_item_type_4
|
|
349
|
+
except: # noqa: E722
|
|
350
|
+
pass
|
|
351
|
+
try:
|
|
352
|
+
if not isinstance(data, dict):
|
|
353
|
+
raise TypeError()
|
|
354
|
+
custom_properties_item_type_5 = UserSpaceConfigurationCustomPropertyStatusTypeDef.from_dict(data)
|
|
355
|
+
|
|
356
|
+
return custom_properties_item_type_5
|
|
357
|
+
except: # noqa: E722
|
|
358
|
+
pass
|
|
359
|
+
try:
|
|
360
|
+
if not isinstance(data, dict):
|
|
361
|
+
raise TypeError()
|
|
362
|
+
custom_properties_item_type_6 = UserSpaceConfigurationCustomPropertyTextTypeDef.from_dict(data)
|
|
363
|
+
|
|
364
|
+
return custom_properties_item_type_6
|
|
365
|
+
except: # noqa: E722
|
|
366
|
+
pass
|
|
367
|
+
try:
|
|
368
|
+
if not isinstance(data, dict):
|
|
369
|
+
raise TypeError()
|
|
370
|
+
custom_properties_item_type_7 = UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef.from_dict(
|
|
371
|
+
data
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
return custom_properties_item_type_7
|
|
375
|
+
except: # noqa: E722
|
|
376
|
+
pass
|
|
377
|
+
if not isinstance(data, dict):
|
|
378
|
+
raise TypeError()
|
|
379
|
+
custom_properties_item_type_8 = UserSpaceConfigurationCustomPropertyUserTypeDef.from_dict(data)
|
|
380
|
+
|
|
381
|
+
return custom_properties_item_type_8
|
|
382
|
+
|
|
383
|
+
custom_properties_item = _parse_custom_properties_item(custom_properties_item_data)
|
|
384
|
+
|
|
385
|
+
custom_properties.append(custom_properties_item)
|
|
116
386
|
|
|
117
387
|
user_space_configuration = cls(
|
|
118
388
|
today=today,
|
|
@@ -125,6 +395,7 @@ class UserSpaceConfiguration:
|
|
|
125
395
|
tags=tags,
|
|
126
396
|
priorities=priorities,
|
|
127
397
|
sizes=sizes,
|
|
398
|
+
custom_properties=custom_properties,
|
|
128
399
|
)
|
|
129
400
|
|
|
130
401
|
user_space_configuration.additional_properties = d
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
Any,
|
|
4
|
+
Literal,
|
|
5
|
+
TypeVar,
|
|
6
|
+
cast,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from attrs import define as _attrs_define
|
|
10
|
+
from attrs import field as _attrs_field
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="UserSpaceConfigurationCustomPropertyCheckboxTypeDef")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class UserSpaceConfigurationCustomPropertyCheckboxTypeDef:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
name (str):
|
|
20
|
+
type_ (Literal['Checkbox']):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
type_: Literal["Checkbox"]
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
name = self.name
|
|
29
|
+
|
|
30
|
+
type_ = self.type_
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"name": name,
|
|
37
|
+
"type": type_,
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
name = d.pop("name")
|
|
47
|
+
|
|
48
|
+
type_ = cast(Literal["Checkbox"], d.pop("type"))
|
|
49
|
+
if type_ != "Checkbox":
|
|
50
|
+
raise ValueError(f"type must match const 'Checkbox', got '{type_}'")
|
|
51
|
+
|
|
52
|
+
user_space_configuration_custom_property_checkbox_type_def = cls(
|
|
53
|
+
name=name,
|
|
54
|
+
type_=type_,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
user_space_configuration_custom_property_checkbox_type_def.additional_properties = d
|
|
58
|
+
return user_space_configuration_custom_property_checkbox_type_def
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> list[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
Any,
|
|
4
|
+
Literal,
|
|
5
|
+
TypeVar,
|
|
6
|
+
cast,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from attrs import define as _attrs_define
|
|
10
|
+
from attrs import field as _attrs_field
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="UserSpaceConfigurationCustomPropertyDatesTypeDef")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class UserSpaceConfigurationCustomPropertyDatesTypeDef:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
name (str):
|
|
20
|
+
type_ (Literal['Dates']):
|
|
21
|
+
is_range (bool):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: str
|
|
25
|
+
type_: Literal["Dates"]
|
|
26
|
+
is_range: bool
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
name = self.name
|
|
31
|
+
|
|
32
|
+
type_ = self.type_
|
|
33
|
+
|
|
34
|
+
is_range = self.is_range
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"name": name,
|
|
41
|
+
"type": type_,
|
|
42
|
+
"isRange": is_range,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
name = d.pop("name")
|
|
52
|
+
|
|
53
|
+
type_ = cast(Literal["Dates"], d.pop("type"))
|
|
54
|
+
if type_ != "Dates":
|
|
55
|
+
raise ValueError(f"type must match const 'Dates', got '{type_}'")
|
|
56
|
+
|
|
57
|
+
is_range = d.pop("isRange")
|
|
58
|
+
|
|
59
|
+
user_space_configuration_custom_property_dates_type_def = cls(
|
|
60
|
+
name=name,
|
|
61
|
+
type_=type_,
|
|
62
|
+
is_range=is_range,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
user_space_configuration_custom_property_dates_type_def.additional_properties = d
|
|
66
|
+
return user_space_configuration_custom_property_dates_type_def
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
Any,
|
|
4
|
+
Literal,
|
|
5
|
+
TypeVar,
|
|
6
|
+
cast,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from attrs import define as _attrs_define
|
|
10
|
+
from attrs import field as _attrs_field
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="UserSpaceConfigurationCustomPropertyMultiselectTypeDef")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class UserSpaceConfigurationCustomPropertyMultiselectTypeDef:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
name (str):
|
|
20
|
+
type_ (Literal['Multiselect']):
|
|
21
|
+
options (list[str]):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: str
|
|
25
|
+
type_: Literal["Multiselect"]
|
|
26
|
+
options: list[str]
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
name = self.name
|
|
31
|
+
|
|
32
|
+
type_ = self.type_
|
|
33
|
+
|
|
34
|
+
options = self.options
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"name": name,
|
|
41
|
+
"type": type_,
|
|
42
|
+
"options": options,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
name = d.pop("name")
|
|
52
|
+
|
|
53
|
+
type_ = cast(Literal["Multiselect"], d.pop("type"))
|
|
54
|
+
if type_ != "Multiselect":
|
|
55
|
+
raise ValueError(f"type must match const 'Multiselect', got '{type_}'")
|
|
56
|
+
|
|
57
|
+
options = cast(list[str], d.pop("options"))
|
|
58
|
+
|
|
59
|
+
user_space_configuration_custom_property_multiselect_type_def = cls(
|
|
60
|
+
name=name,
|
|
61
|
+
type_=type_,
|
|
62
|
+
options=options,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
user_space_configuration_custom_property_multiselect_type_def.additional_properties = d
|
|
66
|
+
return user_space_configuration_custom_property_multiselect_type_def
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
Any,
|
|
4
|
+
Literal,
|
|
5
|
+
TypeVar,
|
|
6
|
+
cast,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from attrs import define as _attrs_define
|
|
10
|
+
from attrs import field as _attrs_field
|
|
11
|
+
|
|
12
|
+
from ..models.user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def import (
|
|
13
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="UserSpaceConfigurationCustomPropertyNumberTypeDef")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class UserSpaceConfigurationCustomPropertyNumberTypeDef:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
name (str):
|
|
24
|
+
type_ (Literal['Number']):
|
|
25
|
+
format_ (UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
name: str
|
|
29
|
+
type_: Literal["Number"]
|
|
30
|
+
format_: UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
name = self.name
|
|
35
|
+
|
|
36
|
+
type_ = self.type_
|
|
37
|
+
|
|
38
|
+
format_ = self.format_.value
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"name": name,
|
|
45
|
+
"type": type_,
|
|
46
|
+
"format": format_,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
name = d.pop("name")
|
|
56
|
+
|
|
57
|
+
type_ = cast(Literal["Number"], d.pop("type"))
|
|
58
|
+
if type_ != "Number":
|
|
59
|
+
raise ValueError(f"type must match const 'Number', got '{type_}'")
|
|
60
|
+
|
|
61
|
+
format_ = UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef(d.pop("format"))
|
|
62
|
+
|
|
63
|
+
user_space_configuration_custom_property_number_type_def = cls(
|
|
64
|
+
name=name,
|
|
65
|
+
type_=type_,
|
|
66
|
+
format_=format_,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
user_space_configuration_custom_property_number_type_def.additional_properties = d
|
|
70
|
+
return user_space_configuration_custom_property_number_type_def
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def additional_keys(self) -> list[str]:
|
|
74
|
+
return list(self.additional_properties.keys())
|
|
75
|
+
|
|
76
|
+
def __getitem__(self, key: str) -> Any:
|
|
77
|
+
return self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
80
|
+
self.additional_properties[key] = value
|
|
81
|
+
|
|
82
|
+
def __delitem__(self, key: str) -> None:
|
|
83
|
+
del self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __contains__(self, key: str) -> bool:
|
|
86
|
+
return key in self.additional_properties
|