daytona_api_client_async 0.0.0.dev0__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.
Files changed (209) hide show
  1. daytona_api_client_async/__init__.py +195 -0
  2. daytona_api_client_async/api/__init__.py +21 -0
  3. daytona_api_client_async/api/api_keys_api.py +1673 -0
  4. daytona_api_client_async/api/audit_api.py +750 -0
  5. daytona_api_client_async/api/config_api.py +279 -0
  6. daytona_api_client_async/api/default_api.py +1884 -0
  7. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  8. daytona_api_client_async/api/health_api.py +282 -0
  9. daytona_api_client_async/api/object_storage_api.py +299 -0
  10. daytona_api_client_async/api/organizations_api.py +7836 -0
  11. daytona_api_client_async/api/preview_api.py +826 -0
  12. daytona_api_client_async/api/regions_api.py +316 -0
  13. daytona_api_client_async/api/runners_api.py +1560 -0
  14. daytona_api_client_async/api/sandbox_api.py +6927 -0
  15. daytona_api_client_async/api/snapshots_api.py +2630 -0
  16. daytona_api_client_async/api/toolbox_api.py +20759 -0
  17. daytona_api_client_async/api/users_api.py +2319 -0
  18. daytona_api_client_async/api/volumes_api.py +1419 -0
  19. daytona_api_client_async/api/webhooks_api.py +1704 -0
  20. daytona_api_client_async/api/workspace_api.py +4036 -0
  21. daytona_api_client_async/api_client.py +801 -0
  22. daytona_api_client_async/api_response.py +21 -0
  23. daytona_api_client_async/configuration.py +579 -0
  24. daytona_api_client_async/exceptions.py +217 -0
  25. daytona_api_client_async/models/__init__.py +162 -0
  26. daytona_api_client_async/models/account_provider.py +103 -0
  27. daytona_api_client_async/models/announcement.py +103 -0
  28. daytona_api_client_async/models/api_key_list.py +132 -0
  29. daytona_api_client_async/models/api_key_response.py +123 -0
  30. daytona_api_client_async/models/audit_log.py +128 -0
  31. daytona_api_client_async/models/build_info.py +108 -0
  32. daytona_api_client_async/models/command.py +105 -0
  33. daytona_api_client_async/models/completion_context.py +103 -0
  34. daytona_api_client_async/models/completion_item.py +113 -0
  35. daytona_api_client_async/models/completion_list.py +111 -0
  36. daytona_api_client_async/models/compressed_screenshot_response.py +105 -0
  37. daytona_api_client_async/models/computer_use_start_response.py +103 -0
  38. daytona_api_client_async/models/computer_use_status_response.py +108 -0
  39. daytona_api_client_async/models/computer_use_stop_response.py +103 -0
  40. daytona_api_client_async/models/configuration.py +145 -0
  41. daytona_api_client_async/models/create_api_key.py +119 -0
  42. daytona_api_client_async/models/create_audit_log.py +128 -0
  43. daytona_api_client_async/models/create_build_info.py +103 -0
  44. daytona_api_client_async/models/create_docker_registry.py +120 -0
  45. daytona_api_client_async/models/create_linked_account.py +103 -0
  46. daytona_api_client_async/models/create_organization.py +103 -0
  47. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  48. daytona_api_client_async/models/create_organization_quota.py +117 -0
  49. daytona_api_client_async/models/create_organization_role.py +113 -0
  50. daytona_api_client_async/models/create_runner.py +130 -0
  51. daytona_api_client_async/models/create_sandbox.py +159 -0
  52. daytona_api_client_async/models/create_session_request.py +101 -0
  53. daytona_api_client_async/models/create_snapshot.py +121 -0
  54. daytona_api_client_async/models/create_user.py +127 -0
  55. daytona_api_client_async/models/create_volume.py +101 -0
  56. daytona_api_client_async/models/create_workspace.py +161 -0
  57. daytona_api_client_async/models/daytona_configuration.py +158 -0
  58. daytona_api_client_async/models/display_info_response.py +101 -0
  59. daytona_api_client_async/models/docker_registry.py +123 -0
  60. daytona_api_client_async/models/download_files.py +101 -0
  61. daytona_api_client_async/models/empty_response.py +101 -0
  62. daytona_api_client_async/models/execute_request.py +105 -0
  63. daytona_api_client_async/models/execute_response.py +103 -0
  64. daytona_api_client_async/models/file_info.py +115 -0
  65. daytona_api_client_async/models/file_status.py +107 -0
  66. daytona_api_client_async/models/git_add_request.py +103 -0
  67. daytona_api_client_async/models/git_branch_request.py +103 -0
  68. daytona_api_client_async/models/git_checkout_request.py +103 -0
  69. daytona_api_client_async/models/git_clone_request.py +111 -0
  70. daytona_api_client_async/models/git_commit_info.py +109 -0
  71. daytona_api_client_async/models/git_commit_request.py +109 -0
  72. daytona_api_client_async/models/git_commit_response.py +101 -0
  73. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  74. daytona_api_client_async/models/git_repo_request.py +105 -0
  75. daytona_api_client_async/models/git_status.py +117 -0
  76. daytona_api_client_async/models/health_controller_check200_response.py +154 -0
  77. daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
  78. daytona_api_client_async/models/health_controller_check503_response.py +154 -0
  79. daytona_api_client_async/models/keyboard_hotkey_request.py +101 -0
  80. daytona_api_client_async/models/keyboard_hotkey_response.py +103 -0
  81. daytona_api_client_async/models/keyboard_press_request.py +103 -0
  82. daytona_api_client_async/models/keyboard_press_response.py +105 -0
  83. daytona_api_client_async/models/keyboard_type_request.py +103 -0
  84. daytona_api_client_async/models/keyboard_type_response.py +103 -0
  85. daytona_api_client_async/models/list_branch_response.py +101 -0
  86. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  87. daytona_api_client_async/models/lsp_document_request.py +105 -0
  88. daytona_api_client_async/models/lsp_location.py +107 -0
  89. daytona_api_client_async/models/lsp_server_request.py +103 -0
  90. daytona_api_client_async/models/lsp_symbol.py +109 -0
  91. daytona_api_client_async/models/match.py +105 -0
  92. daytona_api_client_async/models/mouse_click_request.py +107 -0
  93. daytona_api_client_async/models/mouse_click_response.py +103 -0
  94. daytona_api_client_async/models/mouse_drag_request.py +109 -0
  95. daytona_api_client_async/models/mouse_drag_response.py +103 -0
  96. daytona_api_client_async/models/mouse_move_request.py +103 -0
  97. daytona_api_client_async/models/mouse_move_response.py +103 -0
  98. daytona_api_client_async/models/mouse_position.py +103 -0
  99. daytona_api_client_async/models/mouse_scroll_request.py +107 -0
  100. daytona_api_client_async/models/mouse_scroll_response.py +101 -0
  101. daytona_api_client_async/models/oidc_config.py +105 -0
  102. daytona_api_client_async/models/organization.py +153 -0
  103. daytona_api_client_async/models/organization_invitation.py +144 -0
  104. daytona_api_client_async/models/organization_role.py +122 -0
  105. daytona_api_client_async/models/organization_sandbox_default_limited_network_egress.py +101 -0
  106. daytona_api_client_async/models/organization_sandbox_default_network_block_all.py +101 -0
  107. daytona_api_client_async/models/organization_suspension.py +106 -0
  108. daytona_api_client_async/models/organization_usage_overview.py +117 -0
  109. daytona_api_client_async/models/organization_user.py +131 -0
  110. daytona_api_client_async/models/paginated_audit_logs.py +117 -0
  111. daytona_api_client_async/models/paginated_sandboxes.py +115 -0
  112. daytona_api_client_async/models/paginated_snapshots.py +115 -0
  113. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  114. daytona_api_client_async/models/paginated_workspaces.py +115 -0
  115. daytona_api_client_async/models/port_preview_url.py +105 -0
  116. daytona_api_client_async/models/position.py +103 -0
  117. daytona_api_client_async/models/posthog_config.py +103 -0
  118. daytona_api_client_async/models/process_errors_response.py +103 -0
  119. daytona_api_client_async/models/process_logs_response.py +103 -0
  120. daytona_api_client_async/models/process_restart_response.py +103 -0
  121. daytona_api_client_async/models/process_status_response.py +103 -0
  122. daytona_api_client_async/models/project_dir_response.py +101 -0
  123. daytona_api_client_async/models/pty_create_request.py +111 -0
  124. daytona_api_client_async/models/pty_create_response.py +101 -0
  125. daytona_api_client_async/models/pty_list_response.py +109 -0
  126. daytona_api_client_async/models/pty_resize_request.py +103 -0
  127. daytona_api_client_async/models/pty_session_info.py +115 -0
  128. daytona_api_client_async/models/range.py +110 -0
  129. daytona_api_client_async/models/rate_limit_config.py +120 -0
  130. daytona_api_client_async/models/rate_limit_entry.py +103 -0
  131. daytona_api_client_async/models/region.py +114 -0
  132. daytona_api_client_async/models/region_quota.py +109 -0
  133. daytona_api_client_async/models/region_screenshot_response.py +105 -0
  134. daytona_api_client_async/models/region_usage_overview.py +113 -0
  135. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  136. daytona_api_client_async/models/replace_request.py +105 -0
  137. daytona_api_client_async/models/replace_result.py +105 -0
  138. daytona_api_client_async/models/runner.py +153 -0
  139. daytona_api_client_async/models/runner_region.py +39 -0
  140. daytona_api_client_async/models/runner_snapshot_dto.py +105 -0
  141. daytona_api_client_async/models/runner_state.py +41 -0
  142. daytona_api_client_async/models/sandbox.py +193 -0
  143. daytona_api_client_async/models/sandbox_class.py +39 -0
  144. daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
  145. daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
  146. daytona_api_client_async/models/sandbox_desired_state.py +41 -0
  147. daytona_api_client_async/models/sandbox_info.py +105 -0
  148. daytona_api_client_async/models/sandbox_labels.py +101 -0
  149. daytona_api_client_async/models/sandbox_state.py +52 -0
  150. daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
  151. daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
  152. daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  153. daytona_api_client_async/models/sandbox_volume.py +105 -0
  154. daytona_api_client_async/models/screenshot_response.py +105 -0
  155. daytona_api_client_async/models/search_files_response.py +101 -0
  156. daytona_api_client_async/models/send_webhook_dto.py +105 -0
  157. daytona_api_client_async/models/session.py +116 -0
  158. daytona_api_client_async/models/session_command_logs_response.py +103 -0
  159. daytona_api_client_async/models/session_execute_request.py +105 -0
  160. daytona_api_client_async/models/session_execute_response.py +105 -0
  161. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  162. daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
  163. daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
  164. daytona_api_client_async/models/snapshot_dto.py +159 -0
  165. daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
  166. daytona_api_client_async/models/snapshot_state.py +44 -0
  167. daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
  168. daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
  169. daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  170. daytona_api_client_async/models/ssh_access_dto.py +112 -0
  171. daytona_api_client_async/models/ssh_access_validation_dto.py +103 -0
  172. daytona_api_client_async/models/storage_access_dto.py +111 -0
  173. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  174. daytona_api_client_async/models/update_docker_registry.py +109 -0
  175. daytona_api_client_async/models/update_organization_default_region.py +101 -0
  176. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  177. daytona_api_client_async/models/update_organization_member_access.py +110 -0
  178. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  179. daytona_api_client_async/models/update_organization_quota.py +162 -0
  180. daytona_api_client_async/models/update_organization_region_quota.py +120 -0
  181. daytona_api_client_async/models/update_organization_role.py +113 -0
  182. daytona_api_client_async/models/update_sandbox_state_dto.py +110 -0
  183. daytona_api_client_async/models/user.py +118 -0
  184. daytona_api_client_async/models/user_home_dir_response.py +101 -0
  185. daytona_api_client_async/models/user_public_key.py +103 -0
  186. daytona_api_client_async/models/volume_created_post_request.py +110 -0
  187. daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
  188. daytona_api_client_async/models/volume_dto.py +126 -0
  189. daytona_api_client_async/models/volume_state.py +43 -0
  190. daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
  191. daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
  192. daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
  193. daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
  194. daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  195. daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
  196. daytona_api_client_async/models/webhook_controller_get_status200_response.py +101 -0
  197. daytona_api_client_async/models/webhook_initialization_status.py +121 -0
  198. daytona_api_client_async/models/windows_response.py +103 -0
  199. daytona_api_client_async/models/work_dir_response.py +101 -0
  200. daytona_api_client_async/models/workdir_response.py +101 -0
  201. daytona_api_client_async/models/workspace.py +215 -0
  202. daytona_api_client_async/models/workspace_port_preview_url.py +103 -0
  203. daytona_api_client_async/py.typed +0 -0
  204. daytona_api_client_async/rest.py +214 -0
  205. daytona_api_client_async-0.0.0.dev0.dist-info/METADATA +27 -0
  206. daytona_api_client_async-0.0.0.dev0.dist-info/RECORD +209 -0
  207. daytona_api_client_async-0.0.0.dev0.dist-info/WHEEL +5 -0
  208. daytona_api_client_async-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
  209. daytona_api_client_async-0.0.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1673 @@
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 delete_api_key_for_user(
601
+ self,
602
+ user_id: StrictStr,
603
+ name: StrictStr,
604
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
605
+ _request_timeout: Union[
606
+ None,
607
+ Annotated[StrictFloat, Field(gt=0)],
608
+ Tuple[
609
+ Annotated[StrictFloat, Field(gt=0)],
610
+ Annotated[StrictFloat, Field(gt=0)]
611
+ ]
612
+ ] = None,
613
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
614
+ _content_type: Optional[StrictStr] = None,
615
+ _headers: Optional[Dict[StrictStr, Any]] = None,
616
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
617
+ ) -> None:
618
+ """Delete API key for user
619
+
620
+
621
+ :param user_id: (required)
622
+ :type user_id: str
623
+ :param name: (required)
624
+ :type name: str
625
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
626
+ :type x_daytona_organization_id: str
627
+ :param _request_timeout: timeout setting for this request. If one
628
+ number provided, it will be total request
629
+ timeout. It can also be a pair (tuple) of
630
+ (connection, read) timeouts.
631
+ :type _request_timeout: int, tuple(int, int), optional
632
+ :param _request_auth: set to override the auth_settings for an a single
633
+ request; this effectively ignores the
634
+ authentication in the spec for a single request.
635
+ :type _request_auth: dict, optional
636
+ :param _content_type: force content-type for the request.
637
+ :type _content_type: str, Optional
638
+ :param _headers: set to override the headers for a single
639
+ request; this effectively ignores the headers
640
+ in the spec for a single request.
641
+ :type _headers: dict, optional
642
+ :param _host_index: set to override the host_index for a single
643
+ request; this effectively ignores the host_index
644
+ in the spec for a single request.
645
+ :type _host_index: int, optional
646
+ :return: Returns the result object.
647
+ """ # noqa: E501
648
+
649
+ _param = self._delete_api_key_for_user_serialize(
650
+ user_id=user_id,
651
+ name=name,
652
+ x_daytona_organization_id=x_daytona_organization_id,
653
+ _request_auth=_request_auth,
654
+ _content_type=_content_type,
655
+ _headers=_headers,
656
+ _host_index=_host_index
657
+ )
658
+
659
+ _response_types_map: Dict[str, Optional[str]] = {
660
+ '204': None,
661
+ }
662
+ response_data = await self.api_client.call_api(
663
+ *_param,
664
+ _request_timeout=_request_timeout
665
+ )
666
+ await response_data.read()
667
+ return self.api_client.response_deserialize(
668
+ response_data=response_data,
669
+ response_types_map=_response_types_map,
670
+ ).data
671
+
672
+
673
+ @validate_call
674
+ async def delete_api_key_for_user_with_http_info(
675
+ self,
676
+ user_id: StrictStr,
677
+ name: StrictStr,
678
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
679
+ _request_timeout: Union[
680
+ None,
681
+ Annotated[StrictFloat, Field(gt=0)],
682
+ Tuple[
683
+ Annotated[StrictFloat, Field(gt=0)],
684
+ Annotated[StrictFloat, Field(gt=0)]
685
+ ]
686
+ ] = None,
687
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
688
+ _content_type: Optional[StrictStr] = None,
689
+ _headers: Optional[Dict[StrictStr, Any]] = None,
690
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
691
+ ) -> ApiResponse[None]:
692
+ """Delete API key for user
693
+
694
+
695
+ :param user_id: (required)
696
+ :type user_id: str
697
+ :param name: (required)
698
+ :type name: str
699
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
700
+ :type x_daytona_organization_id: str
701
+ :param _request_timeout: timeout setting for this request. If one
702
+ number provided, it will be total request
703
+ timeout. It can also be a pair (tuple) of
704
+ (connection, read) timeouts.
705
+ :type _request_timeout: int, tuple(int, int), optional
706
+ :param _request_auth: set to override the auth_settings for an a single
707
+ request; this effectively ignores the
708
+ authentication in the spec for a single request.
709
+ :type _request_auth: dict, optional
710
+ :param _content_type: force content-type for the request.
711
+ :type _content_type: str, Optional
712
+ :param _headers: set to override the headers for a single
713
+ request; this effectively ignores the headers
714
+ in the spec for a single request.
715
+ :type _headers: dict, optional
716
+ :param _host_index: set to override the host_index for a single
717
+ request; this effectively ignores the host_index
718
+ in the spec for a single request.
719
+ :type _host_index: int, optional
720
+ :return: Returns the result object.
721
+ """ # noqa: E501
722
+
723
+ _param = self._delete_api_key_for_user_serialize(
724
+ user_id=user_id,
725
+ name=name,
726
+ x_daytona_organization_id=x_daytona_organization_id,
727
+ _request_auth=_request_auth,
728
+ _content_type=_content_type,
729
+ _headers=_headers,
730
+ _host_index=_host_index
731
+ )
732
+
733
+ _response_types_map: Dict[str, Optional[str]] = {
734
+ '204': None,
735
+ }
736
+ response_data = await self.api_client.call_api(
737
+ *_param,
738
+ _request_timeout=_request_timeout
739
+ )
740
+ await response_data.read()
741
+ return self.api_client.response_deserialize(
742
+ response_data=response_data,
743
+ response_types_map=_response_types_map,
744
+ )
745
+
746
+
747
+ @validate_call
748
+ async def delete_api_key_for_user_without_preload_content(
749
+ self,
750
+ user_id: StrictStr,
751
+ name: StrictStr,
752
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
753
+ _request_timeout: Union[
754
+ None,
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Tuple[
757
+ Annotated[StrictFloat, Field(gt=0)],
758
+ Annotated[StrictFloat, Field(gt=0)]
759
+ ]
760
+ ] = None,
761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
762
+ _content_type: Optional[StrictStr] = None,
763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
765
+ ) -> RESTResponseType:
766
+ """Delete API key for user
767
+
768
+
769
+ :param user_id: (required)
770
+ :type user_id: str
771
+ :param name: (required)
772
+ :type name: str
773
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
774
+ :type x_daytona_organization_id: str
775
+ :param _request_timeout: timeout setting for this request. If one
776
+ number provided, it will be total request
777
+ timeout. It can also be a pair (tuple) of
778
+ (connection, read) timeouts.
779
+ :type _request_timeout: int, tuple(int, int), optional
780
+ :param _request_auth: set to override the auth_settings for an a single
781
+ request; this effectively ignores the
782
+ authentication in the spec for a single request.
783
+ :type _request_auth: dict, optional
784
+ :param _content_type: force content-type for the request.
785
+ :type _content_type: str, Optional
786
+ :param _headers: set to override the headers for a single
787
+ request; this effectively ignores the headers
788
+ in the spec for a single request.
789
+ :type _headers: dict, optional
790
+ :param _host_index: set to override the host_index for a single
791
+ request; this effectively ignores the host_index
792
+ in the spec for a single request.
793
+ :type _host_index: int, optional
794
+ :return: Returns the result object.
795
+ """ # noqa: E501
796
+
797
+ _param = self._delete_api_key_for_user_serialize(
798
+ user_id=user_id,
799
+ name=name,
800
+ x_daytona_organization_id=x_daytona_organization_id,
801
+ _request_auth=_request_auth,
802
+ _content_type=_content_type,
803
+ _headers=_headers,
804
+ _host_index=_host_index
805
+ )
806
+
807
+ _response_types_map: Dict[str, Optional[str]] = {
808
+ '204': None,
809
+ }
810
+ response_data = await self.api_client.call_api(
811
+ *_param,
812
+ _request_timeout=_request_timeout
813
+ )
814
+ return response_data.response
815
+
816
+
817
+ def _delete_api_key_for_user_serialize(
818
+ self,
819
+ user_id,
820
+ name,
821
+ x_daytona_organization_id,
822
+ _request_auth,
823
+ _content_type,
824
+ _headers,
825
+ _host_index,
826
+ ) -> RequestSerialized:
827
+
828
+ _host = None
829
+
830
+ _collection_formats: Dict[str, str] = {
831
+ }
832
+
833
+ _path_params: Dict[str, str] = {}
834
+ _query_params: List[Tuple[str, str]] = []
835
+ _header_params: Dict[str, Optional[str]] = _headers or {}
836
+ _form_params: List[Tuple[str, str]] = []
837
+ _files: Dict[
838
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
839
+ ] = {}
840
+ _body_params: Optional[bytes] = None
841
+
842
+ # process the path parameters
843
+ if user_id is not None:
844
+ _path_params['userId'] = user_id
845
+ if name is not None:
846
+ _path_params['name'] = name
847
+ # process the query parameters
848
+ # process the header parameters
849
+ if x_daytona_organization_id is not None:
850
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
851
+ # process the form parameters
852
+ # process the body parameter
853
+
854
+
855
+
856
+
857
+ # authentication setting
858
+ _auth_settings: List[str] = [
859
+ 'bearer',
860
+ 'oauth2'
861
+ ]
862
+
863
+ return self.api_client.param_serialize(
864
+ method='DELETE',
865
+ resource_path='/api-keys/{userId}/{name}',
866
+ path_params=_path_params,
867
+ query_params=_query_params,
868
+ header_params=_header_params,
869
+ body=_body_params,
870
+ post_params=_form_params,
871
+ files=_files,
872
+ auth_settings=_auth_settings,
873
+ collection_formats=_collection_formats,
874
+ _host=_host,
875
+ _request_auth=_request_auth
876
+ )
877
+
878
+
879
+
880
+
881
+ @validate_call
882
+ async def get_api_key(
883
+ self,
884
+ name: StrictStr,
885
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
886
+ _request_timeout: Union[
887
+ None,
888
+ Annotated[StrictFloat, Field(gt=0)],
889
+ Tuple[
890
+ Annotated[StrictFloat, Field(gt=0)],
891
+ Annotated[StrictFloat, Field(gt=0)]
892
+ ]
893
+ ] = None,
894
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
895
+ _content_type: Optional[StrictStr] = None,
896
+ _headers: Optional[Dict[StrictStr, Any]] = None,
897
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
898
+ ) -> ApiKeyList:
899
+ """Get API key
900
+
901
+
902
+ :param name: (required)
903
+ :type name: str
904
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
905
+ :type x_daytona_organization_id: str
906
+ :param _request_timeout: timeout setting for this request. If one
907
+ number provided, it will be total request
908
+ timeout. It can also be a pair (tuple) of
909
+ (connection, read) timeouts.
910
+ :type _request_timeout: int, tuple(int, int), optional
911
+ :param _request_auth: set to override the auth_settings for an a single
912
+ request; this effectively ignores the
913
+ authentication in the spec for a single request.
914
+ :type _request_auth: dict, optional
915
+ :param _content_type: force content-type for the request.
916
+ :type _content_type: str, Optional
917
+ :param _headers: set to override the headers for a single
918
+ request; this effectively ignores the headers
919
+ in the spec for a single request.
920
+ :type _headers: dict, optional
921
+ :param _host_index: set to override the host_index for a single
922
+ request; this effectively ignores the host_index
923
+ in the spec for a single request.
924
+ :type _host_index: int, optional
925
+ :return: Returns the result object.
926
+ """ # noqa: E501
927
+
928
+ _param = self._get_api_key_serialize(
929
+ name=name,
930
+ x_daytona_organization_id=x_daytona_organization_id,
931
+ _request_auth=_request_auth,
932
+ _content_type=_content_type,
933
+ _headers=_headers,
934
+ _host_index=_host_index
935
+ )
936
+
937
+ _response_types_map: Dict[str, Optional[str]] = {
938
+ '200': "ApiKeyList",
939
+ }
940
+ response_data = await self.api_client.call_api(
941
+ *_param,
942
+ _request_timeout=_request_timeout
943
+ )
944
+ await response_data.read()
945
+ return self.api_client.response_deserialize(
946
+ response_data=response_data,
947
+ response_types_map=_response_types_map,
948
+ ).data
949
+
950
+
951
+ @validate_call
952
+ async def get_api_key_with_http_info(
953
+ self,
954
+ name: StrictStr,
955
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
956
+ _request_timeout: Union[
957
+ None,
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Tuple[
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Annotated[StrictFloat, Field(gt=0)]
962
+ ]
963
+ ] = None,
964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
965
+ _content_type: Optional[StrictStr] = None,
966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
968
+ ) -> ApiResponse[ApiKeyList]:
969
+ """Get API key
970
+
971
+
972
+ :param name: (required)
973
+ :type name: str
974
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
975
+ :type x_daytona_organization_id: str
976
+ :param _request_timeout: timeout setting for this request. If one
977
+ number provided, it will be total request
978
+ timeout. It can also be a pair (tuple) of
979
+ (connection, read) timeouts.
980
+ :type _request_timeout: int, tuple(int, int), optional
981
+ :param _request_auth: set to override the auth_settings for an a single
982
+ request; this effectively ignores the
983
+ authentication in the spec for a single request.
984
+ :type _request_auth: dict, optional
985
+ :param _content_type: force content-type for the request.
986
+ :type _content_type: str, Optional
987
+ :param _headers: set to override the headers for a single
988
+ request; this effectively ignores the headers
989
+ in the spec for a single request.
990
+ :type _headers: dict, optional
991
+ :param _host_index: set to override the host_index for a single
992
+ request; this effectively ignores the host_index
993
+ in the spec for a single request.
994
+ :type _host_index: int, optional
995
+ :return: Returns the result object.
996
+ """ # noqa: E501
997
+
998
+ _param = self._get_api_key_serialize(
999
+ name=name,
1000
+ x_daytona_organization_id=x_daytona_organization_id,
1001
+ _request_auth=_request_auth,
1002
+ _content_type=_content_type,
1003
+ _headers=_headers,
1004
+ _host_index=_host_index
1005
+ )
1006
+
1007
+ _response_types_map: Dict[str, Optional[str]] = {
1008
+ '200': "ApiKeyList",
1009
+ }
1010
+ response_data = await self.api_client.call_api(
1011
+ *_param,
1012
+ _request_timeout=_request_timeout
1013
+ )
1014
+ await response_data.read()
1015
+ return self.api_client.response_deserialize(
1016
+ response_data=response_data,
1017
+ response_types_map=_response_types_map,
1018
+ )
1019
+
1020
+
1021
+ @validate_call
1022
+ async def get_api_key_without_preload_content(
1023
+ self,
1024
+ name: StrictStr,
1025
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1026
+ _request_timeout: Union[
1027
+ None,
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Tuple[
1030
+ Annotated[StrictFloat, Field(gt=0)],
1031
+ Annotated[StrictFloat, Field(gt=0)]
1032
+ ]
1033
+ ] = None,
1034
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1035
+ _content_type: Optional[StrictStr] = None,
1036
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1037
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1038
+ ) -> RESTResponseType:
1039
+ """Get API key
1040
+
1041
+
1042
+ :param name: (required)
1043
+ :type name: str
1044
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1045
+ :type x_daytona_organization_id: str
1046
+ :param _request_timeout: timeout setting for this request. If one
1047
+ number provided, it will be total request
1048
+ timeout. It can also be a pair (tuple) of
1049
+ (connection, read) timeouts.
1050
+ :type _request_timeout: int, tuple(int, int), optional
1051
+ :param _request_auth: set to override the auth_settings for an a single
1052
+ request; this effectively ignores the
1053
+ authentication in the spec for a single request.
1054
+ :type _request_auth: dict, optional
1055
+ :param _content_type: force content-type for the request.
1056
+ :type _content_type: str, Optional
1057
+ :param _headers: set to override the headers for a single
1058
+ request; this effectively ignores the headers
1059
+ in the spec for a single request.
1060
+ :type _headers: dict, optional
1061
+ :param _host_index: set to override the host_index for a single
1062
+ request; this effectively ignores the host_index
1063
+ in the spec for a single request.
1064
+ :type _host_index: int, optional
1065
+ :return: Returns the result object.
1066
+ """ # noqa: E501
1067
+
1068
+ _param = self._get_api_key_serialize(
1069
+ name=name,
1070
+ x_daytona_organization_id=x_daytona_organization_id,
1071
+ _request_auth=_request_auth,
1072
+ _content_type=_content_type,
1073
+ _headers=_headers,
1074
+ _host_index=_host_index
1075
+ )
1076
+
1077
+ _response_types_map: Dict[str, Optional[str]] = {
1078
+ '200': "ApiKeyList",
1079
+ }
1080
+ response_data = await self.api_client.call_api(
1081
+ *_param,
1082
+ _request_timeout=_request_timeout
1083
+ )
1084
+ return response_data.response
1085
+
1086
+
1087
+ def _get_api_key_serialize(
1088
+ self,
1089
+ name,
1090
+ x_daytona_organization_id,
1091
+ _request_auth,
1092
+ _content_type,
1093
+ _headers,
1094
+ _host_index,
1095
+ ) -> RequestSerialized:
1096
+
1097
+ _host = None
1098
+
1099
+ _collection_formats: Dict[str, str] = {
1100
+ }
1101
+
1102
+ _path_params: Dict[str, str] = {}
1103
+ _query_params: List[Tuple[str, str]] = []
1104
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1105
+ _form_params: List[Tuple[str, str]] = []
1106
+ _files: Dict[
1107
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1108
+ ] = {}
1109
+ _body_params: Optional[bytes] = None
1110
+
1111
+ # process the path parameters
1112
+ if name is not None:
1113
+ _path_params['name'] = name
1114
+ # process the query parameters
1115
+ # process the header parameters
1116
+ if x_daytona_organization_id is not None:
1117
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1118
+ # process the form parameters
1119
+ # process the body parameter
1120
+
1121
+
1122
+ # set the HTTP header `Accept`
1123
+ if 'Accept' not in _header_params:
1124
+ _header_params['Accept'] = self.api_client.select_header_accept(
1125
+ [
1126
+ 'application/json'
1127
+ ]
1128
+ )
1129
+
1130
+
1131
+ # authentication setting
1132
+ _auth_settings: List[str] = [
1133
+ 'bearer',
1134
+ 'oauth2'
1135
+ ]
1136
+
1137
+ return self.api_client.param_serialize(
1138
+ method='GET',
1139
+ resource_path='/api-keys/{name}',
1140
+ path_params=_path_params,
1141
+ query_params=_query_params,
1142
+ header_params=_header_params,
1143
+ body=_body_params,
1144
+ post_params=_form_params,
1145
+ files=_files,
1146
+ auth_settings=_auth_settings,
1147
+ collection_formats=_collection_formats,
1148
+ _host=_host,
1149
+ _request_auth=_request_auth
1150
+ )
1151
+
1152
+
1153
+
1154
+
1155
+ @validate_call
1156
+ async def get_current_api_key(
1157
+ self,
1158
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1159
+ _request_timeout: Union[
1160
+ None,
1161
+ Annotated[StrictFloat, Field(gt=0)],
1162
+ Tuple[
1163
+ Annotated[StrictFloat, Field(gt=0)],
1164
+ Annotated[StrictFloat, Field(gt=0)]
1165
+ ]
1166
+ ] = None,
1167
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1168
+ _content_type: Optional[StrictStr] = None,
1169
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1170
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1171
+ ) -> ApiKeyList:
1172
+ """Get current API key's details
1173
+
1174
+
1175
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1176
+ :type x_daytona_organization_id: str
1177
+ :param _request_timeout: timeout setting for this request. If one
1178
+ number provided, it will be total request
1179
+ timeout. It can also be a pair (tuple) of
1180
+ (connection, read) timeouts.
1181
+ :type _request_timeout: int, tuple(int, int), optional
1182
+ :param _request_auth: set to override the auth_settings for an a single
1183
+ request; this effectively ignores the
1184
+ authentication in the spec for a single request.
1185
+ :type _request_auth: dict, optional
1186
+ :param _content_type: force content-type for the request.
1187
+ :type _content_type: str, Optional
1188
+ :param _headers: set to override the headers for a single
1189
+ request; this effectively ignores the headers
1190
+ in the spec for a single request.
1191
+ :type _headers: dict, optional
1192
+ :param _host_index: set to override the host_index for a single
1193
+ request; this effectively ignores the host_index
1194
+ in the spec for a single request.
1195
+ :type _host_index: int, optional
1196
+ :return: Returns the result object.
1197
+ """ # noqa: E501
1198
+
1199
+ _param = self._get_current_api_key_serialize(
1200
+ x_daytona_organization_id=x_daytona_organization_id,
1201
+ _request_auth=_request_auth,
1202
+ _content_type=_content_type,
1203
+ _headers=_headers,
1204
+ _host_index=_host_index
1205
+ )
1206
+
1207
+ _response_types_map: Dict[str, Optional[str]] = {
1208
+ '200': "ApiKeyList",
1209
+ }
1210
+ response_data = await self.api_client.call_api(
1211
+ *_param,
1212
+ _request_timeout=_request_timeout
1213
+ )
1214
+ await response_data.read()
1215
+ return self.api_client.response_deserialize(
1216
+ response_data=response_data,
1217
+ response_types_map=_response_types_map,
1218
+ ).data
1219
+
1220
+
1221
+ @validate_call
1222
+ async def get_current_api_key_with_http_info(
1223
+ self,
1224
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1225
+ _request_timeout: Union[
1226
+ None,
1227
+ Annotated[StrictFloat, Field(gt=0)],
1228
+ Tuple[
1229
+ Annotated[StrictFloat, Field(gt=0)],
1230
+ Annotated[StrictFloat, Field(gt=0)]
1231
+ ]
1232
+ ] = None,
1233
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1234
+ _content_type: Optional[StrictStr] = None,
1235
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1236
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1237
+ ) -> ApiResponse[ApiKeyList]:
1238
+ """Get current API key's details
1239
+
1240
+
1241
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1242
+ :type x_daytona_organization_id: str
1243
+ :param _request_timeout: timeout setting for this request. If one
1244
+ number provided, it will be total request
1245
+ timeout. It can also be a pair (tuple) of
1246
+ (connection, read) timeouts.
1247
+ :type _request_timeout: int, tuple(int, int), optional
1248
+ :param _request_auth: set to override the auth_settings for an a single
1249
+ request; this effectively ignores the
1250
+ authentication in the spec for a single request.
1251
+ :type _request_auth: dict, optional
1252
+ :param _content_type: force content-type for the request.
1253
+ :type _content_type: str, Optional
1254
+ :param _headers: set to override the headers for a single
1255
+ request; this effectively ignores the headers
1256
+ in the spec for a single request.
1257
+ :type _headers: dict, optional
1258
+ :param _host_index: set to override the host_index for a single
1259
+ request; this effectively ignores the host_index
1260
+ in the spec for a single request.
1261
+ :type _host_index: int, optional
1262
+ :return: Returns the result object.
1263
+ """ # noqa: E501
1264
+
1265
+ _param = self._get_current_api_key_serialize(
1266
+ x_daytona_organization_id=x_daytona_organization_id,
1267
+ _request_auth=_request_auth,
1268
+ _content_type=_content_type,
1269
+ _headers=_headers,
1270
+ _host_index=_host_index
1271
+ )
1272
+
1273
+ _response_types_map: Dict[str, Optional[str]] = {
1274
+ '200': "ApiKeyList",
1275
+ }
1276
+ response_data = await self.api_client.call_api(
1277
+ *_param,
1278
+ _request_timeout=_request_timeout
1279
+ )
1280
+ await response_data.read()
1281
+ return self.api_client.response_deserialize(
1282
+ response_data=response_data,
1283
+ response_types_map=_response_types_map,
1284
+ )
1285
+
1286
+
1287
+ @validate_call
1288
+ async def get_current_api_key_without_preload_content(
1289
+ self,
1290
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1291
+ _request_timeout: Union[
1292
+ None,
1293
+ Annotated[StrictFloat, Field(gt=0)],
1294
+ Tuple[
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Annotated[StrictFloat, Field(gt=0)]
1297
+ ]
1298
+ ] = None,
1299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1300
+ _content_type: Optional[StrictStr] = None,
1301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1303
+ ) -> RESTResponseType:
1304
+ """Get current API key's details
1305
+
1306
+
1307
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1308
+ :type x_daytona_organization_id: str
1309
+ :param _request_timeout: timeout setting for this request. If one
1310
+ number provided, it will be total request
1311
+ timeout. It can also be a pair (tuple) of
1312
+ (connection, read) timeouts.
1313
+ :type _request_timeout: int, tuple(int, int), optional
1314
+ :param _request_auth: set to override the auth_settings for an a single
1315
+ request; this effectively ignores the
1316
+ authentication in the spec for a single request.
1317
+ :type _request_auth: dict, optional
1318
+ :param _content_type: force content-type for the request.
1319
+ :type _content_type: str, Optional
1320
+ :param _headers: set to override the headers for a single
1321
+ request; this effectively ignores the headers
1322
+ in the spec for a single request.
1323
+ :type _headers: dict, optional
1324
+ :param _host_index: set to override the host_index for a single
1325
+ request; this effectively ignores the host_index
1326
+ in the spec for a single request.
1327
+ :type _host_index: int, optional
1328
+ :return: Returns the result object.
1329
+ """ # noqa: E501
1330
+
1331
+ _param = self._get_current_api_key_serialize(
1332
+ x_daytona_organization_id=x_daytona_organization_id,
1333
+ _request_auth=_request_auth,
1334
+ _content_type=_content_type,
1335
+ _headers=_headers,
1336
+ _host_index=_host_index
1337
+ )
1338
+
1339
+ _response_types_map: Dict[str, Optional[str]] = {
1340
+ '200': "ApiKeyList",
1341
+ }
1342
+ response_data = await self.api_client.call_api(
1343
+ *_param,
1344
+ _request_timeout=_request_timeout
1345
+ )
1346
+ return response_data.response
1347
+
1348
+
1349
+ def _get_current_api_key_serialize(
1350
+ self,
1351
+ x_daytona_organization_id,
1352
+ _request_auth,
1353
+ _content_type,
1354
+ _headers,
1355
+ _host_index,
1356
+ ) -> RequestSerialized:
1357
+
1358
+ _host = None
1359
+
1360
+ _collection_formats: Dict[str, str] = {
1361
+ }
1362
+
1363
+ _path_params: Dict[str, str] = {}
1364
+ _query_params: List[Tuple[str, str]] = []
1365
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1366
+ _form_params: List[Tuple[str, str]] = []
1367
+ _files: Dict[
1368
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1369
+ ] = {}
1370
+ _body_params: Optional[bytes] = None
1371
+
1372
+ # process the path parameters
1373
+ # process the query parameters
1374
+ # process the header parameters
1375
+ if x_daytona_organization_id is not None:
1376
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1377
+ # process the form parameters
1378
+ # process the body parameter
1379
+
1380
+
1381
+ # set the HTTP header `Accept`
1382
+ if 'Accept' not in _header_params:
1383
+ _header_params['Accept'] = self.api_client.select_header_accept(
1384
+ [
1385
+ 'application/json'
1386
+ ]
1387
+ )
1388
+
1389
+
1390
+ # authentication setting
1391
+ _auth_settings: List[str] = [
1392
+ 'bearer',
1393
+ 'oauth2'
1394
+ ]
1395
+
1396
+ return self.api_client.param_serialize(
1397
+ method='GET',
1398
+ resource_path='/api-keys/current',
1399
+ path_params=_path_params,
1400
+ query_params=_query_params,
1401
+ header_params=_header_params,
1402
+ body=_body_params,
1403
+ post_params=_form_params,
1404
+ files=_files,
1405
+ auth_settings=_auth_settings,
1406
+ collection_formats=_collection_formats,
1407
+ _host=_host,
1408
+ _request_auth=_request_auth
1409
+ )
1410
+
1411
+
1412
+
1413
+
1414
+ @validate_call
1415
+ async def list_api_keys(
1416
+ self,
1417
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1418
+ _request_timeout: Union[
1419
+ None,
1420
+ Annotated[StrictFloat, Field(gt=0)],
1421
+ Tuple[
1422
+ Annotated[StrictFloat, Field(gt=0)],
1423
+ Annotated[StrictFloat, Field(gt=0)]
1424
+ ]
1425
+ ] = None,
1426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1427
+ _content_type: Optional[StrictStr] = None,
1428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1430
+ ) -> List[ApiKeyList]:
1431
+ """List API keys
1432
+
1433
+
1434
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1435
+ :type x_daytona_organization_id: str
1436
+ :param _request_timeout: timeout setting for this request. If one
1437
+ number provided, it will be total request
1438
+ timeout. It can also be a pair (tuple) of
1439
+ (connection, read) timeouts.
1440
+ :type _request_timeout: int, tuple(int, int), optional
1441
+ :param _request_auth: set to override the auth_settings for an a single
1442
+ request; this effectively ignores the
1443
+ authentication in the spec for a single request.
1444
+ :type _request_auth: dict, optional
1445
+ :param _content_type: force content-type for the request.
1446
+ :type _content_type: str, Optional
1447
+ :param _headers: set to override the headers for a single
1448
+ request; this effectively ignores the headers
1449
+ in the spec for a single request.
1450
+ :type _headers: dict, optional
1451
+ :param _host_index: set to override the host_index for a single
1452
+ request; this effectively ignores the host_index
1453
+ in the spec for a single request.
1454
+ :type _host_index: int, optional
1455
+ :return: Returns the result object.
1456
+ """ # noqa: E501
1457
+
1458
+ _param = self._list_api_keys_serialize(
1459
+ x_daytona_organization_id=x_daytona_organization_id,
1460
+ _request_auth=_request_auth,
1461
+ _content_type=_content_type,
1462
+ _headers=_headers,
1463
+ _host_index=_host_index
1464
+ )
1465
+
1466
+ _response_types_map: Dict[str, Optional[str]] = {
1467
+ '200': "List[ApiKeyList]",
1468
+ '500': None,
1469
+ }
1470
+ response_data = await self.api_client.call_api(
1471
+ *_param,
1472
+ _request_timeout=_request_timeout
1473
+ )
1474
+ await response_data.read()
1475
+ return self.api_client.response_deserialize(
1476
+ response_data=response_data,
1477
+ response_types_map=_response_types_map,
1478
+ ).data
1479
+
1480
+
1481
+ @validate_call
1482
+ async def list_api_keys_with_http_info(
1483
+ self,
1484
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1485
+ _request_timeout: Union[
1486
+ None,
1487
+ Annotated[StrictFloat, Field(gt=0)],
1488
+ Tuple[
1489
+ Annotated[StrictFloat, Field(gt=0)],
1490
+ Annotated[StrictFloat, Field(gt=0)]
1491
+ ]
1492
+ ] = None,
1493
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1494
+ _content_type: Optional[StrictStr] = None,
1495
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1496
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1497
+ ) -> ApiResponse[List[ApiKeyList]]:
1498
+ """List API keys
1499
+
1500
+
1501
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1502
+ :type x_daytona_organization_id: str
1503
+ :param _request_timeout: timeout setting for this request. If one
1504
+ number provided, it will be total request
1505
+ timeout. It can also be a pair (tuple) of
1506
+ (connection, read) timeouts.
1507
+ :type _request_timeout: int, tuple(int, int), optional
1508
+ :param _request_auth: set to override the auth_settings for an a single
1509
+ request; this effectively ignores the
1510
+ authentication in the spec for a single request.
1511
+ :type _request_auth: dict, optional
1512
+ :param _content_type: force content-type for the request.
1513
+ :type _content_type: str, Optional
1514
+ :param _headers: set to override the headers for a single
1515
+ request; this effectively ignores the headers
1516
+ in the spec for a single request.
1517
+ :type _headers: dict, optional
1518
+ :param _host_index: set to override the host_index for a single
1519
+ request; this effectively ignores the host_index
1520
+ in the spec for a single request.
1521
+ :type _host_index: int, optional
1522
+ :return: Returns the result object.
1523
+ """ # noqa: E501
1524
+
1525
+ _param = self._list_api_keys_serialize(
1526
+ x_daytona_organization_id=x_daytona_organization_id,
1527
+ _request_auth=_request_auth,
1528
+ _content_type=_content_type,
1529
+ _headers=_headers,
1530
+ _host_index=_host_index
1531
+ )
1532
+
1533
+ _response_types_map: Dict[str, Optional[str]] = {
1534
+ '200': "List[ApiKeyList]",
1535
+ '500': None,
1536
+ }
1537
+ response_data = await self.api_client.call_api(
1538
+ *_param,
1539
+ _request_timeout=_request_timeout
1540
+ )
1541
+ await response_data.read()
1542
+ return self.api_client.response_deserialize(
1543
+ response_data=response_data,
1544
+ response_types_map=_response_types_map,
1545
+ )
1546
+
1547
+
1548
+ @validate_call
1549
+ async def list_api_keys_without_preload_content(
1550
+ self,
1551
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1552
+ _request_timeout: Union[
1553
+ None,
1554
+ Annotated[StrictFloat, Field(gt=0)],
1555
+ Tuple[
1556
+ Annotated[StrictFloat, Field(gt=0)],
1557
+ Annotated[StrictFloat, Field(gt=0)]
1558
+ ]
1559
+ ] = None,
1560
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1561
+ _content_type: Optional[StrictStr] = None,
1562
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1563
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1564
+ ) -> RESTResponseType:
1565
+ """List API keys
1566
+
1567
+
1568
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1569
+ :type x_daytona_organization_id: str
1570
+ :param _request_timeout: timeout setting for this request. If one
1571
+ number provided, it will be total request
1572
+ timeout. It can also be a pair (tuple) of
1573
+ (connection, read) timeouts.
1574
+ :type _request_timeout: int, tuple(int, int), optional
1575
+ :param _request_auth: set to override the auth_settings for an a single
1576
+ request; this effectively ignores the
1577
+ authentication in the spec for a single request.
1578
+ :type _request_auth: dict, optional
1579
+ :param _content_type: force content-type for the request.
1580
+ :type _content_type: str, Optional
1581
+ :param _headers: set to override the headers for a single
1582
+ request; this effectively ignores the headers
1583
+ in the spec for a single request.
1584
+ :type _headers: dict, optional
1585
+ :param _host_index: set to override the host_index for a single
1586
+ request; this effectively ignores the host_index
1587
+ in the spec for a single request.
1588
+ :type _host_index: int, optional
1589
+ :return: Returns the result object.
1590
+ """ # noqa: E501
1591
+
1592
+ _param = self._list_api_keys_serialize(
1593
+ x_daytona_organization_id=x_daytona_organization_id,
1594
+ _request_auth=_request_auth,
1595
+ _content_type=_content_type,
1596
+ _headers=_headers,
1597
+ _host_index=_host_index
1598
+ )
1599
+
1600
+ _response_types_map: Dict[str, Optional[str]] = {
1601
+ '200': "List[ApiKeyList]",
1602
+ '500': None,
1603
+ }
1604
+ response_data = await self.api_client.call_api(
1605
+ *_param,
1606
+ _request_timeout=_request_timeout
1607
+ )
1608
+ return response_data.response
1609
+
1610
+
1611
+ def _list_api_keys_serialize(
1612
+ self,
1613
+ x_daytona_organization_id,
1614
+ _request_auth,
1615
+ _content_type,
1616
+ _headers,
1617
+ _host_index,
1618
+ ) -> RequestSerialized:
1619
+
1620
+ _host = None
1621
+
1622
+ _collection_formats: Dict[str, str] = {
1623
+ }
1624
+
1625
+ _path_params: Dict[str, str] = {}
1626
+ _query_params: List[Tuple[str, str]] = []
1627
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1628
+ _form_params: List[Tuple[str, str]] = []
1629
+ _files: Dict[
1630
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1631
+ ] = {}
1632
+ _body_params: Optional[bytes] = None
1633
+
1634
+ # process the path parameters
1635
+ # process the query parameters
1636
+ # process the header parameters
1637
+ if x_daytona_organization_id is not None:
1638
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1639
+ # process the form parameters
1640
+ # process the body parameter
1641
+
1642
+
1643
+ # set the HTTP header `Accept`
1644
+ if 'Accept' not in _header_params:
1645
+ _header_params['Accept'] = self.api_client.select_header_accept(
1646
+ [
1647
+ 'application/json'
1648
+ ]
1649
+ )
1650
+
1651
+
1652
+ # authentication setting
1653
+ _auth_settings: List[str] = [
1654
+ 'bearer',
1655
+ 'oauth2'
1656
+ ]
1657
+
1658
+ return self.api_client.param_serialize(
1659
+ method='GET',
1660
+ resource_path='/api-keys',
1661
+ path_params=_path_params,
1662
+ query_params=_query_params,
1663
+ header_params=_header_params,
1664
+ body=_body_params,
1665
+ post_params=_form_params,
1666
+ files=_files,
1667
+ auth_settings=_auth_settings,
1668
+ collection_formats=_collection_formats,
1669
+ _host=_host,
1670
+ _request_auth=_request_auth
1671
+ )
1672
+
1673
+