cyberdesk 2.0.0__py3-none-any.whl → 2.1.1__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 +480 -25
- {cyberdesk-2.0.0.dist-info → cyberdesk-2.1.1.dist-info}/METADATA +1 -1
- {cyberdesk-2.0.0.dist-info → cyberdesk-2.1.1.dist-info}/RECORD +33 -16
- 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/list_machines_v1_machines_get.py +53 -0
- 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/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/runs/list_runs_v1_runs_get.py +53 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +105 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +105 -0
- 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 +46 -1
- 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/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 +39 -0
- {cyberdesk-2.0.0.dist-info → cyberdesk-2.1.1.dist-info}/WHEEL +0 -0
- {cyberdesk-2.0.0.dist-info → cyberdesk-2.1.1.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.0.0.dist-info → cyberdesk-2.1.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.pool_response import PoolResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PaginatedResponsePoolResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PaginatedResponsePoolResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
items (list['PoolResponse']):
|
|
19
|
+
total (int):
|
|
20
|
+
skip (int):
|
|
21
|
+
limit (int):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
items: list["PoolResponse"]
|
|
25
|
+
total: int
|
|
26
|
+
skip: int
|
|
27
|
+
limit: int
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
items = []
|
|
32
|
+
for items_item_data in self.items:
|
|
33
|
+
items_item = items_item_data.to_dict()
|
|
34
|
+
items.append(items_item)
|
|
35
|
+
|
|
36
|
+
total = self.total
|
|
37
|
+
|
|
38
|
+
skip = self.skip
|
|
39
|
+
|
|
40
|
+
limit = self.limit
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"items": items,
|
|
47
|
+
"total": total,
|
|
48
|
+
"skip": skip,
|
|
49
|
+
"limit": limit,
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
from ..models.pool_response import PoolResponse
|
|
58
|
+
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
items = []
|
|
61
|
+
_items = d.pop("items")
|
|
62
|
+
for items_item_data in _items:
|
|
63
|
+
items_item = PoolResponse.from_dict(items_item_data)
|
|
64
|
+
|
|
65
|
+
items.append(items_item)
|
|
66
|
+
|
|
67
|
+
total = d.pop("total")
|
|
68
|
+
|
|
69
|
+
skip = d.pop("skip")
|
|
70
|
+
|
|
71
|
+
limit = d.pop("limit")
|
|
72
|
+
|
|
73
|
+
paginated_response_pool_response = cls(
|
|
74
|
+
items=items,
|
|
75
|
+
total=total,
|
|
76
|
+
skip=skip,
|
|
77
|
+
limit=limit,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
paginated_response_pool_response.additional_properties = d
|
|
81
|
+
return paginated_response_pool_response
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def additional_keys(self) -> list[str]:
|
|
85
|
+
return list(self.additional_properties.keys())
|
|
86
|
+
|
|
87
|
+
def __getitem__(self, key: str) -> Any:
|
|
88
|
+
return self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
91
|
+
self.additional_properties[key] = value
|
|
92
|
+
|
|
93
|
+
def __delitem__(self, key: str) -> None:
|
|
94
|
+
del self.additional_properties[key]
|
|
95
|
+
|
|
96
|
+
def __contains__(self, key: str) -> bool:
|
|
97
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PoolCreate")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PoolCreate:
|
|
14
|
+
"""Schema for creating a pool
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
name (str):
|
|
18
|
+
description (Union[None, Unset, str]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: str
|
|
22
|
+
description: Union[None, Unset, str] = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
name = self.name
|
|
27
|
+
|
|
28
|
+
description: Union[None, Unset, str]
|
|
29
|
+
if isinstance(self.description, Unset):
|
|
30
|
+
description = UNSET
|
|
31
|
+
else:
|
|
32
|
+
description = self.description
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"name": name,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
if description is not UNSET:
|
|
42
|
+
field_dict["description"] = description
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
name = d.pop("name")
|
|
50
|
+
|
|
51
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
52
|
+
if data is None:
|
|
53
|
+
return data
|
|
54
|
+
if isinstance(data, Unset):
|
|
55
|
+
return data
|
|
56
|
+
return cast(Union[None, Unset, str], data)
|
|
57
|
+
|
|
58
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
59
|
+
|
|
60
|
+
pool_create = cls(
|
|
61
|
+
name=name,
|
|
62
|
+
description=description,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
pool_create.additional_properties = d
|
|
66
|
+
return pool_create
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import 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
|
+
T = TypeVar("T", bound="PoolResponse")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class PoolResponse:
|
|
17
|
+
"""Pool response schema
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
name (str):
|
|
21
|
+
id (UUID):
|
|
22
|
+
organization_id (str):
|
|
23
|
+
created_at (datetime.datetime):
|
|
24
|
+
updated_at (datetime.datetime):
|
|
25
|
+
description (Union[None, Unset, str]):
|
|
26
|
+
machine_count (Union[None, Unset, int]): Number of machines in this pool Default: 0.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
name: str
|
|
30
|
+
id: UUID
|
|
31
|
+
organization_id: str
|
|
32
|
+
created_at: datetime.datetime
|
|
33
|
+
updated_at: datetime.datetime
|
|
34
|
+
description: Union[None, Unset, str] = UNSET
|
|
35
|
+
machine_count: Union[None, Unset, int] = 0
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
name = self.name
|
|
40
|
+
|
|
41
|
+
id = str(self.id)
|
|
42
|
+
|
|
43
|
+
organization_id = self.organization_id
|
|
44
|
+
|
|
45
|
+
created_at = self.created_at.isoformat()
|
|
46
|
+
|
|
47
|
+
updated_at = self.updated_at.isoformat()
|
|
48
|
+
|
|
49
|
+
description: Union[None, Unset, str]
|
|
50
|
+
if isinstance(self.description, Unset):
|
|
51
|
+
description = UNSET
|
|
52
|
+
else:
|
|
53
|
+
description = self.description
|
|
54
|
+
|
|
55
|
+
machine_count: Union[None, Unset, int]
|
|
56
|
+
if isinstance(self.machine_count, Unset):
|
|
57
|
+
machine_count = UNSET
|
|
58
|
+
else:
|
|
59
|
+
machine_count = self.machine_count
|
|
60
|
+
|
|
61
|
+
field_dict: dict[str, Any] = {}
|
|
62
|
+
field_dict.update(self.additional_properties)
|
|
63
|
+
field_dict.update(
|
|
64
|
+
{
|
|
65
|
+
"name": name,
|
|
66
|
+
"id": id,
|
|
67
|
+
"organization_id": organization_id,
|
|
68
|
+
"created_at": created_at,
|
|
69
|
+
"updated_at": updated_at,
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
if description is not UNSET:
|
|
73
|
+
field_dict["description"] = description
|
|
74
|
+
if machine_count is not UNSET:
|
|
75
|
+
field_dict["machine_count"] = machine_count
|
|
76
|
+
|
|
77
|
+
return field_dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
81
|
+
d = dict(src_dict)
|
|
82
|
+
name = d.pop("name")
|
|
83
|
+
|
|
84
|
+
id = UUID(d.pop("id"))
|
|
85
|
+
|
|
86
|
+
organization_id = d.pop("organization_id")
|
|
87
|
+
|
|
88
|
+
created_at = isoparse(d.pop("created_at"))
|
|
89
|
+
|
|
90
|
+
updated_at = isoparse(d.pop("updated_at"))
|
|
91
|
+
|
|
92
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
93
|
+
if data is None:
|
|
94
|
+
return data
|
|
95
|
+
if isinstance(data, Unset):
|
|
96
|
+
return data
|
|
97
|
+
return cast(Union[None, Unset, str], data)
|
|
98
|
+
|
|
99
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
100
|
+
|
|
101
|
+
def _parse_machine_count(data: object) -> Union[None, Unset, int]:
|
|
102
|
+
if data is None:
|
|
103
|
+
return data
|
|
104
|
+
if isinstance(data, Unset):
|
|
105
|
+
return data
|
|
106
|
+
return cast(Union[None, Unset, int], data)
|
|
107
|
+
|
|
108
|
+
machine_count = _parse_machine_count(d.pop("machine_count", UNSET))
|
|
109
|
+
|
|
110
|
+
pool_response = cls(
|
|
111
|
+
name=name,
|
|
112
|
+
id=id,
|
|
113
|
+
organization_id=organization_id,
|
|
114
|
+
created_at=created_at,
|
|
115
|
+
updated_at=updated_at,
|
|
116
|
+
description=description,
|
|
117
|
+
machine_count=machine_count,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
pool_response.additional_properties = d
|
|
121
|
+
return pool_response
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def additional_keys(self) -> list[str]:
|
|
125
|
+
return list(self.additional_properties.keys())
|
|
126
|
+
|
|
127
|
+
def __getitem__(self, key: str) -> Any:
|
|
128
|
+
return self.additional_properties[key]
|
|
129
|
+
|
|
130
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
131
|
+
self.additional_properties[key] = value
|
|
132
|
+
|
|
133
|
+
def __delitem__(self, key: str) -> None:
|
|
134
|
+
del self.additional_properties[key]
|
|
135
|
+
|
|
136
|
+
def __contains__(self, key: str) -> bool:
|
|
137
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PoolUpdate")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PoolUpdate:
|
|
14
|
+
"""Schema for updating a pool
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
name (Union[None, Unset, str]):
|
|
18
|
+
description (Union[None, Unset, str]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: Union[None, Unset, str] = UNSET
|
|
22
|
+
description: Union[None, Unset, str] = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
name: Union[None, Unset, str]
|
|
27
|
+
if isinstance(self.name, Unset):
|
|
28
|
+
name = UNSET
|
|
29
|
+
else:
|
|
30
|
+
name = self.name
|
|
31
|
+
|
|
32
|
+
description: Union[None, Unset, str]
|
|
33
|
+
if isinstance(self.description, Unset):
|
|
34
|
+
description = UNSET
|
|
35
|
+
else:
|
|
36
|
+
description = self.description
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update({})
|
|
41
|
+
if name is not UNSET:
|
|
42
|
+
field_dict["name"] = name
|
|
43
|
+
if description is not UNSET:
|
|
44
|
+
field_dict["description"] = description
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
|
|
52
|
+
def _parse_name(data: object) -> Union[None, Unset, str]:
|
|
53
|
+
if data is None:
|
|
54
|
+
return data
|
|
55
|
+
if isinstance(data, Unset):
|
|
56
|
+
return data
|
|
57
|
+
return cast(Union[None, Unset, str], data)
|
|
58
|
+
|
|
59
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
60
|
+
|
|
61
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
if isinstance(data, Unset):
|
|
65
|
+
return data
|
|
66
|
+
return cast(Union[None, Unset, str], data)
|
|
67
|
+
|
|
68
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
69
|
+
|
|
70
|
+
pool_update = cls(
|
|
71
|
+
name=name,
|
|
72
|
+
description=description,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
pool_update.additional_properties = d
|
|
76
|
+
return pool_update
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def additional_keys(self) -> list[str]:
|
|
80
|
+
return list(self.additional_properties.keys())
|
|
81
|
+
|
|
82
|
+
def __getitem__(self, key: str) -> Any:
|
|
83
|
+
return self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
86
|
+
self.additional_properties[key] = value
|
|
87
|
+
|
|
88
|
+
def __delitem__(self, key: str) -> None:
|
|
89
|
+
del self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __contains__(self, key: str) -> bool:
|
|
92
|
+
return key in self.additional_properties
|
|
@@ -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
|
|
@@ -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 all of
|
|
28
|
+
these pools (intersection). Ignored when machine_id is provided.
|
|
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
|
)
|