cyberdesk 2.1.5__py3-none-any.whl → 2.1.7__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 +73 -0
- {cyberdesk-2.1.5.dist-info → cyberdesk-2.1.7.dist-info}/METADATA +1 -1
- {cyberdesk-2.1.5.dist-info → cyberdesk-2.1.7.dist-info}/RECORD +21 -13
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_post.py +192 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +14 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step.py +122 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step_inputs_type_0.py +74 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response.py +30 -0
- openapi_client/cyberdesk_cloud_client/models/machine_update.py +32 -0
- openapi_client/cyberdesk_cloud_client/models/ref_value.py +61 -0
- openapi_client/cyberdesk_cloud_client/models/run_bulk_create.py +51 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +71 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +50 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create.py +315 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create_shared_inputs_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create_shared_sensitive_inputs_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_response.py +77 -0
- {cyberdesk-2.1.5.dist-info → cyberdesk-2.1.7.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.5.dist-info → cyberdesk-2.1.7.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.5.dist-info → cyberdesk-2.1.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,315 @@
|
|
|
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.chain_step import ChainStep
|
|
12
|
+
from ..models.file_input import FileInput
|
|
13
|
+
from ..models.workflow_chain_create_shared_inputs_type_0 import WorkflowChainCreateSharedInputsType0
|
|
14
|
+
from ..models.workflow_chain_create_shared_sensitive_inputs_type_0 import (
|
|
15
|
+
WorkflowChainCreateSharedSensitiveInputsType0,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="WorkflowChainCreate")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class WorkflowChainCreate:
|
|
24
|
+
"""Request to create and run a multi-step chain on a single reserved session/machine
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
steps (list['ChainStep']):
|
|
28
|
+
shared_inputs (Union['WorkflowChainCreateSharedInputsType0', None, Unset]):
|
|
29
|
+
shared_sensitive_inputs (Union['WorkflowChainCreateSharedSensitiveInputsType0', None, Unset]):
|
|
30
|
+
shared_file_inputs (Union[None, Unset, list['FileInput']]):
|
|
31
|
+
keep_session_after_completion (Union[None, Unset, bool]): Default: False.
|
|
32
|
+
machine_id (Union[None, UUID, Unset]):
|
|
33
|
+
pool_ids (Union[None, Unset, list[UUID]]): Pool IDs to filter available machines when starting a new session.
|
|
34
|
+
Machine must belong to ALL of these pools (intersection). Ignored when machine_id is provided.
|
|
35
|
+
session_id (Union[None, UUID, Unset]):
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
steps: list["ChainStep"]
|
|
39
|
+
shared_inputs: Union["WorkflowChainCreateSharedInputsType0", None, Unset] = UNSET
|
|
40
|
+
shared_sensitive_inputs: Union["WorkflowChainCreateSharedSensitiveInputsType0", None, Unset] = UNSET
|
|
41
|
+
shared_file_inputs: Union[None, Unset, list["FileInput"]] = UNSET
|
|
42
|
+
keep_session_after_completion: Union[None, Unset, bool] = False
|
|
43
|
+
machine_id: Union[None, UUID, Unset] = UNSET
|
|
44
|
+
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
45
|
+
session_id: Union[None, UUID, Unset] = UNSET
|
|
46
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
47
|
+
|
|
48
|
+
def to_dict(self) -> dict[str, Any]:
|
|
49
|
+
from ..models.workflow_chain_create_shared_inputs_type_0 import WorkflowChainCreateSharedInputsType0
|
|
50
|
+
from ..models.workflow_chain_create_shared_sensitive_inputs_type_0 import (
|
|
51
|
+
WorkflowChainCreateSharedSensitiveInputsType0,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
steps = []
|
|
55
|
+
for steps_item_data in self.steps:
|
|
56
|
+
steps_item = steps_item_data.to_dict()
|
|
57
|
+
steps.append(steps_item)
|
|
58
|
+
|
|
59
|
+
shared_inputs: Union[None, Unset, dict[str, Any]]
|
|
60
|
+
if isinstance(self.shared_inputs, Unset):
|
|
61
|
+
shared_inputs = UNSET
|
|
62
|
+
elif isinstance(self.shared_inputs, WorkflowChainCreateSharedInputsType0):
|
|
63
|
+
shared_inputs = self.shared_inputs.to_dict()
|
|
64
|
+
else:
|
|
65
|
+
shared_inputs = self.shared_inputs
|
|
66
|
+
|
|
67
|
+
shared_sensitive_inputs: Union[None, Unset, dict[str, Any]]
|
|
68
|
+
if isinstance(self.shared_sensitive_inputs, Unset):
|
|
69
|
+
shared_sensitive_inputs = UNSET
|
|
70
|
+
elif isinstance(self.shared_sensitive_inputs, WorkflowChainCreateSharedSensitiveInputsType0):
|
|
71
|
+
shared_sensitive_inputs = self.shared_sensitive_inputs.to_dict()
|
|
72
|
+
else:
|
|
73
|
+
shared_sensitive_inputs = self.shared_sensitive_inputs
|
|
74
|
+
|
|
75
|
+
shared_file_inputs: Union[None, Unset, list[dict[str, Any]]]
|
|
76
|
+
if isinstance(self.shared_file_inputs, Unset):
|
|
77
|
+
shared_file_inputs = UNSET
|
|
78
|
+
elif isinstance(self.shared_file_inputs, list):
|
|
79
|
+
shared_file_inputs = []
|
|
80
|
+
for shared_file_inputs_type_0_item_data in self.shared_file_inputs:
|
|
81
|
+
shared_file_inputs_type_0_item = shared_file_inputs_type_0_item_data.to_dict()
|
|
82
|
+
shared_file_inputs.append(shared_file_inputs_type_0_item)
|
|
83
|
+
|
|
84
|
+
else:
|
|
85
|
+
shared_file_inputs = self.shared_file_inputs
|
|
86
|
+
|
|
87
|
+
keep_session_after_completion: Union[None, Unset, bool]
|
|
88
|
+
if isinstance(self.keep_session_after_completion, Unset):
|
|
89
|
+
keep_session_after_completion = UNSET
|
|
90
|
+
else:
|
|
91
|
+
keep_session_after_completion = self.keep_session_after_completion
|
|
92
|
+
|
|
93
|
+
machine_id: Union[None, Unset, str]
|
|
94
|
+
if isinstance(self.machine_id, Unset):
|
|
95
|
+
machine_id = UNSET
|
|
96
|
+
elif isinstance(self.machine_id, UUID):
|
|
97
|
+
machine_id = str(self.machine_id)
|
|
98
|
+
else:
|
|
99
|
+
machine_id = self.machine_id
|
|
100
|
+
|
|
101
|
+
pool_ids: Union[None, Unset, list[str]]
|
|
102
|
+
if isinstance(self.pool_ids, Unset):
|
|
103
|
+
pool_ids = UNSET
|
|
104
|
+
elif isinstance(self.pool_ids, list):
|
|
105
|
+
pool_ids = []
|
|
106
|
+
for pool_ids_type_0_item_data in self.pool_ids:
|
|
107
|
+
pool_ids_type_0_item = str(pool_ids_type_0_item_data)
|
|
108
|
+
pool_ids.append(pool_ids_type_0_item)
|
|
109
|
+
|
|
110
|
+
else:
|
|
111
|
+
pool_ids = self.pool_ids
|
|
112
|
+
|
|
113
|
+
session_id: Union[None, Unset, str]
|
|
114
|
+
if isinstance(self.session_id, Unset):
|
|
115
|
+
session_id = UNSET
|
|
116
|
+
elif isinstance(self.session_id, UUID):
|
|
117
|
+
session_id = str(self.session_id)
|
|
118
|
+
else:
|
|
119
|
+
session_id = self.session_id
|
|
120
|
+
|
|
121
|
+
field_dict: dict[str, Any] = {}
|
|
122
|
+
field_dict.update(self.additional_properties)
|
|
123
|
+
field_dict.update(
|
|
124
|
+
{
|
|
125
|
+
"steps": steps,
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
if shared_inputs is not UNSET:
|
|
129
|
+
field_dict["shared_inputs"] = shared_inputs
|
|
130
|
+
if shared_sensitive_inputs is not UNSET:
|
|
131
|
+
field_dict["shared_sensitive_inputs"] = shared_sensitive_inputs
|
|
132
|
+
if shared_file_inputs is not UNSET:
|
|
133
|
+
field_dict["shared_file_inputs"] = shared_file_inputs
|
|
134
|
+
if keep_session_after_completion is not UNSET:
|
|
135
|
+
field_dict["keep_session_after_completion"] = keep_session_after_completion
|
|
136
|
+
if machine_id is not UNSET:
|
|
137
|
+
field_dict["machine_id"] = machine_id
|
|
138
|
+
if pool_ids is not UNSET:
|
|
139
|
+
field_dict["pool_ids"] = pool_ids
|
|
140
|
+
if session_id is not UNSET:
|
|
141
|
+
field_dict["session_id"] = session_id
|
|
142
|
+
|
|
143
|
+
return field_dict
|
|
144
|
+
|
|
145
|
+
@classmethod
|
|
146
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
147
|
+
from ..models.chain_step import ChainStep
|
|
148
|
+
from ..models.file_input import FileInput
|
|
149
|
+
from ..models.workflow_chain_create_shared_inputs_type_0 import WorkflowChainCreateSharedInputsType0
|
|
150
|
+
from ..models.workflow_chain_create_shared_sensitive_inputs_type_0 import (
|
|
151
|
+
WorkflowChainCreateSharedSensitiveInputsType0,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
d = dict(src_dict)
|
|
155
|
+
steps = []
|
|
156
|
+
_steps = d.pop("steps")
|
|
157
|
+
for steps_item_data in _steps:
|
|
158
|
+
steps_item = ChainStep.from_dict(steps_item_data)
|
|
159
|
+
|
|
160
|
+
steps.append(steps_item)
|
|
161
|
+
|
|
162
|
+
def _parse_shared_inputs(data: object) -> Union["WorkflowChainCreateSharedInputsType0", None, Unset]:
|
|
163
|
+
if data is None:
|
|
164
|
+
return data
|
|
165
|
+
if isinstance(data, Unset):
|
|
166
|
+
return data
|
|
167
|
+
try:
|
|
168
|
+
if not isinstance(data, dict):
|
|
169
|
+
raise TypeError()
|
|
170
|
+
shared_inputs_type_0 = WorkflowChainCreateSharedInputsType0.from_dict(data)
|
|
171
|
+
|
|
172
|
+
return shared_inputs_type_0
|
|
173
|
+
except: # noqa: E722
|
|
174
|
+
pass
|
|
175
|
+
return cast(Union["WorkflowChainCreateSharedInputsType0", None, Unset], data)
|
|
176
|
+
|
|
177
|
+
shared_inputs = _parse_shared_inputs(d.pop("shared_inputs", UNSET))
|
|
178
|
+
|
|
179
|
+
def _parse_shared_sensitive_inputs(
|
|
180
|
+
data: object,
|
|
181
|
+
) -> Union["WorkflowChainCreateSharedSensitiveInputsType0", None, Unset]:
|
|
182
|
+
if data is None:
|
|
183
|
+
return data
|
|
184
|
+
if isinstance(data, Unset):
|
|
185
|
+
return data
|
|
186
|
+
try:
|
|
187
|
+
if not isinstance(data, dict):
|
|
188
|
+
raise TypeError()
|
|
189
|
+
shared_sensitive_inputs_type_0 = WorkflowChainCreateSharedSensitiveInputsType0.from_dict(data)
|
|
190
|
+
|
|
191
|
+
return shared_sensitive_inputs_type_0
|
|
192
|
+
except: # noqa: E722
|
|
193
|
+
pass
|
|
194
|
+
return cast(Union["WorkflowChainCreateSharedSensitiveInputsType0", None, Unset], data)
|
|
195
|
+
|
|
196
|
+
shared_sensitive_inputs = _parse_shared_sensitive_inputs(d.pop("shared_sensitive_inputs", UNSET))
|
|
197
|
+
|
|
198
|
+
def _parse_shared_file_inputs(data: object) -> Union[None, Unset, list["FileInput"]]:
|
|
199
|
+
if data is None:
|
|
200
|
+
return data
|
|
201
|
+
if isinstance(data, Unset):
|
|
202
|
+
return data
|
|
203
|
+
try:
|
|
204
|
+
if not isinstance(data, list):
|
|
205
|
+
raise TypeError()
|
|
206
|
+
shared_file_inputs_type_0 = []
|
|
207
|
+
_shared_file_inputs_type_0 = data
|
|
208
|
+
for shared_file_inputs_type_0_item_data in _shared_file_inputs_type_0:
|
|
209
|
+
shared_file_inputs_type_0_item = FileInput.from_dict(shared_file_inputs_type_0_item_data)
|
|
210
|
+
|
|
211
|
+
shared_file_inputs_type_0.append(shared_file_inputs_type_0_item)
|
|
212
|
+
|
|
213
|
+
return shared_file_inputs_type_0
|
|
214
|
+
except: # noqa: E722
|
|
215
|
+
pass
|
|
216
|
+
return cast(Union[None, Unset, list["FileInput"]], data)
|
|
217
|
+
|
|
218
|
+
shared_file_inputs = _parse_shared_file_inputs(d.pop("shared_file_inputs", UNSET))
|
|
219
|
+
|
|
220
|
+
def _parse_keep_session_after_completion(data: object) -> Union[None, Unset, bool]:
|
|
221
|
+
if data is None:
|
|
222
|
+
return data
|
|
223
|
+
if isinstance(data, Unset):
|
|
224
|
+
return data
|
|
225
|
+
return cast(Union[None, Unset, bool], data)
|
|
226
|
+
|
|
227
|
+
keep_session_after_completion = _parse_keep_session_after_completion(
|
|
228
|
+
d.pop("keep_session_after_completion", UNSET)
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
def _parse_machine_id(data: object) -> Union[None, UUID, Unset]:
|
|
232
|
+
if data is None:
|
|
233
|
+
return data
|
|
234
|
+
if isinstance(data, Unset):
|
|
235
|
+
return data
|
|
236
|
+
try:
|
|
237
|
+
if not isinstance(data, str):
|
|
238
|
+
raise TypeError()
|
|
239
|
+
machine_id_type_0 = UUID(data)
|
|
240
|
+
|
|
241
|
+
return machine_id_type_0
|
|
242
|
+
except: # noqa: E722
|
|
243
|
+
pass
|
|
244
|
+
return cast(Union[None, UUID, Unset], data)
|
|
245
|
+
|
|
246
|
+
machine_id = _parse_machine_id(d.pop("machine_id", UNSET))
|
|
247
|
+
|
|
248
|
+
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
249
|
+
if data is None:
|
|
250
|
+
return data
|
|
251
|
+
if isinstance(data, Unset):
|
|
252
|
+
return data
|
|
253
|
+
try:
|
|
254
|
+
if not isinstance(data, list):
|
|
255
|
+
raise TypeError()
|
|
256
|
+
pool_ids_type_0 = []
|
|
257
|
+
_pool_ids_type_0 = data
|
|
258
|
+
for pool_ids_type_0_item_data in _pool_ids_type_0:
|
|
259
|
+
pool_ids_type_0_item = UUID(pool_ids_type_0_item_data)
|
|
260
|
+
|
|
261
|
+
pool_ids_type_0.append(pool_ids_type_0_item)
|
|
262
|
+
|
|
263
|
+
return pool_ids_type_0
|
|
264
|
+
except: # noqa: E722
|
|
265
|
+
pass
|
|
266
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
267
|
+
|
|
268
|
+
pool_ids = _parse_pool_ids(d.pop("pool_ids", UNSET))
|
|
269
|
+
|
|
270
|
+
def _parse_session_id(data: object) -> Union[None, UUID, Unset]:
|
|
271
|
+
if data is None:
|
|
272
|
+
return data
|
|
273
|
+
if isinstance(data, Unset):
|
|
274
|
+
return data
|
|
275
|
+
try:
|
|
276
|
+
if not isinstance(data, str):
|
|
277
|
+
raise TypeError()
|
|
278
|
+
session_id_type_0 = UUID(data)
|
|
279
|
+
|
|
280
|
+
return session_id_type_0
|
|
281
|
+
except: # noqa: E722
|
|
282
|
+
pass
|
|
283
|
+
return cast(Union[None, UUID, Unset], data)
|
|
284
|
+
|
|
285
|
+
session_id = _parse_session_id(d.pop("session_id", UNSET))
|
|
286
|
+
|
|
287
|
+
workflow_chain_create = cls(
|
|
288
|
+
steps=steps,
|
|
289
|
+
shared_inputs=shared_inputs,
|
|
290
|
+
shared_sensitive_inputs=shared_sensitive_inputs,
|
|
291
|
+
shared_file_inputs=shared_file_inputs,
|
|
292
|
+
keep_session_after_completion=keep_session_after_completion,
|
|
293
|
+
machine_id=machine_id,
|
|
294
|
+
pool_ids=pool_ids,
|
|
295
|
+
session_id=session_id,
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
workflow_chain_create.additional_properties = d
|
|
299
|
+
return workflow_chain_create
|
|
300
|
+
|
|
301
|
+
@property
|
|
302
|
+
def additional_keys(self) -> list[str]:
|
|
303
|
+
return list(self.additional_properties.keys())
|
|
304
|
+
|
|
305
|
+
def __getitem__(self, key: str) -> Any:
|
|
306
|
+
return self.additional_properties[key]
|
|
307
|
+
|
|
308
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
309
|
+
self.additional_properties[key] = value
|
|
310
|
+
|
|
311
|
+
def __delitem__(self, key: str) -> None:
|
|
312
|
+
del self.additional_properties[key]
|
|
313
|
+
|
|
314
|
+
def __contains__(self, key: str) -> bool:
|
|
315
|
+
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="WorkflowChainCreateSharedInputsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class WorkflowChainCreateSharedInputsType0:
|
|
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
|
+
workflow_chain_create_shared_inputs_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
workflow_chain_create_shared_inputs_type_0.additional_properties = d
|
|
28
|
+
return workflow_chain_create_shared_inputs_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
|
openapi_client/cyberdesk_cloud_client/models/workflow_chain_create_shared_sensitive_inputs_type_0.py
ADDED
|
@@ -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="WorkflowChainCreateSharedSensitiveInputsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class WorkflowChainCreateSharedSensitiveInputsType0:
|
|
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
|
+
workflow_chain_create_shared_sensitive_inputs_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
workflow_chain_create_shared_sensitive_inputs_type_0.additional_properties = d
|
|
28
|
+
return workflow_chain_create_shared_sensitive_inputs_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
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="WorkflowChainResponse")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class WorkflowChainResponse:
|
|
13
|
+
"""Response for chain creation
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
session_id (UUID):
|
|
17
|
+
run_ids (list[UUID]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
session_id: UUID
|
|
21
|
+
run_ids: list[UUID]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
session_id = str(self.session_id)
|
|
26
|
+
|
|
27
|
+
run_ids = []
|
|
28
|
+
for run_ids_item_data in self.run_ids:
|
|
29
|
+
run_ids_item = str(run_ids_item_data)
|
|
30
|
+
run_ids.append(run_ids_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"session_id": session_id,
|
|
37
|
+
"run_ids": run_ids,
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
session_id = UUID(d.pop("session_id"))
|
|
47
|
+
|
|
48
|
+
run_ids = []
|
|
49
|
+
_run_ids = d.pop("run_ids")
|
|
50
|
+
for run_ids_item_data in _run_ids:
|
|
51
|
+
run_ids_item = UUID(run_ids_item_data)
|
|
52
|
+
|
|
53
|
+
run_ids.append(run_ids_item)
|
|
54
|
+
|
|
55
|
+
workflow_chain_response = cls(
|
|
56
|
+
session_id=session_id,
|
|
57
|
+
run_ids=run_ids,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
workflow_chain_response.additional_properties = d
|
|
61
|
+
return workflow_chain_response
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def additional_keys(self) -> list[str]:
|
|
65
|
+
return list(self.additional_properties.keys())
|
|
66
|
+
|
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
|
68
|
+
return self.additional_properties[key]
|
|
69
|
+
|
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
+
self.additional_properties[key] = value
|
|
72
|
+
|
|
73
|
+
def __delitem__(self, key: str) -> None:
|
|
74
|
+
del self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __contains__(self, key: str) -> bool:
|
|
77
|
+
return key in self.additional_properties
|
|
File without changes
|
|
File without changes
|
|
File without changes
|