@@ -29,7 +29,6 @@ class Task:
2929 updated (datetime.datetime):
3030 url (str):
3131 public_url (str):
32- tags (TaskTags): Tags for the task represented as a mapping from 'namespace' to 'value'.
3332 status (Union[Unset, StatusEnum]): * `pending` - pending
3433 * `pre_processing` - pre_processing
3534 * `processing` - processing
@@ -51,6 +50,7 @@ class Task:
5150 failed. (seconds)
5251 stale_timeout (Union[None, Unset, int]): Maximum time to allow between task updates before considering the task
5352 stale. (seconds)
53+ tags (Union[Unset, TaskTags]): Tags for the task represented as a mapping from 'namespace' to 'value'.
5454 """
5555
5656 id : str
@@ -62,7 +62,6 @@ class Task:
6262 updated : datetime .datetime
6363 url : str
6464 public_url : str
65- tags : "TaskTags"
6665 status : Union [Unset , StatusEnum ] = StatusEnum .PENDING
6766 value : Union [None , Unset , int ] = UNSET
6867 value_max : Union [Unset , int ] = UNSET
@@ -72,6 +71,7 @@ class Task:
7271 time_to_start : Union [None , Unset , str ] = UNSET
7372 max_runtime : Union [None , Unset , int ] = UNSET
7473 stale_timeout : Union [None , Unset , int ] = UNSET
74+ tags : Union [Unset , "TaskTags" ] = UNSET
7575 additional_properties : dict [str , Any ] = _attrs_field (init = False , factory = dict )
7676
7777 def to_dict (self ) -> dict [str , Any ]:
@@ -94,8 +94,6 @@ def to_dict(self) -> dict[str, Any]:
9494
9595 public_url = self .public_url
9696
97- tags = self .tags .to_dict ()
98-
9997 status : Union [Unset , str ] = UNSET
10098 if not isinstance (self .status , Unset ):
10199 status = self .status .value
@@ -144,6 +142,10 @@ def to_dict(self) -> dict[str, Any]:
144142 else :
145143 stale_timeout = self .stale_timeout
146144
145+ tags : Union [Unset , dict [str , Any ]] = UNSET
146+ if not isinstance (self .tags , Unset ):
147+ tags = self .tags .to_dict ()
148+
147149 field_dict : dict [str , Any ] = {}
148150 field_dict .update (self .additional_properties )
149151 field_dict .update (
@@ -157,7 +159,6 @@ def to_dict(self) -> dict[str, Any]:
157159 "updated" : updated ,
158160 "url" : url ,
159161 "public_url" : public_url ,
160- "tags" : tags ,
161162 }
162163 )
163164 if status is not UNSET :
@@ -178,6 +179,8 @@ def to_dict(self) -> dict[str, Any]:
178179 field_dict ["max_runtime" ] = max_runtime
179180 if stale_timeout is not UNSET :
180181 field_dict ["stale_timeout" ] = stale_timeout
182+ if tags is not UNSET :
183+ field_dict ["tags" ] = tags
181184
182185 return field_dict
183186
@@ -209,8 +212,6 @@ def _parse_value_percent(data: object) -> Union[None, int]:
209212
210213 public_url = d .pop ("public_url" )
211214
212- tags = TaskTags .from_dict (d .pop ("tags" ))
213-
214215 _status = d .pop ("status" , UNSET )
215216 status : Union [Unset , StatusEnum ]
216217 if isinstance (_status , Unset ):
@@ -292,6 +293,13 @@ def _parse_stale_timeout(data: object) -> Union[None, Unset, int]:
292293
293294 stale_timeout = _parse_stale_timeout (d .pop ("stale_timeout" , UNSET ))
294295
296+ _tags = d .pop ("tags" , UNSET )
297+ tags : Union [Unset , TaskTags ]
298+ if isinstance (_tags , Unset ):
299+ tags = UNSET
300+ else :
301+ tags = TaskTags .from_dict (_tags )
302+
295303 task = cls (
296304 id = id ,
297305 organization = organization ,
@@ -302,7 +310,6 @@ def _parse_stale_timeout(data: object) -> Union[None, Unset, int]:
302310 updated = updated ,
303311 url = url ,
304312 public_url = public_url ,
305- tags = tags ,
306313 status = status ,
307314 value = value ,
308315 value_max = value_max ,
@@ -312,6 +319,7 @@ def _parse_stale_timeout(data: object) -> Union[None, Unset, int]:
312319 time_to_start = time_to_start ,
313320 max_runtime = max_runtime ,
314321 stale_timeout = stale_timeout ,
322+ tags = tags ,
315323 )
316324
317325 task .additional_properties = d
0 commit comments