cyberdesk 1.11.0__py3-none-any.whl → 2.1.0__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 +358 -6
- {cyberdesk-1.11.0.dist-info → cyberdesk-2.1.0.dist-info}/METADATA +1 -1
- {cyberdesk-1.11.0.dist-info → cyberdesk-2.1.0.dist-info}/RECORD +66 -49
- openapi_client/cyberdesk_cloud_client/api/connections/create_connection_v1_connections_post.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/connections/delete_connection_v1_connections_connection_id_delete.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/connections/get_connection_v1_connections_connection_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/connections/list_connections_v1_connections_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/connections/update_connection_v1_connections_connection_id_patch.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/machines/create_machine_v1_machines_post.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/machines/get_machine_pools_v1_machines_machine_id_pools_get.py +169 -0
- openapi_client/cyberdesk_cloud_client/api/machines/get_machine_v1_machines_machine_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/machines/list_machines_v1_machines_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_pools_v1_machines_machine_id_pools_put.py +190 -0
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/pools/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/pools/add_machines_to_pool_v1_pools_pool_id_machines_post.py +186 -0
- openapi_client/cyberdesk_cloud_client/api/pools/create_pool_v1_pools_post.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/pools/delete_pool_v1_pools_pool_id_delete.py +162 -0
- openapi_client/cyberdesk_cloud_client/api/pools/get_pool_v1_pools_pool_id_get.py +185 -0
- openapi_client/cyberdesk_cloud_client/api/pools/list_pools_v1_pools_get.py +186 -0
- openapi_client/cyberdesk_cloud_client/api/pools/remove_machines_from_pool_v1_pools_pool_id_machines_delete.py +184 -0
- openapi_client/cyberdesk_cloud_client/api/pools/update_pool_v1_pools_pool_id_patch.py +186 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/create_request_log_v1_request_logs_post.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/request_logs/delete_request_log_v1_request_logs_log_id_delete.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/request_logs/get_request_log_v1_request_logs_log_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/request_logs/list_request_logs_v1_request_logs_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/request_logs/update_request_log_v1_request_logs_log_id_patch.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py +12 -8
- openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py +8 -4
- openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py +8 -12
- openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/trajectories/delete_trajectory_v1_trajectories_trajectory_id_delete.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_trajectory_v1_trajectories_trajectory_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/trajectories/update_trajectory_v1_trajectories_trajectory_id_patch.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/create_workflow_v1_workflows_post.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/delete_workflow_v1_workflows_workflow_id_delete.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +4 -4
- openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py +4 -4
- openapi_client/cyberdesk_cloud_client/models/__init__.py +14 -0
- openapi_client/cyberdesk_cloud_client/models/machine_pool_assignment.py +69 -0
- openapi_client/cyberdesk_cloud_client/models/machine_pool_update.py +69 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response.py +96 -9
- openapi_client/cyberdesk_cloud_client/models/paginated_response_pool_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/pool_create.py +82 -0
- openapi_client/cyberdesk_cloud_client/models/pool_response.py +137 -0
- openapi_client/cyberdesk_cloud_client/models/pool_update.py +92 -0
- openapi_client/cyberdesk_cloud_client/models/pool_with_machines.py +162 -0
- openapi_client/cyberdesk_cloud_client/models/request_log_response.py +20 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_response.py +50 -8
- openapi_client/cyberdesk_cloud_client/models/run_bulk_create.py +40 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +40 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +90 -8
- openapi_client/cyberdesk_cloud_client/models/trajectory_response.py +50 -8
- openapi_client/cyberdesk_cloud_client/models/workflow_response.py +50 -8
- {cyberdesk-1.11.0.dist-info → cyberdesk-2.1.0.dist-info}/WHEEL +0 -0
- {cyberdesk-1.11.0.dist-info → cyberdesk-2.1.0.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-1.11.0.dist-info → cyberdesk-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.machine_response import MachineResponse
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="PoolWithMachines")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class PoolWithMachines:
|
|
21
|
+
"""Pool response with machines included
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
name (str):
|
|
25
|
+
id (UUID):
|
|
26
|
+
organization_id (str):
|
|
27
|
+
created_at (datetime.datetime):
|
|
28
|
+
updated_at (datetime.datetime):
|
|
29
|
+
description (Union[None, Unset, str]):
|
|
30
|
+
machine_count (Union[None, Unset, int]): Number of machines in this pool Default: 0.
|
|
31
|
+
machines (Union[Unset, list['MachineResponse']]):
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
name: str
|
|
35
|
+
id: UUID
|
|
36
|
+
organization_id: str
|
|
37
|
+
created_at: datetime.datetime
|
|
38
|
+
updated_at: datetime.datetime
|
|
39
|
+
description: Union[None, Unset, str] = UNSET
|
|
40
|
+
machine_count: Union[None, Unset, int] = 0
|
|
41
|
+
machines: Union[Unset, list["MachineResponse"]] = UNSET
|
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
name = self.name
|
|
46
|
+
|
|
47
|
+
id = str(self.id)
|
|
48
|
+
|
|
49
|
+
organization_id = self.organization_id
|
|
50
|
+
|
|
51
|
+
created_at = self.created_at.isoformat()
|
|
52
|
+
|
|
53
|
+
updated_at = self.updated_at.isoformat()
|
|
54
|
+
|
|
55
|
+
description: Union[None, Unset, str]
|
|
56
|
+
if isinstance(self.description, Unset):
|
|
57
|
+
description = UNSET
|
|
58
|
+
else:
|
|
59
|
+
description = self.description
|
|
60
|
+
|
|
61
|
+
machine_count: Union[None, Unset, int]
|
|
62
|
+
if isinstance(self.machine_count, Unset):
|
|
63
|
+
machine_count = UNSET
|
|
64
|
+
else:
|
|
65
|
+
machine_count = self.machine_count
|
|
66
|
+
|
|
67
|
+
machines: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
68
|
+
if not isinstance(self.machines, Unset):
|
|
69
|
+
machines = []
|
|
70
|
+
for machines_item_data in self.machines:
|
|
71
|
+
machines_item = machines_item_data.to_dict()
|
|
72
|
+
machines.append(machines_item)
|
|
73
|
+
|
|
74
|
+
field_dict: dict[str, Any] = {}
|
|
75
|
+
field_dict.update(self.additional_properties)
|
|
76
|
+
field_dict.update(
|
|
77
|
+
{
|
|
78
|
+
"name": name,
|
|
79
|
+
"id": id,
|
|
80
|
+
"organization_id": organization_id,
|
|
81
|
+
"created_at": created_at,
|
|
82
|
+
"updated_at": updated_at,
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
if description is not UNSET:
|
|
86
|
+
field_dict["description"] = description
|
|
87
|
+
if machine_count is not UNSET:
|
|
88
|
+
field_dict["machine_count"] = machine_count
|
|
89
|
+
if machines is not UNSET:
|
|
90
|
+
field_dict["machines"] = machines
|
|
91
|
+
|
|
92
|
+
return field_dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
96
|
+
from ..models.machine_response import MachineResponse
|
|
97
|
+
|
|
98
|
+
d = dict(src_dict)
|
|
99
|
+
name = d.pop("name")
|
|
100
|
+
|
|
101
|
+
id = UUID(d.pop("id"))
|
|
102
|
+
|
|
103
|
+
organization_id = d.pop("organization_id")
|
|
104
|
+
|
|
105
|
+
created_at = isoparse(d.pop("created_at"))
|
|
106
|
+
|
|
107
|
+
updated_at = isoparse(d.pop("updated_at"))
|
|
108
|
+
|
|
109
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
110
|
+
if data is None:
|
|
111
|
+
return data
|
|
112
|
+
if isinstance(data, Unset):
|
|
113
|
+
return data
|
|
114
|
+
return cast(Union[None, Unset, str], data)
|
|
115
|
+
|
|
116
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
117
|
+
|
|
118
|
+
def _parse_machine_count(data: object) -> Union[None, Unset, int]:
|
|
119
|
+
if data is None:
|
|
120
|
+
return data
|
|
121
|
+
if isinstance(data, Unset):
|
|
122
|
+
return data
|
|
123
|
+
return cast(Union[None, Unset, int], data)
|
|
124
|
+
|
|
125
|
+
machine_count = _parse_machine_count(d.pop("machine_count", UNSET))
|
|
126
|
+
|
|
127
|
+
machines = []
|
|
128
|
+
_machines = d.pop("machines", UNSET)
|
|
129
|
+
for machines_item_data in _machines or []:
|
|
130
|
+
machines_item = MachineResponse.from_dict(machines_item_data)
|
|
131
|
+
|
|
132
|
+
machines.append(machines_item)
|
|
133
|
+
|
|
134
|
+
pool_with_machines = cls(
|
|
135
|
+
name=name,
|
|
136
|
+
id=id,
|
|
137
|
+
organization_id=organization_id,
|
|
138
|
+
created_at=created_at,
|
|
139
|
+
updated_at=updated_at,
|
|
140
|
+
description=description,
|
|
141
|
+
machine_count=machine_count,
|
|
142
|
+
machines=machines,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
pool_with_machines.additional_properties = d
|
|
146
|
+
return pool_with_machines
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def additional_keys(self) -> list[str]:
|
|
150
|
+
return list(self.additional_properties.keys())
|
|
151
|
+
|
|
152
|
+
def __getitem__(self, key: str) -> Any:
|
|
153
|
+
return self.additional_properties[key]
|
|
154
|
+
|
|
155
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
156
|
+
self.additional_properties[key] = value
|
|
157
|
+
|
|
158
|
+
def __delitem__(self, key: str) -> None:
|
|
159
|
+
del self.additional_properties[key]
|
|
160
|
+
|
|
161
|
+
def __contains__(self, key: str) -> bool:
|
|
162
|
+
return key in self.additional_properties
|
|
@@ -29,6 +29,7 @@ class RequestLogResponse:
|
|
|
29
29
|
response_size_bytes (Union[None, Unset, int]):
|
|
30
30
|
duration_ms (Union[None, Unset, int]):
|
|
31
31
|
error_message (Union[None, Unset, str]):
|
|
32
|
+
organization_id (Union[None, Unset, str]):
|
|
32
33
|
"""
|
|
33
34
|
|
|
34
35
|
request_id: str
|
|
@@ -43,6 +44,7 @@ class RequestLogResponse:
|
|
|
43
44
|
response_size_bytes: Union[None, Unset, int] = UNSET
|
|
44
45
|
duration_ms: Union[None, Unset, int] = UNSET
|
|
45
46
|
error_message: Union[None, Unset, str] = UNSET
|
|
47
|
+
organization_id: Union[None, Unset, str] = UNSET
|
|
46
48
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
47
49
|
|
|
48
50
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -94,6 +96,12 @@ class RequestLogResponse:
|
|
|
94
96
|
else:
|
|
95
97
|
error_message = self.error_message
|
|
96
98
|
|
|
99
|
+
organization_id: Union[None, Unset, str]
|
|
100
|
+
if isinstance(self.organization_id, Unset):
|
|
101
|
+
organization_id = UNSET
|
|
102
|
+
else:
|
|
103
|
+
organization_id = self.organization_id
|
|
104
|
+
|
|
97
105
|
field_dict: dict[str, Any] = {}
|
|
98
106
|
field_dict.update(self.additional_properties)
|
|
99
107
|
field_dict.update(
|
|
@@ -117,6 +125,8 @@ class RequestLogResponse:
|
|
|
117
125
|
field_dict["duration_ms"] = duration_ms
|
|
118
126
|
if error_message is not UNSET:
|
|
119
127
|
field_dict["error_message"] = error_message
|
|
128
|
+
if organization_id is not UNSET:
|
|
129
|
+
field_dict["organization_id"] = organization_id
|
|
120
130
|
|
|
121
131
|
return field_dict
|
|
122
132
|
|
|
@@ -195,6 +205,15 @@ class RequestLogResponse:
|
|
|
195
205
|
|
|
196
206
|
error_message = _parse_error_message(d.pop("error_message", UNSET))
|
|
197
207
|
|
|
208
|
+
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
209
|
+
if data is None:
|
|
210
|
+
return data
|
|
211
|
+
if isinstance(data, Unset):
|
|
212
|
+
return data
|
|
213
|
+
return cast(Union[None, Unset, str], data)
|
|
214
|
+
|
|
215
|
+
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
216
|
+
|
|
198
217
|
request_log_response = cls(
|
|
199
218
|
request_id=request_id,
|
|
200
219
|
method=method,
|
|
@@ -208,6 +227,7 @@ class RequestLogResponse:
|
|
|
208
227
|
response_size_bytes=response_size_bytes,
|
|
209
228
|
duration_ms=duration_ms,
|
|
210
229
|
error_message=error_message,
|
|
230
|
+
organization_id=organization_id,
|
|
211
231
|
)
|
|
212
232
|
|
|
213
233
|
request_log_response.additional_properties = d
|
|
@@ -22,13 +22,14 @@ class RunAttachmentResponse:
|
|
|
22
22
|
content_type (str):
|
|
23
23
|
attachment_type (AttachmentType):
|
|
24
24
|
id (UUID):
|
|
25
|
-
user_id (UUID):
|
|
26
25
|
run_id (UUID):
|
|
27
26
|
size_bytes (int):
|
|
28
27
|
storage_path (str):
|
|
29
28
|
created_at (datetime.datetime):
|
|
30
29
|
target_path (Union[None, Unset, str]):
|
|
31
30
|
cleanup_imports_after_run (Union[Unset, bool]): Default: False.
|
|
31
|
+
user_id (Union[None, UUID, Unset]):
|
|
32
|
+
organization_id (Union[None, Unset, str]):
|
|
32
33
|
expires_at (Union[None, Unset, datetime.datetime]):
|
|
33
34
|
"""
|
|
34
35
|
|
|
@@ -36,13 +37,14 @@ class RunAttachmentResponse:
|
|
|
36
37
|
content_type: str
|
|
37
38
|
attachment_type: AttachmentType
|
|
38
39
|
id: UUID
|
|
39
|
-
user_id: UUID
|
|
40
40
|
run_id: UUID
|
|
41
41
|
size_bytes: int
|
|
42
42
|
storage_path: str
|
|
43
43
|
created_at: datetime.datetime
|
|
44
44
|
target_path: Union[None, Unset, str] = UNSET
|
|
45
45
|
cleanup_imports_after_run: Union[Unset, bool] = False
|
|
46
|
+
user_id: Union[None, UUID, Unset] = UNSET
|
|
47
|
+
organization_id: Union[None, Unset, str] = UNSET
|
|
46
48
|
expires_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
47
49
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
50
|
|
|
@@ -55,8 +57,6 @@ class RunAttachmentResponse:
|
|
|
55
57
|
|
|
56
58
|
id = str(self.id)
|
|
57
59
|
|
|
58
|
-
user_id = str(self.user_id)
|
|
59
|
-
|
|
60
60
|
run_id = str(self.run_id)
|
|
61
61
|
|
|
62
62
|
size_bytes = self.size_bytes
|
|
@@ -73,6 +73,20 @@ class RunAttachmentResponse:
|
|
|
73
73
|
|
|
74
74
|
cleanup_imports_after_run = self.cleanup_imports_after_run
|
|
75
75
|
|
|
76
|
+
user_id: Union[None, Unset, str]
|
|
77
|
+
if isinstance(self.user_id, Unset):
|
|
78
|
+
user_id = UNSET
|
|
79
|
+
elif isinstance(self.user_id, UUID):
|
|
80
|
+
user_id = str(self.user_id)
|
|
81
|
+
else:
|
|
82
|
+
user_id = self.user_id
|
|
83
|
+
|
|
84
|
+
organization_id: Union[None, Unset, str]
|
|
85
|
+
if isinstance(self.organization_id, Unset):
|
|
86
|
+
organization_id = UNSET
|
|
87
|
+
else:
|
|
88
|
+
organization_id = self.organization_id
|
|
89
|
+
|
|
76
90
|
expires_at: Union[None, Unset, str]
|
|
77
91
|
if isinstance(self.expires_at, Unset):
|
|
78
92
|
expires_at = UNSET
|
|
@@ -89,7 +103,6 @@ class RunAttachmentResponse:
|
|
|
89
103
|
"content_type": content_type,
|
|
90
104
|
"attachment_type": attachment_type,
|
|
91
105
|
"id": id,
|
|
92
|
-
"user_id": user_id,
|
|
93
106
|
"run_id": run_id,
|
|
94
107
|
"size_bytes": size_bytes,
|
|
95
108
|
"storage_path": storage_path,
|
|
@@ -100,6 +113,10 @@ class RunAttachmentResponse:
|
|
|
100
113
|
field_dict["target_path"] = target_path
|
|
101
114
|
if cleanup_imports_after_run is not UNSET:
|
|
102
115
|
field_dict["cleanup_imports_after_run"] = cleanup_imports_after_run
|
|
116
|
+
if user_id is not UNSET:
|
|
117
|
+
field_dict["user_id"] = user_id
|
|
118
|
+
if organization_id is not UNSET:
|
|
119
|
+
field_dict["organization_id"] = organization_id
|
|
103
120
|
if expires_at is not UNSET:
|
|
104
121
|
field_dict["expires_at"] = expires_at
|
|
105
122
|
|
|
@@ -116,8 +133,6 @@ class RunAttachmentResponse:
|
|
|
116
133
|
|
|
117
134
|
id = UUID(d.pop("id"))
|
|
118
135
|
|
|
119
|
-
user_id = UUID(d.pop("user_id"))
|
|
120
|
-
|
|
121
136
|
run_id = UUID(d.pop("run_id"))
|
|
122
137
|
|
|
123
138
|
size_bytes = d.pop("size_bytes")
|
|
@@ -137,6 +152,32 @@ class RunAttachmentResponse:
|
|
|
137
152
|
|
|
138
153
|
cleanup_imports_after_run = d.pop("cleanup_imports_after_run", UNSET)
|
|
139
154
|
|
|
155
|
+
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
156
|
+
if data is None:
|
|
157
|
+
return data
|
|
158
|
+
if isinstance(data, Unset):
|
|
159
|
+
return data
|
|
160
|
+
try:
|
|
161
|
+
if not isinstance(data, str):
|
|
162
|
+
raise TypeError()
|
|
163
|
+
user_id_type_0 = UUID(data)
|
|
164
|
+
|
|
165
|
+
return user_id_type_0
|
|
166
|
+
except: # noqa: E722
|
|
167
|
+
pass
|
|
168
|
+
return cast(Union[None, UUID, Unset], data)
|
|
169
|
+
|
|
170
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
171
|
+
|
|
172
|
+
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
173
|
+
if data is None:
|
|
174
|
+
return data
|
|
175
|
+
if isinstance(data, Unset):
|
|
176
|
+
return data
|
|
177
|
+
return cast(Union[None, Unset, str], data)
|
|
178
|
+
|
|
179
|
+
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
180
|
+
|
|
140
181
|
def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
141
182
|
if data is None:
|
|
142
183
|
return data
|
|
@@ -159,13 +200,14 @@ class RunAttachmentResponse:
|
|
|
159
200
|
content_type=content_type,
|
|
160
201
|
attachment_type=attachment_type,
|
|
161
202
|
id=id,
|
|
162
|
-
user_id=user_id,
|
|
163
203
|
run_id=run_id,
|
|
164
204
|
size_bytes=size_bytes,
|
|
165
205
|
storage_path=storage_path,
|
|
166
206
|
created_at=created_at,
|
|
167
207
|
target_path=target_path,
|
|
168
208
|
cleanup_imports_after_run=cleanup_imports_after_run,
|
|
209
|
+
user_id=user_id,
|
|
210
|
+
organization_id=organization_id,
|
|
169
211
|
expires_at=expires_at,
|
|
170
212
|
)
|
|
171
213
|
|
|
@@ -24,6 +24,8 @@ class RunBulkCreate:
|
|
|
24
24
|
count (int): Number of runs to create (max 1000)
|
|
25
25
|
machine_id (Union[None, UUID, Unset]): Machine ID. If not provided, an available machine will be automatically
|
|
26
26
|
selected.
|
|
27
|
+
pool_ids (Union[None, Unset, list[UUID]]): Pool IDs to filter available machines. Machine must belong to at
|
|
28
|
+
least one of these pools.
|
|
27
29
|
input_values (Union['RunBulkCreateInputValuesType0', None, Unset]): Input values for workflow variables
|
|
28
30
|
file_inputs (Union[None, Unset, list['FileInput']]): Files to upload to the machine
|
|
29
31
|
"""
|
|
@@ -31,6 +33,7 @@ class RunBulkCreate:
|
|
|
31
33
|
workflow_id: UUID
|
|
32
34
|
count: int
|
|
33
35
|
machine_id: Union[None, UUID, Unset] = UNSET
|
|
36
|
+
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
34
37
|
input_values: Union["RunBulkCreateInputValuesType0", None, Unset] = UNSET
|
|
35
38
|
file_inputs: Union[None, Unset, list["FileInput"]] = UNSET
|
|
36
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -50,6 +53,18 @@ class RunBulkCreate:
|
|
|
50
53
|
else:
|
|
51
54
|
machine_id = self.machine_id
|
|
52
55
|
|
|
56
|
+
pool_ids: Union[None, Unset, list[str]]
|
|
57
|
+
if isinstance(self.pool_ids, Unset):
|
|
58
|
+
pool_ids = UNSET
|
|
59
|
+
elif isinstance(self.pool_ids, list):
|
|
60
|
+
pool_ids = []
|
|
61
|
+
for pool_ids_type_0_item_data in self.pool_ids:
|
|
62
|
+
pool_ids_type_0_item = str(pool_ids_type_0_item_data)
|
|
63
|
+
pool_ids.append(pool_ids_type_0_item)
|
|
64
|
+
|
|
65
|
+
else:
|
|
66
|
+
pool_ids = self.pool_ids
|
|
67
|
+
|
|
53
68
|
input_values: Union[None, Unset, dict[str, Any]]
|
|
54
69
|
if isinstance(self.input_values, Unset):
|
|
55
70
|
input_values = UNSET
|
|
@@ -80,6 +95,8 @@ class RunBulkCreate:
|
|
|
80
95
|
)
|
|
81
96
|
if machine_id is not UNSET:
|
|
82
97
|
field_dict["machine_id"] = machine_id
|
|
98
|
+
if pool_ids is not UNSET:
|
|
99
|
+
field_dict["pool_ids"] = pool_ids
|
|
83
100
|
if input_values is not UNSET:
|
|
84
101
|
field_dict["input_values"] = input_values
|
|
85
102
|
if file_inputs is not UNSET:
|
|
@@ -114,6 +131,28 @@ class RunBulkCreate:
|
|
|
114
131
|
|
|
115
132
|
machine_id = _parse_machine_id(d.pop("machine_id", UNSET))
|
|
116
133
|
|
|
134
|
+
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
135
|
+
if data is None:
|
|
136
|
+
return data
|
|
137
|
+
if isinstance(data, Unset):
|
|
138
|
+
return data
|
|
139
|
+
try:
|
|
140
|
+
if not isinstance(data, list):
|
|
141
|
+
raise TypeError()
|
|
142
|
+
pool_ids_type_0 = []
|
|
143
|
+
_pool_ids_type_0 = data
|
|
144
|
+
for pool_ids_type_0_item_data in _pool_ids_type_0:
|
|
145
|
+
pool_ids_type_0_item = UUID(pool_ids_type_0_item_data)
|
|
146
|
+
|
|
147
|
+
pool_ids_type_0.append(pool_ids_type_0_item)
|
|
148
|
+
|
|
149
|
+
return pool_ids_type_0
|
|
150
|
+
except: # noqa: E722
|
|
151
|
+
pass
|
|
152
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
153
|
+
|
|
154
|
+
pool_ids = _parse_pool_ids(d.pop("pool_ids", UNSET))
|
|
155
|
+
|
|
117
156
|
def _parse_input_values(data: object) -> Union["RunBulkCreateInputValuesType0", None, Unset]:
|
|
118
157
|
if data is None:
|
|
119
158
|
return data
|
|
@@ -157,6 +196,7 @@ class RunBulkCreate:
|
|
|
157
196
|
workflow_id=workflow_id,
|
|
158
197
|
count=count,
|
|
159
198
|
machine_id=machine_id,
|
|
199
|
+
pool_ids=pool_ids,
|
|
160
200
|
input_values=input_values,
|
|
161
201
|
file_inputs=file_inputs,
|
|
162
202
|
)
|
|
@@ -23,12 +23,15 @@ class RunCreate:
|
|
|
23
23
|
workflow_id (UUID):
|
|
24
24
|
machine_id (Union[None, UUID, Unset]): Machine ID. If not provided, an available machine will be automatically
|
|
25
25
|
selected.
|
|
26
|
+
pool_ids (Union[None, Unset, list[UUID]]): Pool IDs to filter available machines. Machine must belong to at
|
|
27
|
+
least one of these pools.
|
|
26
28
|
input_values (Union['RunCreateInputValuesType0', None, Unset]): Input values for workflow variables
|
|
27
29
|
file_inputs (Union[None, Unset, list['FileInput']]): Files to upload to the machine
|
|
28
30
|
"""
|
|
29
31
|
|
|
30
32
|
workflow_id: UUID
|
|
31
33
|
machine_id: Union[None, UUID, Unset] = UNSET
|
|
34
|
+
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
32
35
|
input_values: Union["RunCreateInputValuesType0", None, Unset] = UNSET
|
|
33
36
|
file_inputs: Union[None, Unset, list["FileInput"]] = UNSET
|
|
34
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -46,6 +49,18 @@ class RunCreate:
|
|
|
46
49
|
else:
|
|
47
50
|
machine_id = self.machine_id
|
|
48
51
|
|
|
52
|
+
pool_ids: Union[None, Unset, list[str]]
|
|
53
|
+
if isinstance(self.pool_ids, Unset):
|
|
54
|
+
pool_ids = UNSET
|
|
55
|
+
elif isinstance(self.pool_ids, list):
|
|
56
|
+
pool_ids = []
|
|
57
|
+
for pool_ids_type_0_item_data in self.pool_ids:
|
|
58
|
+
pool_ids_type_0_item = str(pool_ids_type_0_item_data)
|
|
59
|
+
pool_ids.append(pool_ids_type_0_item)
|
|
60
|
+
|
|
61
|
+
else:
|
|
62
|
+
pool_ids = self.pool_ids
|
|
63
|
+
|
|
49
64
|
input_values: Union[None, Unset, dict[str, Any]]
|
|
50
65
|
if isinstance(self.input_values, Unset):
|
|
51
66
|
input_values = UNSET
|
|
@@ -75,6 +90,8 @@ class RunCreate:
|
|
|
75
90
|
)
|
|
76
91
|
if machine_id is not UNSET:
|
|
77
92
|
field_dict["machine_id"] = machine_id
|
|
93
|
+
if pool_ids is not UNSET:
|
|
94
|
+
field_dict["pool_ids"] = pool_ids
|
|
78
95
|
if input_values is not UNSET:
|
|
79
96
|
field_dict["input_values"] = input_values
|
|
80
97
|
if file_inputs is not UNSET:
|
|
@@ -107,6 +124,28 @@ class RunCreate:
|
|
|
107
124
|
|
|
108
125
|
machine_id = _parse_machine_id(d.pop("machine_id", UNSET))
|
|
109
126
|
|
|
127
|
+
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
128
|
+
if data is None:
|
|
129
|
+
return data
|
|
130
|
+
if isinstance(data, Unset):
|
|
131
|
+
return data
|
|
132
|
+
try:
|
|
133
|
+
if not isinstance(data, list):
|
|
134
|
+
raise TypeError()
|
|
135
|
+
pool_ids_type_0 = []
|
|
136
|
+
_pool_ids_type_0 = data
|
|
137
|
+
for pool_ids_type_0_item_data in _pool_ids_type_0:
|
|
138
|
+
pool_ids_type_0_item = UUID(pool_ids_type_0_item_data)
|
|
139
|
+
|
|
140
|
+
pool_ids_type_0.append(pool_ids_type_0_item)
|
|
141
|
+
|
|
142
|
+
return pool_ids_type_0
|
|
143
|
+
except: # noqa: E722
|
|
144
|
+
pass
|
|
145
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
146
|
+
|
|
147
|
+
pool_ids = _parse_pool_ids(d.pop("pool_ids", UNSET))
|
|
148
|
+
|
|
110
149
|
def _parse_input_values(data: object) -> Union["RunCreateInputValuesType0", None, Unset]:
|
|
111
150
|
if data is None:
|
|
112
151
|
return data
|
|
@@ -149,6 +188,7 @@ class RunCreate:
|
|
|
149
188
|
run_create = cls(
|
|
150
189
|
workflow_id=workflow_id,
|
|
151
190
|
machine_id=machine_id,
|
|
191
|
+
pool_ids=pool_ids,
|
|
152
192
|
input_values=input_values,
|
|
153
193
|
file_inputs=file_inputs,
|
|
154
194
|
)
|
|
@@ -8,6 +8,7 @@ from attrs import field as _attrs_field
|
|
|
8
8
|
from dateutil.parser import isoparse
|
|
9
9
|
|
|
10
10
|
from ..models.run_status import RunStatus
|
|
11
|
+
from ..types import UNSET, Unset
|
|
11
12
|
|
|
12
13
|
if TYPE_CHECKING:
|
|
13
14
|
from ..models.run_response_input_values_type_0 import RunResponseInputValuesType0
|
|
@@ -26,7 +27,6 @@ class RunResponse:
|
|
|
26
27
|
workflow_id (UUID):
|
|
27
28
|
machine_id (Union[None, UUID]):
|
|
28
29
|
id (UUID):
|
|
29
|
-
user_id (UUID):
|
|
30
30
|
status (RunStatus):
|
|
31
31
|
error (Union[None, list[str]]):
|
|
32
32
|
output_data (Union['RunResponseOutputDataType0', None]):
|
|
@@ -35,12 +35,14 @@ class RunResponse:
|
|
|
35
35
|
run_message_history (Union[None, list['RunResponseRunMessageHistoryType0Item']]):
|
|
36
36
|
input_values (Union['RunResponseInputValuesType0', None]):
|
|
37
37
|
created_at (datetime.datetime):
|
|
38
|
+
user_id (Union[None, UUID, Unset]):
|
|
39
|
+
organization_id (Union[None, Unset, str]):
|
|
40
|
+
pool_ids (Union[None, Unset, list[UUID]]):
|
|
38
41
|
"""
|
|
39
42
|
|
|
40
43
|
workflow_id: UUID
|
|
41
44
|
machine_id: Union[None, UUID]
|
|
42
45
|
id: UUID
|
|
43
|
-
user_id: UUID
|
|
44
46
|
status: RunStatus
|
|
45
47
|
error: Union[None, list[str]]
|
|
46
48
|
output_data: Union["RunResponseOutputDataType0", None]
|
|
@@ -49,6 +51,9 @@ class RunResponse:
|
|
|
49
51
|
run_message_history: Union[None, list["RunResponseRunMessageHistoryType0Item"]]
|
|
50
52
|
input_values: Union["RunResponseInputValuesType0", None]
|
|
51
53
|
created_at: datetime.datetime
|
|
54
|
+
user_id: Union[None, UUID, Unset] = UNSET
|
|
55
|
+
organization_id: Union[None, Unset, str] = UNSET
|
|
56
|
+
pool_ids: Union[None, Unset, list[UUID]] = UNSET
|
|
52
57
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
53
58
|
|
|
54
59
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -65,8 +70,6 @@ class RunResponse:
|
|
|
65
70
|
|
|
66
71
|
id = str(self.id)
|
|
67
72
|
|
|
68
|
-
user_id = str(self.user_id)
|
|
69
|
-
|
|
70
73
|
status = self.status.value
|
|
71
74
|
|
|
72
75
|
error: Union[None, list[str]]
|
|
@@ -114,6 +117,32 @@ class RunResponse:
|
|
|
114
117
|
|
|
115
118
|
created_at = self.created_at.isoformat()
|
|
116
119
|
|
|
120
|
+
user_id: Union[None, Unset, str]
|
|
121
|
+
if isinstance(self.user_id, Unset):
|
|
122
|
+
user_id = UNSET
|
|
123
|
+
elif isinstance(self.user_id, UUID):
|
|
124
|
+
user_id = str(self.user_id)
|
|
125
|
+
else:
|
|
126
|
+
user_id = self.user_id
|
|
127
|
+
|
|
128
|
+
organization_id: Union[None, Unset, str]
|
|
129
|
+
if isinstance(self.organization_id, Unset):
|
|
130
|
+
organization_id = UNSET
|
|
131
|
+
else:
|
|
132
|
+
organization_id = self.organization_id
|
|
133
|
+
|
|
134
|
+
pool_ids: Union[None, Unset, list[str]]
|
|
135
|
+
if isinstance(self.pool_ids, Unset):
|
|
136
|
+
pool_ids = UNSET
|
|
137
|
+
elif isinstance(self.pool_ids, list):
|
|
138
|
+
pool_ids = []
|
|
139
|
+
for pool_ids_type_0_item_data in self.pool_ids:
|
|
140
|
+
pool_ids_type_0_item = str(pool_ids_type_0_item_data)
|
|
141
|
+
pool_ids.append(pool_ids_type_0_item)
|
|
142
|
+
|
|
143
|
+
else:
|
|
144
|
+
pool_ids = self.pool_ids
|
|
145
|
+
|
|
117
146
|
field_dict: dict[str, Any] = {}
|
|
118
147
|
field_dict.update(self.additional_properties)
|
|
119
148
|
field_dict.update(
|
|
@@ -121,7 +150,6 @@ class RunResponse:
|
|
|
121
150
|
"workflow_id": workflow_id,
|
|
122
151
|
"machine_id": machine_id,
|
|
123
152
|
"id": id,
|
|
124
|
-
"user_id": user_id,
|
|
125
153
|
"status": status,
|
|
126
154
|
"error": error,
|
|
127
155
|
"output_data": output_data,
|
|
@@ -132,6 +160,12 @@ class RunResponse:
|
|
|
132
160
|
"created_at": created_at,
|
|
133
161
|
}
|
|
134
162
|
)
|
|
163
|
+
if user_id is not UNSET:
|
|
164
|
+
field_dict["user_id"] = user_id
|
|
165
|
+
if organization_id is not UNSET:
|
|
166
|
+
field_dict["organization_id"] = organization_id
|
|
167
|
+
if pool_ids is not UNSET:
|
|
168
|
+
field_dict["pool_ids"] = pool_ids
|
|
135
169
|
|
|
136
170
|
return field_dict
|
|
137
171
|
|
|
@@ -161,8 +195,6 @@ class RunResponse:
|
|
|
161
195
|
|
|
162
196
|
id = UUID(d.pop("id"))
|
|
163
197
|
|
|
164
|
-
user_id = UUID(d.pop("user_id"))
|
|
165
|
-
|
|
166
198
|
status = RunStatus(d.pop("status"))
|
|
167
199
|
|
|
168
200
|
def _parse_error(data: object) -> Union[None, list[str]]:
|
|
@@ -264,11 +296,58 @@ class RunResponse:
|
|
|
264
296
|
|
|
265
297
|
created_at = isoparse(d.pop("created_at"))
|
|
266
298
|
|
|
299
|
+
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
300
|
+
if data is None:
|
|
301
|
+
return data
|
|
302
|
+
if isinstance(data, Unset):
|
|
303
|
+
return data
|
|
304
|
+
try:
|
|
305
|
+
if not isinstance(data, str):
|
|
306
|
+
raise TypeError()
|
|
307
|
+
user_id_type_0 = UUID(data)
|
|
308
|
+
|
|
309
|
+
return user_id_type_0
|
|
310
|
+
except: # noqa: E722
|
|
311
|
+
pass
|
|
312
|
+
return cast(Union[None, UUID, Unset], data)
|
|
313
|
+
|
|
314
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
315
|
+
|
|
316
|
+
def _parse_organization_id(data: object) -> Union[None, Unset, str]:
|
|
317
|
+
if data is None:
|
|
318
|
+
return data
|
|
319
|
+
if isinstance(data, Unset):
|
|
320
|
+
return data
|
|
321
|
+
return cast(Union[None, Unset, str], data)
|
|
322
|
+
|
|
323
|
+
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
324
|
+
|
|
325
|
+
def _parse_pool_ids(data: object) -> Union[None, Unset, list[UUID]]:
|
|
326
|
+
if data is None:
|
|
327
|
+
return data
|
|
328
|
+
if isinstance(data, Unset):
|
|
329
|
+
return data
|
|
330
|
+
try:
|
|
331
|
+
if not isinstance(data, list):
|
|
332
|
+
raise TypeError()
|
|
333
|
+
pool_ids_type_0 = []
|
|
334
|
+
_pool_ids_type_0 = data
|
|
335
|
+
for pool_ids_type_0_item_data in _pool_ids_type_0:
|
|
336
|
+
pool_ids_type_0_item = UUID(pool_ids_type_0_item_data)
|
|
337
|
+
|
|
338
|
+
pool_ids_type_0.append(pool_ids_type_0_item)
|
|
339
|
+
|
|
340
|
+
return pool_ids_type_0
|
|
341
|
+
except: # noqa: E722
|
|
342
|
+
pass
|
|
343
|
+
return cast(Union[None, Unset, list[UUID]], data)
|
|
344
|
+
|
|
345
|
+
pool_ids = _parse_pool_ids(d.pop("pool_ids", UNSET))
|
|
346
|
+
|
|
267
347
|
run_response = cls(
|
|
268
348
|
workflow_id=workflow_id,
|
|
269
349
|
machine_id=machine_id,
|
|
270
350
|
id=id,
|
|
271
|
-
user_id=user_id,
|
|
272
351
|
status=status,
|
|
273
352
|
error=error,
|
|
274
353
|
output_data=output_data,
|
|
@@ -277,6 +356,9 @@ class RunResponse:
|
|
|
277
356
|
run_message_history=run_message_history,
|
|
278
357
|
input_values=input_values,
|
|
279
358
|
created_at=created_at,
|
|
359
|
+
user_id=user_id,
|
|
360
|
+
organization_id=organization_id,
|
|
361
|
+
pool_ids=pool_ids,
|
|
280
362
|
)
|
|
281
363
|
|
|
282
364
|
run_response.additional_properties = d
|