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