qi-compute-api-client 0.56.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.
Files changed (205) hide show
  1. compute_api_client/__init__.py +219 -0
  2. compute_api_client/api/__init__.py +23 -0
  3. compute_api_client/api/algorithms_api.py +1603 -0
  4. compute_api_client/api/auth_config_api.py +278 -0
  5. compute_api_client/api/backend_api.py +1540 -0
  6. compute_api_client/api/backend_types_api.py +1178 -0
  7. compute_api_client/api/batch_jobs_api.py +2224 -0
  8. compute_api_client/api/commits_api.py +1565 -0
  9. compute_api_client/api/files_api.py +1307 -0
  10. compute_api_client/api/final_results_api.py +847 -0
  11. compute_api_client/api/health_api.py +281 -0
  12. compute_api_client/api/jobs_api.py +1787 -0
  13. compute_api_client/api/languages_api.py +692 -0
  14. compute_api_client/api/members_api.py +1238 -0
  15. compute_api_client/api/metadata_api.py +930 -0
  16. compute_api_client/api/permissions_api.py +1295 -0
  17. compute_api_client/api/projects_api.py +1889 -0
  18. compute_api_client/api/reservations_api.py +1324 -0
  19. compute_api_client/api/results_api.py +1702 -0
  20. compute_api_client/api/teams_api.py +692 -0
  21. compute_api_client/api/transactions_api.py +805 -0
  22. compute_api_client/api/users_api.py +1305 -0
  23. compute_api_client/api_client.py +804 -0
  24. compute_api_client/api_response.py +21 -0
  25. compute_api_client/configuration.py +606 -0
  26. compute_api_client/docs/Algorithm.md +34 -0
  27. compute_api_client/docs/AlgorithmIn.md +33 -0
  28. compute_api_client/docs/AlgorithmType.md +12 -0
  29. compute_api_client/docs/AlgorithmsApi.md +428 -0
  30. compute_api_client/docs/AuthConfig.md +31 -0
  31. compute_api_client/docs/AuthConfigApi.md +71 -0
  32. compute_api_client/docs/Backend.md +35 -0
  33. compute_api_client/docs/BackendApi.md +418 -0
  34. compute_api_client/docs/BackendIn.md +34 -0
  35. compute_api_client/docs/BackendMessage.md +29 -0
  36. compute_api_client/docs/BackendPatch.md +31 -0
  37. compute_api_client/docs/BackendStatus.md +16 -0
  38. compute_api_client/docs/BackendType.md +48 -0
  39. compute_api_client/docs/BackendTypePatch.md +45 -0
  40. compute_api_client/docs/BackendTypesApi.md +289 -0
  41. compute_api_client/docs/BackendWithAuthentication.md +36 -0
  42. compute_api_client/docs/BatchJob.md +39 -0
  43. compute_api_client/docs/BatchJobIn.md +29 -0
  44. compute_api_client/docs/BatchJobStatus.md +18 -0
  45. compute_api_client/docs/BatchJobsApi.md +600 -0
  46. compute_api_client/docs/Commit.md +33 -0
  47. compute_api_client/docs/CommitIn.md +30 -0
  48. compute_api_client/docs/CommitsApi.md +425 -0
  49. compute_api_client/docs/CompilePayload.md +30 -0
  50. compute_api_client/docs/CompileStage.md +18 -0
  51. compute_api_client/docs/Domain.md +14 -0
  52. compute_api_client/docs/File.md +36 -0
  53. compute_api_client/docs/FileIn.md +35 -0
  54. compute_api_client/docs/FilesApi.md +346 -0
  55. compute_api_client/docs/FinalResult.md +32 -0
  56. compute_api_client/docs/FinalResultIn.md +30 -0
  57. compute_api_client/docs/FinalResultsApi.md +248 -0
  58. compute_api_client/docs/HTTPBadRequestError.md +29 -0
  59. compute_api_client/docs/HTTPNotFoundError.md +29 -0
  60. compute_api_client/docs/HTTPValidationError.md +29 -0
  61. compute_api_client/docs/HealthApi.md +72 -0
  62. compute_api_client/docs/Job.md +42 -0
  63. compute_api_client/docs/JobIn.md +32 -0
  64. compute_api_client/docs/JobPatch.md +34 -0
  65. compute_api_client/docs/JobStatus.md +18 -0
  66. compute_api_client/docs/JobsApi.md +460 -0
  67. compute_api_client/docs/Language.md +31 -0
  68. compute_api_client/docs/LanguagesApi.md +177 -0
  69. compute_api_client/docs/LocationInner.md +27 -0
  70. compute_api_client/docs/Member.md +33 -0
  71. compute_api_client/docs/MemberId.md +28 -0
  72. compute_api_client/docs/MemberIn.md +32 -0
  73. compute_api_client/docs/MembersApi.md +331 -0
  74. compute_api_client/docs/PageAlgorithm.md +33 -0
  75. compute_api_client/docs/PageBackend.md +33 -0
  76. compute_api_client/docs/PageBackendType.md +33 -0
  77. compute_api_client/docs/PageBatchJob.md +33 -0
  78. compute_api_client/docs/PageCommit.md +33 -0
  79. compute_api_client/docs/PageFile.md +33 -0
  80. compute_api_client/docs/PageJob.md +33 -0
  81. compute_api_client/docs/PageLanguage.md +33 -0
  82. compute_api_client/docs/PageMember.md +33 -0
  83. compute_api_client/docs/PageMetadata.md +32 -0
  84. compute_api_client/docs/PagePermission.md +33 -0
  85. compute_api_client/docs/PagePermissionGroup.md +33 -0
  86. compute_api_client/docs/PageProject.md +33 -0
  87. compute_api_client/docs/PageReservation.md +33 -0
  88. compute_api_client/docs/PageResult.md +33 -0
  89. compute_api_client/docs/PageTeam.md +33 -0
  90. compute_api_client/docs/PageTransaction.md +33 -0
  91. compute_api_client/docs/PageUser.md +33 -0
  92. compute_api_client/docs/Permission.md +31 -0
  93. compute_api_client/docs/PermissionGroup.md +30 -0
  94. compute_api_client/docs/PermissionsApi.md +340 -0
  95. compute_api_client/docs/Project.md +34 -0
  96. compute_api_client/docs/ProjectIn.md +32 -0
  97. compute_api_client/docs/ProjectPatch.md +32 -0
  98. compute_api_client/docs/ProjectsApi.md +502 -0
  99. compute_api_client/docs/Reservation.md +35 -0
  100. compute_api_client/docs/ReservationIn.md +32 -0
  101. compute_api_client/docs/ReservationsApi.md +341 -0
  102. compute_api_client/docs/Result.md +36 -0
  103. compute_api_client/docs/ResultIn.md +34 -0
  104. compute_api_client/docs/ResultsApi.md +439 -0
  105. compute_api_client/docs/Role.md +12 -0
  106. compute_api_client/docs/ShareType.md +14 -0
  107. compute_api_client/docs/Team.md +32 -0
  108. compute_api_client/docs/TeamsApi.md +177 -0
  109. compute_api_client/docs/Transaction.md +35 -0
  110. compute_api_client/docs/TransactionDomain.md +28 -0
  111. compute_api_client/docs/TransactionsApi.md +190 -0
  112. compute_api_client/docs/User.md +36 -0
  113. compute_api_client/docs/UserIn.md +35 -0
  114. compute_api_client/docs/UsersApi.md +338 -0
  115. compute_api_client/docs/ValidationError.md +31 -0
  116. compute_api_client/docs/ValidationErrorLocInner.md +28 -0
  117. compute_api_client/exceptions.py +216 -0
  118. compute_api_client/models/__init__.py +84 -0
  119. compute_api_client/models/algorithm.py +105 -0
  120. compute_api_client/models/algorithm_in.py +103 -0
  121. compute_api_client/models/algorithm_type.py +37 -0
  122. compute_api_client/models/auth_config.py +91 -0
  123. compute_api_client/models/backend.py +106 -0
  124. compute_api_client/models/backend_in.py +104 -0
  125. compute_api_client/models/backend_message.py +87 -0
  126. compute_api_client/models/backend_patch.py +112 -0
  127. compute_api_client/models/backend_status.py +39 -0
  128. compute_api_client/models/backend_type.py +145 -0
  129. compute_api_client/models/backend_type_patch.py +205 -0
  130. compute_api_client/models/backend_with_authentication.py +108 -0
  131. compute_api_client/models/batch_job.py +130 -0
  132. compute_api_client/models/batch_job_in.py +87 -0
  133. compute_api_client/models/batch_job_status.py +40 -0
  134. compute_api_client/models/commit.py +97 -0
  135. compute_api_client/models/commit_in.py +89 -0
  136. compute_api_client/models/compile_payload.py +95 -0
  137. compute_api_client/models/compile_stage.py +40 -0
  138. compute_api_client/models/domain.py +38 -0
  139. compute_api_client/models/file.py +108 -0
  140. compute_api_client/models/file_in.py +106 -0
  141. compute_api_client/models/final_result.py +94 -0
  142. compute_api_client/models/final_result_in.py +89 -0
  143. compute_api_client/models/http_bad_request_error.py +87 -0
  144. compute_api_client/models/http_not_found_error.py +87 -0
  145. compute_api_client/models/http_validation_error.py +95 -0
  146. compute_api_client/models/job.py +131 -0
  147. compute_api_client/models/job_in.py +98 -0
  148. compute_api_client/models/job_patch.py +99 -0
  149. compute_api_client/models/job_status.py +40 -0
  150. compute_api_client/models/language.py +92 -0
  151. compute_api_client/models/location_inner.py +144 -0
  152. compute_api_client/models/member.py +96 -0
  153. compute_api_client/models/member_id.py +144 -0
  154. compute_api_client/models/member_in.py +94 -0
  155. compute_api_client/models/metadata.py +93 -0
  156. compute_api_client/models/metadata_in.py +94 -0
  157. compute_api_client/models/page_algorithm.py +104 -0
  158. compute_api_client/models/page_backend.py +104 -0
  159. compute_api_client/models/page_backend_type.py +104 -0
  160. compute_api_client/models/page_batch_job.py +104 -0
  161. compute_api_client/models/page_commit.py +104 -0
  162. compute_api_client/models/page_file.py +104 -0
  163. compute_api_client/models/page_job.py +104 -0
  164. compute_api_client/models/page_language.py +104 -0
  165. compute_api_client/models/page_member.py +104 -0
  166. compute_api_client/models/page_metadata.py +125 -0
  167. compute_api_client/models/page_permission.py +104 -0
  168. compute_api_client/models/page_permission_group.py +104 -0
  169. compute_api_client/models/page_project.py +104 -0
  170. compute_api_client/models/page_reservation.py +104 -0
  171. compute_api_client/models/page_result.py +104 -0
  172. compute_api_client/models/page_team.py +104 -0
  173. compute_api_client/models/page_transaction.py +104 -0
  174. compute_api_client/models/page_user.py +104 -0
  175. compute_api_client/models/permission.py +92 -0
  176. compute_api_client/models/permission_group.py +90 -0
  177. compute_api_client/models/project.py +99 -0
  178. compute_api_client/models/project_in.py +94 -0
  179. compute_api_client/models/project_patch.py +114 -0
  180. compute_api_client/models/reservation.py +105 -0
  181. compute_api_client/models/reservation_in.py +94 -0
  182. compute_api_client/models/result.py +122 -0
  183. compute_api_client/models/result_in.py +117 -0
  184. compute_api_client/models/role.py +37 -0
  185. compute_api_client/models/share_type.py +38 -0
  186. compute_api_client/models/team.py +94 -0
  187. compute_api_client/models/transaction.py +117 -0
  188. compute_api_client/models/transaction_domain.py +142 -0
  189. compute_api_client/models/user.py +102 -0
  190. compute_api_client/models/user_in.py +100 -0
  191. compute_api_client/models/validation_error.py +99 -0
  192. compute_api_client/models/validation_error_loc_inner.py +138 -0
  193. compute_api_client/rest.py +213 -0
  194. qi2_shared/__init__.py +0 -0
  195. qi2_shared/authentication.py +66 -0
  196. qi2_shared/client.py +52 -0
  197. qi2_shared/hybrid/__init__.py +0 -0
  198. qi2_shared/hybrid/quantum_interface.py +45 -0
  199. qi2_shared/pagination.py +44 -0
  200. qi2_shared/settings.py +68 -0
  201. qi2_shared/utils.py +13 -0
  202. qi_compute_api_client-0.56.0.dist-info/METADATA +266 -0
  203. qi_compute_api_client-0.56.0.dist-info/RECORD +205 -0
  204. qi_compute_api_client-0.56.0.dist-info/WHEEL +4 -0
  205. qi_compute_api_client-0.56.0.dist-info/licenses/LICENSE.md +142 -0
@@ -0,0 +1,1178 @@
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
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
20
+ from typing import Optional, Union
21
+ from typing_extensions import Annotated
22
+ from compute_api_client.models.backend_status import BackendStatus
23
+ from compute_api_client.models.backend_type import BackendType
24
+ from compute_api_client.models.backend_type_patch import BackendTypePatch
25
+ from compute_api_client.models.page_backend_type import PageBackendType
26
+
27
+ from compute_api_client.api_client import ApiClient, RequestSerialized
28
+ from compute_api_client.api_response import ApiResponse
29
+ from compute_api_client.rest import RESTResponseType
30
+
31
+
32
+ class BackendTypesApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def read_backend_type_backend_types_id_get(
47
+ self,
48
+ id: StrictInt,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> BackendType:
62
+ """Retrieve backend type
63
+
64
+ Get backend type by ID.
65
+
66
+ :param id: (required)
67
+ :type id: int
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._read_backend_type_backend_types_id_get_serialize(
91
+ id=id,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "BackendType",
100
+ '404': "HTTPNotFoundError",
101
+ '422': "HTTPValidationError",
102
+ }
103
+ response_data = await self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ await response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ async def read_backend_type_backend_types_id_get_with_http_info(
116
+ self,
117
+ id: StrictInt,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[BackendType]:
131
+ """Retrieve backend type
132
+
133
+ Get backend type by ID.
134
+
135
+ :param id: (required)
136
+ :type id: int
137
+ :param _request_timeout: timeout setting for this request. If one
138
+ number provided, it will be total request
139
+ timeout. It can also be a pair (tuple) of
140
+ (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._read_backend_type_backend_types_id_get_serialize(
160
+ id=id,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
166
+
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '200': "BackendType",
169
+ '404': "HTTPNotFoundError",
170
+ '422': "HTTPValidationError",
171
+ }
172
+ response_data = await self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ await response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
181
+
182
+
183
+ @validate_call
184
+ async def read_backend_type_backend_types_id_get_without_preload_content(
185
+ self,
186
+ id: StrictInt,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Annotated[StrictFloat, Field(gt=0)]
193
+ ]
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> RESTResponseType:
200
+ """Retrieve backend type
201
+
202
+ Get backend type by ID.
203
+
204
+ :param id: (required)
205
+ :type id: int
206
+ :param _request_timeout: timeout setting for this request. If one
207
+ number provided, it will be total request
208
+ timeout. It can also be a pair (tuple) of
209
+ (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
211
+ :param _request_auth: set to override the auth_settings for an a single
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
214
+ :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
225
+ :return: Returns the result object.
226
+ """ # noqa: E501
227
+
228
+ _param = self._read_backend_type_backend_types_id_get_serialize(
229
+ id=id,
230
+ _request_auth=_request_auth,
231
+ _content_type=_content_type,
232
+ _headers=_headers,
233
+ _host_index=_host_index
234
+ )
235
+
236
+ _response_types_map: Dict[str, Optional[str]] = {
237
+ '200': "BackendType",
238
+ '404': "HTTPNotFoundError",
239
+ '422': "HTTPValidationError",
240
+ }
241
+ response_data = await self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _read_backend_type_backend_types_id_get_serialize(
249
+ self,
250
+ id,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {
260
+ }
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if id is not None:
273
+ _path_params['id'] = id
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'user_bearer',
292
+ 'backend'
293
+ ]
294
+
295
+ return self.api_client.param_serialize(
296
+ method='GET',
297
+ resource_path='/backend_types/{id}',
298
+ path_params=_path_params,
299
+ query_params=_query_params,
300
+ header_params=_header_params,
301
+ body=_body_params,
302
+ post_params=_form_params,
303
+ files=_files,
304
+ auth_settings=_auth_settings,
305
+ collection_formats=_collection_formats,
306
+ _host=_host,
307
+ _request_auth=_request_auth
308
+ )
309
+
310
+
311
+
312
+
313
+ @validate_call
314
+ async def read_backend_types_backend_types_get(
315
+ self,
316
+ id: Optional[StrictInt] = None,
317
+ name: Optional[StrictStr] = None,
318
+ infrastructure: Optional[StrictStr] = None,
319
+ description: Optional[StrictStr] = None,
320
+ image_id: Optional[StrictStr] = None,
321
+ is_hardware: Optional[StrictBool] = None,
322
+ supports_raw_data: Optional[StrictBool] = None,
323
+ nqubits: Optional[StrictInt] = None,
324
+ status: Optional[BackendStatus] = None,
325
+ default_number_of_shots: Optional[StrictInt] = None,
326
+ max_number_of_shots: Optional[StrictInt] = None,
327
+ enabled: Optional[StrictBool] = None,
328
+ identifier: Optional[StrictStr] = None,
329
+ protocol_version__isnull: Optional[StrictBool] = None,
330
+ protocol_version: Optional[StrictInt] = None,
331
+ job_execution_time_limit: Optional[Union[StrictFloat, StrictInt]] = None,
332
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
333
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
334
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
335
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Annotated[StrictFloat, Field(gt=0)]
342
+ ]
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> PageBackendType:
349
+ """List backend types
350
+
351
+ Read backend types. Only enabled backend types are returned.
352
+
353
+ :param id:
354
+ :type id: int
355
+ :param name:
356
+ :type name: str
357
+ :param infrastructure:
358
+ :type infrastructure: str
359
+ :param description:
360
+ :type description: str
361
+ :param image_id:
362
+ :type image_id: str
363
+ :param is_hardware:
364
+ :type is_hardware: bool
365
+ :param supports_raw_data:
366
+ :type supports_raw_data: bool
367
+ :param nqubits:
368
+ :type nqubits: int
369
+ :param status:
370
+ :type status: BackendStatus
371
+ :param default_number_of_shots:
372
+ :type default_number_of_shots: int
373
+ :param max_number_of_shots:
374
+ :type max_number_of_shots: int
375
+ :param enabled:
376
+ :type enabled: bool
377
+ :param identifier:
378
+ :type identifier: str
379
+ :param protocol_version__isnull:
380
+ :type protocol_version__isnull: bool
381
+ :param protocol_version:
382
+ :type protocol_version: int
383
+ :param job_execution_time_limit:
384
+ :type job_execution_time_limit: float
385
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
386
+ :type sort_by: str
387
+ :param latest: If True gets the most recently created object.
388
+ :type latest: bool
389
+ :param page: Page number
390
+ :type page: int
391
+ :param size: Page size
392
+ :type size: int
393
+ :param _request_timeout: timeout setting for this request. If one
394
+ number provided, it will be total request
395
+ timeout. It can also be a pair (tuple) of
396
+ (connection, read) timeouts.
397
+ :type _request_timeout: int, tuple(int, int), optional
398
+ :param _request_auth: set to override the auth_settings for an a single
399
+ request; this effectively ignores the
400
+ authentication in the spec for a single request.
401
+ :type _request_auth: dict, optional
402
+ :param _content_type: force content-type for the request.
403
+ :type _content_type: str, Optional
404
+ :param _headers: set to override the headers for a single
405
+ request; this effectively ignores the headers
406
+ in the spec for a single request.
407
+ :type _headers: dict, optional
408
+ :param _host_index: set to override the host_index for a single
409
+ request; this effectively ignores the host_index
410
+ in the spec for a single request.
411
+ :type _host_index: int, optional
412
+ :return: Returns the result object.
413
+ """ # noqa: E501
414
+
415
+ _param = self._read_backend_types_backend_types_get_serialize(
416
+ id=id,
417
+ name=name,
418
+ infrastructure=infrastructure,
419
+ description=description,
420
+ image_id=image_id,
421
+ is_hardware=is_hardware,
422
+ supports_raw_data=supports_raw_data,
423
+ nqubits=nqubits,
424
+ status=status,
425
+ default_number_of_shots=default_number_of_shots,
426
+ max_number_of_shots=max_number_of_shots,
427
+ enabled=enabled,
428
+ identifier=identifier,
429
+ protocol_version__isnull=protocol_version__isnull,
430
+ protocol_version=protocol_version,
431
+ job_execution_time_limit=job_execution_time_limit,
432
+ sort_by=sort_by,
433
+ latest=latest,
434
+ page=page,
435
+ size=size,
436
+ _request_auth=_request_auth,
437
+ _content_type=_content_type,
438
+ _headers=_headers,
439
+ _host_index=_host_index
440
+ )
441
+
442
+ _response_types_map: Dict[str, Optional[str]] = {
443
+ '200': "PageBackendType",
444
+ '422': "HTTPValidationError",
445
+ }
446
+ response_data = await self.api_client.call_api(
447
+ *_param,
448
+ _request_timeout=_request_timeout
449
+ )
450
+ await response_data.read()
451
+ return self.api_client.response_deserialize(
452
+ response_data=response_data,
453
+ response_types_map=_response_types_map,
454
+ ).data
455
+
456
+
457
+ @validate_call
458
+ async def read_backend_types_backend_types_get_with_http_info(
459
+ self,
460
+ id: Optional[StrictInt] = None,
461
+ name: Optional[StrictStr] = None,
462
+ infrastructure: Optional[StrictStr] = None,
463
+ description: Optional[StrictStr] = None,
464
+ image_id: Optional[StrictStr] = None,
465
+ is_hardware: Optional[StrictBool] = None,
466
+ supports_raw_data: Optional[StrictBool] = None,
467
+ nqubits: Optional[StrictInt] = None,
468
+ status: Optional[BackendStatus] = None,
469
+ default_number_of_shots: Optional[StrictInt] = None,
470
+ max_number_of_shots: Optional[StrictInt] = None,
471
+ enabled: Optional[StrictBool] = None,
472
+ identifier: Optional[StrictStr] = None,
473
+ protocol_version__isnull: Optional[StrictBool] = None,
474
+ protocol_version: Optional[StrictInt] = None,
475
+ job_execution_time_limit: Optional[Union[StrictFloat, StrictInt]] = None,
476
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
477
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
478
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
479
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
480
+ _request_timeout: Union[
481
+ None,
482
+ Annotated[StrictFloat, Field(gt=0)],
483
+ Tuple[
484
+ Annotated[StrictFloat, Field(gt=0)],
485
+ Annotated[StrictFloat, Field(gt=0)]
486
+ ]
487
+ ] = None,
488
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
489
+ _content_type: Optional[StrictStr] = None,
490
+ _headers: Optional[Dict[StrictStr, Any]] = None,
491
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
492
+ ) -> ApiResponse[PageBackendType]:
493
+ """List backend types
494
+
495
+ Read backend types. Only enabled backend types are returned.
496
+
497
+ :param id:
498
+ :type id: int
499
+ :param name:
500
+ :type name: str
501
+ :param infrastructure:
502
+ :type infrastructure: str
503
+ :param description:
504
+ :type description: str
505
+ :param image_id:
506
+ :type image_id: str
507
+ :param is_hardware:
508
+ :type is_hardware: bool
509
+ :param supports_raw_data:
510
+ :type supports_raw_data: bool
511
+ :param nqubits:
512
+ :type nqubits: int
513
+ :param status:
514
+ :type status: BackendStatus
515
+ :param default_number_of_shots:
516
+ :type default_number_of_shots: int
517
+ :param max_number_of_shots:
518
+ :type max_number_of_shots: int
519
+ :param enabled:
520
+ :type enabled: bool
521
+ :param identifier:
522
+ :type identifier: str
523
+ :param protocol_version__isnull:
524
+ :type protocol_version__isnull: bool
525
+ :param protocol_version:
526
+ :type protocol_version: int
527
+ :param job_execution_time_limit:
528
+ :type job_execution_time_limit: float
529
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
530
+ :type sort_by: str
531
+ :param latest: If True gets the most recently created object.
532
+ :type latest: bool
533
+ :param page: Page number
534
+ :type page: int
535
+ :param size: Page size
536
+ :type size: int
537
+ :param _request_timeout: timeout setting for this request. If one
538
+ number provided, it will be total request
539
+ timeout. It can also be a pair (tuple) of
540
+ (connection, read) timeouts.
541
+ :type _request_timeout: int, tuple(int, int), optional
542
+ :param _request_auth: set to override the auth_settings for an a single
543
+ request; this effectively ignores the
544
+ authentication in the spec for a single request.
545
+ :type _request_auth: dict, optional
546
+ :param _content_type: force content-type for the request.
547
+ :type _content_type: str, Optional
548
+ :param _headers: set to override the headers for a single
549
+ request; this effectively ignores the headers
550
+ in the spec for a single request.
551
+ :type _headers: dict, optional
552
+ :param _host_index: set to override the host_index for a single
553
+ request; this effectively ignores the host_index
554
+ in the spec for a single request.
555
+ :type _host_index: int, optional
556
+ :return: Returns the result object.
557
+ """ # noqa: E501
558
+
559
+ _param = self._read_backend_types_backend_types_get_serialize(
560
+ id=id,
561
+ name=name,
562
+ infrastructure=infrastructure,
563
+ description=description,
564
+ image_id=image_id,
565
+ is_hardware=is_hardware,
566
+ supports_raw_data=supports_raw_data,
567
+ nqubits=nqubits,
568
+ status=status,
569
+ default_number_of_shots=default_number_of_shots,
570
+ max_number_of_shots=max_number_of_shots,
571
+ enabled=enabled,
572
+ identifier=identifier,
573
+ protocol_version__isnull=protocol_version__isnull,
574
+ protocol_version=protocol_version,
575
+ job_execution_time_limit=job_execution_time_limit,
576
+ sort_by=sort_by,
577
+ latest=latest,
578
+ page=page,
579
+ size=size,
580
+ _request_auth=_request_auth,
581
+ _content_type=_content_type,
582
+ _headers=_headers,
583
+ _host_index=_host_index
584
+ )
585
+
586
+ _response_types_map: Dict[str, Optional[str]] = {
587
+ '200': "PageBackendType",
588
+ '422': "HTTPValidationError",
589
+ }
590
+ response_data = await self.api_client.call_api(
591
+ *_param,
592
+ _request_timeout=_request_timeout
593
+ )
594
+ await response_data.read()
595
+ return self.api_client.response_deserialize(
596
+ response_data=response_data,
597
+ response_types_map=_response_types_map,
598
+ )
599
+
600
+
601
+ @validate_call
602
+ async def read_backend_types_backend_types_get_without_preload_content(
603
+ self,
604
+ id: Optional[StrictInt] = None,
605
+ name: Optional[StrictStr] = None,
606
+ infrastructure: Optional[StrictStr] = None,
607
+ description: Optional[StrictStr] = None,
608
+ image_id: Optional[StrictStr] = None,
609
+ is_hardware: Optional[StrictBool] = None,
610
+ supports_raw_data: Optional[StrictBool] = None,
611
+ nqubits: Optional[StrictInt] = None,
612
+ status: Optional[BackendStatus] = None,
613
+ default_number_of_shots: Optional[StrictInt] = None,
614
+ max_number_of_shots: Optional[StrictInt] = None,
615
+ enabled: Optional[StrictBool] = None,
616
+ identifier: Optional[StrictStr] = None,
617
+ protocol_version__isnull: Optional[StrictBool] = None,
618
+ protocol_version: Optional[StrictInt] = None,
619
+ job_execution_time_limit: Optional[Union[StrictFloat, StrictInt]] = None,
620
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
621
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
622
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
623
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
624
+ _request_timeout: Union[
625
+ None,
626
+ Annotated[StrictFloat, Field(gt=0)],
627
+ Tuple[
628
+ Annotated[StrictFloat, Field(gt=0)],
629
+ Annotated[StrictFloat, Field(gt=0)]
630
+ ]
631
+ ] = None,
632
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
633
+ _content_type: Optional[StrictStr] = None,
634
+ _headers: Optional[Dict[StrictStr, Any]] = None,
635
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
636
+ ) -> RESTResponseType:
637
+ """List backend types
638
+
639
+ Read backend types. Only enabled backend types are returned.
640
+
641
+ :param id:
642
+ :type id: int
643
+ :param name:
644
+ :type name: str
645
+ :param infrastructure:
646
+ :type infrastructure: str
647
+ :param description:
648
+ :type description: str
649
+ :param image_id:
650
+ :type image_id: str
651
+ :param is_hardware:
652
+ :type is_hardware: bool
653
+ :param supports_raw_data:
654
+ :type supports_raw_data: bool
655
+ :param nqubits:
656
+ :type nqubits: int
657
+ :param status:
658
+ :type status: BackendStatus
659
+ :param default_number_of_shots:
660
+ :type default_number_of_shots: int
661
+ :param max_number_of_shots:
662
+ :type max_number_of_shots: int
663
+ :param enabled:
664
+ :type enabled: bool
665
+ :param identifier:
666
+ :type identifier: str
667
+ :param protocol_version__isnull:
668
+ :type protocol_version__isnull: bool
669
+ :param protocol_version:
670
+ :type protocol_version: int
671
+ :param job_execution_time_limit:
672
+ :type job_execution_time_limit: float
673
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
674
+ :type sort_by: str
675
+ :param latest: If True gets the most recently created object.
676
+ :type latest: bool
677
+ :param page: Page number
678
+ :type page: int
679
+ :param size: Page size
680
+ :type size: int
681
+ :param _request_timeout: timeout setting for this request. If one
682
+ number provided, it will be total request
683
+ timeout. It can also be a pair (tuple) of
684
+ (connection, read) timeouts.
685
+ :type _request_timeout: int, tuple(int, int), optional
686
+ :param _request_auth: set to override the auth_settings for an a single
687
+ request; this effectively ignores the
688
+ authentication in the spec for a single request.
689
+ :type _request_auth: dict, optional
690
+ :param _content_type: force content-type for the request.
691
+ :type _content_type: str, Optional
692
+ :param _headers: set to override the headers for a single
693
+ request; this effectively ignores the headers
694
+ in the spec for a single request.
695
+ :type _headers: dict, optional
696
+ :param _host_index: set to override the host_index for a single
697
+ request; this effectively ignores the host_index
698
+ in the spec for a single request.
699
+ :type _host_index: int, optional
700
+ :return: Returns the result object.
701
+ """ # noqa: E501
702
+
703
+ _param = self._read_backend_types_backend_types_get_serialize(
704
+ id=id,
705
+ name=name,
706
+ infrastructure=infrastructure,
707
+ description=description,
708
+ image_id=image_id,
709
+ is_hardware=is_hardware,
710
+ supports_raw_data=supports_raw_data,
711
+ nqubits=nqubits,
712
+ status=status,
713
+ default_number_of_shots=default_number_of_shots,
714
+ max_number_of_shots=max_number_of_shots,
715
+ enabled=enabled,
716
+ identifier=identifier,
717
+ protocol_version__isnull=protocol_version__isnull,
718
+ protocol_version=protocol_version,
719
+ job_execution_time_limit=job_execution_time_limit,
720
+ sort_by=sort_by,
721
+ latest=latest,
722
+ page=page,
723
+ size=size,
724
+ _request_auth=_request_auth,
725
+ _content_type=_content_type,
726
+ _headers=_headers,
727
+ _host_index=_host_index
728
+ )
729
+
730
+ _response_types_map: Dict[str, Optional[str]] = {
731
+ '200': "PageBackendType",
732
+ '422': "HTTPValidationError",
733
+ }
734
+ response_data = await self.api_client.call_api(
735
+ *_param,
736
+ _request_timeout=_request_timeout
737
+ )
738
+ return response_data.response
739
+
740
+
741
+ def _read_backend_types_backend_types_get_serialize(
742
+ self,
743
+ id,
744
+ name,
745
+ infrastructure,
746
+ description,
747
+ image_id,
748
+ is_hardware,
749
+ supports_raw_data,
750
+ nqubits,
751
+ status,
752
+ default_number_of_shots,
753
+ max_number_of_shots,
754
+ enabled,
755
+ identifier,
756
+ protocol_version__isnull,
757
+ protocol_version,
758
+ job_execution_time_limit,
759
+ sort_by,
760
+ latest,
761
+ page,
762
+ size,
763
+ _request_auth,
764
+ _content_type,
765
+ _headers,
766
+ _host_index,
767
+ ) -> RequestSerialized:
768
+
769
+ _host = None
770
+
771
+ _collection_formats: Dict[str, str] = {
772
+ }
773
+
774
+ _path_params: Dict[str, str] = {}
775
+ _query_params: List[Tuple[str, str]] = []
776
+ _header_params: Dict[str, Optional[str]] = _headers or {}
777
+ _form_params: List[Tuple[str, str]] = []
778
+ _files: Dict[
779
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
780
+ ] = {}
781
+ _body_params: Optional[bytes] = None
782
+
783
+ # process the path parameters
784
+ # process the query parameters
785
+ if id is not None:
786
+
787
+ _query_params.append(('id', id))
788
+
789
+ if name is not None:
790
+
791
+ _query_params.append(('name', name))
792
+
793
+ if infrastructure is not None:
794
+
795
+ _query_params.append(('infrastructure', infrastructure))
796
+
797
+ if description is not None:
798
+
799
+ _query_params.append(('description', description))
800
+
801
+ if image_id is not None:
802
+
803
+ _query_params.append(('image_id', image_id))
804
+
805
+ if is_hardware is not None:
806
+
807
+ _query_params.append(('is_hardware', is_hardware))
808
+
809
+ if supports_raw_data is not None:
810
+
811
+ _query_params.append(('supports_raw_data', supports_raw_data))
812
+
813
+ if nqubits is not None:
814
+
815
+ _query_params.append(('nqubits', nqubits))
816
+
817
+ if status is not None:
818
+
819
+ _query_params.append(('status', status.value))
820
+
821
+ if default_number_of_shots is not None:
822
+
823
+ _query_params.append(('default_number_of_shots', default_number_of_shots))
824
+
825
+ if max_number_of_shots is not None:
826
+
827
+ _query_params.append(('max_number_of_shots', max_number_of_shots))
828
+
829
+ if enabled is not None:
830
+
831
+ _query_params.append(('enabled', enabled))
832
+
833
+ if identifier is not None:
834
+
835
+ _query_params.append(('identifier', identifier))
836
+
837
+ if protocol_version__isnull is not None:
838
+
839
+ _query_params.append(('protocol_version__isnull', protocol_version__isnull))
840
+
841
+ if protocol_version is not None:
842
+
843
+ _query_params.append(('protocol_version', protocol_version))
844
+
845
+ if job_execution_time_limit is not None:
846
+
847
+ _query_params.append(('job_execution_time_limit', job_execution_time_limit))
848
+
849
+ if sort_by is not None:
850
+
851
+ _query_params.append(('sort_by', sort_by))
852
+
853
+ if latest is not None:
854
+
855
+ _query_params.append(('latest', latest))
856
+
857
+ if page is not None:
858
+
859
+ _query_params.append(('page', page))
860
+
861
+ if size is not None:
862
+
863
+ _query_params.append(('size', size))
864
+
865
+ # process the header parameters
866
+ # process the form parameters
867
+ # process the body parameter
868
+
869
+
870
+ # set the HTTP header `Accept`
871
+ if 'Accept' not in _header_params:
872
+ _header_params['Accept'] = self.api_client.select_header_accept(
873
+ [
874
+ 'application/json'
875
+ ]
876
+ )
877
+
878
+
879
+ # authentication setting
880
+ _auth_settings: List[str] = [
881
+ ]
882
+
883
+ return self.api_client.param_serialize(
884
+ method='GET',
885
+ resource_path='/backend_types/',
886
+ path_params=_path_params,
887
+ query_params=_query_params,
888
+ header_params=_header_params,
889
+ body=_body_params,
890
+ post_params=_form_params,
891
+ files=_files,
892
+ auth_settings=_auth_settings,
893
+ collection_formats=_collection_formats,
894
+ _host=_host,
895
+ _request_auth=_request_auth
896
+ )
897
+
898
+
899
+
900
+
901
+ @validate_call
902
+ async def update_backend_type_backend_types_me_patch(
903
+ self,
904
+ backend_type_patch: BackendTypePatch,
905
+ _request_timeout: Union[
906
+ None,
907
+ Annotated[StrictFloat, Field(gt=0)],
908
+ Tuple[
909
+ Annotated[StrictFloat, Field(gt=0)],
910
+ Annotated[StrictFloat, Field(gt=0)]
911
+ ]
912
+ ] = None,
913
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
914
+ _content_type: Optional[StrictStr] = None,
915
+ _headers: Optional[Dict[StrictStr, Any]] = None,
916
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
917
+ ) -> BackendType:
918
+ """Update backend type
919
+
920
+ Update backend type by ID. This endpoint allows for partial updates of backend type properties.
921
+
922
+ :param backend_type_patch: (required)
923
+ :type backend_type_patch: BackendTypePatch
924
+ :param _request_timeout: timeout setting for this request. If one
925
+ number provided, it will be total request
926
+ timeout. It can also be a pair (tuple) of
927
+ (connection, read) timeouts.
928
+ :type _request_timeout: int, tuple(int, int), optional
929
+ :param _request_auth: set to override the auth_settings for an a single
930
+ request; this effectively ignores the
931
+ authentication in the spec for a single request.
932
+ :type _request_auth: dict, optional
933
+ :param _content_type: force content-type for the request.
934
+ :type _content_type: str, Optional
935
+ :param _headers: set to override the headers for a single
936
+ request; this effectively ignores the headers
937
+ in the spec for a single request.
938
+ :type _headers: dict, optional
939
+ :param _host_index: set to override the host_index for a single
940
+ request; this effectively ignores the host_index
941
+ in the spec for a single request.
942
+ :type _host_index: int, optional
943
+ :return: Returns the result object.
944
+ """ # noqa: E501
945
+
946
+ _param = self._update_backend_type_backend_types_me_patch_serialize(
947
+ backend_type_patch=backend_type_patch,
948
+ _request_auth=_request_auth,
949
+ _content_type=_content_type,
950
+ _headers=_headers,
951
+ _host_index=_host_index
952
+ )
953
+
954
+ _response_types_map: Dict[str, Optional[str]] = {
955
+ '200': "BackendType",
956
+ '404': "HTTPNotFoundError",
957
+ '422': "HTTPValidationError",
958
+ }
959
+ response_data = await self.api_client.call_api(
960
+ *_param,
961
+ _request_timeout=_request_timeout
962
+ )
963
+ await response_data.read()
964
+ return self.api_client.response_deserialize(
965
+ response_data=response_data,
966
+ response_types_map=_response_types_map,
967
+ ).data
968
+
969
+
970
+ @validate_call
971
+ async def update_backend_type_backend_types_me_patch_with_http_info(
972
+ self,
973
+ backend_type_patch: BackendTypePatch,
974
+ _request_timeout: Union[
975
+ None,
976
+ Annotated[StrictFloat, Field(gt=0)],
977
+ Tuple[
978
+ Annotated[StrictFloat, Field(gt=0)],
979
+ Annotated[StrictFloat, Field(gt=0)]
980
+ ]
981
+ ] = None,
982
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
983
+ _content_type: Optional[StrictStr] = None,
984
+ _headers: Optional[Dict[StrictStr, Any]] = None,
985
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
986
+ ) -> ApiResponse[BackendType]:
987
+ """Update backend type
988
+
989
+ Update backend type by ID. This endpoint allows for partial updates of backend type properties.
990
+
991
+ :param backend_type_patch: (required)
992
+ :type backend_type_patch: BackendTypePatch
993
+ :param _request_timeout: timeout setting for this request. If one
994
+ number provided, it will be total request
995
+ timeout. It can also be a pair (tuple) of
996
+ (connection, read) timeouts.
997
+ :type _request_timeout: int, tuple(int, int), optional
998
+ :param _request_auth: set to override the auth_settings for an a single
999
+ request; this effectively ignores the
1000
+ authentication in the spec for a single request.
1001
+ :type _request_auth: dict, optional
1002
+ :param _content_type: force content-type for the request.
1003
+ :type _content_type: str, Optional
1004
+ :param _headers: set to override the headers for a single
1005
+ request; this effectively ignores the headers
1006
+ in the spec for a single request.
1007
+ :type _headers: dict, optional
1008
+ :param _host_index: set to override the host_index for a single
1009
+ request; this effectively ignores the host_index
1010
+ in the spec for a single request.
1011
+ :type _host_index: int, optional
1012
+ :return: Returns the result object.
1013
+ """ # noqa: E501
1014
+
1015
+ _param = self._update_backend_type_backend_types_me_patch_serialize(
1016
+ backend_type_patch=backend_type_patch,
1017
+ _request_auth=_request_auth,
1018
+ _content_type=_content_type,
1019
+ _headers=_headers,
1020
+ _host_index=_host_index
1021
+ )
1022
+
1023
+ _response_types_map: Dict[str, Optional[str]] = {
1024
+ '200': "BackendType",
1025
+ '404': "HTTPNotFoundError",
1026
+ '422': "HTTPValidationError",
1027
+ }
1028
+ response_data = await self.api_client.call_api(
1029
+ *_param,
1030
+ _request_timeout=_request_timeout
1031
+ )
1032
+ await response_data.read()
1033
+ return self.api_client.response_deserialize(
1034
+ response_data=response_data,
1035
+ response_types_map=_response_types_map,
1036
+ )
1037
+
1038
+
1039
+ @validate_call
1040
+ async def update_backend_type_backend_types_me_patch_without_preload_content(
1041
+ self,
1042
+ backend_type_patch: BackendTypePatch,
1043
+ _request_timeout: Union[
1044
+ None,
1045
+ Annotated[StrictFloat, Field(gt=0)],
1046
+ Tuple[
1047
+ Annotated[StrictFloat, Field(gt=0)],
1048
+ Annotated[StrictFloat, Field(gt=0)]
1049
+ ]
1050
+ ] = None,
1051
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1052
+ _content_type: Optional[StrictStr] = None,
1053
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1054
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1055
+ ) -> RESTResponseType:
1056
+ """Update backend type
1057
+
1058
+ Update backend type by ID. This endpoint allows for partial updates of backend type properties.
1059
+
1060
+ :param backend_type_patch: (required)
1061
+ :type backend_type_patch: BackendTypePatch
1062
+ :param _request_timeout: timeout setting for this request. If one
1063
+ number provided, it will be total request
1064
+ timeout. It can also be a pair (tuple) of
1065
+ (connection, read) timeouts.
1066
+ :type _request_timeout: int, tuple(int, int), optional
1067
+ :param _request_auth: set to override the auth_settings for an a single
1068
+ request; this effectively ignores the
1069
+ authentication in the spec for a single request.
1070
+ :type _request_auth: dict, optional
1071
+ :param _content_type: force content-type for the request.
1072
+ :type _content_type: str, Optional
1073
+ :param _headers: set to override the headers for a single
1074
+ request; this effectively ignores the headers
1075
+ in the spec for a single request.
1076
+ :type _headers: dict, optional
1077
+ :param _host_index: set to override the host_index for a single
1078
+ request; this effectively ignores the host_index
1079
+ in the spec for a single request.
1080
+ :type _host_index: int, optional
1081
+ :return: Returns the result object.
1082
+ """ # noqa: E501
1083
+
1084
+ _param = self._update_backend_type_backend_types_me_patch_serialize(
1085
+ backend_type_patch=backend_type_patch,
1086
+ _request_auth=_request_auth,
1087
+ _content_type=_content_type,
1088
+ _headers=_headers,
1089
+ _host_index=_host_index
1090
+ )
1091
+
1092
+ _response_types_map: Dict[str, Optional[str]] = {
1093
+ '200': "BackendType",
1094
+ '404': "HTTPNotFoundError",
1095
+ '422': "HTTPValidationError",
1096
+ }
1097
+ response_data = await self.api_client.call_api(
1098
+ *_param,
1099
+ _request_timeout=_request_timeout
1100
+ )
1101
+ return response_data.response
1102
+
1103
+
1104
+ def _update_backend_type_backend_types_me_patch_serialize(
1105
+ self,
1106
+ backend_type_patch,
1107
+ _request_auth,
1108
+ _content_type,
1109
+ _headers,
1110
+ _host_index,
1111
+ ) -> RequestSerialized:
1112
+
1113
+ _host = None
1114
+
1115
+ _collection_formats: Dict[str, str] = {
1116
+ }
1117
+
1118
+ _path_params: Dict[str, str] = {}
1119
+ _query_params: List[Tuple[str, str]] = []
1120
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1121
+ _form_params: List[Tuple[str, str]] = []
1122
+ _files: Dict[
1123
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1124
+ ] = {}
1125
+ _body_params: Optional[bytes] = None
1126
+
1127
+ # process the path parameters
1128
+ # process the query parameters
1129
+ # process the header parameters
1130
+ # process the form parameters
1131
+ # process the body parameter
1132
+ if backend_type_patch is not None:
1133
+ _body_params = backend_type_patch
1134
+
1135
+
1136
+ # set the HTTP header `Accept`
1137
+ if 'Accept' not in _header_params:
1138
+ _header_params['Accept'] = self.api_client.select_header_accept(
1139
+ [
1140
+ 'application/json'
1141
+ ]
1142
+ )
1143
+
1144
+ # set the HTTP header `Content-Type`
1145
+ if _content_type:
1146
+ _header_params['Content-Type'] = _content_type
1147
+ else:
1148
+ _default_content_type = (
1149
+ self.api_client.select_header_content_type(
1150
+ [
1151
+ 'application/json'
1152
+ ]
1153
+ )
1154
+ )
1155
+ if _default_content_type is not None:
1156
+ _header_params['Content-Type'] = _default_content_type
1157
+
1158
+ # authentication setting
1159
+ _auth_settings: List[str] = [
1160
+ 'backend'
1161
+ ]
1162
+
1163
+ return self.api_client.param_serialize(
1164
+ method='PATCH',
1165
+ resource_path='/backend_types/me',
1166
+ path_params=_path_params,
1167
+ query_params=_query_params,
1168
+ header_params=_header_params,
1169
+ body=_body_params,
1170
+ post_params=_form_params,
1171
+ files=_files,
1172
+ auth_settings=_auth_settings,
1173
+ collection_formats=_collection_formats,
1174
+ _host=_host,
1175
+ _request_auth=_request_auth
1176
+ )
1177
+
1178
+