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,3994 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
21
+ from typing import List, Optional, Union
22
+ from typing_extensions import Annotated
23
+ from daytona_api_client_async.models.create_sandbox import CreateSandbox
24
+ from daytona_api_client_async.models.port_preview_url import PortPreviewUrl
25
+ from daytona_api_client_async.models.sandbox import Sandbox
26
+ from daytona_api_client_async.models.sandbox_labels import SandboxLabels
27
+
28
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
29
+ from daytona_api_client_async.api_response import ApiResponse
30
+ from daytona_api_client_async.rest import RESTResponseType
31
+
32
+
33
+ class SandboxApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ async def archive_sandbox(
48
+ self,
49
+ sandbox_id: StrictStr,
50
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> None:
64
+ """Archive sandbox
65
+
66
+
67
+ :param sandbox_id: (required)
68
+ :type sandbox_id: str
69
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
70
+ :type x_daytona_organization_id: str
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._archive_sandbox_serialize(
94
+ sandbox_id=sandbox_id,
95
+ x_daytona_organization_id=x_daytona_organization_id,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': None,
104
+ }
105
+ response_data = await self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ await response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ async def archive_sandbox_with_http_info(
118
+ self,
119
+ sandbox_id: StrictStr,
120
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[None]:
134
+ """Archive sandbox
135
+
136
+
137
+ :param sandbox_id: (required)
138
+ :type sandbox_id: str
139
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
140
+ :type x_daytona_organization_id: str
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._archive_sandbox_serialize(
164
+ sandbox_id=sandbox_id,
165
+ x_daytona_organization_id=x_daytona_organization_id,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '200': None,
174
+ }
175
+ response_data = await self.api_client.call_api(
176
+ *_param,
177
+ _request_timeout=_request_timeout
178
+ )
179
+ await response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+
186
+ @validate_call
187
+ async def archive_sandbox_without_preload_content(
188
+ self,
189
+ sandbox_id: StrictStr,
190
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Annotated[StrictFloat, Field(gt=0)]
197
+ ]
198
+ ] = None,
199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
200
+ _content_type: Optional[StrictStr] = None,
201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
203
+ ) -> RESTResponseType:
204
+ """Archive sandbox
205
+
206
+
207
+ :param sandbox_id: (required)
208
+ :type sandbox_id: str
209
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
210
+ :type x_daytona_organization_id: str
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._archive_sandbox_serialize(
234
+ sandbox_id=sandbox_id,
235
+ x_daytona_organization_id=x_daytona_organization_id,
236
+ _request_auth=_request_auth,
237
+ _content_type=_content_type,
238
+ _headers=_headers,
239
+ _host_index=_host_index
240
+ )
241
+
242
+ _response_types_map: Dict[str, Optional[str]] = {
243
+ '200': None,
244
+ }
245
+ response_data = await self.api_client.call_api(
246
+ *_param,
247
+ _request_timeout=_request_timeout
248
+ )
249
+ return response_data.response
250
+
251
+
252
+ def _archive_sandbox_serialize(
253
+ self,
254
+ sandbox_id,
255
+ x_daytona_organization_id,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _host = None
263
+
264
+ _collection_formats: Dict[str, str] = {
265
+ }
266
+
267
+ _path_params: Dict[str, str] = {}
268
+ _query_params: List[Tuple[str, str]] = []
269
+ _header_params: Dict[str, Optional[str]] = _headers or {}
270
+ _form_params: List[Tuple[str, str]] = []
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
274
+ _body_params: Optional[bytes] = None
275
+
276
+ # process the path parameters
277
+ if sandbox_id is not None:
278
+ _path_params['sandboxId'] = sandbox_id
279
+ # process the query parameters
280
+ # process the header parameters
281
+ if x_daytona_organization_id is not None:
282
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
283
+ # process the form parameters
284
+ # process the body parameter
285
+
286
+
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'bearer',
292
+ 'oauth2'
293
+ ]
294
+
295
+ return self.api_client.param_serialize(
296
+ method='POST',
297
+ resource_path='/sandbox/{sandboxId}/archive',
298
+ path_params=_path_params,
299
+ query_params=_query_params,
300
+ header_params=_header_params,
301
+ body=_body_params,
302
+ post_params=_form_params,
303
+ files=_files,
304
+ auth_settings=_auth_settings,
305
+ collection_formats=_collection_formats,
306
+ _host=_host,
307
+ _request_auth=_request_auth
308
+ )
309
+
310
+
311
+
312
+
313
+ @validate_call
314
+ async def create_backup(
315
+ self,
316
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
317
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
318
+ _request_timeout: Union[
319
+ None,
320
+ Annotated[StrictFloat, Field(gt=0)],
321
+ Tuple[
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Annotated[StrictFloat, Field(gt=0)]
324
+ ]
325
+ ] = None,
326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
327
+ _content_type: Optional[StrictStr] = None,
328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
330
+ ) -> Sandbox:
331
+ """Create sandbox backup
332
+
333
+
334
+ :param sandbox_id: ID of the sandbox (required)
335
+ :type sandbox_id: str
336
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
337
+ :type x_daytona_organization_id: str
338
+ :param _request_timeout: timeout setting for this request. If one
339
+ number provided, it will be total request
340
+ timeout. It can also be a pair (tuple) of
341
+ (connection, read) timeouts.
342
+ :type _request_timeout: int, tuple(int, int), optional
343
+ :param _request_auth: set to override the auth_settings for an a single
344
+ request; this effectively ignores the
345
+ authentication in the spec for a single request.
346
+ :type _request_auth: dict, optional
347
+ :param _content_type: force content-type for the request.
348
+ :type _content_type: str, Optional
349
+ :param _headers: set to override the headers for a single
350
+ request; this effectively ignores the headers
351
+ in the spec for a single request.
352
+ :type _headers: dict, optional
353
+ :param _host_index: set to override the host_index for a single
354
+ request; this effectively ignores the host_index
355
+ in the spec for a single request.
356
+ :type _host_index: int, optional
357
+ :return: Returns the result object.
358
+ """ # noqa: E501
359
+
360
+ _param = self._create_backup_serialize(
361
+ sandbox_id=sandbox_id,
362
+ x_daytona_organization_id=x_daytona_organization_id,
363
+ _request_auth=_request_auth,
364
+ _content_type=_content_type,
365
+ _headers=_headers,
366
+ _host_index=_host_index
367
+ )
368
+
369
+ _response_types_map: Dict[str, Optional[str]] = {
370
+ '200': "Sandbox",
371
+ }
372
+ response_data = await self.api_client.call_api(
373
+ *_param,
374
+ _request_timeout=_request_timeout
375
+ )
376
+ await response_data.read()
377
+ return self.api_client.response_deserialize(
378
+ response_data=response_data,
379
+ response_types_map=_response_types_map,
380
+ ).data
381
+
382
+
383
+ @validate_call
384
+ async def create_backup_with_http_info(
385
+ self,
386
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
387
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
388
+ _request_timeout: Union[
389
+ None,
390
+ Annotated[StrictFloat, Field(gt=0)],
391
+ Tuple[
392
+ Annotated[StrictFloat, Field(gt=0)],
393
+ Annotated[StrictFloat, Field(gt=0)]
394
+ ]
395
+ ] = None,
396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
+ _content_type: Optional[StrictStr] = None,
398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
+ ) -> ApiResponse[Sandbox]:
401
+ """Create sandbox backup
402
+
403
+
404
+ :param sandbox_id: ID of the sandbox (required)
405
+ :type sandbox_id: str
406
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
407
+ :type x_daytona_organization_id: str
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._create_backup_serialize(
431
+ sandbox_id=sandbox_id,
432
+ x_daytona_organization_id=x_daytona_organization_id,
433
+ _request_auth=_request_auth,
434
+ _content_type=_content_type,
435
+ _headers=_headers,
436
+ _host_index=_host_index
437
+ )
438
+
439
+ _response_types_map: Dict[str, Optional[str]] = {
440
+ '200': "Sandbox",
441
+ }
442
+ response_data = await self.api_client.call_api(
443
+ *_param,
444
+ _request_timeout=_request_timeout
445
+ )
446
+ await response_data.read()
447
+ return self.api_client.response_deserialize(
448
+ response_data=response_data,
449
+ response_types_map=_response_types_map,
450
+ )
451
+
452
+
453
+ @validate_call
454
+ async def create_backup_without_preload_content(
455
+ self,
456
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
457
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
458
+ _request_timeout: Union[
459
+ None,
460
+ Annotated[StrictFloat, Field(gt=0)],
461
+ Tuple[
462
+ Annotated[StrictFloat, Field(gt=0)],
463
+ Annotated[StrictFloat, Field(gt=0)]
464
+ ]
465
+ ] = None,
466
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
467
+ _content_type: Optional[StrictStr] = None,
468
+ _headers: Optional[Dict[StrictStr, Any]] = None,
469
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
470
+ ) -> RESTResponseType:
471
+ """Create sandbox backup
472
+
473
+
474
+ :param sandbox_id: ID of the sandbox (required)
475
+ :type sandbox_id: str
476
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
477
+ :type x_daytona_organization_id: str
478
+ :param _request_timeout: timeout setting for this request. If one
479
+ number provided, it will be total request
480
+ timeout. It can also be a pair (tuple) of
481
+ (connection, read) timeouts.
482
+ :type _request_timeout: int, tuple(int, int), optional
483
+ :param _request_auth: set to override the auth_settings for an a single
484
+ request; this effectively ignores the
485
+ authentication in the spec for a single request.
486
+ :type _request_auth: dict, optional
487
+ :param _content_type: force content-type for the request.
488
+ :type _content_type: str, Optional
489
+ :param _headers: set to override the headers for a single
490
+ request; this effectively ignores the headers
491
+ in the spec for a single request.
492
+ :type _headers: dict, optional
493
+ :param _host_index: set to override the host_index for a single
494
+ request; this effectively ignores the host_index
495
+ in the spec for a single request.
496
+ :type _host_index: int, optional
497
+ :return: Returns the result object.
498
+ """ # noqa: E501
499
+
500
+ _param = self._create_backup_serialize(
501
+ sandbox_id=sandbox_id,
502
+ x_daytona_organization_id=x_daytona_organization_id,
503
+ _request_auth=_request_auth,
504
+ _content_type=_content_type,
505
+ _headers=_headers,
506
+ _host_index=_host_index
507
+ )
508
+
509
+ _response_types_map: Dict[str, Optional[str]] = {
510
+ '200': "Sandbox",
511
+ }
512
+ response_data = await self.api_client.call_api(
513
+ *_param,
514
+ _request_timeout=_request_timeout
515
+ )
516
+ return response_data.response
517
+
518
+
519
+ def _create_backup_serialize(
520
+ self,
521
+ sandbox_id,
522
+ x_daytona_organization_id,
523
+ _request_auth,
524
+ _content_type,
525
+ _headers,
526
+ _host_index,
527
+ ) -> RequestSerialized:
528
+
529
+ _host = None
530
+
531
+ _collection_formats: Dict[str, str] = {
532
+ }
533
+
534
+ _path_params: Dict[str, str] = {}
535
+ _query_params: List[Tuple[str, str]] = []
536
+ _header_params: Dict[str, Optional[str]] = _headers or {}
537
+ _form_params: List[Tuple[str, str]] = []
538
+ _files: Dict[
539
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
540
+ ] = {}
541
+ _body_params: Optional[bytes] = None
542
+
543
+ # process the path parameters
544
+ if sandbox_id is not None:
545
+ _path_params['sandboxId'] = sandbox_id
546
+ # process the query parameters
547
+ # process the header parameters
548
+ if x_daytona_organization_id is not None:
549
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
550
+ # process the form parameters
551
+ # process the body parameter
552
+
553
+
554
+ # set the HTTP header `Accept`
555
+ if 'Accept' not in _header_params:
556
+ _header_params['Accept'] = self.api_client.select_header_accept(
557
+ [
558
+ 'application/json'
559
+ ]
560
+ )
561
+
562
+
563
+ # authentication setting
564
+ _auth_settings: List[str] = [
565
+ 'bearer',
566
+ 'oauth2'
567
+ ]
568
+
569
+ return self.api_client.param_serialize(
570
+ method='POST',
571
+ resource_path='/sandbox/{sandboxId}/backup',
572
+ path_params=_path_params,
573
+ query_params=_query_params,
574
+ header_params=_header_params,
575
+ body=_body_params,
576
+ post_params=_form_params,
577
+ files=_files,
578
+ auth_settings=_auth_settings,
579
+ collection_formats=_collection_formats,
580
+ _host=_host,
581
+ _request_auth=_request_auth
582
+ )
583
+
584
+
585
+
586
+
587
+ @validate_call
588
+ async def create_sandbox(
589
+ self,
590
+ create_sandbox: CreateSandbox,
591
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
592
+ _request_timeout: Union[
593
+ None,
594
+ Annotated[StrictFloat, Field(gt=0)],
595
+ Tuple[
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Annotated[StrictFloat, Field(gt=0)]
598
+ ]
599
+ ] = None,
600
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
601
+ _content_type: Optional[StrictStr] = None,
602
+ _headers: Optional[Dict[StrictStr, Any]] = None,
603
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
604
+ ) -> Sandbox:
605
+ """Create a new sandbox
606
+
607
+
608
+ :param create_sandbox: (required)
609
+ :type create_sandbox: CreateSandbox
610
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
611
+ :type x_daytona_organization_id: str
612
+ :param _request_timeout: timeout setting for this request. If one
613
+ number provided, it will be total request
614
+ timeout. It can also be a pair (tuple) of
615
+ (connection, read) timeouts.
616
+ :type _request_timeout: int, tuple(int, int), optional
617
+ :param _request_auth: set to override the auth_settings for an a single
618
+ request; this effectively ignores the
619
+ authentication in the spec for a single request.
620
+ :type _request_auth: dict, optional
621
+ :param _content_type: force content-type for the request.
622
+ :type _content_type: str, Optional
623
+ :param _headers: set to override the headers for a single
624
+ request; this effectively ignores the headers
625
+ in the spec for a single request.
626
+ :type _headers: dict, optional
627
+ :param _host_index: set to override the host_index for a single
628
+ request; this effectively ignores the host_index
629
+ in the spec for a single request.
630
+ :type _host_index: int, optional
631
+ :return: Returns the result object.
632
+ """ # noqa: E501
633
+
634
+ _param = self._create_sandbox_serialize(
635
+ create_sandbox=create_sandbox,
636
+ x_daytona_organization_id=x_daytona_organization_id,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ '200': "Sandbox",
645
+ }
646
+ response_data = await self.api_client.call_api(
647
+ *_param,
648
+ _request_timeout=_request_timeout
649
+ )
650
+ await response_data.read()
651
+ return self.api_client.response_deserialize(
652
+ response_data=response_data,
653
+ response_types_map=_response_types_map,
654
+ ).data
655
+
656
+
657
+ @validate_call
658
+ async def create_sandbox_with_http_info(
659
+ self,
660
+ create_sandbox: CreateSandbox,
661
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
662
+ _request_timeout: Union[
663
+ None,
664
+ Annotated[StrictFloat, Field(gt=0)],
665
+ Tuple[
666
+ Annotated[StrictFloat, Field(gt=0)],
667
+ Annotated[StrictFloat, Field(gt=0)]
668
+ ]
669
+ ] = None,
670
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
671
+ _content_type: Optional[StrictStr] = None,
672
+ _headers: Optional[Dict[StrictStr, Any]] = None,
673
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
674
+ ) -> ApiResponse[Sandbox]:
675
+ """Create a new sandbox
676
+
677
+
678
+ :param create_sandbox: (required)
679
+ :type create_sandbox: CreateSandbox
680
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
681
+ :type x_daytona_organization_id: str
682
+ :param _request_timeout: timeout setting for this request. If one
683
+ number provided, it will be total request
684
+ timeout. It can also be a pair (tuple) of
685
+ (connection, read) timeouts.
686
+ :type _request_timeout: int, tuple(int, int), optional
687
+ :param _request_auth: set to override the auth_settings for an a single
688
+ request; this effectively ignores the
689
+ authentication in the spec for a single request.
690
+ :type _request_auth: dict, optional
691
+ :param _content_type: force content-type for the request.
692
+ :type _content_type: str, Optional
693
+ :param _headers: set to override the headers for a single
694
+ request; this effectively ignores the headers
695
+ in the spec for a single request.
696
+ :type _headers: dict, optional
697
+ :param _host_index: set to override the host_index for a single
698
+ request; this effectively ignores the host_index
699
+ in the spec for a single request.
700
+ :type _host_index: int, optional
701
+ :return: Returns the result object.
702
+ """ # noqa: E501
703
+
704
+ _param = self._create_sandbox_serialize(
705
+ create_sandbox=create_sandbox,
706
+ x_daytona_organization_id=x_daytona_organization_id,
707
+ _request_auth=_request_auth,
708
+ _content_type=_content_type,
709
+ _headers=_headers,
710
+ _host_index=_host_index
711
+ )
712
+
713
+ _response_types_map: Dict[str, Optional[str]] = {
714
+ '200': "Sandbox",
715
+ }
716
+ response_data = await self.api_client.call_api(
717
+ *_param,
718
+ _request_timeout=_request_timeout
719
+ )
720
+ await response_data.read()
721
+ return self.api_client.response_deserialize(
722
+ response_data=response_data,
723
+ response_types_map=_response_types_map,
724
+ )
725
+
726
+
727
+ @validate_call
728
+ async def create_sandbox_without_preload_content(
729
+ self,
730
+ create_sandbox: CreateSandbox,
731
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
732
+ _request_timeout: Union[
733
+ None,
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Tuple[
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Annotated[StrictFloat, Field(gt=0)]
738
+ ]
739
+ ] = None,
740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
741
+ _content_type: Optional[StrictStr] = None,
742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
+ ) -> RESTResponseType:
745
+ """Create a new sandbox
746
+
747
+
748
+ :param create_sandbox: (required)
749
+ :type create_sandbox: CreateSandbox
750
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
751
+ :type x_daytona_organization_id: str
752
+ :param _request_timeout: timeout setting for this request. If one
753
+ number provided, it will be total request
754
+ timeout. It can also be a pair (tuple) of
755
+ (connection, read) timeouts.
756
+ :type _request_timeout: int, tuple(int, int), optional
757
+ :param _request_auth: set to override the auth_settings for an a single
758
+ request; this effectively ignores the
759
+ authentication in the spec for a single request.
760
+ :type _request_auth: dict, optional
761
+ :param _content_type: force content-type for the request.
762
+ :type _content_type: str, Optional
763
+ :param _headers: set to override the headers for a single
764
+ request; this effectively ignores the headers
765
+ in the spec for a single request.
766
+ :type _headers: dict, optional
767
+ :param _host_index: set to override the host_index for a single
768
+ request; this effectively ignores the host_index
769
+ in the spec for a single request.
770
+ :type _host_index: int, optional
771
+ :return: Returns the result object.
772
+ """ # noqa: E501
773
+
774
+ _param = self._create_sandbox_serialize(
775
+ create_sandbox=create_sandbox,
776
+ x_daytona_organization_id=x_daytona_organization_id,
777
+ _request_auth=_request_auth,
778
+ _content_type=_content_type,
779
+ _headers=_headers,
780
+ _host_index=_host_index
781
+ )
782
+
783
+ _response_types_map: Dict[str, Optional[str]] = {
784
+ '200': "Sandbox",
785
+ }
786
+ response_data = await self.api_client.call_api(
787
+ *_param,
788
+ _request_timeout=_request_timeout
789
+ )
790
+ return response_data.response
791
+
792
+
793
+ def _create_sandbox_serialize(
794
+ self,
795
+ create_sandbox,
796
+ x_daytona_organization_id,
797
+ _request_auth,
798
+ _content_type,
799
+ _headers,
800
+ _host_index,
801
+ ) -> RequestSerialized:
802
+
803
+ _host = None
804
+
805
+ _collection_formats: Dict[str, str] = {
806
+ }
807
+
808
+ _path_params: Dict[str, str] = {}
809
+ _query_params: List[Tuple[str, str]] = []
810
+ _header_params: Dict[str, Optional[str]] = _headers or {}
811
+ _form_params: List[Tuple[str, str]] = []
812
+ _files: Dict[
813
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
814
+ ] = {}
815
+ _body_params: Optional[bytes] = None
816
+
817
+ # process the path parameters
818
+ # process the query parameters
819
+ # process the header parameters
820
+ if x_daytona_organization_id is not None:
821
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
822
+ # process the form parameters
823
+ # process the body parameter
824
+ if create_sandbox is not None:
825
+ _body_params = create_sandbox
826
+
827
+
828
+ # set the HTTP header `Accept`
829
+ if 'Accept' not in _header_params:
830
+ _header_params['Accept'] = self.api_client.select_header_accept(
831
+ [
832
+ 'application/json'
833
+ ]
834
+ )
835
+
836
+ # set the HTTP header `Content-Type`
837
+ if _content_type:
838
+ _header_params['Content-Type'] = _content_type
839
+ else:
840
+ _default_content_type = (
841
+ self.api_client.select_header_content_type(
842
+ [
843
+ 'application/json'
844
+ ]
845
+ )
846
+ )
847
+ if _default_content_type is not None:
848
+ _header_params['Content-Type'] = _default_content_type
849
+
850
+ # authentication setting
851
+ _auth_settings: List[str] = [
852
+ 'bearer',
853
+ 'oauth2'
854
+ ]
855
+
856
+ return self.api_client.param_serialize(
857
+ method='POST',
858
+ resource_path='/sandbox',
859
+ path_params=_path_params,
860
+ query_params=_query_params,
861
+ header_params=_header_params,
862
+ body=_body_params,
863
+ post_params=_form_params,
864
+ files=_files,
865
+ auth_settings=_auth_settings,
866
+ collection_formats=_collection_formats,
867
+ _host=_host,
868
+ _request_auth=_request_auth
869
+ )
870
+
871
+
872
+
873
+
874
+ @validate_call
875
+ async def delete_sandbox(
876
+ self,
877
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
878
+ force: StrictBool,
879
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
880
+ _request_timeout: Union[
881
+ None,
882
+ Annotated[StrictFloat, Field(gt=0)],
883
+ Tuple[
884
+ Annotated[StrictFloat, Field(gt=0)],
885
+ Annotated[StrictFloat, Field(gt=0)]
886
+ ]
887
+ ] = None,
888
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
889
+ _content_type: Optional[StrictStr] = None,
890
+ _headers: Optional[Dict[StrictStr, Any]] = None,
891
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
892
+ ) -> None:
893
+ """Delete sandbox
894
+
895
+
896
+ :param sandbox_id: ID of the sandbox (required)
897
+ :type sandbox_id: str
898
+ :param force: (required)
899
+ :type force: bool
900
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
901
+ :type x_daytona_organization_id: str
902
+ :param _request_timeout: timeout setting for this request. If one
903
+ number provided, it will be total request
904
+ timeout. It can also be a pair (tuple) of
905
+ (connection, read) timeouts.
906
+ :type _request_timeout: int, tuple(int, int), optional
907
+ :param _request_auth: set to override the auth_settings for an a single
908
+ request; this effectively ignores the
909
+ authentication in the spec for a single request.
910
+ :type _request_auth: dict, optional
911
+ :param _content_type: force content-type for the request.
912
+ :type _content_type: str, Optional
913
+ :param _headers: set to override the headers for a single
914
+ request; this effectively ignores the headers
915
+ in the spec for a single request.
916
+ :type _headers: dict, optional
917
+ :param _host_index: set to override the host_index for a single
918
+ request; this effectively ignores the host_index
919
+ in the spec for a single request.
920
+ :type _host_index: int, optional
921
+ :return: Returns the result object.
922
+ """ # noqa: E501
923
+
924
+ _param = self._delete_sandbox_serialize(
925
+ sandbox_id=sandbox_id,
926
+ force=force,
927
+ x_daytona_organization_id=x_daytona_organization_id,
928
+ _request_auth=_request_auth,
929
+ _content_type=_content_type,
930
+ _headers=_headers,
931
+ _host_index=_host_index
932
+ )
933
+
934
+ _response_types_map: Dict[str, Optional[str]] = {
935
+ '200': None,
936
+ }
937
+ response_data = await self.api_client.call_api(
938
+ *_param,
939
+ _request_timeout=_request_timeout
940
+ )
941
+ await response_data.read()
942
+ return self.api_client.response_deserialize(
943
+ response_data=response_data,
944
+ response_types_map=_response_types_map,
945
+ ).data
946
+
947
+
948
+ @validate_call
949
+ async def delete_sandbox_with_http_info(
950
+ self,
951
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
952
+ force: StrictBool,
953
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
954
+ _request_timeout: Union[
955
+ None,
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Tuple[
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Annotated[StrictFloat, Field(gt=0)]
960
+ ]
961
+ ] = None,
962
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
963
+ _content_type: Optional[StrictStr] = None,
964
+ _headers: Optional[Dict[StrictStr, Any]] = None,
965
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
966
+ ) -> ApiResponse[None]:
967
+ """Delete sandbox
968
+
969
+
970
+ :param sandbox_id: ID of the sandbox (required)
971
+ :type sandbox_id: str
972
+ :param force: (required)
973
+ :type force: bool
974
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
975
+ :type x_daytona_organization_id: str
976
+ :param _request_timeout: timeout setting for this request. If one
977
+ number provided, it will be total request
978
+ timeout. It can also be a pair (tuple) of
979
+ (connection, read) timeouts.
980
+ :type _request_timeout: int, tuple(int, int), optional
981
+ :param _request_auth: set to override the auth_settings for an a single
982
+ request; this effectively ignores the
983
+ authentication in the spec for a single request.
984
+ :type _request_auth: dict, optional
985
+ :param _content_type: force content-type for the request.
986
+ :type _content_type: str, Optional
987
+ :param _headers: set to override the headers for a single
988
+ request; this effectively ignores the headers
989
+ in the spec for a single request.
990
+ :type _headers: dict, optional
991
+ :param _host_index: set to override the host_index for a single
992
+ request; this effectively ignores the host_index
993
+ in the spec for a single request.
994
+ :type _host_index: int, optional
995
+ :return: Returns the result object.
996
+ """ # noqa: E501
997
+
998
+ _param = self._delete_sandbox_serialize(
999
+ sandbox_id=sandbox_id,
1000
+ force=force,
1001
+ x_daytona_organization_id=x_daytona_organization_id,
1002
+ _request_auth=_request_auth,
1003
+ _content_type=_content_type,
1004
+ _headers=_headers,
1005
+ _host_index=_host_index
1006
+ )
1007
+
1008
+ _response_types_map: Dict[str, Optional[str]] = {
1009
+ '200': None,
1010
+ }
1011
+ response_data = await self.api_client.call_api(
1012
+ *_param,
1013
+ _request_timeout=_request_timeout
1014
+ )
1015
+ await response_data.read()
1016
+ return self.api_client.response_deserialize(
1017
+ response_data=response_data,
1018
+ response_types_map=_response_types_map,
1019
+ )
1020
+
1021
+
1022
+ @validate_call
1023
+ async def delete_sandbox_without_preload_content(
1024
+ self,
1025
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1026
+ force: StrictBool,
1027
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1028
+ _request_timeout: Union[
1029
+ None,
1030
+ Annotated[StrictFloat, Field(gt=0)],
1031
+ Tuple[
1032
+ Annotated[StrictFloat, Field(gt=0)],
1033
+ Annotated[StrictFloat, Field(gt=0)]
1034
+ ]
1035
+ ] = None,
1036
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1037
+ _content_type: Optional[StrictStr] = None,
1038
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1039
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1040
+ ) -> RESTResponseType:
1041
+ """Delete sandbox
1042
+
1043
+
1044
+ :param sandbox_id: ID of the sandbox (required)
1045
+ :type sandbox_id: str
1046
+ :param force: (required)
1047
+ :type force: bool
1048
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1049
+ :type x_daytona_organization_id: str
1050
+ :param _request_timeout: timeout setting for this request. If one
1051
+ number provided, it will be total request
1052
+ timeout. It can also be a pair (tuple) of
1053
+ (connection, read) timeouts.
1054
+ :type _request_timeout: int, tuple(int, int), optional
1055
+ :param _request_auth: set to override the auth_settings for an a single
1056
+ request; this effectively ignores the
1057
+ authentication in the spec for a single request.
1058
+ :type _request_auth: dict, optional
1059
+ :param _content_type: force content-type for the request.
1060
+ :type _content_type: str, Optional
1061
+ :param _headers: set to override the headers for a single
1062
+ request; this effectively ignores the headers
1063
+ in the spec for a single request.
1064
+ :type _headers: dict, optional
1065
+ :param _host_index: set to override the host_index for a single
1066
+ request; this effectively ignores the host_index
1067
+ in the spec for a single request.
1068
+ :type _host_index: int, optional
1069
+ :return: Returns the result object.
1070
+ """ # noqa: E501
1071
+
1072
+ _param = self._delete_sandbox_serialize(
1073
+ sandbox_id=sandbox_id,
1074
+ force=force,
1075
+ x_daytona_organization_id=x_daytona_organization_id,
1076
+ _request_auth=_request_auth,
1077
+ _content_type=_content_type,
1078
+ _headers=_headers,
1079
+ _host_index=_host_index
1080
+ )
1081
+
1082
+ _response_types_map: Dict[str, Optional[str]] = {
1083
+ '200': None,
1084
+ }
1085
+ response_data = await self.api_client.call_api(
1086
+ *_param,
1087
+ _request_timeout=_request_timeout
1088
+ )
1089
+ return response_data.response
1090
+
1091
+
1092
+ def _delete_sandbox_serialize(
1093
+ self,
1094
+ sandbox_id,
1095
+ force,
1096
+ x_daytona_organization_id,
1097
+ _request_auth,
1098
+ _content_type,
1099
+ _headers,
1100
+ _host_index,
1101
+ ) -> RequestSerialized:
1102
+
1103
+ _host = None
1104
+
1105
+ _collection_formats: Dict[str, str] = {
1106
+ }
1107
+
1108
+ _path_params: Dict[str, str] = {}
1109
+ _query_params: List[Tuple[str, str]] = []
1110
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1111
+ _form_params: List[Tuple[str, str]] = []
1112
+ _files: Dict[
1113
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1114
+ ] = {}
1115
+ _body_params: Optional[bytes] = None
1116
+
1117
+ # process the path parameters
1118
+ if sandbox_id is not None:
1119
+ _path_params['sandboxId'] = sandbox_id
1120
+ # process the query parameters
1121
+ if force is not None:
1122
+
1123
+ _query_params.append(('force', force))
1124
+
1125
+ # process the header parameters
1126
+ if x_daytona_organization_id is not None:
1127
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1128
+ # process the form parameters
1129
+ # process the body parameter
1130
+
1131
+
1132
+
1133
+
1134
+ # authentication setting
1135
+ _auth_settings: List[str] = [
1136
+ 'bearer',
1137
+ 'oauth2'
1138
+ ]
1139
+
1140
+ return self.api_client.param_serialize(
1141
+ method='DELETE',
1142
+ resource_path='/sandbox/{sandboxId}',
1143
+ path_params=_path_params,
1144
+ query_params=_query_params,
1145
+ header_params=_header_params,
1146
+ body=_body_params,
1147
+ post_params=_form_params,
1148
+ files=_files,
1149
+ auth_settings=_auth_settings,
1150
+ collection_formats=_collection_formats,
1151
+ _host=_host,
1152
+ _request_auth=_request_auth
1153
+ )
1154
+
1155
+
1156
+
1157
+
1158
+ @validate_call
1159
+ async def get_build_logs(
1160
+ self,
1161
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1162
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1163
+ follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
1164
+ _request_timeout: Union[
1165
+ None,
1166
+ Annotated[StrictFloat, Field(gt=0)],
1167
+ Tuple[
1168
+ Annotated[StrictFloat, Field(gt=0)],
1169
+ Annotated[StrictFloat, Field(gt=0)]
1170
+ ]
1171
+ ] = None,
1172
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1173
+ _content_type: Optional[StrictStr] = None,
1174
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1175
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1176
+ ) -> None:
1177
+ """Get build logs
1178
+
1179
+
1180
+ :param sandbox_id: ID of the sandbox (required)
1181
+ :type sandbox_id: str
1182
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1183
+ :type x_daytona_organization_id: str
1184
+ :param follow: Whether to follow the logs stream
1185
+ :type follow: bool
1186
+ :param _request_timeout: timeout setting for this request. If one
1187
+ number provided, it will be total request
1188
+ timeout. It can also be a pair (tuple) of
1189
+ (connection, read) timeouts.
1190
+ :type _request_timeout: int, tuple(int, int), optional
1191
+ :param _request_auth: set to override the auth_settings for an a single
1192
+ request; this effectively ignores the
1193
+ authentication in the spec for a single request.
1194
+ :type _request_auth: dict, optional
1195
+ :param _content_type: force content-type for the request.
1196
+ :type _content_type: str, Optional
1197
+ :param _headers: set to override the headers for a single
1198
+ request; this effectively ignores the headers
1199
+ in the spec for a single request.
1200
+ :type _headers: dict, optional
1201
+ :param _host_index: set to override the host_index for a single
1202
+ request; this effectively ignores the host_index
1203
+ in the spec for a single request.
1204
+ :type _host_index: int, optional
1205
+ :return: Returns the result object.
1206
+ """ # noqa: E501
1207
+
1208
+ _param = self._get_build_logs_serialize(
1209
+ sandbox_id=sandbox_id,
1210
+ x_daytona_organization_id=x_daytona_organization_id,
1211
+ follow=follow,
1212
+ _request_auth=_request_auth,
1213
+ _content_type=_content_type,
1214
+ _headers=_headers,
1215
+ _host_index=_host_index
1216
+ )
1217
+
1218
+ _response_types_map: Dict[str, Optional[str]] = {
1219
+ '200': None,
1220
+ }
1221
+ response_data = await self.api_client.call_api(
1222
+ *_param,
1223
+ _request_timeout=_request_timeout
1224
+ )
1225
+ await response_data.read()
1226
+ return self.api_client.response_deserialize(
1227
+ response_data=response_data,
1228
+ response_types_map=_response_types_map,
1229
+ ).data
1230
+
1231
+
1232
+ @validate_call
1233
+ async def get_build_logs_with_http_info(
1234
+ self,
1235
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1236
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1237
+ follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
1238
+ _request_timeout: Union[
1239
+ None,
1240
+ Annotated[StrictFloat, Field(gt=0)],
1241
+ Tuple[
1242
+ Annotated[StrictFloat, Field(gt=0)],
1243
+ Annotated[StrictFloat, Field(gt=0)]
1244
+ ]
1245
+ ] = None,
1246
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1247
+ _content_type: Optional[StrictStr] = None,
1248
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1249
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1250
+ ) -> ApiResponse[None]:
1251
+ """Get build logs
1252
+
1253
+
1254
+ :param sandbox_id: ID of the sandbox (required)
1255
+ :type sandbox_id: str
1256
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1257
+ :type x_daytona_organization_id: str
1258
+ :param follow: Whether to follow the logs stream
1259
+ :type follow: bool
1260
+ :param _request_timeout: timeout setting for this request. If one
1261
+ number provided, it will be total request
1262
+ timeout. It can also be a pair (tuple) of
1263
+ (connection, read) timeouts.
1264
+ :type _request_timeout: int, tuple(int, int), optional
1265
+ :param _request_auth: set to override the auth_settings for an a single
1266
+ request; this effectively ignores the
1267
+ authentication in the spec for a single request.
1268
+ :type _request_auth: dict, optional
1269
+ :param _content_type: force content-type for the request.
1270
+ :type _content_type: str, Optional
1271
+ :param _headers: set to override the headers for a single
1272
+ request; this effectively ignores the headers
1273
+ in the spec for a single request.
1274
+ :type _headers: dict, optional
1275
+ :param _host_index: set to override the host_index for a single
1276
+ request; this effectively ignores the host_index
1277
+ in the spec for a single request.
1278
+ :type _host_index: int, optional
1279
+ :return: Returns the result object.
1280
+ """ # noqa: E501
1281
+
1282
+ _param = self._get_build_logs_serialize(
1283
+ sandbox_id=sandbox_id,
1284
+ x_daytona_organization_id=x_daytona_organization_id,
1285
+ follow=follow,
1286
+ _request_auth=_request_auth,
1287
+ _content_type=_content_type,
1288
+ _headers=_headers,
1289
+ _host_index=_host_index
1290
+ )
1291
+
1292
+ _response_types_map: Dict[str, Optional[str]] = {
1293
+ '200': None,
1294
+ }
1295
+ response_data = await self.api_client.call_api(
1296
+ *_param,
1297
+ _request_timeout=_request_timeout
1298
+ )
1299
+ await response_data.read()
1300
+ return self.api_client.response_deserialize(
1301
+ response_data=response_data,
1302
+ response_types_map=_response_types_map,
1303
+ )
1304
+
1305
+
1306
+ @validate_call
1307
+ async def get_build_logs_without_preload_content(
1308
+ self,
1309
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1310
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1311
+ follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
1312
+ _request_timeout: Union[
1313
+ None,
1314
+ Annotated[StrictFloat, Field(gt=0)],
1315
+ Tuple[
1316
+ Annotated[StrictFloat, Field(gt=0)],
1317
+ Annotated[StrictFloat, Field(gt=0)]
1318
+ ]
1319
+ ] = None,
1320
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1321
+ _content_type: Optional[StrictStr] = None,
1322
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1323
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1324
+ ) -> RESTResponseType:
1325
+ """Get build logs
1326
+
1327
+
1328
+ :param sandbox_id: ID of the sandbox (required)
1329
+ :type sandbox_id: str
1330
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1331
+ :type x_daytona_organization_id: str
1332
+ :param follow: Whether to follow the logs stream
1333
+ :type follow: bool
1334
+ :param _request_timeout: timeout setting for this request. If one
1335
+ number provided, it will be total request
1336
+ timeout. It can also be a pair (tuple) of
1337
+ (connection, read) timeouts.
1338
+ :type _request_timeout: int, tuple(int, int), optional
1339
+ :param _request_auth: set to override the auth_settings for an a single
1340
+ request; this effectively ignores the
1341
+ authentication in the spec for a single request.
1342
+ :type _request_auth: dict, optional
1343
+ :param _content_type: force content-type for the request.
1344
+ :type _content_type: str, Optional
1345
+ :param _headers: set to override the headers for a single
1346
+ request; this effectively ignores the headers
1347
+ in the spec for a single request.
1348
+ :type _headers: dict, optional
1349
+ :param _host_index: set to override the host_index for a single
1350
+ request; this effectively ignores the host_index
1351
+ in the spec for a single request.
1352
+ :type _host_index: int, optional
1353
+ :return: Returns the result object.
1354
+ """ # noqa: E501
1355
+
1356
+ _param = self._get_build_logs_serialize(
1357
+ sandbox_id=sandbox_id,
1358
+ x_daytona_organization_id=x_daytona_organization_id,
1359
+ follow=follow,
1360
+ _request_auth=_request_auth,
1361
+ _content_type=_content_type,
1362
+ _headers=_headers,
1363
+ _host_index=_host_index
1364
+ )
1365
+
1366
+ _response_types_map: Dict[str, Optional[str]] = {
1367
+ '200': None,
1368
+ }
1369
+ response_data = await self.api_client.call_api(
1370
+ *_param,
1371
+ _request_timeout=_request_timeout
1372
+ )
1373
+ return response_data.response
1374
+
1375
+
1376
+ def _get_build_logs_serialize(
1377
+ self,
1378
+ sandbox_id,
1379
+ x_daytona_organization_id,
1380
+ follow,
1381
+ _request_auth,
1382
+ _content_type,
1383
+ _headers,
1384
+ _host_index,
1385
+ ) -> RequestSerialized:
1386
+
1387
+ _host = None
1388
+
1389
+ _collection_formats: Dict[str, str] = {
1390
+ }
1391
+
1392
+ _path_params: Dict[str, str] = {}
1393
+ _query_params: List[Tuple[str, str]] = []
1394
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1395
+ _form_params: List[Tuple[str, str]] = []
1396
+ _files: Dict[
1397
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1398
+ ] = {}
1399
+ _body_params: Optional[bytes] = None
1400
+
1401
+ # process the path parameters
1402
+ if sandbox_id is not None:
1403
+ _path_params['sandboxId'] = sandbox_id
1404
+ # process the query parameters
1405
+ if follow is not None:
1406
+
1407
+ _query_params.append(('follow', follow))
1408
+
1409
+ # process the header parameters
1410
+ if x_daytona_organization_id is not None:
1411
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1412
+ # process the form parameters
1413
+ # process the body parameter
1414
+
1415
+
1416
+
1417
+
1418
+ # authentication setting
1419
+ _auth_settings: List[str] = [
1420
+ 'bearer',
1421
+ 'oauth2'
1422
+ ]
1423
+
1424
+ return self.api_client.param_serialize(
1425
+ method='GET',
1426
+ resource_path='/sandbox/{sandboxId}/build-logs',
1427
+ path_params=_path_params,
1428
+ query_params=_query_params,
1429
+ header_params=_header_params,
1430
+ body=_body_params,
1431
+ post_params=_form_params,
1432
+ files=_files,
1433
+ auth_settings=_auth_settings,
1434
+ collection_formats=_collection_formats,
1435
+ _host=_host,
1436
+ _request_auth=_request_auth
1437
+ )
1438
+
1439
+
1440
+
1441
+
1442
+ @validate_call
1443
+ async def get_port_preview_url(
1444
+ self,
1445
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1446
+ port: Annotated[Union[StrictFloat, StrictInt], Field(description="Port number to get preview URL for")],
1447
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1448
+ _request_timeout: Union[
1449
+ None,
1450
+ Annotated[StrictFloat, Field(gt=0)],
1451
+ Tuple[
1452
+ Annotated[StrictFloat, Field(gt=0)],
1453
+ Annotated[StrictFloat, Field(gt=0)]
1454
+ ]
1455
+ ] = None,
1456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1457
+ _content_type: Optional[StrictStr] = None,
1458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1460
+ ) -> PortPreviewUrl:
1461
+ """Get preview URL for a sandbox port
1462
+
1463
+
1464
+ :param sandbox_id: ID of the sandbox (required)
1465
+ :type sandbox_id: str
1466
+ :param port: Port number to get preview URL for (required)
1467
+ :type port: float
1468
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1469
+ :type x_daytona_organization_id: str
1470
+ :param _request_timeout: timeout setting for this request. If one
1471
+ number provided, it will be total request
1472
+ timeout. It can also be a pair (tuple) of
1473
+ (connection, read) timeouts.
1474
+ :type _request_timeout: int, tuple(int, int), optional
1475
+ :param _request_auth: set to override the auth_settings for an a single
1476
+ request; this effectively ignores the
1477
+ authentication in the spec for a single request.
1478
+ :type _request_auth: dict, optional
1479
+ :param _content_type: force content-type for the request.
1480
+ :type _content_type: str, Optional
1481
+ :param _headers: set to override the headers for a single
1482
+ request; this effectively ignores the headers
1483
+ in the spec for a single request.
1484
+ :type _headers: dict, optional
1485
+ :param _host_index: set to override the host_index for a single
1486
+ request; this effectively ignores the host_index
1487
+ in the spec for a single request.
1488
+ :type _host_index: int, optional
1489
+ :return: Returns the result object.
1490
+ """ # noqa: E501
1491
+
1492
+ _param = self._get_port_preview_url_serialize(
1493
+ sandbox_id=sandbox_id,
1494
+ port=port,
1495
+ x_daytona_organization_id=x_daytona_organization_id,
1496
+ _request_auth=_request_auth,
1497
+ _content_type=_content_type,
1498
+ _headers=_headers,
1499
+ _host_index=_host_index
1500
+ )
1501
+
1502
+ _response_types_map: Dict[str, Optional[str]] = {
1503
+ '200': "PortPreviewUrl",
1504
+ }
1505
+ response_data = await self.api_client.call_api(
1506
+ *_param,
1507
+ _request_timeout=_request_timeout
1508
+ )
1509
+ await response_data.read()
1510
+ return self.api_client.response_deserialize(
1511
+ response_data=response_data,
1512
+ response_types_map=_response_types_map,
1513
+ ).data
1514
+
1515
+
1516
+ @validate_call
1517
+ async def get_port_preview_url_with_http_info(
1518
+ self,
1519
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1520
+ port: Annotated[Union[StrictFloat, StrictInt], Field(description="Port number to get preview URL for")],
1521
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1522
+ _request_timeout: Union[
1523
+ None,
1524
+ Annotated[StrictFloat, Field(gt=0)],
1525
+ Tuple[
1526
+ Annotated[StrictFloat, Field(gt=0)],
1527
+ Annotated[StrictFloat, Field(gt=0)]
1528
+ ]
1529
+ ] = None,
1530
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1531
+ _content_type: Optional[StrictStr] = None,
1532
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1533
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1534
+ ) -> ApiResponse[PortPreviewUrl]:
1535
+ """Get preview URL for a sandbox port
1536
+
1537
+
1538
+ :param sandbox_id: ID of the sandbox (required)
1539
+ :type sandbox_id: str
1540
+ :param port: Port number to get preview URL for (required)
1541
+ :type port: float
1542
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1543
+ :type x_daytona_organization_id: str
1544
+ :param _request_timeout: timeout setting for this request. If one
1545
+ number provided, it will be total request
1546
+ timeout. It can also be a pair (tuple) of
1547
+ (connection, read) timeouts.
1548
+ :type _request_timeout: int, tuple(int, int), optional
1549
+ :param _request_auth: set to override the auth_settings for an a single
1550
+ request; this effectively ignores the
1551
+ authentication in the spec for a single request.
1552
+ :type _request_auth: dict, optional
1553
+ :param _content_type: force content-type for the request.
1554
+ :type _content_type: str, Optional
1555
+ :param _headers: set to override the headers for a single
1556
+ request; this effectively ignores the headers
1557
+ in the spec for a single request.
1558
+ :type _headers: dict, optional
1559
+ :param _host_index: set to override the host_index for a single
1560
+ request; this effectively ignores the host_index
1561
+ in the spec for a single request.
1562
+ :type _host_index: int, optional
1563
+ :return: Returns the result object.
1564
+ """ # noqa: E501
1565
+
1566
+ _param = self._get_port_preview_url_serialize(
1567
+ sandbox_id=sandbox_id,
1568
+ port=port,
1569
+ x_daytona_organization_id=x_daytona_organization_id,
1570
+ _request_auth=_request_auth,
1571
+ _content_type=_content_type,
1572
+ _headers=_headers,
1573
+ _host_index=_host_index
1574
+ )
1575
+
1576
+ _response_types_map: Dict[str, Optional[str]] = {
1577
+ '200': "PortPreviewUrl",
1578
+ }
1579
+ response_data = await self.api_client.call_api(
1580
+ *_param,
1581
+ _request_timeout=_request_timeout
1582
+ )
1583
+ await response_data.read()
1584
+ return self.api_client.response_deserialize(
1585
+ response_data=response_data,
1586
+ response_types_map=_response_types_map,
1587
+ )
1588
+
1589
+
1590
+ @validate_call
1591
+ async def get_port_preview_url_without_preload_content(
1592
+ self,
1593
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1594
+ port: Annotated[Union[StrictFloat, StrictInt], Field(description="Port number to get preview URL for")],
1595
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1596
+ _request_timeout: Union[
1597
+ None,
1598
+ Annotated[StrictFloat, Field(gt=0)],
1599
+ Tuple[
1600
+ Annotated[StrictFloat, Field(gt=0)],
1601
+ Annotated[StrictFloat, Field(gt=0)]
1602
+ ]
1603
+ ] = None,
1604
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1605
+ _content_type: Optional[StrictStr] = None,
1606
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1607
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1608
+ ) -> RESTResponseType:
1609
+ """Get preview URL for a sandbox port
1610
+
1611
+
1612
+ :param sandbox_id: ID of the sandbox (required)
1613
+ :type sandbox_id: str
1614
+ :param port: Port number to get preview URL for (required)
1615
+ :type port: float
1616
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1617
+ :type x_daytona_organization_id: str
1618
+ :param _request_timeout: timeout setting for this request. If one
1619
+ number provided, it will be total request
1620
+ timeout. It can also be a pair (tuple) of
1621
+ (connection, read) timeouts.
1622
+ :type _request_timeout: int, tuple(int, int), optional
1623
+ :param _request_auth: set to override the auth_settings for an a single
1624
+ request; this effectively ignores the
1625
+ authentication in the spec for a single request.
1626
+ :type _request_auth: dict, optional
1627
+ :param _content_type: force content-type for the request.
1628
+ :type _content_type: str, Optional
1629
+ :param _headers: set to override the headers for a single
1630
+ request; this effectively ignores the headers
1631
+ in the spec for a single request.
1632
+ :type _headers: dict, optional
1633
+ :param _host_index: set to override the host_index for a single
1634
+ request; this effectively ignores the host_index
1635
+ in the spec for a single request.
1636
+ :type _host_index: int, optional
1637
+ :return: Returns the result object.
1638
+ """ # noqa: E501
1639
+
1640
+ _param = self._get_port_preview_url_serialize(
1641
+ sandbox_id=sandbox_id,
1642
+ port=port,
1643
+ x_daytona_organization_id=x_daytona_organization_id,
1644
+ _request_auth=_request_auth,
1645
+ _content_type=_content_type,
1646
+ _headers=_headers,
1647
+ _host_index=_host_index
1648
+ )
1649
+
1650
+ _response_types_map: Dict[str, Optional[str]] = {
1651
+ '200': "PortPreviewUrl",
1652
+ }
1653
+ response_data = await self.api_client.call_api(
1654
+ *_param,
1655
+ _request_timeout=_request_timeout
1656
+ )
1657
+ return response_data.response
1658
+
1659
+
1660
+ def _get_port_preview_url_serialize(
1661
+ self,
1662
+ sandbox_id,
1663
+ port,
1664
+ x_daytona_organization_id,
1665
+ _request_auth,
1666
+ _content_type,
1667
+ _headers,
1668
+ _host_index,
1669
+ ) -> RequestSerialized:
1670
+
1671
+ _host = None
1672
+
1673
+ _collection_formats: Dict[str, str] = {
1674
+ }
1675
+
1676
+ _path_params: Dict[str, str] = {}
1677
+ _query_params: List[Tuple[str, str]] = []
1678
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1679
+ _form_params: List[Tuple[str, str]] = []
1680
+ _files: Dict[
1681
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1682
+ ] = {}
1683
+ _body_params: Optional[bytes] = None
1684
+
1685
+ # process the path parameters
1686
+ if sandbox_id is not None:
1687
+ _path_params['sandboxId'] = sandbox_id
1688
+ if port is not None:
1689
+ _path_params['port'] = port
1690
+ # process the query parameters
1691
+ # process the header parameters
1692
+ if x_daytona_organization_id is not None:
1693
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1694
+ # process the form parameters
1695
+ # process the body parameter
1696
+
1697
+
1698
+ # set the HTTP header `Accept`
1699
+ if 'Accept' not in _header_params:
1700
+ _header_params['Accept'] = self.api_client.select_header_accept(
1701
+ [
1702
+ 'application/json'
1703
+ ]
1704
+ )
1705
+
1706
+
1707
+ # authentication setting
1708
+ _auth_settings: List[str] = [
1709
+ 'bearer',
1710
+ 'oauth2'
1711
+ ]
1712
+
1713
+ return self.api_client.param_serialize(
1714
+ method='GET',
1715
+ resource_path='/sandbox/{sandboxId}/ports/{port}/preview-url',
1716
+ path_params=_path_params,
1717
+ query_params=_query_params,
1718
+ header_params=_header_params,
1719
+ body=_body_params,
1720
+ post_params=_form_params,
1721
+ files=_files,
1722
+ auth_settings=_auth_settings,
1723
+ collection_formats=_collection_formats,
1724
+ _host=_host,
1725
+ _request_auth=_request_auth
1726
+ )
1727
+
1728
+
1729
+
1730
+
1731
+ @validate_call
1732
+ async def get_sandbox(
1733
+ self,
1734
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1735
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1736
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
1737
+ _request_timeout: Union[
1738
+ None,
1739
+ Annotated[StrictFloat, Field(gt=0)],
1740
+ Tuple[
1741
+ Annotated[StrictFloat, Field(gt=0)],
1742
+ Annotated[StrictFloat, Field(gt=0)]
1743
+ ]
1744
+ ] = None,
1745
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1746
+ _content_type: Optional[StrictStr] = None,
1747
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1748
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1749
+ ) -> Sandbox:
1750
+ """Get sandbox details
1751
+
1752
+
1753
+ :param sandbox_id: ID of the sandbox (required)
1754
+ :type sandbox_id: str
1755
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1756
+ :type x_daytona_organization_id: str
1757
+ :param verbose: Include verbose output
1758
+ :type verbose: bool
1759
+ :param _request_timeout: timeout setting for this request. If one
1760
+ number provided, it will be total request
1761
+ timeout. It can also be a pair (tuple) of
1762
+ (connection, read) timeouts.
1763
+ :type _request_timeout: int, tuple(int, int), optional
1764
+ :param _request_auth: set to override the auth_settings for an a single
1765
+ request; this effectively ignores the
1766
+ authentication in the spec for a single request.
1767
+ :type _request_auth: dict, optional
1768
+ :param _content_type: force content-type for the request.
1769
+ :type _content_type: str, Optional
1770
+ :param _headers: set to override the headers for a single
1771
+ request; this effectively ignores the headers
1772
+ in the spec for a single request.
1773
+ :type _headers: dict, optional
1774
+ :param _host_index: set to override the host_index for a single
1775
+ request; this effectively ignores the host_index
1776
+ in the spec for a single request.
1777
+ :type _host_index: int, optional
1778
+ :return: Returns the result object.
1779
+ """ # noqa: E501
1780
+
1781
+ _param = self._get_sandbox_serialize(
1782
+ sandbox_id=sandbox_id,
1783
+ x_daytona_organization_id=x_daytona_organization_id,
1784
+ verbose=verbose,
1785
+ _request_auth=_request_auth,
1786
+ _content_type=_content_type,
1787
+ _headers=_headers,
1788
+ _host_index=_host_index
1789
+ )
1790
+
1791
+ _response_types_map: Dict[str, Optional[str]] = {
1792
+ '200': "Sandbox",
1793
+ }
1794
+ response_data = await self.api_client.call_api(
1795
+ *_param,
1796
+ _request_timeout=_request_timeout
1797
+ )
1798
+ await response_data.read()
1799
+ return self.api_client.response_deserialize(
1800
+ response_data=response_data,
1801
+ response_types_map=_response_types_map,
1802
+ ).data
1803
+
1804
+
1805
+ @validate_call
1806
+ async def get_sandbox_with_http_info(
1807
+ self,
1808
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1809
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1810
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
1811
+ _request_timeout: Union[
1812
+ None,
1813
+ Annotated[StrictFloat, Field(gt=0)],
1814
+ Tuple[
1815
+ Annotated[StrictFloat, Field(gt=0)],
1816
+ Annotated[StrictFloat, Field(gt=0)]
1817
+ ]
1818
+ ] = None,
1819
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1820
+ _content_type: Optional[StrictStr] = None,
1821
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1822
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1823
+ ) -> ApiResponse[Sandbox]:
1824
+ """Get sandbox details
1825
+
1826
+
1827
+ :param sandbox_id: ID of the sandbox (required)
1828
+ :type sandbox_id: str
1829
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1830
+ :type x_daytona_organization_id: str
1831
+ :param verbose: Include verbose output
1832
+ :type verbose: bool
1833
+ :param _request_timeout: timeout setting for this request. If one
1834
+ number provided, it will be total request
1835
+ timeout. It can also be a pair (tuple) of
1836
+ (connection, read) timeouts.
1837
+ :type _request_timeout: int, tuple(int, int), optional
1838
+ :param _request_auth: set to override the auth_settings for an a single
1839
+ request; this effectively ignores the
1840
+ authentication in the spec for a single request.
1841
+ :type _request_auth: dict, optional
1842
+ :param _content_type: force content-type for the request.
1843
+ :type _content_type: str, Optional
1844
+ :param _headers: set to override the headers for a single
1845
+ request; this effectively ignores the headers
1846
+ in the spec for a single request.
1847
+ :type _headers: dict, optional
1848
+ :param _host_index: set to override the host_index for a single
1849
+ request; this effectively ignores the host_index
1850
+ in the spec for a single request.
1851
+ :type _host_index: int, optional
1852
+ :return: Returns the result object.
1853
+ """ # noqa: E501
1854
+
1855
+ _param = self._get_sandbox_serialize(
1856
+ sandbox_id=sandbox_id,
1857
+ x_daytona_organization_id=x_daytona_organization_id,
1858
+ verbose=verbose,
1859
+ _request_auth=_request_auth,
1860
+ _content_type=_content_type,
1861
+ _headers=_headers,
1862
+ _host_index=_host_index
1863
+ )
1864
+
1865
+ _response_types_map: Dict[str, Optional[str]] = {
1866
+ '200': "Sandbox",
1867
+ }
1868
+ response_data = await self.api_client.call_api(
1869
+ *_param,
1870
+ _request_timeout=_request_timeout
1871
+ )
1872
+ await response_data.read()
1873
+ return self.api_client.response_deserialize(
1874
+ response_data=response_data,
1875
+ response_types_map=_response_types_map,
1876
+ )
1877
+
1878
+
1879
+ @validate_call
1880
+ async def get_sandbox_without_preload_content(
1881
+ self,
1882
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1883
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1884
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
1885
+ _request_timeout: Union[
1886
+ None,
1887
+ Annotated[StrictFloat, Field(gt=0)],
1888
+ Tuple[
1889
+ Annotated[StrictFloat, Field(gt=0)],
1890
+ Annotated[StrictFloat, Field(gt=0)]
1891
+ ]
1892
+ ] = None,
1893
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1894
+ _content_type: Optional[StrictStr] = None,
1895
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1896
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1897
+ ) -> RESTResponseType:
1898
+ """Get sandbox details
1899
+
1900
+
1901
+ :param sandbox_id: ID of the sandbox (required)
1902
+ :type sandbox_id: str
1903
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1904
+ :type x_daytona_organization_id: str
1905
+ :param verbose: Include verbose output
1906
+ :type verbose: bool
1907
+ :param _request_timeout: timeout setting for this request. If one
1908
+ number provided, it will be total request
1909
+ timeout. It can also be a pair (tuple) of
1910
+ (connection, read) timeouts.
1911
+ :type _request_timeout: int, tuple(int, int), optional
1912
+ :param _request_auth: set to override the auth_settings for an a single
1913
+ request; this effectively ignores the
1914
+ authentication in the spec for a single request.
1915
+ :type _request_auth: dict, optional
1916
+ :param _content_type: force content-type for the request.
1917
+ :type _content_type: str, Optional
1918
+ :param _headers: set to override the headers for a single
1919
+ request; this effectively ignores the headers
1920
+ in the spec for a single request.
1921
+ :type _headers: dict, optional
1922
+ :param _host_index: set to override the host_index for a single
1923
+ request; this effectively ignores the host_index
1924
+ in the spec for a single request.
1925
+ :type _host_index: int, optional
1926
+ :return: Returns the result object.
1927
+ """ # noqa: E501
1928
+
1929
+ _param = self._get_sandbox_serialize(
1930
+ sandbox_id=sandbox_id,
1931
+ x_daytona_organization_id=x_daytona_organization_id,
1932
+ verbose=verbose,
1933
+ _request_auth=_request_auth,
1934
+ _content_type=_content_type,
1935
+ _headers=_headers,
1936
+ _host_index=_host_index
1937
+ )
1938
+
1939
+ _response_types_map: Dict[str, Optional[str]] = {
1940
+ '200': "Sandbox",
1941
+ }
1942
+ response_data = await self.api_client.call_api(
1943
+ *_param,
1944
+ _request_timeout=_request_timeout
1945
+ )
1946
+ return response_data.response
1947
+
1948
+
1949
+ def _get_sandbox_serialize(
1950
+ self,
1951
+ sandbox_id,
1952
+ x_daytona_organization_id,
1953
+ verbose,
1954
+ _request_auth,
1955
+ _content_type,
1956
+ _headers,
1957
+ _host_index,
1958
+ ) -> RequestSerialized:
1959
+
1960
+ _host = None
1961
+
1962
+ _collection_formats: Dict[str, str] = {
1963
+ }
1964
+
1965
+ _path_params: Dict[str, str] = {}
1966
+ _query_params: List[Tuple[str, str]] = []
1967
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1968
+ _form_params: List[Tuple[str, str]] = []
1969
+ _files: Dict[
1970
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1971
+ ] = {}
1972
+ _body_params: Optional[bytes] = None
1973
+
1974
+ # process the path parameters
1975
+ if sandbox_id is not None:
1976
+ _path_params['sandboxId'] = sandbox_id
1977
+ # process the query parameters
1978
+ if verbose is not None:
1979
+
1980
+ _query_params.append(('verbose', verbose))
1981
+
1982
+ # process the header parameters
1983
+ if x_daytona_organization_id is not None:
1984
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1985
+ # process the form parameters
1986
+ # process the body parameter
1987
+
1988
+
1989
+ # set the HTTP header `Accept`
1990
+ if 'Accept' not in _header_params:
1991
+ _header_params['Accept'] = self.api_client.select_header_accept(
1992
+ [
1993
+ 'application/json'
1994
+ ]
1995
+ )
1996
+
1997
+
1998
+ # authentication setting
1999
+ _auth_settings: List[str] = [
2000
+ 'bearer',
2001
+ 'oauth2'
2002
+ ]
2003
+
2004
+ return self.api_client.param_serialize(
2005
+ method='GET',
2006
+ resource_path='/sandbox/{sandboxId}',
2007
+ path_params=_path_params,
2008
+ query_params=_query_params,
2009
+ header_params=_header_params,
2010
+ body=_body_params,
2011
+ post_params=_form_params,
2012
+ files=_files,
2013
+ auth_settings=_auth_settings,
2014
+ collection_formats=_collection_formats,
2015
+ _host=_host,
2016
+ _request_auth=_request_auth
2017
+ )
2018
+
2019
+
2020
+
2021
+
2022
+ @validate_call
2023
+ async def list_sandboxes(
2024
+ self,
2025
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2026
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2027
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2028
+ _request_timeout: Union[
2029
+ None,
2030
+ Annotated[StrictFloat, Field(gt=0)],
2031
+ Tuple[
2032
+ Annotated[StrictFloat, Field(gt=0)],
2033
+ Annotated[StrictFloat, Field(gt=0)]
2034
+ ]
2035
+ ] = None,
2036
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2037
+ _content_type: Optional[StrictStr] = None,
2038
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2039
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2040
+ ) -> List[Sandbox]:
2041
+ """List all sandboxes
2042
+
2043
+
2044
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2045
+ :type x_daytona_organization_id: str
2046
+ :param verbose: Include verbose output
2047
+ :type verbose: bool
2048
+ :param labels: JSON encoded labels to filter by
2049
+ :type labels: str
2050
+ :param _request_timeout: timeout setting for this request. If one
2051
+ number provided, it will be total request
2052
+ timeout. It can also be a pair (tuple) of
2053
+ (connection, read) timeouts.
2054
+ :type _request_timeout: int, tuple(int, int), optional
2055
+ :param _request_auth: set to override the auth_settings for an a single
2056
+ request; this effectively ignores the
2057
+ authentication in the spec for a single request.
2058
+ :type _request_auth: dict, optional
2059
+ :param _content_type: force content-type for the request.
2060
+ :type _content_type: str, Optional
2061
+ :param _headers: set to override the headers for a single
2062
+ request; this effectively ignores the headers
2063
+ in the spec for a single request.
2064
+ :type _headers: dict, optional
2065
+ :param _host_index: set to override the host_index for a single
2066
+ request; this effectively ignores the host_index
2067
+ in the spec for a single request.
2068
+ :type _host_index: int, optional
2069
+ :return: Returns the result object.
2070
+ """ # noqa: E501
2071
+
2072
+ _param = self._list_sandboxes_serialize(
2073
+ x_daytona_organization_id=x_daytona_organization_id,
2074
+ verbose=verbose,
2075
+ labels=labels,
2076
+ _request_auth=_request_auth,
2077
+ _content_type=_content_type,
2078
+ _headers=_headers,
2079
+ _host_index=_host_index
2080
+ )
2081
+
2082
+ _response_types_map: Dict[str, Optional[str]] = {
2083
+ '200': "List[Sandbox]",
2084
+ }
2085
+ response_data = await self.api_client.call_api(
2086
+ *_param,
2087
+ _request_timeout=_request_timeout
2088
+ )
2089
+ await response_data.read()
2090
+ return self.api_client.response_deserialize(
2091
+ response_data=response_data,
2092
+ response_types_map=_response_types_map,
2093
+ ).data
2094
+
2095
+
2096
+ @validate_call
2097
+ async def list_sandboxes_with_http_info(
2098
+ self,
2099
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2100
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2101
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2102
+ _request_timeout: Union[
2103
+ None,
2104
+ Annotated[StrictFloat, Field(gt=0)],
2105
+ Tuple[
2106
+ Annotated[StrictFloat, Field(gt=0)],
2107
+ Annotated[StrictFloat, Field(gt=0)]
2108
+ ]
2109
+ ] = None,
2110
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2111
+ _content_type: Optional[StrictStr] = None,
2112
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2113
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2114
+ ) -> ApiResponse[List[Sandbox]]:
2115
+ """List all sandboxes
2116
+
2117
+
2118
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2119
+ :type x_daytona_organization_id: str
2120
+ :param verbose: Include verbose output
2121
+ :type verbose: bool
2122
+ :param labels: JSON encoded labels to filter by
2123
+ :type labels: str
2124
+ :param _request_timeout: timeout setting for this request. If one
2125
+ number provided, it will be total request
2126
+ timeout. It can also be a pair (tuple) of
2127
+ (connection, read) timeouts.
2128
+ :type _request_timeout: int, tuple(int, int), optional
2129
+ :param _request_auth: set to override the auth_settings for an a single
2130
+ request; this effectively ignores the
2131
+ authentication in the spec for a single request.
2132
+ :type _request_auth: dict, optional
2133
+ :param _content_type: force content-type for the request.
2134
+ :type _content_type: str, Optional
2135
+ :param _headers: set to override the headers for a single
2136
+ request; this effectively ignores the headers
2137
+ in the spec for a single request.
2138
+ :type _headers: dict, optional
2139
+ :param _host_index: set to override the host_index for a single
2140
+ request; this effectively ignores the host_index
2141
+ in the spec for a single request.
2142
+ :type _host_index: int, optional
2143
+ :return: Returns the result object.
2144
+ """ # noqa: E501
2145
+
2146
+ _param = self._list_sandboxes_serialize(
2147
+ x_daytona_organization_id=x_daytona_organization_id,
2148
+ verbose=verbose,
2149
+ labels=labels,
2150
+ _request_auth=_request_auth,
2151
+ _content_type=_content_type,
2152
+ _headers=_headers,
2153
+ _host_index=_host_index
2154
+ )
2155
+
2156
+ _response_types_map: Dict[str, Optional[str]] = {
2157
+ '200': "List[Sandbox]",
2158
+ }
2159
+ response_data = await self.api_client.call_api(
2160
+ *_param,
2161
+ _request_timeout=_request_timeout
2162
+ )
2163
+ await response_data.read()
2164
+ return self.api_client.response_deserialize(
2165
+ response_data=response_data,
2166
+ response_types_map=_response_types_map,
2167
+ )
2168
+
2169
+
2170
+ @validate_call
2171
+ async def list_sandboxes_without_preload_content(
2172
+ self,
2173
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2174
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2175
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2176
+ _request_timeout: Union[
2177
+ None,
2178
+ Annotated[StrictFloat, Field(gt=0)],
2179
+ Tuple[
2180
+ Annotated[StrictFloat, Field(gt=0)],
2181
+ Annotated[StrictFloat, Field(gt=0)]
2182
+ ]
2183
+ ] = None,
2184
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2185
+ _content_type: Optional[StrictStr] = None,
2186
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2187
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2188
+ ) -> RESTResponseType:
2189
+ """List all sandboxes
2190
+
2191
+
2192
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2193
+ :type x_daytona_organization_id: str
2194
+ :param verbose: Include verbose output
2195
+ :type verbose: bool
2196
+ :param labels: JSON encoded labels to filter by
2197
+ :type labels: str
2198
+ :param _request_timeout: timeout setting for this request. If one
2199
+ number provided, it will be total request
2200
+ timeout. It can also be a pair (tuple) of
2201
+ (connection, read) timeouts.
2202
+ :type _request_timeout: int, tuple(int, int), optional
2203
+ :param _request_auth: set to override the auth_settings for an a single
2204
+ request; this effectively ignores the
2205
+ authentication in the spec for a single request.
2206
+ :type _request_auth: dict, optional
2207
+ :param _content_type: force content-type for the request.
2208
+ :type _content_type: str, Optional
2209
+ :param _headers: set to override the headers for a single
2210
+ request; this effectively ignores the headers
2211
+ in the spec for a single request.
2212
+ :type _headers: dict, optional
2213
+ :param _host_index: set to override the host_index for a single
2214
+ request; this effectively ignores the host_index
2215
+ in the spec for a single request.
2216
+ :type _host_index: int, optional
2217
+ :return: Returns the result object.
2218
+ """ # noqa: E501
2219
+
2220
+ _param = self._list_sandboxes_serialize(
2221
+ x_daytona_organization_id=x_daytona_organization_id,
2222
+ verbose=verbose,
2223
+ labels=labels,
2224
+ _request_auth=_request_auth,
2225
+ _content_type=_content_type,
2226
+ _headers=_headers,
2227
+ _host_index=_host_index
2228
+ )
2229
+
2230
+ _response_types_map: Dict[str, Optional[str]] = {
2231
+ '200': "List[Sandbox]",
2232
+ }
2233
+ response_data = await self.api_client.call_api(
2234
+ *_param,
2235
+ _request_timeout=_request_timeout
2236
+ )
2237
+ return response_data.response
2238
+
2239
+
2240
+ def _list_sandboxes_serialize(
2241
+ self,
2242
+ x_daytona_organization_id,
2243
+ verbose,
2244
+ labels,
2245
+ _request_auth,
2246
+ _content_type,
2247
+ _headers,
2248
+ _host_index,
2249
+ ) -> RequestSerialized:
2250
+
2251
+ _host = None
2252
+
2253
+ _collection_formats: Dict[str, str] = {
2254
+ }
2255
+
2256
+ _path_params: Dict[str, str] = {}
2257
+ _query_params: List[Tuple[str, str]] = []
2258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2259
+ _form_params: List[Tuple[str, str]] = []
2260
+ _files: Dict[
2261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2262
+ ] = {}
2263
+ _body_params: Optional[bytes] = None
2264
+
2265
+ # process the path parameters
2266
+ # process the query parameters
2267
+ if verbose is not None:
2268
+
2269
+ _query_params.append(('verbose', verbose))
2270
+
2271
+ if labels is not None:
2272
+
2273
+ _query_params.append(('labels', labels))
2274
+
2275
+ # process the header parameters
2276
+ if x_daytona_organization_id is not None:
2277
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
2278
+ # process the form parameters
2279
+ # process the body parameter
2280
+
2281
+
2282
+ # set the HTTP header `Accept`
2283
+ if 'Accept' not in _header_params:
2284
+ _header_params['Accept'] = self.api_client.select_header_accept(
2285
+ [
2286
+ 'application/json'
2287
+ ]
2288
+ )
2289
+
2290
+
2291
+ # authentication setting
2292
+ _auth_settings: List[str] = [
2293
+ 'bearer',
2294
+ 'oauth2'
2295
+ ]
2296
+
2297
+ return self.api_client.param_serialize(
2298
+ method='GET',
2299
+ resource_path='/sandbox',
2300
+ path_params=_path_params,
2301
+ query_params=_query_params,
2302
+ header_params=_header_params,
2303
+ body=_body_params,
2304
+ post_params=_form_params,
2305
+ files=_files,
2306
+ auth_settings=_auth_settings,
2307
+ collection_formats=_collection_formats,
2308
+ _host=_host,
2309
+ _request_auth=_request_auth
2310
+ )
2311
+
2312
+
2313
+
2314
+
2315
+ @validate_call
2316
+ async def replace_labels(
2317
+ self,
2318
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2319
+ sandbox_labels: SandboxLabels,
2320
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2321
+ _request_timeout: Union[
2322
+ None,
2323
+ Annotated[StrictFloat, Field(gt=0)],
2324
+ Tuple[
2325
+ Annotated[StrictFloat, Field(gt=0)],
2326
+ Annotated[StrictFloat, Field(gt=0)]
2327
+ ]
2328
+ ] = None,
2329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2330
+ _content_type: Optional[StrictStr] = None,
2331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2333
+ ) -> SandboxLabels:
2334
+ """Replace sandbox labels
2335
+
2336
+
2337
+ :param sandbox_id: ID of the sandbox (required)
2338
+ :type sandbox_id: str
2339
+ :param sandbox_labels: (required)
2340
+ :type sandbox_labels: SandboxLabels
2341
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2342
+ :type x_daytona_organization_id: str
2343
+ :param _request_timeout: timeout setting for this request. If one
2344
+ number provided, it will be total request
2345
+ timeout. It can also be a pair (tuple) of
2346
+ (connection, read) timeouts.
2347
+ :type _request_timeout: int, tuple(int, int), optional
2348
+ :param _request_auth: set to override the auth_settings for an a single
2349
+ request; this effectively ignores the
2350
+ authentication in the spec for a single request.
2351
+ :type _request_auth: dict, optional
2352
+ :param _content_type: force content-type for the request.
2353
+ :type _content_type: str, Optional
2354
+ :param _headers: set to override the headers for a single
2355
+ request; this effectively ignores the headers
2356
+ in the spec for a single request.
2357
+ :type _headers: dict, optional
2358
+ :param _host_index: set to override the host_index for a single
2359
+ request; this effectively ignores the host_index
2360
+ in the spec for a single request.
2361
+ :type _host_index: int, optional
2362
+ :return: Returns the result object.
2363
+ """ # noqa: E501
2364
+
2365
+ _param = self._replace_labels_serialize(
2366
+ sandbox_id=sandbox_id,
2367
+ sandbox_labels=sandbox_labels,
2368
+ x_daytona_organization_id=x_daytona_organization_id,
2369
+ _request_auth=_request_auth,
2370
+ _content_type=_content_type,
2371
+ _headers=_headers,
2372
+ _host_index=_host_index
2373
+ )
2374
+
2375
+ _response_types_map: Dict[str, Optional[str]] = {
2376
+ '200': "SandboxLabels",
2377
+ }
2378
+ response_data = await self.api_client.call_api(
2379
+ *_param,
2380
+ _request_timeout=_request_timeout
2381
+ )
2382
+ await response_data.read()
2383
+ return self.api_client.response_deserialize(
2384
+ response_data=response_data,
2385
+ response_types_map=_response_types_map,
2386
+ ).data
2387
+
2388
+
2389
+ @validate_call
2390
+ async def replace_labels_with_http_info(
2391
+ self,
2392
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2393
+ sandbox_labels: SandboxLabels,
2394
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2395
+ _request_timeout: Union[
2396
+ None,
2397
+ Annotated[StrictFloat, Field(gt=0)],
2398
+ Tuple[
2399
+ Annotated[StrictFloat, Field(gt=0)],
2400
+ Annotated[StrictFloat, Field(gt=0)]
2401
+ ]
2402
+ ] = None,
2403
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2404
+ _content_type: Optional[StrictStr] = None,
2405
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2406
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2407
+ ) -> ApiResponse[SandboxLabels]:
2408
+ """Replace sandbox labels
2409
+
2410
+
2411
+ :param sandbox_id: ID of the sandbox (required)
2412
+ :type sandbox_id: str
2413
+ :param sandbox_labels: (required)
2414
+ :type sandbox_labels: SandboxLabels
2415
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2416
+ :type x_daytona_organization_id: str
2417
+ :param _request_timeout: timeout setting for this request. If one
2418
+ number provided, it will be total request
2419
+ timeout. It can also be a pair (tuple) of
2420
+ (connection, read) timeouts.
2421
+ :type _request_timeout: int, tuple(int, int), optional
2422
+ :param _request_auth: set to override the auth_settings for an a single
2423
+ request; this effectively ignores the
2424
+ authentication in the spec for a single request.
2425
+ :type _request_auth: dict, optional
2426
+ :param _content_type: force content-type for the request.
2427
+ :type _content_type: str, Optional
2428
+ :param _headers: set to override the headers for a single
2429
+ request; this effectively ignores the headers
2430
+ in the spec for a single request.
2431
+ :type _headers: dict, optional
2432
+ :param _host_index: set to override the host_index for a single
2433
+ request; this effectively ignores the host_index
2434
+ in the spec for a single request.
2435
+ :type _host_index: int, optional
2436
+ :return: Returns the result object.
2437
+ """ # noqa: E501
2438
+
2439
+ _param = self._replace_labels_serialize(
2440
+ sandbox_id=sandbox_id,
2441
+ sandbox_labels=sandbox_labels,
2442
+ x_daytona_organization_id=x_daytona_organization_id,
2443
+ _request_auth=_request_auth,
2444
+ _content_type=_content_type,
2445
+ _headers=_headers,
2446
+ _host_index=_host_index
2447
+ )
2448
+
2449
+ _response_types_map: Dict[str, Optional[str]] = {
2450
+ '200': "SandboxLabels",
2451
+ }
2452
+ response_data = await self.api_client.call_api(
2453
+ *_param,
2454
+ _request_timeout=_request_timeout
2455
+ )
2456
+ await response_data.read()
2457
+ return self.api_client.response_deserialize(
2458
+ response_data=response_data,
2459
+ response_types_map=_response_types_map,
2460
+ )
2461
+
2462
+
2463
+ @validate_call
2464
+ async def replace_labels_without_preload_content(
2465
+ self,
2466
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2467
+ sandbox_labels: SandboxLabels,
2468
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2469
+ _request_timeout: Union[
2470
+ None,
2471
+ Annotated[StrictFloat, Field(gt=0)],
2472
+ Tuple[
2473
+ Annotated[StrictFloat, Field(gt=0)],
2474
+ Annotated[StrictFloat, Field(gt=0)]
2475
+ ]
2476
+ ] = None,
2477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2478
+ _content_type: Optional[StrictStr] = None,
2479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2481
+ ) -> RESTResponseType:
2482
+ """Replace sandbox labels
2483
+
2484
+
2485
+ :param sandbox_id: ID of the sandbox (required)
2486
+ :type sandbox_id: str
2487
+ :param sandbox_labels: (required)
2488
+ :type sandbox_labels: SandboxLabels
2489
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2490
+ :type x_daytona_organization_id: str
2491
+ :param _request_timeout: timeout setting for this request. If one
2492
+ number provided, it will be total request
2493
+ timeout. It can also be a pair (tuple) of
2494
+ (connection, read) timeouts.
2495
+ :type _request_timeout: int, tuple(int, int), optional
2496
+ :param _request_auth: set to override the auth_settings for an a single
2497
+ request; this effectively ignores the
2498
+ authentication in the spec for a single request.
2499
+ :type _request_auth: dict, optional
2500
+ :param _content_type: force content-type for the request.
2501
+ :type _content_type: str, Optional
2502
+ :param _headers: set to override the headers for a single
2503
+ request; this effectively ignores the headers
2504
+ in the spec for a single request.
2505
+ :type _headers: dict, optional
2506
+ :param _host_index: set to override the host_index for a single
2507
+ request; this effectively ignores the host_index
2508
+ in the spec for a single request.
2509
+ :type _host_index: int, optional
2510
+ :return: Returns the result object.
2511
+ """ # noqa: E501
2512
+
2513
+ _param = self._replace_labels_serialize(
2514
+ sandbox_id=sandbox_id,
2515
+ sandbox_labels=sandbox_labels,
2516
+ x_daytona_organization_id=x_daytona_organization_id,
2517
+ _request_auth=_request_auth,
2518
+ _content_type=_content_type,
2519
+ _headers=_headers,
2520
+ _host_index=_host_index
2521
+ )
2522
+
2523
+ _response_types_map: Dict[str, Optional[str]] = {
2524
+ '200': "SandboxLabels",
2525
+ }
2526
+ response_data = await self.api_client.call_api(
2527
+ *_param,
2528
+ _request_timeout=_request_timeout
2529
+ )
2530
+ return response_data.response
2531
+
2532
+
2533
+ def _replace_labels_serialize(
2534
+ self,
2535
+ sandbox_id,
2536
+ sandbox_labels,
2537
+ x_daytona_organization_id,
2538
+ _request_auth,
2539
+ _content_type,
2540
+ _headers,
2541
+ _host_index,
2542
+ ) -> RequestSerialized:
2543
+
2544
+ _host = None
2545
+
2546
+ _collection_formats: Dict[str, str] = {
2547
+ }
2548
+
2549
+ _path_params: Dict[str, str] = {}
2550
+ _query_params: List[Tuple[str, str]] = []
2551
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2552
+ _form_params: List[Tuple[str, str]] = []
2553
+ _files: Dict[
2554
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2555
+ ] = {}
2556
+ _body_params: Optional[bytes] = None
2557
+
2558
+ # process the path parameters
2559
+ if sandbox_id is not None:
2560
+ _path_params['sandboxId'] = sandbox_id
2561
+ # process the query parameters
2562
+ # process the header parameters
2563
+ if x_daytona_organization_id is not None:
2564
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
2565
+ # process the form parameters
2566
+ # process the body parameter
2567
+ if sandbox_labels is not None:
2568
+ _body_params = sandbox_labels
2569
+
2570
+
2571
+ # set the HTTP header `Accept`
2572
+ if 'Accept' not in _header_params:
2573
+ _header_params['Accept'] = self.api_client.select_header_accept(
2574
+ [
2575
+ 'application/json'
2576
+ ]
2577
+ )
2578
+
2579
+ # set the HTTP header `Content-Type`
2580
+ if _content_type:
2581
+ _header_params['Content-Type'] = _content_type
2582
+ else:
2583
+ _default_content_type = (
2584
+ self.api_client.select_header_content_type(
2585
+ [
2586
+ 'application/json'
2587
+ ]
2588
+ )
2589
+ )
2590
+ if _default_content_type is not None:
2591
+ _header_params['Content-Type'] = _default_content_type
2592
+
2593
+ # authentication setting
2594
+ _auth_settings: List[str] = [
2595
+ 'bearer',
2596
+ 'oauth2'
2597
+ ]
2598
+
2599
+ return self.api_client.param_serialize(
2600
+ method='PUT',
2601
+ resource_path='/sandbox/{sandboxId}/labels',
2602
+ path_params=_path_params,
2603
+ query_params=_query_params,
2604
+ header_params=_header_params,
2605
+ body=_body_params,
2606
+ post_params=_form_params,
2607
+ files=_files,
2608
+ auth_settings=_auth_settings,
2609
+ collection_formats=_collection_formats,
2610
+ _host=_host,
2611
+ _request_auth=_request_auth
2612
+ )
2613
+
2614
+
2615
+
2616
+
2617
+ @validate_call
2618
+ async def set_auto_archive_interval(
2619
+ self,
2620
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2621
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-archive interval in minutes (0 means the maximum interval will be used)")],
2622
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2623
+ _request_timeout: Union[
2624
+ None,
2625
+ Annotated[StrictFloat, Field(gt=0)],
2626
+ Tuple[
2627
+ Annotated[StrictFloat, Field(gt=0)],
2628
+ Annotated[StrictFloat, Field(gt=0)]
2629
+ ]
2630
+ ] = None,
2631
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2632
+ _content_type: Optional[StrictStr] = None,
2633
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2634
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2635
+ ) -> None:
2636
+ """Set sandbox auto-archive interval
2637
+
2638
+
2639
+ :param sandbox_id: ID of the sandbox (required)
2640
+ :type sandbox_id: str
2641
+ :param interval: Auto-archive interval in minutes (0 means the maximum interval will be used) (required)
2642
+ :type interval: float
2643
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2644
+ :type x_daytona_organization_id: str
2645
+ :param _request_timeout: timeout setting for this request. If one
2646
+ number provided, it will be total request
2647
+ timeout. It can also be a pair (tuple) of
2648
+ (connection, read) timeouts.
2649
+ :type _request_timeout: int, tuple(int, int), optional
2650
+ :param _request_auth: set to override the auth_settings for an a single
2651
+ request; this effectively ignores the
2652
+ authentication in the spec for a single request.
2653
+ :type _request_auth: dict, optional
2654
+ :param _content_type: force content-type for the request.
2655
+ :type _content_type: str, Optional
2656
+ :param _headers: set to override the headers for a single
2657
+ request; this effectively ignores the headers
2658
+ in the spec for a single request.
2659
+ :type _headers: dict, optional
2660
+ :param _host_index: set to override the host_index for a single
2661
+ request; this effectively ignores the host_index
2662
+ in the spec for a single request.
2663
+ :type _host_index: int, optional
2664
+ :return: Returns the result object.
2665
+ """ # noqa: E501
2666
+
2667
+ _param = self._set_auto_archive_interval_serialize(
2668
+ sandbox_id=sandbox_id,
2669
+ interval=interval,
2670
+ x_daytona_organization_id=x_daytona_organization_id,
2671
+ _request_auth=_request_auth,
2672
+ _content_type=_content_type,
2673
+ _headers=_headers,
2674
+ _host_index=_host_index
2675
+ )
2676
+
2677
+ _response_types_map: Dict[str, Optional[str]] = {
2678
+ '200': None,
2679
+ }
2680
+ response_data = await self.api_client.call_api(
2681
+ *_param,
2682
+ _request_timeout=_request_timeout
2683
+ )
2684
+ await response_data.read()
2685
+ return self.api_client.response_deserialize(
2686
+ response_data=response_data,
2687
+ response_types_map=_response_types_map,
2688
+ ).data
2689
+
2690
+
2691
+ @validate_call
2692
+ async def set_auto_archive_interval_with_http_info(
2693
+ self,
2694
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2695
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-archive interval in minutes (0 means the maximum interval will be used)")],
2696
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2697
+ _request_timeout: Union[
2698
+ None,
2699
+ Annotated[StrictFloat, Field(gt=0)],
2700
+ Tuple[
2701
+ Annotated[StrictFloat, Field(gt=0)],
2702
+ Annotated[StrictFloat, Field(gt=0)]
2703
+ ]
2704
+ ] = None,
2705
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2706
+ _content_type: Optional[StrictStr] = None,
2707
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2708
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2709
+ ) -> ApiResponse[None]:
2710
+ """Set sandbox auto-archive interval
2711
+
2712
+
2713
+ :param sandbox_id: ID of the sandbox (required)
2714
+ :type sandbox_id: str
2715
+ :param interval: Auto-archive interval in minutes (0 means the maximum interval will be used) (required)
2716
+ :type interval: float
2717
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2718
+ :type x_daytona_organization_id: str
2719
+ :param _request_timeout: timeout setting for this request. If one
2720
+ number provided, it will be total request
2721
+ timeout. It can also be a pair (tuple) of
2722
+ (connection, read) timeouts.
2723
+ :type _request_timeout: int, tuple(int, int), optional
2724
+ :param _request_auth: set to override the auth_settings for an a single
2725
+ request; this effectively ignores the
2726
+ authentication in the spec for a single request.
2727
+ :type _request_auth: dict, optional
2728
+ :param _content_type: force content-type for the request.
2729
+ :type _content_type: str, Optional
2730
+ :param _headers: set to override the headers for a single
2731
+ request; this effectively ignores the headers
2732
+ in the spec for a single request.
2733
+ :type _headers: dict, optional
2734
+ :param _host_index: set to override the host_index for a single
2735
+ request; this effectively ignores the host_index
2736
+ in the spec for a single request.
2737
+ :type _host_index: int, optional
2738
+ :return: Returns the result object.
2739
+ """ # noqa: E501
2740
+
2741
+ _param = self._set_auto_archive_interval_serialize(
2742
+ sandbox_id=sandbox_id,
2743
+ interval=interval,
2744
+ x_daytona_organization_id=x_daytona_organization_id,
2745
+ _request_auth=_request_auth,
2746
+ _content_type=_content_type,
2747
+ _headers=_headers,
2748
+ _host_index=_host_index
2749
+ )
2750
+
2751
+ _response_types_map: Dict[str, Optional[str]] = {
2752
+ '200': None,
2753
+ }
2754
+ response_data = await self.api_client.call_api(
2755
+ *_param,
2756
+ _request_timeout=_request_timeout
2757
+ )
2758
+ await response_data.read()
2759
+ return self.api_client.response_deserialize(
2760
+ response_data=response_data,
2761
+ response_types_map=_response_types_map,
2762
+ )
2763
+
2764
+
2765
+ @validate_call
2766
+ async def set_auto_archive_interval_without_preload_content(
2767
+ self,
2768
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2769
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-archive interval in minutes (0 means the maximum interval will be used)")],
2770
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2771
+ _request_timeout: Union[
2772
+ None,
2773
+ Annotated[StrictFloat, Field(gt=0)],
2774
+ Tuple[
2775
+ Annotated[StrictFloat, Field(gt=0)],
2776
+ Annotated[StrictFloat, Field(gt=0)]
2777
+ ]
2778
+ ] = None,
2779
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2780
+ _content_type: Optional[StrictStr] = None,
2781
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2782
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2783
+ ) -> RESTResponseType:
2784
+ """Set sandbox auto-archive interval
2785
+
2786
+
2787
+ :param sandbox_id: ID of the sandbox (required)
2788
+ :type sandbox_id: str
2789
+ :param interval: Auto-archive interval in minutes (0 means the maximum interval will be used) (required)
2790
+ :type interval: float
2791
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2792
+ :type x_daytona_organization_id: str
2793
+ :param _request_timeout: timeout setting for this request. If one
2794
+ number provided, it will be total request
2795
+ timeout. It can also be a pair (tuple) of
2796
+ (connection, read) timeouts.
2797
+ :type _request_timeout: int, tuple(int, int), optional
2798
+ :param _request_auth: set to override the auth_settings for an a single
2799
+ request; this effectively ignores the
2800
+ authentication in the spec for a single request.
2801
+ :type _request_auth: dict, optional
2802
+ :param _content_type: force content-type for the request.
2803
+ :type _content_type: str, Optional
2804
+ :param _headers: set to override the headers for a single
2805
+ request; this effectively ignores the headers
2806
+ in the spec for a single request.
2807
+ :type _headers: dict, optional
2808
+ :param _host_index: set to override the host_index for a single
2809
+ request; this effectively ignores the host_index
2810
+ in the spec for a single request.
2811
+ :type _host_index: int, optional
2812
+ :return: Returns the result object.
2813
+ """ # noqa: E501
2814
+
2815
+ _param = self._set_auto_archive_interval_serialize(
2816
+ sandbox_id=sandbox_id,
2817
+ interval=interval,
2818
+ x_daytona_organization_id=x_daytona_organization_id,
2819
+ _request_auth=_request_auth,
2820
+ _content_type=_content_type,
2821
+ _headers=_headers,
2822
+ _host_index=_host_index
2823
+ )
2824
+
2825
+ _response_types_map: Dict[str, Optional[str]] = {
2826
+ '200': None,
2827
+ }
2828
+ response_data = await self.api_client.call_api(
2829
+ *_param,
2830
+ _request_timeout=_request_timeout
2831
+ )
2832
+ return response_data.response
2833
+
2834
+
2835
+ def _set_auto_archive_interval_serialize(
2836
+ self,
2837
+ sandbox_id,
2838
+ interval,
2839
+ x_daytona_organization_id,
2840
+ _request_auth,
2841
+ _content_type,
2842
+ _headers,
2843
+ _host_index,
2844
+ ) -> RequestSerialized:
2845
+
2846
+ _host = None
2847
+
2848
+ _collection_formats: Dict[str, str] = {
2849
+ }
2850
+
2851
+ _path_params: Dict[str, str] = {}
2852
+ _query_params: List[Tuple[str, str]] = []
2853
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2854
+ _form_params: List[Tuple[str, str]] = []
2855
+ _files: Dict[
2856
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2857
+ ] = {}
2858
+ _body_params: Optional[bytes] = None
2859
+
2860
+ # process the path parameters
2861
+ if sandbox_id is not None:
2862
+ _path_params['sandboxId'] = sandbox_id
2863
+ if interval is not None:
2864
+ _path_params['interval'] = interval
2865
+ # process the query parameters
2866
+ # process the header parameters
2867
+ if x_daytona_organization_id is not None:
2868
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
2869
+ # process the form parameters
2870
+ # process the body parameter
2871
+
2872
+
2873
+
2874
+
2875
+ # authentication setting
2876
+ _auth_settings: List[str] = [
2877
+ 'bearer',
2878
+ 'oauth2'
2879
+ ]
2880
+
2881
+ return self.api_client.param_serialize(
2882
+ method='POST',
2883
+ resource_path='/sandbox/{sandboxId}/autoarchive/{interval}',
2884
+ path_params=_path_params,
2885
+ query_params=_query_params,
2886
+ header_params=_header_params,
2887
+ body=_body_params,
2888
+ post_params=_form_params,
2889
+ files=_files,
2890
+ auth_settings=_auth_settings,
2891
+ collection_formats=_collection_formats,
2892
+ _host=_host,
2893
+ _request_auth=_request_auth
2894
+ )
2895
+
2896
+
2897
+
2898
+
2899
+ @validate_call
2900
+ async def set_autostop_interval(
2901
+ self,
2902
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2903
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-stop interval in minutes (0 to disable)")],
2904
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2905
+ _request_timeout: Union[
2906
+ None,
2907
+ Annotated[StrictFloat, Field(gt=0)],
2908
+ Tuple[
2909
+ Annotated[StrictFloat, Field(gt=0)],
2910
+ Annotated[StrictFloat, Field(gt=0)]
2911
+ ]
2912
+ ] = None,
2913
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2914
+ _content_type: Optional[StrictStr] = None,
2915
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2916
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2917
+ ) -> None:
2918
+ """Set sandbox auto-stop interval
2919
+
2920
+
2921
+ :param sandbox_id: ID of the sandbox (required)
2922
+ :type sandbox_id: str
2923
+ :param interval: Auto-stop interval in minutes (0 to disable) (required)
2924
+ :type interval: float
2925
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2926
+ :type x_daytona_organization_id: str
2927
+ :param _request_timeout: timeout setting for this request. If one
2928
+ number provided, it will be total request
2929
+ timeout. It can also be a pair (tuple) of
2930
+ (connection, read) timeouts.
2931
+ :type _request_timeout: int, tuple(int, int), optional
2932
+ :param _request_auth: set to override the auth_settings for an a single
2933
+ request; this effectively ignores the
2934
+ authentication in the spec for a single request.
2935
+ :type _request_auth: dict, optional
2936
+ :param _content_type: force content-type for the request.
2937
+ :type _content_type: str, Optional
2938
+ :param _headers: set to override the headers for a single
2939
+ request; this effectively ignores the headers
2940
+ in the spec for a single request.
2941
+ :type _headers: dict, optional
2942
+ :param _host_index: set to override the host_index for a single
2943
+ request; this effectively ignores the host_index
2944
+ in the spec for a single request.
2945
+ :type _host_index: int, optional
2946
+ :return: Returns the result object.
2947
+ """ # noqa: E501
2948
+
2949
+ _param = self._set_autostop_interval_serialize(
2950
+ sandbox_id=sandbox_id,
2951
+ interval=interval,
2952
+ x_daytona_organization_id=x_daytona_organization_id,
2953
+ _request_auth=_request_auth,
2954
+ _content_type=_content_type,
2955
+ _headers=_headers,
2956
+ _host_index=_host_index
2957
+ )
2958
+
2959
+ _response_types_map: Dict[str, Optional[str]] = {
2960
+ '200': None,
2961
+ }
2962
+ response_data = await self.api_client.call_api(
2963
+ *_param,
2964
+ _request_timeout=_request_timeout
2965
+ )
2966
+ await response_data.read()
2967
+ return self.api_client.response_deserialize(
2968
+ response_data=response_data,
2969
+ response_types_map=_response_types_map,
2970
+ ).data
2971
+
2972
+
2973
+ @validate_call
2974
+ async def set_autostop_interval_with_http_info(
2975
+ self,
2976
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2977
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-stop interval in minutes (0 to disable)")],
2978
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2979
+ _request_timeout: Union[
2980
+ None,
2981
+ Annotated[StrictFloat, Field(gt=0)],
2982
+ Tuple[
2983
+ Annotated[StrictFloat, Field(gt=0)],
2984
+ Annotated[StrictFloat, Field(gt=0)]
2985
+ ]
2986
+ ] = None,
2987
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2988
+ _content_type: Optional[StrictStr] = None,
2989
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2990
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2991
+ ) -> ApiResponse[None]:
2992
+ """Set sandbox auto-stop interval
2993
+
2994
+
2995
+ :param sandbox_id: ID of the sandbox (required)
2996
+ :type sandbox_id: str
2997
+ :param interval: Auto-stop interval in minutes (0 to disable) (required)
2998
+ :type interval: float
2999
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3000
+ :type x_daytona_organization_id: str
3001
+ :param _request_timeout: timeout setting for this request. If one
3002
+ number provided, it will be total request
3003
+ timeout. It can also be a pair (tuple) of
3004
+ (connection, read) timeouts.
3005
+ :type _request_timeout: int, tuple(int, int), optional
3006
+ :param _request_auth: set to override the auth_settings for an a single
3007
+ request; this effectively ignores the
3008
+ authentication in the spec for a single request.
3009
+ :type _request_auth: dict, optional
3010
+ :param _content_type: force content-type for the request.
3011
+ :type _content_type: str, Optional
3012
+ :param _headers: set to override the headers for a single
3013
+ request; this effectively ignores the headers
3014
+ in the spec for a single request.
3015
+ :type _headers: dict, optional
3016
+ :param _host_index: set to override the host_index for a single
3017
+ request; this effectively ignores the host_index
3018
+ in the spec for a single request.
3019
+ :type _host_index: int, optional
3020
+ :return: Returns the result object.
3021
+ """ # noqa: E501
3022
+
3023
+ _param = self._set_autostop_interval_serialize(
3024
+ sandbox_id=sandbox_id,
3025
+ interval=interval,
3026
+ x_daytona_organization_id=x_daytona_organization_id,
3027
+ _request_auth=_request_auth,
3028
+ _content_type=_content_type,
3029
+ _headers=_headers,
3030
+ _host_index=_host_index
3031
+ )
3032
+
3033
+ _response_types_map: Dict[str, Optional[str]] = {
3034
+ '200': None,
3035
+ }
3036
+ response_data = await self.api_client.call_api(
3037
+ *_param,
3038
+ _request_timeout=_request_timeout
3039
+ )
3040
+ await response_data.read()
3041
+ return self.api_client.response_deserialize(
3042
+ response_data=response_data,
3043
+ response_types_map=_response_types_map,
3044
+ )
3045
+
3046
+
3047
+ @validate_call
3048
+ async def set_autostop_interval_without_preload_content(
3049
+ self,
3050
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3051
+ interval: Annotated[Union[StrictFloat, StrictInt], Field(description="Auto-stop interval in minutes (0 to disable)")],
3052
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3053
+ _request_timeout: Union[
3054
+ None,
3055
+ Annotated[StrictFloat, Field(gt=0)],
3056
+ Tuple[
3057
+ Annotated[StrictFloat, Field(gt=0)],
3058
+ Annotated[StrictFloat, Field(gt=0)]
3059
+ ]
3060
+ ] = None,
3061
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3062
+ _content_type: Optional[StrictStr] = None,
3063
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3064
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3065
+ ) -> RESTResponseType:
3066
+ """Set sandbox auto-stop interval
3067
+
3068
+
3069
+ :param sandbox_id: ID of the sandbox (required)
3070
+ :type sandbox_id: str
3071
+ :param interval: Auto-stop interval in minutes (0 to disable) (required)
3072
+ :type interval: float
3073
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3074
+ :type x_daytona_organization_id: str
3075
+ :param _request_timeout: timeout setting for this request. If one
3076
+ number provided, it will be total request
3077
+ timeout. It can also be a pair (tuple) of
3078
+ (connection, read) timeouts.
3079
+ :type _request_timeout: int, tuple(int, int), optional
3080
+ :param _request_auth: set to override the auth_settings for an a single
3081
+ request; this effectively ignores the
3082
+ authentication in the spec for a single request.
3083
+ :type _request_auth: dict, optional
3084
+ :param _content_type: force content-type for the request.
3085
+ :type _content_type: str, Optional
3086
+ :param _headers: set to override the headers for a single
3087
+ request; this effectively ignores the headers
3088
+ in the spec for a single request.
3089
+ :type _headers: dict, optional
3090
+ :param _host_index: set to override the host_index for a single
3091
+ request; this effectively ignores the host_index
3092
+ in the spec for a single request.
3093
+ :type _host_index: int, optional
3094
+ :return: Returns the result object.
3095
+ """ # noqa: E501
3096
+
3097
+ _param = self._set_autostop_interval_serialize(
3098
+ sandbox_id=sandbox_id,
3099
+ interval=interval,
3100
+ x_daytona_organization_id=x_daytona_organization_id,
3101
+ _request_auth=_request_auth,
3102
+ _content_type=_content_type,
3103
+ _headers=_headers,
3104
+ _host_index=_host_index
3105
+ )
3106
+
3107
+ _response_types_map: Dict[str, Optional[str]] = {
3108
+ '200': None,
3109
+ }
3110
+ response_data = await self.api_client.call_api(
3111
+ *_param,
3112
+ _request_timeout=_request_timeout
3113
+ )
3114
+ return response_data.response
3115
+
3116
+
3117
+ def _set_autostop_interval_serialize(
3118
+ self,
3119
+ sandbox_id,
3120
+ interval,
3121
+ x_daytona_organization_id,
3122
+ _request_auth,
3123
+ _content_type,
3124
+ _headers,
3125
+ _host_index,
3126
+ ) -> RequestSerialized:
3127
+
3128
+ _host = None
3129
+
3130
+ _collection_formats: Dict[str, str] = {
3131
+ }
3132
+
3133
+ _path_params: Dict[str, str] = {}
3134
+ _query_params: List[Tuple[str, str]] = []
3135
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3136
+ _form_params: List[Tuple[str, str]] = []
3137
+ _files: Dict[
3138
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3139
+ ] = {}
3140
+ _body_params: Optional[bytes] = None
3141
+
3142
+ # process the path parameters
3143
+ if sandbox_id is not None:
3144
+ _path_params['sandboxId'] = sandbox_id
3145
+ if interval is not None:
3146
+ _path_params['interval'] = interval
3147
+ # process the query parameters
3148
+ # process the header parameters
3149
+ if x_daytona_organization_id is not None:
3150
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3151
+ # process the form parameters
3152
+ # process the body parameter
3153
+
3154
+
3155
+
3156
+
3157
+ # authentication setting
3158
+ _auth_settings: List[str] = [
3159
+ 'bearer',
3160
+ 'oauth2'
3161
+ ]
3162
+
3163
+ return self.api_client.param_serialize(
3164
+ method='POST',
3165
+ resource_path='/sandbox/{sandboxId}/autostop/{interval}',
3166
+ path_params=_path_params,
3167
+ query_params=_query_params,
3168
+ header_params=_header_params,
3169
+ body=_body_params,
3170
+ post_params=_form_params,
3171
+ files=_files,
3172
+ auth_settings=_auth_settings,
3173
+ collection_formats=_collection_formats,
3174
+ _host=_host,
3175
+ _request_auth=_request_auth
3176
+ )
3177
+
3178
+
3179
+
3180
+
3181
+ @validate_call
3182
+ async def start_sandbox(
3183
+ self,
3184
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3185
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3186
+ _request_timeout: Union[
3187
+ None,
3188
+ Annotated[StrictFloat, Field(gt=0)],
3189
+ Tuple[
3190
+ Annotated[StrictFloat, Field(gt=0)],
3191
+ Annotated[StrictFloat, Field(gt=0)]
3192
+ ]
3193
+ ] = None,
3194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3195
+ _content_type: Optional[StrictStr] = None,
3196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3198
+ ) -> None:
3199
+ """Start sandbox
3200
+
3201
+
3202
+ :param sandbox_id: ID of the sandbox (required)
3203
+ :type sandbox_id: str
3204
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3205
+ :type x_daytona_organization_id: str
3206
+ :param _request_timeout: timeout setting for this request. If one
3207
+ number provided, it will be total request
3208
+ timeout. It can also be a pair (tuple) of
3209
+ (connection, read) timeouts.
3210
+ :type _request_timeout: int, tuple(int, int), optional
3211
+ :param _request_auth: set to override the auth_settings for an a single
3212
+ request; this effectively ignores the
3213
+ authentication in the spec for a single request.
3214
+ :type _request_auth: dict, optional
3215
+ :param _content_type: force content-type for the request.
3216
+ :type _content_type: str, Optional
3217
+ :param _headers: set to override the headers for a single
3218
+ request; this effectively ignores the headers
3219
+ in the spec for a single request.
3220
+ :type _headers: dict, optional
3221
+ :param _host_index: set to override the host_index for a single
3222
+ request; this effectively ignores the host_index
3223
+ in the spec for a single request.
3224
+ :type _host_index: int, optional
3225
+ :return: Returns the result object.
3226
+ """ # noqa: E501
3227
+
3228
+ _param = self._start_sandbox_serialize(
3229
+ sandbox_id=sandbox_id,
3230
+ x_daytona_organization_id=x_daytona_organization_id,
3231
+ _request_auth=_request_auth,
3232
+ _content_type=_content_type,
3233
+ _headers=_headers,
3234
+ _host_index=_host_index
3235
+ )
3236
+
3237
+ _response_types_map: Dict[str, Optional[str]] = {
3238
+ '200': None,
3239
+ }
3240
+ response_data = await self.api_client.call_api(
3241
+ *_param,
3242
+ _request_timeout=_request_timeout
3243
+ )
3244
+ await response_data.read()
3245
+ return self.api_client.response_deserialize(
3246
+ response_data=response_data,
3247
+ response_types_map=_response_types_map,
3248
+ ).data
3249
+
3250
+
3251
+ @validate_call
3252
+ async def start_sandbox_with_http_info(
3253
+ self,
3254
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3255
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3256
+ _request_timeout: Union[
3257
+ None,
3258
+ Annotated[StrictFloat, Field(gt=0)],
3259
+ Tuple[
3260
+ Annotated[StrictFloat, Field(gt=0)],
3261
+ Annotated[StrictFloat, Field(gt=0)]
3262
+ ]
3263
+ ] = None,
3264
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3265
+ _content_type: Optional[StrictStr] = None,
3266
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3267
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3268
+ ) -> ApiResponse[None]:
3269
+ """Start sandbox
3270
+
3271
+
3272
+ :param sandbox_id: ID of the sandbox (required)
3273
+ :type sandbox_id: str
3274
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3275
+ :type x_daytona_organization_id: str
3276
+ :param _request_timeout: timeout setting for this request. If one
3277
+ number provided, it will be total request
3278
+ timeout. It can also be a pair (tuple) of
3279
+ (connection, read) timeouts.
3280
+ :type _request_timeout: int, tuple(int, int), optional
3281
+ :param _request_auth: set to override the auth_settings for an a single
3282
+ request; this effectively ignores the
3283
+ authentication in the spec for a single request.
3284
+ :type _request_auth: dict, optional
3285
+ :param _content_type: force content-type for the request.
3286
+ :type _content_type: str, Optional
3287
+ :param _headers: set to override the headers for a single
3288
+ request; this effectively ignores the headers
3289
+ in the spec for a single request.
3290
+ :type _headers: dict, optional
3291
+ :param _host_index: set to override the host_index for a single
3292
+ request; this effectively ignores the host_index
3293
+ in the spec for a single request.
3294
+ :type _host_index: int, optional
3295
+ :return: Returns the result object.
3296
+ """ # noqa: E501
3297
+
3298
+ _param = self._start_sandbox_serialize(
3299
+ sandbox_id=sandbox_id,
3300
+ x_daytona_organization_id=x_daytona_organization_id,
3301
+ _request_auth=_request_auth,
3302
+ _content_type=_content_type,
3303
+ _headers=_headers,
3304
+ _host_index=_host_index
3305
+ )
3306
+
3307
+ _response_types_map: Dict[str, Optional[str]] = {
3308
+ '200': None,
3309
+ }
3310
+ response_data = await self.api_client.call_api(
3311
+ *_param,
3312
+ _request_timeout=_request_timeout
3313
+ )
3314
+ await response_data.read()
3315
+ return self.api_client.response_deserialize(
3316
+ response_data=response_data,
3317
+ response_types_map=_response_types_map,
3318
+ )
3319
+
3320
+
3321
+ @validate_call
3322
+ async def start_sandbox_without_preload_content(
3323
+ self,
3324
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3325
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3326
+ _request_timeout: Union[
3327
+ None,
3328
+ Annotated[StrictFloat, Field(gt=0)],
3329
+ Tuple[
3330
+ Annotated[StrictFloat, Field(gt=0)],
3331
+ Annotated[StrictFloat, Field(gt=0)]
3332
+ ]
3333
+ ] = None,
3334
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3335
+ _content_type: Optional[StrictStr] = None,
3336
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3337
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3338
+ ) -> RESTResponseType:
3339
+ """Start sandbox
3340
+
3341
+
3342
+ :param sandbox_id: ID of the sandbox (required)
3343
+ :type sandbox_id: str
3344
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3345
+ :type x_daytona_organization_id: str
3346
+ :param _request_timeout: timeout setting for this request. If one
3347
+ number provided, it will be total request
3348
+ timeout. It can also be a pair (tuple) of
3349
+ (connection, read) timeouts.
3350
+ :type _request_timeout: int, tuple(int, int), optional
3351
+ :param _request_auth: set to override the auth_settings for an a single
3352
+ request; this effectively ignores the
3353
+ authentication in the spec for a single request.
3354
+ :type _request_auth: dict, optional
3355
+ :param _content_type: force content-type for the request.
3356
+ :type _content_type: str, Optional
3357
+ :param _headers: set to override the headers for a single
3358
+ request; this effectively ignores the headers
3359
+ in the spec for a single request.
3360
+ :type _headers: dict, optional
3361
+ :param _host_index: set to override the host_index for a single
3362
+ request; this effectively ignores the host_index
3363
+ in the spec for a single request.
3364
+ :type _host_index: int, optional
3365
+ :return: Returns the result object.
3366
+ """ # noqa: E501
3367
+
3368
+ _param = self._start_sandbox_serialize(
3369
+ sandbox_id=sandbox_id,
3370
+ x_daytona_organization_id=x_daytona_organization_id,
3371
+ _request_auth=_request_auth,
3372
+ _content_type=_content_type,
3373
+ _headers=_headers,
3374
+ _host_index=_host_index
3375
+ )
3376
+
3377
+ _response_types_map: Dict[str, Optional[str]] = {
3378
+ '200': None,
3379
+ }
3380
+ response_data = await self.api_client.call_api(
3381
+ *_param,
3382
+ _request_timeout=_request_timeout
3383
+ )
3384
+ return response_data.response
3385
+
3386
+
3387
+ def _start_sandbox_serialize(
3388
+ self,
3389
+ sandbox_id,
3390
+ x_daytona_organization_id,
3391
+ _request_auth,
3392
+ _content_type,
3393
+ _headers,
3394
+ _host_index,
3395
+ ) -> RequestSerialized:
3396
+
3397
+ _host = None
3398
+
3399
+ _collection_formats: Dict[str, str] = {
3400
+ }
3401
+
3402
+ _path_params: Dict[str, str] = {}
3403
+ _query_params: List[Tuple[str, str]] = []
3404
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3405
+ _form_params: List[Tuple[str, str]] = []
3406
+ _files: Dict[
3407
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3408
+ ] = {}
3409
+ _body_params: Optional[bytes] = None
3410
+
3411
+ # process the path parameters
3412
+ if sandbox_id is not None:
3413
+ _path_params['sandboxId'] = sandbox_id
3414
+ # process the query parameters
3415
+ # process the header parameters
3416
+ if x_daytona_organization_id is not None:
3417
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3418
+ # process the form parameters
3419
+ # process the body parameter
3420
+
3421
+
3422
+
3423
+
3424
+ # authentication setting
3425
+ _auth_settings: List[str] = [
3426
+ 'bearer',
3427
+ 'oauth2'
3428
+ ]
3429
+
3430
+ return self.api_client.param_serialize(
3431
+ method='POST',
3432
+ resource_path='/sandbox/{sandboxId}/start',
3433
+ path_params=_path_params,
3434
+ query_params=_query_params,
3435
+ header_params=_header_params,
3436
+ body=_body_params,
3437
+ post_params=_form_params,
3438
+ files=_files,
3439
+ auth_settings=_auth_settings,
3440
+ collection_formats=_collection_formats,
3441
+ _host=_host,
3442
+ _request_auth=_request_auth
3443
+ )
3444
+
3445
+
3446
+
3447
+
3448
+ @validate_call
3449
+ async def stop_sandbox(
3450
+ self,
3451
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3452
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3453
+ _request_timeout: Union[
3454
+ None,
3455
+ Annotated[StrictFloat, Field(gt=0)],
3456
+ Tuple[
3457
+ Annotated[StrictFloat, Field(gt=0)],
3458
+ Annotated[StrictFloat, Field(gt=0)]
3459
+ ]
3460
+ ] = None,
3461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3462
+ _content_type: Optional[StrictStr] = None,
3463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3465
+ ) -> None:
3466
+ """Stop sandbox
3467
+
3468
+
3469
+ :param sandbox_id: ID of the sandbox (required)
3470
+ :type sandbox_id: str
3471
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3472
+ :type x_daytona_organization_id: str
3473
+ :param _request_timeout: timeout setting for this request. If one
3474
+ number provided, it will be total request
3475
+ timeout. It can also be a pair (tuple) of
3476
+ (connection, read) timeouts.
3477
+ :type _request_timeout: int, tuple(int, int), optional
3478
+ :param _request_auth: set to override the auth_settings for an a single
3479
+ request; this effectively ignores the
3480
+ authentication in the spec for a single request.
3481
+ :type _request_auth: dict, optional
3482
+ :param _content_type: force content-type for the request.
3483
+ :type _content_type: str, Optional
3484
+ :param _headers: set to override the headers for a single
3485
+ request; this effectively ignores the headers
3486
+ in the spec for a single request.
3487
+ :type _headers: dict, optional
3488
+ :param _host_index: set to override the host_index for a single
3489
+ request; this effectively ignores the host_index
3490
+ in the spec for a single request.
3491
+ :type _host_index: int, optional
3492
+ :return: Returns the result object.
3493
+ """ # noqa: E501
3494
+
3495
+ _param = self._stop_sandbox_serialize(
3496
+ sandbox_id=sandbox_id,
3497
+ x_daytona_organization_id=x_daytona_organization_id,
3498
+ _request_auth=_request_auth,
3499
+ _content_type=_content_type,
3500
+ _headers=_headers,
3501
+ _host_index=_host_index
3502
+ )
3503
+
3504
+ _response_types_map: Dict[str, Optional[str]] = {
3505
+ '200': None,
3506
+ }
3507
+ response_data = await self.api_client.call_api(
3508
+ *_param,
3509
+ _request_timeout=_request_timeout
3510
+ )
3511
+ await response_data.read()
3512
+ return self.api_client.response_deserialize(
3513
+ response_data=response_data,
3514
+ response_types_map=_response_types_map,
3515
+ ).data
3516
+
3517
+
3518
+ @validate_call
3519
+ async def stop_sandbox_with_http_info(
3520
+ self,
3521
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3522
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3523
+ _request_timeout: Union[
3524
+ None,
3525
+ Annotated[StrictFloat, Field(gt=0)],
3526
+ Tuple[
3527
+ Annotated[StrictFloat, Field(gt=0)],
3528
+ Annotated[StrictFloat, Field(gt=0)]
3529
+ ]
3530
+ ] = None,
3531
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3532
+ _content_type: Optional[StrictStr] = None,
3533
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3534
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3535
+ ) -> ApiResponse[None]:
3536
+ """Stop sandbox
3537
+
3538
+
3539
+ :param sandbox_id: ID of the sandbox (required)
3540
+ :type sandbox_id: str
3541
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3542
+ :type x_daytona_organization_id: str
3543
+ :param _request_timeout: timeout setting for this request. If one
3544
+ number provided, it will be total request
3545
+ timeout. It can also be a pair (tuple) of
3546
+ (connection, read) timeouts.
3547
+ :type _request_timeout: int, tuple(int, int), optional
3548
+ :param _request_auth: set to override the auth_settings for an a single
3549
+ request; this effectively ignores the
3550
+ authentication in the spec for a single request.
3551
+ :type _request_auth: dict, optional
3552
+ :param _content_type: force content-type for the request.
3553
+ :type _content_type: str, Optional
3554
+ :param _headers: set to override the headers for a single
3555
+ request; this effectively ignores the headers
3556
+ in the spec for a single request.
3557
+ :type _headers: dict, optional
3558
+ :param _host_index: set to override the host_index for a single
3559
+ request; this effectively ignores the host_index
3560
+ in the spec for a single request.
3561
+ :type _host_index: int, optional
3562
+ :return: Returns the result object.
3563
+ """ # noqa: E501
3564
+
3565
+ _param = self._stop_sandbox_serialize(
3566
+ sandbox_id=sandbox_id,
3567
+ x_daytona_organization_id=x_daytona_organization_id,
3568
+ _request_auth=_request_auth,
3569
+ _content_type=_content_type,
3570
+ _headers=_headers,
3571
+ _host_index=_host_index
3572
+ )
3573
+
3574
+ _response_types_map: Dict[str, Optional[str]] = {
3575
+ '200': None,
3576
+ }
3577
+ response_data = await self.api_client.call_api(
3578
+ *_param,
3579
+ _request_timeout=_request_timeout
3580
+ )
3581
+ await response_data.read()
3582
+ return self.api_client.response_deserialize(
3583
+ response_data=response_data,
3584
+ response_types_map=_response_types_map,
3585
+ )
3586
+
3587
+
3588
+ @validate_call
3589
+ async def stop_sandbox_without_preload_content(
3590
+ self,
3591
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3592
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3593
+ _request_timeout: Union[
3594
+ None,
3595
+ Annotated[StrictFloat, Field(gt=0)],
3596
+ Tuple[
3597
+ Annotated[StrictFloat, Field(gt=0)],
3598
+ Annotated[StrictFloat, Field(gt=0)]
3599
+ ]
3600
+ ] = None,
3601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3602
+ _content_type: Optional[StrictStr] = None,
3603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3605
+ ) -> RESTResponseType:
3606
+ """Stop sandbox
3607
+
3608
+
3609
+ :param sandbox_id: ID of the sandbox (required)
3610
+ :type sandbox_id: str
3611
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3612
+ :type x_daytona_organization_id: str
3613
+ :param _request_timeout: timeout setting for this request. If one
3614
+ number provided, it will be total request
3615
+ timeout. It can also be a pair (tuple) of
3616
+ (connection, read) timeouts.
3617
+ :type _request_timeout: int, tuple(int, int), optional
3618
+ :param _request_auth: set to override the auth_settings for an a single
3619
+ request; this effectively ignores the
3620
+ authentication in the spec for a single request.
3621
+ :type _request_auth: dict, optional
3622
+ :param _content_type: force content-type for the request.
3623
+ :type _content_type: str, Optional
3624
+ :param _headers: set to override the headers for a single
3625
+ request; this effectively ignores the headers
3626
+ in the spec for a single request.
3627
+ :type _headers: dict, optional
3628
+ :param _host_index: set to override the host_index for a single
3629
+ request; this effectively ignores the host_index
3630
+ in the spec for a single request.
3631
+ :type _host_index: int, optional
3632
+ :return: Returns the result object.
3633
+ """ # noqa: E501
3634
+
3635
+ _param = self._stop_sandbox_serialize(
3636
+ sandbox_id=sandbox_id,
3637
+ x_daytona_organization_id=x_daytona_organization_id,
3638
+ _request_auth=_request_auth,
3639
+ _content_type=_content_type,
3640
+ _headers=_headers,
3641
+ _host_index=_host_index
3642
+ )
3643
+
3644
+ _response_types_map: Dict[str, Optional[str]] = {
3645
+ '200': None,
3646
+ }
3647
+ response_data = await self.api_client.call_api(
3648
+ *_param,
3649
+ _request_timeout=_request_timeout
3650
+ )
3651
+ return response_data.response
3652
+
3653
+
3654
+ def _stop_sandbox_serialize(
3655
+ self,
3656
+ sandbox_id,
3657
+ x_daytona_organization_id,
3658
+ _request_auth,
3659
+ _content_type,
3660
+ _headers,
3661
+ _host_index,
3662
+ ) -> RequestSerialized:
3663
+
3664
+ _host = None
3665
+
3666
+ _collection_formats: Dict[str, str] = {
3667
+ }
3668
+
3669
+ _path_params: Dict[str, str] = {}
3670
+ _query_params: List[Tuple[str, str]] = []
3671
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3672
+ _form_params: List[Tuple[str, str]] = []
3673
+ _files: Dict[
3674
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3675
+ ] = {}
3676
+ _body_params: Optional[bytes] = None
3677
+
3678
+ # process the path parameters
3679
+ if sandbox_id is not None:
3680
+ _path_params['sandboxId'] = sandbox_id
3681
+ # process the query parameters
3682
+ # process the header parameters
3683
+ if x_daytona_organization_id is not None:
3684
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3685
+ # process the form parameters
3686
+ # process the body parameter
3687
+
3688
+
3689
+
3690
+
3691
+ # authentication setting
3692
+ _auth_settings: List[str] = [
3693
+ 'bearer',
3694
+ 'oauth2'
3695
+ ]
3696
+
3697
+ return self.api_client.param_serialize(
3698
+ method='POST',
3699
+ resource_path='/sandbox/{sandboxId}/stop',
3700
+ path_params=_path_params,
3701
+ query_params=_query_params,
3702
+ header_params=_header_params,
3703
+ body=_body_params,
3704
+ post_params=_form_params,
3705
+ files=_files,
3706
+ auth_settings=_auth_settings,
3707
+ collection_formats=_collection_formats,
3708
+ _host=_host,
3709
+ _request_auth=_request_auth
3710
+ )
3711
+
3712
+
3713
+
3714
+
3715
+ @validate_call
3716
+ async def update_public_status(
3717
+ self,
3718
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3719
+ is_public: Annotated[StrictBool, Field(description="Public status to set")],
3720
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3721
+ _request_timeout: Union[
3722
+ None,
3723
+ Annotated[StrictFloat, Field(gt=0)],
3724
+ Tuple[
3725
+ Annotated[StrictFloat, Field(gt=0)],
3726
+ Annotated[StrictFloat, Field(gt=0)]
3727
+ ]
3728
+ ] = None,
3729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3730
+ _content_type: Optional[StrictStr] = None,
3731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3733
+ ) -> None:
3734
+ """Update public status
3735
+
3736
+
3737
+ :param sandbox_id: ID of the sandbox (required)
3738
+ :type sandbox_id: str
3739
+ :param is_public: Public status to set (required)
3740
+ :type is_public: bool
3741
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3742
+ :type x_daytona_organization_id: str
3743
+ :param _request_timeout: timeout setting for this request. If one
3744
+ number provided, it will be total request
3745
+ timeout. It can also be a pair (tuple) of
3746
+ (connection, read) timeouts.
3747
+ :type _request_timeout: int, tuple(int, int), optional
3748
+ :param _request_auth: set to override the auth_settings for an a single
3749
+ request; this effectively ignores the
3750
+ authentication in the spec for a single request.
3751
+ :type _request_auth: dict, optional
3752
+ :param _content_type: force content-type for the request.
3753
+ :type _content_type: str, Optional
3754
+ :param _headers: set to override the headers for a single
3755
+ request; this effectively ignores the headers
3756
+ in the spec for a single request.
3757
+ :type _headers: dict, optional
3758
+ :param _host_index: set to override the host_index for a single
3759
+ request; this effectively ignores the host_index
3760
+ in the spec for a single request.
3761
+ :type _host_index: int, optional
3762
+ :return: Returns the result object.
3763
+ """ # noqa: E501
3764
+
3765
+ _param = self._update_public_status_serialize(
3766
+ sandbox_id=sandbox_id,
3767
+ is_public=is_public,
3768
+ x_daytona_organization_id=x_daytona_organization_id,
3769
+ _request_auth=_request_auth,
3770
+ _content_type=_content_type,
3771
+ _headers=_headers,
3772
+ _host_index=_host_index
3773
+ )
3774
+
3775
+ _response_types_map: Dict[str, Optional[str]] = {
3776
+ '201': None,
3777
+ }
3778
+ response_data = await self.api_client.call_api(
3779
+ *_param,
3780
+ _request_timeout=_request_timeout
3781
+ )
3782
+ await response_data.read()
3783
+ return self.api_client.response_deserialize(
3784
+ response_data=response_data,
3785
+ response_types_map=_response_types_map,
3786
+ ).data
3787
+
3788
+
3789
+ @validate_call
3790
+ async def update_public_status_with_http_info(
3791
+ self,
3792
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3793
+ is_public: Annotated[StrictBool, Field(description="Public status to set")],
3794
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3795
+ _request_timeout: Union[
3796
+ None,
3797
+ Annotated[StrictFloat, Field(gt=0)],
3798
+ Tuple[
3799
+ Annotated[StrictFloat, Field(gt=0)],
3800
+ Annotated[StrictFloat, Field(gt=0)]
3801
+ ]
3802
+ ] = None,
3803
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3804
+ _content_type: Optional[StrictStr] = None,
3805
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3806
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3807
+ ) -> ApiResponse[None]:
3808
+ """Update public status
3809
+
3810
+
3811
+ :param sandbox_id: ID of the sandbox (required)
3812
+ :type sandbox_id: str
3813
+ :param is_public: Public status to set (required)
3814
+ :type is_public: bool
3815
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3816
+ :type x_daytona_organization_id: str
3817
+ :param _request_timeout: timeout setting for this request. If one
3818
+ number provided, it will be total request
3819
+ timeout. It can also be a pair (tuple) of
3820
+ (connection, read) timeouts.
3821
+ :type _request_timeout: int, tuple(int, int), optional
3822
+ :param _request_auth: set to override the auth_settings for an a single
3823
+ request; this effectively ignores the
3824
+ authentication in the spec for a single request.
3825
+ :type _request_auth: dict, optional
3826
+ :param _content_type: force content-type for the request.
3827
+ :type _content_type: str, Optional
3828
+ :param _headers: set to override the headers for a single
3829
+ request; this effectively ignores the headers
3830
+ in the spec for a single request.
3831
+ :type _headers: dict, optional
3832
+ :param _host_index: set to override the host_index for a single
3833
+ request; this effectively ignores the host_index
3834
+ in the spec for a single request.
3835
+ :type _host_index: int, optional
3836
+ :return: Returns the result object.
3837
+ """ # noqa: E501
3838
+
3839
+ _param = self._update_public_status_serialize(
3840
+ sandbox_id=sandbox_id,
3841
+ is_public=is_public,
3842
+ x_daytona_organization_id=x_daytona_organization_id,
3843
+ _request_auth=_request_auth,
3844
+ _content_type=_content_type,
3845
+ _headers=_headers,
3846
+ _host_index=_host_index
3847
+ )
3848
+
3849
+ _response_types_map: Dict[str, Optional[str]] = {
3850
+ '201': None,
3851
+ }
3852
+ response_data = await self.api_client.call_api(
3853
+ *_param,
3854
+ _request_timeout=_request_timeout
3855
+ )
3856
+ await response_data.read()
3857
+ return self.api_client.response_deserialize(
3858
+ response_data=response_data,
3859
+ response_types_map=_response_types_map,
3860
+ )
3861
+
3862
+
3863
+ @validate_call
3864
+ async def update_public_status_without_preload_content(
3865
+ self,
3866
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3867
+ is_public: Annotated[StrictBool, Field(description="Public status to set")],
3868
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3869
+ _request_timeout: Union[
3870
+ None,
3871
+ Annotated[StrictFloat, Field(gt=0)],
3872
+ Tuple[
3873
+ Annotated[StrictFloat, Field(gt=0)],
3874
+ Annotated[StrictFloat, Field(gt=0)]
3875
+ ]
3876
+ ] = None,
3877
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3878
+ _content_type: Optional[StrictStr] = None,
3879
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3880
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3881
+ ) -> RESTResponseType:
3882
+ """Update public status
3883
+
3884
+
3885
+ :param sandbox_id: ID of the sandbox (required)
3886
+ :type sandbox_id: str
3887
+ :param is_public: Public status to set (required)
3888
+ :type is_public: bool
3889
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3890
+ :type x_daytona_organization_id: str
3891
+ :param _request_timeout: timeout setting for this request. If one
3892
+ number provided, it will be total request
3893
+ timeout. It can also be a pair (tuple) of
3894
+ (connection, read) timeouts.
3895
+ :type _request_timeout: int, tuple(int, int), optional
3896
+ :param _request_auth: set to override the auth_settings for an a single
3897
+ request; this effectively ignores the
3898
+ authentication in the spec for a single request.
3899
+ :type _request_auth: dict, optional
3900
+ :param _content_type: force content-type for the request.
3901
+ :type _content_type: str, Optional
3902
+ :param _headers: set to override the headers for a single
3903
+ request; this effectively ignores the headers
3904
+ in the spec for a single request.
3905
+ :type _headers: dict, optional
3906
+ :param _host_index: set to override the host_index for a single
3907
+ request; this effectively ignores the host_index
3908
+ in the spec for a single request.
3909
+ :type _host_index: int, optional
3910
+ :return: Returns the result object.
3911
+ """ # noqa: E501
3912
+
3913
+ _param = self._update_public_status_serialize(
3914
+ sandbox_id=sandbox_id,
3915
+ is_public=is_public,
3916
+ x_daytona_organization_id=x_daytona_organization_id,
3917
+ _request_auth=_request_auth,
3918
+ _content_type=_content_type,
3919
+ _headers=_headers,
3920
+ _host_index=_host_index
3921
+ )
3922
+
3923
+ _response_types_map: Dict[str, Optional[str]] = {
3924
+ '201': None,
3925
+ }
3926
+ response_data = await self.api_client.call_api(
3927
+ *_param,
3928
+ _request_timeout=_request_timeout
3929
+ )
3930
+ return response_data.response
3931
+
3932
+
3933
+ def _update_public_status_serialize(
3934
+ self,
3935
+ sandbox_id,
3936
+ is_public,
3937
+ x_daytona_organization_id,
3938
+ _request_auth,
3939
+ _content_type,
3940
+ _headers,
3941
+ _host_index,
3942
+ ) -> RequestSerialized:
3943
+
3944
+ _host = None
3945
+
3946
+ _collection_formats: Dict[str, str] = {
3947
+ }
3948
+
3949
+ _path_params: Dict[str, str] = {}
3950
+ _query_params: List[Tuple[str, str]] = []
3951
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3952
+ _form_params: List[Tuple[str, str]] = []
3953
+ _files: Dict[
3954
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3955
+ ] = {}
3956
+ _body_params: Optional[bytes] = None
3957
+
3958
+ # process the path parameters
3959
+ if sandbox_id is not None:
3960
+ _path_params['sandboxId'] = sandbox_id
3961
+ if is_public is not None:
3962
+ _path_params['isPublic'] = is_public
3963
+ # process the query parameters
3964
+ # process the header parameters
3965
+ if x_daytona_organization_id is not None:
3966
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3967
+ # process the form parameters
3968
+ # process the body parameter
3969
+
3970
+
3971
+
3972
+
3973
+ # authentication setting
3974
+ _auth_settings: List[str] = [
3975
+ 'bearer',
3976
+ 'oauth2'
3977
+ ]
3978
+
3979
+ return self.api_client.param_serialize(
3980
+ method='POST',
3981
+ resource_path='/sandbox/{sandboxId}/public/{isPublic}',
3982
+ path_params=_path_params,
3983
+ query_params=_query_params,
3984
+ header_params=_header_params,
3985
+ body=_body_params,
3986
+ post_params=_form_params,
3987
+ files=_files,
3988
+ auth_settings=_auth_settings,
3989
+ collection_formats=_collection_formats,
3990
+ _host=_host,
3991
+ _request_auth=_request_auth
3992
+ )
3993
+
3994
+