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,186 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.paginated_response_pool_response import PaginatedResponsePoolResponse
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
skip: Union[Unset, int] = 0,
|
|
16
|
+
limit: Union[Unset, int] = 100,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
params: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
params["skip"] = skip
|
|
21
|
+
|
|
22
|
+
params["limit"] = limit
|
|
23
|
+
|
|
24
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
25
|
+
|
|
26
|
+
_kwargs: dict[str, Any] = {
|
|
27
|
+
"method": "get",
|
|
28
|
+
"url": "/v1/pools",
|
|
29
|
+
"params": params,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return _kwargs
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _parse_response(
|
|
36
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
37
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponsePoolResponse]]:
|
|
38
|
+
if response.status_code == 200:
|
|
39
|
+
response_200 = PaginatedResponsePoolResponse.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, PaginatedResponsePoolResponse]]:
|
|
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
|
+
*,
|
|
65
|
+
client: AuthenticatedClient,
|
|
66
|
+
skip: Union[Unset, int] = 0,
|
|
67
|
+
limit: Union[Unset, int] = 100,
|
|
68
|
+
) -> Response[Union[HTTPValidationError, PaginatedResponsePoolResponse]]:
|
|
69
|
+
"""List Pools
|
|
70
|
+
|
|
71
|
+
List all pools for the organization.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
skip (Union[Unset, int]): Default: 0.
|
|
75
|
+
limit (Union[Unset, int]): Default: 100.
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Union[HTTPValidationError, PaginatedResponsePoolResponse]]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
skip=skip,
|
|
87
|
+
limit=limit,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
response = client.get_httpx_client().request(
|
|
91
|
+
**kwargs,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return _build_response(client=client, response=response)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def sync(
|
|
98
|
+
*,
|
|
99
|
+
client: AuthenticatedClient,
|
|
100
|
+
skip: Union[Unset, int] = 0,
|
|
101
|
+
limit: Union[Unset, int] = 100,
|
|
102
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponsePoolResponse]]:
|
|
103
|
+
"""List Pools
|
|
104
|
+
|
|
105
|
+
List all pools for the organization.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
skip (Union[Unset, int]): Default: 0.
|
|
109
|
+
limit (Union[Unset, int]): Default: 100.
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
Union[HTTPValidationError, PaginatedResponsePoolResponse]
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
return sync_detailed(
|
|
120
|
+
client=client,
|
|
121
|
+
skip=skip,
|
|
122
|
+
limit=limit,
|
|
123
|
+
).parsed
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
async def asyncio_detailed(
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
skip: Union[Unset, int] = 0,
|
|
130
|
+
limit: Union[Unset, int] = 100,
|
|
131
|
+
) -> Response[Union[HTTPValidationError, PaginatedResponsePoolResponse]]:
|
|
132
|
+
"""List Pools
|
|
133
|
+
|
|
134
|
+
List all pools for the organization.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
skip (Union[Unset, int]): Default: 0.
|
|
138
|
+
limit (Union[Unset, int]): Default: 100.
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
Response[Union[HTTPValidationError, PaginatedResponsePoolResponse]]
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
kwargs = _get_kwargs(
|
|
149
|
+
skip=skip,
|
|
150
|
+
limit=limit,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
154
|
+
|
|
155
|
+
return _build_response(client=client, response=response)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def asyncio(
|
|
159
|
+
*,
|
|
160
|
+
client: AuthenticatedClient,
|
|
161
|
+
skip: Union[Unset, int] = 0,
|
|
162
|
+
limit: Union[Unset, int] = 100,
|
|
163
|
+
) -> Optional[Union[HTTPValidationError, PaginatedResponsePoolResponse]]:
|
|
164
|
+
"""List Pools
|
|
165
|
+
|
|
166
|
+
List all pools for the organization.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
skip (Union[Unset, int]): Default: 0.
|
|
170
|
+
limit (Union[Unset, int]): Default: 100.
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
174
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Union[HTTPValidationError, PaginatedResponsePoolResponse]
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
await asyncio_detailed(
|
|
182
|
+
client=client,
|
|
183
|
+
skip=skip,
|
|
184
|
+
limit=limit,
|
|
185
|
+
)
|
|
186
|
+
).parsed
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
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.machine_pool_assignment import MachinePoolAssignment
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
pool_id: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: MachinePoolAssignment,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "delete",
|
|
23
|
+
"url": f"/v1/pools/{pool_id}/machines",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_kwargs["json"] = body.to_dict()
|
|
27
|
+
|
|
28
|
+
headers["Content-Type"] = "application/json"
|
|
29
|
+
|
|
30
|
+
_kwargs["headers"] = headers
|
|
31
|
+
return _kwargs
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
37
|
+
if response.status_code == 204:
|
|
38
|
+
response_204 = cast(Any, None)
|
|
39
|
+
return response_204
|
|
40
|
+
if response.status_code == 422:
|
|
41
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_422
|
|
44
|
+
if client.raise_on_unexpected_status:
|
|
45
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
46
|
+
else:
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _build_response(
|
|
51
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
52
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
53
|
+
return Response(
|
|
54
|
+
status_code=HTTPStatus(response.status_code),
|
|
55
|
+
content=response.content,
|
|
56
|
+
headers=response.headers,
|
|
57
|
+
parsed=_parse_response(client=client, response=response),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def sync_detailed(
|
|
62
|
+
pool_id: UUID,
|
|
63
|
+
*,
|
|
64
|
+
client: AuthenticatedClient,
|
|
65
|
+
body: MachinePoolAssignment,
|
|
66
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
67
|
+
"""Remove Machines From Pool
|
|
68
|
+
|
|
69
|
+
Remove machines from a pool.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
pool_id (UUID):
|
|
73
|
+
body (MachinePoolAssignment): Schema for assigning machines to pools
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[Union[Any, HTTPValidationError]]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
pool_id=pool_id,
|
|
85
|
+
body=body,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = client.get_httpx_client().request(
|
|
89
|
+
**kwargs,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return _build_response(client=client, response=response)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
pool_id: UUID,
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient,
|
|
99
|
+
body: MachinePoolAssignment,
|
|
100
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
101
|
+
"""Remove Machines From Pool
|
|
102
|
+
|
|
103
|
+
Remove machines from a pool.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
pool_id (UUID):
|
|
107
|
+
body (MachinePoolAssignment): Schema for assigning machines to pools
|
|
108
|
+
|
|
109
|
+
Raises:
|
|
110
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
111
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
Union[Any, HTTPValidationError]
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
return sync_detailed(
|
|
118
|
+
pool_id=pool_id,
|
|
119
|
+
client=client,
|
|
120
|
+
body=body,
|
|
121
|
+
).parsed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
async def asyncio_detailed(
|
|
125
|
+
pool_id: UUID,
|
|
126
|
+
*,
|
|
127
|
+
client: AuthenticatedClient,
|
|
128
|
+
body: MachinePoolAssignment,
|
|
129
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
130
|
+
"""Remove Machines From Pool
|
|
131
|
+
|
|
132
|
+
Remove machines from a pool.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
pool_id (UUID):
|
|
136
|
+
body (MachinePoolAssignment): Schema for assigning machines to pools
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Response[Union[Any, HTTPValidationError]]
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
kwargs = _get_kwargs(
|
|
147
|
+
pool_id=pool_id,
|
|
148
|
+
body=body,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(client=client, response=response)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def asyncio(
|
|
157
|
+
pool_id: UUID,
|
|
158
|
+
*,
|
|
159
|
+
client: AuthenticatedClient,
|
|
160
|
+
body: MachinePoolAssignment,
|
|
161
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
162
|
+
"""Remove Machines From Pool
|
|
163
|
+
|
|
164
|
+
Remove machines from a pool.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
pool_id (UUID):
|
|
168
|
+
body (MachinePoolAssignment): Schema for assigning machines to pools
|
|
169
|
+
|
|
170
|
+
Raises:
|
|
171
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
172
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
173
|
+
|
|
174
|
+
Returns:
|
|
175
|
+
Union[Any, HTTPValidationError]
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
await asyncio_detailed(
|
|
180
|
+
pool_id=pool_id,
|
|
181
|
+
client=client,
|
|
182
|
+
body=body,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|
|
@@ -0,0 +1,186 @@
|
|
|
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.pool_response import PoolResponse
|
|
11
|
+
from ...models.pool_update import PoolUpdate
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
pool_id: UUID,
|
|
17
|
+
*,
|
|
18
|
+
body: PoolUpdate,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "patch",
|
|
24
|
+
"url": f"/v1/pools/{pool_id}",
|
|
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, PoolResponse]]:
|
|
38
|
+
if response.status_code == 200:
|
|
39
|
+
response_200 = PoolResponse.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, PoolResponse]]:
|
|
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
|
+
pool_id: UUID,
|
|
65
|
+
*,
|
|
66
|
+
client: AuthenticatedClient,
|
|
67
|
+
body: PoolUpdate,
|
|
68
|
+
) -> Response[Union[HTTPValidationError, PoolResponse]]:
|
|
69
|
+
"""Update Pool
|
|
70
|
+
|
|
71
|
+
Update a pool's details.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
pool_id (UUID):
|
|
75
|
+
body (PoolUpdate): Schema for updating a pool
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Union[HTTPValidationError, PoolResponse]]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
pool_id=pool_id,
|
|
87
|
+
body=body,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
response = client.get_httpx_client().request(
|
|
91
|
+
**kwargs,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return _build_response(client=client, response=response)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def sync(
|
|
98
|
+
pool_id: UUID,
|
|
99
|
+
*,
|
|
100
|
+
client: AuthenticatedClient,
|
|
101
|
+
body: PoolUpdate,
|
|
102
|
+
) -> Optional[Union[HTTPValidationError, PoolResponse]]:
|
|
103
|
+
"""Update Pool
|
|
104
|
+
|
|
105
|
+
Update a pool's details.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
pool_id (UUID):
|
|
109
|
+
body (PoolUpdate): Schema for updating a pool
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
Union[HTTPValidationError, PoolResponse]
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
return sync_detailed(
|
|
120
|
+
pool_id=pool_id,
|
|
121
|
+
client=client,
|
|
122
|
+
body=body,
|
|
123
|
+
).parsed
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
async def asyncio_detailed(
|
|
127
|
+
pool_id: UUID,
|
|
128
|
+
*,
|
|
129
|
+
client: AuthenticatedClient,
|
|
130
|
+
body: PoolUpdate,
|
|
131
|
+
) -> Response[Union[HTTPValidationError, PoolResponse]]:
|
|
132
|
+
"""Update Pool
|
|
133
|
+
|
|
134
|
+
Update a pool's details.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
pool_id (UUID):
|
|
138
|
+
body (PoolUpdate): Schema for updating a pool
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
Response[Union[HTTPValidationError, PoolResponse]]
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
kwargs = _get_kwargs(
|
|
149
|
+
pool_id=pool_id,
|
|
150
|
+
body=body,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
154
|
+
|
|
155
|
+
return _build_response(client=client, response=response)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def asyncio(
|
|
159
|
+
pool_id: UUID,
|
|
160
|
+
*,
|
|
161
|
+
client: AuthenticatedClient,
|
|
162
|
+
body: PoolUpdate,
|
|
163
|
+
) -> Optional[Union[HTTPValidationError, PoolResponse]]:
|
|
164
|
+
"""Update Pool
|
|
165
|
+
|
|
166
|
+
Update a pool's details.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
pool_id (UUID):
|
|
170
|
+
body (PoolUpdate): Schema for updating a pool
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
174
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Union[HTTPValidationError, PoolResponse]
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
await asyncio_detailed(
|
|
182
|
+
pool_id=pool_id,
|
|
183
|
+
client=client,
|
|
184
|
+
body=body,
|
|
185
|
+
)
|
|
186
|
+
).parsed
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import datetime
|
|
1
2
|
from http import HTTPStatus
|
|
2
3
|
from typing import Any, Optional, Union
|
|
3
4
|
from uuid import UUID
|
|
@@ -17,6 +18,8 @@ def _get_kwargs(
|
|
|
17
18
|
workflow_id: Union[None, UUID, Unset] = UNSET,
|
|
18
19
|
machine_id: Union[None, UUID, Unset] = UNSET,
|
|
19
20
|
status: Union[None, RunStatus, Unset] = UNSET,
|
|
21
|
+
created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
|
|
22
|
+
created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
|
|
20
23
|
skip: Union[Unset, int] = 0,
|
|
21
24
|
limit: Union[Unset, int] = 100,
|
|
22
25
|
) -> dict[str, Any]:
|
|
@@ -49,6 +52,24 @@ def _get_kwargs(
|
|
|
49
52
|
json_status = status
|
|
50
53
|
params["status"] = json_status
|
|
51
54
|
|
|
55
|
+
json_created_at_from: Union[None, Unset, str]
|
|
56
|
+
if isinstance(created_at_from, Unset):
|
|
57
|
+
json_created_at_from = UNSET
|
|
58
|
+
elif isinstance(created_at_from, datetime.datetime):
|
|
59
|
+
json_created_at_from = created_at_from.isoformat()
|
|
60
|
+
else:
|
|
61
|
+
json_created_at_from = created_at_from
|
|
62
|
+
params["created_at_from"] = json_created_at_from
|
|
63
|
+
|
|
64
|
+
json_created_at_to: Union[None, Unset, str]
|
|
65
|
+
if isinstance(created_at_to, Unset):
|
|
66
|
+
json_created_at_to = UNSET
|
|
67
|
+
elif isinstance(created_at_to, datetime.datetime):
|
|
68
|
+
json_created_at_to = created_at_to.isoformat()
|
|
69
|
+
else:
|
|
70
|
+
json_created_at_to = created_at_to
|
|
71
|
+
params["created_at_to"] = json_created_at_to
|
|
72
|
+
|
|
52
73
|
params["skip"] = skip
|
|
53
74
|
|
|
54
75
|
params["limit"] = limit
|
|
@@ -98,6 +119,8 @@ def sync_detailed(
|
|
|
98
119
|
workflow_id: Union[None, UUID, Unset] = UNSET,
|
|
99
120
|
machine_id: Union[None, UUID, Unset] = UNSET,
|
|
100
121
|
status: Union[None, RunStatus, Unset] = UNSET,
|
|
122
|
+
created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
|
|
123
|
+
created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
|
|
101
124
|
skip: Union[Unset, int] = 0,
|
|
102
125
|
limit: Union[Unset, int] = 100,
|
|
103
126
|
) -> Response[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
|
|
@@ -112,6 +135,10 @@ def sync_detailed(
|
|
|
112
135
|
workflow_id (Union[None, UUID, Unset]): Filter by workflow ID
|
|
113
136
|
machine_id (Union[None, UUID, Unset]): Filter by machine ID
|
|
114
137
|
status (Union[None, RunStatus, Unset]): Filter by run status
|
|
138
|
+
created_at_from (Union[None, Unset, datetime.datetime]): Filter runs created at or after
|
|
139
|
+
this ISO timestamp (UTC)
|
|
140
|
+
created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
|
|
141
|
+
this ISO timestamp (UTC)
|
|
115
142
|
skip (Union[Unset, int]): Default: 0.
|
|
116
143
|
limit (Union[Unset, int]): Default: 100.
|
|
117
144
|
|
|
@@ -127,6 +154,8 @@ def sync_detailed(
|
|
|
127
154
|
workflow_id=workflow_id,
|
|
128
155
|
machine_id=machine_id,
|
|
129
156
|
status=status,
|
|
157
|
+
created_at_from=created_at_from,
|
|
158
|
+
created_at_to=created_at_to,
|
|
130
159
|
skip=skip,
|
|
131
160
|
limit=limit,
|
|
132
161
|
)
|
|
@@ -144,6 +173,8 @@ def sync(
|
|
|
144
173
|
workflow_id: Union[None, UUID, Unset] = UNSET,
|
|
145
174
|
machine_id: Union[None, UUID, Unset] = UNSET,
|
|
146
175
|
status: Union[None, RunStatus, Unset] = UNSET,
|
|
176
|
+
created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
|
|
177
|
+
created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
|
|
147
178
|
skip: Union[Unset, int] = 0,
|
|
148
179
|
limit: Union[Unset, int] = 100,
|
|
149
180
|
) -> Optional[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
|
|
@@ -158,6 +189,10 @@ def sync(
|
|
|
158
189
|
workflow_id (Union[None, UUID, Unset]): Filter by workflow ID
|
|
159
190
|
machine_id (Union[None, UUID, Unset]): Filter by machine ID
|
|
160
191
|
status (Union[None, RunStatus, Unset]): Filter by run status
|
|
192
|
+
created_at_from (Union[None, Unset, datetime.datetime]): Filter runs created at or after
|
|
193
|
+
this ISO timestamp (UTC)
|
|
194
|
+
created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
|
|
195
|
+
this ISO timestamp (UTC)
|
|
161
196
|
skip (Union[Unset, int]): Default: 0.
|
|
162
197
|
limit (Union[Unset, int]): Default: 100.
|
|
163
198
|
|
|
@@ -174,6 +209,8 @@ def sync(
|
|
|
174
209
|
workflow_id=workflow_id,
|
|
175
210
|
machine_id=machine_id,
|
|
176
211
|
status=status,
|
|
212
|
+
created_at_from=created_at_from,
|
|
213
|
+
created_at_to=created_at_to,
|
|
177
214
|
skip=skip,
|
|
178
215
|
limit=limit,
|
|
179
216
|
).parsed
|
|
@@ -185,6 +222,8 @@ async def asyncio_detailed(
|
|
|
185
222
|
workflow_id: Union[None, UUID, Unset] = UNSET,
|
|
186
223
|
machine_id: Union[None, UUID, Unset] = UNSET,
|
|
187
224
|
status: Union[None, RunStatus, Unset] = UNSET,
|
|
225
|
+
created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
|
|
226
|
+
created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
|
|
188
227
|
skip: Union[Unset, int] = 0,
|
|
189
228
|
limit: Union[Unset, int] = 100,
|
|
190
229
|
) -> Response[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
|
|
@@ -199,6 +238,10 @@ async def asyncio_detailed(
|
|
|
199
238
|
workflow_id (Union[None, UUID, Unset]): Filter by workflow ID
|
|
200
239
|
machine_id (Union[None, UUID, Unset]): Filter by machine ID
|
|
201
240
|
status (Union[None, RunStatus, Unset]): Filter by run status
|
|
241
|
+
created_at_from (Union[None, Unset, datetime.datetime]): Filter runs created at or after
|
|
242
|
+
this ISO timestamp (UTC)
|
|
243
|
+
created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
|
|
244
|
+
this ISO timestamp (UTC)
|
|
202
245
|
skip (Union[Unset, int]): Default: 0.
|
|
203
246
|
limit (Union[Unset, int]): Default: 100.
|
|
204
247
|
|
|
@@ -214,6 +257,8 @@ async def asyncio_detailed(
|
|
|
214
257
|
workflow_id=workflow_id,
|
|
215
258
|
machine_id=machine_id,
|
|
216
259
|
status=status,
|
|
260
|
+
created_at_from=created_at_from,
|
|
261
|
+
created_at_to=created_at_to,
|
|
217
262
|
skip=skip,
|
|
218
263
|
limit=limit,
|
|
219
264
|
)
|
|
@@ -229,6 +274,8 @@ async def asyncio(
|
|
|
229
274
|
workflow_id: Union[None, UUID, Unset] = UNSET,
|
|
230
275
|
machine_id: Union[None, UUID, Unset] = UNSET,
|
|
231
276
|
status: Union[None, RunStatus, Unset] = UNSET,
|
|
277
|
+
created_at_from: Union[None, Unset, datetime.datetime] = UNSET,
|
|
278
|
+
created_at_to: Union[None, Unset, datetime.datetime] = UNSET,
|
|
232
279
|
skip: Union[Unset, int] = 0,
|
|
233
280
|
limit: Union[Unset, int] = 100,
|
|
234
281
|
) -> Optional[Union[HTTPValidationError, PaginatedResponseRunResponse]]:
|
|
@@ -243,6 +290,10 @@ async def asyncio(
|
|
|
243
290
|
workflow_id (Union[None, UUID, Unset]): Filter by workflow ID
|
|
244
291
|
machine_id (Union[None, UUID, Unset]): Filter by machine ID
|
|
245
292
|
status (Union[None, RunStatus, Unset]): Filter by run status
|
|
293
|
+
created_at_from (Union[None, Unset, datetime.datetime]): Filter runs created at or after
|
|
294
|
+
this ISO timestamp (UTC)
|
|
295
|
+
created_at_to (Union[None, Unset, datetime.datetime]): Filter runs created at or before
|
|
296
|
+
this ISO timestamp (UTC)
|
|
246
297
|
skip (Union[Unset, int]): Default: 0.
|
|
247
298
|
limit (Union[Unset, int]): Default: 100.
|
|
248
299
|
|
|
@@ -260,6 +311,8 @@ async def asyncio(
|
|
|
260
311
|
workflow_id=workflow_id,
|
|
261
312
|
machine_id=machine_id,
|
|
262
313
|
status=status,
|
|
314
|
+
created_at_from=created_at_from,
|
|
315
|
+
created_at_to=created_at_to,
|
|
263
316
|
skip=skip,
|
|
264
317
|
limit=limit,
|
|
265
318
|
)
|