daytona_api_client_async 0.26.0a12__py3-none-any.whl → 0.26.0rc1__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 daytona_api_client_async might be problematic. Click here for more details.
- daytona_api_client_async/__init__.py +0 -1
- daytona_api_client_async/api/toolbox_api.py +12 -13
- daytona_api_client_async/models/__init__.py +0 -1
- daytona_api_client_async/models/create_audit_log.py +2 -2
- daytona_api_client_async/models/create_sandbox.py +5 -1
- daytona_api_client_async/models/sandbox.py +5 -1
- daytona_api_client_async/models/sandbox_state.py +1 -1
- daytona_api_client_async/models/session_execute_response.py +3 -5
- daytona_api_client_async/models/workspace.py +5 -1
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/METADATA +1 -1
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/RECORD +14 -30
- daytona_api_client_async/api/images_api.py +0 -2350
- daytona_api_client_async/api/nodes_api.py +0 -792
- daytona_api_client_async/models/build_image.py +0 -107
- daytona_api_client_async/models/build_snapshot.py +0 -115
- daytona_api_client_async/models/create_image.py +0 -105
- daytona_api_client_async/models/create_node.py +0 -135
- daytona_api_client_async/models/download_files.py +0 -101
- daytona_api_client_async/models/image_dto.py +0 -145
- daytona_api_client_async/models/image_state.py +0 -45
- daytona_api_client_async/models/paginated_images_dto.py +0 -115
- daytona_api_client_async/models/session_command_logs_response.py +0 -103
- daytona_api_client_async/models/set_image_general_status.py +0 -101
- daytona_api_client_async/models/workspace_info.py +0 -105
- daytona_api_client_async/models/workspace_labels.py +0 -101
- daytona_api_client_async/models/workspace_state.py +0 -51
- daytona_api_client_async/models/workspace_volume.py +0 -103
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/WHEEL +0 -0
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client_async-0.26.0a12.dist-info → daytona_api_client_async-0.26.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -1,2350 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Daytona
|
|
5
|
-
|
|
6
|
-
Daytona AI platform API Docs
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0
|
|
9
|
-
Contact: support@daytona.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
import warnings
|
|
16
|
-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
-
from typing_extensions import Annotated
|
|
19
|
-
|
|
20
|
-
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
21
|
-
from typing import Optional, Union
|
|
22
|
-
from typing_extensions import Annotated
|
|
23
|
-
from daytona_api_client_async.models.build_image import BuildImage
|
|
24
|
-
from daytona_api_client_async.models.create_image import CreateImage
|
|
25
|
-
from daytona_api_client_async.models.image_dto import ImageDto
|
|
26
|
-
from daytona_api_client_async.models.paginated_images_dto import PaginatedImagesDto
|
|
27
|
-
from daytona_api_client_async.models.set_image_general_status import SetImageGeneralStatus
|
|
28
|
-
from daytona_api_client_async.models.toggle_state import ToggleState
|
|
29
|
-
|
|
30
|
-
from daytona_api_client_async.api_client import ApiClient, RequestSerialized
|
|
31
|
-
from daytona_api_client_async.api_response import ApiResponse
|
|
32
|
-
from daytona_api_client_async.rest import RESTResponseType
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class ImagesApi:
|
|
36
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
-
Ref: https://openapi-generator.tech
|
|
38
|
-
|
|
39
|
-
Do not edit the class manually.
|
|
40
|
-
"""
|
|
41
|
-
|
|
42
|
-
def __init__(self, api_client=None) -> None:
|
|
43
|
-
if api_client is None:
|
|
44
|
-
api_client = ApiClient.get_default()
|
|
45
|
-
self.api_client = api_client
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@validate_call
|
|
49
|
-
async def build_image(
|
|
50
|
-
self,
|
|
51
|
-
build_image: BuildImage,
|
|
52
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
53
|
-
_request_timeout: Union[
|
|
54
|
-
None,
|
|
55
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
-
Tuple[
|
|
57
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
-
]
|
|
60
|
-
] = None,
|
|
61
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
-
_content_type: Optional[StrictStr] = None,
|
|
63
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
-
) -> ImageDto:
|
|
66
|
-
"""Build a Docker image
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
:param build_image: (required)
|
|
70
|
-
:type build_image: BuildImage
|
|
71
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
72
|
-
:type x_daytona_organization_id: str
|
|
73
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
-
number provided, it will be total request
|
|
75
|
-
timeout. It can also be a pair (tuple) of
|
|
76
|
-
(connection, read) timeouts.
|
|
77
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
-
request; this effectively ignores the
|
|
80
|
-
authentication in the spec for a single request.
|
|
81
|
-
:type _request_auth: dict, optional
|
|
82
|
-
:param _content_type: force content-type for the request.
|
|
83
|
-
:type _content_type: str, Optional
|
|
84
|
-
:param _headers: set to override the headers for a single
|
|
85
|
-
request; this effectively ignores the headers
|
|
86
|
-
in the spec for a single request.
|
|
87
|
-
:type _headers: dict, optional
|
|
88
|
-
:param _host_index: set to override the host_index for a single
|
|
89
|
-
request; this effectively ignores the host_index
|
|
90
|
-
in the spec for a single request.
|
|
91
|
-
:type _host_index: int, optional
|
|
92
|
-
:return: Returns the result object.
|
|
93
|
-
""" # noqa: E501
|
|
94
|
-
|
|
95
|
-
_param = self._build_image_serialize(
|
|
96
|
-
build_image=build_image,
|
|
97
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
98
|
-
_request_auth=_request_auth,
|
|
99
|
-
_content_type=_content_type,
|
|
100
|
-
_headers=_headers,
|
|
101
|
-
_host_index=_host_index
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
-
'200': "ImageDto",
|
|
106
|
-
'400': None,
|
|
107
|
-
}
|
|
108
|
-
response_data = await self.api_client.call_api(
|
|
109
|
-
*_param,
|
|
110
|
-
_request_timeout=_request_timeout
|
|
111
|
-
)
|
|
112
|
-
await response_data.read()
|
|
113
|
-
return self.api_client.response_deserialize(
|
|
114
|
-
response_data=response_data,
|
|
115
|
-
response_types_map=_response_types_map,
|
|
116
|
-
).data
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
@validate_call
|
|
120
|
-
async def build_image_with_http_info(
|
|
121
|
-
self,
|
|
122
|
-
build_image: BuildImage,
|
|
123
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
124
|
-
_request_timeout: Union[
|
|
125
|
-
None,
|
|
126
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
-
Tuple[
|
|
128
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
-
]
|
|
131
|
-
] = None,
|
|
132
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
-
_content_type: Optional[StrictStr] = None,
|
|
134
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
-
) -> ApiResponse[ImageDto]:
|
|
137
|
-
"""Build a Docker image
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
:param build_image: (required)
|
|
141
|
-
:type build_image: BuildImage
|
|
142
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
143
|
-
:type x_daytona_organization_id: str
|
|
144
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
145
|
-
number provided, it will be total request
|
|
146
|
-
timeout. It can also be a pair (tuple) of
|
|
147
|
-
(connection, read) timeouts.
|
|
148
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
149
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
150
|
-
request; this effectively ignores the
|
|
151
|
-
authentication in the spec for a single request.
|
|
152
|
-
:type _request_auth: dict, optional
|
|
153
|
-
:param _content_type: force content-type for the request.
|
|
154
|
-
:type _content_type: str, Optional
|
|
155
|
-
:param _headers: set to override the headers for a single
|
|
156
|
-
request; this effectively ignores the headers
|
|
157
|
-
in the spec for a single request.
|
|
158
|
-
:type _headers: dict, optional
|
|
159
|
-
:param _host_index: set to override the host_index for a single
|
|
160
|
-
request; this effectively ignores the host_index
|
|
161
|
-
in the spec for a single request.
|
|
162
|
-
:type _host_index: int, optional
|
|
163
|
-
:return: Returns the result object.
|
|
164
|
-
""" # noqa: E501
|
|
165
|
-
|
|
166
|
-
_param = self._build_image_serialize(
|
|
167
|
-
build_image=build_image,
|
|
168
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
169
|
-
_request_auth=_request_auth,
|
|
170
|
-
_content_type=_content_type,
|
|
171
|
-
_headers=_headers,
|
|
172
|
-
_host_index=_host_index
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
176
|
-
'200': "ImageDto",
|
|
177
|
-
'400': None,
|
|
178
|
-
}
|
|
179
|
-
response_data = await self.api_client.call_api(
|
|
180
|
-
*_param,
|
|
181
|
-
_request_timeout=_request_timeout
|
|
182
|
-
)
|
|
183
|
-
await response_data.read()
|
|
184
|
-
return self.api_client.response_deserialize(
|
|
185
|
-
response_data=response_data,
|
|
186
|
-
response_types_map=_response_types_map,
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
@validate_call
|
|
191
|
-
async def build_image_without_preload_content(
|
|
192
|
-
self,
|
|
193
|
-
build_image: BuildImage,
|
|
194
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
195
|
-
_request_timeout: Union[
|
|
196
|
-
None,
|
|
197
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
-
Tuple[
|
|
199
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
-
]
|
|
202
|
-
] = None,
|
|
203
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
-
_content_type: Optional[StrictStr] = None,
|
|
205
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
-
) -> RESTResponseType:
|
|
208
|
-
"""Build a Docker image
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
:param build_image: (required)
|
|
212
|
-
:type build_image: BuildImage
|
|
213
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
214
|
-
:type x_daytona_organization_id: str
|
|
215
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
216
|
-
number provided, it will be total request
|
|
217
|
-
timeout. It can also be a pair (tuple) of
|
|
218
|
-
(connection, read) timeouts.
|
|
219
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
220
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
221
|
-
request; this effectively ignores the
|
|
222
|
-
authentication in the spec for a single request.
|
|
223
|
-
:type _request_auth: dict, optional
|
|
224
|
-
:param _content_type: force content-type for the request.
|
|
225
|
-
:type _content_type: str, Optional
|
|
226
|
-
:param _headers: set to override the headers for a single
|
|
227
|
-
request; this effectively ignores the headers
|
|
228
|
-
in the spec for a single request.
|
|
229
|
-
:type _headers: dict, optional
|
|
230
|
-
:param _host_index: set to override the host_index for a single
|
|
231
|
-
request; this effectively ignores the host_index
|
|
232
|
-
in the spec for a single request.
|
|
233
|
-
:type _host_index: int, optional
|
|
234
|
-
:return: Returns the result object.
|
|
235
|
-
""" # noqa: E501
|
|
236
|
-
|
|
237
|
-
_param = self._build_image_serialize(
|
|
238
|
-
build_image=build_image,
|
|
239
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
240
|
-
_request_auth=_request_auth,
|
|
241
|
-
_content_type=_content_type,
|
|
242
|
-
_headers=_headers,
|
|
243
|
-
_host_index=_host_index
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
-
'200': "ImageDto",
|
|
248
|
-
'400': None,
|
|
249
|
-
}
|
|
250
|
-
response_data = await self.api_client.call_api(
|
|
251
|
-
*_param,
|
|
252
|
-
_request_timeout=_request_timeout
|
|
253
|
-
)
|
|
254
|
-
return response_data.response
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
def _build_image_serialize(
|
|
258
|
-
self,
|
|
259
|
-
build_image,
|
|
260
|
-
x_daytona_organization_id,
|
|
261
|
-
_request_auth,
|
|
262
|
-
_content_type,
|
|
263
|
-
_headers,
|
|
264
|
-
_host_index,
|
|
265
|
-
) -> RequestSerialized:
|
|
266
|
-
|
|
267
|
-
_host = None
|
|
268
|
-
|
|
269
|
-
_collection_formats: Dict[str, str] = {
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
_path_params: Dict[str, str] = {}
|
|
273
|
-
_query_params: List[Tuple[str, str]] = []
|
|
274
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
-
_form_params: List[Tuple[str, str]] = []
|
|
276
|
-
_files: Dict[
|
|
277
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
278
|
-
] = {}
|
|
279
|
-
_body_params: Optional[bytes] = None
|
|
280
|
-
|
|
281
|
-
# process the path parameters
|
|
282
|
-
# process the query parameters
|
|
283
|
-
# process the header parameters
|
|
284
|
-
if x_daytona_organization_id is not None:
|
|
285
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
286
|
-
# process the form parameters
|
|
287
|
-
# process the body parameter
|
|
288
|
-
if build_image is not None:
|
|
289
|
-
_body_params = build_image
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
# set the HTTP header `Accept`
|
|
293
|
-
if 'Accept' not in _header_params:
|
|
294
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
295
|
-
[
|
|
296
|
-
'application/json'
|
|
297
|
-
]
|
|
298
|
-
)
|
|
299
|
-
|
|
300
|
-
# set the HTTP header `Content-Type`
|
|
301
|
-
if _content_type:
|
|
302
|
-
_header_params['Content-Type'] = _content_type
|
|
303
|
-
else:
|
|
304
|
-
_default_content_type = (
|
|
305
|
-
self.api_client.select_header_content_type(
|
|
306
|
-
[
|
|
307
|
-
'application/json'
|
|
308
|
-
]
|
|
309
|
-
)
|
|
310
|
-
)
|
|
311
|
-
if _default_content_type is not None:
|
|
312
|
-
_header_params['Content-Type'] = _default_content_type
|
|
313
|
-
|
|
314
|
-
# authentication setting
|
|
315
|
-
_auth_settings: List[str] = [
|
|
316
|
-
'bearer',
|
|
317
|
-
'oauth2'
|
|
318
|
-
]
|
|
319
|
-
|
|
320
|
-
return self.api_client.param_serialize(
|
|
321
|
-
method='POST',
|
|
322
|
-
resource_path='/images/build',
|
|
323
|
-
path_params=_path_params,
|
|
324
|
-
query_params=_query_params,
|
|
325
|
-
header_params=_header_params,
|
|
326
|
-
body=_body_params,
|
|
327
|
-
post_params=_form_params,
|
|
328
|
-
files=_files,
|
|
329
|
-
auth_settings=_auth_settings,
|
|
330
|
-
collection_formats=_collection_formats,
|
|
331
|
-
_host=_host,
|
|
332
|
-
_request_auth=_request_auth
|
|
333
|
-
)
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
@validate_call
|
|
339
|
-
async def create_image(
|
|
340
|
-
self,
|
|
341
|
-
create_image: CreateImage,
|
|
342
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
343
|
-
_request_timeout: Union[
|
|
344
|
-
None,
|
|
345
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
346
|
-
Tuple[
|
|
347
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
348
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
349
|
-
]
|
|
350
|
-
] = None,
|
|
351
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
352
|
-
_content_type: Optional[StrictStr] = None,
|
|
353
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
354
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
355
|
-
) -> ImageDto:
|
|
356
|
-
"""Create a new image
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
:param create_image: (required)
|
|
360
|
-
:type create_image: CreateImage
|
|
361
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
362
|
-
:type x_daytona_organization_id: str
|
|
363
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
364
|
-
number provided, it will be total request
|
|
365
|
-
timeout. It can also be a pair (tuple) of
|
|
366
|
-
(connection, read) timeouts.
|
|
367
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
368
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
369
|
-
request; this effectively ignores the
|
|
370
|
-
authentication in the spec for a single request.
|
|
371
|
-
:type _request_auth: dict, optional
|
|
372
|
-
:param _content_type: force content-type for the request.
|
|
373
|
-
:type _content_type: str, Optional
|
|
374
|
-
:param _headers: set to override the headers for a single
|
|
375
|
-
request; this effectively ignores the headers
|
|
376
|
-
in the spec for a single request.
|
|
377
|
-
:type _headers: dict, optional
|
|
378
|
-
:param _host_index: set to override the host_index for a single
|
|
379
|
-
request; this effectively ignores the host_index
|
|
380
|
-
in the spec for a single request.
|
|
381
|
-
:type _host_index: int, optional
|
|
382
|
-
:return: Returns the result object.
|
|
383
|
-
""" # noqa: E501
|
|
384
|
-
|
|
385
|
-
_param = self._create_image_serialize(
|
|
386
|
-
create_image=create_image,
|
|
387
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
388
|
-
_request_auth=_request_auth,
|
|
389
|
-
_content_type=_content_type,
|
|
390
|
-
_headers=_headers,
|
|
391
|
-
_host_index=_host_index
|
|
392
|
-
)
|
|
393
|
-
|
|
394
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
395
|
-
'200': "ImageDto",
|
|
396
|
-
'400': None,
|
|
397
|
-
}
|
|
398
|
-
response_data = await self.api_client.call_api(
|
|
399
|
-
*_param,
|
|
400
|
-
_request_timeout=_request_timeout
|
|
401
|
-
)
|
|
402
|
-
await response_data.read()
|
|
403
|
-
return self.api_client.response_deserialize(
|
|
404
|
-
response_data=response_data,
|
|
405
|
-
response_types_map=_response_types_map,
|
|
406
|
-
).data
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
@validate_call
|
|
410
|
-
async def create_image_with_http_info(
|
|
411
|
-
self,
|
|
412
|
-
create_image: CreateImage,
|
|
413
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
414
|
-
_request_timeout: Union[
|
|
415
|
-
None,
|
|
416
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
417
|
-
Tuple[
|
|
418
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
419
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
420
|
-
]
|
|
421
|
-
] = None,
|
|
422
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
423
|
-
_content_type: Optional[StrictStr] = None,
|
|
424
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
425
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
426
|
-
) -> ApiResponse[ImageDto]:
|
|
427
|
-
"""Create a new image
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
:param create_image: (required)
|
|
431
|
-
:type create_image: CreateImage
|
|
432
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
433
|
-
:type x_daytona_organization_id: str
|
|
434
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
435
|
-
number provided, it will be total request
|
|
436
|
-
timeout. It can also be a pair (tuple) of
|
|
437
|
-
(connection, read) timeouts.
|
|
438
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
439
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
440
|
-
request; this effectively ignores the
|
|
441
|
-
authentication in the spec for a single request.
|
|
442
|
-
:type _request_auth: dict, optional
|
|
443
|
-
:param _content_type: force content-type for the request.
|
|
444
|
-
:type _content_type: str, Optional
|
|
445
|
-
:param _headers: set to override the headers for a single
|
|
446
|
-
request; this effectively ignores the headers
|
|
447
|
-
in the spec for a single request.
|
|
448
|
-
:type _headers: dict, optional
|
|
449
|
-
:param _host_index: set to override the host_index for a single
|
|
450
|
-
request; this effectively ignores the host_index
|
|
451
|
-
in the spec for a single request.
|
|
452
|
-
:type _host_index: int, optional
|
|
453
|
-
:return: Returns the result object.
|
|
454
|
-
""" # noqa: E501
|
|
455
|
-
|
|
456
|
-
_param = self._create_image_serialize(
|
|
457
|
-
create_image=create_image,
|
|
458
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
459
|
-
_request_auth=_request_auth,
|
|
460
|
-
_content_type=_content_type,
|
|
461
|
-
_headers=_headers,
|
|
462
|
-
_host_index=_host_index
|
|
463
|
-
)
|
|
464
|
-
|
|
465
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
466
|
-
'200': "ImageDto",
|
|
467
|
-
'400': None,
|
|
468
|
-
}
|
|
469
|
-
response_data = await self.api_client.call_api(
|
|
470
|
-
*_param,
|
|
471
|
-
_request_timeout=_request_timeout
|
|
472
|
-
)
|
|
473
|
-
await response_data.read()
|
|
474
|
-
return self.api_client.response_deserialize(
|
|
475
|
-
response_data=response_data,
|
|
476
|
-
response_types_map=_response_types_map,
|
|
477
|
-
)
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
@validate_call
|
|
481
|
-
async def create_image_without_preload_content(
|
|
482
|
-
self,
|
|
483
|
-
create_image: CreateImage,
|
|
484
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
485
|
-
_request_timeout: Union[
|
|
486
|
-
None,
|
|
487
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
488
|
-
Tuple[
|
|
489
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
490
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
491
|
-
]
|
|
492
|
-
] = None,
|
|
493
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
494
|
-
_content_type: Optional[StrictStr] = None,
|
|
495
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
496
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
497
|
-
) -> RESTResponseType:
|
|
498
|
-
"""Create a new image
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
:param create_image: (required)
|
|
502
|
-
:type create_image: CreateImage
|
|
503
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
504
|
-
:type x_daytona_organization_id: str
|
|
505
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
506
|
-
number provided, it will be total request
|
|
507
|
-
timeout. It can also be a pair (tuple) of
|
|
508
|
-
(connection, read) timeouts.
|
|
509
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
510
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
511
|
-
request; this effectively ignores the
|
|
512
|
-
authentication in the spec for a single request.
|
|
513
|
-
:type _request_auth: dict, optional
|
|
514
|
-
:param _content_type: force content-type for the request.
|
|
515
|
-
:type _content_type: str, Optional
|
|
516
|
-
:param _headers: set to override the headers for a single
|
|
517
|
-
request; this effectively ignores the headers
|
|
518
|
-
in the spec for a single request.
|
|
519
|
-
:type _headers: dict, optional
|
|
520
|
-
:param _host_index: set to override the host_index for a single
|
|
521
|
-
request; this effectively ignores the host_index
|
|
522
|
-
in the spec for a single request.
|
|
523
|
-
:type _host_index: int, optional
|
|
524
|
-
:return: Returns the result object.
|
|
525
|
-
""" # noqa: E501
|
|
526
|
-
|
|
527
|
-
_param = self._create_image_serialize(
|
|
528
|
-
create_image=create_image,
|
|
529
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
530
|
-
_request_auth=_request_auth,
|
|
531
|
-
_content_type=_content_type,
|
|
532
|
-
_headers=_headers,
|
|
533
|
-
_host_index=_host_index
|
|
534
|
-
)
|
|
535
|
-
|
|
536
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
537
|
-
'200': "ImageDto",
|
|
538
|
-
'400': None,
|
|
539
|
-
}
|
|
540
|
-
response_data = await self.api_client.call_api(
|
|
541
|
-
*_param,
|
|
542
|
-
_request_timeout=_request_timeout
|
|
543
|
-
)
|
|
544
|
-
return response_data.response
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
def _create_image_serialize(
|
|
548
|
-
self,
|
|
549
|
-
create_image,
|
|
550
|
-
x_daytona_organization_id,
|
|
551
|
-
_request_auth,
|
|
552
|
-
_content_type,
|
|
553
|
-
_headers,
|
|
554
|
-
_host_index,
|
|
555
|
-
) -> RequestSerialized:
|
|
556
|
-
|
|
557
|
-
_host = None
|
|
558
|
-
|
|
559
|
-
_collection_formats: Dict[str, str] = {
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
_path_params: Dict[str, str] = {}
|
|
563
|
-
_query_params: List[Tuple[str, str]] = []
|
|
564
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
565
|
-
_form_params: List[Tuple[str, str]] = []
|
|
566
|
-
_files: Dict[
|
|
567
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
568
|
-
] = {}
|
|
569
|
-
_body_params: Optional[bytes] = None
|
|
570
|
-
|
|
571
|
-
# process the path parameters
|
|
572
|
-
# process the query parameters
|
|
573
|
-
# process the header parameters
|
|
574
|
-
if x_daytona_organization_id is not None:
|
|
575
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
576
|
-
# process the form parameters
|
|
577
|
-
# process the body parameter
|
|
578
|
-
if create_image is not None:
|
|
579
|
-
_body_params = create_image
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
# set the HTTP header `Accept`
|
|
583
|
-
if 'Accept' not in _header_params:
|
|
584
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
585
|
-
[
|
|
586
|
-
'application/json'
|
|
587
|
-
]
|
|
588
|
-
)
|
|
589
|
-
|
|
590
|
-
# set the HTTP header `Content-Type`
|
|
591
|
-
if _content_type:
|
|
592
|
-
_header_params['Content-Type'] = _content_type
|
|
593
|
-
else:
|
|
594
|
-
_default_content_type = (
|
|
595
|
-
self.api_client.select_header_content_type(
|
|
596
|
-
[
|
|
597
|
-
'application/json'
|
|
598
|
-
]
|
|
599
|
-
)
|
|
600
|
-
)
|
|
601
|
-
if _default_content_type is not None:
|
|
602
|
-
_header_params['Content-Type'] = _default_content_type
|
|
603
|
-
|
|
604
|
-
# authentication setting
|
|
605
|
-
_auth_settings: List[str] = [
|
|
606
|
-
'bearer',
|
|
607
|
-
'oauth2'
|
|
608
|
-
]
|
|
609
|
-
|
|
610
|
-
return self.api_client.param_serialize(
|
|
611
|
-
method='POST',
|
|
612
|
-
resource_path='/images',
|
|
613
|
-
path_params=_path_params,
|
|
614
|
-
query_params=_query_params,
|
|
615
|
-
header_params=_header_params,
|
|
616
|
-
body=_body_params,
|
|
617
|
-
post_params=_form_params,
|
|
618
|
-
files=_files,
|
|
619
|
-
auth_settings=_auth_settings,
|
|
620
|
-
collection_formats=_collection_formats,
|
|
621
|
-
_host=_host,
|
|
622
|
-
_request_auth=_request_auth
|
|
623
|
-
)
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
@validate_call
|
|
629
|
-
async def get_all_images(
|
|
630
|
-
self,
|
|
631
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
632
|
-
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of items per page")] = None,
|
|
633
|
-
page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number")] = None,
|
|
634
|
-
_request_timeout: Union[
|
|
635
|
-
None,
|
|
636
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
637
|
-
Tuple[
|
|
638
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
639
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
640
|
-
]
|
|
641
|
-
] = None,
|
|
642
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
643
|
-
_content_type: Optional[StrictStr] = None,
|
|
644
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
645
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
646
|
-
) -> PaginatedImagesDto:
|
|
647
|
-
"""List all images
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
651
|
-
:type x_daytona_organization_id: str
|
|
652
|
-
:param limit: Number of items per page
|
|
653
|
-
:type limit: float
|
|
654
|
-
:param page: Page number
|
|
655
|
-
:type page: float
|
|
656
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
657
|
-
number provided, it will be total request
|
|
658
|
-
timeout. It can also be a pair (tuple) of
|
|
659
|
-
(connection, read) timeouts.
|
|
660
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
661
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
662
|
-
request; this effectively ignores the
|
|
663
|
-
authentication in the spec for a single request.
|
|
664
|
-
:type _request_auth: dict, optional
|
|
665
|
-
:param _content_type: force content-type for the request.
|
|
666
|
-
:type _content_type: str, Optional
|
|
667
|
-
:param _headers: set to override the headers for a single
|
|
668
|
-
request; this effectively ignores the headers
|
|
669
|
-
in the spec for a single request.
|
|
670
|
-
:type _headers: dict, optional
|
|
671
|
-
:param _host_index: set to override the host_index for a single
|
|
672
|
-
request; this effectively ignores the host_index
|
|
673
|
-
in the spec for a single request.
|
|
674
|
-
:type _host_index: int, optional
|
|
675
|
-
:return: Returns the result object.
|
|
676
|
-
""" # noqa: E501
|
|
677
|
-
|
|
678
|
-
_param = self._get_all_images_serialize(
|
|
679
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
680
|
-
limit=limit,
|
|
681
|
-
page=page,
|
|
682
|
-
_request_auth=_request_auth,
|
|
683
|
-
_content_type=_content_type,
|
|
684
|
-
_headers=_headers,
|
|
685
|
-
_host_index=_host_index
|
|
686
|
-
)
|
|
687
|
-
|
|
688
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
689
|
-
'200': "PaginatedImagesDto",
|
|
690
|
-
}
|
|
691
|
-
response_data = await self.api_client.call_api(
|
|
692
|
-
*_param,
|
|
693
|
-
_request_timeout=_request_timeout
|
|
694
|
-
)
|
|
695
|
-
await response_data.read()
|
|
696
|
-
return self.api_client.response_deserialize(
|
|
697
|
-
response_data=response_data,
|
|
698
|
-
response_types_map=_response_types_map,
|
|
699
|
-
).data
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
@validate_call
|
|
703
|
-
async def get_all_images_with_http_info(
|
|
704
|
-
self,
|
|
705
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
706
|
-
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of items per page")] = None,
|
|
707
|
-
page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number")] = None,
|
|
708
|
-
_request_timeout: Union[
|
|
709
|
-
None,
|
|
710
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
711
|
-
Tuple[
|
|
712
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
713
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
714
|
-
]
|
|
715
|
-
] = None,
|
|
716
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
717
|
-
_content_type: Optional[StrictStr] = None,
|
|
718
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
719
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
720
|
-
) -> ApiResponse[PaginatedImagesDto]:
|
|
721
|
-
"""List all images
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
725
|
-
:type x_daytona_organization_id: str
|
|
726
|
-
:param limit: Number of items per page
|
|
727
|
-
:type limit: float
|
|
728
|
-
:param page: Page number
|
|
729
|
-
:type page: float
|
|
730
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
731
|
-
number provided, it will be total request
|
|
732
|
-
timeout. It can also be a pair (tuple) of
|
|
733
|
-
(connection, read) timeouts.
|
|
734
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
735
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
736
|
-
request; this effectively ignores the
|
|
737
|
-
authentication in the spec for a single request.
|
|
738
|
-
:type _request_auth: dict, optional
|
|
739
|
-
:param _content_type: force content-type for the request.
|
|
740
|
-
:type _content_type: str, Optional
|
|
741
|
-
:param _headers: set to override the headers for a single
|
|
742
|
-
request; this effectively ignores the headers
|
|
743
|
-
in the spec for a single request.
|
|
744
|
-
:type _headers: dict, optional
|
|
745
|
-
:param _host_index: set to override the host_index for a single
|
|
746
|
-
request; this effectively ignores the host_index
|
|
747
|
-
in the spec for a single request.
|
|
748
|
-
:type _host_index: int, optional
|
|
749
|
-
:return: Returns the result object.
|
|
750
|
-
""" # noqa: E501
|
|
751
|
-
|
|
752
|
-
_param = self._get_all_images_serialize(
|
|
753
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
754
|
-
limit=limit,
|
|
755
|
-
page=page,
|
|
756
|
-
_request_auth=_request_auth,
|
|
757
|
-
_content_type=_content_type,
|
|
758
|
-
_headers=_headers,
|
|
759
|
-
_host_index=_host_index
|
|
760
|
-
)
|
|
761
|
-
|
|
762
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
763
|
-
'200': "PaginatedImagesDto",
|
|
764
|
-
}
|
|
765
|
-
response_data = await self.api_client.call_api(
|
|
766
|
-
*_param,
|
|
767
|
-
_request_timeout=_request_timeout
|
|
768
|
-
)
|
|
769
|
-
await response_data.read()
|
|
770
|
-
return self.api_client.response_deserialize(
|
|
771
|
-
response_data=response_data,
|
|
772
|
-
response_types_map=_response_types_map,
|
|
773
|
-
)
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
@validate_call
|
|
777
|
-
async def get_all_images_without_preload_content(
|
|
778
|
-
self,
|
|
779
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
780
|
-
limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of items per page")] = None,
|
|
781
|
-
page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number")] = None,
|
|
782
|
-
_request_timeout: Union[
|
|
783
|
-
None,
|
|
784
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
785
|
-
Tuple[
|
|
786
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
787
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
788
|
-
]
|
|
789
|
-
] = None,
|
|
790
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
791
|
-
_content_type: Optional[StrictStr] = None,
|
|
792
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
793
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
794
|
-
) -> RESTResponseType:
|
|
795
|
-
"""List all images
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
799
|
-
:type x_daytona_organization_id: str
|
|
800
|
-
:param limit: Number of items per page
|
|
801
|
-
:type limit: float
|
|
802
|
-
:param page: Page number
|
|
803
|
-
:type page: float
|
|
804
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
805
|
-
number provided, it will be total request
|
|
806
|
-
timeout. It can also be a pair (tuple) of
|
|
807
|
-
(connection, read) timeouts.
|
|
808
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
809
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
810
|
-
request; this effectively ignores the
|
|
811
|
-
authentication in the spec for a single request.
|
|
812
|
-
:type _request_auth: dict, optional
|
|
813
|
-
:param _content_type: force content-type for the request.
|
|
814
|
-
:type _content_type: str, Optional
|
|
815
|
-
:param _headers: set to override the headers for a single
|
|
816
|
-
request; this effectively ignores the headers
|
|
817
|
-
in the spec for a single request.
|
|
818
|
-
:type _headers: dict, optional
|
|
819
|
-
:param _host_index: set to override the host_index for a single
|
|
820
|
-
request; this effectively ignores the host_index
|
|
821
|
-
in the spec for a single request.
|
|
822
|
-
:type _host_index: int, optional
|
|
823
|
-
:return: Returns the result object.
|
|
824
|
-
""" # noqa: E501
|
|
825
|
-
|
|
826
|
-
_param = self._get_all_images_serialize(
|
|
827
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
828
|
-
limit=limit,
|
|
829
|
-
page=page,
|
|
830
|
-
_request_auth=_request_auth,
|
|
831
|
-
_content_type=_content_type,
|
|
832
|
-
_headers=_headers,
|
|
833
|
-
_host_index=_host_index
|
|
834
|
-
)
|
|
835
|
-
|
|
836
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
837
|
-
'200': "PaginatedImagesDto",
|
|
838
|
-
}
|
|
839
|
-
response_data = await self.api_client.call_api(
|
|
840
|
-
*_param,
|
|
841
|
-
_request_timeout=_request_timeout
|
|
842
|
-
)
|
|
843
|
-
return response_data.response
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
def _get_all_images_serialize(
|
|
847
|
-
self,
|
|
848
|
-
x_daytona_organization_id,
|
|
849
|
-
limit,
|
|
850
|
-
page,
|
|
851
|
-
_request_auth,
|
|
852
|
-
_content_type,
|
|
853
|
-
_headers,
|
|
854
|
-
_host_index,
|
|
855
|
-
) -> RequestSerialized:
|
|
856
|
-
|
|
857
|
-
_host = None
|
|
858
|
-
|
|
859
|
-
_collection_formats: Dict[str, str] = {
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
_path_params: Dict[str, str] = {}
|
|
863
|
-
_query_params: List[Tuple[str, str]] = []
|
|
864
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
865
|
-
_form_params: List[Tuple[str, str]] = []
|
|
866
|
-
_files: Dict[
|
|
867
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
868
|
-
] = {}
|
|
869
|
-
_body_params: Optional[bytes] = None
|
|
870
|
-
|
|
871
|
-
# process the path parameters
|
|
872
|
-
# process the query parameters
|
|
873
|
-
if limit is not None:
|
|
874
|
-
|
|
875
|
-
_query_params.append(('limit', limit))
|
|
876
|
-
|
|
877
|
-
if page is not None:
|
|
878
|
-
|
|
879
|
-
_query_params.append(('page', page))
|
|
880
|
-
|
|
881
|
-
# process the header parameters
|
|
882
|
-
if x_daytona_organization_id is not None:
|
|
883
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
884
|
-
# process the form parameters
|
|
885
|
-
# process the body parameter
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
# set the HTTP header `Accept`
|
|
889
|
-
if 'Accept' not in _header_params:
|
|
890
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
891
|
-
[
|
|
892
|
-
'application/json'
|
|
893
|
-
]
|
|
894
|
-
)
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
# authentication setting
|
|
898
|
-
_auth_settings: List[str] = [
|
|
899
|
-
'bearer',
|
|
900
|
-
'oauth2'
|
|
901
|
-
]
|
|
902
|
-
|
|
903
|
-
return self.api_client.param_serialize(
|
|
904
|
-
method='GET',
|
|
905
|
-
resource_path='/images',
|
|
906
|
-
path_params=_path_params,
|
|
907
|
-
query_params=_query_params,
|
|
908
|
-
header_params=_header_params,
|
|
909
|
-
body=_body_params,
|
|
910
|
-
post_params=_form_params,
|
|
911
|
-
files=_files,
|
|
912
|
-
auth_settings=_auth_settings,
|
|
913
|
-
collection_formats=_collection_formats,
|
|
914
|
-
_host=_host,
|
|
915
|
-
_request_auth=_request_auth
|
|
916
|
-
)
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
@validate_call
|
|
922
|
-
async def get_image(
|
|
923
|
-
self,
|
|
924
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
925
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
926
|
-
_request_timeout: Union[
|
|
927
|
-
None,
|
|
928
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
929
|
-
Tuple[
|
|
930
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
931
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
932
|
-
]
|
|
933
|
-
] = None,
|
|
934
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
935
|
-
_content_type: Optional[StrictStr] = None,
|
|
936
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
937
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
938
|
-
) -> ImageDto:
|
|
939
|
-
"""Get image by ID
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
:param id: Image ID (required)
|
|
943
|
-
:type id: str
|
|
944
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
945
|
-
:type x_daytona_organization_id: str
|
|
946
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
947
|
-
number provided, it will be total request
|
|
948
|
-
timeout. It can also be a pair (tuple) of
|
|
949
|
-
(connection, read) timeouts.
|
|
950
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
951
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
952
|
-
request; this effectively ignores the
|
|
953
|
-
authentication in the spec for a single request.
|
|
954
|
-
:type _request_auth: dict, optional
|
|
955
|
-
:param _content_type: force content-type for the request.
|
|
956
|
-
:type _content_type: str, Optional
|
|
957
|
-
:param _headers: set to override the headers for a single
|
|
958
|
-
request; this effectively ignores the headers
|
|
959
|
-
in the spec for a single request.
|
|
960
|
-
:type _headers: dict, optional
|
|
961
|
-
:param _host_index: set to override the host_index for a single
|
|
962
|
-
request; this effectively ignores the host_index
|
|
963
|
-
in the spec for a single request.
|
|
964
|
-
:type _host_index: int, optional
|
|
965
|
-
:return: Returns the result object.
|
|
966
|
-
""" # noqa: E501
|
|
967
|
-
|
|
968
|
-
_param = self._get_image_serialize(
|
|
969
|
-
id=id,
|
|
970
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
971
|
-
_request_auth=_request_auth,
|
|
972
|
-
_content_type=_content_type,
|
|
973
|
-
_headers=_headers,
|
|
974
|
-
_host_index=_host_index
|
|
975
|
-
)
|
|
976
|
-
|
|
977
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
978
|
-
'200': "ImageDto",
|
|
979
|
-
'404': None,
|
|
980
|
-
}
|
|
981
|
-
response_data = await self.api_client.call_api(
|
|
982
|
-
*_param,
|
|
983
|
-
_request_timeout=_request_timeout
|
|
984
|
-
)
|
|
985
|
-
await response_data.read()
|
|
986
|
-
return self.api_client.response_deserialize(
|
|
987
|
-
response_data=response_data,
|
|
988
|
-
response_types_map=_response_types_map,
|
|
989
|
-
).data
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
@validate_call
|
|
993
|
-
async def get_image_with_http_info(
|
|
994
|
-
self,
|
|
995
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
996
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
997
|
-
_request_timeout: Union[
|
|
998
|
-
None,
|
|
999
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1000
|
-
Tuple[
|
|
1001
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1002
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1003
|
-
]
|
|
1004
|
-
] = None,
|
|
1005
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1006
|
-
_content_type: Optional[StrictStr] = None,
|
|
1007
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1008
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1009
|
-
) -> ApiResponse[ImageDto]:
|
|
1010
|
-
"""Get image by ID
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
:param id: Image ID (required)
|
|
1014
|
-
:type id: str
|
|
1015
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1016
|
-
:type x_daytona_organization_id: str
|
|
1017
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1018
|
-
number provided, it will be total request
|
|
1019
|
-
timeout. It can also be a pair (tuple) of
|
|
1020
|
-
(connection, read) timeouts.
|
|
1021
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1022
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1023
|
-
request; this effectively ignores the
|
|
1024
|
-
authentication in the spec for a single request.
|
|
1025
|
-
:type _request_auth: dict, optional
|
|
1026
|
-
:param _content_type: force content-type for the request.
|
|
1027
|
-
:type _content_type: str, Optional
|
|
1028
|
-
:param _headers: set to override the headers for a single
|
|
1029
|
-
request; this effectively ignores the headers
|
|
1030
|
-
in the spec for a single request.
|
|
1031
|
-
:type _headers: dict, optional
|
|
1032
|
-
:param _host_index: set to override the host_index for a single
|
|
1033
|
-
request; this effectively ignores the host_index
|
|
1034
|
-
in the spec for a single request.
|
|
1035
|
-
:type _host_index: int, optional
|
|
1036
|
-
:return: Returns the result object.
|
|
1037
|
-
""" # noqa: E501
|
|
1038
|
-
|
|
1039
|
-
_param = self._get_image_serialize(
|
|
1040
|
-
id=id,
|
|
1041
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1042
|
-
_request_auth=_request_auth,
|
|
1043
|
-
_content_type=_content_type,
|
|
1044
|
-
_headers=_headers,
|
|
1045
|
-
_host_index=_host_index
|
|
1046
|
-
)
|
|
1047
|
-
|
|
1048
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1049
|
-
'200': "ImageDto",
|
|
1050
|
-
'404': None,
|
|
1051
|
-
}
|
|
1052
|
-
response_data = await self.api_client.call_api(
|
|
1053
|
-
*_param,
|
|
1054
|
-
_request_timeout=_request_timeout
|
|
1055
|
-
)
|
|
1056
|
-
await response_data.read()
|
|
1057
|
-
return self.api_client.response_deserialize(
|
|
1058
|
-
response_data=response_data,
|
|
1059
|
-
response_types_map=_response_types_map,
|
|
1060
|
-
)
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
@validate_call
|
|
1064
|
-
async def get_image_without_preload_content(
|
|
1065
|
-
self,
|
|
1066
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1067
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1068
|
-
_request_timeout: Union[
|
|
1069
|
-
None,
|
|
1070
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1071
|
-
Tuple[
|
|
1072
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1073
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1074
|
-
]
|
|
1075
|
-
] = None,
|
|
1076
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1077
|
-
_content_type: Optional[StrictStr] = None,
|
|
1078
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1079
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1080
|
-
) -> RESTResponseType:
|
|
1081
|
-
"""Get image by ID
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
:param id: Image ID (required)
|
|
1085
|
-
:type id: str
|
|
1086
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1087
|
-
:type x_daytona_organization_id: str
|
|
1088
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1089
|
-
number provided, it will be total request
|
|
1090
|
-
timeout. It can also be a pair (tuple) of
|
|
1091
|
-
(connection, read) timeouts.
|
|
1092
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1093
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1094
|
-
request; this effectively ignores the
|
|
1095
|
-
authentication in the spec for a single request.
|
|
1096
|
-
:type _request_auth: dict, optional
|
|
1097
|
-
:param _content_type: force content-type for the request.
|
|
1098
|
-
:type _content_type: str, Optional
|
|
1099
|
-
:param _headers: set to override the headers for a single
|
|
1100
|
-
request; this effectively ignores the headers
|
|
1101
|
-
in the spec for a single request.
|
|
1102
|
-
:type _headers: dict, optional
|
|
1103
|
-
:param _host_index: set to override the host_index for a single
|
|
1104
|
-
request; this effectively ignores the host_index
|
|
1105
|
-
in the spec for a single request.
|
|
1106
|
-
:type _host_index: int, optional
|
|
1107
|
-
:return: Returns the result object.
|
|
1108
|
-
""" # noqa: E501
|
|
1109
|
-
|
|
1110
|
-
_param = self._get_image_serialize(
|
|
1111
|
-
id=id,
|
|
1112
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1113
|
-
_request_auth=_request_auth,
|
|
1114
|
-
_content_type=_content_type,
|
|
1115
|
-
_headers=_headers,
|
|
1116
|
-
_host_index=_host_index
|
|
1117
|
-
)
|
|
1118
|
-
|
|
1119
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1120
|
-
'200': "ImageDto",
|
|
1121
|
-
'404': None,
|
|
1122
|
-
}
|
|
1123
|
-
response_data = await self.api_client.call_api(
|
|
1124
|
-
*_param,
|
|
1125
|
-
_request_timeout=_request_timeout
|
|
1126
|
-
)
|
|
1127
|
-
return response_data.response
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
def _get_image_serialize(
|
|
1131
|
-
self,
|
|
1132
|
-
id,
|
|
1133
|
-
x_daytona_organization_id,
|
|
1134
|
-
_request_auth,
|
|
1135
|
-
_content_type,
|
|
1136
|
-
_headers,
|
|
1137
|
-
_host_index,
|
|
1138
|
-
) -> RequestSerialized:
|
|
1139
|
-
|
|
1140
|
-
_host = None
|
|
1141
|
-
|
|
1142
|
-
_collection_formats: Dict[str, str] = {
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
_path_params: Dict[str, str] = {}
|
|
1146
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1147
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1148
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1149
|
-
_files: Dict[
|
|
1150
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1151
|
-
] = {}
|
|
1152
|
-
_body_params: Optional[bytes] = None
|
|
1153
|
-
|
|
1154
|
-
# process the path parameters
|
|
1155
|
-
if id is not None:
|
|
1156
|
-
_path_params['id'] = id
|
|
1157
|
-
# process the query parameters
|
|
1158
|
-
# process the header parameters
|
|
1159
|
-
if x_daytona_organization_id is not None:
|
|
1160
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1161
|
-
# process the form parameters
|
|
1162
|
-
# process the body parameter
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
# set the HTTP header `Accept`
|
|
1166
|
-
if 'Accept' not in _header_params:
|
|
1167
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1168
|
-
[
|
|
1169
|
-
'application/json'
|
|
1170
|
-
]
|
|
1171
|
-
)
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
# authentication setting
|
|
1175
|
-
_auth_settings: List[str] = [
|
|
1176
|
-
'bearer',
|
|
1177
|
-
'oauth2'
|
|
1178
|
-
]
|
|
1179
|
-
|
|
1180
|
-
return self.api_client.param_serialize(
|
|
1181
|
-
method='GET',
|
|
1182
|
-
resource_path='/images/{id}',
|
|
1183
|
-
path_params=_path_params,
|
|
1184
|
-
query_params=_query_params,
|
|
1185
|
-
header_params=_header_params,
|
|
1186
|
-
body=_body_params,
|
|
1187
|
-
post_params=_form_params,
|
|
1188
|
-
files=_files,
|
|
1189
|
-
auth_settings=_auth_settings,
|
|
1190
|
-
collection_formats=_collection_formats,
|
|
1191
|
-
_host=_host,
|
|
1192
|
-
_request_auth=_request_auth
|
|
1193
|
-
)
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
@validate_call
|
|
1199
|
-
async def get_image_build_logs(
|
|
1200
|
-
self,
|
|
1201
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1202
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1203
|
-
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1204
|
-
_request_timeout: Union[
|
|
1205
|
-
None,
|
|
1206
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1207
|
-
Tuple[
|
|
1208
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1209
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1210
|
-
]
|
|
1211
|
-
] = None,
|
|
1212
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1213
|
-
_content_type: Optional[StrictStr] = None,
|
|
1214
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1215
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1216
|
-
) -> None:
|
|
1217
|
-
"""Get image build logs
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
:param id: Image ID (required)
|
|
1221
|
-
:type id: str
|
|
1222
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1223
|
-
:type x_daytona_organization_id: str
|
|
1224
|
-
:param follow: Whether to follow the logs stream
|
|
1225
|
-
:type follow: bool
|
|
1226
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1227
|
-
number provided, it will be total request
|
|
1228
|
-
timeout. It can also be a pair (tuple) of
|
|
1229
|
-
(connection, read) timeouts.
|
|
1230
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1231
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1232
|
-
request; this effectively ignores the
|
|
1233
|
-
authentication in the spec for a single request.
|
|
1234
|
-
:type _request_auth: dict, optional
|
|
1235
|
-
:param _content_type: force content-type for the request.
|
|
1236
|
-
:type _content_type: str, Optional
|
|
1237
|
-
:param _headers: set to override the headers for a single
|
|
1238
|
-
request; this effectively ignores the headers
|
|
1239
|
-
in the spec for a single request.
|
|
1240
|
-
:type _headers: dict, optional
|
|
1241
|
-
:param _host_index: set to override the host_index for a single
|
|
1242
|
-
request; this effectively ignores the host_index
|
|
1243
|
-
in the spec for a single request.
|
|
1244
|
-
:type _host_index: int, optional
|
|
1245
|
-
:return: Returns the result object.
|
|
1246
|
-
""" # noqa: E501
|
|
1247
|
-
|
|
1248
|
-
_param = self._get_image_build_logs_serialize(
|
|
1249
|
-
id=id,
|
|
1250
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1251
|
-
follow=follow,
|
|
1252
|
-
_request_auth=_request_auth,
|
|
1253
|
-
_content_type=_content_type,
|
|
1254
|
-
_headers=_headers,
|
|
1255
|
-
_host_index=_host_index
|
|
1256
|
-
)
|
|
1257
|
-
|
|
1258
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1259
|
-
'200': None,
|
|
1260
|
-
}
|
|
1261
|
-
response_data = await self.api_client.call_api(
|
|
1262
|
-
*_param,
|
|
1263
|
-
_request_timeout=_request_timeout
|
|
1264
|
-
)
|
|
1265
|
-
await response_data.read()
|
|
1266
|
-
return self.api_client.response_deserialize(
|
|
1267
|
-
response_data=response_data,
|
|
1268
|
-
response_types_map=_response_types_map,
|
|
1269
|
-
).data
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
@validate_call
|
|
1273
|
-
async def get_image_build_logs_with_http_info(
|
|
1274
|
-
self,
|
|
1275
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1276
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1277
|
-
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1278
|
-
_request_timeout: Union[
|
|
1279
|
-
None,
|
|
1280
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1281
|
-
Tuple[
|
|
1282
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1283
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1284
|
-
]
|
|
1285
|
-
] = None,
|
|
1286
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1287
|
-
_content_type: Optional[StrictStr] = None,
|
|
1288
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1290
|
-
) -> ApiResponse[None]:
|
|
1291
|
-
"""Get image build logs
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
:param id: Image ID (required)
|
|
1295
|
-
:type id: str
|
|
1296
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1297
|
-
:type x_daytona_organization_id: str
|
|
1298
|
-
:param follow: Whether to follow the logs stream
|
|
1299
|
-
:type follow: bool
|
|
1300
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1301
|
-
number provided, it will be total request
|
|
1302
|
-
timeout. It can also be a pair (tuple) of
|
|
1303
|
-
(connection, read) timeouts.
|
|
1304
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1305
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1306
|
-
request; this effectively ignores the
|
|
1307
|
-
authentication in the spec for a single request.
|
|
1308
|
-
:type _request_auth: dict, optional
|
|
1309
|
-
:param _content_type: force content-type for the request.
|
|
1310
|
-
:type _content_type: str, Optional
|
|
1311
|
-
:param _headers: set to override the headers for a single
|
|
1312
|
-
request; this effectively ignores the headers
|
|
1313
|
-
in the spec for a single request.
|
|
1314
|
-
:type _headers: dict, optional
|
|
1315
|
-
:param _host_index: set to override the host_index for a single
|
|
1316
|
-
request; this effectively ignores the host_index
|
|
1317
|
-
in the spec for a single request.
|
|
1318
|
-
:type _host_index: int, optional
|
|
1319
|
-
:return: Returns the result object.
|
|
1320
|
-
""" # noqa: E501
|
|
1321
|
-
|
|
1322
|
-
_param = self._get_image_build_logs_serialize(
|
|
1323
|
-
id=id,
|
|
1324
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1325
|
-
follow=follow,
|
|
1326
|
-
_request_auth=_request_auth,
|
|
1327
|
-
_content_type=_content_type,
|
|
1328
|
-
_headers=_headers,
|
|
1329
|
-
_host_index=_host_index
|
|
1330
|
-
)
|
|
1331
|
-
|
|
1332
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1333
|
-
'200': None,
|
|
1334
|
-
}
|
|
1335
|
-
response_data = await self.api_client.call_api(
|
|
1336
|
-
*_param,
|
|
1337
|
-
_request_timeout=_request_timeout
|
|
1338
|
-
)
|
|
1339
|
-
await response_data.read()
|
|
1340
|
-
return self.api_client.response_deserialize(
|
|
1341
|
-
response_data=response_data,
|
|
1342
|
-
response_types_map=_response_types_map,
|
|
1343
|
-
)
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
@validate_call
|
|
1347
|
-
async def get_image_build_logs_without_preload_content(
|
|
1348
|
-
self,
|
|
1349
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1350
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1351
|
-
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1352
|
-
_request_timeout: Union[
|
|
1353
|
-
None,
|
|
1354
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1355
|
-
Tuple[
|
|
1356
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1357
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1358
|
-
]
|
|
1359
|
-
] = None,
|
|
1360
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1361
|
-
_content_type: Optional[StrictStr] = None,
|
|
1362
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1363
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1364
|
-
) -> RESTResponseType:
|
|
1365
|
-
"""Get image build logs
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
:param id: Image ID (required)
|
|
1369
|
-
:type id: str
|
|
1370
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1371
|
-
:type x_daytona_organization_id: str
|
|
1372
|
-
:param follow: Whether to follow the logs stream
|
|
1373
|
-
:type follow: bool
|
|
1374
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1375
|
-
number provided, it will be total request
|
|
1376
|
-
timeout. It can also be a pair (tuple) of
|
|
1377
|
-
(connection, read) timeouts.
|
|
1378
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1379
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1380
|
-
request; this effectively ignores the
|
|
1381
|
-
authentication in the spec for a single request.
|
|
1382
|
-
:type _request_auth: dict, optional
|
|
1383
|
-
:param _content_type: force content-type for the request.
|
|
1384
|
-
:type _content_type: str, Optional
|
|
1385
|
-
:param _headers: set to override the headers for a single
|
|
1386
|
-
request; this effectively ignores the headers
|
|
1387
|
-
in the spec for a single request.
|
|
1388
|
-
:type _headers: dict, optional
|
|
1389
|
-
:param _host_index: set to override the host_index for a single
|
|
1390
|
-
request; this effectively ignores the host_index
|
|
1391
|
-
in the spec for a single request.
|
|
1392
|
-
:type _host_index: int, optional
|
|
1393
|
-
:return: Returns the result object.
|
|
1394
|
-
""" # noqa: E501
|
|
1395
|
-
|
|
1396
|
-
_param = self._get_image_build_logs_serialize(
|
|
1397
|
-
id=id,
|
|
1398
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1399
|
-
follow=follow,
|
|
1400
|
-
_request_auth=_request_auth,
|
|
1401
|
-
_content_type=_content_type,
|
|
1402
|
-
_headers=_headers,
|
|
1403
|
-
_host_index=_host_index
|
|
1404
|
-
)
|
|
1405
|
-
|
|
1406
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1407
|
-
'200': None,
|
|
1408
|
-
}
|
|
1409
|
-
response_data = await self.api_client.call_api(
|
|
1410
|
-
*_param,
|
|
1411
|
-
_request_timeout=_request_timeout
|
|
1412
|
-
)
|
|
1413
|
-
return response_data.response
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
def _get_image_build_logs_serialize(
|
|
1417
|
-
self,
|
|
1418
|
-
id,
|
|
1419
|
-
x_daytona_organization_id,
|
|
1420
|
-
follow,
|
|
1421
|
-
_request_auth,
|
|
1422
|
-
_content_type,
|
|
1423
|
-
_headers,
|
|
1424
|
-
_host_index,
|
|
1425
|
-
) -> RequestSerialized:
|
|
1426
|
-
|
|
1427
|
-
_host = None
|
|
1428
|
-
|
|
1429
|
-
_collection_formats: Dict[str, str] = {
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
|
-
_path_params: Dict[str, str] = {}
|
|
1433
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1434
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1435
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1436
|
-
_files: Dict[
|
|
1437
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1438
|
-
] = {}
|
|
1439
|
-
_body_params: Optional[bytes] = None
|
|
1440
|
-
|
|
1441
|
-
# process the path parameters
|
|
1442
|
-
if id is not None:
|
|
1443
|
-
_path_params['id'] = id
|
|
1444
|
-
# process the query parameters
|
|
1445
|
-
if follow is not None:
|
|
1446
|
-
|
|
1447
|
-
_query_params.append(('follow', follow))
|
|
1448
|
-
|
|
1449
|
-
# process the header parameters
|
|
1450
|
-
if x_daytona_organization_id is not None:
|
|
1451
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1452
|
-
# process the form parameters
|
|
1453
|
-
# process the body parameter
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
# authentication setting
|
|
1459
|
-
_auth_settings: List[str] = [
|
|
1460
|
-
'bearer',
|
|
1461
|
-
'oauth2'
|
|
1462
|
-
]
|
|
1463
|
-
|
|
1464
|
-
return self.api_client.param_serialize(
|
|
1465
|
-
method='GET',
|
|
1466
|
-
resource_path='/images/{id}/build-logs',
|
|
1467
|
-
path_params=_path_params,
|
|
1468
|
-
query_params=_query_params,
|
|
1469
|
-
header_params=_header_params,
|
|
1470
|
-
body=_body_params,
|
|
1471
|
-
post_params=_form_params,
|
|
1472
|
-
files=_files,
|
|
1473
|
-
auth_settings=_auth_settings,
|
|
1474
|
-
collection_formats=_collection_formats,
|
|
1475
|
-
_host=_host,
|
|
1476
|
-
_request_auth=_request_auth
|
|
1477
|
-
)
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
@validate_call
|
|
1483
|
-
async def remove_image(
|
|
1484
|
-
self,
|
|
1485
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1486
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1487
|
-
_request_timeout: Union[
|
|
1488
|
-
None,
|
|
1489
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1490
|
-
Tuple[
|
|
1491
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1492
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1493
|
-
]
|
|
1494
|
-
] = None,
|
|
1495
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1496
|
-
_content_type: Optional[StrictStr] = None,
|
|
1497
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1498
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1499
|
-
) -> None:
|
|
1500
|
-
"""Delete image
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
:param id: Image ID (required)
|
|
1504
|
-
:type id: str
|
|
1505
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1506
|
-
:type x_daytona_organization_id: str
|
|
1507
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1508
|
-
number provided, it will be total request
|
|
1509
|
-
timeout. It can also be a pair (tuple) of
|
|
1510
|
-
(connection, read) timeouts.
|
|
1511
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1512
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1513
|
-
request; this effectively ignores the
|
|
1514
|
-
authentication in the spec for a single request.
|
|
1515
|
-
:type _request_auth: dict, optional
|
|
1516
|
-
:param _content_type: force content-type for the request.
|
|
1517
|
-
:type _content_type: str, Optional
|
|
1518
|
-
:param _headers: set to override the headers for a single
|
|
1519
|
-
request; this effectively ignores the headers
|
|
1520
|
-
in the spec for a single request.
|
|
1521
|
-
:type _headers: dict, optional
|
|
1522
|
-
:param _host_index: set to override the host_index for a single
|
|
1523
|
-
request; this effectively ignores the host_index
|
|
1524
|
-
in the spec for a single request.
|
|
1525
|
-
:type _host_index: int, optional
|
|
1526
|
-
:return: Returns the result object.
|
|
1527
|
-
""" # noqa: E501
|
|
1528
|
-
|
|
1529
|
-
_param = self._remove_image_serialize(
|
|
1530
|
-
id=id,
|
|
1531
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1532
|
-
_request_auth=_request_auth,
|
|
1533
|
-
_content_type=_content_type,
|
|
1534
|
-
_headers=_headers,
|
|
1535
|
-
_host_index=_host_index
|
|
1536
|
-
)
|
|
1537
|
-
|
|
1538
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1539
|
-
'200': None,
|
|
1540
|
-
}
|
|
1541
|
-
response_data = await self.api_client.call_api(
|
|
1542
|
-
*_param,
|
|
1543
|
-
_request_timeout=_request_timeout
|
|
1544
|
-
)
|
|
1545
|
-
await response_data.read()
|
|
1546
|
-
return self.api_client.response_deserialize(
|
|
1547
|
-
response_data=response_data,
|
|
1548
|
-
response_types_map=_response_types_map,
|
|
1549
|
-
).data
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
@validate_call
|
|
1553
|
-
async def remove_image_with_http_info(
|
|
1554
|
-
self,
|
|
1555
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1556
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1557
|
-
_request_timeout: Union[
|
|
1558
|
-
None,
|
|
1559
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1560
|
-
Tuple[
|
|
1561
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1562
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1563
|
-
]
|
|
1564
|
-
] = None,
|
|
1565
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1566
|
-
_content_type: Optional[StrictStr] = None,
|
|
1567
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1568
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1569
|
-
) -> ApiResponse[None]:
|
|
1570
|
-
"""Delete image
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
:param id: Image ID (required)
|
|
1574
|
-
:type id: str
|
|
1575
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1576
|
-
:type x_daytona_organization_id: str
|
|
1577
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1578
|
-
number provided, it will be total request
|
|
1579
|
-
timeout. It can also be a pair (tuple) of
|
|
1580
|
-
(connection, read) timeouts.
|
|
1581
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1582
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1583
|
-
request; this effectively ignores the
|
|
1584
|
-
authentication in the spec for a single request.
|
|
1585
|
-
:type _request_auth: dict, optional
|
|
1586
|
-
:param _content_type: force content-type for the request.
|
|
1587
|
-
:type _content_type: str, Optional
|
|
1588
|
-
:param _headers: set to override the headers for a single
|
|
1589
|
-
request; this effectively ignores the headers
|
|
1590
|
-
in the spec for a single request.
|
|
1591
|
-
:type _headers: dict, optional
|
|
1592
|
-
:param _host_index: set to override the host_index for a single
|
|
1593
|
-
request; this effectively ignores the host_index
|
|
1594
|
-
in the spec for a single request.
|
|
1595
|
-
:type _host_index: int, optional
|
|
1596
|
-
:return: Returns the result object.
|
|
1597
|
-
""" # noqa: E501
|
|
1598
|
-
|
|
1599
|
-
_param = self._remove_image_serialize(
|
|
1600
|
-
id=id,
|
|
1601
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1602
|
-
_request_auth=_request_auth,
|
|
1603
|
-
_content_type=_content_type,
|
|
1604
|
-
_headers=_headers,
|
|
1605
|
-
_host_index=_host_index
|
|
1606
|
-
)
|
|
1607
|
-
|
|
1608
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1609
|
-
'200': None,
|
|
1610
|
-
}
|
|
1611
|
-
response_data = await self.api_client.call_api(
|
|
1612
|
-
*_param,
|
|
1613
|
-
_request_timeout=_request_timeout
|
|
1614
|
-
)
|
|
1615
|
-
await response_data.read()
|
|
1616
|
-
return self.api_client.response_deserialize(
|
|
1617
|
-
response_data=response_data,
|
|
1618
|
-
response_types_map=_response_types_map,
|
|
1619
|
-
)
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
@validate_call
|
|
1623
|
-
async def remove_image_without_preload_content(
|
|
1624
|
-
self,
|
|
1625
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1626
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1627
|
-
_request_timeout: Union[
|
|
1628
|
-
None,
|
|
1629
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1630
|
-
Tuple[
|
|
1631
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1632
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1633
|
-
]
|
|
1634
|
-
] = None,
|
|
1635
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1636
|
-
_content_type: Optional[StrictStr] = None,
|
|
1637
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1638
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1639
|
-
) -> RESTResponseType:
|
|
1640
|
-
"""Delete image
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
:param id: Image ID (required)
|
|
1644
|
-
:type id: str
|
|
1645
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1646
|
-
:type x_daytona_organization_id: str
|
|
1647
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1648
|
-
number provided, it will be total request
|
|
1649
|
-
timeout. It can also be a pair (tuple) of
|
|
1650
|
-
(connection, read) timeouts.
|
|
1651
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1652
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1653
|
-
request; this effectively ignores the
|
|
1654
|
-
authentication in the spec for a single request.
|
|
1655
|
-
:type _request_auth: dict, optional
|
|
1656
|
-
:param _content_type: force content-type for the request.
|
|
1657
|
-
:type _content_type: str, Optional
|
|
1658
|
-
:param _headers: set to override the headers for a single
|
|
1659
|
-
request; this effectively ignores the headers
|
|
1660
|
-
in the spec for a single request.
|
|
1661
|
-
:type _headers: dict, optional
|
|
1662
|
-
:param _host_index: set to override the host_index for a single
|
|
1663
|
-
request; this effectively ignores the host_index
|
|
1664
|
-
in the spec for a single request.
|
|
1665
|
-
:type _host_index: int, optional
|
|
1666
|
-
:return: Returns the result object.
|
|
1667
|
-
""" # noqa: E501
|
|
1668
|
-
|
|
1669
|
-
_param = self._remove_image_serialize(
|
|
1670
|
-
id=id,
|
|
1671
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1672
|
-
_request_auth=_request_auth,
|
|
1673
|
-
_content_type=_content_type,
|
|
1674
|
-
_headers=_headers,
|
|
1675
|
-
_host_index=_host_index
|
|
1676
|
-
)
|
|
1677
|
-
|
|
1678
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1679
|
-
'200': None,
|
|
1680
|
-
}
|
|
1681
|
-
response_data = await self.api_client.call_api(
|
|
1682
|
-
*_param,
|
|
1683
|
-
_request_timeout=_request_timeout
|
|
1684
|
-
)
|
|
1685
|
-
return response_data.response
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
def _remove_image_serialize(
|
|
1689
|
-
self,
|
|
1690
|
-
id,
|
|
1691
|
-
x_daytona_organization_id,
|
|
1692
|
-
_request_auth,
|
|
1693
|
-
_content_type,
|
|
1694
|
-
_headers,
|
|
1695
|
-
_host_index,
|
|
1696
|
-
) -> RequestSerialized:
|
|
1697
|
-
|
|
1698
|
-
_host = None
|
|
1699
|
-
|
|
1700
|
-
_collection_formats: Dict[str, str] = {
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
_path_params: Dict[str, str] = {}
|
|
1704
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1705
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1706
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1707
|
-
_files: Dict[
|
|
1708
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1709
|
-
] = {}
|
|
1710
|
-
_body_params: Optional[bytes] = None
|
|
1711
|
-
|
|
1712
|
-
# process the path parameters
|
|
1713
|
-
if id is not None:
|
|
1714
|
-
_path_params['id'] = id
|
|
1715
|
-
# process the query parameters
|
|
1716
|
-
# process the header parameters
|
|
1717
|
-
if x_daytona_organization_id is not None:
|
|
1718
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1719
|
-
# process the form parameters
|
|
1720
|
-
# process the body parameter
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
# authentication setting
|
|
1726
|
-
_auth_settings: List[str] = [
|
|
1727
|
-
'bearer',
|
|
1728
|
-
'oauth2'
|
|
1729
|
-
]
|
|
1730
|
-
|
|
1731
|
-
return self.api_client.param_serialize(
|
|
1732
|
-
method='DELETE',
|
|
1733
|
-
resource_path='/images/{id}',
|
|
1734
|
-
path_params=_path_params,
|
|
1735
|
-
query_params=_query_params,
|
|
1736
|
-
header_params=_header_params,
|
|
1737
|
-
body=_body_params,
|
|
1738
|
-
post_params=_form_params,
|
|
1739
|
-
files=_files,
|
|
1740
|
-
auth_settings=_auth_settings,
|
|
1741
|
-
collection_formats=_collection_formats,
|
|
1742
|
-
_host=_host,
|
|
1743
|
-
_request_auth=_request_auth
|
|
1744
|
-
)
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
@validate_call
|
|
1750
|
-
async def set_image_general_status(
|
|
1751
|
-
self,
|
|
1752
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1753
|
-
set_image_general_status: SetImageGeneralStatus,
|
|
1754
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1755
|
-
_request_timeout: Union[
|
|
1756
|
-
None,
|
|
1757
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1758
|
-
Tuple[
|
|
1759
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1760
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1761
|
-
]
|
|
1762
|
-
] = None,
|
|
1763
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1764
|
-
_content_type: Optional[StrictStr] = None,
|
|
1765
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1766
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1767
|
-
) -> ImageDto:
|
|
1768
|
-
"""Set image general status
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
:param id: Image ID (required)
|
|
1772
|
-
:type id: str
|
|
1773
|
-
:param set_image_general_status: (required)
|
|
1774
|
-
:type set_image_general_status: SetImageGeneralStatus
|
|
1775
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1776
|
-
:type x_daytona_organization_id: str
|
|
1777
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1778
|
-
number provided, it will be total request
|
|
1779
|
-
timeout. It can also be a pair (tuple) of
|
|
1780
|
-
(connection, read) timeouts.
|
|
1781
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1782
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1783
|
-
request; this effectively ignores the
|
|
1784
|
-
authentication in the spec for a single request.
|
|
1785
|
-
:type _request_auth: dict, optional
|
|
1786
|
-
:param _content_type: force content-type for the request.
|
|
1787
|
-
:type _content_type: str, Optional
|
|
1788
|
-
:param _headers: set to override the headers for a single
|
|
1789
|
-
request; this effectively ignores the headers
|
|
1790
|
-
in the spec for a single request.
|
|
1791
|
-
:type _headers: dict, optional
|
|
1792
|
-
:param _host_index: set to override the host_index for a single
|
|
1793
|
-
request; this effectively ignores the host_index
|
|
1794
|
-
in the spec for a single request.
|
|
1795
|
-
:type _host_index: int, optional
|
|
1796
|
-
:return: Returns the result object.
|
|
1797
|
-
""" # noqa: E501
|
|
1798
|
-
|
|
1799
|
-
_param = self._set_image_general_status_serialize(
|
|
1800
|
-
id=id,
|
|
1801
|
-
set_image_general_status=set_image_general_status,
|
|
1802
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1803
|
-
_request_auth=_request_auth,
|
|
1804
|
-
_content_type=_content_type,
|
|
1805
|
-
_headers=_headers,
|
|
1806
|
-
_host_index=_host_index
|
|
1807
|
-
)
|
|
1808
|
-
|
|
1809
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1810
|
-
'200': "ImageDto",
|
|
1811
|
-
}
|
|
1812
|
-
response_data = await self.api_client.call_api(
|
|
1813
|
-
*_param,
|
|
1814
|
-
_request_timeout=_request_timeout
|
|
1815
|
-
)
|
|
1816
|
-
await response_data.read()
|
|
1817
|
-
return self.api_client.response_deserialize(
|
|
1818
|
-
response_data=response_data,
|
|
1819
|
-
response_types_map=_response_types_map,
|
|
1820
|
-
).data
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
@validate_call
|
|
1824
|
-
async def set_image_general_status_with_http_info(
|
|
1825
|
-
self,
|
|
1826
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1827
|
-
set_image_general_status: SetImageGeneralStatus,
|
|
1828
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1829
|
-
_request_timeout: Union[
|
|
1830
|
-
None,
|
|
1831
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1832
|
-
Tuple[
|
|
1833
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1834
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1835
|
-
]
|
|
1836
|
-
] = None,
|
|
1837
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1838
|
-
_content_type: Optional[StrictStr] = None,
|
|
1839
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1840
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1841
|
-
) -> ApiResponse[ImageDto]:
|
|
1842
|
-
"""Set image general status
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
:param id: Image ID (required)
|
|
1846
|
-
:type id: str
|
|
1847
|
-
:param set_image_general_status: (required)
|
|
1848
|
-
:type set_image_general_status: SetImageGeneralStatus
|
|
1849
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1850
|
-
:type x_daytona_organization_id: str
|
|
1851
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1852
|
-
number provided, it will be total request
|
|
1853
|
-
timeout. It can also be a pair (tuple) of
|
|
1854
|
-
(connection, read) timeouts.
|
|
1855
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1856
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1857
|
-
request; this effectively ignores the
|
|
1858
|
-
authentication in the spec for a single request.
|
|
1859
|
-
:type _request_auth: dict, optional
|
|
1860
|
-
:param _content_type: force content-type for the request.
|
|
1861
|
-
:type _content_type: str, Optional
|
|
1862
|
-
:param _headers: set to override the headers for a single
|
|
1863
|
-
request; this effectively ignores the headers
|
|
1864
|
-
in the spec for a single request.
|
|
1865
|
-
:type _headers: dict, optional
|
|
1866
|
-
:param _host_index: set to override the host_index for a single
|
|
1867
|
-
request; this effectively ignores the host_index
|
|
1868
|
-
in the spec for a single request.
|
|
1869
|
-
:type _host_index: int, optional
|
|
1870
|
-
:return: Returns the result object.
|
|
1871
|
-
""" # noqa: E501
|
|
1872
|
-
|
|
1873
|
-
_param = self._set_image_general_status_serialize(
|
|
1874
|
-
id=id,
|
|
1875
|
-
set_image_general_status=set_image_general_status,
|
|
1876
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1877
|
-
_request_auth=_request_auth,
|
|
1878
|
-
_content_type=_content_type,
|
|
1879
|
-
_headers=_headers,
|
|
1880
|
-
_host_index=_host_index
|
|
1881
|
-
)
|
|
1882
|
-
|
|
1883
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1884
|
-
'200': "ImageDto",
|
|
1885
|
-
}
|
|
1886
|
-
response_data = await self.api_client.call_api(
|
|
1887
|
-
*_param,
|
|
1888
|
-
_request_timeout=_request_timeout
|
|
1889
|
-
)
|
|
1890
|
-
await response_data.read()
|
|
1891
|
-
return self.api_client.response_deserialize(
|
|
1892
|
-
response_data=response_data,
|
|
1893
|
-
response_types_map=_response_types_map,
|
|
1894
|
-
)
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
@validate_call
|
|
1898
|
-
async def set_image_general_status_without_preload_content(
|
|
1899
|
-
self,
|
|
1900
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
1901
|
-
set_image_general_status: SetImageGeneralStatus,
|
|
1902
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1903
|
-
_request_timeout: Union[
|
|
1904
|
-
None,
|
|
1905
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1906
|
-
Tuple[
|
|
1907
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1908
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1909
|
-
]
|
|
1910
|
-
] = None,
|
|
1911
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1912
|
-
_content_type: Optional[StrictStr] = None,
|
|
1913
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1914
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1915
|
-
) -> RESTResponseType:
|
|
1916
|
-
"""Set image general status
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
:param id: Image ID (required)
|
|
1920
|
-
:type id: str
|
|
1921
|
-
:param set_image_general_status: (required)
|
|
1922
|
-
:type set_image_general_status: SetImageGeneralStatus
|
|
1923
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1924
|
-
:type x_daytona_organization_id: str
|
|
1925
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1926
|
-
number provided, it will be total request
|
|
1927
|
-
timeout. It can also be a pair (tuple) of
|
|
1928
|
-
(connection, read) timeouts.
|
|
1929
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1930
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1931
|
-
request; this effectively ignores the
|
|
1932
|
-
authentication in the spec for a single request.
|
|
1933
|
-
:type _request_auth: dict, optional
|
|
1934
|
-
:param _content_type: force content-type for the request.
|
|
1935
|
-
:type _content_type: str, Optional
|
|
1936
|
-
:param _headers: set to override the headers for a single
|
|
1937
|
-
request; this effectively ignores the headers
|
|
1938
|
-
in the spec for a single request.
|
|
1939
|
-
:type _headers: dict, optional
|
|
1940
|
-
:param _host_index: set to override the host_index for a single
|
|
1941
|
-
request; this effectively ignores the host_index
|
|
1942
|
-
in the spec for a single request.
|
|
1943
|
-
:type _host_index: int, optional
|
|
1944
|
-
:return: Returns the result object.
|
|
1945
|
-
""" # noqa: E501
|
|
1946
|
-
|
|
1947
|
-
_param = self._set_image_general_status_serialize(
|
|
1948
|
-
id=id,
|
|
1949
|
-
set_image_general_status=set_image_general_status,
|
|
1950
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
1951
|
-
_request_auth=_request_auth,
|
|
1952
|
-
_content_type=_content_type,
|
|
1953
|
-
_headers=_headers,
|
|
1954
|
-
_host_index=_host_index
|
|
1955
|
-
)
|
|
1956
|
-
|
|
1957
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1958
|
-
'200': "ImageDto",
|
|
1959
|
-
}
|
|
1960
|
-
response_data = await self.api_client.call_api(
|
|
1961
|
-
*_param,
|
|
1962
|
-
_request_timeout=_request_timeout
|
|
1963
|
-
)
|
|
1964
|
-
return response_data.response
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
def _set_image_general_status_serialize(
|
|
1968
|
-
self,
|
|
1969
|
-
id,
|
|
1970
|
-
set_image_general_status,
|
|
1971
|
-
x_daytona_organization_id,
|
|
1972
|
-
_request_auth,
|
|
1973
|
-
_content_type,
|
|
1974
|
-
_headers,
|
|
1975
|
-
_host_index,
|
|
1976
|
-
) -> RequestSerialized:
|
|
1977
|
-
|
|
1978
|
-
_host = None
|
|
1979
|
-
|
|
1980
|
-
_collection_formats: Dict[str, str] = {
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
_path_params: Dict[str, str] = {}
|
|
1984
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1985
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1986
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1987
|
-
_files: Dict[
|
|
1988
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1989
|
-
] = {}
|
|
1990
|
-
_body_params: Optional[bytes] = None
|
|
1991
|
-
|
|
1992
|
-
# process the path parameters
|
|
1993
|
-
if id is not None:
|
|
1994
|
-
_path_params['id'] = id
|
|
1995
|
-
# process the query parameters
|
|
1996
|
-
# process the header parameters
|
|
1997
|
-
if x_daytona_organization_id is not None:
|
|
1998
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1999
|
-
# process the form parameters
|
|
2000
|
-
# process the body parameter
|
|
2001
|
-
if set_image_general_status is not None:
|
|
2002
|
-
_body_params = set_image_general_status
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
# set the HTTP header `Accept`
|
|
2006
|
-
if 'Accept' not in _header_params:
|
|
2007
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2008
|
-
[
|
|
2009
|
-
'application/json'
|
|
2010
|
-
]
|
|
2011
|
-
)
|
|
2012
|
-
|
|
2013
|
-
# set the HTTP header `Content-Type`
|
|
2014
|
-
if _content_type:
|
|
2015
|
-
_header_params['Content-Type'] = _content_type
|
|
2016
|
-
else:
|
|
2017
|
-
_default_content_type = (
|
|
2018
|
-
self.api_client.select_header_content_type(
|
|
2019
|
-
[
|
|
2020
|
-
'application/json'
|
|
2021
|
-
]
|
|
2022
|
-
)
|
|
2023
|
-
)
|
|
2024
|
-
if _default_content_type is not None:
|
|
2025
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2026
|
-
|
|
2027
|
-
# authentication setting
|
|
2028
|
-
_auth_settings: List[str] = [
|
|
2029
|
-
'bearer',
|
|
2030
|
-
'oauth2'
|
|
2031
|
-
]
|
|
2032
|
-
|
|
2033
|
-
return self.api_client.param_serialize(
|
|
2034
|
-
method='PATCH',
|
|
2035
|
-
resource_path='/images/{id}/general',
|
|
2036
|
-
path_params=_path_params,
|
|
2037
|
-
query_params=_query_params,
|
|
2038
|
-
header_params=_header_params,
|
|
2039
|
-
body=_body_params,
|
|
2040
|
-
post_params=_form_params,
|
|
2041
|
-
files=_files,
|
|
2042
|
-
auth_settings=_auth_settings,
|
|
2043
|
-
collection_formats=_collection_formats,
|
|
2044
|
-
_host=_host,
|
|
2045
|
-
_request_auth=_request_auth
|
|
2046
|
-
)
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
@validate_call
|
|
2052
|
-
async def toggle_image_state(
|
|
2053
|
-
self,
|
|
2054
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
2055
|
-
toggle_state: ToggleState,
|
|
2056
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2057
|
-
_request_timeout: Union[
|
|
2058
|
-
None,
|
|
2059
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2060
|
-
Tuple[
|
|
2061
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2062
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2063
|
-
]
|
|
2064
|
-
] = None,
|
|
2065
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2066
|
-
_content_type: Optional[StrictStr] = None,
|
|
2067
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2068
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2069
|
-
) -> ImageDto:
|
|
2070
|
-
"""Toggle image state
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
:param id: Image ID (required)
|
|
2074
|
-
:type id: str
|
|
2075
|
-
:param toggle_state: (required)
|
|
2076
|
-
:type toggle_state: ToggleState
|
|
2077
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2078
|
-
:type x_daytona_organization_id: str
|
|
2079
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2080
|
-
number provided, it will be total request
|
|
2081
|
-
timeout. It can also be a pair (tuple) of
|
|
2082
|
-
(connection, read) timeouts.
|
|
2083
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2084
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2085
|
-
request; this effectively ignores the
|
|
2086
|
-
authentication in the spec for a single request.
|
|
2087
|
-
:type _request_auth: dict, optional
|
|
2088
|
-
:param _content_type: force content-type for the request.
|
|
2089
|
-
:type _content_type: str, Optional
|
|
2090
|
-
:param _headers: set to override the headers for a single
|
|
2091
|
-
request; this effectively ignores the headers
|
|
2092
|
-
in the spec for a single request.
|
|
2093
|
-
:type _headers: dict, optional
|
|
2094
|
-
:param _host_index: set to override the host_index for a single
|
|
2095
|
-
request; this effectively ignores the host_index
|
|
2096
|
-
in the spec for a single request.
|
|
2097
|
-
:type _host_index: int, optional
|
|
2098
|
-
:return: Returns the result object.
|
|
2099
|
-
""" # noqa: E501
|
|
2100
|
-
|
|
2101
|
-
_param = self._toggle_image_state_serialize(
|
|
2102
|
-
id=id,
|
|
2103
|
-
toggle_state=toggle_state,
|
|
2104
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
2105
|
-
_request_auth=_request_auth,
|
|
2106
|
-
_content_type=_content_type,
|
|
2107
|
-
_headers=_headers,
|
|
2108
|
-
_host_index=_host_index
|
|
2109
|
-
)
|
|
2110
|
-
|
|
2111
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2112
|
-
'200': "ImageDto",
|
|
2113
|
-
}
|
|
2114
|
-
response_data = await self.api_client.call_api(
|
|
2115
|
-
*_param,
|
|
2116
|
-
_request_timeout=_request_timeout
|
|
2117
|
-
)
|
|
2118
|
-
await response_data.read()
|
|
2119
|
-
return self.api_client.response_deserialize(
|
|
2120
|
-
response_data=response_data,
|
|
2121
|
-
response_types_map=_response_types_map,
|
|
2122
|
-
).data
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
@validate_call
|
|
2126
|
-
async def toggle_image_state_with_http_info(
|
|
2127
|
-
self,
|
|
2128
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
2129
|
-
toggle_state: ToggleState,
|
|
2130
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2131
|
-
_request_timeout: Union[
|
|
2132
|
-
None,
|
|
2133
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2134
|
-
Tuple[
|
|
2135
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2136
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2137
|
-
]
|
|
2138
|
-
] = None,
|
|
2139
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2140
|
-
_content_type: Optional[StrictStr] = None,
|
|
2141
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2142
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2143
|
-
) -> ApiResponse[ImageDto]:
|
|
2144
|
-
"""Toggle image state
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
:param id: Image ID (required)
|
|
2148
|
-
:type id: str
|
|
2149
|
-
:param toggle_state: (required)
|
|
2150
|
-
:type toggle_state: ToggleState
|
|
2151
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2152
|
-
:type x_daytona_organization_id: str
|
|
2153
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2154
|
-
number provided, it will be total request
|
|
2155
|
-
timeout. It can also be a pair (tuple) of
|
|
2156
|
-
(connection, read) timeouts.
|
|
2157
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2158
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2159
|
-
request; this effectively ignores the
|
|
2160
|
-
authentication in the spec for a single request.
|
|
2161
|
-
:type _request_auth: dict, optional
|
|
2162
|
-
:param _content_type: force content-type for the request.
|
|
2163
|
-
:type _content_type: str, Optional
|
|
2164
|
-
:param _headers: set to override the headers for a single
|
|
2165
|
-
request; this effectively ignores the headers
|
|
2166
|
-
in the spec for a single request.
|
|
2167
|
-
:type _headers: dict, optional
|
|
2168
|
-
:param _host_index: set to override the host_index for a single
|
|
2169
|
-
request; this effectively ignores the host_index
|
|
2170
|
-
in the spec for a single request.
|
|
2171
|
-
:type _host_index: int, optional
|
|
2172
|
-
:return: Returns the result object.
|
|
2173
|
-
""" # noqa: E501
|
|
2174
|
-
|
|
2175
|
-
_param = self._toggle_image_state_serialize(
|
|
2176
|
-
id=id,
|
|
2177
|
-
toggle_state=toggle_state,
|
|
2178
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
2179
|
-
_request_auth=_request_auth,
|
|
2180
|
-
_content_type=_content_type,
|
|
2181
|
-
_headers=_headers,
|
|
2182
|
-
_host_index=_host_index
|
|
2183
|
-
)
|
|
2184
|
-
|
|
2185
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2186
|
-
'200': "ImageDto",
|
|
2187
|
-
}
|
|
2188
|
-
response_data = await self.api_client.call_api(
|
|
2189
|
-
*_param,
|
|
2190
|
-
_request_timeout=_request_timeout
|
|
2191
|
-
)
|
|
2192
|
-
await response_data.read()
|
|
2193
|
-
return self.api_client.response_deserialize(
|
|
2194
|
-
response_data=response_data,
|
|
2195
|
-
response_types_map=_response_types_map,
|
|
2196
|
-
)
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
@validate_call
|
|
2200
|
-
async def toggle_image_state_without_preload_content(
|
|
2201
|
-
self,
|
|
2202
|
-
id: Annotated[StrictStr, Field(description="Image ID")],
|
|
2203
|
-
toggle_state: ToggleState,
|
|
2204
|
-
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2205
|
-
_request_timeout: Union[
|
|
2206
|
-
None,
|
|
2207
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2208
|
-
Tuple[
|
|
2209
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2210
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2211
|
-
]
|
|
2212
|
-
] = None,
|
|
2213
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2214
|
-
_content_type: Optional[StrictStr] = None,
|
|
2215
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2216
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2217
|
-
) -> RESTResponseType:
|
|
2218
|
-
"""Toggle image state
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
:param id: Image ID (required)
|
|
2222
|
-
:type id: str
|
|
2223
|
-
:param toggle_state: (required)
|
|
2224
|
-
:type toggle_state: ToggleState
|
|
2225
|
-
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2226
|
-
:type x_daytona_organization_id: str
|
|
2227
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2228
|
-
number provided, it will be total request
|
|
2229
|
-
timeout. It can also be a pair (tuple) of
|
|
2230
|
-
(connection, read) timeouts.
|
|
2231
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2232
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2233
|
-
request; this effectively ignores the
|
|
2234
|
-
authentication in the spec for a single request.
|
|
2235
|
-
:type _request_auth: dict, optional
|
|
2236
|
-
:param _content_type: force content-type for the request.
|
|
2237
|
-
:type _content_type: str, Optional
|
|
2238
|
-
:param _headers: set to override the headers for a single
|
|
2239
|
-
request; this effectively ignores the headers
|
|
2240
|
-
in the spec for a single request.
|
|
2241
|
-
:type _headers: dict, optional
|
|
2242
|
-
:param _host_index: set to override the host_index for a single
|
|
2243
|
-
request; this effectively ignores the host_index
|
|
2244
|
-
in the spec for a single request.
|
|
2245
|
-
:type _host_index: int, optional
|
|
2246
|
-
:return: Returns the result object.
|
|
2247
|
-
""" # noqa: E501
|
|
2248
|
-
|
|
2249
|
-
_param = self._toggle_image_state_serialize(
|
|
2250
|
-
id=id,
|
|
2251
|
-
toggle_state=toggle_state,
|
|
2252
|
-
x_daytona_organization_id=x_daytona_organization_id,
|
|
2253
|
-
_request_auth=_request_auth,
|
|
2254
|
-
_content_type=_content_type,
|
|
2255
|
-
_headers=_headers,
|
|
2256
|
-
_host_index=_host_index
|
|
2257
|
-
)
|
|
2258
|
-
|
|
2259
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2260
|
-
'200': "ImageDto",
|
|
2261
|
-
}
|
|
2262
|
-
response_data = await self.api_client.call_api(
|
|
2263
|
-
*_param,
|
|
2264
|
-
_request_timeout=_request_timeout
|
|
2265
|
-
)
|
|
2266
|
-
return response_data.response
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
def _toggle_image_state_serialize(
|
|
2270
|
-
self,
|
|
2271
|
-
id,
|
|
2272
|
-
toggle_state,
|
|
2273
|
-
x_daytona_organization_id,
|
|
2274
|
-
_request_auth,
|
|
2275
|
-
_content_type,
|
|
2276
|
-
_headers,
|
|
2277
|
-
_host_index,
|
|
2278
|
-
) -> RequestSerialized:
|
|
2279
|
-
|
|
2280
|
-
_host = None
|
|
2281
|
-
|
|
2282
|
-
_collection_formats: Dict[str, str] = {
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
_path_params: Dict[str, str] = {}
|
|
2286
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2287
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2288
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2289
|
-
_files: Dict[
|
|
2290
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2291
|
-
] = {}
|
|
2292
|
-
_body_params: Optional[bytes] = None
|
|
2293
|
-
|
|
2294
|
-
# process the path parameters
|
|
2295
|
-
if id is not None:
|
|
2296
|
-
_path_params['id'] = id
|
|
2297
|
-
# process the query parameters
|
|
2298
|
-
# process the header parameters
|
|
2299
|
-
if x_daytona_organization_id is not None:
|
|
2300
|
-
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
2301
|
-
# process the form parameters
|
|
2302
|
-
# process the body parameter
|
|
2303
|
-
if toggle_state is not None:
|
|
2304
|
-
_body_params = toggle_state
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
# set the HTTP header `Accept`
|
|
2308
|
-
if 'Accept' not in _header_params:
|
|
2309
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2310
|
-
[
|
|
2311
|
-
'application/json'
|
|
2312
|
-
]
|
|
2313
|
-
)
|
|
2314
|
-
|
|
2315
|
-
# set the HTTP header `Content-Type`
|
|
2316
|
-
if _content_type:
|
|
2317
|
-
_header_params['Content-Type'] = _content_type
|
|
2318
|
-
else:
|
|
2319
|
-
_default_content_type = (
|
|
2320
|
-
self.api_client.select_header_content_type(
|
|
2321
|
-
[
|
|
2322
|
-
'application/json'
|
|
2323
|
-
]
|
|
2324
|
-
)
|
|
2325
|
-
)
|
|
2326
|
-
if _default_content_type is not None:
|
|
2327
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2328
|
-
|
|
2329
|
-
# authentication setting
|
|
2330
|
-
_auth_settings: List[str] = [
|
|
2331
|
-
'bearer',
|
|
2332
|
-
'oauth2'
|
|
2333
|
-
]
|
|
2334
|
-
|
|
2335
|
-
return self.api_client.param_serialize(
|
|
2336
|
-
method='PATCH',
|
|
2337
|
-
resource_path='/images/{id}/toggle',
|
|
2338
|
-
path_params=_path_params,
|
|
2339
|
-
query_params=_query_params,
|
|
2340
|
-
header_params=_header_params,
|
|
2341
|
-
body=_body_params,
|
|
2342
|
-
post_params=_form_params,
|
|
2343
|
-
files=_files,
|
|
2344
|
-
auth_settings=_auth_settings,
|
|
2345
|
-
collection_formats=_collection_formats,
|
|
2346
|
-
_host=_host,
|
|
2347
|
-
_request_auth=_request_auth
|
|
2348
|
-
)
|
|
2349
|
-
|
|
2350
|
-
|