daytona_api_client_async 0.21.3a0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (123) hide show
  1. daytona_api_client_async/__init__.py +129 -0
  2. daytona_api_client_async/api/__init__.py +16 -0
  3. daytona_api_client_async/api/api_keys_api.py +1391 -0
  4. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  5. daytona_api_client_async/api/images_api.py +2350 -0
  6. daytona_api_client_async/api/nodes_api.py +792 -0
  7. daytona_api_client_async/api/object_storage_api.py +298 -0
  8. daytona_api_client_async/api/organizations_api.py +6762 -0
  9. daytona_api_client_async/api/preview_api.py +819 -0
  10. daytona_api_client_async/api/runners_api.py +792 -0
  11. daytona_api_client_async/api/sandbox_api.py +3994 -0
  12. daytona_api_client_async/api/snapshots_api.py +2059 -0
  13. daytona_api_client_async/api/toolbox_api.py +11819 -0
  14. daytona_api_client_async/api/users_api.py +2075 -0
  15. daytona_api_client_async/api/volumes_api.py +1419 -0
  16. daytona_api_client_async/api/workspace_api.py +4036 -0
  17. daytona_api_client_async/api_client.py +801 -0
  18. daytona_api_client_async/api_response.py +21 -0
  19. daytona_api_client_async/configuration.py +579 -0
  20. daytona_api_client_async/exceptions.py +217 -0
  21. daytona_api_client_async/models/__init__.py +101 -0
  22. daytona_api_client_async/models/account_provider.py +103 -0
  23. daytona_api_client_async/models/api_key_list.py +130 -0
  24. daytona_api_client_async/models/api_key_response.py +123 -0
  25. daytona_api_client_async/models/build_image.py +107 -0
  26. daytona_api_client_async/models/build_info.py +108 -0
  27. daytona_api_client_async/models/build_snapshot.py +115 -0
  28. daytona_api_client_async/models/command.py +105 -0
  29. daytona_api_client_async/models/completion_context.py +103 -0
  30. daytona_api_client_async/models/completion_item.py +113 -0
  31. daytona_api_client_async/models/completion_list.py +111 -0
  32. daytona_api_client_async/models/create_api_key.py +119 -0
  33. daytona_api_client_async/models/create_build_info.py +103 -0
  34. daytona_api_client_async/models/create_docker_registry.py +120 -0
  35. daytona_api_client_async/models/create_image.py +105 -0
  36. daytona_api_client_async/models/create_linked_account.py +103 -0
  37. daytona_api_client_async/models/create_node.py +135 -0
  38. daytona_api_client_async/models/create_organization.py +101 -0
  39. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  40. daytona_api_client_async/models/create_organization_quota.py +117 -0
  41. daytona_api_client_async/models/create_organization_role.py +113 -0
  42. daytona_api_client_async/models/create_runner.py +135 -0
  43. daytona_api_client_async/models/create_sandbox.py +161 -0
  44. daytona_api_client_async/models/create_session_request.py +101 -0
  45. daytona_api_client_async/models/create_snapshot.py +121 -0
  46. daytona_api_client_async/models/create_user.py +125 -0
  47. daytona_api_client_async/models/create_volume.py +101 -0
  48. daytona_api_client_async/models/create_workspace.py +161 -0
  49. daytona_api_client_async/models/docker_registry.py +123 -0
  50. daytona_api_client_async/models/execute_request.py +105 -0
  51. daytona_api_client_async/models/execute_response.py +103 -0
  52. daytona_api_client_async/models/file_info.py +115 -0
  53. daytona_api_client_async/models/file_status.py +107 -0
  54. daytona_api_client_async/models/git_add_request.py +103 -0
  55. daytona_api_client_async/models/git_branch_request.py +103 -0
  56. daytona_api_client_async/models/git_checkout_request.py +103 -0
  57. daytona_api_client_async/models/git_clone_request.py +111 -0
  58. daytona_api_client_async/models/git_commit_info.py +109 -0
  59. daytona_api_client_async/models/git_commit_request.py +107 -0
  60. daytona_api_client_async/models/git_commit_response.py +101 -0
  61. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  62. daytona_api_client_async/models/git_repo_request.py +105 -0
  63. daytona_api_client_async/models/git_status.py +117 -0
  64. daytona_api_client_async/models/image_dto.py +145 -0
  65. daytona_api_client_async/models/image_state.py +45 -0
  66. daytona_api_client_async/models/list_branch_response.py +101 -0
  67. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  68. daytona_api_client_async/models/lsp_document_request.py +105 -0
  69. daytona_api_client_async/models/lsp_location.py +107 -0
  70. daytona_api_client_async/models/lsp_server_request.py +103 -0
  71. daytona_api_client_async/models/lsp_symbol.py +109 -0
  72. daytona_api_client_async/models/match.py +105 -0
  73. daytona_api_client_async/models/organization.py +120 -0
  74. daytona_api_client_async/models/organization_invitation.py +144 -0
  75. daytona_api_client_async/models/organization_role.py +122 -0
  76. daytona_api_client_async/models/organization_suspension.py +104 -0
  77. daytona_api_client_async/models/organization_user.py +131 -0
  78. daytona_api_client_async/models/paginated_images_dto.py +115 -0
  79. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  80. daytona_api_client_async/models/port_preview_url.py +103 -0
  81. daytona_api_client_async/models/position.py +103 -0
  82. daytona_api_client_async/models/project_dir_response.py +101 -0
  83. daytona_api_client_async/models/range.py +110 -0
  84. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  85. daytona_api_client_async/models/replace_request.py +105 -0
  86. daytona_api_client_async/models/replace_result.py +105 -0
  87. daytona_api_client_async/models/sandbox.py +180 -0
  88. daytona_api_client_async/models/sandbox_info.py +105 -0
  89. daytona_api_client_async/models/sandbox_labels.py +101 -0
  90. daytona_api_client_async/models/sandbox_state.py +52 -0
  91. daytona_api_client_async/models/sandbox_volume.py +103 -0
  92. daytona_api_client_async/models/search_files_response.py +101 -0
  93. daytona_api_client_async/models/session.py +116 -0
  94. daytona_api_client_async/models/session_execute_request.py +105 -0
  95. daytona_api_client_async/models/session_execute_response.py +105 -0
  96. daytona_api_client_async/models/set_image_general_status.py +101 -0
  97. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  98. daytona_api_client_async/models/snapshot_dto.py +161 -0
  99. daytona_api_client_async/models/snapshot_state.py +46 -0
  100. daytona_api_client_async/models/storage_access_dto.py +111 -0
  101. daytona_api_client_async/models/toggle_state.py +101 -0
  102. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  103. daytona_api_client_async/models/update_docker_registry.py +105 -0
  104. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  105. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  106. daytona_api_client_async/models/update_organization_quota.py +162 -0
  107. daytona_api_client_async/models/update_organization_role.py +113 -0
  108. daytona_api_client_async/models/usage_overview.py +113 -0
  109. daytona_api_client_async/models/user.py +115 -0
  110. daytona_api_client_async/models/user_public_key.py +103 -0
  111. daytona_api_client_async/models/volume_dto.py +126 -0
  112. daytona_api_client_async/models/volume_state.py +43 -0
  113. daytona_api_client_async/models/workspace.py +204 -0
  114. daytona_api_client_async/models/workspace_info.py +105 -0
  115. daytona_api_client_async/models/workspace_labels.py +101 -0
  116. daytona_api_client_async/models/workspace_state.py +51 -0
  117. daytona_api_client_async/models/workspace_volume.py +103 -0
  118. daytona_api_client_async/py.typed +0 -0
  119. daytona_api_client_async/rest.py +214 -0
  120. daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
  121. daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
  122. daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
  123. daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1965 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictStr
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from daytona_api_client_async.models.create_docker_registry import CreateDockerRegistry
24
+ from daytona_api_client_async.models.docker_registry import DockerRegistry
25
+ from daytona_api_client_async.models.registry_push_access_dto import RegistryPushAccessDto
26
+ from daytona_api_client_async.models.update_docker_registry import UpdateDockerRegistry
27
+
28
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
29
+ from daytona_api_client_async.api_response import ApiResponse
30
+ from daytona_api_client_async.rest import RESTResponseType
31
+
32
+
33
+ class DockerRegistryApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ async def create_registry(
48
+ self,
49
+ create_docker_registry: CreateDockerRegistry,
50
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> DockerRegistry:
64
+ """Create registry
65
+
66
+
67
+ :param create_docker_registry: (required)
68
+ :type create_docker_registry: CreateDockerRegistry
69
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
70
+ :type x_daytona_organization_id: str
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._create_registry_serialize(
94
+ create_docker_registry=create_docker_registry,
95
+ x_daytona_organization_id=x_daytona_organization_id,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '201': "DockerRegistry",
104
+ }
105
+ response_data = await self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ await response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ async def create_registry_with_http_info(
118
+ self,
119
+ create_docker_registry: CreateDockerRegistry,
120
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[DockerRegistry]:
134
+ """Create registry
135
+
136
+
137
+ :param create_docker_registry: (required)
138
+ :type create_docker_registry: CreateDockerRegistry
139
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
140
+ :type x_daytona_organization_id: str
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._create_registry_serialize(
164
+ create_docker_registry=create_docker_registry,
165
+ x_daytona_organization_id=x_daytona_organization_id,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '201': "DockerRegistry",
174
+ }
175
+ response_data = await self.api_client.call_api(
176
+ *_param,
177
+ _request_timeout=_request_timeout
178
+ )
179
+ await response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+
186
+ @validate_call
187
+ async def create_registry_without_preload_content(
188
+ self,
189
+ create_docker_registry: CreateDockerRegistry,
190
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Annotated[StrictFloat, Field(gt=0)]
197
+ ]
198
+ ] = None,
199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
200
+ _content_type: Optional[StrictStr] = None,
201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
203
+ ) -> RESTResponseType:
204
+ """Create registry
205
+
206
+
207
+ :param create_docker_registry: (required)
208
+ :type create_docker_registry: CreateDockerRegistry
209
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
210
+ :type x_daytona_organization_id: str
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._create_registry_serialize(
234
+ create_docker_registry=create_docker_registry,
235
+ x_daytona_organization_id=x_daytona_organization_id,
236
+ _request_auth=_request_auth,
237
+ _content_type=_content_type,
238
+ _headers=_headers,
239
+ _host_index=_host_index
240
+ )
241
+
242
+ _response_types_map: Dict[str, Optional[str]] = {
243
+ '201': "DockerRegistry",
244
+ }
245
+ response_data = await self.api_client.call_api(
246
+ *_param,
247
+ _request_timeout=_request_timeout
248
+ )
249
+ return response_data.response
250
+
251
+
252
+ def _create_registry_serialize(
253
+ self,
254
+ create_docker_registry,
255
+ x_daytona_organization_id,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _host = None
263
+
264
+ _collection_formats: Dict[str, str] = {
265
+ }
266
+
267
+ _path_params: Dict[str, str] = {}
268
+ _query_params: List[Tuple[str, str]] = []
269
+ _header_params: Dict[str, Optional[str]] = _headers or {}
270
+ _form_params: List[Tuple[str, str]] = []
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
274
+ _body_params: Optional[bytes] = None
275
+
276
+ # process the path parameters
277
+ # process the query parameters
278
+ # process the header parameters
279
+ if x_daytona_organization_id is not None:
280
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
281
+ # process the form parameters
282
+ # process the body parameter
283
+ if create_docker_registry is not None:
284
+ _body_params = create_docker_registry
285
+
286
+
287
+ # set the HTTP header `Accept`
288
+ if 'Accept' not in _header_params:
289
+ _header_params['Accept'] = self.api_client.select_header_accept(
290
+ [
291
+ 'application/json'
292
+ ]
293
+ )
294
+
295
+ # set the HTTP header `Content-Type`
296
+ if _content_type:
297
+ _header_params['Content-Type'] = _content_type
298
+ else:
299
+ _default_content_type = (
300
+ self.api_client.select_header_content_type(
301
+ [
302
+ 'application/json'
303
+ ]
304
+ )
305
+ )
306
+ if _default_content_type is not None:
307
+ _header_params['Content-Type'] = _default_content_type
308
+
309
+ # authentication setting
310
+ _auth_settings: List[str] = [
311
+ 'bearer',
312
+ 'oauth2'
313
+ ]
314
+
315
+ return self.api_client.param_serialize(
316
+ method='POST',
317
+ resource_path='/docker-registry',
318
+ path_params=_path_params,
319
+ query_params=_query_params,
320
+ header_params=_header_params,
321
+ body=_body_params,
322
+ post_params=_form_params,
323
+ files=_files,
324
+ auth_settings=_auth_settings,
325
+ collection_formats=_collection_formats,
326
+ _host=_host,
327
+ _request_auth=_request_auth
328
+ )
329
+
330
+
331
+
332
+
333
+ @validate_call
334
+ async def delete_registry(
335
+ self,
336
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
337
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
338
+ _request_timeout: Union[
339
+ None,
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Tuple[
342
+ Annotated[StrictFloat, Field(gt=0)],
343
+ Annotated[StrictFloat, Field(gt=0)]
344
+ ]
345
+ ] = None,
346
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
347
+ _content_type: Optional[StrictStr] = None,
348
+ _headers: Optional[Dict[StrictStr, Any]] = None,
349
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
350
+ ) -> None:
351
+ """Delete registry
352
+
353
+
354
+ :param id: ID of the docker registry (required)
355
+ :type id: str
356
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
357
+ :type x_daytona_organization_id: str
358
+ :param _request_timeout: timeout setting for this request. If one
359
+ number provided, it will be total request
360
+ timeout. It can also be a pair (tuple) of
361
+ (connection, read) timeouts.
362
+ :type _request_timeout: int, tuple(int, int), optional
363
+ :param _request_auth: set to override the auth_settings for an a single
364
+ request; this effectively ignores the
365
+ authentication in the spec for a single request.
366
+ :type _request_auth: dict, optional
367
+ :param _content_type: force content-type for the request.
368
+ :type _content_type: str, Optional
369
+ :param _headers: set to override the headers for a single
370
+ request; this effectively ignores the headers
371
+ in the spec for a single request.
372
+ :type _headers: dict, optional
373
+ :param _host_index: set to override the host_index for a single
374
+ request; this effectively ignores the host_index
375
+ in the spec for a single request.
376
+ :type _host_index: int, optional
377
+ :return: Returns the result object.
378
+ """ # noqa: E501
379
+
380
+ _param = self._delete_registry_serialize(
381
+ id=id,
382
+ x_daytona_organization_id=x_daytona_organization_id,
383
+ _request_auth=_request_auth,
384
+ _content_type=_content_type,
385
+ _headers=_headers,
386
+ _host_index=_host_index
387
+ )
388
+
389
+ _response_types_map: Dict[str, Optional[str]] = {
390
+ '204': None,
391
+ }
392
+ response_data = await self.api_client.call_api(
393
+ *_param,
394
+ _request_timeout=_request_timeout
395
+ )
396
+ await response_data.read()
397
+ return self.api_client.response_deserialize(
398
+ response_data=response_data,
399
+ response_types_map=_response_types_map,
400
+ ).data
401
+
402
+
403
+ @validate_call
404
+ async def delete_registry_with_http_info(
405
+ self,
406
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
407
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
408
+ _request_timeout: Union[
409
+ None,
410
+ Annotated[StrictFloat, Field(gt=0)],
411
+ Tuple[
412
+ Annotated[StrictFloat, Field(gt=0)],
413
+ Annotated[StrictFloat, Field(gt=0)]
414
+ ]
415
+ ] = None,
416
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
417
+ _content_type: Optional[StrictStr] = None,
418
+ _headers: Optional[Dict[StrictStr, Any]] = None,
419
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
420
+ ) -> ApiResponse[None]:
421
+ """Delete registry
422
+
423
+
424
+ :param id: ID of the docker registry (required)
425
+ :type id: str
426
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
427
+ :type x_daytona_organization_id: str
428
+ :param _request_timeout: timeout setting for this request. If one
429
+ number provided, it will be total request
430
+ timeout. It can also be a pair (tuple) of
431
+ (connection, read) timeouts.
432
+ :type _request_timeout: int, tuple(int, int), optional
433
+ :param _request_auth: set to override the auth_settings for an a single
434
+ request; this effectively ignores the
435
+ authentication in the spec for a single request.
436
+ :type _request_auth: dict, optional
437
+ :param _content_type: force content-type for the request.
438
+ :type _content_type: str, Optional
439
+ :param _headers: set to override the headers for a single
440
+ request; this effectively ignores the headers
441
+ in the spec for a single request.
442
+ :type _headers: dict, optional
443
+ :param _host_index: set to override the host_index for a single
444
+ request; this effectively ignores the host_index
445
+ in the spec for a single request.
446
+ :type _host_index: int, optional
447
+ :return: Returns the result object.
448
+ """ # noqa: E501
449
+
450
+ _param = self._delete_registry_serialize(
451
+ id=id,
452
+ x_daytona_organization_id=x_daytona_organization_id,
453
+ _request_auth=_request_auth,
454
+ _content_type=_content_type,
455
+ _headers=_headers,
456
+ _host_index=_host_index
457
+ )
458
+
459
+ _response_types_map: Dict[str, Optional[str]] = {
460
+ '204': None,
461
+ }
462
+ response_data = await self.api_client.call_api(
463
+ *_param,
464
+ _request_timeout=_request_timeout
465
+ )
466
+ await response_data.read()
467
+ return self.api_client.response_deserialize(
468
+ response_data=response_data,
469
+ response_types_map=_response_types_map,
470
+ )
471
+
472
+
473
+ @validate_call
474
+ async def delete_registry_without_preload_content(
475
+ self,
476
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
477
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
478
+ _request_timeout: Union[
479
+ None,
480
+ Annotated[StrictFloat, Field(gt=0)],
481
+ Tuple[
482
+ Annotated[StrictFloat, Field(gt=0)],
483
+ Annotated[StrictFloat, Field(gt=0)]
484
+ ]
485
+ ] = None,
486
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
487
+ _content_type: Optional[StrictStr] = None,
488
+ _headers: Optional[Dict[StrictStr, Any]] = None,
489
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
490
+ ) -> RESTResponseType:
491
+ """Delete registry
492
+
493
+
494
+ :param id: ID of the docker registry (required)
495
+ :type id: str
496
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
497
+ :type x_daytona_organization_id: str
498
+ :param _request_timeout: timeout setting for this request. If one
499
+ number provided, it will be total request
500
+ timeout. It can also be a pair (tuple) of
501
+ (connection, read) timeouts.
502
+ :type _request_timeout: int, tuple(int, int), optional
503
+ :param _request_auth: set to override the auth_settings for an a single
504
+ request; this effectively ignores the
505
+ authentication in the spec for a single request.
506
+ :type _request_auth: dict, optional
507
+ :param _content_type: force content-type for the request.
508
+ :type _content_type: str, Optional
509
+ :param _headers: set to override the headers for a single
510
+ request; this effectively ignores the headers
511
+ in the spec for a single request.
512
+ :type _headers: dict, optional
513
+ :param _host_index: set to override the host_index for a single
514
+ request; this effectively ignores the host_index
515
+ in the spec for a single request.
516
+ :type _host_index: int, optional
517
+ :return: Returns the result object.
518
+ """ # noqa: E501
519
+
520
+ _param = self._delete_registry_serialize(
521
+ id=id,
522
+ x_daytona_organization_id=x_daytona_organization_id,
523
+ _request_auth=_request_auth,
524
+ _content_type=_content_type,
525
+ _headers=_headers,
526
+ _host_index=_host_index
527
+ )
528
+
529
+ _response_types_map: Dict[str, Optional[str]] = {
530
+ '204': None,
531
+ }
532
+ response_data = await self.api_client.call_api(
533
+ *_param,
534
+ _request_timeout=_request_timeout
535
+ )
536
+ return response_data.response
537
+
538
+
539
+ def _delete_registry_serialize(
540
+ self,
541
+ id,
542
+ x_daytona_organization_id,
543
+ _request_auth,
544
+ _content_type,
545
+ _headers,
546
+ _host_index,
547
+ ) -> RequestSerialized:
548
+
549
+ _host = None
550
+
551
+ _collection_formats: Dict[str, str] = {
552
+ }
553
+
554
+ _path_params: Dict[str, str] = {}
555
+ _query_params: List[Tuple[str, str]] = []
556
+ _header_params: Dict[str, Optional[str]] = _headers or {}
557
+ _form_params: List[Tuple[str, str]] = []
558
+ _files: Dict[
559
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
560
+ ] = {}
561
+ _body_params: Optional[bytes] = None
562
+
563
+ # process the path parameters
564
+ if id is not None:
565
+ _path_params['id'] = id
566
+ # process the query parameters
567
+ # process the header parameters
568
+ if x_daytona_organization_id is not None:
569
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
570
+ # process the form parameters
571
+ # process the body parameter
572
+
573
+
574
+
575
+
576
+ # authentication setting
577
+ _auth_settings: List[str] = [
578
+ 'bearer',
579
+ 'oauth2'
580
+ ]
581
+
582
+ return self.api_client.param_serialize(
583
+ method='DELETE',
584
+ resource_path='/docker-registry/{id}',
585
+ path_params=_path_params,
586
+ query_params=_query_params,
587
+ header_params=_header_params,
588
+ body=_body_params,
589
+ post_params=_form_params,
590
+ files=_files,
591
+ auth_settings=_auth_settings,
592
+ collection_formats=_collection_formats,
593
+ _host=_host,
594
+ _request_auth=_request_auth
595
+ )
596
+
597
+
598
+
599
+
600
+ @validate_call
601
+ async def get_registry(
602
+ self,
603
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
604
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
605
+ _request_timeout: Union[
606
+ None,
607
+ Annotated[StrictFloat, Field(gt=0)],
608
+ Tuple[
609
+ Annotated[StrictFloat, Field(gt=0)],
610
+ Annotated[StrictFloat, Field(gt=0)]
611
+ ]
612
+ ] = None,
613
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
614
+ _content_type: Optional[StrictStr] = None,
615
+ _headers: Optional[Dict[StrictStr, Any]] = None,
616
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
617
+ ) -> DockerRegistry:
618
+ """Get registry
619
+
620
+
621
+ :param id: ID of the docker registry (required)
622
+ :type id: str
623
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
624
+ :type x_daytona_organization_id: str
625
+ :param _request_timeout: timeout setting for this request. If one
626
+ number provided, it will be total request
627
+ timeout. It can also be a pair (tuple) of
628
+ (connection, read) timeouts.
629
+ :type _request_timeout: int, tuple(int, int), optional
630
+ :param _request_auth: set to override the auth_settings for an a single
631
+ request; this effectively ignores the
632
+ authentication in the spec for a single request.
633
+ :type _request_auth: dict, optional
634
+ :param _content_type: force content-type for the request.
635
+ :type _content_type: str, Optional
636
+ :param _headers: set to override the headers for a single
637
+ request; this effectively ignores the headers
638
+ in the spec for a single request.
639
+ :type _headers: dict, optional
640
+ :param _host_index: set to override the host_index for a single
641
+ request; this effectively ignores the host_index
642
+ in the spec for a single request.
643
+ :type _host_index: int, optional
644
+ :return: Returns the result object.
645
+ """ # noqa: E501
646
+
647
+ _param = self._get_registry_serialize(
648
+ id=id,
649
+ x_daytona_organization_id=x_daytona_organization_id,
650
+ _request_auth=_request_auth,
651
+ _content_type=_content_type,
652
+ _headers=_headers,
653
+ _host_index=_host_index
654
+ )
655
+
656
+ _response_types_map: Dict[str, Optional[str]] = {
657
+ '200': "DockerRegistry",
658
+ }
659
+ response_data = await self.api_client.call_api(
660
+ *_param,
661
+ _request_timeout=_request_timeout
662
+ )
663
+ await response_data.read()
664
+ return self.api_client.response_deserialize(
665
+ response_data=response_data,
666
+ response_types_map=_response_types_map,
667
+ ).data
668
+
669
+
670
+ @validate_call
671
+ async def get_registry_with_http_info(
672
+ self,
673
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
674
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
675
+ _request_timeout: Union[
676
+ None,
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Tuple[
679
+ Annotated[StrictFloat, Field(gt=0)],
680
+ Annotated[StrictFloat, Field(gt=0)]
681
+ ]
682
+ ] = None,
683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
684
+ _content_type: Optional[StrictStr] = None,
685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
687
+ ) -> ApiResponse[DockerRegistry]:
688
+ """Get registry
689
+
690
+
691
+ :param id: ID of the docker registry (required)
692
+ :type id: str
693
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
694
+ :type x_daytona_organization_id: str
695
+ :param _request_timeout: timeout setting for this request. If one
696
+ number provided, it will be total request
697
+ timeout. It can also be a pair (tuple) of
698
+ (connection, read) timeouts.
699
+ :type _request_timeout: int, tuple(int, int), optional
700
+ :param _request_auth: set to override the auth_settings for an a single
701
+ request; this effectively ignores the
702
+ authentication in the spec for a single request.
703
+ :type _request_auth: dict, optional
704
+ :param _content_type: force content-type for the request.
705
+ :type _content_type: str, Optional
706
+ :param _headers: set to override the headers for a single
707
+ request; this effectively ignores the headers
708
+ in the spec for a single request.
709
+ :type _headers: dict, optional
710
+ :param _host_index: set to override the host_index for a single
711
+ request; this effectively ignores the host_index
712
+ in the spec for a single request.
713
+ :type _host_index: int, optional
714
+ :return: Returns the result object.
715
+ """ # noqa: E501
716
+
717
+ _param = self._get_registry_serialize(
718
+ id=id,
719
+ x_daytona_organization_id=x_daytona_organization_id,
720
+ _request_auth=_request_auth,
721
+ _content_type=_content_type,
722
+ _headers=_headers,
723
+ _host_index=_host_index
724
+ )
725
+
726
+ _response_types_map: Dict[str, Optional[str]] = {
727
+ '200': "DockerRegistry",
728
+ }
729
+ response_data = await self.api_client.call_api(
730
+ *_param,
731
+ _request_timeout=_request_timeout
732
+ )
733
+ await response_data.read()
734
+ return self.api_client.response_deserialize(
735
+ response_data=response_data,
736
+ response_types_map=_response_types_map,
737
+ )
738
+
739
+
740
+ @validate_call
741
+ async def get_registry_without_preload_content(
742
+ self,
743
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
744
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
745
+ _request_timeout: Union[
746
+ None,
747
+ Annotated[StrictFloat, Field(gt=0)],
748
+ Tuple[
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Annotated[StrictFloat, Field(gt=0)]
751
+ ]
752
+ ] = None,
753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
754
+ _content_type: Optional[StrictStr] = None,
755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
757
+ ) -> RESTResponseType:
758
+ """Get registry
759
+
760
+
761
+ :param id: ID of the docker registry (required)
762
+ :type id: str
763
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
764
+ :type x_daytona_organization_id: str
765
+ :param _request_timeout: timeout setting for this request. If one
766
+ number provided, it will be total request
767
+ timeout. It can also be a pair (tuple) of
768
+ (connection, read) timeouts.
769
+ :type _request_timeout: int, tuple(int, int), optional
770
+ :param _request_auth: set to override the auth_settings for an a single
771
+ request; this effectively ignores the
772
+ authentication in the spec for a single request.
773
+ :type _request_auth: dict, optional
774
+ :param _content_type: force content-type for the request.
775
+ :type _content_type: str, Optional
776
+ :param _headers: set to override the headers for a single
777
+ request; this effectively ignores the headers
778
+ in the spec for a single request.
779
+ :type _headers: dict, optional
780
+ :param _host_index: set to override the host_index for a single
781
+ request; this effectively ignores the host_index
782
+ in the spec for a single request.
783
+ :type _host_index: int, optional
784
+ :return: Returns the result object.
785
+ """ # noqa: E501
786
+
787
+ _param = self._get_registry_serialize(
788
+ id=id,
789
+ x_daytona_organization_id=x_daytona_organization_id,
790
+ _request_auth=_request_auth,
791
+ _content_type=_content_type,
792
+ _headers=_headers,
793
+ _host_index=_host_index
794
+ )
795
+
796
+ _response_types_map: Dict[str, Optional[str]] = {
797
+ '200': "DockerRegistry",
798
+ }
799
+ response_data = await self.api_client.call_api(
800
+ *_param,
801
+ _request_timeout=_request_timeout
802
+ )
803
+ return response_data.response
804
+
805
+
806
+ def _get_registry_serialize(
807
+ self,
808
+ id,
809
+ x_daytona_organization_id,
810
+ _request_auth,
811
+ _content_type,
812
+ _headers,
813
+ _host_index,
814
+ ) -> RequestSerialized:
815
+
816
+ _host = None
817
+
818
+ _collection_formats: Dict[str, str] = {
819
+ }
820
+
821
+ _path_params: Dict[str, str] = {}
822
+ _query_params: List[Tuple[str, str]] = []
823
+ _header_params: Dict[str, Optional[str]] = _headers or {}
824
+ _form_params: List[Tuple[str, str]] = []
825
+ _files: Dict[
826
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
827
+ ] = {}
828
+ _body_params: Optional[bytes] = None
829
+
830
+ # process the path parameters
831
+ if id is not None:
832
+ _path_params['id'] = id
833
+ # process the query parameters
834
+ # process the header parameters
835
+ if x_daytona_organization_id is not None:
836
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
837
+ # process the form parameters
838
+ # process the body parameter
839
+
840
+
841
+ # set the HTTP header `Accept`
842
+ if 'Accept' not in _header_params:
843
+ _header_params['Accept'] = self.api_client.select_header_accept(
844
+ [
845
+ 'application/json'
846
+ ]
847
+ )
848
+
849
+
850
+ # authentication setting
851
+ _auth_settings: List[str] = [
852
+ 'bearer',
853
+ 'oauth2'
854
+ ]
855
+
856
+ return self.api_client.param_serialize(
857
+ method='GET',
858
+ resource_path='/docker-registry/{id}',
859
+ path_params=_path_params,
860
+ query_params=_query_params,
861
+ header_params=_header_params,
862
+ body=_body_params,
863
+ post_params=_form_params,
864
+ files=_files,
865
+ auth_settings=_auth_settings,
866
+ collection_formats=_collection_formats,
867
+ _host=_host,
868
+ _request_auth=_request_auth
869
+ )
870
+
871
+
872
+
873
+
874
+ @validate_call
875
+ async def get_transient_push_access(
876
+ self,
877
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
878
+ _request_timeout: Union[
879
+ None,
880
+ Annotated[StrictFloat, Field(gt=0)],
881
+ Tuple[
882
+ Annotated[StrictFloat, Field(gt=0)],
883
+ Annotated[StrictFloat, Field(gt=0)]
884
+ ]
885
+ ] = None,
886
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
887
+ _content_type: Optional[StrictStr] = None,
888
+ _headers: Optional[Dict[StrictStr, Any]] = None,
889
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
890
+ ) -> RegistryPushAccessDto:
891
+ """Get temporary registry access for pushing snapshots
892
+
893
+
894
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
895
+ :type x_daytona_organization_id: str
896
+ :param _request_timeout: timeout setting for this request. If one
897
+ number provided, it will be total request
898
+ timeout. It can also be a pair (tuple) of
899
+ (connection, read) timeouts.
900
+ :type _request_timeout: int, tuple(int, int), optional
901
+ :param _request_auth: set to override the auth_settings for an a single
902
+ request; this effectively ignores the
903
+ authentication in the spec for a single request.
904
+ :type _request_auth: dict, optional
905
+ :param _content_type: force content-type for the request.
906
+ :type _content_type: str, Optional
907
+ :param _headers: set to override the headers for a single
908
+ request; this effectively ignores the headers
909
+ in the spec for a single request.
910
+ :type _headers: dict, optional
911
+ :param _host_index: set to override the host_index for a single
912
+ request; this effectively ignores the host_index
913
+ in the spec for a single request.
914
+ :type _host_index: int, optional
915
+ :return: Returns the result object.
916
+ """ # noqa: E501
917
+
918
+ _param = self._get_transient_push_access_serialize(
919
+ x_daytona_organization_id=x_daytona_organization_id,
920
+ _request_auth=_request_auth,
921
+ _content_type=_content_type,
922
+ _headers=_headers,
923
+ _host_index=_host_index
924
+ )
925
+
926
+ _response_types_map: Dict[str, Optional[str]] = {
927
+ '200': "RegistryPushAccessDto",
928
+ }
929
+ response_data = await self.api_client.call_api(
930
+ *_param,
931
+ _request_timeout=_request_timeout
932
+ )
933
+ await response_data.read()
934
+ return self.api_client.response_deserialize(
935
+ response_data=response_data,
936
+ response_types_map=_response_types_map,
937
+ ).data
938
+
939
+
940
+ @validate_call
941
+ async def get_transient_push_access_with_http_info(
942
+ self,
943
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
944
+ _request_timeout: Union[
945
+ None,
946
+ Annotated[StrictFloat, Field(gt=0)],
947
+ Tuple[
948
+ Annotated[StrictFloat, Field(gt=0)],
949
+ Annotated[StrictFloat, Field(gt=0)]
950
+ ]
951
+ ] = None,
952
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
953
+ _content_type: Optional[StrictStr] = None,
954
+ _headers: Optional[Dict[StrictStr, Any]] = None,
955
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
956
+ ) -> ApiResponse[RegistryPushAccessDto]:
957
+ """Get temporary registry access for pushing snapshots
958
+
959
+
960
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
961
+ :type x_daytona_organization_id: str
962
+ :param _request_timeout: timeout setting for this request. If one
963
+ number provided, it will be total request
964
+ timeout. It can also be a pair (tuple) of
965
+ (connection, read) timeouts.
966
+ :type _request_timeout: int, tuple(int, int), optional
967
+ :param _request_auth: set to override the auth_settings for an a single
968
+ request; this effectively ignores the
969
+ authentication in the spec for a single request.
970
+ :type _request_auth: dict, optional
971
+ :param _content_type: force content-type for the request.
972
+ :type _content_type: str, Optional
973
+ :param _headers: set to override the headers for a single
974
+ request; this effectively ignores the headers
975
+ in the spec for a single request.
976
+ :type _headers: dict, optional
977
+ :param _host_index: set to override the host_index for a single
978
+ request; this effectively ignores the host_index
979
+ in the spec for a single request.
980
+ :type _host_index: int, optional
981
+ :return: Returns the result object.
982
+ """ # noqa: E501
983
+
984
+ _param = self._get_transient_push_access_serialize(
985
+ x_daytona_organization_id=x_daytona_organization_id,
986
+ _request_auth=_request_auth,
987
+ _content_type=_content_type,
988
+ _headers=_headers,
989
+ _host_index=_host_index
990
+ )
991
+
992
+ _response_types_map: Dict[str, Optional[str]] = {
993
+ '200': "RegistryPushAccessDto",
994
+ }
995
+ response_data = await self.api_client.call_api(
996
+ *_param,
997
+ _request_timeout=_request_timeout
998
+ )
999
+ await response_data.read()
1000
+ return self.api_client.response_deserialize(
1001
+ response_data=response_data,
1002
+ response_types_map=_response_types_map,
1003
+ )
1004
+
1005
+
1006
+ @validate_call
1007
+ async def get_transient_push_access_without_preload_content(
1008
+ self,
1009
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1010
+ _request_timeout: Union[
1011
+ None,
1012
+ Annotated[StrictFloat, Field(gt=0)],
1013
+ Tuple[
1014
+ Annotated[StrictFloat, Field(gt=0)],
1015
+ Annotated[StrictFloat, Field(gt=0)]
1016
+ ]
1017
+ ] = None,
1018
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1019
+ _content_type: Optional[StrictStr] = None,
1020
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1021
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1022
+ ) -> RESTResponseType:
1023
+ """Get temporary registry access for pushing snapshots
1024
+
1025
+
1026
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1027
+ :type x_daytona_organization_id: str
1028
+ :param _request_timeout: timeout setting for this request. If one
1029
+ number provided, it will be total request
1030
+ timeout. It can also be a pair (tuple) of
1031
+ (connection, read) timeouts.
1032
+ :type _request_timeout: int, tuple(int, int), optional
1033
+ :param _request_auth: set to override the auth_settings for an a single
1034
+ request; this effectively ignores the
1035
+ authentication in the spec for a single request.
1036
+ :type _request_auth: dict, optional
1037
+ :param _content_type: force content-type for the request.
1038
+ :type _content_type: str, Optional
1039
+ :param _headers: set to override the headers for a single
1040
+ request; this effectively ignores the headers
1041
+ in the spec for a single request.
1042
+ :type _headers: dict, optional
1043
+ :param _host_index: set to override the host_index for a single
1044
+ request; this effectively ignores the host_index
1045
+ in the spec for a single request.
1046
+ :type _host_index: int, optional
1047
+ :return: Returns the result object.
1048
+ """ # noqa: E501
1049
+
1050
+ _param = self._get_transient_push_access_serialize(
1051
+ x_daytona_organization_id=x_daytona_organization_id,
1052
+ _request_auth=_request_auth,
1053
+ _content_type=_content_type,
1054
+ _headers=_headers,
1055
+ _host_index=_host_index
1056
+ )
1057
+
1058
+ _response_types_map: Dict[str, Optional[str]] = {
1059
+ '200': "RegistryPushAccessDto",
1060
+ }
1061
+ response_data = await self.api_client.call_api(
1062
+ *_param,
1063
+ _request_timeout=_request_timeout
1064
+ )
1065
+ return response_data.response
1066
+
1067
+
1068
+ def _get_transient_push_access_serialize(
1069
+ self,
1070
+ x_daytona_organization_id,
1071
+ _request_auth,
1072
+ _content_type,
1073
+ _headers,
1074
+ _host_index,
1075
+ ) -> RequestSerialized:
1076
+
1077
+ _host = None
1078
+
1079
+ _collection_formats: Dict[str, str] = {
1080
+ }
1081
+
1082
+ _path_params: Dict[str, str] = {}
1083
+ _query_params: List[Tuple[str, str]] = []
1084
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1085
+ _form_params: List[Tuple[str, str]] = []
1086
+ _files: Dict[
1087
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1088
+ ] = {}
1089
+ _body_params: Optional[bytes] = None
1090
+
1091
+ # process the path parameters
1092
+ # process the query parameters
1093
+ # process the header parameters
1094
+ if x_daytona_organization_id is not None:
1095
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1096
+ # process the form parameters
1097
+ # process the body parameter
1098
+
1099
+
1100
+ # set the HTTP header `Accept`
1101
+ if 'Accept' not in _header_params:
1102
+ _header_params['Accept'] = self.api_client.select_header_accept(
1103
+ [
1104
+ 'application/json'
1105
+ ]
1106
+ )
1107
+
1108
+
1109
+ # authentication setting
1110
+ _auth_settings: List[str] = [
1111
+ 'bearer',
1112
+ 'oauth2'
1113
+ ]
1114
+
1115
+ return self.api_client.param_serialize(
1116
+ method='GET',
1117
+ resource_path='/docker-registry/registry-push-access',
1118
+ path_params=_path_params,
1119
+ query_params=_query_params,
1120
+ header_params=_header_params,
1121
+ body=_body_params,
1122
+ post_params=_form_params,
1123
+ files=_files,
1124
+ auth_settings=_auth_settings,
1125
+ collection_formats=_collection_formats,
1126
+ _host=_host,
1127
+ _request_auth=_request_auth
1128
+ )
1129
+
1130
+
1131
+
1132
+
1133
+ @validate_call
1134
+ async def list_registries(
1135
+ self,
1136
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1137
+ _request_timeout: Union[
1138
+ None,
1139
+ Annotated[StrictFloat, Field(gt=0)],
1140
+ Tuple[
1141
+ Annotated[StrictFloat, Field(gt=0)],
1142
+ Annotated[StrictFloat, Field(gt=0)]
1143
+ ]
1144
+ ] = None,
1145
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1146
+ _content_type: Optional[StrictStr] = None,
1147
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1148
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1149
+ ) -> List[DockerRegistry]:
1150
+ """List registries
1151
+
1152
+
1153
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1154
+ :type x_daytona_organization_id: str
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_registries_serialize(
1178
+ x_daytona_organization_id=x_daytona_organization_id,
1179
+ _request_auth=_request_auth,
1180
+ _content_type=_content_type,
1181
+ _headers=_headers,
1182
+ _host_index=_host_index
1183
+ )
1184
+
1185
+ _response_types_map: Dict[str, Optional[str]] = {
1186
+ '200': "List[DockerRegistry]",
1187
+ }
1188
+ response_data = await self.api_client.call_api(
1189
+ *_param,
1190
+ _request_timeout=_request_timeout
1191
+ )
1192
+ await response_data.read()
1193
+ return self.api_client.response_deserialize(
1194
+ response_data=response_data,
1195
+ response_types_map=_response_types_map,
1196
+ ).data
1197
+
1198
+
1199
+ @validate_call
1200
+ async def list_registries_with_http_info(
1201
+ self,
1202
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1203
+ _request_timeout: Union[
1204
+ None,
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Tuple[
1207
+ Annotated[StrictFloat, Field(gt=0)],
1208
+ Annotated[StrictFloat, Field(gt=0)]
1209
+ ]
1210
+ ] = None,
1211
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1212
+ _content_type: Optional[StrictStr] = None,
1213
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1214
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1215
+ ) -> ApiResponse[List[DockerRegistry]]:
1216
+ """List registries
1217
+
1218
+
1219
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1220
+ :type x_daytona_organization_id: str
1221
+ :param _request_timeout: timeout setting for this request. If one
1222
+ number provided, it will be total request
1223
+ timeout. It can also be a pair (tuple) of
1224
+ (connection, read) timeouts.
1225
+ :type _request_timeout: int, tuple(int, int), optional
1226
+ :param _request_auth: set to override the auth_settings for an a single
1227
+ request; this effectively ignores the
1228
+ authentication in the spec for a single request.
1229
+ :type _request_auth: dict, optional
1230
+ :param _content_type: force content-type for the request.
1231
+ :type _content_type: str, Optional
1232
+ :param _headers: set to override the headers for a single
1233
+ request; this effectively ignores the headers
1234
+ in the spec for a single request.
1235
+ :type _headers: dict, optional
1236
+ :param _host_index: set to override the host_index for a single
1237
+ request; this effectively ignores the host_index
1238
+ in the spec for a single request.
1239
+ :type _host_index: int, optional
1240
+ :return: Returns the result object.
1241
+ """ # noqa: E501
1242
+
1243
+ _param = self._list_registries_serialize(
1244
+ x_daytona_organization_id=x_daytona_organization_id,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ '200': "List[DockerRegistry]",
1253
+ }
1254
+ response_data = await self.api_client.call_api(
1255
+ *_param,
1256
+ _request_timeout=_request_timeout
1257
+ )
1258
+ await response_data.read()
1259
+ return self.api_client.response_deserialize(
1260
+ response_data=response_data,
1261
+ response_types_map=_response_types_map,
1262
+ )
1263
+
1264
+
1265
+ @validate_call
1266
+ async def list_registries_without_preload_content(
1267
+ self,
1268
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1269
+ _request_timeout: Union[
1270
+ None,
1271
+ Annotated[StrictFloat, Field(gt=0)],
1272
+ Tuple[
1273
+ Annotated[StrictFloat, Field(gt=0)],
1274
+ Annotated[StrictFloat, Field(gt=0)]
1275
+ ]
1276
+ ] = None,
1277
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1278
+ _content_type: Optional[StrictStr] = None,
1279
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1280
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1281
+ ) -> RESTResponseType:
1282
+ """List registries
1283
+
1284
+
1285
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1286
+ :type x_daytona_organization_id: str
1287
+ :param _request_timeout: timeout setting for this request. If one
1288
+ number provided, it will be total request
1289
+ timeout. It can also be a pair (tuple) of
1290
+ (connection, read) timeouts.
1291
+ :type _request_timeout: int, tuple(int, int), optional
1292
+ :param _request_auth: set to override the auth_settings for an a single
1293
+ request; this effectively ignores the
1294
+ authentication in the spec for a single request.
1295
+ :type _request_auth: dict, optional
1296
+ :param _content_type: force content-type for the request.
1297
+ :type _content_type: str, Optional
1298
+ :param _headers: set to override the headers for a single
1299
+ request; this effectively ignores the headers
1300
+ in the spec for a single request.
1301
+ :type _headers: dict, optional
1302
+ :param _host_index: set to override the host_index for a single
1303
+ request; this effectively ignores the host_index
1304
+ in the spec for a single request.
1305
+ :type _host_index: int, optional
1306
+ :return: Returns the result object.
1307
+ """ # noqa: E501
1308
+
1309
+ _param = self._list_registries_serialize(
1310
+ x_daytona_organization_id=x_daytona_organization_id,
1311
+ _request_auth=_request_auth,
1312
+ _content_type=_content_type,
1313
+ _headers=_headers,
1314
+ _host_index=_host_index
1315
+ )
1316
+
1317
+ _response_types_map: Dict[str, Optional[str]] = {
1318
+ '200': "List[DockerRegistry]",
1319
+ }
1320
+ response_data = await self.api_client.call_api(
1321
+ *_param,
1322
+ _request_timeout=_request_timeout
1323
+ )
1324
+ return response_data.response
1325
+
1326
+
1327
+ def _list_registries_serialize(
1328
+ self,
1329
+ x_daytona_organization_id,
1330
+ _request_auth,
1331
+ _content_type,
1332
+ _headers,
1333
+ _host_index,
1334
+ ) -> RequestSerialized:
1335
+
1336
+ _host = None
1337
+
1338
+ _collection_formats: Dict[str, str] = {
1339
+ }
1340
+
1341
+ _path_params: Dict[str, str] = {}
1342
+ _query_params: List[Tuple[str, str]] = []
1343
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1344
+ _form_params: List[Tuple[str, str]] = []
1345
+ _files: Dict[
1346
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1347
+ ] = {}
1348
+ _body_params: Optional[bytes] = None
1349
+
1350
+ # process the path parameters
1351
+ # process the query parameters
1352
+ # process the header parameters
1353
+ if x_daytona_organization_id is not None:
1354
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1355
+ # process the form parameters
1356
+ # process the body parameter
1357
+
1358
+
1359
+ # set the HTTP header `Accept`
1360
+ if 'Accept' not in _header_params:
1361
+ _header_params['Accept'] = self.api_client.select_header_accept(
1362
+ [
1363
+ 'application/json'
1364
+ ]
1365
+ )
1366
+
1367
+
1368
+ # authentication setting
1369
+ _auth_settings: List[str] = [
1370
+ 'bearer',
1371
+ 'oauth2'
1372
+ ]
1373
+
1374
+ return self.api_client.param_serialize(
1375
+ method='GET',
1376
+ resource_path='/docker-registry',
1377
+ path_params=_path_params,
1378
+ query_params=_query_params,
1379
+ header_params=_header_params,
1380
+ body=_body_params,
1381
+ post_params=_form_params,
1382
+ files=_files,
1383
+ auth_settings=_auth_settings,
1384
+ collection_formats=_collection_formats,
1385
+ _host=_host,
1386
+ _request_auth=_request_auth
1387
+ )
1388
+
1389
+
1390
+
1391
+
1392
+ @validate_call
1393
+ async def set_default_registry(
1394
+ self,
1395
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1396
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1397
+ _request_timeout: Union[
1398
+ None,
1399
+ Annotated[StrictFloat, Field(gt=0)],
1400
+ Tuple[
1401
+ Annotated[StrictFloat, Field(gt=0)],
1402
+ Annotated[StrictFloat, Field(gt=0)]
1403
+ ]
1404
+ ] = None,
1405
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1406
+ _content_type: Optional[StrictStr] = None,
1407
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1408
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1409
+ ) -> DockerRegistry:
1410
+ """Set default registry
1411
+
1412
+
1413
+ :param id: ID of the docker registry (required)
1414
+ :type id: str
1415
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1416
+ :type x_daytona_organization_id: str
1417
+ :param _request_timeout: timeout setting for this request. If one
1418
+ number provided, it will be total request
1419
+ timeout. It can also be a pair (tuple) of
1420
+ (connection, read) timeouts.
1421
+ :type _request_timeout: int, tuple(int, int), optional
1422
+ :param _request_auth: set to override the auth_settings for an a single
1423
+ request; this effectively ignores the
1424
+ authentication in the spec for a single request.
1425
+ :type _request_auth: dict, optional
1426
+ :param _content_type: force content-type for the request.
1427
+ :type _content_type: str, Optional
1428
+ :param _headers: set to override the headers for a single
1429
+ request; this effectively ignores the headers
1430
+ in the spec for a single request.
1431
+ :type _headers: dict, optional
1432
+ :param _host_index: set to override the host_index for a single
1433
+ request; this effectively ignores the host_index
1434
+ in the spec for a single request.
1435
+ :type _host_index: int, optional
1436
+ :return: Returns the result object.
1437
+ """ # noqa: E501
1438
+
1439
+ _param = self._set_default_registry_serialize(
1440
+ id=id,
1441
+ x_daytona_organization_id=x_daytona_organization_id,
1442
+ _request_auth=_request_auth,
1443
+ _content_type=_content_type,
1444
+ _headers=_headers,
1445
+ _host_index=_host_index
1446
+ )
1447
+
1448
+ _response_types_map: Dict[str, Optional[str]] = {
1449
+ '200': "DockerRegistry",
1450
+ }
1451
+ response_data = await self.api_client.call_api(
1452
+ *_param,
1453
+ _request_timeout=_request_timeout
1454
+ )
1455
+ await response_data.read()
1456
+ return self.api_client.response_deserialize(
1457
+ response_data=response_data,
1458
+ response_types_map=_response_types_map,
1459
+ ).data
1460
+
1461
+
1462
+ @validate_call
1463
+ async def set_default_registry_with_http_info(
1464
+ self,
1465
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1466
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1467
+ _request_timeout: Union[
1468
+ None,
1469
+ Annotated[StrictFloat, Field(gt=0)],
1470
+ Tuple[
1471
+ Annotated[StrictFloat, Field(gt=0)],
1472
+ Annotated[StrictFloat, Field(gt=0)]
1473
+ ]
1474
+ ] = None,
1475
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1476
+ _content_type: Optional[StrictStr] = None,
1477
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1478
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1479
+ ) -> ApiResponse[DockerRegistry]:
1480
+ """Set default registry
1481
+
1482
+
1483
+ :param id: ID of the docker registry (required)
1484
+ :type id: str
1485
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1486
+ :type x_daytona_organization_id: str
1487
+ :param _request_timeout: timeout setting for this request. If one
1488
+ number provided, it will be total request
1489
+ timeout. It can also be a pair (tuple) of
1490
+ (connection, read) timeouts.
1491
+ :type _request_timeout: int, tuple(int, int), optional
1492
+ :param _request_auth: set to override the auth_settings for an a single
1493
+ request; this effectively ignores the
1494
+ authentication in the spec for a single request.
1495
+ :type _request_auth: dict, optional
1496
+ :param _content_type: force content-type for the request.
1497
+ :type _content_type: str, Optional
1498
+ :param _headers: set to override the headers for a single
1499
+ request; this effectively ignores the headers
1500
+ in the spec for a single request.
1501
+ :type _headers: dict, optional
1502
+ :param _host_index: set to override the host_index for a single
1503
+ request; this effectively ignores the host_index
1504
+ in the spec for a single request.
1505
+ :type _host_index: int, optional
1506
+ :return: Returns the result object.
1507
+ """ # noqa: E501
1508
+
1509
+ _param = self._set_default_registry_serialize(
1510
+ id=id,
1511
+ x_daytona_organization_id=x_daytona_organization_id,
1512
+ _request_auth=_request_auth,
1513
+ _content_type=_content_type,
1514
+ _headers=_headers,
1515
+ _host_index=_host_index
1516
+ )
1517
+
1518
+ _response_types_map: Dict[str, Optional[str]] = {
1519
+ '200': "DockerRegistry",
1520
+ }
1521
+ response_data = await self.api_client.call_api(
1522
+ *_param,
1523
+ _request_timeout=_request_timeout
1524
+ )
1525
+ await response_data.read()
1526
+ return self.api_client.response_deserialize(
1527
+ response_data=response_data,
1528
+ response_types_map=_response_types_map,
1529
+ )
1530
+
1531
+
1532
+ @validate_call
1533
+ async def set_default_registry_without_preload_content(
1534
+ self,
1535
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1536
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1537
+ _request_timeout: Union[
1538
+ None,
1539
+ Annotated[StrictFloat, Field(gt=0)],
1540
+ Tuple[
1541
+ Annotated[StrictFloat, Field(gt=0)],
1542
+ Annotated[StrictFloat, Field(gt=0)]
1543
+ ]
1544
+ ] = None,
1545
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1546
+ _content_type: Optional[StrictStr] = None,
1547
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1548
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1549
+ ) -> RESTResponseType:
1550
+ """Set default registry
1551
+
1552
+
1553
+ :param id: ID of the docker registry (required)
1554
+ :type id: str
1555
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1556
+ :type x_daytona_organization_id: str
1557
+ :param _request_timeout: timeout setting for this request. If one
1558
+ number provided, it will be total request
1559
+ timeout. It can also be a pair (tuple) of
1560
+ (connection, read) timeouts.
1561
+ :type _request_timeout: int, tuple(int, int), optional
1562
+ :param _request_auth: set to override the auth_settings for an a single
1563
+ request; this effectively ignores the
1564
+ authentication in the spec for a single request.
1565
+ :type _request_auth: dict, optional
1566
+ :param _content_type: force content-type for the request.
1567
+ :type _content_type: str, Optional
1568
+ :param _headers: set to override the headers for a single
1569
+ request; this effectively ignores the headers
1570
+ in the spec for a single request.
1571
+ :type _headers: dict, optional
1572
+ :param _host_index: set to override the host_index for a single
1573
+ request; this effectively ignores the host_index
1574
+ in the spec for a single request.
1575
+ :type _host_index: int, optional
1576
+ :return: Returns the result object.
1577
+ """ # noqa: E501
1578
+
1579
+ _param = self._set_default_registry_serialize(
1580
+ id=id,
1581
+ x_daytona_organization_id=x_daytona_organization_id,
1582
+ _request_auth=_request_auth,
1583
+ _content_type=_content_type,
1584
+ _headers=_headers,
1585
+ _host_index=_host_index
1586
+ )
1587
+
1588
+ _response_types_map: Dict[str, Optional[str]] = {
1589
+ '200': "DockerRegistry",
1590
+ }
1591
+ response_data = await self.api_client.call_api(
1592
+ *_param,
1593
+ _request_timeout=_request_timeout
1594
+ )
1595
+ return response_data.response
1596
+
1597
+
1598
+ def _set_default_registry_serialize(
1599
+ self,
1600
+ id,
1601
+ x_daytona_organization_id,
1602
+ _request_auth,
1603
+ _content_type,
1604
+ _headers,
1605
+ _host_index,
1606
+ ) -> RequestSerialized:
1607
+
1608
+ _host = None
1609
+
1610
+ _collection_formats: Dict[str, str] = {
1611
+ }
1612
+
1613
+ _path_params: Dict[str, str] = {}
1614
+ _query_params: List[Tuple[str, str]] = []
1615
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1616
+ _form_params: List[Tuple[str, str]] = []
1617
+ _files: Dict[
1618
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1619
+ ] = {}
1620
+ _body_params: Optional[bytes] = None
1621
+
1622
+ # process the path parameters
1623
+ if id is not None:
1624
+ _path_params['id'] = id
1625
+ # process the query parameters
1626
+ # process the header parameters
1627
+ if x_daytona_organization_id is not None:
1628
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1629
+ # process the form parameters
1630
+ # process the body parameter
1631
+
1632
+
1633
+ # set the HTTP header `Accept`
1634
+ if 'Accept' not in _header_params:
1635
+ _header_params['Accept'] = self.api_client.select_header_accept(
1636
+ [
1637
+ 'application/json'
1638
+ ]
1639
+ )
1640
+
1641
+
1642
+ # authentication setting
1643
+ _auth_settings: List[str] = [
1644
+ 'bearer',
1645
+ 'oauth2'
1646
+ ]
1647
+
1648
+ return self.api_client.param_serialize(
1649
+ method='POST',
1650
+ resource_path='/docker-registry/{id}/set-default',
1651
+ path_params=_path_params,
1652
+ query_params=_query_params,
1653
+ header_params=_header_params,
1654
+ body=_body_params,
1655
+ post_params=_form_params,
1656
+ files=_files,
1657
+ auth_settings=_auth_settings,
1658
+ collection_formats=_collection_formats,
1659
+ _host=_host,
1660
+ _request_auth=_request_auth
1661
+ )
1662
+
1663
+
1664
+
1665
+
1666
+ @validate_call
1667
+ async def update_registry(
1668
+ self,
1669
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1670
+ update_docker_registry: UpdateDockerRegistry,
1671
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1672
+ _request_timeout: Union[
1673
+ None,
1674
+ Annotated[StrictFloat, Field(gt=0)],
1675
+ Tuple[
1676
+ Annotated[StrictFloat, Field(gt=0)],
1677
+ Annotated[StrictFloat, Field(gt=0)]
1678
+ ]
1679
+ ] = None,
1680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1681
+ _content_type: Optional[StrictStr] = None,
1682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1684
+ ) -> DockerRegistry:
1685
+ """Update registry
1686
+
1687
+
1688
+ :param id: ID of the docker registry (required)
1689
+ :type id: str
1690
+ :param update_docker_registry: (required)
1691
+ :type update_docker_registry: UpdateDockerRegistry
1692
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1693
+ :type x_daytona_organization_id: str
1694
+ :param _request_timeout: timeout setting for this request. If one
1695
+ number provided, it will be total request
1696
+ timeout. It can also be a pair (tuple) of
1697
+ (connection, read) timeouts.
1698
+ :type _request_timeout: int, tuple(int, int), optional
1699
+ :param _request_auth: set to override the auth_settings for an a single
1700
+ request; this effectively ignores the
1701
+ authentication in the spec for a single request.
1702
+ :type _request_auth: dict, optional
1703
+ :param _content_type: force content-type for the request.
1704
+ :type _content_type: str, Optional
1705
+ :param _headers: set to override the headers for a single
1706
+ request; this effectively ignores the headers
1707
+ in the spec for a single request.
1708
+ :type _headers: dict, optional
1709
+ :param _host_index: set to override the host_index for a single
1710
+ request; this effectively ignores the host_index
1711
+ in the spec for a single request.
1712
+ :type _host_index: int, optional
1713
+ :return: Returns the result object.
1714
+ """ # noqa: E501
1715
+
1716
+ _param = self._update_registry_serialize(
1717
+ id=id,
1718
+ update_docker_registry=update_docker_registry,
1719
+ x_daytona_organization_id=x_daytona_organization_id,
1720
+ _request_auth=_request_auth,
1721
+ _content_type=_content_type,
1722
+ _headers=_headers,
1723
+ _host_index=_host_index
1724
+ )
1725
+
1726
+ _response_types_map: Dict[str, Optional[str]] = {
1727
+ '200': "DockerRegistry",
1728
+ }
1729
+ response_data = await self.api_client.call_api(
1730
+ *_param,
1731
+ _request_timeout=_request_timeout
1732
+ )
1733
+ await response_data.read()
1734
+ return self.api_client.response_deserialize(
1735
+ response_data=response_data,
1736
+ response_types_map=_response_types_map,
1737
+ ).data
1738
+
1739
+
1740
+ @validate_call
1741
+ async def update_registry_with_http_info(
1742
+ self,
1743
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1744
+ update_docker_registry: UpdateDockerRegistry,
1745
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1746
+ _request_timeout: Union[
1747
+ None,
1748
+ Annotated[StrictFloat, Field(gt=0)],
1749
+ Tuple[
1750
+ Annotated[StrictFloat, Field(gt=0)],
1751
+ Annotated[StrictFloat, Field(gt=0)]
1752
+ ]
1753
+ ] = None,
1754
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1755
+ _content_type: Optional[StrictStr] = None,
1756
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1757
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1758
+ ) -> ApiResponse[DockerRegistry]:
1759
+ """Update registry
1760
+
1761
+
1762
+ :param id: ID of the docker registry (required)
1763
+ :type id: str
1764
+ :param update_docker_registry: (required)
1765
+ :type update_docker_registry: UpdateDockerRegistry
1766
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1767
+ :type x_daytona_organization_id: str
1768
+ :param _request_timeout: timeout setting for this request. If one
1769
+ number provided, it will be total request
1770
+ timeout. It can also be a pair (tuple) of
1771
+ (connection, read) timeouts.
1772
+ :type _request_timeout: int, tuple(int, int), optional
1773
+ :param _request_auth: set to override the auth_settings for an a single
1774
+ request; this effectively ignores the
1775
+ authentication in the spec for a single request.
1776
+ :type _request_auth: dict, optional
1777
+ :param _content_type: force content-type for the request.
1778
+ :type _content_type: str, Optional
1779
+ :param _headers: set to override the headers for a single
1780
+ request; this effectively ignores the headers
1781
+ in the spec for a single request.
1782
+ :type _headers: dict, optional
1783
+ :param _host_index: set to override the host_index for a single
1784
+ request; this effectively ignores the host_index
1785
+ in the spec for a single request.
1786
+ :type _host_index: int, optional
1787
+ :return: Returns the result object.
1788
+ """ # noqa: E501
1789
+
1790
+ _param = self._update_registry_serialize(
1791
+ id=id,
1792
+ update_docker_registry=update_docker_registry,
1793
+ x_daytona_organization_id=x_daytona_organization_id,
1794
+ _request_auth=_request_auth,
1795
+ _content_type=_content_type,
1796
+ _headers=_headers,
1797
+ _host_index=_host_index
1798
+ )
1799
+
1800
+ _response_types_map: Dict[str, Optional[str]] = {
1801
+ '200': "DockerRegistry",
1802
+ }
1803
+ response_data = await self.api_client.call_api(
1804
+ *_param,
1805
+ _request_timeout=_request_timeout
1806
+ )
1807
+ await response_data.read()
1808
+ return self.api_client.response_deserialize(
1809
+ response_data=response_data,
1810
+ response_types_map=_response_types_map,
1811
+ )
1812
+
1813
+
1814
+ @validate_call
1815
+ async def update_registry_without_preload_content(
1816
+ self,
1817
+ id: Annotated[StrictStr, Field(description="ID of the docker registry")],
1818
+ update_docker_registry: UpdateDockerRegistry,
1819
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1820
+ _request_timeout: Union[
1821
+ None,
1822
+ Annotated[StrictFloat, Field(gt=0)],
1823
+ Tuple[
1824
+ Annotated[StrictFloat, Field(gt=0)],
1825
+ Annotated[StrictFloat, Field(gt=0)]
1826
+ ]
1827
+ ] = None,
1828
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1829
+ _content_type: Optional[StrictStr] = None,
1830
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1831
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1832
+ ) -> RESTResponseType:
1833
+ """Update registry
1834
+
1835
+
1836
+ :param id: ID of the docker registry (required)
1837
+ :type id: str
1838
+ :param update_docker_registry: (required)
1839
+ :type update_docker_registry: UpdateDockerRegistry
1840
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1841
+ :type x_daytona_organization_id: str
1842
+ :param _request_timeout: timeout setting for this request. If one
1843
+ number provided, it will be total request
1844
+ timeout. It can also be a pair (tuple) of
1845
+ (connection, read) timeouts.
1846
+ :type _request_timeout: int, tuple(int, int), optional
1847
+ :param _request_auth: set to override the auth_settings for an a single
1848
+ request; this effectively ignores the
1849
+ authentication in the spec for a single request.
1850
+ :type _request_auth: dict, optional
1851
+ :param _content_type: force content-type for the request.
1852
+ :type _content_type: str, Optional
1853
+ :param _headers: set to override the headers for a single
1854
+ request; this effectively ignores the headers
1855
+ in the spec for a single request.
1856
+ :type _headers: dict, optional
1857
+ :param _host_index: set to override the host_index for a single
1858
+ request; this effectively ignores the host_index
1859
+ in the spec for a single request.
1860
+ :type _host_index: int, optional
1861
+ :return: Returns the result object.
1862
+ """ # noqa: E501
1863
+
1864
+ _param = self._update_registry_serialize(
1865
+ id=id,
1866
+ update_docker_registry=update_docker_registry,
1867
+ x_daytona_organization_id=x_daytona_organization_id,
1868
+ _request_auth=_request_auth,
1869
+ _content_type=_content_type,
1870
+ _headers=_headers,
1871
+ _host_index=_host_index
1872
+ )
1873
+
1874
+ _response_types_map: Dict[str, Optional[str]] = {
1875
+ '200': "DockerRegistry",
1876
+ }
1877
+ response_data = await self.api_client.call_api(
1878
+ *_param,
1879
+ _request_timeout=_request_timeout
1880
+ )
1881
+ return response_data.response
1882
+
1883
+
1884
+ def _update_registry_serialize(
1885
+ self,
1886
+ id,
1887
+ update_docker_registry,
1888
+ x_daytona_organization_id,
1889
+ _request_auth,
1890
+ _content_type,
1891
+ _headers,
1892
+ _host_index,
1893
+ ) -> RequestSerialized:
1894
+
1895
+ _host = None
1896
+
1897
+ _collection_formats: Dict[str, str] = {
1898
+ }
1899
+
1900
+ _path_params: Dict[str, str] = {}
1901
+ _query_params: List[Tuple[str, str]] = []
1902
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1903
+ _form_params: List[Tuple[str, str]] = []
1904
+ _files: Dict[
1905
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1906
+ ] = {}
1907
+ _body_params: Optional[bytes] = None
1908
+
1909
+ # process the path parameters
1910
+ if id is not None:
1911
+ _path_params['id'] = id
1912
+ # process the query parameters
1913
+ # process the header parameters
1914
+ if x_daytona_organization_id is not None:
1915
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1916
+ # process the form parameters
1917
+ # process the body parameter
1918
+ if update_docker_registry is not None:
1919
+ _body_params = update_docker_registry
1920
+
1921
+
1922
+ # set the HTTP header `Accept`
1923
+ if 'Accept' not in _header_params:
1924
+ _header_params['Accept'] = self.api_client.select_header_accept(
1925
+ [
1926
+ 'application/json'
1927
+ ]
1928
+ )
1929
+
1930
+ # set the HTTP header `Content-Type`
1931
+ if _content_type:
1932
+ _header_params['Content-Type'] = _content_type
1933
+ else:
1934
+ _default_content_type = (
1935
+ self.api_client.select_header_content_type(
1936
+ [
1937
+ 'application/json'
1938
+ ]
1939
+ )
1940
+ )
1941
+ if _default_content_type is not None:
1942
+ _header_params['Content-Type'] = _default_content_type
1943
+
1944
+ # authentication setting
1945
+ _auth_settings: List[str] = [
1946
+ 'bearer',
1947
+ 'oauth2'
1948
+ ]
1949
+
1950
+ return self.api_client.param_serialize(
1951
+ method='PATCH',
1952
+ resource_path='/docker-registry/{id}',
1953
+ path_params=_path_params,
1954
+ query_params=_query_params,
1955
+ header_params=_header_params,
1956
+ body=_body_params,
1957
+ post_params=_form_params,
1958
+ files=_files,
1959
+ auth_settings=_auth_settings,
1960
+ collection_formats=_collection_formats,
1961
+ _host=_host,
1962
+ _request_auth=_request_auth
1963
+ )
1964
+
1965
+