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