dart-tools 0.7.2__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.

Files changed (34) hide show
  1. dart/generated/api/__init__.py +5 -12
  2. dart/generated/api/dartboard/retrieve_dartboard.py +3 -1
  3. dart/generated/api/doc/delete_doc.py +3 -1
  4. dart/generated/api/doc/retrieve_doc.py +3 -1
  5. dart/generated/api/doc/update_doc.py +3 -1
  6. dart/generated/api/folder/retrieve_folder.py +3 -1
  7. dart/generated/api/task/delete_task.py +3 -1
  8. dart/generated/api/task/retrieve_task.py +3 -1
  9. dart/generated/api/task/update_task.py +3 -1
  10. dart/generated/api/view/retrieve_view.py +3 -1
  11. dart/generated/models/__init__.py +42 -0
  12. dart/generated/models/concise_task.py +68 -7
  13. dart/generated/models/custom_properties.py +131 -0
  14. dart/generated/models/task.py +68 -7
  15. dart/generated/models/task_create.py +66 -15
  16. dart/generated/models/task_update.py +66 -15
  17. dart/generated/models/user_space_configuration.py +242 -0
  18. dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +74 -0
  19. dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +82 -0
  20. dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +82 -0
  21. dart/generated/models/user_space_configuration_custom_property_number_type_def.py +86 -0
  22. dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +10 -0
  23. dart/generated/models/user_space_configuration_custom_property_select_type_def.py +82 -0
  24. dart/generated/models/user_space_configuration_custom_property_status_type_def.py +74 -0
  25. dart/generated/models/user_space_configuration_custom_property_text_type_def.py +74 -0
  26. dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +74 -0
  27. dart/generated/models/user_space_configuration_custom_property_user_type_def.py +82 -0
  28. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/METADATA +7 -7
  29. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/RECORD +33 -23
  30. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/WHEEL +1 -1
  31. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/licenses/LICENSE +1 -1
  32. dart/generated/py.typed +0 -1
  33. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/entry_points.txt +0 -0
  34. {dart_tools-0.7.2.dist-info → dart_tools-0.7.3.dist-info}/top_level.txt +0 -0
@@ -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 this
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
- time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
39
- on the task in hh:mm:ss format (or an empty string if no time has been tracked).
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
- time_tracking: Union[Unset, str] = UNSET
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]] = UNSET
76
- if not isinstance(self.assignees, Unset):
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
- time_tracking = self.time_tracking
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 time_tracking is not UNSET:
149
- field_dict["timeTracking"] = time_tracking
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
- assignees = cast(list[str], d.pop("assignees", UNSET))
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
- time_tracking = d.pop("timeTracking", UNSET)
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
- time_tracking=time_tracking,
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 this
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
- time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
40
- on the task in hh:mm:ss format (or an empty string if no time has been tracked).
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
- time_tracking: Union[Unset, str] = UNSET
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]] = UNSET
80
- if not isinstance(self.assignees, Unset):
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
- time_tracking = self.time_tracking
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 time_tracking is not UNSET:
155
- field_dict["timeTracking"] = time_tracking
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
- assignees = cast(list[str], d.pop("assignees", UNSET))
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
- time_tracking = d.pop("timeTracking", UNSET)
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
- time_tracking=time_tracking,
308
+ custom_properties=custom_properties,
258
309
  )
259
310
 
260
311
  task_update.additional_properties = d
@@ -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")
@@ -27,6 +54,11 @@ class UserSpaceConfiguration:
27
54
  tags (list[str]):
28
55
  priorities (list[str]):
29
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
@@ -39,9 +71,47 @@ class UserSpaceConfiguration:
39
71
  tags: list[str]
40
72
  priorities: list[str]
41
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()
@@ -74,6 +144,54 @@ class UserSpaceConfiguration:
74
144
  else:
75
145
  sizes = self.sizes
76
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)
194
+
77
195
  field_dict: dict[str, Any] = {}
78
196
  field_dict.update(self.additional_properties)
79
197
  field_dict.update(
@@ -88,6 +206,7 @@ class UserSpaceConfiguration:
88
206
  "tags": tags,
89
207
  "priorities": priorities,
90
208
  "sizes": sizes,
209
+ "customProperties": custom_properties,
91
210
  }
92
211
  )
93
212
 
@@ -96,6 +215,33 @@ class UserSpaceConfiguration:
96
215
  @classmethod
97
216
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
98
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
+ )
99
245
 
100
246
  d = dict(src_dict)
101
247
  today = isoparse(d.pop("today")).date()
@@ -143,6 +289,101 @@ class UserSpaceConfiguration:
143
289
 
144
290
  sizes = _parse_sizes(d.pop("sizes"))
145
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)
386
+
146
387
  user_space_configuration = cls(
147
388
  today=today,
148
389
  user=user,
@@ -154,6 +395,7 @@ class UserSpaceConfiguration:
154
395
  tags=tags,
155
396
  priorities=priorities,
156
397
  sizes=sizes,
398
+ custom_properties=custom_properties,
157
399
  )
158
400
 
159
401
  user_space_configuration.additional_properties = d