dart-tools 0.7.2__py3-none-any.whl → 0.7.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 dart-tools might be problematic. Click here for more details.
- dart/generated/api/__init__.py +5 -12
- dart/generated/api/dartboard/retrieve_dartboard.py +3 -1
- dart/generated/api/doc/delete_doc.py +3 -1
- dart/generated/api/doc/retrieve_doc.py +3 -1
- dart/generated/api/doc/update_doc.py +3 -1
- dart/generated/api/folder/retrieve_folder.py +3 -1
- dart/generated/api/task/delete_task.py +3 -1
- dart/generated/api/task/list_tasks.py +15 -0
- dart/generated/api/task/retrieve_task.py +3 -1
- dart/generated/api/task/update_task.py +3 -1
- dart/generated/api/view/retrieve_view.py +3 -1
- dart/generated/models/__init__.py +42 -0
- dart/generated/models/concise_task.py +68 -7
- dart/generated/models/custom_properties.py +131 -0
- dart/generated/models/task.py +68 -7
- dart/generated/models/task_create.py +66 -15
- dart/generated/models/task_update.py +66 -15
- dart/generated/models/user_space_configuration.py +242 -0
- 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.2.dist-info → dart_tools-0.7.4.dist-info}/METADATA +7 -7
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/RECORD +34 -24
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/WHEEL +1 -1
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/licenses/LICENSE +1 -1
- dart/generated/py.typed +0 -1
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/entry_points.txt +0 -0
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/top_level.txt +0 -0
dart/generated/models/task.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,10 @@ from attrs import field as _attrs_field
|
|
|
7
7
|
from ..models.priority import Priority
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.custom_properties import CustomProperties
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="Task")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -22,8 +26,8 @@ class Task:
|
|
|
22
26
|
type_ (str): The title of the type of the task.
|
|
23
27
|
status (str): The status from the list of available statuses.
|
|
24
28
|
description (str): A longer description of the task, which can include markdown formatting.
|
|
25
|
-
assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
26
|
-
or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
29
|
+
assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
30
|
+
this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
27
31
|
assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
|
|
28
32
|
assignees must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
29
33
|
tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
|
|
@@ -39,6 +43,8 @@ class Task:
|
|
|
39
43
|
is used to determine how long the task will take to complete.
|
|
40
44
|
time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
|
|
41
45
|
on the task in hh:mm:ss format (or an empty string if no time has been tracked).
|
|
46
|
+
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
47
|
+
properties that are associated with the task.
|
|
42
48
|
"""
|
|
43
49
|
|
|
44
50
|
id: str
|
|
@@ -49,7 +55,7 @@ class Task:
|
|
|
49
55
|
type_: str
|
|
50
56
|
status: str
|
|
51
57
|
description: str
|
|
52
|
-
assignees: Union[Unset, list[str]] = UNSET
|
|
58
|
+
assignees: Union[None, Unset, list[str]] = UNSET
|
|
53
59
|
assignee: Union[None, Unset, str] = UNSET
|
|
54
60
|
tags: Union[Unset, list[str]] = UNSET
|
|
55
61
|
priority: Union[None, Priority, Unset] = UNSET
|
|
@@ -57,9 +63,12 @@ class Task:
|
|
|
57
63
|
due_at: Union[None, Unset, str] = UNSET
|
|
58
64
|
size: Union[None, Unset, int, str] = UNSET
|
|
59
65
|
time_tracking: Union[Unset, str] = UNSET
|
|
66
|
+
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
60
67
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
61
68
|
|
|
62
69
|
def to_dict(self) -> dict[str, Any]:
|
|
70
|
+
from ..models.custom_properties import CustomProperties
|
|
71
|
+
|
|
63
72
|
id = self.id
|
|
64
73
|
|
|
65
74
|
html_url = self.html_url
|
|
@@ -77,8 +86,13 @@ class Task:
|
|
|
77
86
|
|
|
78
87
|
description = self.description
|
|
79
88
|
|
|
80
|
-
assignees: Union[Unset, list[str]]
|
|
81
|
-
if
|
|
89
|
+
assignees: Union[None, Unset, list[str]]
|
|
90
|
+
if isinstance(self.assignees, Unset):
|
|
91
|
+
assignees = UNSET
|
|
92
|
+
elif isinstance(self.assignees, list):
|
|
93
|
+
assignees = self.assignees
|
|
94
|
+
|
|
95
|
+
else:
|
|
82
96
|
assignees = self.assignees
|
|
83
97
|
|
|
84
98
|
assignee: Union[None, Unset, str]
|
|
@@ -119,6 +133,14 @@ class Task:
|
|
|
119
133
|
|
|
120
134
|
time_tracking = self.time_tracking
|
|
121
135
|
|
|
136
|
+
custom_properties: Union[None, Unset, dict[str, Any]]
|
|
137
|
+
if isinstance(self.custom_properties, Unset):
|
|
138
|
+
custom_properties = UNSET
|
|
139
|
+
elif isinstance(self.custom_properties, CustomProperties):
|
|
140
|
+
custom_properties = self.custom_properties.to_dict()
|
|
141
|
+
else:
|
|
142
|
+
custom_properties = self.custom_properties
|
|
143
|
+
|
|
122
144
|
field_dict: dict[str, Any] = {}
|
|
123
145
|
field_dict.update(self.additional_properties)
|
|
124
146
|
field_dict.update(
|
|
@@ -149,11 +171,15 @@ class Task:
|
|
|
149
171
|
field_dict["size"] = size
|
|
150
172
|
if time_tracking is not UNSET:
|
|
151
173
|
field_dict["timeTracking"] = time_tracking
|
|
174
|
+
if custom_properties is not UNSET:
|
|
175
|
+
field_dict["customProperties"] = custom_properties
|
|
152
176
|
|
|
153
177
|
return field_dict
|
|
154
178
|
|
|
155
179
|
@classmethod
|
|
156
180
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
181
|
+
from ..models.custom_properties import CustomProperties
|
|
182
|
+
|
|
157
183
|
d = dict(src_dict)
|
|
158
184
|
id = d.pop("id")
|
|
159
185
|
|
|
@@ -176,7 +202,22 @@ class Task:
|
|
|
176
202
|
|
|
177
203
|
description = d.pop("description")
|
|
178
204
|
|
|
179
|
-
|
|
205
|
+
def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
|
|
206
|
+
if data is None:
|
|
207
|
+
return data
|
|
208
|
+
if isinstance(data, Unset):
|
|
209
|
+
return data
|
|
210
|
+
try:
|
|
211
|
+
if not isinstance(data, list):
|
|
212
|
+
raise TypeError()
|
|
213
|
+
assignees_type_0 = cast(list[str], data)
|
|
214
|
+
|
|
215
|
+
return assignees_type_0
|
|
216
|
+
except: # noqa: E722
|
|
217
|
+
pass
|
|
218
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
219
|
+
|
|
220
|
+
assignees = _parse_assignees(d.pop("assignees", UNSET))
|
|
180
221
|
|
|
181
222
|
def _parse_assignee(data: object) -> Union[None, Unset, str]:
|
|
182
223
|
if data is None:
|
|
@@ -235,6 +276,25 @@ class Task:
|
|
|
235
276
|
|
|
236
277
|
time_tracking = d.pop("timeTracking", UNSET)
|
|
237
278
|
|
|
279
|
+
def _parse_custom_properties(
|
|
280
|
+
data: object,
|
|
281
|
+
) -> Union["CustomProperties", None, Unset]:
|
|
282
|
+
if data is None:
|
|
283
|
+
return data
|
|
284
|
+
if isinstance(data, Unset):
|
|
285
|
+
return data
|
|
286
|
+
try:
|
|
287
|
+
if not isinstance(data, dict):
|
|
288
|
+
raise TypeError()
|
|
289
|
+
custom_properties_type_0 = CustomProperties.from_dict(data)
|
|
290
|
+
|
|
291
|
+
return custom_properties_type_0
|
|
292
|
+
except: # noqa: E722
|
|
293
|
+
pass
|
|
294
|
+
return cast(Union["CustomProperties", None, Unset], data)
|
|
295
|
+
|
|
296
|
+
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
297
|
+
|
|
238
298
|
task = cls(
|
|
239
299
|
id=id,
|
|
240
300
|
html_url=html_url,
|
|
@@ -252,6 +312,7 @@ class Task:
|
|
|
252
312
|
due_at=due_at,
|
|
253
313
|
size=size,
|
|
254
314
|
time_tracking=time_tracking,
|
|
315
|
+
custom_properties=custom_properties,
|
|
255
316
|
)
|
|
256
317
|
|
|
257
318
|
task.additional_properties = d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,10 @@ from attrs import field as _attrs_field
|
|
|
7
7
|
from ..models.priority import Priority
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.custom_properties import CustomProperties
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="TaskCreate")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -20,8 +24,8 @@ class TaskCreate:
|
|
|
20
24
|
type_ (Union[Unset, str]): The title of the type of the task.
|
|
21
25
|
status (Union[Unset, str]): The status from the list of available statuses.
|
|
22
26
|
description (Union[Unset, str]): A longer description of the task, which can include markdown formatting.
|
|
23
|
-
assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
24
|
-
or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
27
|
+
assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
28
|
+
this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
25
29
|
assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
|
|
26
30
|
assignees must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
27
31
|
tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
|
|
@@ -35,8 +39,8 @@ class TaskCreate:
|
|
|
35
39
|
format, like YYYY-MM-DD.
|
|
36
40
|
size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
|
|
37
41
|
is used to determine how long the task will take to complete.
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
43
|
+
properties that are associated with the task.
|
|
40
44
|
"""
|
|
41
45
|
|
|
42
46
|
title: str
|
|
@@ -45,17 +49,19 @@ class TaskCreate:
|
|
|
45
49
|
type_: Union[Unset, str] = UNSET
|
|
46
50
|
status: Union[Unset, str] = UNSET
|
|
47
51
|
description: Union[Unset, str] = UNSET
|
|
48
|
-
assignees: Union[Unset, list[str]] = UNSET
|
|
52
|
+
assignees: Union[None, Unset, list[str]] = UNSET
|
|
49
53
|
assignee: Union[None, Unset, str] = UNSET
|
|
50
54
|
tags: Union[Unset, list[str]] = UNSET
|
|
51
55
|
priority: Union[None, Priority, Unset] = UNSET
|
|
52
56
|
start_at: Union[None, Unset, str] = UNSET
|
|
53
57
|
due_at: Union[None, Unset, str] = UNSET
|
|
54
58
|
size: Union[None, Unset, int, str] = UNSET
|
|
55
|
-
|
|
59
|
+
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
56
60
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
57
61
|
|
|
58
62
|
def to_dict(self) -> dict[str, Any]:
|
|
63
|
+
from ..models.custom_properties import CustomProperties
|
|
64
|
+
|
|
59
65
|
title = self.title
|
|
60
66
|
|
|
61
67
|
parent_id: Union[None, Unset, str]
|
|
@@ -72,8 +78,13 @@ class TaskCreate:
|
|
|
72
78
|
|
|
73
79
|
description = self.description
|
|
74
80
|
|
|
75
|
-
assignees: Union[Unset, list[str]]
|
|
76
|
-
if
|
|
81
|
+
assignees: Union[None, Unset, list[str]]
|
|
82
|
+
if isinstance(self.assignees, Unset):
|
|
83
|
+
assignees = UNSET
|
|
84
|
+
elif isinstance(self.assignees, list):
|
|
85
|
+
assignees = self.assignees
|
|
86
|
+
|
|
87
|
+
else:
|
|
77
88
|
assignees = self.assignees
|
|
78
89
|
|
|
79
90
|
assignee: Union[None, Unset, str]
|
|
@@ -112,7 +123,13 @@ class TaskCreate:
|
|
|
112
123
|
else:
|
|
113
124
|
size = self.size
|
|
114
125
|
|
|
115
|
-
|
|
126
|
+
custom_properties: Union[None, Unset, dict[str, Any]]
|
|
127
|
+
if isinstance(self.custom_properties, Unset):
|
|
128
|
+
custom_properties = UNSET
|
|
129
|
+
elif isinstance(self.custom_properties, CustomProperties):
|
|
130
|
+
custom_properties = self.custom_properties.to_dict()
|
|
131
|
+
else:
|
|
132
|
+
custom_properties = self.custom_properties
|
|
116
133
|
|
|
117
134
|
field_dict: dict[str, Any] = {}
|
|
118
135
|
field_dict.update(self.additional_properties)
|
|
@@ -145,13 +162,15 @@ class TaskCreate:
|
|
|
145
162
|
field_dict["dueAt"] = due_at
|
|
146
163
|
if size is not UNSET:
|
|
147
164
|
field_dict["size"] = size
|
|
148
|
-
if
|
|
149
|
-
field_dict["
|
|
165
|
+
if custom_properties is not UNSET:
|
|
166
|
+
field_dict["customProperties"] = custom_properties
|
|
150
167
|
|
|
151
168
|
return field_dict
|
|
152
169
|
|
|
153
170
|
@classmethod
|
|
154
171
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
172
|
+
from ..models.custom_properties import CustomProperties
|
|
173
|
+
|
|
155
174
|
d = dict(src_dict)
|
|
156
175
|
title = d.pop("title")
|
|
157
176
|
|
|
@@ -172,7 +191,22 @@ class TaskCreate:
|
|
|
172
191
|
|
|
173
192
|
description = d.pop("description", UNSET)
|
|
174
193
|
|
|
175
|
-
|
|
194
|
+
def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
|
|
195
|
+
if data is None:
|
|
196
|
+
return data
|
|
197
|
+
if isinstance(data, Unset):
|
|
198
|
+
return data
|
|
199
|
+
try:
|
|
200
|
+
if not isinstance(data, list):
|
|
201
|
+
raise TypeError()
|
|
202
|
+
assignees_type_0 = cast(list[str], data)
|
|
203
|
+
|
|
204
|
+
return assignees_type_0
|
|
205
|
+
except: # noqa: E722
|
|
206
|
+
pass
|
|
207
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
208
|
+
|
|
209
|
+
assignees = _parse_assignees(d.pop("assignees", UNSET))
|
|
176
210
|
|
|
177
211
|
def _parse_assignee(data: object) -> Union[None, Unset, str]:
|
|
178
212
|
if data is None:
|
|
@@ -229,7 +263,24 @@ class TaskCreate:
|
|
|
229
263
|
|
|
230
264
|
size = _parse_size(d.pop("size", UNSET))
|
|
231
265
|
|
|
232
|
-
|
|
266
|
+
def _parse_custom_properties(
|
|
267
|
+
data: object,
|
|
268
|
+
) -> Union["CustomProperties", None, Unset]:
|
|
269
|
+
if data is None:
|
|
270
|
+
return data
|
|
271
|
+
if isinstance(data, Unset):
|
|
272
|
+
return data
|
|
273
|
+
try:
|
|
274
|
+
if not isinstance(data, dict):
|
|
275
|
+
raise TypeError()
|
|
276
|
+
custom_properties_type_0 = CustomProperties.from_dict(data)
|
|
277
|
+
|
|
278
|
+
return custom_properties_type_0
|
|
279
|
+
except: # noqa: E722
|
|
280
|
+
pass
|
|
281
|
+
return cast(Union["CustomProperties", None, Unset], data)
|
|
282
|
+
|
|
283
|
+
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
233
284
|
|
|
234
285
|
task_create = cls(
|
|
235
286
|
title=title,
|
|
@@ -245,7 +296,7 @@ class TaskCreate:
|
|
|
245
296
|
start_at=start_at,
|
|
246
297
|
due_at=due_at,
|
|
247
298
|
size=size,
|
|
248
|
-
|
|
299
|
+
custom_properties=custom_properties,
|
|
249
300
|
)
|
|
250
301
|
|
|
251
302
|
task_create.additional_properties = d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,10 @@ from attrs import field as _attrs_field
|
|
|
7
7
|
from ..models.priority import Priority
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.custom_properties import CustomProperties
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="TaskUpdate")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -21,8 +25,8 @@ class TaskUpdate:
|
|
|
21
25
|
type_ (Union[Unset, str]): The title of the type of the task.
|
|
22
26
|
status (Union[Unset, str]): The status from the list of available statuses.
|
|
23
27
|
description (Union[Unset, str]): A longer description of the task, which can include markdown formatting.
|
|
24
|
-
assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
25
|
-
or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
28
|
+
assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
|
|
29
|
+
this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
26
30
|
assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
|
|
27
31
|
assignees must be included, depending on whether the workspaces allows multiple assignees or not.
|
|
28
32
|
tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
|
|
@@ -36,8 +40,8 @@ class TaskUpdate:
|
|
|
36
40
|
format, like YYYY-MM-DD.
|
|
37
41
|
size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
|
|
38
42
|
is used to determine how long the task will take to complete.
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
44
|
+
properties that are associated with the task.
|
|
41
45
|
"""
|
|
42
46
|
|
|
43
47
|
id: str
|
|
@@ -47,17 +51,19 @@ class TaskUpdate:
|
|
|
47
51
|
type_: Union[Unset, str] = UNSET
|
|
48
52
|
status: Union[Unset, str] = UNSET
|
|
49
53
|
description: Union[Unset, str] = UNSET
|
|
50
|
-
assignees: Union[Unset, list[str]] = UNSET
|
|
54
|
+
assignees: Union[None, Unset, list[str]] = UNSET
|
|
51
55
|
assignee: Union[None, Unset, str] = UNSET
|
|
52
56
|
tags: Union[Unset, list[str]] = UNSET
|
|
53
57
|
priority: Union[None, Priority, Unset] = UNSET
|
|
54
58
|
start_at: Union[None, Unset, str] = UNSET
|
|
55
59
|
due_at: Union[None, Unset, str] = UNSET
|
|
56
60
|
size: Union[None, Unset, int, str] = UNSET
|
|
57
|
-
|
|
61
|
+
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
58
62
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
59
63
|
|
|
60
64
|
def to_dict(self) -> dict[str, Any]:
|
|
65
|
+
from ..models.custom_properties import CustomProperties
|
|
66
|
+
|
|
61
67
|
id = self.id
|
|
62
68
|
|
|
63
69
|
title = self.title
|
|
@@ -76,8 +82,13 @@ class TaskUpdate:
|
|
|
76
82
|
|
|
77
83
|
description = self.description
|
|
78
84
|
|
|
79
|
-
assignees: Union[Unset, list[str]]
|
|
80
|
-
if
|
|
85
|
+
assignees: Union[None, Unset, list[str]]
|
|
86
|
+
if isinstance(self.assignees, Unset):
|
|
87
|
+
assignees = UNSET
|
|
88
|
+
elif isinstance(self.assignees, list):
|
|
89
|
+
assignees = self.assignees
|
|
90
|
+
|
|
91
|
+
else:
|
|
81
92
|
assignees = self.assignees
|
|
82
93
|
|
|
83
94
|
assignee: Union[None, Unset, str]
|
|
@@ -116,7 +127,13 @@ class TaskUpdate:
|
|
|
116
127
|
else:
|
|
117
128
|
size = self.size
|
|
118
129
|
|
|
119
|
-
|
|
130
|
+
custom_properties: Union[None, Unset, dict[str, Any]]
|
|
131
|
+
if isinstance(self.custom_properties, Unset):
|
|
132
|
+
custom_properties = UNSET
|
|
133
|
+
elif isinstance(self.custom_properties, CustomProperties):
|
|
134
|
+
custom_properties = self.custom_properties.to_dict()
|
|
135
|
+
else:
|
|
136
|
+
custom_properties = self.custom_properties
|
|
120
137
|
|
|
121
138
|
field_dict: dict[str, Any] = {}
|
|
122
139
|
field_dict.update(self.additional_properties)
|
|
@@ -151,13 +168,15 @@ class TaskUpdate:
|
|
|
151
168
|
field_dict["dueAt"] = due_at
|
|
152
169
|
if size is not UNSET:
|
|
153
170
|
field_dict["size"] = size
|
|
154
|
-
if
|
|
155
|
-
field_dict["
|
|
171
|
+
if custom_properties is not UNSET:
|
|
172
|
+
field_dict["customProperties"] = custom_properties
|
|
156
173
|
|
|
157
174
|
return field_dict
|
|
158
175
|
|
|
159
176
|
@classmethod
|
|
160
177
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
178
|
+
from ..models.custom_properties import CustomProperties
|
|
179
|
+
|
|
161
180
|
d = dict(src_dict)
|
|
162
181
|
id = d.pop("id")
|
|
163
182
|
|
|
@@ -180,7 +199,22 @@ class TaskUpdate:
|
|
|
180
199
|
|
|
181
200
|
description = d.pop("description", UNSET)
|
|
182
201
|
|
|
183
|
-
|
|
202
|
+
def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
|
|
203
|
+
if data is None:
|
|
204
|
+
return data
|
|
205
|
+
if isinstance(data, Unset):
|
|
206
|
+
return data
|
|
207
|
+
try:
|
|
208
|
+
if not isinstance(data, list):
|
|
209
|
+
raise TypeError()
|
|
210
|
+
assignees_type_0 = cast(list[str], data)
|
|
211
|
+
|
|
212
|
+
return assignees_type_0
|
|
213
|
+
except: # noqa: E722
|
|
214
|
+
pass
|
|
215
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
216
|
+
|
|
217
|
+
assignees = _parse_assignees(d.pop("assignees", UNSET))
|
|
184
218
|
|
|
185
219
|
def _parse_assignee(data: object) -> Union[None, Unset, str]:
|
|
186
220
|
if data is None:
|
|
@@ -237,7 +271,24 @@ class TaskUpdate:
|
|
|
237
271
|
|
|
238
272
|
size = _parse_size(d.pop("size", UNSET))
|
|
239
273
|
|
|
240
|
-
|
|
274
|
+
def _parse_custom_properties(
|
|
275
|
+
data: object,
|
|
276
|
+
) -> Union["CustomProperties", None, Unset]:
|
|
277
|
+
if data is None:
|
|
278
|
+
return data
|
|
279
|
+
if isinstance(data, Unset):
|
|
280
|
+
return data
|
|
281
|
+
try:
|
|
282
|
+
if not isinstance(data, dict):
|
|
283
|
+
raise TypeError()
|
|
284
|
+
custom_properties_type_0 = CustomProperties.from_dict(data)
|
|
285
|
+
|
|
286
|
+
return custom_properties_type_0
|
|
287
|
+
except: # noqa: E722
|
|
288
|
+
pass
|
|
289
|
+
return cast(Union["CustomProperties", None, Unset], data)
|
|
290
|
+
|
|
291
|
+
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
241
292
|
|
|
242
293
|
task_update = cls(
|
|
243
294
|
id=id,
|
|
@@ -254,7 +305,7 @@ class TaskUpdate:
|
|
|
254
305
|
start_at=start_at,
|
|
255
306
|
due_at=due_at,
|
|
256
307
|
size=size,
|
|
257
|
-
|
|
308
|
+
custom_properties=custom_properties,
|
|
258
309
|
)
|
|
259
310
|
|
|
260
311
|
task_update.additional_properties = d
|