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,1560 @@
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
22
+ from typing_extensions import Annotated
23
+ from daytona_api_client_async.models.create_runner import CreateRunner
24
+ from daytona_api_client_async.models.runner import Runner
25
+ from daytona_api_client_async.models.runner_snapshot_dto import RunnerSnapshotDto
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 RunnersApi:
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_runner(
47
+ self,
48
+ create_runner: CreateRunner,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> None:
62
+ """Create runner
63
+
64
+
65
+ :param create_runner: (required)
66
+ :type create_runner: CreateRunner
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._create_runner_serialize(
90
+ create_runner=create_runner,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ '201': None,
99
+ }
100
+ response_data = await self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ await response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ async def create_runner_with_http_info(
113
+ self,
114
+ create_runner: CreateRunner,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[None]:
128
+ """Create runner
129
+
130
+
131
+ :param create_runner: (required)
132
+ :type create_runner: CreateRunner
133
+ :param _request_timeout: timeout setting for this request. If one
134
+ number provided, it will be total request
135
+ timeout. It can also be a pair (tuple) of
136
+ (connection, read) timeouts.
137
+ :type _request_timeout: int, tuple(int, int), optional
138
+ :param _request_auth: set to override the auth_settings for an a single
139
+ request; this effectively ignores the
140
+ authentication in the spec for a single request.
141
+ :type _request_auth: dict, optional
142
+ :param _content_type: force content-type for the request.
143
+ :type _content_type: str, Optional
144
+ :param _headers: set to override the headers for a single
145
+ request; this effectively ignores the headers
146
+ in the spec for a single request.
147
+ :type _headers: dict, optional
148
+ :param _host_index: set to override the host_index for a single
149
+ request; this effectively ignores the host_index
150
+ in the spec for a single request.
151
+ :type _host_index: int, optional
152
+ :return: Returns the result object.
153
+ """ # noqa: E501
154
+
155
+ _param = self._create_runner_serialize(
156
+ create_runner=create_runner,
157
+ _request_auth=_request_auth,
158
+ _content_type=_content_type,
159
+ _headers=_headers,
160
+ _host_index=_host_index
161
+ )
162
+
163
+ _response_types_map: Dict[str, Optional[str]] = {
164
+ '201': None,
165
+ }
166
+ response_data = await self.api_client.call_api(
167
+ *_param,
168
+ _request_timeout=_request_timeout
169
+ )
170
+ await response_data.read()
171
+ return self.api_client.response_deserialize(
172
+ response_data=response_data,
173
+ response_types_map=_response_types_map,
174
+ )
175
+
176
+
177
+ @validate_call
178
+ async def create_runner_without_preload_content(
179
+ self,
180
+ create_runner: CreateRunner,
181
+ _request_timeout: Union[
182
+ None,
183
+ Annotated[StrictFloat, Field(gt=0)],
184
+ Tuple[
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Annotated[StrictFloat, Field(gt=0)]
187
+ ]
188
+ ] = None,
189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
+ _content_type: Optional[StrictStr] = None,
191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
+ ) -> RESTResponseType:
194
+ """Create runner
195
+
196
+
197
+ :param create_runner: (required)
198
+ :type create_runner: CreateRunner
199
+ :param _request_timeout: timeout setting for this request. If one
200
+ number provided, it will be total request
201
+ timeout. It can also be a pair (tuple) of
202
+ (connection, read) timeouts.
203
+ :type _request_timeout: int, tuple(int, int), optional
204
+ :param _request_auth: set to override the auth_settings for an a single
205
+ request; this effectively ignores the
206
+ authentication in the spec for a single request.
207
+ :type _request_auth: dict, optional
208
+ :param _content_type: force content-type for the request.
209
+ :type _content_type: str, Optional
210
+ :param _headers: set to override the headers for a single
211
+ request; this effectively ignores the headers
212
+ in the spec for a single request.
213
+ :type _headers: dict, optional
214
+ :param _host_index: set to override the host_index for a single
215
+ request; this effectively ignores the host_index
216
+ in the spec for a single request.
217
+ :type _host_index: int, optional
218
+ :return: Returns the result object.
219
+ """ # noqa: E501
220
+
221
+ _param = self._create_runner_serialize(
222
+ create_runner=create_runner,
223
+ _request_auth=_request_auth,
224
+ _content_type=_content_type,
225
+ _headers=_headers,
226
+ _host_index=_host_index
227
+ )
228
+
229
+ _response_types_map: Dict[str, Optional[str]] = {
230
+ '201': None,
231
+ }
232
+ response_data = await self.api_client.call_api(
233
+ *_param,
234
+ _request_timeout=_request_timeout
235
+ )
236
+ return response_data.response
237
+
238
+
239
+ def _create_runner_serialize(
240
+ self,
241
+ create_runner,
242
+ _request_auth,
243
+ _content_type,
244
+ _headers,
245
+ _host_index,
246
+ ) -> RequestSerialized:
247
+
248
+ _host = None
249
+
250
+ _collection_formats: Dict[str, str] = {
251
+ }
252
+
253
+ _path_params: Dict[str, str] = {}
254
+ _query_params: List[Tuple[str, str]] = []
255
+ _header_params: Dict[str, Optional[str]] = _headers or {}
256
+ _form_params: List[Tuple[str, str]] = []
257
+ _files: Dict[
258
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
259
+ ] = {}
260
+ _body_params: Optional[bytes] = None
261
+
262
+ # process the path parameters
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+ if create_runner is not None:
268
+ _body_params = create_runner
269
+
270
+
271
+
272
+ # set the HTTP header `Content-Type`
273
+ if _content_type:
274
+ _header_params['Content-Type'] = _content_type
275
+ else:
276
+ _default_content_type = (
277
+ self.api_client.select_header_content_type(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+ )
283
+ if _default_content_type is not None:
284
+ _header_params['Content-Type'] = _default_content_type
285
+
286
+ # authentication setting
287
+ _auth_settings: List[str] = [
288
+ 'bearer',
289
+ 'oauth2'
290
+ ]
291
+
292
+ return self.api_client.param_serialize(
293
+ method='POST',
294
+ resource_path='/runners',
295
+ path_params=_path_params,
296
+ query_params=_query_params,
297
+ header_params=_header_params,
298
+ body=_body_params,
299
+ post_params=_form_params,
300
+ files=_files,
301
+ auth_settings=_auth_settings,
302
+ collection_formats=_collection_formats,
303
+ _host=_host,
304
+ _request_auth=_request_auth
305
+ )
306
+
307
+
308
+
309
+
310
+ @validate_call
311
+ async def get_info_for_authenticated_runner(
312
+ self,
313
+ _request_timeout: Union[
314
+ None,
315
+ Annotated[StrictFloat, Field(gt=0)],
316
+ Tuple[
317
+ Annotated[StrictFloat, Field(gt=0)],
318
+ Annotated[StrictFloat, Field(gt=0)]
319
+ ]
320
+ ] = None,
321
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
322
+ _content_type: Optional[StrictStr] = None,
323
+ _headers: Optional[Dict[StrictStr, Any]] = None,
324
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
325
+ ) -> Runner:
326
+ """Get info for authenticated runner
327
+
328
+
329
+ :param _request_timeout: timeout setting for this request. If one
330
+ number provided, it will be total request
331
+ timeout. It can also be a pair (tuple) of
332
+ (connection, read) timeouts.
333
+ :type _request_timeout: int, tuple(int, int), optional
334
+ :param _request_auth: set to override the auth_settings for an a single
335
+ request; this effectively ignores the
336
+ authentication in the spec for a single request.
337
+ :type _request_auth: dict, optional
338
+ :param _content_type: force content-type for the request.
339
+ :type _content_type: str, Optional
340
+ :param _headers: set to override the headers for a single
341
+ request; this effectively ignores the headers
342
+ in the spec for a single request.
343
+ :type _headers: dict, optional
344
+ :param _host_index: set to override the host_index for a single
345
+ request; this effectively ignores the host_index
346
+ in the spec for a single request.
347
+ :type _host_index: int, optional
348
+ :return: Returns the result object.
349
+ """ # noqa: E501
350
+
351
+ _param = self._get_info_for_authenticated_runner_serialize(
352
+ _request_auth=_request_auth,
353
+ _content_type=_content_type,
354
+ _headers=_headers,
355
+ _host_index=_host_index
356
+ )
357
+
358
+ _response_types_map: Dict[str, Optional[str]] = {
359
+ '200': "Runner",
360
+ }
361
+ response_data = await self.api_client.call_api(
362
+ *_param,
363
+ _request_timeout=_request_timeout
364
+ )
365
+ await response_data.read()
366
+ return self.api_client.response_deserialize(
367
+ response_data=response_data,
368
+ response_types_map=_response_types_map,
369
+ ).data
370
+
371
+
372
+ @validate_call
373
+ async def get_info_for_authenticated_runner_with_http_info(
374
+ self,
375
+ _request_timeout: Union[
376
+ None,
377
+ Annotated[StrictFloat, Field(gt=0)],
378
+ Tuple[
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Annotated[StrictFloat, Field(gt=0)]
381
+ ]
382
+ ] = None,
383
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
384
+ _content_type: Optional[StrictStr] = None,
385
+ _headers: Optional[Dict[StrictStr, Any]] = None,
386
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
387
+ ) -> ApiResponse[Runner]:
388
+ """Get info for authenticated runner
389
+
390
+
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :type _request_timeout: int, tuple(int, int), optional
396
+ :param _request_auth: set to override the auth_settings for an a single
397
+ request; this effectively ignores the
398
+ authentication in the spec for a single request.
399
+ :type _request_auth: dict, optional
400
+ :param _content_type: force content-type for the request.
401
+ :type _content_type: str, Optional
402
+ :param _headers: set to override the headers for a single
403
+ request; this effectively ignores the headers
404
+ in the spec for a single request.
405
+ :type _headers: dict, optional
406
+ :param _host_index: set to override the host_index for a single
407
+ request; this effectively ignores the host_index
408
+ in the spec for a single request.
409
+ :type _host_index: int, optional
410
+ :return: Returns the result object.
411
+ """ # noqa: E501
412
+
413
+ _param = self._get_info_for_authenticated_runner_serialize(
414
+ _request_auth=_request_auth,
415
+ _content_type=_content_type,
416
+ _headers=_headers,
417
+ _host_index=_host_index
418
+ )
419
+
420
+ _response_types_map: Dict[str, Optional[str]] = {
421
+ '200': "Runner",
422
+ }
423
+ response_data = await self.api_client.call_api(
424
+ *_param,
425
+ _request_timeout=_request_timeout
426
+ )
427
+ await response_data.read()
428
+ return self.api_client.response_deserialize(
429
+ response_data=response_data,
430
+ response_types_map=_response_types_map,
431
+ )
432
+
433
+
434
+ @validate_call
435
+ async def get_info_for_authenticated_runner_without_preload_content(
436
+ self,
437
+ _request_timeout: Union[
438
+ None,
439
+ Annotated[StrictFloat, Field(gt=0)],
440
+ Tuple[
441
+ Annotated[StrictFloat, Field(gt=0)],
442
+ Annotated[StrictFloat, Field(gt=0)]
443
+ ]
444
+ ] = None,
445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
446
+ _content_type: Optional[StrictStr] = None,
447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
+ ) -> RESTResponseType:
450
+ """Get info for authenticated runner
451
+
452
+
453
+ :param _request_timeout: timeout setting for this request. If one
454
+ number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :type _request_timeout: int, tuple(int, int), optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the
460
+ authentication in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :param _content_type: force content-type for the request.
463
+ :type _content_type: str, Optional
464
+ :param _headers: set to override the headers for a single
465
+ request; this effectively ignores the headers
466
+ in the spec for a single request.
467
+ :type _headers: dict, optional
468
+ :param _host_index: set to override the host_index for a single
469
+ request; this effectively ignores the host_index
470
+ in the spec for a single request.
471
+ :type _host_index: int, optional
472
+ :return: Returns the result object.
473
+ """ # noqa: E501
474
+
475
+ _param = self._get_info_for_authenticated_runner_serialize(
476
+ _request_auth=_request_auth,
477
+ _content_type=_content_type,
478
+ _headers=_headers,
479
+ _host_index=_host_index
480
+ )
481
+
482
+ _response_types_map: Dict[str, Optional[str]] = {
483
+ '200': "Runner",
484
+ }
485
+ response_data = await self.api_client.call_api(
486
+ *_param,
487
+ _request_timeout=_request_timeout
488
+ )
489
+ return response_data.response
490
+
491
+
492
+ def _get_info_for_authenticated_runner_serialize(
493
+ self,
494
+ _request_auth,
495
+ _content_type,
496
+ _headers,
497
+ _host_index,
498
+ ) -> RequestSerialized:
499
+
500
+ _host = None
501
+
502
+ _collection_formats: Dict[str, str] = {
503
+ }
504
+
505
+ _path_params: Dict[str, str] = {}
506
+ _query_params: List[Tuple[str, str]] = []
507
+ _header_params: Dict[str, Optional[str]] = _headers or {}
508
+ _form_params: List[Tuple[str, str]] = []
509
+ _files: Dict[
510
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
511
+ ] = {}
512
+ _body_params: Optional[bytes] = None
513
+
514
+ # process the path parameters
515
+ # process the query parameters
516
+ # process the header parameters
517
+ # process the form parameters
518
+ # process the body parameter
519
+
520
+
521
+ # set the HTTP header `Accept`
522
+ if 'Accept' not in _header_params:
523
+ _header_params['Accept'] = self.api_client.select_header_accept(
524
+ [
525
+ 'application/json'
526
+ ]
527
+ )
528
+
529
+
530
+ # authentication setting
531
+ _auth_settings: List[str] = [
532
+ 'bearer',
533
+ 'oauth2'
534
+ ]
535
+
536
+ return self.api_client.param_serialize(
537
+ method='GET',
538
+ resource_path='/runners/me',
539
+ path_params=_path_params,
540
+ query_params=_query_params,
541
+ header_params=_header_params,
542
+ body=_body_params,
543
+ post_params=_form_params,
544
+ files=_files,
545
+ auth_settings=_auth_settings,
546
+ collection_formats=_collection_formats,
547
+ _host=_host,
548
+ _request_auth=_request_auth
549
+ )
550
+
551
+
552
+
553
+
554
+ @validate_call
555
+ async def get_runner_by_sandbox_id(
556
+ self,
557
+ sandbox_id: StrictStr,
558
+ _request_timeout: Union[
559
+ None,
560
+ Annotated[StrictFloat, Field(gt=0)],
561
+ Tuple[
562
+ Annotated[StrictFloat, Field(gt=0)],
563
+ Annotated[StrictFloat, Field(gt=0)]
564
+ ]
565
+ ] = None,
566
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
567
+ _content_type: Optional[StrictStr] = None,
568
+ _headers: Optional[Dict[StrictStr, Any]] = None,
569
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
570
+ ) -> Runner:
571
+ """Get runner by sandbox ID
572
+
573
+
574
+ :param sandbox_id: (required)
575
+ :type sandbox_id: str
576
+ :param _request_timeout: timeout setting for this request. If one
577
+ number provided, it will be total request
578
+ timeout. It can also be a pair (tuple) of
579
+ (connection, read) timeouts.
580
+ :type _request_timeout: int, tuple(int, int), optional
581
+ :param _request_auth: set to override the auth_settings for an a single
582
+ request; this effectively ignores the
583
+ authentication in the spec for a single request.
584
+ :type _request_auth: dict, optional
585
+ :param _content_type: force content-type for the request.
586
+ :type _content_type: str, Optional
587
+ :param _headers: set to override the headers for a single
588
+ request; this effectively ignores the headers
589
+ in the spec for a single request.
590
+ :type _headers: dict, optional
591
+ :param _host_index: set to override the host_index for a single
592
+ request; this effectively ignores the host_index
593
+ in the spec for a single request.
594
+ :type _host_index: int, optional
595
+ :return: Returns the result object.
596
+ """ # noqa: E501
597
+
598
+ _param = self._get_runner_by_sandbox_id_serialize(
599
+ sandbox_id=sandbox_id,
600
+ _request_auth=_request_auth,
601
+ _content_type=_content_type,
602
+ _headers=_headers,
603
+ _host_index=_host_index
604
+ )
605
+
606
+ _response_types_map: Dict[str, Optional[str]] = {
607
+ '200': "Runner",
608
+ }
609
+ response_data = await self.api_client.call_api(
610
+ *_param,
611
+ _request_timeout=_request_timeout
612
+ )
613
+ await response_data.read()
614
+ return self.api_client.response_deserialize(
615
+ response_data=response_data,
616
+ response_types_map=_response_types_map,
617
+ ).data
618
+
619
+
620
+ @validate_call
621
+ async def get_runner_by_sandbox_id_with_http_info(
622
+ self,
623
+ sandbox_id: StrictStr,
624
+ _request_timeout: Union[
625
+ None,
626
+ Annotated[StrictFloat, Field(gt=0)],
627
+ Tuple[
628
+ Annotated[StrictFloat, Field(gt=0)],
629
+ Annotated[StrictFloat, Field(gt=0)]
630
+ ]
631
+ ] = None,
632
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
633
+ _content_type: Optional[StrictStr] = None,
634
+ _headers: Optional[Dict[StrictStr, Any]] = None,
635
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
636
+ ) -> ApiResponse[Runner]:
637
+ """Get runner by sandbox ID
638
+
639
+
640
+ :param sandbox_id: (required)
641
+ :type sandbox_id: str
642
+ :param _request_timeout: timeout setting for this request. If one
643
+ number provided, it will be total request
644
+ timeout. It can also be a pair (tuple) of
645
+ (connection, read) timeouts.
646
+ :type _request_timeout: int, tuple(int, int), optional
647
+ :param _request_auth: set to override the auth_settings for an a single
648
+ request; this effectively ignores the
649
+ authentication in the spec for a single request.
650
+ :type _request_auth: dict, optional
651
+ :param _content_type: force content-type for the request.
652
+ :type _content_type: str, Optional
653
+ :param _headers: set to override the headers for a single
654
+ request; this effectively ignores the headers
655
+ in the spec for a single request.
656
+ :type _headers: dict, optional
657
+ :param _host_index: set to override the host_index for a single
658
+ request; this effectively ignores the host_index
659
+ in the spec for a single request.
660
+ :type _host_index: int, optional
661
+ :return: Returns the result object.
662
+ """ # noqa: E501
663
+
664
+ _param = self._get_runner_by_sandbox_id_serialize(
665
+ sandbox_id=sandbox_id,
666
+ _request_auth=_request_auth,
667
+ _content_type=_content_type,
668
+ _headers=_headers,
669
+ _host_index=_host_index
670
+ )
671
+
672
+ _response_types_map: Dict[str, Optional[str]] = {
673
+ '200': "Runner",
674
+ }
675
+ response_data = await self.api_client.call_api(
676
+ *_param,
677
+ _request_timeout=_request_timeout
678
+ )
679
+ await response_data.read()
680
+ return self.api_client.response_deserialize(
681
+ response_data=response_data,
682
+ response_types_map=_response_types_map,
683
+ )
684
+
685
+
686
+ @validate_call
687
+ async def get_runner_by_sandbox_id_without_preload_content(
688
+ self,
689
+ sandbox_id: StrictStr,
690
+ _request_timeout: Union[
691
+ None,
692
+ Annotated[StrictFloat, Field(gt=0)],
693
+ Tuple[
694
+ Annotated[StrictFloat, Field(gt=0)],
695
+ Annotated[StrictFloat, Field(gt=0)]
696
+ ]
697
+ ] = None,
698
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
699
+ _content_type: Optional[StrictStr] = None,
700
+ _headers: Optional[Dict[StrictStr, Any]] = None,
701
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
702
+ ) -> RESTResponseType:
703
+ """Get runner by sandbox ID
704
+
705
+
706
+ :param sandbox_id: (required)
707
+ :type sandbox_id: str
708
+ :param _request_timeout: timeout setting for this request. If one
709
+ number provided, it will be total request
710
+ timeout. It can also be a pair (tuple) of
711
+ (connection, read) timeouts.
712
+ :type _request_timeout: int, tuple(int, int), optional
713
+ :param _request_auth: set to override the auth_settings for an a single
714
+ request; this effectively ignores the
715
+ authentication in the spec for a single request.
716
+ :type _request_auth: dict, optional
717
+ :param _content_type: force content-type for the request.
718
+ :type _content_type: str, Optional
719
+ :param _headers: set to override the headers for a single
720
+ request; this effectively ignores the headers
721
+ in the spec for a single request.
722
+ :type _headers: dict, optional
723
+ :param _host_index: set to override the host_index for a single
724
+ request; this effectively ignores the host_index
725
+ in the spec for a single request.
726
+ :type _host_index: int, optional
727
+ :return: Returns the result object.
728
+ """ # noqa: E501
729
+
730
+ _param = self._get_runner_by_sandbox_id_serialize(
731
+ sandbox_id=sandbox_id,
732
+ _request_auth=_request_auth,
733
+ _content_type=_content_type,
734
+ _headers=_headers,
735
+ _host_index=_host_index
736
+ )
737
+
738
+ _response_types_map: Dict[str, Optional[str]] = {
739
+ '200': "Runner",
740
+ }
741
+ response_data = await self.api_client.call_api(
742
+ *_param,
743
+ _request_timeout=_request_timeout
744
+ )
745
+ return response_data.response
746
+
747
+
748
+ def _get_runner_by_sandbox_id_serialize(
749
+ self,
750
+ sandbox_id,
751
+ _request_auth,
752
+ _content_type,
753
+ _headers,
754
+ _host_index,
755
+ ) -> RequestSerialized:
756
+
757
+ _host = None
758
+
759
+ _collection_formats: Dict[str, str] = {
760
+ }
761
+
762
+ _path_params: Dict[str, str] = {}
763
+ _query_params: List[Tuple[str, str]] = []
764
+ _header_params: Dict[str, Optional[str]] = _headers or {}
765
+ _form_params: List[Tuple[str, str]] = []
766
+ _files: Dict[
767
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
768
+ ] = {}
769
+ _body_params: Optional[bytes] = None
770
+
771
+ # process the path parameters
772
+ if sandbox_id is not None:
773
+ _path_params['sandboxId'] = sandbox_id
774
+ # process the query parameters
775
+ # process the header parameters
776
+ # process the form parameters
777
+ # process the body parameter
778
+
779
+
780
+ # set the HTTP header `Accept`
781
+ if 'Accept' not in _header_params:
782
+ _header_params['Accept'] = self.api_client.select_header_accept(
783
+ [
784
+ 'application/json'
785
+ ]
786
+ )
787
+
788
+
789
+ # authentication setting
790
+ _auth_settings: List[str] = [
791
+ 'bearer',
792
+ 'oauth2'
793
+ ]
794
+
795
+ return self.api_client.param_serialize(
796
+ method='GET',
797
+ resource_path='/runners/by-sandbox/{sandboxId}',
798
+ path_params=_path_params,
799
+ query_params=_query_params,
800
+ header_params=_header_params,
801
+ body=_body_params,
802
+ post_params=_form_params,
803
+ files=_files,
804
+ auth_settings=_auth_settings,
805
+ collection_formats=_collection_formats,
806
+ _host=_host,
807
+ _request_auth=_request_auth
808
+ )
809
+
810
+
811
+
812
+
813
+ @validate_call
814
+ async def get_runners_by_snapshot_ref(
815
+ self,
816
+ ref: Annotated[StrictStr, Field(description="Snapshot ref")],
817
+ _request_timeout: Union[
818
+ None,
819
+ Annotated[StrictFloat, Field(gt=0)],
820
+ Tuple[
821
+ Annotated[StrictFloat, Field(gt=0)],
822
+ Annotated[StrictFloat, Field(gt=0)]
823
+ ]
824
+ ] = None,
825
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
826
+ _content_type: Optional[StrictStr] = None,
827
+ _headers: Optional[Dict[StrictStr, Any]] = None,
828
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
829
+ ) -> List[RunnerSnapshotDto]:
830
+ """Get runners by snapshot ref
831
+
832
+
833
+ :param ref: Snapshot ref (required)
834
+ :type ref: str
835
+ :param _request_timeout: timeout setting for this request. If one
836
+ number provided, it will be total request
837
+ timeout. It can also be a pair (tuple) of
838
+ (connection, read) timeouts.
839
+ :type _request_timeout: int, tuple(int, int), optional
840
+ :param _request_auth: set to override the auth_settings for an a single
841
+ request; this effectively ignores the
842
+ authentication in the spec for a single request.
843
+ :type _request_auth: dict, optional
844
+ :param _content_type: force content-type for the request.
845
+ :type _content_type: str, Optional
846
+ :param _headers: set to override the headers for a single
847
+ request; this effectively ignores the headers
848
+ in the spec for a single request.
849
+ :type _headers: dict, optional
850
+ :param _host_index: set to override the host_index for a single
851
+ request; this effectively ignores the host_index
852
+ in the spec for a single request.
853
+ :type _host_index: int, optional
854
+ :return: Returns the result object.
855
+ """ # noqa: E501
856
+
857
+ _param = self._get_runners_by_snapshot_ref_serialize(
858
+ ref=ref,
859
+ _request_auth=_request_auth,
860
+ _content_type=_content_type,
861
+ _headers=_headers,
862
+ _host_index=_host_index
863
+ )
864
+
865
+ _response_types_map: Dict[str, Optional[str]] = {
866
+ '200': "List[RunnerSnapshotDto]",
867
+ }
868
+ response_data = await self.api_client.call_api(
869
+ *_param,
870
+ _request_timeout=_request_timeout
871
+ )
872
+ await response_data.read()
873
+ return self.api_client.response_deserialize(
874
+ response_data=response_data,
875
+ response_types_map=_response_types_map,
876
+ ).data
877
+
878
+
879
+ @validate_call
880
+ async def get_runners_by_snapshot_ref_with_http_info(
881
+ self,
882
+ ref: Annotated[StrictStr, Field(description="Snapshot ref")],
883
+ _request_timeout: Union[
884
+ None,
885
+ Annotated[StrictFloat, Field(gt=0)],
886
+ Tuple[
887
+ Annotated[StrictFloat, Field(gt=0)],
888
+ Annotated[StrictFloat, Field(gt=0)]
889
+ ]
890
+ ] = None,
891
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
892
+ _content_type: Optional[StrictStr] = None,
893
+ _headers: Optional[Dict[StrictStr, Any]] = None,
894
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
895
+ ) -> ApiResponse[List[RunnerSnapshotDto]]:
896
+ """Get runners by snapshot ref
897
+
898
+
899
+ :param ref: Snapshot ref (required)
900
+ :type ref: str
901
+ :param _request_timeout: timeout setting for this request. If one
902
+ number provided, it will be total request
903
+ timeout. It can also be a pair (tuple) of
904
+ (connection, read) timeouts.
905
+ :type _request_timeout: int, tuple(int, int), optional
906
+ :param _request_auth: set to override the auth_settings for an a single
907
+ request; this effectively ignores the
908
+ authentication in the spec for a single request.
909
+ :type _request_auth: dict, optional
910
+ :param _content_type: force content-type for the request.
911
+ :type _content_type: str, Optional
912
+ :param _headers: set to override the headers for a single
913
+ request; this effectively ignores the headers
914
+ in the spec for a single request.
915
+ :type _headers: dict, optional
916
+ :param _host_index: set to override the host_index for a single
917
+ request; this effectively ignores the host_index
918
+ in the spec for a single request.
919
+ :type _host_index: int, optional
920
+ :return: Returns the result object.
921
+ """ # noqa: E501
922
+
923
+ _param = self._get_runners_by_snapshot_ref_serialize(
924
+ ref=ref,
925
+ _request_auth=_request_auth,
926
+ _content_type=_content_type,
927
+ _headers=_headers,
928
+ _host_index=_host_index
929
+ )
930
+
931
+ _response_types_map: Dict[str, Optional[str]] = {
932
+ '200': "List[RunnerSnapshotDto]",
933
+ }
934
+ response_data = await self.api_client.call_api(
935
+ *_param,
936
+ _request_timeout=_request_timeout
937
+ )
938
+ await response_data.read()
939
+ return self.api_client.response_deserialize(
940
+ response_data=response_data,
941
+ response_types_map=_response_types_map,
942
+ )
943
+
944
+
945
+ @validate_call
946
+ async def get_runners_by_snapshot_ref_without_preload_content(
947
+ self,
948
+ ref: Annotated[StrictStr, Field(description="Snapshot ref")],
949
+ _request_timeout: Union[
950
+ None,
951
+ Annotated[StrictFloat, Field(gt=0)],
952
+ Tuple[
953
+ Annotated[StrictFloat, Field(gt=0)],
954
+ Annotated[StrictFloat, Field(gt=0)]
955
+ ]
956
+ ] = None,
957
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
958
+ _content_type: Optional[StrictStr] = None,
959
+ _headers: Optional[Dict[StrictStr, Any]] = None,
960
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
961
+ ) -> RESTResponseType:
962
+ """Get runners by snapshot ref
963
+
964
+
965
+ :param ref: Snapshot ref (required)
966
+ :type ref: str
967
+ :param _request_timeout: timeout setting for this request. If one
968
+ number provided, it will be total request
969
+ timeout. It can also be a pair (tuple) of
970
+ (connection, read) timeouts.
971
+ :type _request_timeout: int, tuple(int, int), optional
972
+ :param _request_auth: set to override the auth_settings for an a single
973
+ request; this effectively ignores the
974
+ authentication in the spec for a single request.
975
+ :type _request_auth: dict, optional
976
+ :param _content_type: force content-type for the request.
977
+ :type _content_type: str, Optional
978
+ :param _headers: set to override the headers for a single
979
+ request; this effectively ignores the headers
980
+ in the spec for a single request.
981
+ :type _headers: dict, optional
982
+ :param _host_index: set to override the host_index for a single
983
+ request; this effectively ignores the host_index
984
+ in the spec for a single request.
985
+ :type _host_index: int, optional
986
+ :return: Returns the result object.
987
+ """ # noqa: E501
988
+
989
+ _param = self._get_runners_by_snapshot_ref_serialize(
990
+ ref=ref,
991
+ _request_auth=_request_auth,
992
+ _content_type=_content_type,
993
+ _headers=_headers,
994
+ _host_index=_host_index
995
+ )
996
+
997
+ _response_types_map: Dict[str, Optional[str]] = {
998
+ '200': "List[RunnerSnapshotDto]",
999
+ }
1000
+ response_data = await self.api_client.call_api(
1001
+ *_param,
1002
+ _request_timeout=_request_timeout
1003
+ )
1004
+ return response_data.response
1005
+
1006
+
1007
+ def _get_runners_by_snapshot_ref_serialize(
1008
+ self,
1009
+ ref,
1010
+ _request_auth,
1011
+ _content_type,
1012
+ _headers,
1013
+ _host_index,
1014
+ ) -> RequestSerialized:
1015
+
1016
+ _host = None
1017
+
1018
+ _collection_formats: Dict[str, str] = {
1019
+ }
1020
+
1021
+ _path_params: Dict[str, str] = {}
1022
+ _query_params: List[Tuple[str, str]] = []
1023
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1024
+ _form_params: List[Tuple[str, str]] = []
1025
+ _files: Dict[
1026
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1027
+ ] = {}
1028
+ _body_params: Optional[bytes] = None
1029
+
1030
+ # process the path parameters
1031
+ # process the query parameters
1032
+ if ref is not None:
1033
+
1034
+ _query_params.append(('ref', ref))
1035
+
1036
+ # process the header parameters
1037
+ # process the form parameters
1038
+ # process the body parameter
1039
+
1040
+
1041
+ # set the HTTP header `Accept`
1042
+ if 'Accept' not in _header_params:
1043
+ _header_params['Accept'] = self.api_client.select_header_accept(
1044
+ [
1045
+ 'application/json'
1046
+ ]
1047
+ )
1048
+
1049
+
1050
+ # authentication setting
1051
+ _auth_settings: List[str] = [
1052
+ 'bearer',
1053
+ 'oauth2'
1054
+ ]
1055
+
1056
+ return self.api_client.param_serialize(
1057
+ method='GET',
1058
+ resource_path='/runners/by-snapshot-ref',
1059
+ path_params=_path_params,
1060
+ query_params=_query_params,
1061
+ header_params=_header_params,
1062
+ body=_body_params,
1063
+ post_params=_form_params,
1064
+ files=_files,
1065
+ auth_settings=_auth_settings,
1066
+ collection_formats=_collection_formats,
1067
+ _host=_host,
1068
+ _request_auth=_request_auth
1069
+ )
1070
+
1071
+
1072
+
1073
+
1074
+ @validate_call
1075
+ async def list_runners(
1076
+ self,
1077
+ _request_timeout: Union[
1078
+ None,
1079
+ Annotated[StrictFloat, Field(gt=0)],
1080
+ Tuple[
1081
+ Annotated[StrictFloat, Field(gt=0)],
1082
+ Annotated[StrictFloat, Field(gt=0)]
1083
+ ]
1084
+ ] = None,
1085
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1086
+ _content_type: Optional[StrictStr] = None,
1087
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1088
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1089
+ ) -> None:
1090
+ """List all runners
1091
+
1092
+
1093
+ :param _request_timeout: timeout setting for this request. If one
1094
+ number provided, it will be total request
1095
+ timeout. It can also be a pair (tuple) of
1096
+ (connection, read) timeouts.
1097
+ :type _request_timeout: int, tuple(int, int), optional
1098
+ :param _request_auth: set to override the auth_settings for an a single
1099
+ request; this effectively ignores the
1100
+ authentication in the spec for a single request.
1101
+ :type _request_auth: dict, optional
1102
+ :param _content_type: force content-type for the request.
1103
+ :type _content_type: str, Optional
1104
+ :param _headers: set to override the headers for a single
1105
+ request; this effectively ignores the headers
1106
+ in the spec for a single request.
1107
+ :type _headers: dict, optional
1108
+ :param _host_index: set to override the host_index for a single
1109
+ request; this effectively ignores the host_index
1110
+ in the spec for a single request.
1111
+ :type _host_index: int, optional
1112
+ :return: Returns the result object.
1113
+ """ # noqa: E501
1114
+
1115
+ _param = self._list_runners_serialize(
1116
+ _request_auth=_request_auth,
1117
+ _content_type=_content_type,
1118
+ _headers=_headers,
1119
+ _host_index=_host_index
1120
+ )
1121
+
1122
+ _response_types_map: Dict[str, Optional[str]] = {
1123
+ '200': None,
1124
+ }
1125
+ response_data = await self.api_client.call_api(
1126
+ *_param,
1127
+ _request_timeout=_request_timeout
1128
+ )
1129
+ await response_data.read()
1130
+ return self.api_client.response_deserialize(
1131
+ response_data=response_data,
1132
+ response_types_map=_response_types_map,
1133
+ ).data
1134
+
1135
+
1136
+ @validate_call
1137
+ async def list_runners_with_http_info(
1138
+ self,
1139
+ _request_timeout: Union[
1140
+ None,
1141
+ Annotated[StrictFloat, Field(gt=0)],
1142
+ Tuple[
1143
+ Annotated[StrictFloat, Field(gt=0)],
1144
+ Annotated[StrictFloat, Field(gt=0)]
1145
+ ]
1146
+ ] = None,
1147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1148
+ _content_type: Optional[StrictStr] = None,
1149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1151
+ ) -> ApiResponse[None]:
1152
+ """List all runners
1153
+
1154
+
1155
+ :param _request_timeout: timeout setting for this request. If one
1156
+ number provided, it will be total request
1157
+ timeout. It can also be a pair (tuple) of
1158
+ (connection, read) timeouts.
1159
+ :type _request_timeout: int, tuple(int, int), optional
1160
+ :param _request_auth: set to override the auth_settings for an a single
1161
+ request; this effectively ignores the
1162
+ authentication in the spec for a single request.
1163
+ :type _request_auth: dict, optional
1164
+ :param _content_type: force content-type for the request.
1165
+ :type _content_type: str, Optional
1166
+ :param _headers: set to override the headers for a single
1167
+ request; this effectively ignores the headers
1168
+ in the spec for a single request.
1169
+ :type _headers: dict, optional
1170
+ :param _host_index: set to override the host_index for a single
1171
+ request; this effectively ignores the host_index
1172
+ in the spec for a single request.
1173
+ :type _host_index: int, optional
1174
+ :return: Returns the result object.
1175
+ """ # noqa: E501
1176
+
1177
+ _param = self._list_runners_serialize(
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': None,
1186
+ }
1187
+ response_data = await self.api_client.call_api(
1188
+ *_param,
1189
+ _request_timeout=_request_timeout
1190
+ )
1191
+ await response_data.read()
1192
+ return self.api_client.response_deserialize(
1193
+ response_data=response_data,
1194
+ response_types_map=_response_types_map,
1195
+ )
1196
+
1197
+
1198
+ @validate_call
1199
+ async def list_runners_without_preload_content(
1200
+ self,
1201
+ _request_timeout: Union[
1202
+ None,
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Tuple[
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Annotated[StrictFloat, Field(gt=0)]
1207
+ ]
1208
+ ] = None,
1209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1210
+ _content_type: Optional[StrictStr] = None,
1211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1213
+ ) -> RESTResponseType:
1214
+ """List all runners
1215
+
1216
+
1217
+ :param _request_timeout: timeout setting for this request. If one
1218
+ number provided, it will be total request
1219
+ timeout. It can also be a pair (tuple) of
1220
+ (connection, read) timeouts.
1221
+ :type _request_timeout: int, tuple(int, int), optional
1222
+ :param _request_auth: set to override the auth_settings for an a single
1223
+ request; this effectively ignores the
1224
+ authentication in the spec for a single request.
1225
+ :type _request_auth: dict, optional
1226
+ :param _content_type: force content-type for the request.
1227
+ :type _content_type: str, Optional
1228
+ :param _headers: set to override the headers for a single
1229
+ request; this effectively ignores the headers
1230
+ in the spec for a single request.
1231
+ :type _headers: dict, optional
1232
+ :param _host_index: set to override the host_index for a single
1233
+ request; this effectively ignores the host_index
1234
+ in the spec for a single request.
1235
+ :type _host_index: int, optional
1236
+ :return: Returns the result object.
1237
+ """ # noqa: E501
1238
+
1239
+ _param = self._list_runners_serialize(
1240
+ _request_auth=_request_auth,
1241
+ _content_type=_content_type,
1242
+ _headers=_headers,
1243
+ _host_index=_host_index
1244
+ )
1245
+
1246
+ _response_types_map: Dict[str, Optional[str]] = {
1247
+ '200': None,
1248
+ }
1249
+ response_data = await self.api_client.call_api(
1250
+ *_param,
1251
+ _request_timeout=_request_timeout
1252
+ )
1253
+ return response_data.response
1254
+
1255
+
1256
+ def _list_runners_serialize(
1257
+ self,
1258
+ _request_auth,
1259
+ _content_type,
1260
+ _headers,
1261
+ _host_index,
1262
+ ) -> RequestSerialized:
1263
+
1264
+ _host = None
1265
+
1266
+ _collection_formats: Dict[str, str] = {
1267
+ }
1268
+
1269
+ _path_params: Dict[str, str] = {}
1270
+ _query_params: List[Tuple[str, str]] = []
1271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1272
+ _form_params: List[Tuple[str, str]] = []
1273
+ _files: Dict[
1274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1275
+ ] = {}
1276
+ _body_params: Optional[bytes] = None
1277
+
1278
+ # process the path parameters
1279
+ # process the query parameters
1280
+ # process the header parameters
1281
+ # process the form parameters
1282
+ # process the body parameter
1283
+
1284
+
1285
+
1286
+
1287
+ # authentication setting
1288
+ _auth_settings: List[str] = [
1289
+ 'bearer',
1290
+ 'oauth2'
1291
+ ]
1292
+
1293
+ return self.api_client.param_serialize(
1294
+ method='GET',
1295
+ resource_path='/runners',
1296
+ path_params=_path_params,
1297
+ query_params=_query_params,
1298
+ header_params=_header_params,
1299
+ body=_body_params,
1300
+ post_params=_form_params,
1301
+ files=_files,
1302
+ auth_settings=_auth_settings,
1303
+ collection_formats=_collection_formats,
1304
+ _host=_host,
1305
+ _request_auth=_request_auth
1306
+ )
1307
+
1308
+
1309
+
1310
+
1311
+ @validate_call
1312
+ async def update_runner_scheduling(
1313
+ self,
1314
+ id: StrictStr,
1315
+ _request_timeout: Union[
1316
+ None,
1317
+ Annotated[StrictFloat, Field(gt=0)],
1318
+ Tuple[
1319
+ Annotated[StrictFloat, Field(gt=0)],
1320
+ Annotated[StrictFloat, Field(gt=0)]
1321
+ ]
1322
+ ] = None,
1323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1324
+ _content_type: Optional[StrictStr] = None,
1325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1327
+ ) -> None:
1328
+ """Update runner scheduling status
1329
+
1330
+
1331
+ :param id: (required)
1332
+ :type id: str
1333
+ :param _request_timeout: timeout setting for this request. If one
1334
+ number provided, it will be total request
1335
+ timeout. It can also be a pair (tuple) of
1336
+ (connection, read) timeouts.
1337
+ :type _request_timeout: int, tuple(int, int), optional
1338
+ :param _request_auth: set to override the auth_settings for an a single
1339
+ request; this effectively ignores the
1340
+ authentication in the spec for a single request.
1341
+ :type _request_auth: dict, optional
1342
+ :param _content_type: force content-type for the request.
1343
+ :type _content_type: str, Optional
1344
+ :param _headers: set to override the headers for a single
1345
+ request; this effectively ignores the headers
1346
+ in the spec for a single request.
1347
+ :type _headers: dict, optional
1348
+ :param _host_index: set to override the host_index for a single
1349
+ request; this effectively ignores the host_index
1350
+ in the spec for a single request.
1351
+ :type _host_index: int, optional
1352
+ :return: Returns the result object.
1353
+ """ # noqa: E501
1354
+
1355
+ _param = self._update_runner_scheduling_serialize(
1356
+ id=id,
1357
+ _request_auth=_request_auth,
1358
+ _content_type=_content_type,
1359
+ _headers=_headers,
1360
+ _host_index=_host_index
1361
+ )
1362
+
1363
+ _response_types_map: Dict[str, Optional[str]] = {
1364
+ '200': None,
1365
+ }
1366
+ response_data = await self.api_client.call_api(
1367
+ *_param,
1368
+ _request_timeout=_request_timeout
1369
+ )
1370
+ await response_data.read()
1371
+ return self.api_client.response_deserialize(
1372
+ response_data=response_data,
1373
+ response_types_map=_response_types_map,
1374
+ ).data
1375
+
1376
+
1377
+ @validate_call
1378
+ async def update_runner_scheduling_with_http_info(
1379
+ self,
1380
+ id: StrictStr,
1381
+ _request_timeout: Union[
1382
+ None,
1383
+ Annotated[StrictFloat, Field(gt=0)],
1384
+ Tuple[
1385
+ Annotated[StrictFloat, Field(gt=0)],
1386
+ Annotated[StrictFloat, Field(gt=0)]
1387
+ ]
1388
+ ] = None,
1389
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1390
+ _content_type: Optional[StrictStr] = None,
1391
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1392
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1393
+ ) -> ApiResponse[None]:
1394
+ """Update runner scheduling status
1395
+
1396
+
1397
+ :param id: (required)
1398
+ :type id: str
1399
+ :param _request_timeout: timeout setting for this request. If one
1400
+ number provided, it will be total request
1401
+ timeout. It can also be a pair (tuple) of
1402
+ (connection, read) timeouts.
1403
+ :type _request_timeout: int, tuple(int, int), optional
1404
+ :param _request_auth: set to override the auth_settings for an a single
1405
+ request; this effectively ignores the
1406
+ authentication in the spec for a single request.
1407
+ :type _request_auth: dict, optional
1408
+ :param _content_type: force content-type for the request.
1409
+ :type _content_type: str, Optional
1410
+ :param _headers: set to override the headers for a single
1411
+ request; this effectively ignores the headers
1412
+ in the spec for a single request.
1413
+ :type _headers: dict, optional
1414
+ :param _host_index: set to override the host_index for a single
1415
+ request; this effectively ignores the host_index
1416
+ in the spec for a single request.
1417
+ :type _host_index: int, optional
1418
+ :return: Returns the result object.
1419
+ """ # noqa: E501
1420
+
1421
+ _param = self._update_runner_scheduling_serialize(
1422
+ id=id,
1423
+ _request_auth=_request_auth,
1424
+ _content_type=_content_type,
1425
+ _headers=_headers,
1426
+ _host_index=_host_index
1427
+ )
1428
+
1429
+ _response_types_map: Dict[str, Optional[str]] = {
1430
+ '200': None,
1431
+ }
1432
+ response_data = await self.api_client.call_api(
1433
+ *_param,
1434
+ _request_timeout=_request_timeout
1435
+ )
1436
+ await response_data.read()
1437
+ return self.api_client.response_deserialize(
1438
+ response_data=response_data,
1439
+ response_types_map=_response_types_map,
1440
+ )
1441
+
1442
+
1443
+ @validate_call
1444
+ async def update_runner_scheduling_without_preload_content(
1445
+ self,
1446
+ id: StrictStr,
1447
+ _request_timeout: Union[
1448
+ None,
1449
+ Annotated[StrictFloat, Field(gt=0)],
1450
+ Tuple[
1451
+ Annotated[StrictFloat, Field(gt=0)],
1452
+ Annotated[StrictFloat, Field(gt=0)]
1453
+ ]
1454
+ ] = None,
1455
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1456
+ _content_type: Optional[StrictStr] = None,
1457
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1458
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1459
+ ) -> RESTResponseType:
1460
+ """Update runner scheduling status
1461
+
1462
+
1463
+ :param id: (required)
1464
+ :type id: str
1465
+ :param _request_timeout: timeout setting for this request. If one
1466
+ number provided, it will be total request
1467
+ timeout. It can also be a pair (tuple) of
1468
+ (connection, read) timeouts.
1469
+ :type _request_timeout: int, tuple(int, int), optional
1470
+ :param _request_auth: set to override the auth_settings for an a single
1471
+ request; this effectively ignores the
1472
+ authentication in the spec for a single request.
1473
+ :type _request_auth: dict, optional
1474
+ :param _content_type: force content-type for the request.
1475
+ :type _content_type: str, Optional
1476
+ :param _headers: set to override the headers for a single
1477
+ request; this effectively ignores the headers
1478
+ in the spec for a single request.
1479
+ :type _headers: dict, optional
1480
+ :param _host_index: set to override the host_index for a single
1481
+ request; this effectively ignores the host_index
1482
+ in the spec for a single request.
1483
+ :type _host_index: int, optional
1484
+ :return: Returns the result object.
1485
+ """ # noqa: E501
1486
+
1487
+ _param = self._update_runner_scheduling_serialize(
1488
+ id=id,
1489
+ _request_auth=_request_auth,
1490
+ _content_type=_content_type,
1491
+ _headers=_headers,
1492
+ _host_index=_host_index
1493
+ )
1494
+
1495
+ _response_types_map: Dict[str, Optional[str]] = {
1496
+ '200': None,
1497
+ }
1498
+ response_data = await self.api_client.call_api(
1499
+ *_param,
1500
+ _request_timeout=_request_timeout
1501
+ )
1502
+ return response_data.response
1503
+
1504
+
1505
+ def _update_runner_scheduling_serialize(
1506
+ self,
1507
+ id,
1508
+ _request_auth,
1509
+ _content_type,
1510
+ _headers,
1511
+ _host_index,
1512
+ ) -> RequestSerialized:
1513
+
1514
+ _host = None
1515
+
1516
+ _collection_formats: Dict[str, str] = {
1517
+ }
1518
+
1519
+ _path_params: Dict[str, str] = {}
1520
+ _query_params: List[Tuple[str, str]] = []
1521
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1522
+ _form_params: List[Tuple[str, str]] = []
1523
+ _files: Dict[
1524
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1525
+ ] = {}
1526
+ _body_params: Optional[bytes] = None
1527
+
1528
+ # process the path parameters
1529
+ if id is not None:
1530
+ _path_params['id'] = id
1531
+ # process the query parameters
1532
+ # process the header parameters
1533
+ # process the form parameters
1534
+ # process the body parameter
1535
+
1536
+
1537
+
1538
+
1539
+ # authentication setting
1540
+ _auth_settings: List[str] = [
1541
+ 'bearer',
1542
+ 'oauth2'
1543
+ ]
1544
+
1545
+ return self.api_client.param_serialize(
1546
+ method='PATCH',
1547
+ resource_path='/runners/{id}/scheduling',
1548
+ path_params=_path_params,
1549
+ query_params=_query_params,
1550
+ header_params=_header_params,
1551
+ body=_body_params,
1552
+ post_params=_form_params,
1553
+ files=_files,
1554
+ auth_settings=_auth_settings,
1555
+ collection_formats=_collection_formats,
1556
+ _host=_host,
1557
+ _request_auth=_request_auth
1558
+ )
1559
+
1560
+