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