qi-compute-api-client 0.7.0__py3-none-any.whl → 0.17.0__py3-none-any.whl

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

Potentially problematic release.


This version of qi-compute-api-client might be problematic. Click here for more details.

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