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