2222class Task :
2323 """
2424 Attributes:
25- id (str): Task ID
2625 organization (str):
2726 project (str):
2827 name (str): Name of the task
@@ -31,6 +30,8 @@ class Task:
3130 updated (datetime.datetime):
3231 url (str):
3332 public_url (str):
33+ id (str | Unset): Task ID. May be set on creation to a UUID or shortened UUID; it must be unique and is
34+ immutable thereafter. If omitted, an ID is generated.
3435 queue (str | Unset): Queue the task is from
3536 status (StatusEnum | Unset): * `pending` - pending
3637 * `pre_processing` - pre_processing
@@ -56,7 +57,6 @@ class Task:
5657 tags (TaskTags | Unset): Tags for the task represented as a mapping from 'namespace' to 'value'.
5758 """
5859
59- id : str
6060 organization : str
6161 project : str
6262 name : str
@@ -65,6 +65,7 @@ class Task:
6565 updated : datetime .datetime
6666 url : str
6767 public_url : str
68+ id : str | Unset = UNSET
6869 queue : str | Unset = UNSET
6970 status : StatusEnum | Unset = StatusEnum .PENDING
7071 value : int | None | Unset = UNSET
@@ -81,8 +82,6 @@ class Task:
8182 def to_dict (self ) -> dict [str , Any ]:
8283 from ..models .task_tags import TaskTags
8384
84- id = self .id
85-
8685 organization = self .organization
8786
8887 project = self .project
@@ -100,6 +99,8 @@ def to_dict(self) -> dict[str, Any]:
10099
101100 public_url = self .public_url
102101
102+ id = self .id
103+
103104 queue = self .queue
104105
105106 status : str | Unset = UNSET
@@ -158,7 +159,6 @@ def to_dict(self) -> dict[str, Any]:
158159 field_dict .update (self .additional_properties )
159160 field_dict .update (
160161 {
161- "id" : id ,
162162 "organization" : organization ,
163163 "project" : project ,
164164 "name" : name ,
@@ -169,6 +169,8 @@ def to_dict(self) -> dict[str, Any]:
169169 "public_url" : public_url ,
170170 }
171171 )
172+ if id is not UNSET :
173+ field_dict ["id" ] = id
172174 if queue is not UNSET :
173175 field_dict ["queue" ] = queue
174176 if status is not UNSET :
@@ -199,8 +201,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
199201 from ..models .task_tags import TaskTags
200202
201203 d = dict (src_dict )
202- id = d .pop ("id" )
203-
204204 organization = d .pop ("organization" )
205205
206206 project = d .pop ("project" )
@@ -222,6 +222,8 @@ def _parse_value_percent(data: object) -> int | None:
222222
223223 public_url = d .pop ("public_url" )
224224
225+ id = d .pop ("id" , UNSET )
226+
225227 queue = d .pop ("queue" , UNSET )
226228
227229 _status = d .pop ("status" , UNSET )
@@ -313,7 +315,6 @@ def _parse_stale_timeout(data: object) -> int | None | Unset:
313315 tags = TaskTags .from_dict (_tags )
314316
315317 task = cls (
316- id = id ,
317318 organization = organization ,
318319 project = project ,
319320 name = name ,
@@ -322,6 +323,7 @@ def _parse_stale_timeout(data: object) -> int | None | Unset:
322323 updated = updated ,
323324 url = url ,
324325 public_url = public_url ,
326+ id = id ,
325327 queue = queue ,
326328 status = status ,
327329 value = value ,
0 commit comments