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