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