daytona_api_client_async 0.21.3a0__py3-none-any.whl

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

Potentially problematic release.


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

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