cyberdesk 2.1.11__py3-none-any.whl → 2.1.13__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 cyberdesk might be problematic. Click here for more details.
- cyberdesk/__init__.py +1 -1
- cyberdesk/client.py +57 -3
- {cyberdesk-2.1.11.dist-info → cyberdesk-2.1.13.dist-info}/METADATA +1 -1
- {cyberdesk-2.1.11.dist-info → cyberdesk-2.1.13.dist-info}/RECORD +15 -10
- openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +35 -0
- openapi_client/cyberdesk_cloud_client/api/runs/retry_run_v1_runs_run_id_retry_post.py +230 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +8 -0
- openapi_client/cyberdesk_cloud_client/models/run_field.py +21 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +127 -95
- openapi_client/cyberdesk_cloud_client/models/run_retry.py +312 -0
- openapi_client/cyberdesk_cloud_client/models/run_retry_input_values_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/run_retry_sensitive_input_values_type_0.py +44 -0
- {cyberdesk-2.1.11.dist-info → cyberdesk-2.1.13.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.11.dist-info → cyberdesk-2.1.13.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.11.dist-info → cyberdesk-2.1.13.dist-info}/top_level.txt +0 -0
|
@@ -29,15 +29,15 @@ class RunResponse:
|
|
|
29
29
|
machine_id (Union[None, UUID]):
|
|
30
30
|
id (UUID):
|
|
31
31
|
status (RunStatus):
|
|
32
|
-
error (Union[None, list[str]]):
|
|
33
|
-
output_data (Union['RunResponseOutputDataType0', None]):
|
|
34
|
-
input_attachment_ids (Union[None, list[str]]):
|
|
35
|
-
output_attachment_ids (Union[None, list[str]]):
|
|
36
|
-
run_message_history (Union[None, list['RunResponseRunMessageHistoryType0Item']]):
|
|
37
|
-
input_values (Union['RunResponseInputValuesType0', None]):
|
|
38
32
|
created_at (datetime.datetime):
|
|
39
33
|
user_id (Union[None, UUID, Unset]):
|
|
40
34
|
organization_id (Union[None, Unset, str]):
|
|
35
|
+
error (Union[None, Unset, list[str]]):
|
|
36
|
+
output_data (Union['RunResponseOutputDataType0', None, Unset]):
|
|
37
|
+
input_attachment_ids (Union[None, Unset, list[str]]):
|
|
38
|
+
output_attachment_ids (Union[None, Unset, list[str]]):
|
|
39
|
+
run_message_history (Union[None, Unset, list['RunResponseRunMessageHistoryType0Item']]):
|
|
40
|
+
input_values (Union['RunResponseInputValuesType0', None, Unset]):
|
|
41
41
|
pool_ids (Union[None, Unset, list[UUID]]):
|
|
42
42
|
sensitive_input_aliases (Union['RunResponseSensitiveInputAliasesType0', None, Unset]):
|
|
43
43
|
session_id (Union[None, UUID, Unset]):
|
|
@@ -49,15 +49,15 @@ class RunResponse:
|
|
|
49
49
|
machine_id: Union[None, UUID]
|
|
50
50
|
id: UUID
|
|
51
51
|
status: RunStatus
|
|
52
|
-
error: Union[None, list[str]]
|
|
53
|
-
output_data: Union["RunResponseOutputDataType0", None]
|
|
54
|
-
input_attachment_ids: Union[None, list[str]]
|
|
55
|
-
output_attachment_ids: Union[None, list[str]]
|
|
56
|
-
run_message_history: Union[None, list["RunResponseRunMessageHistoryType0Item"]]
|
|
57
|
-
input_values: Union["RunResponseInputValuesType0", None]
|
|
58
52
|
created_at: datetime.datetime
|
|
59
53
|
user_id: Union[None, UUID, Unset] = UNSET
|
|
60
54
|
organization_id: Union[None, Unset, str] = UNSET
|
|
55
|
+
error: Union[None, Unset, list[str]] = UNSET
|
|
56
|
+
output_data: Union["RunResponseOutputDataType0", None, Unset] = UNSET
|
|
57
|
+
input_attachment_ids: Union[None, Unset, list[str]] = UNSET
|
|
58
|
+
output_attachment_ids: Union[None, Unset, list[str]] = UNSET
|
|
59
|
+
run_message_history: Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]] = UNSET
|
|
60
|
+
input_values: Union["RunResponseInputValuesType0", None, Unset] = UNSET
|
|
61
61
|
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
62
62
|
sensitive_input_aliases: Union["RunResponseSensitiveInputAliasesType0", None, Unset] = UNSET
|
|
63
63
|
session_id: Union[None, UUID, Unset] = UNSET
|
|
@@ -82,35 +82,61 @@ class RunResponse:
|
|
|
82
82
|
|
|
83
83
|
status = self.status.value
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
created_at = self.created_at.isoformat()
|
|
86
|
+
|
|
87
|
+
user_id: Union[None, Unset, str]
|
|
88
|
+
if isinstance(self.user_id, Unset):
|
|
89
|
+
user_id = UNSET
|
|
90
|
+
elif isinstance(self.user_id, UUID):
|
|
91
|
+
user_id = str(self.user_id)
|
|
92
|
+
else:
|
|
93
|
+
user_id = self.user_id
|
|
94
|
+
|
|
95
|
+
organization_id: Union[None, Unset, str]
|
|
96
|
+
if isinstance(self.organization_id, Unset):
|
|
97
|
+
organization_id = UNSET
|
|
98
|
+
else:
|
|
99
|
+
organization_id = self.organization_id
|
|
100
|
+
|
|
101
|
+
error: Union[None, Unset, list[str]]
|
|
102
|
+
if isinstance(self.error, Unset):
|
|
103
|
+
error = UNSET
|
|
104
|
+
elif isinstance(self.error, list):
|
|
87
105
|
error = self.error
|
|
88
106
|
|
|
89
107
|
else:
|
|
90
108
|
error = self.error
|
|
91
109
|
|
|
92
|
-
output_data: Union[None, dict[str, Any]]
|
|
93
|
-
if isinstance(self.output_data,
|
|
110
|
+
output_data: Union[None, Unset, dict[str, Any]]
|
|
111
|
+
if isinstance(self.output_data, Unset):
|
|
112
|
+
output_data = UNSET
|
|
113
|
+
elif isinstance(self.output_data, RunResponseOutputDataType0):
|
|
94
114
|
output_data = self.output_data.to_dict()
|
|
95
115
|
else:
|
|
96
116
|
output_data = self.output_data
|
|
97
117
|
|
|
98
|
-
input_attachment_ids: Union[None, list[str]]
|
|
99
|
-
if isinstance(self.input_attachment_ids,
|
|
118
|
+
input_attachment_ids: Union[None, Unset, list[str]]
|
|
119
|
+
if isinstance(self.input_attachment_ids, Unset):
|
|
120
|
+
input_attachment_ids = UNSET
|
|
121
|
+
elif isinstance(self.input_attachment_ids, list):
|
|
100
122
|
input_attachment_ids = self.input_attachment_ids
|
|
101
123
|
|
|
102
124
|
else:
|
|
103
125
|
input_attachment_ids = self.input_attachment_ids
|
|
104
126
|
|
|
105
|
-
output_attachment_ids: Union[None, list[str]]
|
|
106
|
-
if isinstance(self.output_attachment_ids,
|
|
127
|
+
output_attachment_ids: Union[None, Unset, list[str]]
|
|
128
|
+
if isinstance(self.output_attachment_ids, Unset):
|
|
129
|
+
output_attachment_ids = UNSET
|
|
130
|
+
elif isinstance(self.output_attachment_ids, list):
|
|
107
131
|
output_attachment_ids = self.output_attachment_ids
|
|
108
132
|
|
|
109
133
|
else:
|
|
110
134
|
output_attachment_ids = self.output_attachment_ids
|
|
111
135
|
|
|
112
|
-
run_message_history: Union[None, list[dict[str, Any]]]
|
|
113
|
-
if isinstance(self.run_message_history,
|
|
136
|
+
run_message_history: Union[None, Unset, list[dict[str, Any]]]
|
|
137
|
+
if isinstance(self.run_message_history, Unset):
|
|
138
|
+
run_message_history = UNSET
|
|
139
|
+
elif isinstance(self.run_message_history, list):
|
|
114
140
|
run_message_history = []
|
|
115
141
|
for run_message_history_type_0_item_data in self.run_message_history:
|
|
116
142
|
run_message_history_type_0_item = run_message_history_type_0_item_data.to_dict()
|
|
@@ -119,28 +145,14 @@ class RunResponse:
|
|
|
119
145
|
else:
|
|
120
146
|
run_message_history = self.run_message_history
|
|
121
147
|
|
|
122
|
-
input_values: Union[None, dict[str, Any]]
|
|
123
|
-
if isinstance(self.input_values,
|
|
148
|
+
input_values: Union[None, Unset, dict[str, Any]]
|
|
149
|
+
if isinstance(self.input_values, Unset):
|
|
150
|
+
input_values = UNSET
|
|
151
|
+
elif isinstance(self.input_values, RunResponseInputValuesType0):
|
|
124
152
|
input_values = self.input_values.to_dict()
|
|
125
153
|
else:
|
|
126
154
|
input_values = self.input_values
|
|
127
155
|
|
|
128
|
-
created_at = self.created_at.isoformat()
|
|
129
|
-
|
|
130
|
-
user_id: Union[None, Unset, str]
|
|
131
|
-
if isinstance(self.user_id, Unset):
|
|
132
|
-
user_id = UNSET
|
|
133
|
-
elif isinstance(self.user_id, UUID):
|
|
134
|
-
user_id = str(self.user_id)
|
|
135
|
-
else:
|
|
136
|
-
user_id = self.user_id
|
|
137
|
-
|
|
138
|
-
organization_id: Union[None, Unset, str]
|
|
139
|
-
if isinstance(self.organization_id, Unset):
|
|
140
|
-
organization_id = UNSET
|
|
141
|
-
else:
|
|
142
|
-
organization_id = self.organization_id
|
|
143
|
-
|
|
144
156
|
pool_ids: Union[None, Unset, list[str]]
|
|
145
157
|
if isinstance(self.pool_ids, Unset):
|
|
146
158
|
pool_ids = UNSET
|
|
@@ -189,12 +201,6 @@ class RunResponse:
|
|
|
189
201
|
"machine_id": machine_id,
|
|
190
202
|
"id": id,
|
|
191
203
|
"status": status,
|
|
192
|
-
"error": error,
|
|
193
|
-
"output_data": output_data,
|
|
194
|
-
"input_attachment_ids": input_attachment_ids,
|
|
195
|
-
"output_attachment_ids": output_attachment_ids,
|
|
196
|
-
"run_message_history": run_message_history,
|
|
197
|
-
"input_values": input_values,
|
|
198
204
|
"created_at": created_at,
|
|
199
205
|
}
|
|
200
206
|
)
|
|
@@ -202,6 +208,18 @@ class RunResponse:
|
|
|
202
208
|
field_dict["user_id"] = user_id
|
|
203
209
|
if organization_id is not UNSET:
|
|
204
210
|
field_dict["organization_id"] = organization_id
|
|
211
|
+
if error is not UNSET:
|
|
212
|
+
field_dict["error"] = error
|
|
213
|
+
if output_data is not UNSET:
|
|
214
|
+
field_dict["output_data"] = output_data
|
|
215
|
+
if input_attachment_ids is not UNSET:
|
|
216
|
+
field_dict["input_attachment_ids"] = input_attachment_ids
|
|
217
|
+
if output_attachment_ids is not UNSET:
|
|
218
|
+
field_dict["output_attachment_ids"] = output_attachment_ids
|
|
219
|
+
if run_message_history is not UNSET:
|
|
220
|
+
field_dict["run_message_history"] = run_message_history
|
|
221
|
+
if input_values is not UNSET:
|
|
222
|
+
field_dict["input_values"] = input_values
|
|
205
223
|
if pool_ids is not UNSET:
|
|
206
224
|
field_dict["pool_ids"] = pool_ids
|
|
207
225
|
if sensitive_input_aliases is not UNSET:
|
|
@@ -244,9 +262,39 @@ class RunResponse:
|
|
|
244
262
|
|
|
245
263
|
status = RunStatus(d.pop("status"))
|
|
246
264
|
|
|
247
|
-
|
|
265
|
+
created_at = isoparse(d.pop("created_at"))
|
|
266
|
+
|
|
267
|
+
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
268
|
+
if data is None:
|
|
269
|
+
return data
|
|
270
|
+
if isinstance(data, Unset):
|
|
271
|
+
return data
|
|
272
|
+
try:
|
|
273
|
+
if not isinstance(data, str):
|
|
274
|
+
raise TypeError()
|
|
275
|
+
user_id_type_0 = UUID(data)
|
|
276
|
+
|
|
277
|
+
return user_id_type_0
|
|
278
|
+
except: # noqa: E722
|
|
279
|
+
pass
|
|
280
|
+
return cast(Union[None, UUID, Unset], data)
|
|
281
|
+
|
|
282
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
283
|
+
|
|
284
|
+
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
285
|
+
if data is None:
|
|
286
|
+
return data
|
|
287
|
+
if isinstance(data, Unset):
|
|
288
|
+
return data
|
|
289
|
+
return cast(Union[None, Unset, str], data)
|
|
290
|
+
|
|
291
|
+
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
292
|
+
|
|
293
|
+
def _parse_error(data: object) -> Union[None, Unset, list[str]]:
|
|
248
294
|
if data is None:
|
|
249
295
|
return data
|
|
296
|
+
if isinstance(data, Unset):
|
|
297
|
+
return data
|
|
250
298
|
try:
|
|
251
299
|
if not isinstance(data, list):
|
|
252
300
|
raise TypeError()
|
|
@@ -255,13 +303,15 @@ class RunResponse:
|
|
|
255
303
|
return error_type_0
|
|
256
304
|
except: # noqa: E722
|
|
257
305
|
pass
|
|
258
|
-
return cast(Union[None, list[str]], data)
|
|
306
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
259
307
|
|
|
260
|
-
error = _parse_error(d.pop("error"))
|
|
308
|
+
error = _parse_error(d.pop("error", UNSET))
|
|
261
309
|
|
|
262
|
-
def _parse_output_data(data: object) -> Union["RunResponseOutputDataType0", None]:
|
|
310
|
+
def _parse_output_data(data: object) -> Union["RunResponseOutputDataType0", None, Unset]:
|
|
263
311
|
if data is None:
|
|
264
312
|
return data
|
|
313
|
+
if isinstance(data, Unset):
|
|
314
|
+
return data
|
|
265
315
|
try:
|
|
266
316
|
if not isinstance(data, dict):
|
|
267
317
|
raise TypeError()
|
|
@@ -270,13 +320,15 @@ class RunResponse:
|
|
|
270
320
|
return output_data_type_0
|
|
271
321
|
except: # noqa: E722
|
|
272
322
|
pass
|
|
273
|
-
return cast(Union["RunResponseOutputDataType0", None], data)
|
|
323
|
+
return cast(Union["RunResponseOutputDataType0", None, Unset], data)
|
|
274
324
|
|
|
275
|
-
output_data = _parse_output_data(d.pop("output_data"))
|
|
325
|
+
output_data = _parse_output_data(d.pop("output_data", UNSET))
|
|
276
326
|
|
|
277
|
-
def _parse_input_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
327
|
+
def _parse_input_attachment_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
278
328
|
if data is None:
|
|
279
329
|
return data
|
|
330
|
+
if isinstance(data, Unset):
|
|
331
|
+
return data
|
|
280
332
|
try:
|
|
281
333
|
if not isinstance(data, list):
|
|
282
334
|
raise TypeError()
|
|
@@ -285,13 +337,15 @@ class RunResponse:
|
|
|
285
337
|
return input_attachment_ids_type_0
|
|
286
338
|
except: # noqa: E722
|
|
287
339
|
pass
|
|
288
|
-
return cast(Union[None, list[str]], data)
|
|
340
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
289
341
|
|
|
290
|
-
input_attachment_ids = _parse_input_attachment_ids(d.pop("input_attachment_ids"))
|
|
342
|
+
input_attachment_ids = _parse_input_attachment_ids(d.pop("input_attachment_ids", UNSET))
|
|
291
343
|
|
|
292
|
-
def _parse_output_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
344
|
+
def _parse_output_attachment_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
293
345
|
if data is None:
|
|
294
346
|
return data
|
|
347
|
+
if isinstance(data, Unset):
|
|
348
|
+
return data
|
|
295
349
|
try:
|
|
296
350
|
if not isinstance(data, list):
|
|
297
351
|
raise TypeError()
|
|
@@ -300,13 +354,17 @@ class RunResponse:
|
|
|
300
354
|
return output_attachment_ids_type_0
|
|
301
355
|
except: # noqa: E722
|
|
302
356
|
pass
|
|
303
|
-
return cast(Union[None, list[str]], data)
|
|
357
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
304
358
|
|
|
305
|
-
output_attachment_ids = _parse_output_attachment_ids(d.pop("output_attachment_ids"))
|
|
359
|
+
output_attachment_ids = _parse_output_attachment_ids(d.pop("output_attachment_ids", UNSET))
|
|
306
360
|
|
|
307
|
-
def _parse_run_message_history(
|
|
361
|
+
def _parse_run_message_history(
|
|
362
|
+
data: object,
|
|
363
|
+
) -> Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]]:
|
|
308
364
|
if data is None:
|
|
309
365
|
return data
|
|
366
|
+
if isinstance(data, Unset):
|
|
367
|
+
return data
|
|
310
368
|
try:
|
|
311
369
|
if not isinstance(data, list):
|
|
312
370
|
raise TypeError()
|
|
@@ -322,13 +380,15 @@ class RunResponse:
|
|
|
322
380
|
return run_message_history_type_0
|
|
323
381
|
except: # noqa: E722
|
|
324
382
|
pass
|
|
325
|
-
return cast(Union[None, list["RunResponseRunMessageHistoryType0Item"]], data)
|
|
383
|
+
return cast(Union[None, Unset, list["RunResponseRunMessageHistoryType0Item"]], data)
|
|
326
384
|
|
|
327
|
-
run_message_history = _parse_run_message_history(d.pop("run_message_history"))
|
|
385
|
+
run_message_history = _parse_run_message_history(d.pop("run_message_history", UNSET))
|
|
328
386
|
|
|
329
|
-
def _parse_input_values(data: object) -> Union["RunResponseInputValuesType0", None]:
|
|
387
|
+
def _parse_input_values(data: object) -> Union["RunResponseInputValuesType0", None, Unset]:
|
|
330
388
|
if data is None:
|
|
331
389
|
return data
|
|
390
|
+
if isinstance(data, Unset):
|
|
391
|
+
return data
|
|
332
392
|
try:
|
|
333
393
|
if not isinstance(data, dict):
|
|
334
394
|
raise TypeError()
|
|
@@ -337,37 +397,9 @@ class RunResponse:
|
|
|
337
397
|
return input_values_type_0
|
|
338
398
|
except: # noqa: E722
|
|
339
399
|
pass
|
|
340
|
-
return cast(Union["RunResponseInputValuesType0", None], data)
|
|
341
|
-
|
|
342
|
-
input_values = _parse_input_values(d.pop("input_values"))
|
|
400
|
+
return cast(Union["RunResponseInputValuesType0", None, Unset], data)
|
|
343
401
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
347
|
-
if data is None:
|
|
348
|
-
return data
|
|
349
|
-
if isinstance(data, Unset):
|
|
350
|
-
return data
|
|
351
|
-
try:
|
|
352
|
-
if not isinstance(data, str):
|
|
353
|
-
raise TypeError()
|
|
354
|
-
user_id_type_0 = UUID(data)
|
|
355
|
-
|
|
356
|
-
return user_id_type_0
|
|
357
|
-
except: # noqa: E722
|
|
358
|
-
pass
|
|
359
|
-
return cast(Union[None, UUID, Unset], data)
|
|
360
|
-
|
|
361
|
-
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
362
|
-
|
|
363
|
-
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
364
|
-
if data is None:
|
|
365
|
-
return data
|
|
366
|
-
if isinstance(data, Unset):
|
|
367
|
-
return data
|
|
368
|
-
return cast(Union[None, Unset, str], data)
|
|
369
|
-
|
|
370
|
-
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
402
|
+
input_values = _parse_input_values(d.pop("input_values", UNSET))
|
|
371
403
|
|
|
372
404
|
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
373
405
|
if data is None:
|
|
@@ -448,15 +480,15 @@ class RunResponse:
|
|
|
448
480
|
machine_id=machine_id,
|
|
449
481
|
id=id,
|
|
450
482
|
status=status,
|
|
483
|
+
created_at=created_at,
|
|
484
|
+
user_id=user_id,
|
|
485
|
+
organization_id=organization_id,
|
|
451
486
|
error=error,
|
|
452
487
|
output_data=output_data,
|
|
453
488
|
input_attachment_ids=input_attachment_ids,
|
|
454
489
|
output_attachment_ids=output_attachment_ids,
|
|
455
490
|
run_message_history=run_message_history,
|
|
456
491
|
input_values=input_values,
|
|
457
|
-
created_at=created_at,
|
|
458
|
-
user_id=user_id,
|
|
459
|
-
organization_id=organization_id,
|
|
460
492
|
pool_ids=pool_ids,
|
|
461
493
|
sensitive_input_aliases=sensitive_input_aliases,
|
|
462
494
|
session_id=session_id,
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.file_input import FileInput
|
|
12
|
+
from ..models.run_retry_input_values_type_0 import RunRetryInputValuesType0
|
|
13
|
+
from ..models.run_retry_sensitive_input_values_type_0 import RunRetrySensitiveInputValuesType0
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="RunRetry")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class RunRetry:
|
|
21
|
+
"""Options for retrying an existing run in-place (same run_id).
|
|
22
|
+
|
|
23
|
+
Notes:
|
|
24
|
+
- If `file_inputs` are provided, existing input attachments are replaced.
|
|
25
|
+
- Prior outputs, history, and output attachments are always cleared as part of retry.
|
|
26
|
+
- Retry is only allowed for terminal runs (success, error, or cancelled).
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
input_values (Union['RunRetryInputValuesType0', None, Unset]): Override input values for workflow variables
|
|
30
|
+
sensitive_input_values (Union['RunRetrySensitiveInputValuesType0', None, Unset]): Provide new sensitive inputs;
|
|
31
|
+
stored in vault and mapped to aliases
|
|
32
|
+
file_inputs (Union[None, Unset, list['FileInput']]): Provide new input files for this retry; replaces existing
|
|
33
|
+
input attachments
|
|
34
|
+
machine_id (Union[None, UUID, Unset]): Override specific machine for this retry
|
|
35
|
+
pool_ids (Union[None, Unset, list[UUID]]): Override pool filters if not using a specific machine
|
|
36
|
+
reuse_session (Union[None, Unset, bool]): Keep existing session_id. If false and no session_id provided, clears
|
|
37
|
+
session fields Default: True.
|
|
38
|
+
session_id (Union[None, UUID, Unset]): Set/override session_id for this retry
|
|
39
|
+
release_session_after (Union[None, Unset, bool]): Override release_session_after behavior for this retry
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
input_values: Union["RunRetryInputValuesType0", None, Unset] = UNSET
|
|
43
|
+
sensitive_input_values: Union["RunRetrySensitiveInputValuesType0", None, Unset] = UNSET
|
|
44
|
+
file_inputs: Union[None, Unset, list["FileInput"]] = UNSET
|
|
45
|
+
machine_id: Union[None, UUID, Unset] = UNSET
|
|
46
|
+
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
47
|
+
reuse_session: Union[None, Unset, bool] = True
|
|
48
|
+
session_id: Union[None, UUID, Unset] = UNSET
|
|
49
|
+
release_session_after: Union[None, Unset, bool] = UNSET
|
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
|
53
|
+
from ..models.run_retry_input_values_type_0 import RunRetryInputValuesType0
|
|
54
|
+
from ..models.run_retry_sensitive_input_values_type_0 import RunRetrySensitiveInputValuesType0
|
|
55
|
+
|
|
56
|
+
input_values: Union[None, Unset, dict[str, Any]]
|
|
57
|
+
if isinstance(self.input_values, Unset):
|
|
58
|
+
input_values = UNSET
|
|
59
|
+
elif isinstance(self.input_values, RunRetryInputValuesType0):
|
|
60
|
+
input_values = self.input_values.to_dict()
|
|
61
|
+
else:
|
|
62
|
+
input_values = self.input_values
|
|
63
|
+
|
|
64
|
+
sensitive_input_values: Union[None, Unset, dict[str, Any]]
|
|
65
|
+
if isinstance(self.sensitive_input_values, Unset):
|
|
66
|
+
sensitive_input_values = UNSET
|
|
67
|
+
elif isinstance(self.sensitive_input_values, RunRetrySensitiveInputValuesType0):
|
|
68
|
+
sensitive_input_values = self.sensitive_input_values.to_dict()
|
|
69
|
+
else:
|
|
70
|
+
sensitive_input_values = self.sensitive_input_values
|
|
71
|
+
|
|
72
|
+
file_inputs: Union[None, Unset, list[dict[str, Any]]]
|
|
73
|
+
if isinstance(self.file_inputs, Unset):
|
|
74
|
+
file_inputs = UNSET
|
|
75
|
+
elif isinstance(self.file_inputs, list):
|
|
76
|
+
file_inputs = []
|
|
77
|
+
for file_inputs_type_0_item_data in self.file_inputs:
|
|
78
|
+
file_inputs_type_0_item = file_inputs_type_0_item_data.to_dict()
|
|
79
|
+
file_inputs.append(file_inputs_type_0_item)
|
|
80
|
+
|
|
81
|
+
else:
|
|
82
|
+
file_inputs = self.file_inputs
|
|
83
|
+
|
|
84
|
+
machine_id: Union[None, Unset, str]
|
|
85
|
+
if isinstance(self.machine_id, Unset):
|
|
86
|
+
machine_id = UNSET
|
|
87
|
+
elif isinstance(self.machine_id, UUID):
|
|
88
|
+
machine_id = str(self.machine_id)
|
|
89
|
+
else:
|
|
90
|
+
machine_id = self.machine_id
|
|
91
|
+
|
|
92
|
+
pool_ids: Union[None, Unset, list[str]]
|
|
93
|
+
if isinstance(self.pool_ids, Unset):
|
|
94
|
+
pool_ids = UNSET
|
|
95
|
+
elif isinstance(self.pool_ids, list):
|
|
96
|
+
pool_ids = []
|
|
97
|
+
for pool_ids_type_0_item_data in self.pool_ids:
|
|
98
|
+
pool_ids_type_0_item = str(pool_ids_type_0_item_data)
|
|
99
|
+
pool_ids.append(pool_ids_type_0_item)
|
|
100
|
+
|
|
101
|
+
else:
|
|
102
|
+
pool_ids = self.pool_ids
|
|
103
|
+
|
|
104
|
+
reuse_session: Union[None, Unset, bool]
|
|
105
|
+
if isinstance(self.reuse_session, Unset):
|
|
106
|
+
reuse_session = UNSET
|
|
107
|
+
else:
|
|
108
|
+
reuse_session = self.reuse_session
|
|
109
|
+
|
|
110
|
+
session_id: Union[None, Unset, str]
|
|
111
|
+
if isinstance(self.session_id, Unset):
|
|
112
|
+
session_id = UNSET
|
|
113
|
+
elif isinstance(self.session_id, UUID):
|
|
114
|
+
session_id = str(self.session_id)
|
|
115
|
+
else:
|
|
116
|
+
session_id = self.session_id
|
|
117
|
+
|
|
118
|
+
release_session_after: Union[None, Unset, bool]
|
|
119
|
+
if isinstance(self.release_session_after, Unset):
|
|
120
|
+
release_session_after = UNSET
|
|
121
|
+
else:
|
|
122
|
+
release_session_after = self.release_session_after
|
|
123
|
+
|
|
124
|
+
field_dict: dict[str, Any] = {}
|
|
125
|
+
field_dict.update(self.additional_properties)
|
|
126
|
+
field_dict.update({})
|
|
127
|
+
if input_values is not UNSET:
|
|
128
|
+
field_dict["input_values"] = input_values
|
|
129
|
+
if sensitive_input_values is not UNSET:
|
|
130
|
+
field_dict["sensitive_input_values"] = sensitive_input_values
|
|
131
|
+
if file_inputs is not UNSET:
|
|
132
|
+
field_dict["file_inputs"] = file_inputs
|
|
133
|
+
if machine_id is not UNSET:
|
|
134
|
+
field_dict["machine_id"] = machine_id
|
|
135
|
+
if pool_ids is not UNSET:
|
|
136
|
+
field_dict["pool_ids"] = pool_ids
|
|
137
|
+
if reuse_session is not UNSET:
|
|
138
|
+
field_dict["reuse_session"] = reuse_session
|
|
139
|
+
if session_id is not UNSET:
|
|
140
|
+
field_dict["session_id"] = session_id
|
|
141
|
+
if release_session_after is not UNSET:
|
|
142
|
+
field_dict["release_session_after"] = release_session_after
|
|
143
|
+
|
|
144
|
+
return field_dict
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
148
|
+
from ..models.file_input import FileInput
|
|
149
|
+
from ..models.run_retry_input_values_type_0 import RunRetryInputValuesType0
|
|
150
|
+
from ..models.run_retry_sensitive_input_values_type_0 import RunRetrySensitiveInputValuesType0
|
|
151
|
+
|
|
152
|
+
d = dict(src_dict)
|
|
153
|
+
|
|
154
|
+
def _parse_input_values(data: object) -> Union["RunRetryInputValuesType0", None, Unset]:
|
|
155
|
+
if data is None:
|
|
156
|
+
return data
|
|
157
|
+
if isinstance(data, Unset):
|
|
158
|
+
return data
|
|
159
|
+
try:
|
|
160
|
+
if not isinstance(data, dict):
|
|
161
|
+
raise TypeError()
|
|
162
|
+
input_values_type_0 = RunRetryInputValuesType0.from_dict(data)
|
|
163
|
+
|
|
164
|
+
return input_values_type_0
|
|
165
|
+
except: # noqa: E722
|
|
166
|
+
pass
|
|
167
|
+
return cast(Union["RunRetryInputValuesType0", None, Unset], data)
|
|
168
|
+
|
|
169
|
+
input_values = _parse_input_values(d.pop("input_values", UNSET))
|
|
170
|
+
|
|
171
|
+
def _parse_sensitive_input_values(data: object) -> Union["RunRetrySensitiveInputValuesType0", None, Unset]:
|
|
172
|
+
if data is None:
|
|
173
|
+
return data
|
|
174
|
+
if isinstance(data, Unset):
|
|
175
|
+
return data
|
|
176
|
+
try:
|
|
177
|
+
if not isinstance(data, dict):
|
|
178
|
+
raise TypeError()
|
|
179
|
+
sensitive_input_values_type_0 = RunRetrySensitiveInputValuesType0.from_dict(data)
|
|
180
|
+
|
|
181
|
+
return sensitive_input_values_type_0
|
|
182
|
+
except: # noqa: E722
|
|
183
|
+
pass
|
|
184
|
+
return cast(Union["RunRetrySensitiveInputValuesType0", None, Unset], data)
|
|
185
|
+
|
|
186
|
+
sensitive_input_values = _parse_sensitive_input_values(d.pop("sensitive_input_values", UNSET))
|
|
187
|
+
|
|
188
|
+
def _parse_file_inputs(data: object) -> Union[None, Unset, list["FileInput"]]:
|
|
189
|
+
if data is None:
|
|
190
|
+
return data
|
|
191
|
+
if isinstance(data, Unset):
|
|
192
|
+
return data
|
|
193
|
+
try:
|
|
194
|
+
if not isinstance(data, list):
|
|
195
|
+
raise TypeError()
|
|
196
|
+
file_inputs_type_0 = []
|
|
197
|
+
_file_inputs_type_0 = data
|
|
198
|
+
for file_inputs_type_0_item_data in _file_inputs_type_0:
|
|
199
|
+
file_inputs_type_0_item = FileInput.from_dict(file_inputs_type_0_item_data)
|
|
200
|
+
|
|
201
|
+
file_inputs_type_0.append(file_inputs_type_0_item)
|
|
202
|
+
|
|
203
|
+
return file_inputs_type_0
|
|
204
|
+
except: # noqa: E722
|
|
205
|
+
pass
|
|
206
|
+
return cast(Union[None, Unset, list["FileInput"]], data)
|
|
207
|
+
|
|
208
|
+
file_inputs = _parse_file_inputs(d.pop("file_inputs", UNSET))
|
|
209
|
+
|
|
210
|
+
def _parse_machine_id(data: object) -> Union[None, UUID, Unset]:
|
|
211
|
+
if data is None:
|
|
212
|
+
return data
|
|
213
|
+
if isinstance(data, Unset):
|
|
214
|
+
return data
|
|
215
|
+
try:
|
|
216
|
+
if not isinstance(data, str):
|
|
217
|
+
raise TypeError()
|
|
218
|
+
machine_id_type_0 = UUID(data)
|
|
219
|
+
|
|
220
|
+
return machine_id_type_0
|
|
221
|
+
except: # noqa: E722
|
|
222
|
+
pass
|
|
223
|
+
return cast(Union[None, UUID, Unset], data)
|
|
224
|
+
|
|
225
|
+
machine_id = _parse_machine_id(d.pop("machine_id", UNSET))
|
|
226
|
+
|
|
227
|
+
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
228
|
+
if data is None:
|
|
229
|
+
return data
|
|
230
|
+
if isinstance(data, Unset):
|
|
231
|
+
return data
|
|
232
|
+
try:
|
|
233
|
+
if not isinstance(data, list):
|
|
234
|
+
raise TypeError()
|
|
235
|
+
pool_ids_type_0 = []
|
|
236
|
+
_pool_ids_type_0 = data
|
|
237
|
+
for pool_ids_type_0_item_data in _pool_ids_type_0:
|
|
238
|
+
pool_ids_type_0_item = UUID(pool_ids_type_0_item_data)
|
|
239
|
+
|
|
240
|
+
pool_ids_type_0.append(pool_ids_type_0_item)
|
|
241
|
+
|
|
242
|
+
return pool_ids_type_0
|
|
243
|
+
except: # noqa: E722
|
|
244
|
+
pass
|
|
245
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
246
|
+
|
|
247
|
+
pool_ids = _parse_pool_ids(d.pop("pool_ids", UNSET))
|
|
248
|
+
|
|
249
|
+
def _parse_reuse_session(data: object) -> Union[None, Unset, bool]:
|
|
250
|
+
if data is None:
|
|
251
|
+
return data
|
|
252
|
+
if isinstance(data, Unset):
|
|
253
|
+
return data
|
|
254
|
+
return cast(Union[None, Unset, bool], data)
|
|
255
|
+
|
|
256
|
+
reuse_session = _parse_reuse_session(d.pop("reuse_session", UNSET))
|
|
257
|
+
|
|
258
|
+
def _parse_session_id(data: object) -> Union[None, UUID, Unset]:
|
|
259
|
+
if data is None:
|
|
260
|
+
return data
|
|
261
|
+
if isinstance(data, Unset):
|
|
262
|
+
return data
|
|
263
|
+
try:
|
|
264
|
+
if not isinstance(data, str):
|
|
265
|
+
raise TypeError()
|
|
266
|
+
session_id_type_0 = UUID(data)
|
|
267
|
+
|
|
268
|
+
return session_id_type_0
|
|
269
|
+
except: # noqa: E722
|
|
270
|
+
pass
|
|
271
|
+
return cast(Union[None, UUID, Unset], data)
|
|
272
|
+
|
|
273
|
+
session_id = _parse_session_id(d.pop("session_id", UNSET))
|
|
274
|
+
|
|
275
|
+
def _parse_release_session_after(data: object) -> Union[None, Unset, bool]:
|
|
276
|
+
if data is None:
|
|
277
|
+
return data
|
|
278
|
+
if isinstance(data, Unset):
|
|
279
|
+
return data
|
|
280
|
+
return cast(Union[None, Unset, bool], data)
|
|
281
|
+
|
|
282
|
+
release_session_after = _parse_release_session_after(d.pop("release_session_after", UNSET))
|
|
283
|
+
|
|
284
|
+
run_retry = cls(
|
|
285
|
+
input_values=input_values,
|
|
286
|
+
sensitive_input_values=sensitive_input_values,
|
|
287
|
+
file_inputs=file_inputs,
|
|
288
|
+
machine_id=machine_id,
|
|
289
|
+
pool_ids=pool_ids,
|
|
290
|
+
reuse_session=reuse_session,
|
|
291
|
+
session_id=session_id,
|
|
292
|
+
release_session_after=release_session_after,
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
run_retry.additional_properties = d
|
|
296
|
+
return run_retry
|
|
297
|
+
|
|
298
|
+
@property
|
|
299
|
+
def additional_keys(self) -> list[str]:
|
|
300
|
+
return list(self.additional_properties.keys())
|
|
301
|
+
|
|
302
|
+
def __getitem__(self, key: str) -> Any:
|
|
303
|
+
return self.additional_properties[key]
|
|
304
|
+
|
|
305
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
306
|
+
self.additional_properties[key] = value
|
|
307
|
+
|
|
308
|
+
def __delitem__(self, key: str) -> None:
|
|
309
|
+
del self.additional_properties[key]
|
|
310
|
+
|
|
311
|
+
def __contains__(self, key: str) -> bool:
|
|
312
|
+
return key in self.additional_properties
|