qi-compute-api-client 0.4.0__py3-none-any.whl → 0.17.0__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 qi-compute-api-client might be problematic. Click here for more details.

Files changed (166) hide show
  1. compute_api_client/__init__.py +23 -20
  2. compute_api_client/api/__init__.py +5 -6
  3. compute_api_client/api/algorithms_api.py +1334 -554
  4. compute_api_client/api/backend_api.py +1501 -0
  5. compute_api_client/api/backend_types_api.py +684 -0
  6. compute_api_client/api/batch_jobs_api.py +1937 -0
  7. compute_api_client/api/commits_api.py +1069 -436
  8. compute_api_client/api/files_api.py +1076 -436
  9. compute_api_client/api/final_results_api.py +737 -339
  10. compute_api_client/api/jobs_api.py +1653 -0
  11. compute_api_client/api/languages_api.py +557 -218
  12. compute_api_client/api/members_api.py +1058 -436
  13. compute_api_client/api/metadata_api.py +737 -338
  14. compute_api_client/api/permissions_api.py +1056 -422
  15. compute_api_client/api/projects_api.py +1605 -677
  16. compute_api_client/api/reservations_api.py +1125 -428
  17. compute_api_client/api/results_api.py +739 -338
  18. compute_api_client/api/teams_api.py +568 -221
  19. compute_api_client/api/transactions_api.py +680 -219
  20. compute_api_client/api/users_api.py +1091 -436
  21. compute_api_client/api_client.py +347 -305
  22. compute_api_client/api_response.py +21 -0
  23. compute_api_client/configuration.py +55 -68
  24. compute_api_client/docs/Algorithm.md +20 -3
  25. compute_api_client/docs/AlgorithmIn.md +20 -3
  26. compute_api_client/docs/AlgorithmType.md +0 -1
  27. compute_api_client/docs/AlgorithmsApi.md +78 -77
  28. compute_api_client/docs/Backend.md +33 -0
  29. compute_api_client/docs/BackendApi.md +419 -0
  30. compute_api_client/docs/BackendPatch.md +29 -0
  31. compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
  32. compute_api_client/docs/BackendType.md +36 -0
  33. compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
  34. compute_api_client/docs/BackendWithAuthentication.md +34 -0
  35. compute_api_client/docs/BatchJob.md +38 -0
  36. compute_api_client/docs/BatchJobIn.md +29 -0
  37. compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
  38. compute_api_client/docs/BatchJobsApi.md +524 -0
  39. compute_api_client/docs/Commit.md +18 -1
  40. compute_api_client/docs/CommitIn.md +17 -0
  41. compute_api_client/docs/CommitsApi.md +62 -71
  42. compute_api_client/docs/CompileStage.md +0 -1
  43. compute_api_client/docs/Domain.md +0 -1
  44. compute_api_client/docs/File.md +21 -4
  45. compute_api_client/docs/FileIn.md +21 -4
  46. compute_api_client/docs/FilesApi.md +65 -71
  47. compute_api_client/docs/FinalResult.md +20 -3
  48. compute_api_client/docs/FinalResultIn.md +19 -2
  49. compute_api_client/docs/FinalResultsApi.md +44 -71
  50. compute_api_client/docs/HTTPNotFoundError.md +17 -0
  51. compute_api_client/docs/HTTPValidationError.md +18 -1
  52. compute_api_client/docs/Job.md +36 -0
  53. compute_api_client/docs/JobIn.md +31 -0
  54. compute_api_client/docs/JobPatch.md +28 -0
  55. compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
  56. compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
  57. compute_api_client/docs/Language.md +17 -0
  58. compute_api_client/docs/LanguagesApi.md +30 -12
  59. compute_api_client/docs/LocationInner.md +17 -0
  60. compute_api_client/docs/Member.md +19 -2
  61. compute_api_client/docs/MemberIn.md +19 -2
  62. compute_api_client/docs/MembersApi.md +59 -24
  63. compute_api_client/docs/Metadata.md +20 -3
  64. compute_api_client/docs/MetadataApi.md +49 -33
  65. compute_api_client/docs/MetadataIn.md +19 -2
  66. compute_api_client/docs/Permission.md +17 -0
  67. compute_api_client/docs/PermissionGroup.md +17 -0
  68. compute_api_client/docs/PermissionsApi.md +68 -28
  69. compute_api_client/docs/Project.md +20 -3
  70. compute_api_client/docs/ProjectIn.md +18 -1
  71. compute_api_client/docs/ProjectPatch.md +19 -2
  72. compute_api_client/docs/ProjectsApi.md +84 -36
  73. compute_api_client/docs/Reservation.md +21 -4
  74. compute_api_client/docs/ReservationIn.md +19 -2
  75. compute_api_client/docs/ReservationsApi.md +66 -24
  76. compute_api_client/docs/Result.md +23 -6
  77. compute_api_client/docs/ResultIn.md +19 -2
  78. compute_api_client/docs/ResultsApi.md +40 -74
  79. compute_api_client/docs/Role.md +0 -1
  80. compute_api_client/docs/ShareType.md +0 -1
  81. compute_api_client/docs/Team.md +18 -1
  82. compute_api_client/docs/TeamsApi.md +37 -14
  83. compute_api_client/docs/Transaction.md +21 -4
  84. compute_api_client/docs/TransactionsApi.md +50 -14
  85. compute_api_client/docs/User.md +21 -4
  86. compute_api_client/docs/UserIn.md +17 -0
  87. compute_api_client/docs/UsersApi.md +62 -24
  88. compute_api_client/docs/ValidationError.md +18 -1
  89. compute_api_client/exceptions.py +20 -17
  90. compute_api_client/models/__init__.py +17 -15
  91. compute_api_client/models/algorithm.py +79 -238
  92. compute_api_client/models/algorithm_in.py +77 -205
  93. compute_api_client/models/algorithm_type.py +22 -88
  94. compute_api_client/models/backend.py +100 -0
  95. compute_api_client/models/backend_patch.py +90 -0
  96. compute_api_client/models/backend_status.py +47 -0
  97. compute_api_client/models/backend_type.py +105 -0
  98. compute_api_client/models/backend_with_authentication.py +102 -0
  99. compute_api_client/models/batch_job.py +129 -0
  100. compute_api_client/models/batch_job_in.py +89 -0
  101. compute_api_client/models/batch_job_status.py +48 -0
  102. compute_api_client/models/commit.py +73 -231
  103. compute_api_client/models/commit_in.py +68 -170
  104. compute_api_client/models/compile_stage.py +24 -90
  105. compute_api_client/models/domain.py +23 -89
  106. compute_api_client/models/file.py +75 -289
  107. compute_api_client/models/file_in.py +73 -255
  108. compute_api_client/models/final_result.py +69 -199
  109. compute_api_client/models/final_result_in.py +64 -138
  110. compute_api_client/models/http_not_found_error.py +61 -106
  111. compute_api_client/models/http_validation_error.py +70 -106
  112. compute_api_client/models/job.py +120 -0
  113. compute_api_client/models/job_in.py +99 -0
  114. compute_api_client/models/job_patch.py +88 -0
  115. compute_api_client/models/job_status.py +48 -0
  116. compute_api_client/models/language.py +68 -173
  117. compute_api_client/models/location_inner.py +126 -85
  118. compute_api_client/models/member.py +71 -237
  119. compute_api_client/models/member_in.py +69 -204
  120. compute_api_client/models/metadata.py +69 -199
  121. compute_api_client/models/metadata_in.py +69 -138
  122. compute_api_client/models/permission.py +68 -173
  123. compute_api_client/models/permission_group.py +66 -143
  124. compute_api_client/models/project.py +75 -257
  125. compute_api_client/models/project_in.py +70 -196
  126. compute_api_client/models/project_patch.py +90 -193
  127. compute_api_client/models/reservation.py +80 -291
  128. compute_api_client/models/reservation_in.py +69 -201
  129. compute_api_client/models/result.py +102 -360
  130. compute_api_client/models/result_in.py +96 -293
  131. compute_api_client/models/role.py +22 -88
  132. compute_api_client/models/share_type.py +23 -89
  133. compute_api_client/models/team.py +70 -199
  134. compute_api_client/models/transaction.py +94 -300
  135. compute_api_client/models/user.py +76 -277
  136. compute_api_client/models/user_in.py +74 -244
  137. compute_api_client/models/validation_error.py +74 -161
  138. compute_api_client/rest.py +56 -115
  139. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
  140. qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
  141. compute_api_client/api/batch_runs_api.py +0 -862
  142. compute_api_client/api/runs_api.py +0 -723
  143. compute_api_client/api/runtime_api.py +0 -449
  144. compute_api_client/api/runtime_types_api.py +0 -303
  145. compute_api_client/docs/BatchRun.md +0 -21
  146. compute_api_client/docs/BatchRunIn.md +0 -12
  147. compute_api_client/docs/BatchRunsApi.md +0 -600
  148. compute_api_client/docs/Run.md +0 -18
  149. compute_api_client/docs/RunIn.md +0 -13
  150. compute_api_client/docs/Runtime.md +0 -16
  151. compute_api_client/docs/RuntimeApi.md +0 -229
  152. compute_api_client/docs/RuntimeType.md +0 -19
  153. compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
  154. compute_api_client/models/batch_run.py +0 -423
  155. compute_api_client/models/batch_run_in.py +0 -171
  156. compute_api_client/models/batch_run_status.py +0 -114
  157. compute_api_client/models/run.py +0 -345
  158. compute_api_client/models/run_in.py +0 -202
  159. compute_api_client/models/run_status.py +0 -114
  160. compute_api_client/models/runtime.py +0 -290
  161. compute_api_client/models/runtime_status.py +0 -113
  162. compute_api_client/models/runtime_type.py +0 -357
  163. compute_api_client/models/runtime_with_authentication.py +0 -320
  164. qi_compute_api_client-0.4.0.dist-info/RECORD +0 -137
  165. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
  166. {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,684 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import io
16
+ import warnings
17
+
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
20
+
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
25
+
26
+ from pydantic import StrictBool, StrictInt, StrictStr
27
+
28
+ from typing import List, Optional
29
+
30
+ from compute_api_client.models.backend_type import BackendType
31
+
32
+ from compute_api_client.api_client import ApiClient
33
+ from compute_api_client.api_response import ApiResponse
34
+ from compute_api_client.rest import RESTResponseType
35
+
36
+
37
+ class BackendTypesApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+
50
+ @validate_call
51
+ async def read_backend_type_backend_types_id_get(
52
+ self,
53
+ id: StrictInt,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Annotated[StrictFloat, Field(gt=0)]
60
+ ]
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> BackendType:
67
+ """Retrieve backend type
68
+
69
+ Get backend type by ID.
70
+
71
+ :param id: (required)
72
+ :type id: int
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._read_backend_type_backend_types_id_get_serialize(
96
+ id=id,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index
101
+ )
102
+
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '200': "BackendType",
105
+ '404': "HTTPNotFoundError",
106
+ '422': "HTTPValidationError"
107
+
108
+ }
109
+ response_data = await self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ await response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ async def read_backend_type_backend_types_id_get_with_http_info(
122
+ self,
123
+ id: StrictInt,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[BackendType]:
137
+ """Retrieve backend type
138
+
139
+ Get backend type by ID.
140
+
141
+ :param id: (required)
142
+ :type id: int
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._read_backend_type_backend_types_id_get_serialize(
166
+ id=id,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "BackendType",
175
+ '404': "HTTPNotFoundError",
176
+ '422': "HTTPValidationError"
177
+
178
+ }
179
+ response_data = await self.api_client.call_api(
180
+ *_param,
181
+ _request_timeout=_request_timeout
182
+ )
183
+ await response_data.read()
184
+ return self.api_client.response_deserialize(
185
+ response_data=response_data,
186
+ response_types_map=_response_types_map,
187
+ )
188
+
189
+
190
+ @validate_call
191
+ async def read_backend_type_backend_types_id_get_without_preload_content(
192
+ self,
193
+ id: StrictInt,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Retrieve backend type
208
+
209
+ Get backend type by ID.
210
+
211
+ :param id: (required)
212
+ :type id: int
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._read_backend_type_backend_types_id_get_serialize(
236
+ id=id,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "BackendType",
245
+ '404': "HTTPNotFoundError",
246
+ '422': "HTTPValidationError"
247
+
248
+ }
249
+ response_data = await self.api_client.call_api(
250
+ *_param,
251
+ _request_timeout=_request_timeout
252
+ )
253
+ return response_data.response
254
+
255
+
256
+ def _read_backend_type_backend_types_id_get_serialize(
257
+ self,
258
+ id,
259
+ _request_auth,
260
+ _content_type,
261
+ _headers,
262
+ _host_index,
263
+ ) -> Tuple:
264
+
265
+ _host = None
266
+
267
+ _collection_formats: Dict[str, str] = {
268
+
269
+ }
270
+
271
+ _path_params: Dict[str, str] = {}
272
+ _query_params: List[Tuple[str, str]] = []
273
+ _header_params: Dict[str, Optional[str]] = _headers or {}
274
+ _form_params: List[Tuple[str, str]] = []
275
+ _files: Dict[str, str] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ if id is not None:
280
+ _path_params['id'] = id
281
+ # process the query parameters
282
+ # process the header parameters
283
+ # process the form parameters
284
+ # process the body parameter
285
+
286
+
287
+ # set the HTTP header `Accept`
288
+ _header_params['Accept'] = self.api_client.select_header_accept(
289
+ [
290
+ 'application/json'
291
+ ]
292
+ )
293
+
294
+
295
+ # authentication setting
296
+ _auth_settings: List[str] = [
297
+ 'user'
298
+ ]
299
+
300
+ return self.api_client.param_serialize(
301
+ method='GET',
302
+ resource_path='/backend_types/{id}',
303
+ path_params=_path_params,
304
+ query_params=_query_params,
305
+ header_params=_header_params,
306
+ body=_body_params,
307
+ post_params=_form_params,
308
+ files=_files,
309
+ auth_settings=_auth_settings,
310
+ collection_formats=_collection_formats,
311
+ _host=_host,
312
+ _request_auth=_request_auth
313
+ )
314
+
315
+
316
+
317
+
318
+ @validate_call
319
+ async def read_backend_types_backend_types_get(
320
+ self,
321
+ latest: Optional[StrictBool] = None,
322
+ id: Optional[StrictInt] = None,
323
+ name: Optional[StrictStr] = None,
324
+ infrastructure: Optional[StrictStr] = None,
325
+ description: Optional[StrictStr] = None,
326
+ image_id: Optional[StrictStr] = None,
327
+ is_hardware: Optional[StrictBool] = None,
328
+ _request_timeout: Union[
329
+ None,
330
+ Annotated[StrictFloat, Field(gt=0)],
331
+ Tuple[
332
+ Annotated[StrictFloat, Field(gt=0)],
333
+ Annotated[StrictFloat, Field(gt=0)]
334
+ ]
335
+ ] = None,
336
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
337
+ _content_type: Optional[StrictStr] = None,
338
+ _headers: Optional[Dict[StrictStr, Any]] = None,
339
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
340
+ ) -> List[BackendType]:
341
+ """List backend types
342
+
343
+ Read backend types.
344
+
345
+ :param latest:
346
+ :type latest: bool
347
+ :param id:
348
+ :type id: int
349
+ :param name:
350
+ :type name: str
351
+ :param infrastructure:
352
+ :type infrastructure: str
353
+ :param description:
354
+ :type description: str
355
+ :param image_id:
356
+ :type image_id: str
357
+ :param is_hardware:
358
+ :type is_hardware: bool
359
+ :param _request_timeout: timeout setting for this request. If one
360
+ number provided, it will be total request
361
+ timeout. It can also be a pair (tuple) of
362
+ (connection, read) timeouts.
363
+ :type _request_timeout: int, tuple(int, int), optional
364
+ :param _request_auth: set to override the auth_settings for an a single
365
+ request; this effectively ignores the
366
+ authentication in the spec for a single request.
367
+ :type _request_auth: dict, optional
368
+ :param _content_type: force content-type for the request.
369
+ :type _content_type: str, Optional
370
+ :param _headers: set to override the headers for a single
371
+ request; this effectively ignores the headers
372
+ in the spec for a single request.
373
+ :type _headers: dict, optional
374
+ :param _host_index: set to override the host_index for a single
375
+ request; this effectively ignores the host_index
376
+ in the spec for a single request.
377
+ :type _host_index: int, optional
378
+ :return: Returns the result object.
379
+ """ # noqa: E501
380
+
381
+ _param = self._read_backend_types_backend_types_get_serialize(
382
+ latest=latest,
383
+ id=id,
384
+ name=name,
385
+ infrastructure=infrastructure,
386
+ description=description,
387
+ image_id=image_id,
388
+ is_hardware=is_hardware,
389
+ _request_auth=_request_auth,
390
+ _content_type=_content_type,
391
+ _headers=_headers,
392
+ _host_index=_host_index
393
+ )
394
+
395
+ _response_types_map: Dict[str, Optional[str]] = {
396
+ '200': "List[BackendType]",
397
+ '422': "HTTPValidationError"
398
+
399
+ }
400
+ response_data = await self.api_client.call_api(
401
+ *_param,
402
+ _request_timeout=_request_timeout
403
+ )
404
+ await response_data.read()
405
+ return self.api_client.response_deserialize(
406
+ response_data=response_data,
407
+ response_types_map=_response_types_map,
408
+ ).data
409
+
410
+
411
+ @validate_call
412
+ async def read_backend_types_backend_types_get_with_http_info(
413
+ self,
414
+ latest: Optional[StrictBool] = None,
415
+ id: Optional[StrictInt] = None,
416
+ name: Optional[StrictStr] = None,
417
+ infrastructure: Optional[StrictStr] = None,
418
+ description: Optional[StrictStr] = None,
419
+ image_id: Optional[StrictStr] = None,
420
+ is_hardware: Optional[StrictBool] = None,
421
+ _request_timeout: Union[
422
+ None,
423
+ Annotated[StrictFloat, Field(gt=0)],
424
+ Tuple[
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Annotated[StrictFloat, Field(gt=0)]
427
+ ]
428
+ ] = None,
429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
430
+ _content_type: Optional[StrictStr] = None,
431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
433
+ ) -> ApiResponse[List[BackendType]]:
434
+ """List backend types
435
+
436
+ Read backend types.
437
+
438
+ :param latest:
439
+ :type latest: bool
440
+ :param id:
441
+ :type id: int
442
+ :param name:
443
+ :type name: str
444
+ :param infrastructure:
445
+ :type infrastructure: str
446
+ :param description:
447
+ :type description: str
448
+ :param image_id:
449
+ :type image_id: str
450
+ :param is_hardware:
451
+ :type is_hardware: bool
452
+ :param _request_timeout: timeout setting for this request. If one
453
+ number provided, it will be total request
454
+ timeout. It can also be a pair (tuple) of
455
+ (connection, read) timeouts.
456
+ :type _request_timeout: int, tuple(int, int), optional
457
+ :param _request_auth: set to override the auth_settings for an a single
458
+ request; this effectively ignores the
459
+ authentication in the spec for a single request.
460
+ :type _request_auth: dict, optional
461
+ :param _content_type: force content-type for the request.
462
+ :type _content_type: str, Optional
463
+ :param _headers: set to override the headers for a single
464
+ request; this effectively ignores the headers
465
+ in the spec for a single request.
466
+ :type _headers: dict, optional
467
+ :param _host_index: set to override the host_index for a single
468
+ request; this effectively ignores the host_index
469
+ in the spec for a single request.
470
+ :type _host_index: int, optional
471
+ :return: Returns the result object.
472
+ """ # noqa: E501
473
+
474
+ _param = self._read_backend_types_backend_types_get_serialize(
475
+ latest=latest,
476
+ id=id,
477
+ name=name,
478
+ infrastructure=infrastructure,
479
+ description=description,
480
+ image_id=image_id,
481
+ is_hardware=is_hardware,
482
+ _request_auth=_request_auth,
483
+ _content_type=_content_type,
484
+ _headers=_headers,
485
+ _host_index=_host_index
486
+ )
487
+
488
+ _response_types_map: Dict[str, Optional[str]] = {
489
+ '200': "List[BackendType]",
490
+ '422': "HTTPValidationError"
491
+
492
+ }
493
+ response_data = await self.api_client.call_api(
494
+ *_param,
495
+ _request_timeout=_request_timeout
496
+ )
497
+ await response_data.read()
498
+ return self.api_client.response_deserialize(
499
+ response_data=response_data,
500
+ response_types_map=_response_types_map,
501
+ )
502
+
503
+
504
+ @validate_call
505
+ async def read_backend_types_backend_types_get_without_preload_content(
506
+ self,
507
+ latest: Optional[StrictBool] = None,
508
+ id: Optional[StrictInt] = None,
509
+ name: Optional[StrictStr] = None,
510
+ infrastructure: Optional[StrictStr] = None,
511
+ description: Optional[StrictStr] = None,
512
+ image_id: Optional[StrictStr] = None,
513
+ is_hardware: Optional[StrictBool] = None,
514
+ _request_timeout: Union[
515
+ None,
516
+ Annotated[StrictFloat, Field(gt=0)],
517
+ Tuple[
518
+ Annotated[StrictFloat, Field(gt=0)],
519
+ Annotated[StrictFloat, Field(gt=0)]
520
+ ]
521
+ ] = None,
522
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
523
+ _content_type: Optional[StrictStr] = None,
524
+ _headers: Optional[Dict[StrictStr, Any]] = None,
525
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
526
+ ) -> RESTResponseType:
527
+ """List backend types
528
+
529
+ Read backend types.
530
+
531
+ :param latest:
532
+ :type latest: bool
533
+ :param id:
534
+ :type id: int
535
+ :param name:
536
+ :type name: str
537
+ :param infrastructure:
538
+ :type infrastructure: str
539
+ :param description:
540
+ :type description: str
541
+ :param image_id:
542
+ :type image_id: str
543
+ :param is_hardware:
544
+ :type is_hardware: bool
545
+ :param _request_timeout: timeout setting for this request. If one
546
+ number provided, it will be total request
547
+ timeout. It can also be a pair (tuple) of
548
+ (connection, read) timeouts.
549
+ :type _request_timeout: int, tuple(int, int), optional
550
+ :param _request_auth: set to override the auth_settings for an a single
551
+ request; this effectively ignores the
552
+ authentication in the spec for a single request.
553
+ :type _request_auth: dict, optional
554
+ :param _content_type: force content-type for the request.
555
+ :type _content_type: str, Optional
556
+ :param _headers: set to override the headers for a single
557
+ request; this effectively ignores the headers
558
+ in the spec for a single request.
559
+ :type _headers: dict, optional
560
+ :param _host_index: set to override the host_index for a single
561
+ request; this effectively ignores the host_index
562
+ in the spec for a single request.
563
+ :type _host_index: int, optional
564
+ :return: Returns the result object.
565
+ """ # noqa: E501
566
+
567
+ _param = self._read_backend_types_backend_types_get_serialize(
568
+ latest=latest,
569
+ id=id,
570
+ name=name,
571
+ infrastructure=infrastructure,
572
+ description=description,
573
+ image_id=image_id,
574
+ is_hardware=is_hardware,
575
+ _request_auth=_request_auth,
576
+ _content_type=_content_type,
577
+ _headers=_headers,
578
+ _host_index=_host_index
579
+ )
580
+
581
+ _response_types_map: Dict[str, Optional[str]] = {
582
+ '200': "List[BackendType]",
583
+ '422': "HTTPValidationError"
584
+
585
+ }
586
+ response_data = await self.api_client.call_api(
587
+ *_param,
588
+ _request_timeout=_request_timeout
589
+ )
590
+ return response_data.response
591
+
592
+
593
+ def _read_backend_types_backend_types_get_serialize(
594
+ self,
595
+ latest,
596
+ id,
597
+ name,
598
+ infrastructure,
599
+ description,
600
+ image_id,
601
+ is_hardware,
602
+ _request_auth,
603
+ _content_type,
604
+ _headers,
605
+ _host_index,
606
+ ) -> Tuple:
607
+
608
+ _host = None
609
+
610
+ _collection_formats: Dict[str, str] = {
611
+
612
+ }
613
+
614
+ _path_params: Dict[str, str] = {}
615
+ _query_params: List[Tuple[str, str]] = []
616
+ _header_params: Dict[str, Optional[str]] = _headers or {}
617
+ _form_params: List[Tuple[str, str]] = []
618
+ _files: Dict[str, str] = {}
619
+ _body_params: Optional[bytes] = None
620
+
621
+ # process the path parameters
622
+ # process the query parameters
623
+ if latest is not None:
624
+
625
+ _query_params.append(('latest', latest))
626
+
627
+ if id is not None:
628
+
629
+ _query_params.append(('id', id))
630
+
631
+ if name is not None:
632
+
633
+ _query_params.append(('name', name))
634
+
635
+ if infrastructure is not None:
636
+
637
+ _query_params.append(('infrastructure', infrastructure))
638
+
639
+ if description is not None:
640
+
641
+ _query_params.append(('description', description))
642
+
643
+ if image_id is not None:
644
+
645
+ _query_params.append(('image_id', image_id))
646
+
647
+ if is_hardware is not None:
648
+
649
+ _query_params.append(('is_hardware', is_hardware))
650
+
651
+ # process the header parameters
652
+ # process the form parameters
653
+ # process the body parameter
654
+
655
+
656
+ # set the HTTP header `Accept`
657
+ _header_params['Accept'] = self.api_client.select_header_accept(
658
+ [
659
+ 'application/json'
660
+ ]
661
+ )
662
+
663
+
664
+ # authentication setting
665
+ _auth_settings: List[str] = [
666
+ 'user'
667
+ ]
668
+
669
+ return self.api_client.param_serialize(
670
+ method='GET',
671
+ resource_path='/backend_types/',
672
+ path_params=_path_params,
673
+ query_params=_query_params,
674
+ header_params=_header_params,
675
+ body=_body_params,
676
+ post_params=_form_params,
677
+ files=_files,
678
+ auth_settings=_auth_settings,
679
+ collection_formats=_collection_formats,
680
+ _host=_host,
681
+ _request_auth=_request_auth
682
+ )
683
+
684
+