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,847 @@
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 StrictInt
20
+ from compute_api_client.models.final_result import FinalResult
21
+ from compute_api_client.models.final_result_in import FinalResultIn
22
+
23
+ from compute_api_client.api_client import ApiClient, RequestSerialized
24
+ from compute_api_client.api_response import ApiResponse
25
+ from compute_api_client.rest import RESTResponseType
26
+
27
+
28
+ class FinalResultsApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+
41
+ @validate_call
42
+ async def create_final_result_final_results_post(
43
+ self,
44
+ final_result_in: FinalResultIn,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> FinalResult:
58
+ """Create final result
59
+
60
+ Create new final result.
61
+
62
+ :param final_result_in: (required)
63
+ :type final_result_in: FinalResultIn
64
+ :param _request_timeout: timeout setting for this request. If one
65
+ number provided, it will be total request
66
+ timeout. It can also be a pair (tuple) of
67
+ (connection, read) timeouts.
68
+ :type _request_timeout: int, tuple(int, int), optional
69
+ :param _request_auth: set to override the auth_settings for an a single
70
+ request; this effectively ignores the
71
+ authentication in the spec for a single request.
72
+ :type _request_auth: dict, optional
73
+ :param _content_type: force content-type for the request.
74
+ :type _content_type: str, Optional
75
+ :param _headers: set to override the headers for a single
76
+ request; this effectively ignores the headers
77
+ in the spec for a single request.
78
+ :type _headers: dict, optional
79
+ :param _host_index: set to override the host_index for a single
80
+ request; this effectively ignores the host_index
81
+ in the spec for a single request.
82
+ :type _host_index: int, optional
83
+ :return: Returns the result object.
84
+ """ # noqa: E501
85
+
86
+ _param = self._create_final_result_final_results_post_serialize(
87
+ final_result_in=final_result_in,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '201': "FinalResult",
96
+ '422': "HTTPValidationError",
97
+ }
98
+ response_data = await self.api_client.call_api(
99
+ *_param,
100
+ _request_timeout=_request_timeout
101
+ )
102
+ await response_data.read()
103
+ return self.api_client.response_deserialize(
104
+ response_data=response_data,
105
+ response_types_map=_response_types_map,
106
+ ).data
107
+
108
+
109
+ @validate_call
110
+ async def create_final_result_final_results_post_with_http_info(
111
+ self,
112
+ final_result_in: FinalResultIn,
113
+ _request_timeout: Union[
114
+ None,
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Tuple[
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Annotated[StrictFloat, Field(gt=0)]
119
+ ]
120
+ ] = None,
121
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
122
+ _content_type: Optional[StrictStr] = None,
123
+ _headers: Optional[Dict[StrictStr, Any]] = None,
124
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
125
+ ) -> ApiResponse[FinalResult]:
126
+ """Create final result
127
+
128
+ Create new final result.
129
+
130
+ :param final_result_in: (required)
131
+ :type final_result_in: FinalResultIn
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._create_final_result_final_results_post_serialize(
155
+ final_result_in=final_result_in,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '201': "FinalResult",
164
+ '422': "HTTPValidationError",
165
+ }
166
+ response_data = await self.api_client.call_api(
167
+ *_param,
168
+ _request_timeout=_request_timeout
169
+ )
170
+ await response_data.read()
171
+ return self.api_client.response_deserialize(
172
+ response_data=response_data,
173
+ response_types_map=_response_types_map,
174
+ )
175
+
176
+
177
+ @validate_call
178
+ async def create_final_result_final_results_post_without_preload_content(
179
+ self,
180
+ final_result_in: FinalResultIn,
181
+ _request_timeout: Union[
182
+ None,
183
+ Annotated[StrictFloat, Field(gt=0)],
184
+ Tuple[
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Annotated[StrictFloat, Field(gt=0)]
187
+ ]
188
+ ] = None,
189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
+ _content_type: Optional[StrictStr] = None,
191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
+ ) -> RESTResponseType:
194
+ """Create final result
195
+
196
+ Create new final result.
197
+
198
+ :param final_result_in: (required)
199
+ :type final_result_in: FinalResultIn
200
+ :param _request_timeout: timeout setting for this request. If one
201
+ number provided, it will be total request
202
+ timeout. It can also be a pair (tuple) of
203
+ (connection, read) timeouts.
204
+ :type _request_timeout: int, tuple(int, int), optional
205
+ :param _request_auth: set to override the auth_settings for an a single
206
+ request; this effectively ignores the
207
+ authentication in the spec for a single request.
208
+ :type _request_auth: dict, optional
209
+ :param _content_type: force content-type for the request.
210
+ :type _content_type: str, Optional
211
+ :param _headers: set to override the headers for a single
212
+ request; this effectively ignores the headers
213
+ in the spec for a single request.
214
+ :type _headers: dict, optional
215
+ :param _host_index: set to override the host_index for a single
216
+ request; this effectively ignores the host_index
217
+ in the spec for a single request.
218
+ :type _host_index: int, optional
219
+ :return: Returns the result object.
220
+ """ # noqa: E501
221
+
222
+ _param = self._create_final_result_final_results_post_serialize(
223
+ final_result_in=final_result_in,
224
+ _request_auth=_request_auth,
225
+ _content_type=_content_type,
226
+ _headers=_headers,
227
+ _host_index=_host_index
228
+ )
229
+
230
+ _response_types_map: Dict[str, Optional[str]] = {
231
+ '201': "FinalResult",
232
+ '422': "HTTPValidationError",
233
+ }
234
+ response_data = await self.api_client.call_api(
235
+ *_param,
236
+ _request_timeout=_request_timeout
237
+ )
238
+ return response_data.response
239
+
240
+
241
+ def _create_final_result_final_results_post_serialize(
242
+ self,
243
+ final_result_in,
244
+ _request_auth,
245
+ _content_type,
246
+ _headers,
247
+ _host_index,
248
+ ) -> RequestSerialized:
249
+
250
+ _host = None
251
+
252
+ _collection_formats: Dict[str, str] = {
253
+ }
254
+
255
+ _path_params: Dict[str, str] = {}
256
+ _query_params: List[Tuple[str, str]] = []
257
+ _header_params: Dict[str, Optional[str]] = _headers or {}
258
+ _form_params: List[Tuple[str, str]] = []
259
+ _files: Dict[
260
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
261
+ ] = {}
262
+ _body_params: Optional[bytes] = None
263
+
264
+ # process the path parameters
265
+ # process the query parameters
266
+ # process the header parameters
267
+ # process the form parameters
268
+ # process the body parameter
269
+ if final_result_in is not None:
270
+ _body_params = final_result_in
271
+
272
+
273
+ # set the HTTP header `Accept`
274
+ if 'Accept' not in _header_params:
275
+ _header_params['Accept'] = self.api_client.select_header_accept(
276
+ [
277
+ 'application/json'
278
+ ]
279
+ )
280
+
281
+ # set the HTTP header `Content-Type`
282
+ if _content_type:
283
+ _header_params['Content-Type'] = _content_type
284
+ else:
285
+ _default_content_type = (
286
+ self.api_client.select_header_content_type(
287
+ [
288
+ 'application/json'
289
+ ]
290
+ )
291
+ )
292
+ if _default_content_type is not None:
293
+ _header_params['Content-Type'] = _default_content_type
294
+
295
+ # authentication setting
296
+ _auth_settings: List[str] = [
297
+ 'user_bearer',
298
+ 'backend'
299
+ ]
300
+
301
+ return self.api_client.param_serialize(
302
+ method='POST',
303
+ resource_path='/final_results',
304
+ path_params=_path_params,
305
+ query_params=_query_params,
306
+ header_params=_header_params,
307
+ body=_body_params,
308
+ post_params=_form_params,
309
+ files=_files,
310
+ auth_settings=_auth_settings,
311
+ collection_formats=_collection_formats,
312
+ _host=_host,
313
+ _request_auth=_request_auth
314
+ )
315
+
316
+
317
+
318
+
319
+ @validate_call
320
+ async def read_final_result_by_job_id_final_results_job_job_id_get(
321
+ self,
322
+ job_id: StrictInt,
323
+ _request_timeout: Union[
324
+ None,
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Tuple[
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Annotated[StrictFloat, Field(gt=0)]
329
+ ]
330
+ ] = None,
331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
332
+ _content_type: Optional[StrictStr] = None,
333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
335
+ ) -> FinalResult:
336
+ """Retrieve final result by job ID
337
+
338
+ Get final result by job ID.
339
+
340
+ :param job_id: (required)
341
+ :type job_id: int
342
+ :param _request_timeout: timeout setting for this request. If one
343
+ number provided, it will be total request
344
+ timeout. It can also be a pair (tuple) of
345
+ (connection, read) timeouts.
346
+ :type _request_timeout: int, tuple(int, int), optional
347
+ :param _request_auth: set to override the auth_settings for an a single
348
+ request; this effectively ignores the
349
+ authentication in the spec for a single request.
350
+ :type _request_auth: dict, optional
351
+ :param _content_type: force content-type for the request.
352
+ :type _content_type: str, Optional
353
+ :param _headers: set to override the headers for a single
354
+ request; this effectively ignores the headers
355
+ in the spec for a single request.
356
+ :type _headers: dict, optional
357
+ :param _host_index: set to override the host_index for a single
358
+ request; this effectively ignores the host_index
359
+ in the spec for a single request.
360
+ :type _host_index: int, optional
361
+ :return: Returns the result object.
362
+ """ # noqa: E501
363
+
364
+ _param = self._read_final_result_by_job_id_final_results_job_job_id_get_serialize(
365
+ job_id=job_id,
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ '200': "FinalResult",
374
+ '422': "HTTPValidationError",
375
+ }
376
+ response_data = await self.api_client.call_api(
377
+ *_param,
378
+ _request_timeout=_request_timeout
379
+ )
380
+ await response_data.read()
381
+ return self.api_client.response_deserialize(
382
+ response_data=response_data,
383
+ response_types_map=_response_types_map,
384
+ ).data
385
+
386
+
387
+ @validate_call
388
+ async def read_final_result_by_job_id_final_results_job_job_id_get_with_http_info(
389
+ self,
390
+ job_id: StrictInt,
391
+ _request_timeout: Union[
392
+ None,
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Tuple[
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Annotated[StrictFloat, Field(gt=0)]
397
+ ]
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> ApiResponse[FinalResult]:
404
+ """Retrieve final result by job ID
405
+
406
+ Get final result by job ID.
407
+
408
+ :param job_id: (required)
409
+ :type job_id: int
410
+ :param _request_timeout: timeout setting for this request. If one
411
+ number provided, it will be total request
412
+ timeout. It can also be a pair (tuple) of
413
+ (connection, read) timeouts.
414
+ :type _request_timeout: int, tuple(int, int), optional
415
+ :param _request_auth: set to override the auth_settings for an a single
416
+ request; this effectively ignores the
417
+ authentication in the spec for a single request.
418
+ :type _request_auth: dict, optional
419
+ :param _content_type: force content-type for the request.
420
+ :type _content_type: str, Optional
421
+ :param _headers: set to override the headers for a single
422
+ request; this effectively ignores the headers
423
+ in the spec for a single request.
424
+ :type _headers: dict, optional
425
+ :param _host_index: set to override the host_index for a single
426
+ request; this effectively ignores the host_index
427
+ in the spec for a single request.
428
+ :type _host_index: int, optional
429
+ :return: Returns the result object.
430
+ """ # noqa: E501
431
+
432
+ _param = self._read_final_result_by_job_id_final_results_job_job_id_get_serialize(
433
+ job_id=job_id,
434
+ _request_auth=_request_auth,
435
+ _content_type=_content_type,
436
+ _headers=_headers,
437
+ _host_index=_host_index
438
+ )
439
+
440
+ _response_types_map: Dict[str, Optional[str]] = {
441
+ '200': "FinalResult",
442
+ '422': "HTTPValidationError",
443
+ }
444
+ response_data = await self.api_client.call_api(
445
+ *_param,
446
+ _request_timeout=_request_timeout
447
+ )
448
+ await response_data.read()
449
+ return self.api_client.response_deserialize(
450
+ response_data=response_data,
451
+ response_types_map=_response_types_map,
452
+ )
453
+
454
+
455
+ @validate_call
456
+ async def read_final_result_by_job_id_final_results_job_job_id_get_without_preload_content(
457
+ self,
458
+ job_id: StrictInt,
459
+ _request_timeout: Union[
460
+ None,
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Tuple[
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Annotated[StrictFloat, Field(gt=0)]
465
+ ]
466
+ ] = None,
467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
468
+ _content_type: Optional[StrictStr] = None,
469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
471
+ ) -> RESTResponseType:
472
+ """Retrieve final result by job ID
473
+
474
+ Get final result by job ID.
475
+
476
+ :param job_id: (required)
477
+ :type job_id: int
478
+ :param _request_timeout: timeout setting for this request. If one
479
+ number provided, it will be total request
480
+ timeout. It can also be a pair (tuple) of
481
+ (connection, read) timeouts.
482
+ :type _request_timeout: int, tuple(int, int), optional
483
+ :param _request_auth: set to override the auth_settings for an a single
484
+ request; this effectively ignores the
485
+ authentication in the spec for a single request.
486
+ :type _request_auth: dict, optional
487
+ :param _content_type: force content-type for the request.
488
+ :type _content_type: str, Optional
489
+ :param _headers: set to override the headers for a single
490
+ request; this effectively ignores the headers
491
+ in the spec for a single request.
492
+ :type _headers: dict, optional
493
+ :param _host_index: set to override the host_index for a single
494
+ request; this effectively ignores the host_index
495
+ in the spec for a single request.
496
+ :type _host_index: int, optional
497
+ :return: Returns the result object.
498
+ """ # noqa: E501
499
+
500
+ _param = self._read_final_result_by_job_id_final_results_job_job_id_get_serialize(
501
+ job_id=job_id,
502
+ _request_auth=_request_auth,
503
+ _content_type=_content_type,
504
+ _headers=_headers,
505
+ _host_index=_host_index
506
+ )
507
+
508
+ _response_types_map: Dict[str, Optional[str]] = {
509
+ '200': "FinalResult",
510
+ '422': "HTTPValidationError",
511
+ }
512
+ response_data = await self.api_client.call_api(
513
+ *_param,
514
+ _request_timeout=_request_timeout
515
+ )
516
+ return response_data.response
517
+
518
+
519
+ def _read_final_result_by_job_id_final_results_job_job_id_get_serialize(
520
+ self,
521
+ job_id,
522
+ _request_auth,
523
+ _content_type,
524
+ _headers,
525
+ _host_index,
526
+ ) -> RequestSerialized:
527
+
528
+ _host = None
529
+
530
+ _collection_formats: Dict[str, str] = {
531
+ }
532
+
533
+ _path_params: Dict[str, str] = {}
534
+ _query_params: List[Tuple[str, str]] = []
535
+ _header_params: Dict[str, Optional[str]] = _headers or {}
536
+ _form_params: List[Tuple[str, str]] = []
537
+ _files: Dict[
538
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
539
+ ] = {}
540
+ _body_params: Optional[bytes] = None
541
+
542
+ # process the path parameters
543
+ if job_id is not None:
544
+ _path_params['job_id'] = job_id
545
+ # process the query parameters
546
+ # process the header parameters
547
+ # process the form parameters
548
+ # process the body parameter
549
+
550
+
551
+ # set the HTTP header `Accept`
552
+ if 'Accept' not in _header_params:
553
+ _header_params['Accept'] = self.api_client.select_header_accept(
554
+ [
555
+ 'application/json'
556
+ ]
557
+ )
558
+
559
+
560
+ # authentication setting
561
+ _auth_settings: List[str] = [
562
+ 'user_bearer'
563
+ ]
564
+
565
+ return self.api_client.param_serialize(
566
+ method='GET',
567
+ resource_path='/final_results/job/{job_id}',
568
+ path_params=_path_params,
569
+ query_params=_query_params,
570
+ header_params=_header_params,
571
+ body=_body_params,
572
+ post_params=_form_params,
573
+ files=_files,
574
+ auth_settings=_auth_settings,
575
+ collection_formats=_collection_formats,
576
+ _host=_host,
577
+ _request_auth=_request_auth
578
+ )
579
+
580
+
581
+
582
+
583
+ @validate_call
584
+ async def read_final_result_final_results_id_get(
585
+ self,
586
+ id: StrictInt,
587
+ _request_timeout: Union[
588
+ None,
589
+ Annotated[StrictFloat, Field(gt=0)],
590
+ Tuple[
591
+ Annotated[StrictFloat, Field(gt=0)],
592
+ Annotated[StrictFloat, Field(gt=0)]
593
+ ]
594
+ ] = None,
595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
596
+ _content_type: Optional[StrictStr] = None,
597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
599
+ ) -> FinalResult:
600
+ """Retrieve final result
601
+
602
+ Get final result by ID.
603
+
604
+ :param id: (required)
605
+ :type id: int
606
+ :param _request_timeout: timeout setting for this request. If one
607
+ number provided, it will be total request
608
+ timeout. It can also be a pair (tuple) of
609
+ (connection, read) timeouts.
610
+ :type _request_timeout: int, tuple(int, int), optional
611
+ :param _request_auth: set to override the auth_settings for an a single
612
+ request; this effectively ignores the
613
+ authentication in the spec for a single request.
614
+ :type _request_auth: dict, optional
615
+ :param _content_type: force content-type for the request.
616
+ :type _content_type: str, Optional
617
+ :param _headers: set to override the headers for a single
618
+ request; this effectively ignores the headers
619
+ in the spec for a single request.
620
+ :type _headers: dict, optional
621
+ :param _host_index: set to override the host_index for a single
622
+ request; this effectively ignores the host_index
623
+ in the spec for a single request.
624
+ :type _host_index: int, optional
625
+ :return: Returns the result object.
626
+ """ # noqa: E501
627
+
628
+ _param = self._read_final_result_final_results_id_get_serialize(
629
+ id=id,
630
+ _request_auth=_request_auth,
631
+ _content_type=_content_type,
632
+ _headers=_headers,
633
+ _host_index=_host_index
634
+ )
635
+
636
+ _response_types_map: Dict[str, Optional[str]] = {
637
+ '200': "FinalResult",
638
+ '404': "HTTPNotFoundError",
639
+ '422': "HTTPValidationError",
640
+ }
641
+ response_data = await self.api_client.call_api(
642
+ *_param,
643
+ _request_timeout=_request_timeout
644
+ )
645
+ await response_data.read()
646
+ return self.api_client.response_deserialize(
647
+ response_data=response_data,
648
+ response_types_map=_response_types_map,
649
+ ).data
650
+
651
+
652
+ @validate_call
653
+ async def read_final_result_final_results_id_get_with_http_info(
654
+ self,
655
+ id: StrictInt,
656
+ _request_timeout: Union[
657
+ None,
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Tuple[
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Annotated[StrictFloat, Field(gt=0)]
662
+ ]
663
+ ] = None,
664
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
665
+ _content_type: Optional[StrictStr] = None,
666
+ _headers: Optional[Dict[StrictStr, Any]] = None,
667
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
668
+ ) -> ApiResponse[FinalResult]:
669
+ """Retrieve final result
670
+
671
+ Get final result by ID.
672
+
673
+ :param id: (required)
674
+ :type id: int
675
+ :param _request_timeout: timeout setting for this request. If one
676
+ number provided, it will be total request
677
+ timeout. It can also be a pair (tuple) of
678
+ (connection, read) timeouts.
679
+ :type _request_timeout: int, tuple(int, int), optional
680
+ :param _request_auth: set to override the auth_settings for an a single
681
+ request; this effectively ignores the
682
+ authentication in the spec for a single request.
683
+ :type _request_auth: dict, optional
684
+ :param _content_type: force content-type for the request.
685
+ :type _content_type: str, Optional
686
+ :param _headers: set to override the headers for a single
687
+ request; this effectively ignores the headers
688
+ in the spec for a single request.
689
+ :type _headers: dict, optional
690
+ :param _host_index: set to override the host_index for a single
691
+ request; this effectively ignores the host_index
692
+ in the spec for a single request.
693
+ :type _host_index: int, optional
694
+ :return: Returns the result object.
695
+ """ # noqa: E501
696
+
697
+ _param = self._read_final_result_final_results_id_get_serialize(
698
+ id=id,
699
+ _request_auth=_request_auth,
700
+ _content_type=_content_type,
701
+ _headers=_headers,
702
+ _host_index=_host_index
703
+ )
704
+
705
+ _response_types_map: Dict[str, Optional[str]] = {
706
+ '200': "FinalResult",
707
+ '404': "HTTPNotFoundError",
708
+ '422': "HTTPValidationError",
709
+ }
710
+ response_data = await self.api_client.call_api(
711
+ *_param,
712
+ _request_timeout=_request_timeout
713
+ )
714
+ await response_data.read()
715
+ return self.api_client.response_deserialize(
716
+ response_data=response_data,
717
+ response_types_map=_response_types_map,
718
+ )
719
+
720
+
721
+ @validate_call
722
+ async def read_final_result_final_results_id_get_without_preload_content(
723
+ self,
724
+ id: StrictInt,
725
+ _request_timeout: Union[
726
+ None,
727
+ Annotated[StrictFloat, Field(gt=0)],
728
+ Tuple[
729
+ Annotated[StrictFloat, Field(gt=0)],
730
+ Annotated[StrictFloat, Field(gt=0)]
731
+ ]
732
+ ] = None,
733
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
734
+ _content_type: Optional[StrictStr] = None,
735
+ _headers: Optional[Dict[StrictStr, Any]] = None,
736
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
737
+ ) -> RESTResponseType:
738
+ """Retrieve final result
739
+
740
+ Get final result by ID.
741
+
742
+ :param id: (required)
743
+ :type id: int
744
+ :param _request_timeout: timeout setting for this request. If one
745
+ number provided, it will be total request
746
+ timeout. It can also be a pair (tuple) of
747
+ (connection, read) timeouts.
748
+ :type _request_timeout: int, tuple(int, int), optional
749
+ :param _request_auth: set to override the auth_settings for an a single
750
+ request; this effectively ignores the
751
+ authentication in the spec for a single request.
752
+ :type _request_auth: dict, optional
753
+ :param _content_type: force content-type for the request.
754
+ :type _content_type: str, Optional
755
+ :param _headers: set to override the headers for a single
756
+ request; this effectively ignores the headers
757
+ in the spec for a single request.
758
+ :type _headers: dict, optional
759
+ :param _host_index: set to override the host_index for a single
760
+ request; this effectively ignores the host_index
761
+ in the spec for a single request.
762
+ :type _host_index: int, optional
763
+ :return: Returns the result object.
764
+ """ # noqa: E501
765
+
766
+ _param = self._read_final_result_final_results_id_get_serialize(
767
+ id=id,
768
+ _request_auth=_request_auth,
769
+ _content_type=_content_type,
770
+ _headers=_headers,
771
+ _host_index=_host_index
772
+ )
773
+
774
+ _response_types_map: Dict[str, Optional[str]] = {
775
+ '200': "FinalResult",
776
+ '404': "HTTPNotFoundError",
777
+ '422': "HTTPValidationError",
778
+ }
779
+ response_data = await self.api_client.call_api(
780
+ *_param,
781
+ _request_timeout=_request_timeout
782
+ )
783
+ return response_data.response
784
+
785
+
786
+ def _read_final_result_final_results_id_get_serialize(
787
+ self,
788
+ id,
789
+ _request_auth,
790
+ _content_type,
791
+ _headers,
792
+ _host_index,
793
+ ) -> RequestSerialized:
794
+
795
+ _host = None
796
+
797
+ _collection_formats: Dict[str, str] = {
798
+ }
799
+
800
+ _path_params: Dict[str, str] = {}
801
+ _query_params: List[Tuple[str, str]] = []
802
+ _header_params: Dict[str, Optional[str]] = _headers or {}
803
+ _form_params: List[Tuple[str, str]] = []
804
+ _files: Dict[
805
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
806
+ ] = {}
807
+ _body_params: Optional[bytes] = None
808
+
809
+ # process the path parameters
810
+ if id is not None:
811
+ _path_params['id'] = id
812
+ # process the query parameters
813
+ # process the header parameters
814
+ # process the form parameters
815
+ # process the body parameter
816
+
817
+
818
+ # set the HTTP header `Accept`
819
+ if 'Accept' not in _header_params:
820
+ _header_params['Accept'] = self.api_client.select_header_accept(
821
+ [
822
+ 'application/json'
823
+ ]
824
+ )
825
+
826
+
827
+ # authentication setting
828
+ _auth_settings: List[str] = [
829
+ 'user_bearer'
830
+ ]
831
+
832
+ return self.api_client.param_serialize(
833
+ method='GET',
834
+ resource_path='/final_results/{id}',
835
+ path_params=_path_params,
836
+ query_params=_query_params,
837
+ header_params=_header_params,
838
+ body=_body_params,
839
+ post_params=_form_params,
840
+ files=_files,
841
+ auth_settings=_auth_settings,
842
+ collection_formats=_collection_formats,
843
+ _host=_host,
844
+ _request_auth=_request_auth
845
+ )
846
+
847
+