daytona_api_client 0.21.3a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of daytona_api_client might be problematic. Click here for more details.

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