daytona_api_client_async 0.21.3a0__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.

Files changed (123) hide show
  1. daytona_api_client_async/__init__.py +129 -0
  2. daytona_api_client_async/api/__init__.py +16 -0
  3. daytona_api_client_async/api/api_keys_api.py +1391 -0
  4. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  5. daytona_api_client_async/api/images_api.py +2350 -0
  6. daytona_api_client_async/api/nodes_api.py +792 -0
  7. daytona_api_client_async/api/object_storage_api.py +298 -0
  8. daytona_api_client_async/api/organizations_api.py +6762 -0
  9. daytona_api_client_async/api/preview_api.py +819 -0
  10. daytona_api_client_async/api/runners_api.py +792 -0
  11. daytona_api_client_async/api/sandbox_api.py +3994 -0
  12. daytona_api_client_async/api/snapshots_api.py +2059 -0
  13. daytona_api_client_async/api/toolbox_api.py +11819 -0
  14. daytona_api_client_async/api/users_api.py +2075 -0
  15. daytona_api_client_async/api/volumes_api.py +1419 -0
  16. daytona_api_client_async/api/workspace_api.py +4036 -0
  17. daytona_api_client_async/api_client.py +801 -0
  18. daytona_api_client_async/api_response.py +21 -0
  19. daytona_api_client_async/configuration.py +579 -0
  20. daytona_api_client_async/exceptions.py +217 -0
  21. daytona_api_client_async/models/__init__.py +101 -0
  22. daytona_api_client_async/models/account_provider.py +103 -0
  23. daytona_api_client_async/models/api_key_list.py +130 -0
  24. daytona_api_client_async/models/api_key_response.py +123 -0
  25. daytona_api_client_async/models/build_image.py +107 -0
  26. daytona_api_client_async/models/build_info.py +108 -0
  27. daytona_api_client_async/models/build_snapshot.py +115 -0
  28. daytona_api_client_async/models/command.py +105 -0
  29. daytona_api_client_async/models/completion_context.py +103 -0
  30. daytona_api_client_async/models/completion_item.py +113 -0
  31. daytona_api_client_async/models/completion_list.py +111 -0
  32. daytona_api_client_async/models/create_api_key.py +119 -0
  33. daytona_api_client_async/models/create_build_info.py +103 -0
  34. daytona_api_client_async/models/create_docker_registry.py +120 -0
  35. daytona_api_client_async/models/create_image.py +105 -0
  36. daytona_api_client_async/models/create_linked_account.py +103 -0
  37. daytona_api_client_async/models/create_node.py +135 -0
  38. daytona_api_client_async/models/create_organization.py +101 -0
  39. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  40. daytona_api_client_async/models/create_organization_quota.py +117 -0
  41. daytona_api_client_async/models/create_organization_role.py +113 -0
  42. daytona_api_client_async/models/create_runner.py +135 -0
  43. daytona_api_client_async/models/create_sandbox.py +161 -0
  44. daytona_api_client_async/models/create_session_request.py +101 -0
  45. daytona_api_client_async/models/create_snapshot.py +121 -0
  46. daytona_api_client_async/models/create_user.py +125 -0
  47. daytona_api_client_async/models/create_volume.py +101 -0
  48. daytona_api_client_async/models/create_workspace.py +161 -0
  49. daytona_api_client_async/models/docker_registry.py +123 -0
  50. daytona_api_client_async/models/execute_request.py +105 -0
  51. daytona_api_client_async/models/execute_response.py +103 -0
  52. daytona_api_client_async/models/file_info.py +115 -0
  53. daytona_api_client_async/models/file_status.py +107 -0
  54. daytona_api_client_async/models/git_add_request.py +103 -0
  55. daytona_api_client_async/models/git_branch_request.py +103 -0
  56. daytona_api_client_async/models/git_checkout_request.py +103 -0
  57. daytona_api_client_async/models/git_clone_request.py +111 -0
  58. daytona_api_client_async/models/git_commit_info.py +109 -0
  59. daytona_api_client_async/models/git_commit_request.py +107 -0
  60. daytona_api_client_async/models/git_commit_response.py +101 -0
  61. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  62. daytona_api_client_async/models/git_repo_request.py +105 -0
  63. daytona_api_client_async/models/git_status.py +117 -0
  64. daytona_api_client_async/models/image_dto.py +145 -0
  65. daytona_api_client_async/models/image_state.py +45 -0
  66. daytona_api_client_async/models/list_branch_response.py +101 -0
  67. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  68. daytona_api_client_async/models/lsp_document_request.py +105 -0
  69. daytona_api_client_async/models/lsp_location.py +107 -0
  70. daytona_api_client_async/models/lsp_server_request.py +103 -0
  71. daytona_api_client_async/models/lsp_symbol.py +109 -0
  72. daytona_api_client_async/models/match.py +105 -0
  73. daytona_api_client_async/models/organization.py +120 -0
  74. daytona_api_client_async/models/organization_invitation.py +144 -0
  75. daytona_api_client_async/models/organization_role.py +122 -0
  76. daytona_api_client_async/models/organization_suspension.py +104 -0
  77. daytona_api_client_async/models/organization_user.py +131 -0
  78. daytona_api_client_async/models/paginated_images_dto.py +115 -0
  79. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  80. daytona_api_client_async/models/port_preview_url.py +103 -0
  81. daytona_api_client_async/models/position.py +103 -0
  82. daytona_api_client_async/models/project_dir_response.py +101 -0
  83. daytona_api_client_async/models/range.py +110 -0
  84. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  85. daytona_api_client_async/models/replace_request.py +105 -0
  86. daytona_api_client_async/models/replace_result.py +105 -0
  87. daytona_api_client_async/models/sandbox.py +180 -0
  88. daytona_api_client_async/models/sandbox_info.py +105 -0
  89. daytona_api_client_async/models/sandbox_labels.py +101 -0
  90. daytona_api_client_async/models/sandbox_state.py +52 -0
  91. daytona_api_client_async/models/sandbox_volume.py +103 -0
  92. daytona_api_client_async/models/search_files_response.py +101 -0
  93. daytona_api_client_async/models/session.py +116 -0
  94. daytona_api_client_async/models/session_execute_request.py +105 -0
  95. daytona_api_client_async/models/session_execute_response.py +105 -0
  96. daytona_api_client_async/models/set_image_general_status.py +101 -0
  97. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  98. daytona_api_client_async/models/snapshot_dto.py +161 -0
  99. daytona_api_client_async/models/snapshot_state.py +46 -0
  100. daytona_api_client_async/models/storage_access_dto.py +111 -0
  101. daytona_api_client_async/models/toggle_state.py +101 -0
  102. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  103. daytona_api_client_async/models/update_docker_registry.py +105 -0
  104. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  105. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  106. daytona_api_client_async/models/update_organization_quota.py +162 -0
  107. daytona_api_client_async/models/update_organization_role.py +113 -0
  108. daytona_api_client_async/models/usage_overview.py +113 -0
  109. daytona_api_client_async/models/user.py +115 -0
  110. daytona_api_client_async/models/user_public_key.py +103 -0
  111. daytona_api_client_async/models/volume_dto.py +126 -0
  112. daytona_api_client_async/models/volume_state.py +43 -0
  113. daytona_api_client_async/models/workspace.py +204 -0
  114. daytona_api_client_async/models/workspace_info.py +105 -0
  115. daytona_api_client_async/models/workspace_labels.py +101 -0
  116. daytona_api_client_async/models/workspace_state.py +51 -0
  117. daytona_api_client_async/models/workspace_volume.py +103 -0
  118. daytona_api_client_async/py.typed +0 -0
  119. daytona_api_client_async/rest.py +214 -0
  120. daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
  121. daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
  122. daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
  123. daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1419 @@
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, StrictStr
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from daytona_api_client_async.models.create_volume import CreateVolume
24
+ from daytona_api_client_async.models.volume_dto import VolumeDto
25
+
26
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
27
+ from daytona_api_client_async.api_response import ApiResponse
28
+ from daytona_api_client_async.rest import RESTResponseType
29
+
30
+
31
+ class VolumesApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def create_volume(
46
+ self,
47
+ create_volume: CreateVolume,
48
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> VolumeDto:
62
+ """Create a new volume
63
+
64
+
65
+ :param create_volume: (required)
66
+ :type create_volume: CreateVolume
67
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
68
+ :type x_daytona_organization_id: str
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._create_volume_serialize(
92
+ create_volume=create_volume,
93
+ x_daytona_organization_id=x_daytona_organization_id,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ '200': "VolumeDto",
102
+ }
103
+ response_data = await self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ await response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ async def create_volume_with_http_info(
116
+ self,
117
+ create_volume: CreateVolume,
118
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[VolumeDto]:
132
+ """Create a new volume
133
+
134
+
135
+ :param create_volume: (required)
136
+ :type create_volume: CreateVolume
137
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
138
+ :type x_daytona_organization_id: str
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._create_volume_serialize(
162
+ create_volume=create_volume,
163
+ x_daytona_organization_id=x_daytona_organization_id,
164
+ _request_auth=_request_auth,
165
+ _content_type=_content_type,
166
+ _headers=_headers,
167
+ _host_index=_host_index
168
+ )
169
+
170
+ _response_types_map: Dict[str, Optional[str]] = {
171
+ '200': "VolumeDto",
172
+ }
173
+ response_data = await self.api_client.call_api(
174
+ *_param,
175
+ _request_timeout=_request_timeout
176
+ )
177
+ await response_data.read()
178
+ return self.api_client.response_deserialize(
179
+ response_data=response_data,
180
+ response_types_map=_response_types_map,
181
+ )
182
+
183
+
184
+ @validate_call
185
+ async def create_volume_without_preload_content(
186
+ self,
187
+ create_volume: CreateVolume,
188
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Create a new volume
203
+
204
+
205
+ :param create_volume: (required)
206
+ :type create_volume: CreateVolume
207
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
208
+ :type x_daytona_organization_id: str
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
214
+ :param _request_auth: set to override the auth_settings for an a single
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
217
+ :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
228
+ :return: Returns the result object.
229
+ """ # noqa: E501
230
+
231
+ _param = self._create_volume_serialize(
232
+ create_volume=create_volume,
233
+ x_daytona_organization_id=x_daytona_organization_id,
234
+ _request_auth=_request_auth,
235
+ _content_type=_content_type,
236
+ _headers=_headers,
237
+ _host_index=_host_index
238
+ )
239
+
240
+ _response_types_map: Dict[str, Optional[str]] = {
241
+ '200': "VolumeDto",
242
+ }
243
+ response_data = await self.api_client.call_api(
244
+ *_param,
245
+ _request_timeout=_request_timeout
246
+ )
247
+ return response_data.response
248
+
249
+
250
+ def _create_volume_serialize(
251
+ self,
252
+ create_volume,
253
+ x_daytona_organization_id,
254
+ _request_auth,
255
+ _content_type,
256
+ _headers,
257
+ _host_index,
258
+ ) -> RequestSerialized:
259
+
260
+ _host = None
261
+
262
+ _collection_formats: Dict[str, str] = {
263
+ }
264
+
265
+ _path_params: Dict[str, str] = {}
266
+ _query_params: List[Tuple[str, str]] = []
267
+ _header_params: Dict[str, Optional[str]] = _headers or {}
268
+ _form_params: List[Tuple[str, str]] = []
269
+ _files: Dict[
270
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
271
+ ] = {}
272
+ _body_params: Optional[bytes] = None
273
+
274
+ # process the path parameters
275
+ # process the query parameters
276
+ # process the header parameters
277
+ if x_daytona_organization_id is not None:
278
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
279
+ # process the form parameters
280
+ # process the body parameter
281
+ if create_volume is not None:
282
+ _body_params = create_volume
283
+
284
+
285
+ # set the HTTP header `Accept`
286
+ if 'Accept' not in _header_params:
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+
293
+ # set the HTTP header `Content-Type`
294
+ if _content_type:
295
+ _header_params['Content-Type'] = _content_type
296
+ else:
297
+ _default_content_type = (
298
+ self.api_client.select_header_content_type(
299
+ [
300
+ 'application/json'
301
+ ]
302
+ )
303
+ )
304
+ if _default_content_type is not None:
305
+ _header_params['Content-Type'] = _default_content_type
306
+
307
+ # authentication setting
308
+ _auth_settings: List[str] = [
309
+ 'bearer',
310
+ 'oauth2'
311
+ ]
312
+
313
+ return self.api_client.param_serialize(
314
+ method='POST',
315
+ resource_path='/volumes',
316
+ path_params=_path_params,
317
+ query_params=_query_params,
318
+ header_params=_header_params,
319
+ body=_body_params,
320
+ post_params=_form_params,
321
+ files=_files,
322
+ auth_settings=_auth_settings,
323
+ collection_formats=_collection_formats,
324
+ _host=_host,
325
+ _request_auth=_request_auth
326
+ )
327
+
328
+
329
+
330
+
331
+ @validate_call
332
+ async def delete_volume(
333
+ self,
334
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
335
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Annotated[StrictFloat, Field(gt=0)]
342
+ ]
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> None:
349
+ """Delete volume
350
+
351
+
352
+ :param volume_id: ID of the volume (required)
353
+ :type volume_id: str
354
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
355
+ :type x_daytona_organization_id: str
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._delete_volume_serialize(
379
+ volume_id=volume_id,
380
+ x_daytona_organization_id=x_daytona_organization_id,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index
385
+ )
386
+
387
+ _response_types_map: Dict[str, Optional[str]] = {
388
+ '200': None,
389
+ }
390
+ response_data = await self.api_client.call_api(
391
+ *_param,
392
+ _request_timeout=_request_timeout
393
+ )
394
+ await response_data.read()
395
+ return self.api_client.response_deserialize(
396
+ response_data=response_data,
397
+ response_types_map=_response_types_map,
398
+ ).data
399
+
400
+
401
+ @validate_call
402
+ async def delete_volume_with_http_info(
403
+ self,
404
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
405
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
406
+ _request_timeout: Union[
407
+ None,
408
+ Annotated[StrictFloat, Field(gt=0)],
409
+ Tuple[
410
+ Annotated[StrictFloat, Field(gt=0)],
411
+ Annotated[StrictFloat, Field(gt=0)]
412
+ ]
413
+ ] = None,
414
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
415
+ _content_type: Optional[StrictStr] = None,
416
+ _headers: Optional[Dict[StrictStr, Any]] = None,
417
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
418
+ ) -> ApiResponse[None]:
419
+ """Delete volume
420
+
421
+
422
+ :param volume_id: ID of the volume (required)
423
+ :type volume_id: str
424
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
425
+ :type x_daytona_organization_id: str
426
+ :param _request_timeout: timeout setting for this request. If one
427
+ number provided, it will be total request
428
+ timeout. It can also be a pair (tuple) of
429
+ (connection, read) timeouts.
430
+ :type _request_timeout: int, tuple(int, int), optional
431
+ :param _request_auth: set to override the auth_settings for an a single
432
+ request; this effectively ignores the
433
+ authentication in the spec for a single request.
434
+ :type _request_auth: dict, optional
435
+ :param _content_type: force content-type for the request.
436
+ :type _content_type: str, Optional
437
+ :param _headers: set to override the headers for a single
438
+ request; this effectively ignores the headers
439
+ in the spec for a single request.
440
+ :type _headers: dict, optional
441
+ :param _host_index: set to override the host_index for a single
442
+ request; this effectively ignores the host_index
443
+ in the spec for a single request.
444
+ :type _host_index: int, optional
445
+ :return: Returns the result object.
446
+ """ # noqa: E501
447
+
448
+ _param = self._delete_volume_serialize(
449
+ volume_id=volume_id,
450
+ x_daytona_organization_id=x_daytona_organization_id,
451
+ _request_auth=_request_auth,
452
+ _content_type=_content_type,
453
+ _headers=_headers,
454
+ _host_index=_host_index
455
+ )
456
+
457
+ _response_types_map: Dict[str, Optional[str]] = {
458
+ '200': None,
459
+ }
460
+ response_data = await self.api_client.call_api(
461
+ *_param,
462
+ _request_timeout=_request_timeout
463
+ )
464
+ await response_data.read()
465
+ return self.api_client.response_deserialize(
466
+ response_data=response_data,
467
+ response_types_map=_response_types_map,
468
+ )
469
+
470
+
471
+ @validate_call
472
+ async def delete_volume_without_preload_content(
473
+ self,
474
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
475
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
476
+ _request_timeout: Union[
477
+ None,
478
+ Annotated[StrictFloat, Field(gt=0)],
479
+ Tuple[
480
+ Annotated[StrictFloat, Field(gt=0)],
481
+ Annotated[StrictFloat, Field(gt=0)]
482
+ ]
483
+ ] = None,
484
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
485
+ _content_type: Optional[StrictStr] = None,
486
+ _headers: Optional[Dict[StrictStr, Any]] = None,
487
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
488
+ ) -> RESTResponseType:
489
+ """Delete volume
490
+
491
+
492
+ :param volume_id: ID of the volume (required)
493
+ :type volume_id: str
494
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
495
+ :type x_daytona_organization_id: str
496
+ :param _request_timeout: timeout setting for this request. If one
497
+ number provided, it will be total request
498
+ timeout. It can also be a pair (tuple) of
499
+ (connection, read) timeouts.
500
+ :type _request_timeout: int, tuple(int, int), optional
501
+ :param _request_auth: set to override the auth_settings for an a single
502
+ request; this effectively ignores the
503
+ authentication in the spec for a single request.
504
+ :type _request_auth: dict, optional
505
+ :param _content_type: force content-type for the request.
506
+ :type _content_type: str, Optional
507
+ :param _headers: set to override the headers for a single
508
+ request; this effectively ignores the headers
509
+ in the spec for a single request.
510
+ :type _headers: dict, optional
511
+ :param _host_index: set to override the host_index for a single
512
+ request; this effectively ignores the host_index
513
+ in the spec for a single request.
514
+ :type _host_index: int, optional
515
+ :return: Returns the result object.
516
+ """ # noqa: E501
517
+
518
+ _param = self._delete_volume_serialize(
519
+ volume_id=volume_id,
520
+ x_daytona_organization_id=x_daytona_organization_id,
521
+ _request_auth=_request_auth,
522
+ _content_type=_content_type,
523
+ _headers=_headers,
524
+ _host_index=_host_index
525
+ )
526
+
527
+ _response_types_map: Dict[str, Optional[str]] = {
528
+ '200': None,
529
+ }
530
+ response_data = await self.api_client.call_api(
531
+ *_param,
532
+ _request_timeout=_request_timeout
533
+ )
534
+ return response_data.response
535
+
536
+
537
+ def _delete_volume_serialize(
538
+ self,
539
+ volume_id,
540
+ x_daytona_organization_id,
541
+ _request_auth,
542
+ _content_type,
543
+ _headers,
544
+ _host_index,
545
+ ) -> RequestSerialized:
546
+
547
+ _host = None
548
+
549
+ _collection_formats: Dict[str, str] = {
550
+ }
551
+
552
+ _path_params: Dict[str, str] = {}
553
+ _query_params: List[Tuple[str, str]] = []
554
+ _header_params: Dict[str, Optional[str]] = _headers or {}
555
+ _form_params: List[Tuple[str, str]] = []
556
+ _files: Dict[
557
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
558
+ ] = {}
559
+ _body_params: Optional[bytes] = None
560
+
561
+ # process the path parameters
562
+ if volume_id is not None:
563
+ _path_params['volumeId'] = volume_id
564
+ # process the query parameters
565
+ # process the header parameters
566
+ if x_daytona_organization_id is not None:
567
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
568
+ # process the form parameters
569
+ # process the body parameter
570
+
571
+
572
+
573
+
574
+ # authentication setting
575
+ _auth_settings: List[str] = [
576
+ 'bearer',
577
+ 'oauth2'
578
+ ]
579
+
580
+ return self.api_client.param_serialize(
581
+ method='DELETE',
582
+ resource_path='/volumes/{volumeId}',
583
+ path_params=_path_params,
584
+ query_params=_query_params,
585
+ header_params=_header_params,
586
+ body=_body_params,
587
+ post_params=_form_params,
588
+ files=_files,
589
+ auth_settings=_auth_settings,
590
+ collection_formats=_collection_formats,
591
+ _host=_host,
592
+ _request_auth=_request_auth
593
+ )
594
+
595
+
596
+
597
+
598
+ @validate_call
599
+ async def get_volume(
600
+ self,
601
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
602
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
603
+ _request_timeout: Union[
604
+ None,
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Tuple[
607
+ Annotated[StrictFloat, Field(gt=0)],
608
+ Annotated[StrictFloat, Field(gt=0)]
609
+ ]
610
+ ] = None,
611
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
612
+ _content_type: Optional[StrictStr] = None,
613
+ _headers: Optional[Dict[StrictStr, Any]] = None,
614
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
615
+ ) -> VolumeDto:
616
+ """Get volume details
617
+
618
+
619
+ :param volume_id: ID of the volume (required)
620
+ :type volume_id: str
621
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
622
+ :type x_daytona_organization_id: str
623
+ :param _request_timeout: timeout setting for this request. If one
624
+ number provided, it will be total request
625
+ timeout. It can also be a pair (tuple) of
626
+ (connection, read) timeouts.
627
+ :type _request_timeout: int, tuple(int, int), optional
628
+ :param _request_auth: set to override the auth_settings for an a single
629
+ request; this effectively ignores the
630
+ authentication in the spec for a single request.
631
+ :type _request_auth: dict, optional
632
+ :param _content_type: force content-type for the request.
633
+ :type _content_type: str, Optional
634
+ :param _headers: set to override the headers for a single
635
+ request; this effectively ignores the headers
636
+ in the spec for a single request.
637
+ :type _headers: dict, optional
638
+ :param _host_index: set to override the host_index for a single
639
+ request; this effectively ignores the host_index
640
+ in the spec for a single request.
641
+ :type _host_index: int, optional
642
+ :return: Returns the result object.
643
+ """ # noqa: E501
644
+
645
+ _param = self._get_volume_serialize(
646
+ volume_id=volume_id,
647
+ x_daytona_organization_id=x_daytona_organization_id,
648
+ _request_auth=_request_auth,
649
+ _content_type=_content_type,
650
+ _headers=_headers,
651
+ _host_index=_host_index
652
+ )
653
+
654
+ _response_types_map: Dict[str, Optional[str]] = {
655
+ '200': "VolumeDto",
656
+ }
657
+ response_data = await self.api_client.call_api(
658
+ *_param,
659
+ _request_timeout=_request_timeout
660
+ )
661
+ await response_data.read()
662
+ return self.api_client.response_deserialize(
663
+ response_data=response_data,
664
+ response_types_map=_response_types_map,
665
+ ).data
666
+
667
+
668
+ @validate_call
669
+ async def get_volume_with_http_info(
670
+ self,
671
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
672
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Annotated[StrictFloat, Field(gt=0)]
679
+ ]
680
+ ] = None,
681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
682
+ _content_type: Optional[StrictStr] = None,
683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
685
+ ) -> ApiResponse[VolumeDto]:
686
+ """Get volume details
687
+
688
+
689
+ :param volume_id: ID of the volume (required)
690
+ :type volume_id: str
691
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
692
+ :type x_daytona_organization_id: str
693
+ :param _request_timeout: timeout setting for this request. If one
694
+ number provided, it will be total request
695
+ timeout. It can also be a pair (tuple) of
696
+ (connection, read) timeouts.
697
+ :type _request_timeout: int, tuple(int, int), optional
698
+ :param _request_auth: set to override the auth_settings for an a single
699
+ request; this effectively ignores the
700
+ authentication in the spec for a single request.
701
+ :type _request_auth: dict, optional
702
+ :param _content_type: force content-type for the request.
703
+ :type _content_type: str, Optional
704
+ :param _headers: set to override the headers for a single
705
+ request; this effectively ignores the headers
706
+ in the spec for a single request.
707
+ :type _headers: dict, optional
708
+ :param _host_index: set to override the host_index for a single
709
+ request; this effectively ignores the host_index
710
+ in the spec for a single request.
711
+ :type _host_index: int, optional
712
+ :return: Returns the result object.
713
+ """ # noqa: E501
714
+
715
+ _param = self._get_volume_serialize(
716
+ volume_id=volume_id,
717
+ x_daytona_organization_id=x_daytona_organization_id,
718
+ _request_auth=_request_auth,
719
+ _content_type=_content_type,
720
+ _headers=_headers,
721
+ _host_index=_host_index
722
+ )
723
+
724
+ _response_types_map: Dict[str, Optional[str]] = {
725
+ '200': "VolumeDto",
726
+ }
727
+ response_data = await self.api_client.call_api(
728
+ *_param,
729
+ _request_timeout=_request_timeout
730
+ )
731
+ await response_data.read()
732
+ return self.api_client.response_deserialize(
733
+ response_data=response_data,
734
+ response_types_map=_response_types_map,
735
+ )
736
+
737
+
738
+ @validate_call
739
+ async def get_volume_without_preload_content(
740
+ self,
741
+ volume_id: Annotated[StrictStr, Field(description="ID of the volume")],
742
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
743
+ _request_timeout: Union[
744
+ None,
745
+ Annotated[StrictFloat, Field(gt=0)],
746
+ Tuple[
747
+ Annotated[StrictFloat, Field(gt=0)],
748
+ Annotated[StrictFloat, Field(gt=0)]
749
+ ]
750
+ ] = None,
751
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
752
+ _content_type: Optional[StrictStr] = None,
753
+ _headers: Optional[Dict[StrictStr, Any]] = None,
754
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
755
+ ) -> RESTResponseType:
756
+ """Get volume details
757
+
758
+
759
+ :param volume_id: ID of the volume (required)
760
+ :type volume_id: str
761
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
762
+ :type x_daytona_organization_id: str
763
+ :param _request_timeout: timeout setting for this request. If one
764
+ number provided, it will be total request
765
+ timeout. It can also be a pair (tuple) of
766
+ (connection, read) timeouts.
767
+ :type _request_timeout: int, tuple(int, int), optional
768
+ :param _request_auth: set to override the auth_settings for an a single
769
+ request; this effectively ignores the
770
+ authentication in the spec for a single request.
771
+ :type _request_auth: dict, optional
772
+ :param _content_type: force content-type for the request.
773
+ :type _content_type: str, Optional
774
+ :param _headers: set to override the headers for a single
775
+ request; this effectively ignores the headers
776
+ in the spec for a single request.
777
+ :type _headers: dict, optional
778
+ :param _host_index: set to override the host_index for a single
779
+ request; this effectively ignores the host_index
780
+ in the spec for a single request.
781
+ :type _host_index: int, optional
782
+ :return: Returns the result object.
783
+ """ # noqa: E501
784
+
785
+ _param = self._get_volume_serialize(
786
+ volume_id=volume_id,
787
+ x_daytona_organization_id=x_daytona_organization_id,
788
+ _request_auth=_request_auth,
789
+ _content_type=_content_type,
790
+ _headers=_headers,
791
+ _host_index=_host_index
792
+ )
793
+
794
+ _response_types_map: Dict[str, Optional[str]] = {
795
+ '200': "VolumeDto",
796
+ }
797
+ response_data = await self.api_client.call_api(
798
+ *_param,
799
+ _request_timeout=_request_timeout
800
+ )
801
+ return response_data.response
802
+
803
+
804
+ def _get_volume_serialize(
805
+ self,
806
+ volume_id,
807
+ x_daytona_organization_id,
808
+ _request_auth,
809
+ _content_type,
810
+ _headers,
811
+ _host_index,
812
+ ) -> RequestSerialized:
813
+
814
+ _host = None
815
+
816
+ _collection_formats: Dict[str, str] = {
817
+ }
818
+
819
+ _path_params: Dict[str, str] = {}
820
+ _query_params: List[Tuple[str, str]] = []
821
+ _header_params: Dict[str, Optional[str]] = _headers or {}
822
+ _form_params: List[Tuple[str, str]] = []
823
+ _files: Dict[
824
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
825
+ ] = {}
826
+ _body_params: Optional[bytes] = None
827
+
828
+ # process the path parameters
829
+ if volume_id is not None:
830
+ _path_params['volumeId'] = volume_id
831
+ # process the query parameters
832
+ # process the header parameters
833
+ if x_daytona_organization_id is not None:
834
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
835
+ # process the form parameters
836
+ # process the body parameter
837
+
838
+
839
+ # set the HTTP header `Accept`
840
+ if 'Accept' not in _header_params:
841
+ _header_params['Accept'] = self.api_client.select_header_accept(
842
+ [
843
+ 'application/json'
844
+ ]
845
+ )
846
+
847
+
848
+ # authentication setting
849
+ _auth_settings: List[str] = [
850
+ 'bearer',
851
+ 'oauth2'
852
+ ]
853
+
854
+ return self.api_client.param_serialize(
855
+ method='GET',
856
+ resource_path='/volumes/{volumeId}',
857
+ path_params=_path_params,
858
+ query_params=_query_params,
859
+ header_params=_header_params,
860
+ body=_body_params,
861
+ post_params=_form_params,
862
+ files=_files,
863
+ auth_settings=_auth_settings,
864
+ collection_formats=_collection_formats,
865
+ _host=_host,
866
+ _request_auth=_request_auth
867
+ )
868
+
869
+
870
+
871
+
872
+ @validate_call
873
+ async def get_volume_by_name(
874
+ self,
875
+ name: Annotated[StrictStr, Field(description="Name of the volume")],
876
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
877
+ _request_timeout: Union[
878
+ None,
879
+ Annotated[StrictFloat, Field(gt=0)],
880
+ Tuple[
881
+ Annotated[StrictFloat, Field(gt=0)],
882
+ Annotated[StrictFloat, Field(gt=0)]
883
+ ]
884
+ ] = None,
885
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
886
+ _content_type: Optional[StrictStr] = None,
887
+ _headers: Optional[Dict[StrictStr, Any]] = None,
888
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
889
+ ) -> VolumeDto:
890
+ """Get volume details by name
891
+
892
+
893
+ :param name: Name of the volume (required)
894
+ :type name: str
895
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
896
+ :type x_daytona_organization_id: str
897
+ :param _request_timeout: timeout setting for this request. If one
898
+ number provided, it will be total request
899
+ timeout. It can also be a pair (tuple) of
900
+ (connection, read) timeouts.
901
+ :type _request_timeout: int, tuple(int, int), optional
902
+ :param _request_auth: set to override the auth_settings for an a single
903
+ request; this effectively ignores the
904
+ authentication in the spec for a single request.
905
+ :type _request_auth: dict, optional
906
+ :param _content_type: force content-type for the request.
907
+ :type _content_type: str, Optional
908
+ :param _headers: set to override the headers for a single
909
+ request; this effectively ignores the headers
910
+ in the spec for a single request.
911
+ :type _headers: dict, optional
912
+ :param _host_index: set to override the host_index for a single
913
+ request; this effectively ignores the host_index
914
+ in the spec for a single request.
915
+ :type _host_index: int, optional
916
+ :return: Returns the result object.
917
+ """ # noqa: E501
918
+
919
+ _param = self._get_volume_by_name_serialize(
920
+ name=name,
921
+ x_daytona_organization_id=x_daytona_organization_id,
922
+ _request_auth=_request_auth,
923
+ _content_type=_content_type,
924
+ _headers=_headers,
925
+ _host_index=_host_index
926
+ )
927
+
928
+ _response_types_map: Dict[str, Optional[str]] = {
929
+ '200': "VolumeDto",
930
+ }
931
+ response_data = await self.api_client.call_api(
932
+ *_param,
933
+ _request_timeout=_request_timeout
934
+ )
935
+ await response_data.read()
936
+ return self.api_client.response_deserialize(
937
+ response_data=response_data,
938
+ response_types_map=_response_types_map,
939
+ ).data
940
+
941
+
942
+ @validate_call
943
+ async def get_volume_by_name_with_http_info(
944
+ self,
945
+ name: Annotated[StrictStr, Field(description="Name of the volume")],
946
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
947
+ _request_timeout: Union[
948
+ None,
949
+ Annotated[StrictFloat, Field(gt=0)],
950
+ Tuple[
951
+ Annotated[StrictFloat, Field(gt=0)],
952
+ Annotated[StrictFloat, Field(gt=0)]
953
+ ]
954
+ ] = None,
955
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
956
+ _content_type: Optional[StrictStr] = None,
957
+ _headers: Optional[Dict[StrictStr, Any]] = None,
958
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
959
+ ) -> ApiResponse[VolumeDto]:
960
+ """Get volume details by name
961
+
962
+
963
+ :param name: Name of the volume (required)
964
+ :type name: str
965
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
966
+ :type x_daytona_organization_id: str
967
+ :param _request_timeout: timeout setting for this request. If one
968
+ number provided, it will be total request
969
+ timeout. It can also be a pair (tuple) of
970
+ (connection, read) timeouts.
971
+ :type _request_timeout: int, tuple(int, int), optional
972
+ :param _request_auth: set to override the auth_settings for an a single
973
+ request; this effectively ignores the
974
+ authentication in the spec for a single request.
975
+ :type _request_auth: dict, optional
976
+ :param _content_type: force content-type for the request.
977
+ :type _content_type: str, Optional
978
+ :param _headers: set to override the headers for a single
979
+ request; this effectively ignores the headers
980
+ in the spec for a single request.
981
+ :type _headers: dict, optional
982
+ :param _host_index: set to override the host_index for a single
983
+ request; this effectively ignores the host_index
984
+ in the spec for a single request.
985
+ :type _host_index: int, optional
986
+ :return: Returns the result object.
987
+ """ # noqa: E501
988
+
989
+ _param = self._get_volume_by_name_serialize(
990
+ name=name,
991
+ x_daytona_organization_id=x_daytona_organization_id,
992
+ _request_auth=_request_auth,
993
+ _content_type=_content_type,
994
+ _headers=_headers,
995
+ _host_index=_host_index
996
+ )
997
+
998
+ _response_types_map: Dict[str, Optional[str]] = {
999
+ '200': "VolumeDto",
1000
+ }
1001
+ response_data = await self.api_client.call_api(
1002
+ *_param,
1003
+ _request_timeout=_request_timeout
1004
+ )
1005
+ await response_data.read()
1006
+ return self.api_client.response_deserialize(
1007
+ response_data=response_data,
1008
+ response_types_map=_response_types_map,
1009
+ )
1010
+
1011
+
1012
+ @validate_call
1013
+ async def get_volume_by_name_without_preload_content(
1014
+ self,
1015
+ name: Annotated[StrictStr, Field(description="Name of the volume")],
1016
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1017
+ _request_timeout: Union[
1018
+ None,
1019
+ Annotated[StrictFloat, Field(gt=0)],
1020
+ Tuple[
1021
+ Annotated[StrictFloat, Field(gt=0)],
1022
+ Annotated[StrictFloat, Field(gt=0)]
1023
+ ]
1024
+ ] = None,
1025
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1026
+ _content_type: Optional[StrictStr] = None,
1027
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1028
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1029
+ ) -> RESTResponseType:
1030
+ """Get volume details by name
1031
+
1032
+
1033
+ :param name: Name of the volume (required)
1034
+ :type name: str
1035
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1036
+ :type x_daytona_organization_id: str
1037
+ :param _request_timeout: timeout setting for this request. If one
1038
+ number provided, it will be total request
1039
+ timeout. It can also be a pair (tuple) of
1040
+ (connection, read) timeouts.
1041
+ :type _request_timeout: int, tuple(int, int), optional
1042
+ :param _request_auth: set to override the auth_settings for an a single
1043
+ request; this effectively ignores the
1044
+ authentication in the spec for a single request.
1045
+ :type _request_auth: dict, optional
1046
+ :param _content_type: force content-type for the request.
1047
+ :type _content_type: str, Optional
1048
+ :param _headers: set to override the headers for a single
1049
+ request; this effectively ignores the headers
1050
+ in the spec for a single request.
1051
+ :type _headers: dict, optional
1052
+ :param _host_index: set to override the host_index for a single
1053
+ request; this effectively ignores the host_index
1054
+ in the spec for a single request.
1055
+ :type _host_index: int, optional
1056
+ :return: Returns the result object.
1057
+ """ # noqa: E501
1058
+
1059
+ _param = self._get_volume_by_name_serialize(
1060
+ name=name,
1061
+ x_daytona_organization_id=x_daytona_organization_id,
1062
+ _request_auth=_request_auth,
1063
+ _content_type=_content_type,
1064
+ _headers=_headers,
1065
+ _host_index=_host_index
1066
+ )
1067
+
1068
+ _response_types_map: Dict[str, Optional[str]] = {
1069
+ '200': "VolumeDto",
1070
+ }
1071
+ response_data = await self.api_client.call_api(
1072
+ *_param,
1073
+ _request_timeout=_request_timeout
1074
+ )
1075
+ return response_data.response
1076
+
1077
+
1078
+ def _get_volume_by_name_serialize(
1079
+ self,
1080
+ name,
1081
+ x_daytona_organization_id,
1082
+ _request_auth,
1083
+ _content_type,
1084
+ _headers,
1085
+ _host_index,
1086
+ ) -> RequestSerialized:
1087
+
1088
+ _host = None
1089
+
1090
+ _collection_formats: Dict[str, str] = {
1091
+ }
1092
+
1093
+ _path_params: Dict[str, str] = {}
1094
+ _query_params: List[Tuple[str, str]] = []
1095
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1096
+ _form_params: List[Tuple[str, str]] = []
1097
+ _files: Dict[
1098
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1099
+ ] = {}
1100
+ _body_params: Optional[bytes] = None
1101
+
1102
+ # process the path parameters
1103
+ if name is not None:
1104
+ _path_params['name'] = name
1105
+ # process the query parameters
1106
+ # process the header parameters
1107
+ if x_daytona_organization_id is not None:
1108
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1109
+ # process the form parameters
1110
+ # process the body parameter
1111
+
1112
+
1113
+ # set the HTTP header `Accept`
1114
+ if 'Accept' not in _header_params:
1115
+ _header_params['Accept'] = self.api_client.select_header_accept(
1116
+ [
1117
+ 'application/json'
1118
+ ]
1119
+ )
1120
+
1121
+
1122
+ # authentication setting
1123
+ _auth_settings: List[str] = [
1124
+ 'bearer',
1125
+ 'oauth2'
1126
+ ]
1127
+
1128
+ return self.api_client.param_serialize(
1129
+ method='GET',
1130
+ resource_path='/volumes/by-name/{name}',
1131
+ path_params=_path_params,
1132
+ query_params=_query_params,
1133
+ header_params=_header_params,
1134
+ body=_body_params,
1135
+ post_params=_form_params,
1136
+ files=_files,
1137
+ auth_settings=_auth_settings,
1138
+ collection_formats=_collection_formats,
1139
+ _host=_host,
1140
+ _request_auth=_request_auth
1141
+ )
1142
+
1143
+
1144
+
1145
+
1146
+ @validate_call
1147
+ async def list_volumes(
1148
+ self,
1149
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1150
+ include_deleted: Annotated[Optional[StrictBool], Field(description="Include deleted volumes in the response")] = None,
1151
+ _request_timeout: Union[
1152
+ None,
1153
+ Annotated[StrictFloat, Field(gt=0)],
1154
+ Tuple[
1155
+ Annotated[StrictFloat, Field(gt=0)],
1156
+ Annotated[StrictFloat, Field(gt=0)]
1157
+ ]
1158
+ ] = None,
1159
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1160
+ _content_type: Optional[StrictStr] = None,
1161
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1162
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1163
+ ) -> List[VolumeDto]:
1164
+ """List all volumes
1165
+
1166
+
1167
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1168
+ :type x_daytona_organization_id: str
1169
+ :param include_deleted: Include deleted volumes in the response
1170
+ :type include_deleted: bool
1171
+ :param _request_timeout: timeout setting for this request. If one
1172
+ number provided, it will be total request
1173
+ timeout. It can also be a pair (tuple) of
1174
+ (connection, read) timeouts.
1175
+ :type _request_timeout: int, tuple(int, int), optional
1176
+ :param _request_auth: set to override the auth_settings for an a single
1177
+ request; this effectively ignores the
1178
+ authentication in the spec for a single request.
1179
+ :type _request_auth: dict, optional
1180
+ :param _content_type: force content-type for the request.
1181
+ :type _content_type: str, Optional
1182
+ :param _headers: set to override the headers for a single
1183
+ request; this effectively ignores the headers
1184
+ in the spec for a single request.
1185
+ :type _headers: dict, optional
1186
+ :param _host_index: set to override the host_index for a single
1187
+ request; this effectively ignores the host_index
1188
+ in the spec for a single request.
1189
+ :type _host_index: int, optional
1190
+ :return: Returns the result object.
1191
+ """ # noqa: E501
1192
+
1193
+ _param = self._list_volumes_serialize(
1194
+ x_daytona_organization_id=x_daytona_organization_id,
1195
+ include_deleted=include_deleted,
1196
+ _request_auth=_request_auth,
1197
+ _content_type=_content_type,
1198
+ _headers=_headers,
1199
+ _host_index=_host_index
1200
+ )
1201
+
1202
+ _response_types_map: Dict[str, Optional[str]] = {
1203
+ '200': "List[VolumeDto]",
1204
+ }
1205
+ response_data = await self.api_client.call_api(
1206
+ *_param,
1207
+ _request_timeout=_request_timeout
1208
+ )
1209
+ await response_data.read()
1210
+ return self.api_client.response_deserialize(
1211
+ response_data=response_data,
1212
+ response_types_map=_response_types_map,
1213
+ ).data
1214
+
1215
+
1216
+ @validate_call
1217
+ async def list_volumes_with_http_info(
1218
+ self,
1219
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1220
+ include_deleted: Annotated[Optional[StrictBool], Field(description="Include deleted volumes in the response")] = None,
1221
+ _request_timeout: Union[
1222
+ None,
1223
+ Annotated[StrictFloat, Field(gt=0)],
1224
+ Tuple[
1225
+ Annotated[StrictFloat, Field(gt=0)],
1226
+ Annotated[StrictFloat, Field(gt=0)]
1227
+ ]
1228
+ ] = None,
1229
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1230
+ _content_type: Optional[StrictStr] = None,
1231
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1232
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1233
+ ) -> ApiResponse[List[VolumeDto]]:
1234
+ """List all volumes
1235
+
1236
+
1237
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1238
+ :type x_daytona_organization_id: str
1239
+ :param include_deleted: Include deleted volumes in the response
1240
+ :type include_deleted: bool
1241
+ :param _request_timeout: timeout setting for this request. If one
1242
+ number provided, it will be total request
1243
+ timeout. It can also be a pair (tuple) of
1244
+ (connection, read) timeouts.
1245
+ :type _request_timeout: int, tuple(int, int), optional
1246
+ :param _request_auth: set to override the auth_settings for an a single
1247
+ request; this effectively ignores the
1248
+ authentication in the spec for a single request.
1249
+ :type _request_auth: dict, optional
1250
+ :param _content_type: force content-type for the request.
1251
+ :type _content_type: str, Optional
1252
+ :param _headers: set to override the headers for a single
1253
+ request; this effectively ignores the headers
1254
+ in the spec for a single request.
1255
+ :type _headers: dict, optional
1256
+ :param _host_index: set to override the host_index for a single
1257
+ request; this effectively ignores the host_index
1258
+ in the spec for a single request.
1259
+ :type _host_index: int, optional
1260
+ :return: Returns the result object.
1261
+ """ # noqa: E501
1262
+
1263
+ _param = self._list_volumes_serialize(
1264
+ x_daytona_organization_id=x_daytona_organization_id,
1265
+ include_deleted=include_deleted,
1266
+ _request_auth=_request_auth,
1267
+ _content_type=_content_type,
1268
+ _headers=_headers,
1269
+ _host_index=_host_index
1270
+ )
1271
+
1272
+ _response_types_map: Dict[str, Optional[str]] = {
1273
+ '200': "List[VolumeDto]",
1274
+ }
1275
+ response_data = await self.api_client.call_api(
1276
+ *_param,
1277
+ _request_timeout=_request_timeout
1278
+ )
1279
+ await response_data.read()
1280
+ return self.api_client.response_deserialize(
1281
+ response_data=response_data,
1282
+ response_types_map=_response_types_map,
1283
+ )
1284
+
1285
+
1286
+ @validate_call
1287
+ async def list_volumes_without_preload_content(
1288
+ self,
1289
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1290
+ include_deleted: Annotated[Optional[StrictBool], Field(description="Include deleted volumes in the response")] = None,
1291
+ _request_timeout: Union[
1292
+ None,
1293
+ Annotated[StrictFloat, Field(gt=0)],
1294
+ Tuple[
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Annotated[StrictFloat, Field(gt=0)]
1297
+ ]
1298
+ ] = None,
1299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1300
+ _content_type: Optional[StrictStr] = None,
1301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1303
+ ) -> RESTResponseType:
1304
+ """List all volumes
1305
+
1306
+
1307
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1308
+ :type x_daytona_organization_id: str
1309
+ :param include_deleted: Include deleted volumes in the response
1310
+ :type include_deleted: bool
1311
+ :param _request_timeout: timeout setting for this request. If one
1312
+ number provided, it will be total request
1313
+ timeout. It can also be a pair (tuple) of
1314
+ (connection, read) timeouts.
1315
+ :type _request_timeout: int, tuple(int, int), optional
1316
+ :param _request_auth: set to override the auth_settings for an a single
1317
+ request; this effectively ignores the
1318
+ authentication in the spec for a single request.
1319
+ :type _request_auth: dict, optional
1320
+ :param _content_type: force content-type for the request.
1321
+ :type _content_type: str, Optional
1322
+ :param _headers: set to override the headers for a single
1323
+ request; this effectively ignores the headers
1324
+ in the spec for a single request.
1325
+ :type _headers: dict, optional
1326
+ :param _host_index: set to override the host_index for a single
1327
+ request; this effectively ignores the host_index
1328
+ in the spec for a single request.
1329
+ :type _host_index: int, optional
1330
+ :return: Returns the result object.
1331
+ """ # noqa: E501
1332
+
1333
+ _param = self._list_volumes_serialize(
1334
+ x_daytona_organization_id=x_daytona_organization_id,
1335
+ include_deleted=include_deleted,
1336
+ _request_auth=_request_auth,
1337
+ _content_type=_content_type,
1338
+ _headers=_headers,
1339
+ _host_index=_host_index
1340
+ )
1341
+
1342
+ _response_types_map: Dict[str, Optional[str]] = {
1343
+ '200': "List[VolumeDto]",
1344
+ }
1345
+ response_data = await self.api_client.call_api(
1346
+ *_param,
1347
+ _request_timeout=_request_timeout
1348
+ )
1349
+ return response_data.response
1350
+
1351
+
1352
+ def _list_volumes_serialize(
1353
+ self,
1354
+ x_daytona_organization_id,
1355
+ include_deleted,
1356
+ _request_auth,
1357
+ _content_type,
1358
+ _headers,
1359
+ _host_index,
1360
+ ) -> RequestSerialized:
1361
+
1362
+ _host = None
1363
+
1364
+ _collection_formats: Dict[str, str] = {
1365
+ }
1366
+
1367
+ _path_params: Dict[str, str] = {}
1368
+ _query_params: List[Tuple[str, str]] = []
1369
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1370
+ _form_params: List[Tuple[str, str]] = []
1371
+ _files: Dict[
1372
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1373
+ ] = {}
1374
+ _body_params: Optional[bytes] = None
1375
+
1376
+ # process the path parameters
1377
+ # process the query parameters
1378
+ if include_deleted is not None:
1379
+
1380
+ _query_params.append(('includeDeleted', include_deleted))
1381
+
1382
+ # process the header parameters
1383
+ if x_daytona_organization_id is not None:
1384
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1385
+ # process the form parameters
1386
+ # process the body parameter
1387
+
1388
+
1389
+ # set the HTTP header `Accept`
1390
+ if 'Accept' not in _header_params:
1391
+ _header_params['Accept'] = self.api_client.select_header_accept(
1392
+ [
1393
+ 'application/json'
1394
+ ]
1395
+ )
1396
+
1397
+
1398
+ # authentication setting
1399
+ _auth_settings: List[str] = [
1400
+ 'bearer',
1401
+ 'oauth2'
1402
+ ]
1403
+
1404
+ return self.api_client.param_serialize(
1405
+ method='GET',
1406
+ resource_path='/volumes',
1407
+ path_params=_path_params,
1408
+ query_params=_query_params,
1409
+ header_params=_header_params,
1410
+ body=_body_params,
1411
+ post_params=_form_params,
1412
+ files=_files,
1413
+ auth_settings=_auth_settings,
1414
+ collection_formats=_collection_formats,
1415
+ _host=_host,
1416
+ _request_auth=_request_auth
1417
+ )
1418
+
1419
+