daytona_api_client 0.21.3a0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (117) hide show
  1. daytona_api_client/__init__.py +129 -0
  2. daytona_api_client/api/__init__.py +15 -0
  3. daytona_api_client/api/api_keys_api.py +1234 -0
  4. daytona_api_client/api/docker_registry_api.py +1741 -0
  5. daytona_api_client/api/object_storage_api.py +268 -0
  6. daytona_api_client/api/organizations_api.py +5792 -0
  7. daytona_api_client/api/preview_api.py +715 -0
  8. daytona_api_client/api/runners_api.py +664 -0
  9. daytona_api_client/api/sandbox_api.py +3584 -0
  10. daytona_api_client/api/snapshots_api.py +1830 -0
  11. daytona_api_client/api/toolbox_api.py +10545 -0
  12. daytona_api_client/api/users_api.py +1733 -0
  13. daytona_api_client/api/volumes_api.py +1267 -0
  14. daytona_api_client/api/workspace_api.py +3626 -0
  15. daytona_api_client/api_client.py +696 -0
  16. daytona_api_client/api_response.py +20 -0
  17. daytona_api_client/configuration.py +586 -0
  18. daytona_api_client/exceptions.py +216 -0
  19. daytona_api_client/models/__init__.py +101 -0
  20. daytona_api_client/models/account_provider.py +101 -0
  21. daytona_api_client/models/account_provider_dto.py +101 -0
  22. daytona_api_client/models/api_key_list.py +149 -0
  23. daytona_api_client/models/api_key_response.py +142 -0
  24. daytona_api_client/models/build_info.py +115 -0
  25. daytona_api_client/models/build_snapshot.py +118 -0
  26. daytona_api_client/models/command.py +104 -0
  27. daytona_api_client/models/completion_context.py +103 -0
  28. daytona_api_client/models/completion_item.py +124 -0
  29. daytona_api_client/models/completion_list.py +116 -0
  30. daytona_api_client/models/create_api_key.py +134 -0
  31. daytona_api_client/models/create_build_info.py +107 -0
  32. daytona_api_client/models/create_docker_registry.py +123 -0
  33. daytona_api_client/models/create_linked_account.py +101 -0
  34. daytona_api_client/models/create_organization.py +100 -0
  35. daytona_api_client/models/create_organization_invitation.py +122 -0
  36. daytona_api_client/models/create_organization_quota.py +130 -0
  37. daytona_api_client/models/create_organization_role.py +126 -0
  38. daytona_api_client/models/create_runner.py +150 -0
  39. daytona_api_client/models/create_sandbox.py +198 -0
  40. daytona_api_client/models/create_session_request.py +100 -0
  41. daytona_api_client/models/create_snapshot.py +138 -0
  42. daytona_api_client/models/create_user.py +132 -0
  43. daytona_api_client/models/create_volume.py +100 -0
  44. daytona_api_client/models/create_workspace.py +196 -0
  45. daytona_api_client/models/docker_registry.py +135 -0
  46. daytona_api_client/models/execute_request.py +104 -0
  47. daytona_api_client/models/execute_response.py +101 -0
  48. daytona_api_client/models/file_info.py +118 -0
  49. daytona_api_client/models/file_status.py +110 -0
  50. daytona_api_client/models/get_build_logs400_response.py +101 -0
  51. daytona_api_client/models/git_add_request.py +101 -0
  52. daytona_api_client/models/git_branch_request.py +101 -0
  53. daytona_api_client/models/git_checkout_request.py +101 -0
  54. daytona_api_client/models/git_clone_request.py +114 -0
  55. daytona_api_client/models/git_commit_info.py +112 -0
  56. daytona_api_client/models/git_commit_request.py +110 -0
  57. daytona_api_client/models/git_commit_response.py +100 -0
  58. daytona_api_client/models/git_delete_branch_request.py +101 -0
  59. daytona_api_client/models/git_repo_request.py +104 -0
  60. daytona_api_client/models/git_status.py +122 -0
  61. daytona_api_client/models/list_branch_response.py +100 -0
  62. daytona_api_client/models/lsp_completion_params.py +120 -0
  63. daytona_api_client/models/lsp_document_request.py +104 -0
  64. daytona_api_client/models/lsp_location.py +107 -0
  65. daytona_api_client/models/lsp_server_request.py +101 -0
  66. daytona_api_client/models/lsp_symbol.py +112 -0
  67. daytona_api_client/models/match.py +102 -0
  68. daytona_api_client/models/organization.py +134 -0
  69. daytona_api_client/models/organization_invitation.py +161 -0
  70. daytona_api_client/models/organization_role.py +147 -0
  71. daytona_api_client/models/organization_suspension.py +102 -0
  72. daytona_api_client/models/organization_user.py +145 -0
  73. daytona_api_client/models/paginated_snapshots_dto.py +120 -0
  74. daytona_api_client/models/port_preview_url.py +101 -0
  75. daytona_api_client/models/position.py +101 -0
  76. daytona_api_client/models/project_dir_response.py +100 -0
  77. daytona_api_client/models/range.py +113 -0
  78. daytona_api_client/models/registry_push_access_dto.py +114 -0
  79. daytona_api_client/models/replace_request.py +104 -0
  80. daytona_api_client/models/replace_result.py +102 -0
  81. daytona_api_client/models/sandbox.py +226 -0
  82. daytona_api_client/models/sandbox_info.py +110 -0
  83. daytona_api_client/models/sandbox_labels.py +100 -0
  84. daytona_api_client/models/sandbox_state.py +50 -0
  85. daytona_api_client/models/sandbox_volume.py +101 -0
  86. daytona_api_client/models/search_files_response.py +100 -0
  87. daytona_api_client/models/session.py +121 -0
  88. daytona_api_client/models/session_execute_request.py +110 -0
  89. daytona_api_client/models/session_execute_response.py +106 -0
  90. daytona_api_client/models/set_snapshot_general_status_dto.py +100 -0
  91. daytona_api_client/models/snapshot_dto.py +185 -0
  92. daytona_api_client/models/snapshot_state.py +44 -0
  93. daytona_api_client/models/storage_access_dto.py +121 -0
  94. daytona_api_client/models/toggle_state.py +100 -0
  95. daytona_api_client/models/update_assigned_organization_roles.py +100 -0
  96. daytona_api_client/models/update_docker_registry.py +104 -0
  97. daytona_api_client/models/update_organization_invitation.py +114 -0
  98. daytona_api_client/models/update_organization_member_role.py +107 -0
  99. daytona_api_client/models/update_organization_quota.py +175 -0
  100. daytona_api_client/models/update_organization_role.py +126 -0
  101. daytona_api_client/models/upload_file.py +101 -0
  102. daytona_api_client/models/upload_file_dto.py +101 -0
  103. daytona_api_client/models/upload_file_request_file.py +159 -0
  104. daytona_api_client/models/upload_files_multi_request_files_inner.py +101 -0
  105. daytona_api_client/models/usage_overview.py +124 -0
  106. daytona_api_client/models/user.py +120 -0
  107. daytona_api_client/models/user_public_key.py +101 -0
  108. daytona_api_client/models/volume.py +133 -0
  109. daytona_api_client/models/volume_dto.py +138 -0
  110. daytona_api_client/models/volume_state.py +41 -0
  111. daytona_api_client/models/workspace.py +259 -0
  112. daytona_api_client/py.typed +0 -0
  113. daytona_api_client/rest.py +208 -0
  114. daytona_api_client-0.21.3a0.dist-info/METADATA +23 -0
  115. daytona_api_client-0.21.3a0.dist-info/RECORD +117 -0
  116. daytona_api_client-0.21.3a0.dist-info/WHEEL +5 -0
  117. daytona_api_client-0.21.3a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,664 @@
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 StrictStr
21
+ from daytona_api_client.models.create_runner import CreateRunner
22
+
23
+ from daytona_api_client.api_client import ApiClient, RequestSerialized
24
+ from daytona_api_client.api_response import ApiResponse
25
+ from daytona_api_client.rest import RESTResponseType
26
+
27
+
28
+ class RunnersApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+ @validate_call
41
+ def create_runner(
42
+ self,
43
+ create_runner: CreateRunner,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
48
+ ] = None,
49
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
50
+ _content_type: Optional[StrictStr] = None,
51
+ _headers: Optional[Dict[StrictStr, Any]] = None,
52
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
53
+ ) -> None:
54
+ """Create runner
55
+
56
+
57
+ :param create_runner: (required)
58
+ :type create_runner: CreateRunner
59
+ :param _request_timeout: timeout setting for this request. If one
60
+ number provided, it will be total request
61
+ timeout. It can also be a pair (tuple) of
62
+ (connection, read) timeouts.
63
+ :type _request_timeout: int, tuple(int, int), optional
64
+ :param _request_auth: set to override the auth_settings for an a single
65
+ request; this effectively ignores the
66
+ authentication in the spec for a single request.
67
+ :type _request_auth: dict, optional
68
+ :param _content_type: force content-type for the request.
69
+ :type _content_type: str, Optional
70
+ :param _headers: set to override the headers for a single
71
+ request; this effectively ignores the headers
72
+ in the spec for a single request.
73
+ :type _headers: dict, optional
74
+ :param _host_index: set to override the host_index for a single
75
+ request; this effectively ignores the host_index
76
+ in the spec for a single request.
77
+ :type _host_index: int, optional
78
+ :return: Returns the result object.
79
+ """ # noqa: E501
80
+
81
+ _param = self._create_runner_serialize(
82
+ create_runner=create_runner,
83
+ _request_auth=_request_auth,
84
+ _content_type=_content_type,
85
+ _headers=_headers,
86
+ _host_index=_host_index,
87
+ )
88
+
89
+ _response_types_map: Dict[str, Optional[str]] = {
90
+ "201": None,
91
+ }
92
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
93
+ response_data.read()
94
+ return self.api_client.response_deserialize(
95
+ response_data=response_data,
96
+ response_types_map=_response_types_map,
97
+ ).data
98
+
99
+ @validate_call
100
+ def create_runner_with_http_info(
101
+ self,
102
+ create_runner: CreateRunner,
103
+ _request_timeout: Union[
104
+ None,
105
+ Annotated[StrictFloat, Field(gt=0)],
106
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
107
+ ] = None,
108
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
109
+ _content_type: Optional[StrictStr] = None,
110
+ _headers: Optional[Dict[StrictStr, Any]] = None,
111
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
112
+ ) -> ApiResponse[None]:
113
+ """Create runner
114
+
115
+
116
+ :param create_runner: (required)
117
+ :type create_runner: CreateRunner
118
+ :param _request_timeout: timeout setting for this request. If one
119
+ number provided, it will be total request
120
+ timeout. It can also be a pair (tuple) of
121
+ (connection, read) timeouts.
122
+ :type _request_timeout: int, tuple(int, int), optional
123
+ :param _request_auth: set to override the auth_settings for an a single
124
+ request; this effectively ignores the
125
+ authentication in the spec for a single request.
126
+ :type _request_auth: dict, optional
127
+ :param _content_type: force content-type for the request.
128
+ :type _content_type: str, Optional
129
+ :param _headers: set to override the headers for a single
130
+ request; this effectively ignores the headers
131
+ in the spec for a single request.
132
+ :type _headers: dict, optional
133
+ :param _host_index: set to override the host_index for a single
134
+ request; this effectively ignores the host_index
135
+ in the spec for a single request.
136
+ :type _host_index: int, optional
137
+ :return: Returns the result object.
138
+ """ # noqa: E501
139
+
140
+ _param = self._create_runner_serialize(
141
+ create_runner=create_runner,
142
+ _request_auth=_request_auth,
143
+ _content_type=_content_type,
144
+ _headers=_headers,
145
+ _host_index=_host_index,
146
+ )
147
+
148
+ _response_types_map: Dict[str, Optional[str]] = {
149
+ "201": None,
150
+ }
151
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
152
+ response_data.read()
153
+ return self.api_client.response_deserialize(
154
+ response_data=response_data,
155
+ response_types_map=_response_types_map,
156
+ )
157
+
158
+ @validate_call
159
+ def create_runner_without_preload_content(
160
+ self,
161
+ create_runner: CreateRunner,
162
+ _request_timeout: Union[
163
+ None,
164
+ Annotated[StrictFloat, Field(gt=0)],
165
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
166
+ ] = None,
167
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
168
+ _content_type: Optional[StrictStr] = None,
169
+ _headers: Optional[Dict[StrictStr, Any]] = None,
170
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
171
+ ) -> RESTResponseType:
172
+ """Create runner
173
+
174
+
175
+ :param create_runner: (required)
176
+ :type create_runner: CreateRunner
177
+ :param _request_timeout: timeout setting for this request. If one
178
+ number provided, it will be total request
179
+ timeout. It can also be a pair (tuple) of
180
+ (connection, read) timeouts.
181
+ :type _request_timeout: int, tuple(int, int), optional
182
+ :param _request_auth: set to override the auth_settings for an a single
183
+ request; this effectively ignores the
184
+ authentication in the spec for a single request.
185
+ :type _request_auth: dict, optional
186
+ :param _content_type: force content-type for the request.
187
+ :type _content_type: str, Optional
188
+ :param _headers: set to override the headers for a single
189
+ request; this effectively ignores the headers
190
+ in the spec for a single request.
191
+ :type _headers: dict, optional
192
+ :param _host_index: set to override the host_index for a single
193
+ request; this effectively ignores the host_index
194
+ in the spec for a single request.
195
+ :type _host_index: int, optional
196
+ :return: Returns the result object.
197
+ """ # noqa: E501
198
+
199
+ _param = self._create_runner_serialize(
200
+ create_runner=create_runner,
201
+ _request_auth=_request_auth,
202
+ _content_type=_content_type,
203
+ _headers=_headers,
204
+ _host_index=_host_index,
205
+ )
206
+
207
+ _response_types_map: Dict[str, Optional[str]] = {
208
+ "201": None,
209
+ }
210
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
211
+ return response_data.response
212
+
213
+ def _create_runner_serialize(
214
+ self,
215
+ create_runner,
216
+ _request_auth,
217
+ _content_type,
218
+ _headers,
219
+ _host_index,
220
+ ) -> RequestSerialized:
221
+ _host = None
222
+
223
+ _collection_formats: Dict[str, str] = {}
224
+
225
+ _path_params: Dict[str, str] = {}
226
+ _query_params: List[Tuple[str, str]] = []
227
+ _header_params: Dict[str, Optional[str]] = _headers or {}
228
+ _form_params: List[Tuple[str, str]] = []
229
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
230
+ _body_params: Optional[bytes] = None
231
+
232
+ # process the path parameters
233
+ # process the query parameters
234
+ # process the header parameters
235
+ # process the form parameters
236
+ # process the body parameter
237
+ if create_runner is not None:
238
+ _body_params = create_runner
239
+
240
+ # set the HTTP header `Content-Type`
241
+ if _content_type:
242
+ _header_params["Content-Type"] = _content_type
243
+ else:
244
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
245
+ if _default_content_type is not None:
246
+ _header_params["Content-Type"] = _default_content_type
247
+
248
+ # authentication setting
249
+ _auth_settings: List[str] = ["bearer", "oauth2"]
250
+
251
+ return self.api_client.param_serialize(
252
+ method="POST",
253
+ resource_path="/runners",
254
+ path_params=_path_params,
255
+ query_params=_query_params,
256
+ header_params=_header_params,
257
+ body=_body_params,
258
+ post_params=_form_params,
259
+ files=_files,
260
+ auth_settings=_auth_settings,
261
+ collection_formats=_collection_formats,
262
+ _host=_host,
263
+ _request_auth=_request_auth,
264
+ )
265
+
266
+ @validate_call
267
+ def list_runners(
268
+ self,
269
+ _request_timeout: Union[
270
+ None,
271
+ Annotated[StrictFloat, Field(gt=0)],
272
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
273
+ ] = None,
274
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
275
+ _content_type: Optional[StrictStr] = None,
276
+ _headers: Optional[Dict[StrictStr, Any]] = None,
277
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
278
+ ) -> None:
279
+ """List all runners
280
+
281
+
282
+ :param _request_timeout: timeout setting for this request. If one
283
+ number provided, it will be total request
284
+ timeout. It can also be a pair (tuple) of
285
+ (connection, read) timeouts.
286
+ :type _request_timeout: int, tuple(int, int), optional
287
+ :param _request_auth: set to override the auth_settings for an a single
288
+ request; this effectively ignores the
289
+ authentication in the spec for a single request.
290
+ :type _request_auth: dict, optional
291
+ :param _content_type: force content-type for the request.
292
+ :type _content_type: str, Optional
293
+ :param _headers: set to override the headers for a single
294
+ request; this effectively ignores the headers
295
+ in the spec for a single request.
296
+ :type _headers: dict, optional
297
+ :param _host_index: set to override the host_index for a single
298
+ request; this effectively ignores the host_index
299
+ in the spec for a single request.
300
+ :type _host_index: int, optional
301
+ :return: Returns the result object.
302
+ """ # noqa: E501
303
+
304
+ _param = self._list_runners_serialize(
305
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
306
+ )
307
+
308
+ _response_types_map: Dict[str, Optional[str]] = {
309
+ "200": None,
310
+ }
311
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
312
+ response_data.read()
313
+ return self.api_client.response_deserialize(
314
+ response_data=response_data,
315
+ response_types_map=_response_types_map,
316
+ ).data
317
+
318
+ @validate_call
319
+ def list_runners_with_http_info(
320
+ self,
321
+ _request_timeout: Union[
322
+ None,
323
+ Annotated[StrictFloat, Field(gt=0)],
324
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
325
+ ] = None,
326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
327
+ _content_type: Optional[StrictStr] = None,
328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
330
+ ) -> ApiResponse[None]:
331
+ """List all runners
332
+
333
+
334
+ :param _request_timeout: timeout setting for this request. If one
335
+ number provided, it will be total request
336
+ timeout. It can also be a pair (tuple) of
337
+ (connection, read) timeouts.
338
+ :type _request_timeout: int, tuple(int, int), optional
339
+ :param _request_auth: set to override the auth_settings for an a single
340
+ request; this effectively ignores the
341
+ authentication in the spec for a single request.
342
+ :type _request_auth: dict, optional
343
+ :param _content_type: force content-type for the request.
344
+ :type _content_type: str, Optional
345
+ :param _headers: set to override the headers for a single
346
+ request; this effectively ignores the headers
347
+ in the spec for a single request.
348
+ :type _headers: dict, optional
349
+ :param _host_index: set to override the host_index for a single
350
+ request; this effectively ignores the host_index
351
+ in the spec for a single request.
352
+ :type _host_index: int, optional
353
+ :return: Returns the result object.
354
+ """ # noqa: E501
355
+
356
+ _param = self._list_runners_serialize(
357
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
358
+ )
359
+
360
+ _response_types_map: Dict[str, Optional[str]] = {
361
+ "200": None,
362
+ }
363
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
364
+ response_data.read()
365
+ return self.api_client.response_deserialize(
366
+ response_data=response_data,
367
+ response_types_map=_response_types_map,
368
+ )
369
+
370
+ @validate_call
371
+ def list_runners_without_preload_content(
372
+ self,
373
+ _request_timeout: Union[
374
+ None,
375
+ Annotated[StrictFloat, Field(gt=0)],
376
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
377
+ ] = None,
378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
379
+ _content_type: Optional[StrictStr] = None,
380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
382
+ ) -> RESTResponseType:
383
+ """List all runners
384
+
385
+
386
+ :param _request_timeout: timeout setting for this request. If one
387
+ number provided, it will be total request
388
+ timeout. It can also be a pair (tuple) of
389
+ (connection, read) timeouts.
390
+ :type _request_timeout: int, tuple(int, int), optional
391
+ :param _request_auth: set to override the auth_settings for an a single
392
+ request; this effectively ignores the
393
+ authentication in the spec for a single request.
394
+ :type _request_auth: dict, optional
395
+ :param _content_type: force content-type for the request.
396
+ :type _content_type: str, Optional
397
+ :param _headers: set to override the headers for a single
398
+ request; this effectively ignores the headers
399
+ in the spec for a single request.
400
+ :type _headers: dict, optional
401
+ :param _host_index: set to override the host_index for a single
402
+ request; this effectively ignores the host_index
403
+ in the spec for a single request.
404
+ :type _host_index: int, optional
405
+ :return: Returns the result object.
406
+ """ # noqa: E501
407
+
408
+ _param = self._list_runners_serialize(
409
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
410
+ )
411
+
412
+ _response_types_map: Dict[str, Optional[str]] = {
413
+ "200": None,
414
+ }
415
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
416
+ return response_data.response
417
+
418
+ def _list_runners_serialize(
419
+ self,
420
+ _request_auth,
421
+ _content_type,
422
+ _headers,
423
+ _host_index,
424
+ ) -> RequestSerialized:
425
+ _host = None
426
+
427
+ _collection_formats: Dict[str, str] = {}
428
+
429
+ _path_params: Dict[str, str] = {}
430
+ _query_params: List[Tuple[str, str]] = []
431
+ _header_params: Dict[str, Optional[str]] = _headers or {}
432
+ _form_params: List[Tuple[str, str]] = []
433
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
434
+ _body_params: Optional[bytes] = None
435
+
436
+ # process the path parameters
437
+ # process the query parameters
438
+ # process the header parameters
439
+ # process the form parameters
440
+ # process the body parameter
441
+
442
+ # authentication setting
443
+ _auth_settings: List[str] = ["bearer", "oauth2"]
444
+
445
+ return self.api_client.param_serialize(
446
+ method="GET",
447
+ resource_path="/runners",
448
+ path_params=_path_params,
449
+ query_params=_query_params,
450
+ header_params=_header_params,
451
+ body=_body_params,
452
+ post_params=_form_params,
453
+ files=_files,
454
+ auth_settings=_auth_settings,
455
+ collection_formats=_collection_formats,
456
+ _host=_host,
457
+ _request_auth=_request_auth,
458
+ )
459
+
460
+ @validate_call
461
+ def update_runner_scheduling(
462
+ self,
463
+ id: StrictStr,
464
+ _request_timeout: Union[
465
+ None,
466
+ Annotated[StrictFloat, Field(gt=0)],
467
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
468
+ ] = None,
469
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
470
+ _content_type: Optional[StrictStr] = None,
471
+ _headers: Optional[Dict[StrictStr, Any]] = None,
472
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
473
+ ) -> None:
474
+ """Update runner scheduling status
475
+
476
+
477
+ :param id: (required)
478
+ :type id: str
479
+ :param _request_timeout: timeout setting for this request. If one
480
+ number provided, it will be total request
481
+ timeout. It can also be a pair (tuple) of
482
+ (connection, read) timeouts.
483
+ :type _request_timeout: int, tuple(int, int), optional
484
+ :param _request_auth: set to override the auth_settings for an a single
485
+ request; this effectively ignores the
486
+ authentication in the spec for a single request.
487
+ :type _request_auth: dict, optional
488
+ :param _content_type: force content-type for the request.
489
+ :type _content_type: str, Optional
490
+ :param _headers: set to override the headers for a single
491
+ request; this effectively ignores the headers
492
+ in the spec for a single request.
493
+ :type _headers: dict, optional
494
+ :param _host_index: set to override the host_index for a single
495
+ request; this effectively ignores the host_index
496
+ in the spec for a single request.
497
+ :type _host_index: int, optional
498
+ :return: Returns the result object.
499
+ """ # noqa: E501
500
+
501
+ _param = self._update_runner_scheduling_serialize(
502
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ "200": None,
507
+ }
508
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
509
+ response_data.read()
510
+ return self.api_client.response_deserialize(
511
+ response_data=response_data,
512
+ response_types_map=_response_types_map,
513
+ ).data
514
+
515
+ @validate_call
516
+ def update_runner_scheduling_with_http_info(
517
+ self,
518
+ id: StrictStr,
519
+ _request_timeout: Union[
520
+ None,
521
+ Annotated[StrictFloat, Field(gt=0)],
522
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
523
+ ] = None,
524
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
525
+ _content_type: Optional[StrictStr] = None,
526
+ _headers: Optional[Dict[StrictStr, Any]] = None,
527
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
528
+ ) -> ApiResponse[None]:
529
+ """Update runner scheduling status
530
+
531
+
532
+ :param id: (required)
533
+ :type id: str
534
+ :param _request_timeout: timeout setting for this request. If one
535
+ number provided, it will be total request
536
+ timeout. It can also be a pair (tuple) of
537
+ (connection, read) timeouts.
538
+ :type _request_timeout: int, tuple(int, int), optional
539
+ :param _request_auth: set to override the auth_settings for an a single
540
+ request; this effectively ignores the
541
+ authentication in the spec for a single request.
542
+ :type _request_auth: dict, optional
543
+ :param _content_type: force content-type for the request.
544
+ :type _content_type: str, Optional
545
+ :param _headers: set to override the headers for a single
546
+ request; this effectively ignores the headers
547
+ in the spec for a single request.
548
+ :type _headers: dict, optional
549
+ :param _host_index: set to override the host_index for a single
550
+ request; this effectively ignores the host_index
551
+ in the spec for a single request.
552
+ :type _host_index: int, optional
553
+ :return: Returns the result object.
554
+ """ # noqa: E501
555
+
556
+ _param = self._update_runner_scheduling_serialize(
557
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
558
+ )
559
+
560
+ _response_types_map: Dict[str, Optional[str]] = {
561
+ "200": None,
562
+ }
563
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
564
+ response_data.read()
565
+ return self.api_client.response_deserialize(
566
+ response_data=response_data,
567
+ response_types_map=_response_types_map,
568
+ )
569
+
570
+ @validate_call
571
+ def update_runner_scheduling_without_preload_content(
572
+ self,
573
+ id: StrictStr,
574
+ _request_timeout: Union[
575
+ None,
576
+ Annotated[StrictFloat, Field(gt=0)],
577
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
578
+ ] = None,
579
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
580
+ _content_type: Optional[StrictStr] = None,
581
+ _headers: Optional[Dict[StrictStr, Any]] = None,
582
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
583
+ ) -> RESTResponseType:
584
+ """Update runner scheduling status
585
+
586
+
587
+ :param id: (required)
588
+ :type id: str
589
+ :param _request_timeout: timeout setting for this request. If one
590
+ number provided, it will be total request
591
+ timeout. It can also be a pair (tuple) of
592
+ (connection, read) timeouts.
593
+ :type _request_timeout: int, tuple(int, int), optional
594
+ :param _request_auth: set to override the auth_settings for an a single
595
+ request; this effectively ignores the
596
+ authentication in the spec for a single request.
597
+ :type _request_auth: dict, optional
598
+ :param _content_type: force content-type for the request.
599
+ :type _content_type: str, Optional
600
+ :param _headers: set to override the headers for a single
601
+ request; this effectively ignores the headers
602
+ in the spec for a single request.
603
+ :type _headers: dict, optional
604
+ :param _host_index: set to override the host_index for a single
605
+ request; this effectively ignores the host_index
606
+ in the spec for a single request.
607
+ :type _host_index: int, optional
608
+ :return: Returns the result object.
609
+ """ # noqa: E501
610
+
611
+ _param = self._update_runner_scheduling_serialize(
612
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
613
+ )
614
+
615
+ _response_types_map: Dict[str, Optional[str]] = {
616
+ "200": None,
617
+ }
618
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
619
+ return response_data.response
620
+
621
+ def _update_runner_scheduling_serialize(
622
+ self,
623
+ id,
624
+ _request_auth,
625
+ _content_type,
626
+ _headers,
627
+ _host_index,
628
+ ) -> RequestSerialized:
629
+ _host = None
630
+
631
+ _collection_formats: Dict[str, str] = {}
632
+
633
+ _path_params: Dict[str, str] = {}
634
+ _query_params: List[Tuple[str, str]] = []
635
+ _header_params: Dict[str, Optional[str]] = _headers or {}
636
+ _form_params: List[Tuple[str, str]] = []
637
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
638
+ _body_params: Optional[bytes] = None
639
+
640
+ # process the path parameters
641
+ if id is not None:
642
+ _path_params["id"] = id
643
+ # process the query parameters
644
+ # process the header parameters
645
+ # process the form parameters
646
+ # process the body parameter
647
+
648
+ # authentication setting
649
+ _auth_settings: List[str] = ["bearer", "oauth2"]
650
+
651
+ return self.api_client.param_serialize(
652
+ method="PATCH",
653
+ resource_path="/runners/{id}/scheduling",
654
+ path_params=_path_params,
655
+ query_params=_query_params,
656
+ header_params=_header_params,
657
+ body=_body_params,
658
+ post_params=_form_params,
659
+ files=_files,
660
+ auth_settings=_auth_settings,
661
+ collection_formats=_collection_formats,
662
+ _host=_host,
663
+ _request_auth=_request_auth,
664
+ )