cyberdesk 2.1.11__py3-none-any.whl → 2.1.12__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.
cyberdesk/__init__.py CHANGED
@@ -27,7 +27,7 @@ from .client import (
27
27
  AttachmentType,
28
28
  )
29
29
 
30
- __version__ = "2.1.11"
30
+ __version__ = "2.1.12"
31
31
 
32
32
  __all__ = [
33
33
  "CyberdeskClient",
cyberdesk/client.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """Cyberdesk Python SDK Client."""
2
- from typing import Optional, Dict, Any, Union
2
+ from typing import Optional, Dict, Any, Union, List
3
3
  from uuid import UUID
4
4
  from pathlib import Path
5
5
  import httpx
@@ -42,6 +42,7 @@ from openapi_client.cyberdesk_cloud_client.api.runs import (
42
42
  delete_run_v1_runs_run_id_delete,
43
43
  bulk_create_runs_v1_runs_bulk_post,
44
44
  create_run_chain_v1_runs_chain_post,
45
+ retry_run_v1_runs_run_id_retry_post,
45
46
  )
46
47
  from openapi_client.cyberdesk_cloud_client.api.connections import (
47
48
  list_connections_v1_connections_get,
@@ -107,6 +108,8 @@ from openapi_client.cyberdesk_cloud_client.models import (
107
108
  PaginatedResponseConnectionResponse,
108
109
  PaginatedResponseTrajectoryResponse,
109
110
  PaginatedResponseRunAttachmentResponse,
111
+ RunRetry,
112
+ RunField,
110
113
  )
111
114
 
112
115
  # Re-export common types
@@ -145,6 +148,8 @@ __all__ = [
145
148
  "RunAttachmentResponse",
146
149
  "RunAttachmentDownloadUrlResponse",
147
150
  "AttachmentType",
151
+ "RunRetry",
152
+ "RunField",
148
153
  ]
149
154
 
150
155
  DEFAULT_API_BASE_URL = "https://api.cyberdesk.io"
@@ -845,8 +850,23 @@ class RunsAPI:
845
850
  *,
846
851
  created_at_from: Optional[Union[str, datetime]] = None,
847
852
  created_at_to: Optional[Union[str, datetime]] = None,
853
+ fields: Optional[List[RunField]] = None,
848
854
  ) -> ApiResponse:
849
- """List runs with optional filtering."""
855
+ """List runs with optional filtering.
856
+
857
+ Args:
858
+ skip: Pagination skip
859
+ limit: Pagination limit
860
+ status: Run status filter
861
+ workflow_id: Filter by workflow ID
862
+ machine_id: Filter by machine ID
863
+ session_id: Filter by session ID
864
+ created_at_from: Optional start datetime (UTC or ISO string)
865
+ created_at_to: Optional end datetime (UTC or ISO string)
866
+ fields: Optional list of fields to include per run (projection). When set,
867
+ the response includes only these plus base fields (id, workflow_id,
868
+ machine_id, status, created_at).
869
+ """
850
870
  try:
851
871
  response = await list_runs_v1_runs_get.asyncio(
852
872
  client=self.client,
@@ -858,6 +878,7 @@ class RunsAPI:
858
878
  session_id=_to_uuid(session_id) if session_id else UNSET,
859
879
  created_at_from=_to_unset_or_value(_to_iso_utc_str(created_at_from)),
860
880
  created_at_to=_to_unset_or_value(_to_iso_utc_str(created_at_to)),
881
+ fields=_to_unset_or_value(fields),
861
882
  )
862
883
  return ApiResponse(data=response)
863
884
  except Exception as e:
@@ -874,8 +895,12 @@ class RunsAPI:
874
895
  *,
875
896
  created_at_from: Optional[Union[str, datetime]] = None,
876
897
  created_at_to: Optional[Union[str, datetime]] = None,
898
+ fields: Optional[List[RunField]] = None,
877
899
  ) -> ApiResponse:
878
- """List runs with optional filtering (synchronous)."""
900
+ """List runs with optional filtering (synchronous).
901
+
902
+ See async variant for parameter docs. Supports `fields` projection.
903
+ """
879
904
  try:
880
905
  response = list_runs_v1_runs_get.sync(
881
906
  client=self.client,
@@ -887,6 +912,35 @@ class RunsAPI:
887
912
  session_id=_to_uuid(session_id) if session_id else UNSET,
888
913
  created_at_from=_to_unset_or_value(_to_iso_utc_str(created_at_from)),
889
914
  created_at_to=_to_unset_or_value(_to_iso_utc_str(created_at_to)),
915
+ fields=_to_unset_or_value(fields),
916
+ )
917
+ return ApiResponse(data=response)
918
+ except Exception as e:
919
+ return ApiResponse(error=e)
920
+
921
+ async def retry(self, run_id: str, retry: RunRetry) -> ApiResponse:
922
+ """Retry an existing run in-place (same run_id).
923
+
924
+ Clears previous outputs/history/output attachments, optionally replaces inputs/files,
925
+ and attempts immediate assignment unless the session is busy.
926
+ """
927
+ try:
928
+ response = await retry_run_v1_runs_run_id_retry_post.asyncio(
929
+ client=self.client,
930
+ run_id=_to_uuid(run_id),
931
+ body=retry,
932
+ )
933
+ return ApiResponse(data=response)
934
+ except Exception as e:
935
+ return ApiResponse(error=e)
936
+
937
+ def retry_sync(self, run_id: str, retry: RunRetry) -> ApiResponse:
938
+ """Retry an existing run in-place (synchronous)."""
939
+ try:
940
+ response = retry_run_v1_runs_run_id_retry_post.sync(
941
+ client=self.client,
942
+ run_id=_to_uuid(run_id),
943
+ body=retry,
890
944
  )
891
945
  return ApiResponse(data=response)
892
946
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cyberdesk
3
- Version: 2.1.11
3
+ Version: 2.1.12
4
4
  Summary: The official Python SDK for Cyberdesk
5
5
  Author-email: Cyberdesk Team <dev@cyberdesk.io>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
- cyberdesk/__init__.py,sha256=IRuGwBM3R6AvT_clS3a6XwVrGAcW0Z-SJNsN-sdHE94,1158
2
- cyberdesk/client.py,sha256=A-2h82f1AIpjv_oV65R-KvKd0rx_Zfq5UuNwunsVu08,66539
3
- cyberdesk-2.1.11.dist-info/licenses/LICENSE,sha256=06Op63FCwGhuUOz__M8IZW5sxd29WxyGC4X5-Uih7IQ,1071
1
+ cyberdesk/__init__.py,sha256=JQJwCuDo4LrerM-RiblL77lxTVS5MAlmMQAfF1rZgcA,1158
2
+ cyberdesk/client.py,sha256=72fhbiHZcvQl08ncoEArUZROECRfSkmf5MXY7do2KPM,68639
3
+ cyberdesk-2.1.12.dist-info/licenses/LICENSE,sha256=06Op63FCwGhuUOz__M8IZW5sxd29WxyGC4X5-Uih7IQ,1071
4
4
  openapi_client/cyberdesk_cloud_client/__init__.py,sha256=r_uVkNUL-SOK8j7-KiGMIKdinES5X8K1Q250ySX2F-A,158
5
5
  openapi_client/cyberdesk_cloud_client/client.py,sha256=o_mdLqyBCQstu5tS1WZFwqIEbGwkvWQ7eQjuCJw_5VY,12419
6
6
  openapi_client/cyberdesk_cloud_client/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
@@ -70,7 +70,8 @@ openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_po
70
70
  openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py,sha256=GhCe-A0JxVWvTgzA4AyKEJQOlem0uzttLmXBxRLlUys,5451
71
71
  openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py,sha256=dOGd7lAPd9SBn9-13zhTx-wTtM6YQvT3WspjIQjOhHg,4428
72
72
  openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py,sha256=4mPvnOtAICVqzyXbD5Gdtqq_f1ardg7WpseT8RI3mwQ,4594
73
- openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py,sha256=aaKdDfjud7q_H4a2K7spWgv-Q-ldPtcBWLCz0AfKW3k,12335
73
+ openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py,sha256=UkGSCJLjYUV1N5GE2oRsgIBFR7oBY-xd7-Tqk9WYqOQ,14110
74
+ openapi_client/cyberdesk_cloud_client/api/runs/retry_run_v1_runs_run_id_retry_post.py,sha256=MXcx43mfhQmRGcaSuzGC1GFyuzJdh3IWZbD3VOw-ZFE,7404
74
75
  openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py,sha256=8m2VaIjCilDkmkzgZ1D7JfNScDqgNRheaaUcuMqPibQ,5182
75
76
  openapi_client/cyberdesk_cloud_client/api/test/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
76
77
  openapi_client/cyberdesk_cloud_client/api/test/dummy_test_endpoint_v1_test_post.py,sha256=sxmvHugxdpK3jb8jmjUfo-pbzmmNU92C-Ze8quxSWC8,4642
@@ -88,7 +89,7 @@ openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_wo
88
89
  openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py,sha256=ax_5V-lIClvOxr50eXSIAPbyhWP-cS4a4DXzwdxkVYs,5889
89
90
  openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py,sha256=Aszxh1BlUuRqMHjT7lvZf8g6kDCcNUZtuwoJqhDOwlQ,11258
90
91
  openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py,sha256=K_tuO6s_FyM8MUOck5AuX_RNIeYqCQcfYx1aDg9xwhE,5737
91
- openapi_client/cyberdesk_cloud_client/models/__init__.py,sha256=ucZQdTLcqDH1pUOq5qINlsFO6wqwYIa6JKJt3nycrJQ,10262
92
+ openapi_client/cyberdesk_cloud_client/models/__init__.py,sha256=xT6qmjL5fV-b9JAabLs875XrPZvB_4APm30nDRQW72U,10586
92
93
  openapi_client/cyberdesk_cloud_client/models/attachment_type.py,sha256=zqPOsSd2AmxGNqb5HQ6ZYBAYL8k-0UbWHhfAJYNHoro,161
93
94
  openapi_client/cyberdesk_cloud_client/models/chain_step.py,sha256=mdWyUoC-zPXPkNc_JWONbEKao5VH5az2LQNJA3mmG1k,3871
94
95
  openapi_client/cyberdesk_cloud_client/models/chain_step_inputs_type_0.py,sha256=fLKmOSl7rEi7pRrXbY1sqiVdbCNg0mGj2cPOb5_7hh4,2368
@@ -151,11 +152,15 @@ openapi_client/cyberdesk_cloud_client/models/run_completed_event.py,sha256=JP4ok
151
152
  openapi_client/cyberdesk_cloud_client/models/run_create.py,sha256=iSgRvNXZuKsHel5N5Sq9eoJw0NQ-_a93mM9CXRg7qQU,13412
152
153
  openapi_client/cyberdesk_cloud_client/models/run_create_input_values_type_0.py,sha256=APV4O0GduU3fhHoJHMMOBk-h92Hf21c1ZU-pIsJoZpg,1282
153
154
  openapi_client/cyberdesk_cloud_client/models/run_create_sensitive_input_values_type_0.py,sha256=gtmXorTEeOVv2fYJKkHCSFhKCRMvE-6-XjfNfNhiNMY,1330
155
+ openapi_client/cyberdesk_cloud_client/models/run_field.py,sha256=XkEqI19aka8ap98dJ9AULywFPamjxXF1ZsvDm00fxNI,643
154
156
  openapi_client/cyberdesk_cloud_client/models/run_response.py,sha256=Pb3MGH1hdleAejryN2MAz5QXaEPJkzULrJ6bDI8BbR4,18385
155
157
  openapi_client/cyberdesk_cloud_client/models/run_response_input_values_type_0.py,sha256=NpMqT3qaMrLGA7mHBjvtS1fnMGc5zxwWLoFWunjjupA,1292
156
158
  openapi_client/cyberdesk_cloud_client/models/run_response_output_data_type_0.py,sha256=rO4YJAa26G_83CFtBTQ_ZKCURAxNS7PcvdKbfuvDcrA,1287
157
159
  openapi_client/cyberdesk_cloud_client/models/run_response_run_message_history_type_0_item.py,sha256=3x1N3yi3kyc1que3bizmHEuGBn5s7pEirEg4TgBV9FU,1348
158
160
  openapi_client/cyberdesk_cloud_client/models/run_response_sensitive_input_aliases_type_0.py,sha256=zKdXtKDOG2iv_1vtqzSGGuAthXP6JR7fKmiabJSvQE0,1345
161
+ openapi_client/cyberdesk_cloud_client/models/run_retry.py,sha256=P8Dt_TLy9mRnAQqg4ocy2yVPCJ-XchdjYhjvv5E4Pzk,12496
162
+ openapi_client/cyberdesk_cloud_client/models/run_retry_input_values_type_0.py,sha256=8gxJJsGMpbN06RLuJoCvbD2k9RZcQap81EfmRnfDG6s,1277
163
+ openapi_client/cyberdesk_cloud_client/models/run_retry_sensitive_input_values_type_0.py,sha256=NCTtTtCk5sWjT-gQjLwYeVqhmkLqNNap9UKnt0y-YgA,1325
159
164
  openapi_client/cyberdesk_cloud_client/models/run_status.py,sha256=Qbsj-KKplPDamvoJvyOK_sZp7XKj6SPf8J9WnRwOhXk,240
160
165
  openapi_client/cyberdesk_cloud_client/models/run_update.py,sha256=EY8zP-Dd3WgGNdUVDy1QUM6UPAZH4rNMEOPYjVej-Mo,9974
161
166
  openapi_client/cyberdesk_cloud_client/models/run_update_input_values_type_0.py,sha256=Dg_CSahXf_M8x7go8K0BoUrHWnoKpc6l-IFPeT15DNk,1282
@@ -180,7 +185,7 @@ openapi_client/cyberdesk_cloud_client/models/workflow_create.py,sha256=d0bfNbNBF
180
185
  openapi_client/cyberdesk_cloud_client/models/workflow_response.py,sha256=k48mouJ6Dcisz2vyM7Rb_cbjU66JudGVPsq4UC7grHA,8977
181
186
  openapi_client/cyberdesk_cloud_client/models/workflow_response_old_versions_type_0_item.py,sha256=W9AxxlBlN3rUwLDcoUx5H7MUiYA9UztfX9iEpNGlgAs,1340
182
187
  openapi_client/cyberdesk_cloud_client/models/workflow_update.py,sha256=TG2jEitXixS2thtz7lTxTZaE0RBVSWd-apVxWxsvnrg,5333
183
- cyberdesk-2.1.11.dist-info/METADATA,sha256=puGRa_rdWY9CT67GCkRGg7PwIDXUxnTchfAtJA9todk,6792
184
- cyberdesk-2.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
185
- cyberdesk-2.1.11.dist-info/top_level.txt,sha256=qTYHZHVHh3VClNPQsiFFA8p8tmJgFGhq9G1COd-pX_A,25
186
- cyberdesk-2.1.11.dist-info/RECORD,,
188
+ cyberdesk-2.1.12.dist-info/METADATA,sha256=yIe3Sgc1oGgMfwOo9KTvH9QSAj7Rus6zyHlgw604oq4,6792
189
+ cyberdesk-2.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
190
+ cyberdesk-2.1.12.dist-info/top_level.txt,sha256=qTYHZHVHh3VClNPQsiFFA8p8tmJgFGhq9G1COd-pX_A,25
191
+ cyberdesk-2.1.12.dist-info/RECORD,,
@@ -9,6 +9,7 @@ from ... import errors
9
9
  from ...client import AuthenticatedClient, Client
10
10
  from ...models.http_validation_error import HTTPValidationError
11
11
  from ...models.paginated_response_run_response import PaginatedResponseRunResponse
12
+ from ...models.run_field import RunField
12
13
  from ...models.run_status import RunStatus
13
14
  from ...types import UNSET, Response, Unset
14
15
 
@@ -21,6 +22,7 @@ def _get_kwargs(
21
22
  status: Union[None, RunStatus, Unset] = UNSET,
22
23
  created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
23
24
  created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
25
+ fields: Union[None, Unset, list[RunField]] = UNSET,
24
26
  skip: Union[Unset, int] = 0,
25
27
  limit: Union[Unset, int] = 100,
26
28
  ) -> dict[str, Any]:
@@ -80,6 +82,19 @@ def _get_kwargs(
80
82
  json_created_at_to = created_at_to
81
83
  params["created_at_to"] = json_created_at_to
82
84
 
85
+ json_fields: Union[None, Unset, list[str]]
86
+ if isinstance(fields, Unset):
87
+ json_fields = UNSET
88
+ elif isinstance(fields, list):
89
+ json_fields = []
90
+ for fields_type_0_item_data in fields:
91
+ fields_type_0_item = fields_type_0_item_data.value
92
+ json_fields.append(fields_type_0_item)
93
+
94
+ else:
95
+ json_fields = fields
96
+ params["fields"] = json_fields
97
+
83
98
  params["skip"] = skip
84
99
 
85
100
  params["limit"] = limit
@@ -132,6 +147,7 @@ def sync_detailed(
132
147
  status: Union[None, RunStatus, Unset] = UNSET,
133
148
  created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
134
149
  created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
150
+ fields: Union[None, Unset, list[RunField]] = UNSET,
135
151
  skip: Union[Unset, int] = 0,
136
152
  limit: Union[Unset, int] = 100,
137
153
  ) -> Response[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
@@ -151,6 +167,9 @@ def sync_detailed(
151
167
  this ISO timestamp (UTC)
152
168
  created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
153
169
  this ISO timestamp (UTC)
170
+ fields (Union[None, Unset, list[RunField]]): Optional list of fields to include per run.
171
+ Always includes: id, workflow_id, machine_id, status, created_at. Provide multiple
172
+ 'fields=' params to include more.
154
173
  skip (Union[Unset, int]): Default: 0.
155
174
  limit (Union[Unset, int]): Default: 100.
156
175
 
@@ -169,6 +188,7 @@ def sync_detailed(
169
188
  status=status,
170
189
  created_at_from=created_at_from,
171
190
  created_at_to=created_at_to,
191
+ fields=fields,
172
192
  skip=skip,
173
193
  limit=limit,
174
194
  )
@@ -189,6 +209,7 @@ def sync(
189
209
  status: Union[None, RunStatus, Unset] = UNSET,
190
210
  created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
191
211
  created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
212
+ fields: Union[None, Unset, list[RunField]] = UNSET,
192
213
  skip: Union[Unset, int] = 0,
193
214
  limit: Union[Unset, int] = 100,
194
215
  ) -> Optional[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
@@ -208,6 +229,9 @@ def sync(
208
229
  this ISO timestamp (UTC)
209
230
  created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
210
231
  this ISO timestamp (UTC)
232
+ fields (Union[None, Unset, list[RunField]]): Optional list of fields to include per run.
233
+ Always includes: id, workflow_id, machine_id, status, created_at. Provide multiple
234
+ 'fields=' params to include more.
211
235
  skip (Union[Unset, int]): Default: 0.
212
236
  limit (Union[Unset, int]): Default: 100.
213
237
 
@@ -227,6 +251,7 @@ def sync(
227
251
  status=status,
228
252
  created_at_from=created_at_from,
229
253
  created_at_to=created_at_to,
254
+ fields=fields,
230
255
  skip=skip,
231
256
  limit=limit,
232
257
  ).parsed
@@ -241,6 +266,7 @@ async def asyncio_detailed(
241
266
  status: Union[None, RunStatus, Unset] = UNSET,
242
267
  created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
243
268
  created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
269
+ fields: Union[None, Unset, list[RunField]] = UNSET,
244
270
  skip: Union[Unset, int] = 0,
245
271
  limit: Union[Unset, int] = 100,
246
272
  ) -> Response[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
@@ -260,6 +286,9 @@ async def asyncio_detailed(
260
286
  this ISO timestamp (UTC)
261
287
  created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
262
288
  this ISO timestamp (UTC)
289
+ fields (Union[None, Unset, list[RunField]]): Optional list of fields to include per run.
290
+ Always includes: id, workflow_id, machine_id, status, created_at. Provide multiple
291
+ 'fields=' params to include more.
263
292
  skip (Union[Unset, int]): Default: 0.
264
293
  limit (Union[Unset, int]): Default: 100.
265
294
 
@@ -278,6 +307,7 @@ async def asyncio_detailed(
278
307
  status=status,
279
308
  created_at_from=created_at_from,
280
309
  created_at_to=created_at_to,
310
+ fields=fields,
281
311
  skip=skip,
282
312
  limit=limit,
283
313
  )
@@ -296,6 +326,7 @@ async def asyncio(
296
326
  status: Union[None, RunStatus, Unset] = UNSET,
297
327
  created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
298
328
  created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
329
+ fields: Union[None, Unset, list[RunField]] = UNSET,
299
330
  skip: Union[Unset, int] = 0,
300
331
  limit: Union[Unset, int] = 100,
301
332
  ) -> Optional[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
@@ -315,6 +346,9 @@ async def asyncio(
315
346
  this ISO timestamp (UTC)
316
347
  created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
317
348
  this ISO timestamp (UTC)
349
+ fields (Union[None, Unset, list[RunField]]): Optional list of fields to include per run.
350
+ Always includes: id, workflow_id, machine_id, status, created_at. Provide multiple
351
+ 'fields=' params to include more.
318
352
  skip (Union[Unset, int]): Default: 0.
319
353
  limit (Union[Unset, int]): Default: 100.
320
354
 
@@ -335,6 +369,7 @@ async def asyncio(
335
369
  status=status,
336
370
  created_at_from=created_at_from,
337
371
  created_at_to=created_at_to,
372
+ fields=fields,
338
373
  skip=skip,
339
374
  limit=limit,
340
375
  )
@@ -0,0 +1,230 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...models.run_response import RunResponse
11
+ from ...models.run_retry import RunRetry
12
+ from ...types import Response
13
+
14
+
15
+ def _get_kwargs(
16
+ run_id: UUID,
17
+ *,
18
+ body: RunRetry,
19
+ ) -> dict[str, Any]:
20
+ headers: dict[str, Any] = {}
21
+
22
+ _kwargs: dict[str, Any] = {
23
+ "method": "post",
24
+ "url": f"/v1/runs/{run_id}/retry",
25
+ }
26
+
27
+ _kwargs["json"] = body.to_dict()
28
+
29
+ headers["Content-Type"] = "application/json"
30
+
31
+ _kwargs["headers"] = headers
32
+ return _kwargs
33
+
34
+
35
+ def _parse_response(
36
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
37
+ ) -> Optional[Union[HTTPValidationError, RunResponse]]:
38
+ if response.status_code == 200:
39
+ response_200 = RunResponse.from_dict(response.json())
40
+
41
+ return response_200
42
+ if response.status_code == 422:
43
+ response_422 = HTTPValidationError.from_dict(response.json())
44
+
45
+ return response_422
46
+ if client.raise_on_unexpected_status:
47
+ raise errors.UnexpectedStatus(response.status_code, response.content)
48
+ else:
49
+ return None
50
+
51
+
52
+ def _build_response(
53
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
54
+ ) -> Response[Union[HTTPValidationError, RunResponse]]:
55
+ return Response(
56
+ status_code=HTTPStatus(response.status_code),
57
+ content=response.content,
58
+ headers=response.headers,
59
+ parsed=_parse_response(client=client, response=response),
60
+ )
61
+
62
+
63
+ def sync_detailed(
64
+ run_id: UUID,
65
+ *,
66
+ client: AuthenticatedClient,
67
+ body: RunRetry,
68
+ ) -> Response[Union[HTTPValidationError, RunResponse]]:
69
+ """Retry Run
70
+
71
+ Retry an existing run in-place (same run_id).
72
+
73
+ - Rejects if run is active (scheduling or running).
74
+ - Always clears previous outputs/history/output attachments.
75
+ - Replaces input attachments if `file_inputs` are provided.
76
+ - Optionally overrides inputs, sensitive inputs, session/machine/pools.
77
+ - Triggers immediate assignment attempt unless the session is busy.
78
+
79
+ Args:
80
+ run_id (UUID):
81
+ body (RunRetry): Options for retrying an existing run in-place (same run_id).
82
+
83
+ Notes:
84
+ - If `file_inputs` are provided, existing input attachments are replaced.
85
+ - Prior outputs, history, and output attachments are always cleared as part of retry.
86
+ - Retry is only allowed for terminal runs (success, error, or cancelled).
87
+
88
+ Raises:
89
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
90
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
91
+
92
+ Returns:
93
+ Response[Union[HTTPValidationError, RunResponse]]
94
+ """
95
+
96
+ kwargs = _get_kwargs(
97
+ run_id=run_id,
98
+ body=body,
99
+ )
100
+
101
+ response = client.get_httpx_client().request(
102
+ **kwargs,
103
+ )
104
+
105
+ return _build_response(client=client, response=response)
106
+
107
+
108
+ def sync(
109
+ run_id: UUID,
110
+ *,
111
+ client: AuthenticatedClient,
112
+ body: RunRetry,
113
+ ) -> Optional[Union[HTTPValidationError, RunResponse]]:
114
+ """Retry Run
115
+
116
+ Retry an existing run in-place (same run_id).
117
+
118
+ - Rejects if run is active (scheduling or running).
119
+ - Always clears previous outputs/history/output attachments.
120
+ - Replaces input attachments if `file_inputs` are provided.
121
+ - Optionally overrides inputs, sensitive inputs, session/machine/pools.
122
+ - Triggers immediate assignment attempt unless the session is busy.
123
+
124
+ Args:
125
+ run_id (UUID):
126
+ body (RunRetry): Options for retrying an existing run in-place (same run_id).
127
+
128
+ Notes:
129
+ - If `file_inputs` are provided, existing input attachments are replaced.
130
+ - Prior outputs, history, and output attachments are always cleared as part of retry.
131
+ - Retry is only allowed for terminal runs (success, error, or cancelled).
132
+
133
+ Raises:
134
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
136
+
137
+ Returns:
138
+ Union[HTTPValidationError, RunResponse]
139
+ """
140
+
141
+ return sync_detailed(
142
+ run_id=run_id,
143
+ client=client,
144
+ body=body,
145
+ ).parsed
146
+
147
+
148
+ async def asyncio_detailed(
149
+ run_id: UUID,
150
+ *,
151
+ client: AuthenticatedClient,
152
+ body: RunRetry,
153
+ ) -> Response[Union[HTTPValidationError, RunResponse]]:
154
+ """Retry Run
155
+
156
+ Retry an existing run in-place (same run_id).
157
+
158
+ - Rejects if run is active (scheduling or running).
159
+ - Always clears previous outputs/history/output attachments.
160
+ - Replaces input attachments if `file_inputs` are provided.
161
+ - Optionally overrides inputs, sensitive inputs, session/machine/pools.
162
+ - Triggers immediate assignment attempt unless the session is busy.
163
+
164
+ Args:
165
+ run_id (UUID):
166
+ body (RunRetry): Options for retrying an existing run in-place (same run_id).
167
+
168
+ Notes:
169
+ - If `file_inputs` are provided, existing input attachments are replaced.
170
+ - Prior outputs, history, and output attachments are always cleared as part of retry.
171
+ - Retry is only allowed for terminal runs (success, error, or cancelled).
172
+
173
+ Raises:
174
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
176
+
177
+ Returns:
178
+ Response[Union[HTTPValidationError, RunResponse]]
179
+ """
180
+
181
+ kwargs = _get_kwargs(
182
+ run_id=run_id,
183
+ body=body,
184
+ )
185
+
186
+ response = await client.get_async_httpx_client().request(**kwargs)
187
+
188
+ return _build_response(client=client, response=response)
189
+
190
+
191
+ async def asyncio(
192
+ run_id: UUID,
193
+ *,
194
+ client: AuthenticatedClient,
195
+ body: RunRetry,
196
+ ) -> Optional[Union[HTTPValidationError, RunResponse]]:
197
+ """Retry Run
198
+
199
+ Retry an existing run in-place (same run_id).
200
+
201
+ - Rejects if run is active (scheduling or running).
202
+ - Always clears previous outputs/history/output attachments.
203
+ - Replaces input attachments if `file_inputs` are provided.
204
+ - Optionally overrides inputs, sensitive inputs, session/machine/pools.
205
+ - Triggers immediate assignment attempt unless the session is busy.
206
+
207
+ Args:
208
+ run_id (UUID):
209
+ body (RunRetry): Options for retrying an existing run in-place (same run_id).
210
+
211
+ Notes:
212
+ - If `file_inputs` are provided, existing input attachments are replaced.
213
+ - Prior outputs, history, and output attachments are always cleared as part of retry.
214
+ - Retry is only allowed for terminal runs (success, error, or cancelled).
215
+
216
+ Raises:
217
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
218
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
219
+
220
+ Returns:
221
+ Union[HTTPValidationError, RunResponse]
222
+ """
223
+
224
+ return (
225
+ await asyncio_detailed(
226
+ run_id=run_id,
227
+ client=client,
228
+ body=body,
229
+ )
230
+ ).parsed
@@ -80,11 +80,15 @@ from .run_completed_event import RunCompletedEvent
80
80
  from .run_create import RunCreate
81
81
  from .run_create_input_values_type_0 import RunCreateInputValuesType0
82
82
  from .run_create_sensitive_input_values_type_0 import RunCreateSensitiveInputValuesType0
83
+ from .run_field import RunField
83
84
  from .run_response import RunResponse
84
85
  from .run_response_input_values_type_0 import RunResponseInputValuesType0
85
86
  from .run_response_output_data_type_0 import RunResponseOutputDataType0
86
87
  from .run_response_run_message_history_type_0_item import RunResponseRunMessageHistoryType0Item
87
88
  from .run_response_sensitive_input_aliases_type_0 import RunResponseSensitiveInputAliasesType0
89
+ from .run_retry import RunRetry
90
+ from .run_retry_input_values_type_0 import RunRetryInputValuesType0
91
+ from .run_retry_sensitive_input_values_type_0 import RunRetrySensitiveInputValuesType0
88
92
  from .run_status import RunStatus
89
93
  from .run_update import RunUpdate
90
94
  from .run_update_input_values_type_0 import RunUpdateInputValuesType0
@@ -173,11 +177,15 @@ __all__ = (
173
177
  "RunCreate",
174
178
  "RunCreateInputValuesType0",
175
179
  "RunCreateSensitiveInputValuesType0",
180
+ "RunField",
176
181
  "RunResponse",
177
182
  "RunResponseInputValuesType0",
178
183
  "RunResponseOutputDataType0",
179
184
  "RunResponseRunMessageHistoryType0Item",
180
185
  "RunResponseSensitiveInputAliasesType0",
186
+ "RunRetry",
187
+ "RunRetryInputValuesType0",
188
+ "RunRetrySensitiveInputValuesType0",
181
189
  "RunStatus",
182
190
  "RunUpdate",
183
191
  "RunUpdateInputValuesType0",
@@ -0,0 +1,21 @@
1
+ from enum import Enum
2
+
3
+
4
+ class RunField(str, Enum):
5
+ ERROR = "error"
6
+ INPUT_ATTACHMENT_IDS = "input_attachment_ids"
7
+ INPUT_VALUES = "input_values"
8
+ MACHINE_ID = "machine_id"
9
+ ORGANIZATION_ID = "organization_id"
10
+ OUTPUT_ATTACHMENT_IDS = "output_attachment_ids"
11
+ OUTPUT_DATA = "output_data"
12
+ POOL_IDS = "pool_ids"
13
+ RELEASE_SESSION_AFTER = "release_session_after"
14
+ RUN_MESSAGE_HISTORY = "run_message_history"
15
+ SENSITIVE_INPUT_ALIASES = "sensitive_input_aliases"
16
+ SESSION_ALIAS = "session_alias"
17
+ SESSION_ID = "session_id"
18
+ USER_ID = "user_id"
19
+
20
+ def __str__(self) -> str:
21
+ return str(self.value)
@@ -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
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="RunRetryInputValuesType0")
8
+
9
+
10
+ @_attrs_define
11
+ class RunRetryInputValuesType0:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ run_retry_input_values_type_0 = cls()
26
+
27
+ run_retry_input_values_type_0.additional_properties = d
28
+ return run_retry_input_values_type_0
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="RunRetrySensitiveInputValuesType0")
8
+
9
+
10
+ @_attrs_define
11
+ class RunRetrySensitiveInputValuesType0:
12
+ """ """
13
+
14
+ additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ run_retry_sensitive_input_values_type_0 = cls()
26
+
27
+ run_retry_sensitive_input_values_type_0.additional_properties = d
28
+ return run_retry_sensitive_input_values_type_0
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> str:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: str) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties