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