queueflow 0.1.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.
- queueflow/__init__.py +80 -0
- queueflow/api/__init__.py +11 -0
- queueflow/api/cron_api.py +1808 -0
- queueflow/api/dlq_api.py +996 -0
- queueflow/api/health_api.py +527 -0
- queueflow/api/jobs_api.py +1830 -0
- queueflow/api/system_api.py +523 -0
- queueflow/api/worker_api.py +1229 -0
- queueflow/api/workflows_api.py +1804 -0
- queueflow/api_client.py +797 -0
- queueflow/api_response.py +21 -0
- queueflow/configuration.py +579 -0
- queueflow/exceptions.py +199 -0
- queueflow/facade.py +255 -0
- queueflow/models/__init__.py +57 -0
- queueflow/models/backoff_strategy.py +38 -0
- queueflow/models/complete_job_request.py +89 -0
- queueflow/models/create_batch_jobs_request.py +95 -0
- queueflow/models/create_batch_jobs_response.py +90 -0
- queueflow/models/create_cron_request.py +111 -0
- queueflow/models/create_cron_response.py +87 -0
- queueflow/models/create_job_request.py +108 -0
- queueflow/models/create_job_response.py +87 -0
- queueflow/models/create_workflow_request.py +101 -0
- queueflow/models/create_workflow_response.py +87 -0
- queueflow/models/cron_schedule.py +134 -0
- queueflow/models/dead_letter.py +136 -0
- queueflow/models/error_body.py +90 -0
- queueflow/models/fail_job_request.py +91 -0
- queueflow/models/health_status.py +92 -0
- queueflow/models/heartbeat_request.py +90 -0
- queueflow/models/heartbeat_response.py +88 -0
- queueflow/models/job.py +172 -0
- queueflow/models/job_config.py +106 -0
- queueflow/models/job_config_request.py +143 -0
- queueflow/models/job_status.py +41 -0
- queueflow/models/lease_jobs_request.py +107 -0
- queueflow/models/lease_jobs_response.py +95 -0
- queueflow/models/leased_job.py +93 -0
- queueflow/models/list_crons_response.py +115 -0
- queueflow/models/list_dead_letters_response.py +115 -0
- queueflow/models/list_jobs_response.py +115 -0
- queueflow/models/list_workflows_response.py +115 -0
- queueflow/models/on_failure.py +38 -0
- queueflow/models/on_success.py +36 -0
- queueflow/models/ready_status.py +87 -0
- queueflow/models/replay_dead_letter_response.py +87 -0
- queueflow/models/stats_snapshot.py +102 -0
- queueflow/models/step_status.py +41 -0
- queueflow/models/tasks_response.py +87 -0
- queueflow/models/workflow.py +130 -0
- queueflow/models/workflow_diagram_response.py +89 -0
- queueflow/models/workflow_status.py +41 -0
- queueflow/models/workflow_step.py +112 -0
- queueflow/models/workflow_step_state.py +97 -0
- queueflow/models/workflow_step_states_response.py +95 -0
- queueflow/py.typed +0 -0
- queueflow/rest.py +257 -0
- queueflow-0.1.0.dist-info/METADATA +26 -0
- queueflow-0.1.0.dist-info/RECORD +62 -0
- queueflow-0.1.0.dist-info/WHEEL +5 -0
- queueflow-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1830 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
QueueFlow API
|
|
5
|
+
|
|
6
|
+
REST API for QueueFlow, a PostgreSQL-native distributed job queue and workflow engine.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from queueflow.models.create_batch_jobs_request import CreateBatchJobsRequest
|
|
24
|
+
from queueflow.models.create_batch_jobs_response import CreateBatchJobsResponse
|
|
25
|
+
from queueflow.models.create_job_request import CreateJobRequest
|
|
26
|
+
from queueflow.models.create_job_response import CreateJobResponse
|
|
27
|
+
from queueflow.models.job import Job
|
|
28
|
+
from queueflow.models.list_jobs_response import ListJobsResponse
|
|
29
|
+
|
|
30
|
+
from queueflow.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from queueflow.api_response import ApiResponse
|
|
32
|
+
from queueflow.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class JobsApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
def cancel_job(
|
|
50
|
+
self,
|
|
51
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> None:
|
|
65
|
+
"""cancel_job
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:param id: Job id (required)
|
|
69
|
+
:type id: str
|
|
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._cancel_job_serialize(
|
|
93
|
+
id=id,
|
|
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
|
+
'204': None,
|
|
102
|
+
'401': "ErrorBody",
|
|
103
|
+
'403': "ErrorBody",
|
|
104
|
+
'404': "ErrorBody",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def cancel_job_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[None]:
|
|
134
|
+
"""cancel_job
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param id: Job id (required)
|
|
138
|
+
:type id: str
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._cancel_job_serialize(
|
|
162
|
+
id=id,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'204': None,
|
|
171
|
+
'401': "ErrorBody",
|
|
172
|
+
'403': "ErrorBody",
|
|
173
|
+
'404': "ErrorBody",
|
|
174
|
+
}
|
|
175
|
+
response_data = self.api_client.call_api(
|
|
176
|
+
*_param,
|
|
177
|
+
_request_timeout=_request_timeout
|
|
178
|
+
)
|
|
179
|
+
response_data.read()
|
|
180
|
+
return self.api_client.response_deserialize(
|
|
181
|
+
response_data=response_data,
|
|
182
|
+
response_types_map=_response_types_map,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@validate_call
|
|
187
|
+
def cancel_job_without_preload_content(
|
|
188
|
+
self,
|
|
189
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
190
|
+
_request_timeout: Union[
|
|
191
|
+
None,
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Tuple[
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
196
|
+
]
|
|
197
|
+
] = None,
|
|
198
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_content_type: Optional[StrictStr] = None,
|
|
200
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
202
|
+
) -> RESTResponseType:
|
|
203
|
+
"""cancel_job
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
:param id: Job id (required)
|
|
207
|
+
:type id: str
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._cancel_job_serialize(
|
|
231
|
+
id=id,
|
|
232
|
+
_request_auth=_request_auth,
|
|
233
|
+
_content_type=_content_type,
|
|
234
|
+
_headers=_headers,
|
|
235
|
+
_host_index=_host_index
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
+
'204': None,
|
|
240
|
+
'401': "ErrorBody",
|
|
241
|
+
'403': "ErrorBody",
|
|
242
|
+
'404': "ErrorBody",
|
|
243
|
+
}
|
|
244
|
+
response_data = self.api_client.call_api(
|
|
245
|
+
*_param,
|
|
246
|
+
_request_timeout=_request_timeout
|
|
247
|
+
)
|
|
248
|
+
return response_data.response
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def _cancel_job_serialize(
|
|
252
|
+
self,
|
|
253
|
+
id,
|
|
254
|
+
_request_auth,
|
|
255
|
+
_content_type,
|
|
256
|
+
_headers,
|
|
257
|
+
_host_index,
|
|
258
|
+
) -> RequestSerialized:
|
|
259
|
+
|
|
260
|
+
_host = None
|
|
261
|
+
|
|
262
|
+
_collection_formats: Dict[str, str] = {
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_path_params: Dict[str, str] = {}
|
|
266
|
+
_query_params: List[Tuple[str, str]] = []
|
|
267
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
268
|
+
_form_params: List[Tuple[str, str]] = []
|
|
269
|
+
_files: Dict[
|
|
270
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
271
|
+
] = {}
|
|
272
|
+
_body_params: Optional[bytes] = None
|
|
273
|
+
|
|
274
|
+
# process the path parameters
|
|
275
|
+
if id is not None:
|
|
276
|
+
_path_params['id'] = id
|
|
277
|
+
# process the query parameters
|
|
278
|
+
# process the header parameters
|
|
279
|
+
# process the form parameters
|
|
280
|
+
# process the body parameter
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
# set the HTTP header `Accept`
|
|
284
|
+
if 'Accept' not in _header_params:
|
|
285
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
286
|
+
[
|
|
287
|
+
'application/json'
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# authentication setting
|
|
293
|
+
_auth_settings: List[str] = [
|
|
294
|
+
'bearerAuth'
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
return self.api_client.param_serialize(
|
|
298
|
+
method='POST',
|
|
299
|
+
resource_path='/api/v1/jobs/{id}/cancel',
|
|
300
|
+
path_params=_path_params,
|
|
301
|
+
query_params=_query_params,
|
|
302
|
+
header_params=_header_params,
|
|
303
|
+
body=_body_params,
|
|
304
|
+
post_params=_form_params,
|
|
305
|
+
files=_files,
|
|
306
|
+
auth_settings=_auth_settings,
|
|
307
|
+
collection_formats=_collection_formats,
|
|
308
|
+
_host=_host,
|
|
309
|
+
_request_auth=_request_auth
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
@validate_call
|
|
316
|
+
def create_batch_jobs(
|
|
317
|
+
self,
|
|
318
|
+
create_batch_jobs_request: CreateBatchJobsRequest,
|
|
319
|
+
_request_timeout: Union[
|
|
320
|
+
None,
|
|
321
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
322
|
+
Tuple[
|
|
323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
324
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
325
|
+
]
|
|
326
|
+
] = None,
|
|
327
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
328
|
+
_content_type: Optional[StrictStr] = None,
|
|
329
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
330
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
331
|
+
) -> CreateBatchJobsResponse:
|
|
332
|
+
"""create_batch_jobs
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
:param create_batch_jobs_request: (required)
|
|
336
|
+
:type create_batch_jobs_request: CreateBatchJobsRequest
|
|
337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
338
|
+
number provided, it will be total request
|
|
339
|
+
timeout. It can also be a pair (tuple) of
|
|
340
|
+
(connection, read) timeouts.
|
|
341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
343
|
+
request; this effectively ignores the
|
|
344
|
+
authentication in the spec for a single request.
|
|
345
|
+
:type _request_auth: dict, optional
|
|
346
|
+
:param _content_type: force content-type for the request.
|
|
347
|
+
:type _content_type: str, Optional
|
|
348
|
+
:param _headers: set to override the headers for a single
|
|
349
|
+
request; this effectively ignores the headers
|
|
350
|
+
in the spec for a single request.
|
|
351
|
+
:type _headers: dict, optional
|
|
352
|
+
:param _host_index: set to override the host_index for a single
|
|
353
|
+
request; this effectively ignores the host_index
|
|
354
|
+
in the spec for a single request.
|
|
355
|
+
:type _host_index: int, optional
|
|
356
|
+
:return: Returns the result object.
|
|
357
|
+
""" # noqa: E501
|
|
358
|
+
|
|
359
|
+
_param = self._create_batch_jobs_serialize(
|
|
360
|
+
create_batch_jobs_request=create_batch_jobs_request,
|
|
361
|
+
_request_auth=_request_auth,
|
|
362
|
+
_content_type=_content_type,
|
|
363
|
+
_headers=_headers,
|
|
364
|
+
_host_index=_host_index
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
368
|
+
'201': "CreateBatchJobsResponse",
|
|
369
|
+
'400': "ErrorBody",
|
|
370
|
+
'401': "ErrorBody",
|
|
371
|
+
}
|
|
372
|
+
response_data = self.api_client.call_api(
|
|
373
|
+
*_param,
|
|
374
|
+
_request_timeout=_request_timeout
|
|
375
|
+
)
|
|
376
|
+
response_data.read()
|
|
377
|
+
return self.api_client.response_deserialize(
|
|
378
|
+
response_data=response_data,
|
|
379
|
+
response_types_map=_response_types_map,
|
|
380
|
+
).data
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
@validate_call
|
|
384
|
+
def create_batch_jobs_with_http_info(
|
|
385
|
+
self,
|
|
386
|
+
create_batch_jobs_request: CreateBatchJobsRequest,
|
|
387
|
+
_request_timeout: Union[
|
|
388
|
+
None,
|
|
389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
390
|
+
Tuple[
|
|
391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
392
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
393
|
+
]
|
|
394
|
+
] = None,
|
|
395
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
396
|
+
_content_type: Optional[StrictStr] = None,
|
|
397
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
398
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
399
|
+
) -> ApiResponse[CreateBatchJobsResponse]:
|
|
400
|
+
"""create_batch_jobs
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
:param create_batch_jobs_request: (required)
|
|
404
|
+
:type create_batch_jobs_request: CreateBatchJobsRequest
|
|
405
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
406
|
+
number provided, it will be total request
|
|
407
|
+
timeout. It can also be a pair (tuple) of
|
|
408
|
+
(connection, read) timeouts.
|
|
409
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
410
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
411
|
+
request; this effectively ignores the
|
|
412
|
+
authentication in the spec for a single request.
|
|
413
|
+
:type _request_auth: dict, optional
|
|
414
|
+
:param _content_type: force content-type for the request.
|
|
415
|
+
:type _content_type: str, Optional
|
|
416
|
+
:param _headers: set to override the headers for a single
|
|
417
|
+
request; this effectively ignores the headers
|
|
418
|
+
in the spec for a single request.
|
|
419
|
+
:type _headers: dict, optional
|
|
420
|
+
:param _host_index: set to override the host_index for a single
|
|
421
|
+
request; this effectively ignores the host_index
|
|
422
|
+
in the spec for a single request.
|
|
423
|
+
:type _host_index: int, optional
|
|
424
|
+
:return: Returns the result object.
|
|
425
|
+
""" # noqa: E501
|
|
426
|
+
|
|
427
|
+
_param = self._create_batch_jobs_serialize(
|
|
428
|
+
create_batch_jobs_request=create_batch_jobs_request,
|
|
429
|
+
_request_auth=_request_auth,
|
|
430
|
+
_content_type=_content_type,
|
|
431
|
+
_headers=_headers,
|
|
432
|
+
_host_index=_host_index
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
436
|
+
'201': "CreateBatchJobsResponse",
|
|
437
|
+
'400': "ErrorBody",
|
|
438
|
+
'401': "ErrorBody",
|
|
439
|
+
}
|
|
440
|
+
response_data = self.api_client.call_api(
|
|
441
|
+
*_param,
|
|
442
|
+
_request_timeout=_request_timeout
|
|
443
|
+
)
|
|
444
|
+
response_data.read()
|
|
445
|
+
return self.api_client.response_deserialize(
|
|
446
|
+
response_data=response_data,
|
|
447
|
+
response_types_map=_response_types_map,
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
@validate_call
|
|
452
|
+
def create_batch_jobs_without_preload_content(
|
|
453
|
+
self,
|
|
454
|
+
create_batch_jobs_request: CreateBatchJobsRequest,
|
|
455
|
+
_request_timeout: Union[
|
|
456
|
+
None,
|
|
457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
458
|
+
Tuple[
|
|
459
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
460
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
461
|
+
]
|
|
462
|
+
] = None,
|
|
463
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
464
|
+
_content_type: Optional[StrictStr] = None,
|
|
465
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
466
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
467
|
+
) -> RESTResponseType:
|
|
468
|
+
"""create_batch_jobs
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
:param create_batch_jobs_request: (required)
|
|
472
|
+
:type create_batch_jobs_request: CreateBatchJobsRequest
|
|
473
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
474
|
+
number provided, it will be total request
|
|
475
|
+
timeout. It can also be a pair (tuple) of
|
|
476
|
+
(connection, read) timeouts.
|
|
477
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
478
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
479
|
+
request; this effectively ignores the
|
|
480
|
+
authentication in the spec for a single request.
|
|
481
|
+
:type _request_auth: dict, optional
|
|
482
|
+
:param _content_type: force content-type for the request.
|
|
483
|
+
:type _content_type: str, Optional
|
|
484
|
+
:param _headers: set to override the headers for a single
|
|
485
|
+
request; this effectively ignores the headers
|
|
486
|
+
in the spec for a single request.
|
|
487
|
+
:type _headers: dict, optional
|
|
488
|
+
:param _host_index: set to override the host_index for a single
|
|
489
|
+
request; this effectively ignores the host_index
|
|
490
|
+
in the spec for a single request.
|
|
491
|
+
:type _host_index: int, optional
|
|
492
|
+
:return: Returns the result object.
|
|
493
|
+
""" # noqa: E501
|
|
494
|
+
|
|
495
|
+
_param = self._create_batch_jobs_serialize(
|
|
496
|
+
create_batch_jobs_request=create_batch_jobs_request,
|
|
497
|
+
_request_auth=_request_auth,
|
|
498
|
+
_content_type=_content_type,
|
|
499
|
+
_headers=_headers,
|
|
500
|
+
_host_index=_host_index
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
504
|
+
'201': "CreateBatchJobsResponse",
|
|
505
|
+
'400': "ErrorBody",
|
|
506
|
+
'401': "ErrorBody",
|
|
507
|
+
}
|
|
508
|
+
response_data = self.api_client.call_api(
|
|
509
|
+
*_param,
|
|
510
|
+
_request_timeout=_request_timeout
|
|
511
|
+
)
|
|
512
|
+
return response_data.response
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def _create_batch_jobs_serialize(
|
|
516
|
+
self,
|
|
517
|
+
create_batch_jobs_request,
|
|
518
|
+
_request_auth,
|
|
519
|
+
_content_type,
|
|
520
|
+
_headers,
|
|
521
|
+
_host_index,
|
|
522
|
+
) -> RequestSerialized:
|
|
523
|
+
|
|
524
|
+
_host = None
|
|
525
|
+
|
|
526
|
+
_collection_formats: Dict[str, str] = {
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
_path_params: Dict[str, str] = {}
|
|
530
|
+
_query_params: List[Tuple[str, str]] = []
|
|
531
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
532
|
+
_form_params: List[Tuple[str, str]] = []
|
|
533
|
+
_files: Dict[
|
|
534
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
535
|
+
] = {}
|
|
536
|
+
_body_params: Optional[bytes] = None
|
|
537
|
+
|
|
538
|
+
# process the path parameters
|
|
539
|
+
# process the query parameters
|
|
540
|
+
# process the header parameters
|
|
541
|
+
# process the form parameters
|
|
542
|
+
# process the body parameter
|
|
543
|
+
if create_batch_jobs_request is not None:
|
|
544
|
+
_body_params = create_batch_jobs_request
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
# set the HTTP header `Accept`
|
|
548
|
+
if 'Accept' not in _header_params:
|
|
549
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
550
|
+
[
|
|
551
|
+
'application/json'
|
|
552
|
+
]
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
# set the HTTP header `Content-Type`
|
|
556
|
+
if _content_type:
|
|
557
|
+
_header_params['Content-Type'] = _content_type
|
|
558
|
+
else:
|
|
559
|
+
_default_content_type = (
|
|
560
|
+
self.api_client.select_header_content_type(
|
|
561
|
+
[
|
|
562
|
+
'application/json'
|
|
563
|
+
]
|
|
564
|
+
)
|
|
565
|
+
)
|
|
566
|
+
if _default_content_type is not None:
|
|
567
|
+
_header_params['Content-Type'] = _default_content_type
|
|
568
|
+
|
|
569
|
+
# authentication setting
|
|
570
|
+
_auth_settings: List[str] = [
|
|
571
|
+
'bearerAuth'
|
|
572
|
+
]
|
|
573
|
+
|
|
574
|
+
return self.api_client.param_serialize(
|
|
575
|
+
method='POST',
|
|
576
|
+
resource_path='/api/v1/jobs/batch',
|
|
577
|
+
path_params=_path_params,
|
|
578
|
+
query_params=_query_params,
|
|
579
|
+
header_params=_header_params,
|
|
580
|
+
body=_body_params,
|
|
581
|
+
post_params=_form_params,
|
|
582
|
+
files=_files,
|
|
583
|
+
auth_settings=_auth_settings,
|
|
584
|
+
collection_formats=_collection_formats,
|
|
585
|
+
_host=_host,
|
|
586
|
+
_request_auth=_request_auth
|
|
587
|
+
)
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
@validate_call
|
|
593
|
+
def create_job(
|
|
594
|
+
self,
|
|
595
|
+
create_job_request: CreateJobRequest,
|
|
596
|
+
idempotency_key: Annotated[Optional[StrictStr], Field(description="Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.")] = None,
|
|
597
|
+
_request_timeout: Union[
|
|
598
|
+
None,
|
|
599
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
600
|
+
Tuple[
|
|
601
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
602
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
603
|
+
]
|
|
604
|
+
] = None,
|
|
605
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
606
|
+
_content_type: Optional[StrictStr] = None,
|
|
607
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
608
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
609
|
+
) -> CreateJobResponse:
|
|
610
|
+
"""create_job
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
:param create_job_request: (required)
|
|
614
|
+
:type create_job_request: CreateJobRequest
|
|
615
|
+
:param idempotency_key: Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.
|
|
616
|
+
:type idempotency_key: str
|
|
617
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
618
|
+
number provided, it will be total request
|
|
619
|
+
timeout. It can also be a pair (tuple) of
|
|
620
|
+
(connection, read) timeouts.
|
|
621
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
622
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
623
|
+
request; this effectively ignores the
|
|
624
|
+
authentication in the spec for a single request.
|
|
625
|
+
:type _request_auth: dict, optional
|
|
626
|
+
:param _content_type: force content-type for the request.
|
|
627
|
+
:type _content_type: str, Optional
|
|
628
|
+
:param _headers: set to override the headers for a single
|
|
629
|
+
request; this effectively ignores the headers
|
|
630
|
+
in the spec for a single request.
|
|
631
|
+
:type _headers: dict, optional
|
|
632
|
+
:param _host_index: set to override the host_index for a single
|
|
633
|
+
request; this effectively ignores the host_index
|
|
634
|
+
in the spec for a single request.
|
|
635
|
+
:type _host_index: int, optional
|
|
636
|
+
:return: Returns the result object.
|
|
637
|
+
""" # noqa: E501
|
|
638
|
+
|
|
639
|
+
_param = self._create_job_serialize(
|
|
640
|
+
create_job_request=create_job_request,
|
|
641
|
+
idempotency_key=idempotency_key,
|
|
642
|
+
_request_auth=_request_auth,
|
|
643
|
+
_content_type=_content_type,
|
|
644
|
+
_headers=_headers,
|
|
645
|
+
_host_index=_host_index
|
|
646
|
+
)
|
|
647
|
+
|
|
648
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
649
|
+
'201': "CreateJobResponse",
|
|
650
|
+
'400': "ErrorBody",
|
|
651
|
+
'401': "ErrorBody",
|
|
652
|
+
}
|
|
653
|
+
response_data = self.api_client.call_api(
|
|
654
|
+
*_param,
|
|
655
|
+
_request_timeout=_request_timeout
|
|
656
|
+
)
|
|
657
|
+
response_data.read()
|
|
658
|
+
return self.api_client.response_deserialize(
|
|
659
|
+
response_data=response_data,
|
|
660
|
+
response_types_map=_response_types_map,
|
|
661
|
+
).data
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
@validate_call
|
|
665
|
+
def create_job_with_http_info(
|
|
666
|
+
self,
|
|
667
|
+
create_job_request: CreateJobRequest,
|
|
668
|
+
idempotency_key: Annotated[Optional[StrictStr], Field(description="Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.")] = None,
|
|
669
|
+
_request_timeout: Union[
|
|
670
|
+
None,
|
|
671
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
672
|
+
Tuple[
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
675
|
+
]
|
|
676
|
+
] = None,
|
|
677
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
678
|
+
_content_type: Optional[StrictStr] = None,
|
|
679
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
681
|
+
) -> ApiResponse[CreateJobResponse]:
|
|
682
|
+
"""create_job
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
:param create_job_request: (required)
|
|
686
|
+
:type create_job_request: CreateJobRequest
|
|
687
|
+
:param idempotency_key: Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.
|
|
688
|
+
:type idempotency_key: str
|
|
689
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
690
|
+
number provided, it will be total request
|
|
691
|
+
timeout. It can also be a pair (tuple) of
|
|
692
|
+
(connection, read) timeouts.
|
|
693
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
694
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
695
|
+
request; this effectively ignores the
|
|
696
|
+
authentication in the spec for a single request.
|
|
697
|
+
:type _request_auth: dict, optional
|
|
698
|
+
:param _content_type: force content-type for the request.
|
|
699
|
+
:type _content_type: str, Optional
|
|
700
|
+
:param _headers: set to override the headers for a single
|
|
701
|
+
request; this effectively ignores the headers
|
|
702
|
+
in the spec for a single request.
|
|
703
|
+
:type _headers: dict, optional
|
|
704
|
+
:param _host_index: set to override the host_index for a single
|
|
705
|
+
request; this effectively ignores the host_index
|
|
706
|
+
in the spec for a single request.
|
|
707
|
+
:type _host_index: int, optional
|
|
708
|
+
:return: Returns the result object.
|
|
709
|
+
""" # noqa: E501
|
|
710
|
+
|
|
711
|
+
_param = self._create_job_serialize(
|
|
712
|
+
create_job_request=create_job_request,
|
|
713
|
+
idempotency_key=idempotency_key,
|
|
714
|
+
_request_auth=_request_auth,
|
|
715
|
+
_content_type=_content_type,
|
|
716
|
+
_headers=_headers,
|
|
717
|
+
_host_index=_host_index
|
|
718
|
+
)
|
|
719
|
+
|
|
720
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
721
|
+
'201': "CreateJobResponse",
|
|
722
|
+
'400': "ErrorBody",
|
|
723
|
+
'401': "ErrorBody",
|
|
724
|
+
}
|
|
725
|
+
response_data = self.api_client.call_api(
|
|
726
|
+
*_param,
|
|
727
|
+
_request_timeout=_request_timeout
|
|
728
|
+
)
|
|
729
|
+
response_data.read()
|
|
730
|
+
return self.api_client.response_deserialize(
|
|
731
|
+
response_data=response_data,
|
|
732
|
+
response_types_map=_response_types_map,
|
|
733
|
+
)
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
@validate_call
|
|
737
|
+
def create_job_without_preload_content(
|
|
738
|
+
self,
|
|
739
|
+
create_job_request: CreateJobRequest,
|
|
740
|
+
idempotency_key: Annotated[Optional[StrictStr], Field(description="Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.")] = None,
|
|
741
|
+
_request_timeout: Union[
|
|
742
|
+
None,
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
744
|
+
Tuple[
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
747
|
+
]
|
|
748
|
+
] = None,
|
|
749
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
750
|
+
_content_type: Optional[StrictStr] = None,
|
|
751
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
753
|
+
) -> RESTResponseType:
|
|
754
|
+
"""create_job
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
:param create_job_request: (required)
|
|
758
|
+
:type create_job_request: CreateJobRequest
|
|
759
|
+
:param idempotency_key: Optional client-supplied key making this create idempotent per tenant: retrying with the same key returns the original job instead of creating a duplicate.
|
|
760
|
+
:type idempotency_key: str
|
|
761
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
762
|
+
number provided, it will be total request
|
|
763
|
+
timeout. It can also be a pair (tuple) of
|
|
764
|
+
(connection, read) timeouts.
|
|
765
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
766
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
767
|
+
request; this effectively ignores the
|
|
768
|
+
authentication in the spec for a single request.
|
|
769
|
+
:type _request_auth: dict, optional
|
|
770
|
+
:param _content_type: force content-type for the request.
|
|
771
|
+
:type _content_type: str, Optional
|
|
772
|
+
:param _headers: set to override the headers for a single
|
|
773
|
+
request; this effectively ignores the headers
|
|
774
|
+
in the spec for a single request.
|
|
775
|
+
:type _headers: dict, optional
|
|
776
|
+
:param _host_index: set to override the host_index for a single
|
|
777
|
+
request; this effectively ignores the host_index
|
|
778
|
+
in the spec for a single request.
|
|
779
|
+
:type _host_index: int, optional
|
|
780
|
+
:return: Returns the result object.
|
|
781
|
+
""" # noqa: E501
|
|
782
|
+
|
|
783
|
+
_param = self._create_job_serialize(
|
|
784
|
+
create_job_request=create_job_request,
|
|
785
|
+
idempotency_key=idempotency_key,
|
|
786
|
+
_request_auth=_request_auth,
|
|
787
|
+
_content_type=_content_type,
|
|
788
|
+
_headers=_headers,
|
|
789
|
+
_host_index=_host_index
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
793
|
+
'201': "CreateJobResponse",
|
|
794
|
+
'400': "ErrorBody",
|
|
795
|
+
'401': "ErrorBody",
|
|
796
|
+
}
|
|
797
|
+
response_data = self.api_client.call_api(
|
|
798
|
+
*_param,
|
|
799
|
+
_request_timeout=_request_timeout
|
|
800
|
+
)
|
|
801
|
+
return response_data.response
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
def _create_job_serialize(
|
|
805
|
+
self,
|
|
806
|
+
create_job_request,
|
|
807
|
+
idempotency_key,
|
|
808
|
+
_request_auth,
|
|
809
|
+
_content_type,
|
|
810
|
+
_headers,
|
|
811
|
+
_host_index,
|
|
812
|
+
) -> RequestSerialized:
|
|
813
|
+
|
|
814
|
+
_host = None
|
|
815
|
+
|
|
816
|
+
_collection_formats: Dict[str, str] = {
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
_path_params: Dict[str, str] = {}
|
|
820
|
+
_query_params: List[Tuple[str, str]] = []
|
|
821
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
822
|
+
_form_params: List[Tuple[str, str]] = []
|
|
823
|
+
_files: Dict[
|
|
824
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
825
|
+
] = {}
|
|
826
|
+
_body_params: Optional[bytes] = None
|
|
827
|
+
|
|
828
|
+
# process the path parameters
|
|
829
|
+
# process the query parameters
|
|
830
|
+
# process the header parameters
|
|
831
|
+
if idempotency_key is not None:
|
|
832
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
833
|
+
# process the form parameters
|
|
834
|
+
# process the body parameter
|
|
835
|
+
if create_job_request is not None:
|
|
836
|
+
_body_params = create_job_request
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
# set the HTTP header `Accept`
|
|
840
|
+
if 'Accept' not in _header_params:
|
|
841
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
842
|
+
[
|
|
843
|
+
'application/json'
|
|
844
|
+
]
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
# set the HTTP header `Content-Type`
|
|
848
|
+
if _content_type:
|
|
849
|
+
_header_params['Content-Type'] = _content_type
|
|
850
|
+
else:
|
|
851
|
+
_default_content_type = (
|
|
852
|
+
self.api_client.select_header_content_type(
|
|
853
|
+
[
|
|
854
|
+
'application/json'
|
|
855
|
+
]
|
|
856
|
+
)
|
|
857
|
+
)
|
|
858
|
+
if _default_content_type is not None:
|
|
859
|
+
_header_params['Content-Type'] = _default_content_type
|
|
860
|
+
|
|
861
|
+
# authentication setting
|
|
862
|
+
_auth_settings: List[str] = [
|
|
863
|
+
'bearerAuth'
|
|
864
|
+
]
|
|
865
|
+
|
|
866
|
+
return self.api_client.param_serialize(
|
|
867
|
+
method='POST',
|
|
868
|
+
resource_path='/api/v1/jobs',
|
|
869
|
+
path_params=_path_params,
|
|
870
|
+
query_params=_query_params,
|
|
871
|
+
header_params=_header_params,
|
|
872
|
+
body=_body_params,
|
|
873
|
+
post_params=_form_params,
|
|
874
|
+
files=_files,
|
|
875
|
+
auth_settings=_auth_settings,
|
|
876
|
+
collection_formats=_collection_formats,
|
|
877
|
+
_host=_host,
|
|
878
|
+
_request_auth=_request_auth
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
@validate_call
|
|
885
|
+
def get_job(
|
|
886
|
+
self,
|
|
887
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
888
|
+
_request_timeout: Union[
|
|
889
|
+
None,
|
|
890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
891
|
+
Tuple[
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
893
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
894
|
+
]
|
|
895
|
+
] = None,
|
|
896
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
897
|
+
_content_type: Optional[StrictStr] = None,
|
|
898
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
899
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
900
|
+
) -> Job:
|
|
901
|
+
"""get_job
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
:param id: Job id (required)
|
|
905
|
+
:type id: str
|
|
906
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
907
|
+
number provided, it will be total request
|
|
908
|
+
timeout. It can also be a pair (tuple) of
|
|
909
|
+
(connection, read) timeouts.
|
|
910
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
911
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
912
|
+
request; this effectively ignores the
|
|
913
|
+
authentication in the spec for a single request.
|
|
914
|
+
:type _request_auth: dict, optional
|
|
915
|
+
:param _content_type: force content-type for the request.
|
|
916
|
+
:type _content_type: str, Optional
|
|
917
|
+
:param _headers: set to override the headers for a single
|
|
918
|
+
request; this effectively ignores the headers
|
|
919
|
+
in the spec for a single request.
|
|
920
|
+
:type _headers: dict, optional
|
|
921
|
+
:param _host_index: set to override the host_index for a single
|
|
922
|
+
request; this effectively ignores the host_index
|
|
923
|
+
in the spec for a single request.
|
|
924
|
+
:type _host_index: int, optional
|
|
925
|
+
:return: Returns the result object.
|
|
926
|
+
""" # noqa: E501
|
|
927
|
+
|
|
928
|
+
_param = self._get_job_serialize(
|
|
929
|
+
id=id,
|
|
930
|
+
_request_auth=_request_auth,
|
|
931
|
+
_content_type=_content_type,
|
|
932
|
+
_headers=_headers,
|
|
933
|
+
_host_index=_host_index
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
937
|
+
'200': "Job",
|
|
938
|
+
'403': "ErrorBody",
|
|
939
|
+
'404': "ErrorBody",
|
|
940
|
+
}
|
|
941
|
+
response_data = self.api_client.call_api(
|
|
942
|
+
*_param,
|
|
943
|
+
_request_timeout=_request_timeout
|
|
944
|
+
)
|
|
945
|
+
response_data.read()
|
|
946
|
+
return self.api_client.response_deserialize(
|
|
947
|
+
response_data=response_data,
|
|
948
|
+
response_types_map=_response_types_map,
|
|
949
|
+
).data
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
@validate_call
|
|
953
|
+
def get_job_with_http_info(
|
|
954
|
+
self,
|
|
955
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
956
|
+
_request_timeout: Union[
|
|
957
|
+
None,
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
959
|
+
Tuple[
|
|
960
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
961
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
962
|
+
]
|
|
963
|
+
] = None,
|
|
964
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_content_type: Optional[StrictStr] = None,
|
|
966
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
967
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
968
|
+
) -> ApiResponse[Job]:
|
|
969
|
+
"""get_job
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
:param id: Job id (required)
|
|
973
|
+
:type id: str
|
|
974
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
975
|
+
number provided, it will be total request
|
|
976
|
+
timeout. It can also be a pair (tuple) of
|
|
977
|
+
(connection, read) timeouts.
|
|
978
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
979
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
980
|
+
request; this effectively ignores the
|
|
981
|
+
authentication in the spec for a single request.
|
|
982
|
+
:type _request_auth: dict, optional
|
|
983
|
+
:param _content_type: force content-type for the request.
|
|
984
|
+
:type _content_type: str, Optional
|
|
985
|
+
:param _headers: set to override the headers for a single
|
|
986
|
+
request; this effectively ignores the headers
|
|
987
|
+
in the spec for a single request.
|
|
988
|
+
:type _headers: dict, optional
|
|
989
|
+
:param _host_index: set to override the host_index for a single
|
|
990
|
+
request; this effectively ignores the host_index
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _host_index: int, optional
|
|
993
|
+
:return: Returns the result object.
|
|
994
|
+
""" # noqa: E501
|
|
995
|
+
|
|
996
|
+
_param = self._get_job_serialize(
|
|
997
|
+
id=id,
|
|
998
|
+
_request_auth=_request_auth,
|
|
999
|
+
_content_type=_content_type,
|
|
1000
|
+
_headers=_headers,
|
|
1001
|
+
_host_index=_host_index
|
|
1002
|
+
)
|
|
1003
|
+
|
|
1004
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1005
|
+
'200': "Job",
|
|
1006
|
+
'403': "ErrorBody",
|
|
1007
|
+
'404': "ErrorBody",
|
|
1008
|
+
}
|
|
1009
|
+
response_data = self.api_client.call_api(
|
|
1010
|
+
*_param,
|
|
1011
|
+
_request_timeout=_request_timeout
|
|
1012
|
+
)
|
|
1013
|
+
response_data.read()
|
|
1014
|
+
return self.api_client.response_deserialize(
|
|
1015
|
+
response_data=response_data,
|
|
1016
|
+
response_types_map=_response_types_map,
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
@validate_call
|
|
1021
|
+
def get_job_without_preload_content(
|
|
1022
|
+
self,
|
|
1023
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
1024
|
+
_request_timeout: Union[
|
|
1025
|
+
None,
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1027
|
+
Tuple[
|
|
1028
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1029
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1030
|
+
]
|
|
1031
|
+
] = None,
|
|
1032
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1033
|
+
_content_type: Optional[StrictStr] = None,
|
|
1034
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1035
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1036
|
+
) -> RESTResponseType:
|
|
1037
|
+
"""get_job
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
:param id: Job id (required)
|
|
1041
|
+
:type id: str
|
|
1042
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1043
|
+
number provided, it will be total request
|
|
1044
|
+
timeout. It can also be a pair (tuple) of
|
|
1045
|
+
(connection, read) timeouts.
|
|
1046
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1047
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1048
|
+
request; this effectively ignores the
|
|
1049
|
+
authentication in the spec for a single request.
|
|
1050
|
+
:type _request_auth: dict, optional
|
|
1051
|
+
:param _content_type: force content-type for the request.
|
|
1052
|
+
:type _content_type: str, Optional
|
|
1053
|
+
:param _headers: set to override the headers for a single
|
|
1054
|
+
request; this effectively ignores the headers
|
|
1055
|
+
in the spec for a single request.
|
|
1056
|
+
:type _headers: dict, optional
|
|
1057
|
+
:param _host_index: set to override the host_index for a single
|
|
1058
|
+
request; this effectively ignores the host_index
|
|
1059
|
+
in the spec for a single request.
|
|
1060
|
+
:type _host_index: int, optional
|
|
1061
|
+
:return: Returns the result object.
|
|
1062
|
+
""" # noqa: E501
|
|
1063
|
+
|
|
1064
|
+
_param = self._get_job_serialize(
|
|
1065
|
+
id=id,
|
|
1066
|
+
_request_auth=_request_auth,
|
|
1067
|
+
_content_type=_content_type,
|
|
1068
|
+
_headers=_headers,
|
|
1069
|
+
_host_index=_host_index
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1073
|
+
'200': "Job",
|
|
1074
|
+
'403': "ErrorBody",
|
|
1075
|
+
'404': "ErrorBody",
|
|
1076
|
+
}
|
|
1077
|
+
response_data = self.api_client.call_api(
|
|
1078
|
+
*_param,
|
|
1079
|
+
_request_timeout=_request_timeout
|
|
1080
|
+
)
|
|
1081
|
+
return response_data.response
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
def _get_job_serialize(
|
|
1085
|
+
self,
|
|
1086
|
+
id,
|
|
1087
|
+
_request_auth,
|
|
1088
|
+
_content_type,
|
|
1089
|
+
_headers,
|
|
1090
|
+
_host_index,
|
|
1091
|
+
) -> RequestSerialized:
|
|
1092
|
+
|
|
1093
|
+
_host = None
|
|
1094
|
+
|
|
1095
|
+
_collection_formats: Dict[str, str] = {
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
_path_params: Dict[str, str] = {}
|
|
1099
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1100
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1101
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1102
|
+
_files: Dict[
|
|
1103
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1104
|
+
] = {}
|
|
1105
|
+
_body_params: Optional[bytes] = None
|
|
1106
|
+
|
|
1107
|
+
# process the path parameters
|
|
1108
|
+
if id is not None:
|
|
1109
|
+
_path_params['id'] = id
|
|
1110
|
+
# process the query parameters
|
|
1111
|
+
# process the header parameters
|
|
1112
|
+
# process the form parameters
|
|
1113
|
+
# process the body parameter
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
# set the HTTP header `Accept`
|
|
1117
|
+
if 'Accept' not in _header_params:
|
|
1118
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1119
|
+
[
|
|
1120
|
+
'application/json'
|
|
1121
|
+
]
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
# authentication setting
|
|
1126
|
+
_auth_settings: List[str] = [
|
|
1127
|
+
'bearerAuth'
|
|
1128
|
+
]
|
|
1129
|
+
|
|
1130
|
+
return self.api_client.param_serialize(
|
|
1131
|
+
method='GET',
|
|
1132
|
+
resource_path='/api/v1/jobs/{id}',
|
|
1133
|
+
path_params=_path_params,
|
|
1134
|
+
query_params=_query_params,
|
|
1135
|
+
header_params=_header_params,
|
|
1136
|
+
body=_body_params,
|
|
1137
|
+
post_params=_form_params,
|
|
1138
|
+
files=_files,
|
|
1139
|
+
auth_settings=_auth_settings,
|
|
1140
|
+
collection_formats=_collection_formats,
|
|
1141
|
+
_host=_host,
|
|
1142
|
+
_request_auth=_request_auth
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
@validate_call
|
|
1149
|
+
def list_jobs(
|
|
1150
|
+
self,
|
|
1151
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
1152
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
1153
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
1154
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
1155
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
1156
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
1157
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
1158
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
1159
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
1160
|
+
_request_timeout: Union[
|
|
1161
|
+
None,
|
|
1162
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1163
|
+
Tuple[
|
|
1164
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1166
|
+
]
|
|
1167
|
+
] = None,
|
|
1168
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1169
|
+
_content_type: Optional[StrictStr] = None,
|
|
1170
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1171
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1172
|
+
) -> ListJobsResponse:
|
|
1173
|
+
"""list_jobs
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
1177
|
+
:type status: str
|
|
1178
|
+
:param queue: Filter by queue name (jobs only).
|
|
1179
|
+
:type queue: str
|
|
1180
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
1181
|
+
:type limit: int
|
|
1182
|
+
:param offset: Number of records to skip (default 0).
|
|
1183
|
+
:type offset: int
|
|
1184
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
1185
|
+
:type order_by: str
|
|
1186
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
1187
|
+
:type include_total: bool
|
|
1188
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
1189
|
+
:type cursor: str
|
|
1190
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
1191
|
+
:type created_after: datetime
|
|
1192
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
1193
|
+
:type created_before: datetime
|
|
1194
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1195
|
+
number provided, it will be total request
|
|
1196
|
+
timeout. It can also be a pair (tuple) of
|
|
1197
|
+
(connection, read) timeouts.
|
|
1198
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1199
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1200
|
+
request; this effectively ignores the
|
|
1201
|
+
authentication in the spec for a single request.
|
|
1202
|
+
:type _request_auth: dict, optional
|
|
1203
|
+
:param _content_type: force content-type for the request.
|
|
1204
|
+
:type _content_type: str, Optional
|
|
1205
|
+
:param _headers: set to override the headers for a single
|
|
1206
|
+
request; this effectively ignores the headers
|
|
1207
|
+
in the spec for a single request.
|
|
1208
|
+
:type _headers: dict, optional
|
|
1209
|
+
:param _host_index: set to override the host_index for a single
|
|
1210
|
+
request; this effectively ignores the host_index
|
|
1211
|
+
in the spec for a single request.
|
|
1212
|
+
:type _host_index: int, optional
|
|
1213
|
+
:return: Returns the result object.
|
|
1214
|
+
""" # noqa: E501
|
|
1215
|
+
|
|
1216
|
+
_param = self._list_jobs_serialize(
|
|
1217
|
+
status=status,
|
|
1218
|
+
queue=queue,
|
|
1219
|
+
limit=limit,
|
|
1220
|
+
offset=offset,
|
|
1221
|
+
order_by=order_by,
|
|
1222
|
+
include_total=include_total,
|
|
1223
|
+
cursor=cursor,
|
|
1224
|
+
created_after=created_after,
|
|
1225
|
+
created_before=created_before,
|
|
1226
|
+
_request_auth=_request_auth,
|
|
1227
|
+
_content_type=_content_type,
|
|
1228
|
+
_headers=_headers,
|
|
1229
|
+
_host_index=_host_index
|
|
1230
|
+
)
|
|
1231
|
+
|
|
1232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1233
|
+
'200': "ListJobsResponse",
|
|
1234
|
+
'401': "ErrorBody",
|
|
1235
|
+
}
|
|
1236
|
+
response_data = self.api_client.call_api(
|
|
1237
|
+
*_param,
|
|
1238
|
+
_request_timeout=_request_timeout
|
|
1239
|
+
)
|
|
1240
|
+
response_data.read()
|
|
1241
|
+
return self.api_client.response_deserialize(
|
|
1242
|
+
response_data=response_data,
|
|
1243
|
+
response_types_map=_response_types_map,
|
|
1244
|
+
).data
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
@validate_call
|
|
1248
|
+
def list_jobs_with_http_info(
|
|
1249
|
+
self,
|
|
1250
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
1251
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
1252
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
1253
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
1254
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
1255
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
1256
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
1257
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
1258
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
1259
|
+
_request_timeout: Union[
|
|
1260
|
+
None,
|
|
1261
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1262
|
+
Tuple[
|
|
1263
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1264
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1265
|
+
]
|
|
1266
|
+
] = None,
|
|
1267
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1268
|
+
_content_type: Optional[StrictStr] = None,
|
|
1269
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1270
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1271
|
+
) -> ApiResponse[ListJobsResponse]:
|
|
1272
|
+
"""list_jobs
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
1276
|
+
:type status: str
|
|
1277
|
+
:param queue: Filter by queue name (jobs only).
|
|
1278
|
+
:type queue: str
|
|
1279
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
1280
|
+
:type limit: int
|
|
1281
|
+
:param offset: Number of records to skip (default 0).
|
|
1282
|
+
:type offset: int
|
|
1283
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
1284
|
+
:type order_by: str
|
|
1285
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
1286
|
+
:type include_total: bool
|
|
1287
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
1288
|
+
:type cursor: str
|
|
1289
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
1290
|
+
:type created_after: datetime
|
|
1291
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
1292
|
+
:type created_before: datetime
|
|
1293
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1294
|
+
number provided, it will be total request
|
|
1295
|
+
timeout. It can also be a pair (tuple) of
|
|
1296
|
+
(connection, read) timeouts.
|
|
1297
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1298
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1299
|
+
request; this effectively ignores the
|
|
1300
|
+
authentication in the spec for a single request.
|
|
1301
|
+
:type _request_auth: dict, optional
|
|
1302
|
+
:param _content_type: force content-type for the request.
|
|
1303
|
+
:type _content_type: str, Optional
|
|
1304
|
+
:param _headers: set to override the headers for a single
|
|
1305
|
+
request; this effectively ignores the headers
|
|
1306
|
+
in the spec for a single request.
|
|
1307
|
+
:type _headers: dict, optional
|
|
1308
|
+
:param _host_index: set to override the host_index for a single
|
|
1309
|
+
request; this effectively ignores the host_index
|
|
1310
|
+
in the spec for a single request.
|
|
1311
|
+
:type _host_index: int, optional
|
|
1312
|
+
:return: Returns the result object.
|
|
1313
|
+
""" # noqa: E501
|
|
1314
|
+
|
|
1315
|
+
_param = self._list_jobs_serialize(
|
|
1316
|
+
status=status,
|
|
1317
|
+
queue=queue,
|
|
1318
|
+
limit=limit,
|
|
1319
|
+
offset=offset,
|
|
1320
|
+
order_by=order_by,
|
|
1321
|
+
include_total=include_total,
|
|
1322
|
+
cursor=cursor,
|
|
1323
|
+
created_after=created_after,
|
|
1324
|
+
created_before=created_before,
|
|
1325
|
+
_request_auth=_request_auth,
|
|
1326
|
+
_content_type=_content_type,
|
|
1327
|
+
_headers=_headers,
|
|
1328
|
+
_host_index=_host_index
|
|
1329
|
+
)
|
|
1330
|
+
|
|
1331
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1332
|
+
'200': "ListJobsResponse",
|
|
1333
|
+
'401': "ErrorBody",
|
|
1334
|
+
}
|
|
1335
|
+
response_data = self.api_client.call_api(
|
|
1336
|
+
*_param,
|
|
1337
|
+
_request_timeout=_request_timeout
|
|
1338
|
+
)
|
|
1339
|
+
response_data.read()
|
|
1340
|
+
return self.api_client.response_deserialize(
|
|
1341
|
+
response_data=response_data,
|
|
1342
|
+
response_types_map=_response_types_map,
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
@validate_call
|
|
1347
|
+
def list_jobs_without_preload_content(
|
|
1348
|
+
self,
|
|
1349
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (e.g. `pending`, `completed`).")] = None,
|
|
1350
|
+
queue: Annotated[Optional[StrictStr], Field(description="Filter by queue name (jobs only).")] = None,
|
|
1351
|
+
limit: Annotated[Optional[StrictInt], Field(description="Page size, 1..=100 (default 50).")] = None,
|
|
1352
|
+
offset: Annotated[Optional[StrictInt], Field(description="Number of records to skip (default 0).")] = None,
|
|
1353
|
+
order_by: Annotated[Optional[StrictStr], Field(description="`created_at ASC` or `created_at DESC` (default DESC).")] = None,
|
|
1354
|
+
include_total: Annotated[Optional[StrictBool], Field(description="Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).")] = None,
|
|
1355
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.")] = None,
|
|
1356
|
+
created_after: Annotated[Optional[datetime], Field(description="Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.")] = None,
|
|
1357
|
+
created_before: Annotated[Optional[datetime], Field(description="Only rows created strictly before this instant (RFC 3339, exclusive).")] = None,
|
|
1358
|
+
_request_timeout: Union[
|
|
1359
|
+
None,
|
|
1360
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1361
|
+
Tuple[
|
|
1362
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1363
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1364
|
+
]
|
|
1365
|
+
] = None,
|
|
1366
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1367
|
+
_content_type: Optional[StrictStr] = None,
|
|
1368
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1369
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1370
|
+
) -> RESTResponseType:
|
|
1371
|
+
"""list_jobs
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
:param status: Filter by status (e.g. `pending`, `completed`).
|
|
1375
|
+
:type status: str
|
|
1376
|
+
:param queue: Filter by queue name (jobs only).
|
|
1377
|
+
:type queue: str
|
|
1378
|
+
:param limit: Page size, 1..=100 (default 50).
|
|
1379
|
+
:type limit: int
|
|
1380
|
+
:param offset: Number of records to skip (default 0).
|
|
1381
|
+
:type offset: int
|
|
1382
|
+
:param order_by: `created_at ASC` or `created_at DESC` (default DESC).
|
|
1383
|
+
:type order_by: str
|
|
1384
|
+
:param include_total: Include the exact `total` count in the response (default false; the count is an extra full scan over the filtered set).
|
|
1385
|
+
:type include_total: bool
|
|
1386
|
+
:param cursor: Opaque keyset cursor from a previous page's `next_cursor`. When set, `offset` is ignored and listing continues where that page ended.
|
|
1387
|
+
:type cursor: str
|
|
1388
|
+
:param created_after: Only rows created at or after this instant (RFC 3339, inclusive). With `created_before` this forms the half-open range `[after, before)` — the natural shape for walking history period by period.
|
|
1389
|
+
:type created_after: datetime
|
|
1390
|
+
:param created_before: Only rows created strictly before this instant (RFC 3339, exclusive).
|
|
1391
|
+
:type created_before: datetime
|
|
1392
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1393
|
+
number provided, it will be total request
|
|
1394
|
+
timeout. It can also be a pair (tuple) of
|
|
1395
|
+
(connection, read) timeouts.
|
|
1396
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1397
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1398
|
+
request; this effectively ignores the
|
|
1399
|
+
authentication in the spec for a single request.
|
|
1400
|
+
:type _request_auth: dict, optional
|
|
1401
|
+
:param _content_type: force content-type for the request.
|
|
1402
|
+
:type _content_type: str, Optional
|
|
1403
|
+
:param _headers: set to override the headers for a single
|
|
1404
|
+
request; this effectively ignores the headers
|
|
1405
|
+
in the spec for a single request.
|
|
1406
|
+
:type _headers: dict, optional
|
|
1407
|
+
:param _host_index: set to override the host_index for a single
|
|
1408
|
+
request; this effectively ignores the host_index
|
|
1409
|
+
in the spec for a single request.
|
|
1410
|
+
:type _host_index: int, optional
|
|
1411
|
+
:return: Returns the result object.
|
|
1412
|
+
""" # noqa: E501
|
|
1413
|
+
|
|
1414
|
+
_param = self._list_jobs_serialize(
|
|
1415
|
+
status=status,
|
|
1416
|
+
queue=queue,
|
|
1417
|
+
limit=limit,
|
|
1418
|
+
offset=offset,
|
|
1419
|
+
order_by=order_by,
|
|
1420
|
+
include_total=include_total,
|
|
1421
|
+
cursor=cursor,
|
|
1422
|
+
created_after=created_after,
|
|
1423
|
+
created_before=created_before,
|
|
1424
|
+
_request_auth=_request_auth,
|
|
1425
|
+
_content_type=_content_type,
|
|
1426
|
+
_headers=_headers,
|
|
1427
|
+
_host_index=_host_index
|
|
1428
|
+
)
|
|
1429
|
+
|
|
1430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1431
|
+
'200': "ListJobsResponse",
|
|
1432
|
+
'401': "ErrorBody",
|
|
1433
|
+
}
|
|
1434
|
+
response_data = self.api_client.call_api(
|
|
1435
|
+
*_param,
|
|
1436
|
+
_request_timeout=_request_timeout
|
|
1437
|
+
)
|
|
1438
|
+
return response_data.response
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
def _list_jobs_serialize(
|
|
1442
|
+
self,
|
|
1443
|
+
status,
|
|
1444
|
+
queue,
|
|
1445
|
+
limit,
|
|
1446
|
+
offset,
|
|
1447
|
+
order_by,
|
|
1448
|
+
include_total,
|
|
1449
|
+
cursor,
|
|
1450
|
+
created_after,
|
|
1451
|
+
created_before,
|
|
1452
|
+
_request_auth,
|
|
1453
|
+
_content_type,
|
|
1454
|
+
_headers,
|
|
1455
|
+
_host_index,
|
|
1456
|
+
) -> RequestSerialized:
|
|
1457
|
+
|
|
1458
|
+
_host = None
|
|
1459
|
+
|
|
1460
|
+
_collection_formats: Dict[str, str] = {
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
_path_params: Dict[str, str] = {}
|
|
1464
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1465
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1466
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1467
|
+
_files: Dict[
|
|
1468
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1469
|
+
] = {}
|
|
1470
|
+
_body_params: Optional[bytes] = None
|
|
1471
|
+
|
|
1472
|
+
# process the path parameters
|
|
1473
|
+
# process the query parameters
|
|
1474
|
+
if status is not None:
|
|
1475
|
+
|
|
1476
|
+
_query_params.append(('status', status))
|
|
1477
|
+
|
|
1478
|
+
if queue is not None:
|
|
1479
|
+
|
|
1480
|
+
_query_params.append(('queue', queue))
|
|
1481
|
+
|
|
1482
|
+
if limit is not None:
|
|
1483
|
+
|
|
1484
|
+
_query_params.append(('limit', limit))
|
|
1485
|
+
|
|
1486
|
+
if offset is not None:
|
|
1487
|
+
|
|
1488
|
+
_query_params.append(('offset', offset))
|
|
1489
|
+
|
|
1490
|
+
if order_by is not None:
|
|
1491
|
+
|
|
1492
|
+
_query_params.append(('order_by', order_by))
|
|
1493
|
+
|
|
1494
|
+
if include_total is not None:
|
|
1495
|
+
|
|
1496
|
+
_query_params.append(('include_total', include_total))
|
|
1497
|
+
|
|
1498
|
+
if cursor is not None:
|
|
1499
|
+
|
|
1500
|
+
_query_params.append(('cursor', cursor))
|
|
1501
|
+
|
|
1502
|
+
if created_after is not None:
|
|
1503
|
+
if isinstance(created_after, datetime):
|
|
1504
|
+
_query_params.append(
|
|
1505
|
+
(
|
|
1506
|
+
'created_after',
|
|
1507
|
+
created_after.strftime(
|
|
1508
|
+
self.api_client.configuration.datetime_format
|
|
1509
|
+
)
|
|
1510
|
+
)
|
|
1511
|
+
)
|
|
1512
|
+
else:
|
|
1513
|
+
_query_params.append(('created_after', created_after))
|
|
1514
|
+
|
|
1515
|
+
if created_before is not None:
|
|
1516
|
+
if isinstance(created_before, datetime):
|
|
1517
|
+
_query_params.append(
|
|
1518
|
+
(
|
|
1519
|
+
'created_before',
|
|
1520
|
+
created_before.strftime(
|
|
1521
|
+
self.api_client.configuration.datetime_format
|
|
1522
|
+
)
|
|
1523
|
+
)
|
|
1524
|
+
)
|
|
1525
|
+
else:
|
|
1526
|
+
_query_params.append(('created_before', created_before))
|
|
1527
|
+
|
|
1528
|
+
# process the header parameters
|
|
1529
|
+
# process the form parameters
|
|
1530
|
+
# process the body parameter
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
# set the HTTP header `Accept`
|
|
1534
|
+
if 'Accept' not in _header_params:
|
|
1535
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1536
|
+
[
|
|
1537
|
+
'application/json'
|
|
1538
|
+
]
|
|
1539
|
+
)
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
# authentication setting
|
|
1543
|
+
_auth_settings: List[str] = [
|
|
1544
|
+
'bearerAuth'
|
|
1545
|
+
]
|
|
1546
|
+
|
|
1547
|
+
return self.api_client.param_serialize(
|
|
1548
|
+
method='GET',
|
|
1549
|
+
resource_path='/api/v1/jobs',
|
|
1550
|
+
path_params=_path_params,
|
|
1551
|
+
query_params=_query_params,
|
|
1552
|
+
header_params=_header_params,
|
|
1553
|
+
body=_body_params,
|
|
1554
|
+
post_params=_form_params,
|
|
1555
|
+
files=_files,
|
|
1556
|
+
auth_settings=_auth_settings,
|
|
1557
|
+
collection_formats=_collection_formats,
|
|
1558
|
+
_host=_host,
|
|
1559
|
+
_request_auth=_request_auth
|
|
1560
|
+
)
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
@validate_call
|
|
1566
|
+
def stream_job_events(
|
|
1567
|
+
self,
|
|
1568
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
1569
|
+
_request_timeout: Union[
|
|
1570
|
+
None,
|
|
1571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1572
|
+
Tuple[
|
|
1573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1574
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1575
|
+
]
|
|
1576
|
+
] = None,
|
|
1577
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1578
|
+
_content_type: Optional[StrictStr] = None,
|
|
1579
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1580
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1581
|
+
) -> str:
|
|
1582
|
+
"""Stream a job's status transitions as Server-Sent Events until it reaches a terminal state. Lets clients await completion without polling the REST endpoint themselves.
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
:param id: Job id (required)
|
|
1586
|
+
:type id: str
|
|
1587
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1588
|
+
number provided, it will be total request
|
|
1589
|
+
timeout. It can also be a pair (tuple) of
|
|
1590
|
+
(connection, read) timeouts.
|
|
1591
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1592
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1593
|
+
request; this effectively ignores the
|
|
1594
|
+
authentication in the spec for a single request.
|
|
1595
|
+
:type _request_auth: dict, optional
|
|
1596
|
+
:param _content_type: force content-type for the request.
|
|
1597
|
+
:type _content_type: str, Optional
|
|
1598
|
+
:param _headers: set to override the headers for a single
|
|
1599
|
+
request; this effectively ignores the headers
|
|
1600
|
+
in the spec for a single request.
|
|
1601
|
+
:type _headers: dict, optional
|
|
1602
|
+
:param _host_index: set to override the host_index for a single
|
|
1603
|
+
request; this effectively ignores the host_index
|
|
1604
|
+
in the spec for a single request.
|
|
1605
|
+
:type _host_index: int, optional
|
|
1606
|
+
:return: Returns the result object.
|
|
1607
|
+
""" # noqa: E501
|
|
1608
|
+
|
|
1609
|
+
_param = self._stream_job_events_serialize(
|
|
1610
|
+
id=id,
|
|
1611
|
+
_request_auth=_request_auth,
|
|
1612
|
+
_content_type=_content_type,
|
|
1613
|
+
_headers=_headers,
|
|
1614
|
+
_host_index=_host_index
|
|
1615
|
+
)
|
|
1616
|
+
|
|
1617
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1618
|
+
'200': "str",
|
|
1619
|
+
'401': "ErrorBody",
|
|
1620
|
+
'403': "ErrorBody",
|
|
1621
|
+
'404': "ErrorBody",
|
|
1622
|
+
}
|
|
1623
|
+
response_data = self.api_client.call_api(
|
|
1624
|
+
*_param,
|
|
1625
|
+
_request_timeout=_request_timeout
|
|
1626
|
+
)
|
|
1627
|
+
response_data.read()
|
|
1628
|
+
return self.api_client.response_deserialize(
|
|
1629
|
+
response_data=response_data,
|
|
1630
|
+
response_types_map=_response_types_map,
|
|
1631
|
+
).data
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
@validate_call
|
|
1635
|
+
def stream_job_events_with_http_info(
|
|
1636
|
+
self,
|
|
1637
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
1638
|
+
_request_timeout: Union[
|
|
1639
|
+
None,
|
|
1640
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1641
|
+
Tuple[
|
|
1642
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1643
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1644
|
+
]
|
|
1645
|
+
] = None,
|
|
1646
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1647
|
+
_content_type: Optional[StrictStr] = None,
|
|
1648
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1649
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1650
|
+
) -> ApiResponse[str]:
|
|
1651
|
+
"""Stream a job's status transitions as Server-Sent Events until it reaches a terminal state. Lets clients await completion without polling the REST endpoint themselves.
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
:param id: Job id (required)
|
|
1655
|
+
:type id: str
|
|
1656
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1657
|
+
number provided, it will be total request
|
|
1658
|
+
timeout. It can also be a pair (tuple) of
|
|
1659
|
+
(connection, read) timeouts.
|
|
1660
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1661
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1662
|
+
request; this effectively ignores the
|
|
1663
|
+
authentication in the spec for a single request.
|
|
1664
|
+
:type _request_auth: dict, optional
|
|
1665
|
+
:param _content_type: force content-type for the request.
|
|
1666
|
+
:type _content_type: str, Optional
|
|
1667
|
+
:param _headers: set to override the headers for a single
|
|
1668
|
+
request; this effectively ignores the headers
|
|
1669
|
+
in the spec for a single request.
|
|
1670
|
+
:type _headers: dict, optional
|
|
1671
|
+
:param _host_index: set to override the host_index for a single
|
|
1672
|
+
request; this effectively ignores the host_index
|
|
1673
|
+
in the spec for a single request.
|
|
1674
|
+
:type _host_index: int, optional
|
|
1675
|
+
:return: Returns the result object.
|
|
1676
|
+
""" # noqa: E501
|
|
1677
|
+
|
|
1678
|
+
_param = self._stream_job_events_serialize(
|
|
1679
|
+
id=id,
|
|
1680
|
+
_request_auth=_request_auth,
|
|
1681
|
+
_content_type=_content_type,
|
|
1682
|
+
_headers=_headers,
|
|
1683
|
+
_host_index=_host_index
|
|
1684
|
+
)
|
|
1685
|
+
|
|
1686
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1687
|
+
'200': "str",
|
|
1688
|
+
'401': "ErrorBody",
|
|
1689
|
+
'403': "ErrorBody",
|
|
1690
|
+
'404': "ErrorBody",
|
|
1691
|
+
}
|
|
1692
|
+
response_data = self.api_client.call_api(
|
|
1693
|
+
*_param,
|
|
1694
|
+
_request_timeout=_request_timeout
|
|
1695
|
+
)
|
|
1696
|
+
response_data.read()
|
|
1697
|
+
return self.api_client.response_deserialize(
|
|
1698
|
+
response_data=response_data,
|
|
1699
|
+
response_types_map=_response_types_map,
|
|
1700
|
+
)
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
@validate_call
|
|
1704
|
+
def stream_job_events_without_preload_content(
|
|
1705
|
+
self,
|
|
1706
|
+
id: Annotated[StrictStr, Field(description="Job id")],
|
|
1707
|
+
_request_timeout: Union[
|
|
1708
|
+
None,
|
|
1709
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1710
|
+
Tuple[
|
|
1711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1712
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1713
|
+
]
|
|
1714
|
+
] = None,
|
|
1715
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1716
|
+
_content_type: Optional[StrictStr] = None,
|
|
1717
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1718
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1719
|
+
) -> RESTResponseType:
|
|
1720
|
+
"""Stream a job's status transitions as Server-Sent Events until it reaches a terminal state. Lets clients await completion without polling the REST endpoint themselves.
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
:param id: Job id (required)
|
|
1724
|
+
:type id: str
|
|
1725
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1726
|
+
number provided, it will be total request
|
|
1727
|
+
timeout. It can also be a pair (tuple) of
|
|
1728
|
+
(connection, read) timeouts.
|
|
1729
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1730
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1731
|
+
request; this effectively ignores the
|
|
1732
|
+
authentication in the spec for a single request.
|
|
1733
|
+
:type _request_auth: dict, optional
|
|
1734
|
+
:param _content_type: force content-type for the request.
|
|
1735
|
+
:type _content_type: str, Optional
|
|
1736
|
+
:param _headers: set to override the headers for a single
|
|
1737
|
+
request; this effectively ignores the headers
|
|
1738
|
+
in the spec for a single request.
|
|
1739
|
+
:type _headers: dict, optional
|
|
1740
|
+
:param _host_index: set to override the host_index for a single
|
|
1741
|
+
request; this effectively ignores the host_index
|
|
1742
|
+
in the spec for a single request.
|
|
1743
|
+
:type _host_index: int, optional
|
|
1744
|
+
:return: Returns the result object.
|
|
1745
|
+
""" # noqa: E501
|
|
1746
|
+
|
|
1747
|
+
_param = self._stream_job_events_serialize(
|
|
1748
|
+
id=id,
|
|
1749
|
+
_request_auth=_request_auth,
|
|
1750
|
+
_content_type=_content_type,
|
|
1751
|
+
_headers=_headers,
|
|
1752
|
+
_host_index=_host_index
|
|
1753
|
+
)
|
|
1754
|
+
|
|
1755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1756
|
+
'200': "str",
|
|
1757
|
+
'401': "ErrorBody",
|
|
1758
|
+
'403': "ErrorBody",
|
|
1759
|
+
'404': "ErrorBody",
|
|
1760
|
+
}
|
|
1761
|
+
response_data = self.api_client.call_api(
|
|
1762
|
+
*_param,
|
|
1763
|
+
_request_timeout=_request_timeout
|
|
1764
|
+
)
|
|
1765
|
+
return response_data.response
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
def _stream_job_events_serialize(
|
|
1769
|
+
self,
|
|
1770
|
+
id,
|
|
1771
|
+
_request_auth,
|
|
1772
|
+
_content_type,
|
|
1773
|
+
_headers,
|
|
1774
|
+
_host_index,
|
|
1775
|
+
) -> RequestSerialized:
|
|
1776
|
+
|
|
1777
|
+
_host = None
|
|
1778
|
+
|
|
1779
|
+
_collection_formats: Dict[str, str] = {
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
_path_params: Dict[str, str] = {}
|
|
1783
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1784
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1785
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1786
|
+
_files: Dict[
|
|
1787
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1788
|
+
] = {}
|
|
1789
|
+
_body_params: Optional[bytes] = None
|
|
1790
|
+
|
|
1791
|
+
# process the path parameters
|
|
1792
|
+
if id is not None:
|
|
1793
|
+
_path_params['id'] = id
|
|
1794
|
+
# process the query parameters
|
|
1795
|
+
# process the header parameters
|
|
1796
|
+
# process the form parameters
|
|
1797
|
+
# process the body parameter
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
# set the HTTP header `Accept`
|
|
1801
|
+
if 'Accept' not in _header_params:
|
|
1802
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1803
|
+
[
|
|
1804
|
+
'text/event-stream',
|
|
1805
|
+
'application/json'
|
|
1806
|
+
]
|
|
1807
|
+
)
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
# authentication setting
|
|
1811
|
+
_auth_settings: List[str] = [
|
|
1812
|
+
'bearerAuth'
|
|
1813
|
+
]
|
|
1814
|
+
|
|
1815
|
+
return self.api_client.param_serialize(
|
|
1816
|
+
method='GET',
|
|
1817
|
+
resource_path='/api/v1/jobs/{id}/events',
|
|
1818
|
+
path_params=_path_params,
|
|
1819
|
+
query_params=_query_params,
|
|
1820
|
+
header_params=_header_params,
|
|
1821
|
+
body=_body_params,
|
|
1822
|
+
post_params=_form_params,
|
|
1823
|
+
files=_files,
|
|
1824
|
+
auth_settings=_auth_settings,
|
|
1825
|
+
collection_formats=_collection_formats,
|
|
1826
|
+
_host=_host,
|
|
1827
|
+
_request_auth=_request_auth
|
|
1828
|
+
)
|
|
1829
|
+
|
|
1830
|
+
|