wds-client 0.7.0__py3-none-any.whl → 0.9.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.
- wds_client/__init__.py +8 -10
- wds_client/api/__init__.py +1 -2
- wds_client/api/capabilities_api.py +237 -102
- wds_client/api/cloning_api.py +782 -329
- wds_client/api/general_wds_information_api.py +463 -191
- wds_client/api/import_api.py +288 -127
- wds_client/api/instances_api.py +783 -333
- wds_client/api/job_api.py +518 -215
- wds_client/api/records_api.py +2512 -1089
- wds_client/api/schema_api.py +1450 -626
- wds_client/api_client.py +414 -310
- wds_client/api_response.py +21 -0
- wds_client/configuration.py +110 -53
- wds_client/exceptions.py +99 -20
- wds_client/models/__init__.py +4 -8
- wds_client/models/app.py +68 -125
- wds_client/models/attribute_data_type.py +31 -94
- wds_client/models/attribute_schema.py +71 -157
- wds_client/models/attribute_schema_update.py +69 -127
- wds_client/models/backup_job.py +96 -298
- wds_client/models/backup_response.py +70 -157
- wds_client/models/backup_restore_request.py +68 -129
- wds_client/models/batch_operation.py +83 -137
- wds_client/models/batch_record_request.py +70 -160
- wds_client/models/batch_response.py +68 -127
- wds_client/models/build.py +79 -207
- wds_client/models/capabilities.py +83 -103
- wds_client/models/clone_job.py +96 -298
- wds_client/models/clone_response.py +68 -129
- wds_client/models/commit.py +69 -125
- wds_client/models/error_response.py +78 -222
- wds_client/models/generic_job.py +102 -334
- wds_client/models/git.py +76 -129
- wds_client/models/import_request.py +77 -165
- wds_client/models/job.py +87 -243
- wds_client/models/job_v1.py +97 -277
- wds_client/models/record_query_response.py +86 -162
- wds_client/models/record_request.py +60 -96
- wds_client/models/record_response.py +70 -160
- wds_client/models/record_type_schema.py +84 -191
- wds_client/models/search_filter.py +60 -95
- wds_client/models/search_request.py +84 -220
- wds_client/models/search_sort_direction.py +17 -80
- wds_client/models/status_response.py +68 -125
- wds_client/models/tsv_upload_response.py +68 -127
- wds_client/models/version_response.py +86 -155
- wds_client/py.typed +0 -0
- wds_client/rest.py +136 -170
- wds_client-0.9.0.dist-info/METADATA +17 -0
- wds_client-0.9.0.dist-info/RECORD +52 -0
- {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/WHEEL +1 -1
- wds_client/models/backup_job_all_of.py +0 -148
- wds_client/models/clone_job_all_of.py +0 -148
- wds_client/models/generic_job_all_of.py +0 -150
- wds_client/models/inline_object.py +0 -123
- wds_client-0.7.0.dist-info/METADATA +0 -16
- wds_client-0.7.0.dist-info/RECORD +0 -54
- {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/top_level.txt +0 -0
wds_client/api/job_api.py
CHANGED
@@ -3,265 +3,568 @@
|
|
3
3
|
"""
|
4
4
|
Workspace Data Service
|
5
5
|
|
6
|
-
This page lists current APIs.
|
6
|
+
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
7
|
|
8
8
|
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by
|
10
|
-
"""
|
11
|
-
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
10
|
|
13
|
-
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
14
13
|
|
15
|
-
import
|
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
|
16
18
|
|
17
|
-
|
18
|
-
import
|
19
|
+
from pydantic import Field, StrictStr, field_validator
|
20
|
+
from typing import List, Optional
|
21
|
+
from typing_extensions import Annotated
|
22
|
+
from wds_client.models.generic_job import GenericJob
|
19
23
|
|
20
|
-
from wds_client.api_client import ApiClient
|
21
|
-
from wds_client.
|
22
|
-
|
23
|
-
ApiValueError
|
24
|
-
)
|
24
|
+
from wds_client.api_client import ApiClient, RequestSerialized
|
25
|
+
from wds_client.api_response import ApiResponse
|
26
|
+
from wds_client.rest import RESTResponseType
|
25
27
|
|
26
28
|
|
27
|
-
class JobApi
|
29
|
+
class JobApi:
|
28
30
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
29
31
|
Ref: https://openapi-generator.tech
|
30
32
|
|
31
33
|
Do not edit the class manually.
|
32
34
|
"""
|
33
35
|
|
34
|
-
def __init__(self, api_client=None):
|
36
|
+
def __init__(self, api_client=None) -> None:
|
35
37
|
if api_client is None:
|
36
|
-
api_client = ApiClient()
|
38
|
+
api_client = ApiClient.get_default()
|
37
39
|
self.api_client = api_client
|
38
40
|
|
39
|
-
def job_status_v1(self, job_id, **kwargs): # noqa: E501
|
40
|
-
"""Get status of a long-running job. # noqa: E501
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
@validate_call
|
43
|
+
def job_status_v1(
|
44
|
+
self,
|
45
|
+
job_id: StrictStr,
|
46
|
+
_request_timeout: Union[
|
47
|
+
None,
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
49
|
+
Tuple[
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
52
|
+
]
|
53
|
+
] = None,
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
58
|
+
) -> GenericJob:
|
59
|
+
"""Get status of a long-running job.
|
60
|
+
|
46
61
|
|
47
|
-
:param
|
48
|
-
:
|
49
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
50
|
-
be returned without reading/decoding response
|
51
|
-
data. Default is True.
|
62
|
+
:param job_id: (required)
|
63
|
+
:type job_id: str
|
52
64
|
:param _request_timeout: timeout setting for this request. If one
|
53
65
|
number provided, it will be total request
|
54
66
|
timeout. It can also be a pair (tuple) of
|
55
67
|
(connection, read) timeouts.
|
56
|
-
:
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
70
|
+
request; this effectively ignores the
|
71
|
+
authentication in the spec for a single request.
|
72
|
+
:type _request_auth: dict, optional
|
73
|
+
:param _content_type: force content-type for the request.
|
74
|
+
:type _content_type: str, Optional
|
75
|
+
:param _headers: set to override the headers for a single
|
76
|
+
request; this effectively ignores the headers
|
77
|
+
in the spec for a single request.
|
78
|
+
:type _headers: dict, optional
|
79
|
+
:param _host_index: set to override the host_index for a single
|
80
|
+
request; this effectively ignores the host_index
|
81
|
+
in the spec for a single request.
|
82
|
+
:type _host_index: int, optional
|
83
|
+
:return: Returns the result object.
|
84
|
+
""" # noqa: E501
|
85
|
+
|
86
|
+
_param = self._job_status_v1_serialize(
|
87
|
+
job_id=job_id,
|
88
|
+
_request_auth=_request_auth,
|
89
|
+
_content_type=_content_type,
|
90
|
+
_headers=_headers,
|
91
|
+
_host_index=_host_index
|
92
|
+
)
|
93
|
+
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
95
|
+
'200': "GenericJob",
|
96
|
+
'202': "GenericJob",
|
97
|
+
}
|
98
|
+
response_data = self.api_client.call_api(
|
99
|
+
*_param,
|
100
|
+
_request_timeout=_request_timeout
|
101
|
+
)
|
102
|
+
response_data.read()
|
103
|
+
return self.api_client.response_deserialize(
|
104
|
+
response_data=response_data,
|
105
|
+
response_types_map=_response_types_map,
|
106
|
+
).data
|
107
|
+
|
108
|
+
|
109
|
+
@validate_call
|
110
|
+
def job_status_v1_with_http_info(
|
111
|
+
self,
|
112
|
+
job_id: StrictStr,
|
113
|
+
_request_timeout: Union[
|
114
|
+
None,
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
116
|
+
Tuple[
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
119
|
+
]
|
120
|
+
] = None,
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
125
|
+
) -> ApiResponse[GenericJob]:
|
126
|
+
"""Get status of a long-running job.
|
127
|
+
|
128
|
+
|
129
|
+
:param job_id: (required)
|
130
|
+
:type job_id: str
|
78
131
|
:param _request_timeout: timeout setting for this request. If one
|
79
132
|
number provided, it will be total request
|
80
133
|
timeout. It can also be a pair (tuple) of
|
81
134
|
(connection, read) timeouts.
|
82
|
-
:
|
83
|
-
|
84
|
-
|
85
|
-
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
137
|
+
request; this effectively ignores the
|
138
|
+
authentication in the spec for a single request.
|
139
|
+
:type _request_auth: dict, optional
|
140
|
+
:param _content_type: force content-type for the request.
|
141
|
+
:type _content_type: str, Optional
|
142
|
+
:param _headers: set to override the headers for a single
|
143
|
+
request; this effectively ignores the headers
|
144
|
+
in the spec for a single request.
|
145
|
+
:type _headers: dict, optional
|
146
|
+
:param _host_index: set to override the host_index for a single
|
147
|
+
request; this effectively ignores the host_index
|
148
|
+
in the spec for a single request.
|
149
|
+
:type _host_index: int, optional
|
150
|
+
:return: Returns the result object.
|
151
|
+
""" # noqa: E501
|
152
|
+
|
153
|
+
_param = self._job_status_v1_serialize(
|
154
|
+
job_id=job_id,
|
155
|
+
_request_auth=_request_auth,
|
156
|
+
_content_type=_content_type,
|
157
|
+
_headers=_headers,
|
158
|
+
_host_index=_host_index
|
159
|
+
)
|
160
|
+
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
162
|
+
'200': "GenericJob",
|
163
|
+
'202': "GenericJob",
|
164
|
+
}
|
165
|
+
response_data = self.api_client.call_api(
|
166
|
+
*_param,
|
167
|
+
_request_timeout=_request_timeout
|
168
|
+
)
|
169
|
+
response_data.read()
|
170
|
+
return self.api_client.response_deserialize(
|
171
|
+
response_data=response_data,
|
172
|
+
response_types_map=_response_types_map,
|
173
|
+
)
|
86
174
|
|
87
|
-
local_var_params = locals()
|
88
175
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
176
|
+
@validate_call
|
177
|
+
def job_status_v1_without_preload_content(
|
178
|
+
self,
|
179
|
+
job_id: StrictStr,
|
180
|
+
_request_timeout: Union[
|
181
|
+
None,
|
182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
183
|
+
Tuple[
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
185
|
+
Annotated[StrictFloat, Field(gt=0)]
|
186
|
+
]
|
187
|
+
] = None,
|
188
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
189
|
+
_content_type: Optional[StrictStr] = None,
|
190
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
191
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
192
|
+
) -> RESTResponseType:
|
193
|
+
"""Get status of a long-running job.
|
194
|
+
|
195
|
+
|
196
|
+
:param job_id: (required)
|
197
|
+
:type job_id: str
|
198
|
+
:param _request_timeout: timeout setting for this request. If one
|
199
|
+
number provided, it will be total request
|
200
|
+
timeout. It can also be a pair (tuple) of
|
201
|
+
(connection, read) timeouts.
|
202
|
+
:type _request_timeout: int, tuple(int, int), optional
|
203
|
+
:param _request_auth: set to override the auth_settings for an a single
|
204
|
+
request; this effectively ignores the
|
205
|
+
authentication in the spec for a single request.
|
206
|
+
:type _request_auth: dict, optional
|
207
|
+
:param _content_type: force content-type for the request.
|
208
|
+
:type _content_type: str, Optional
|
209
|
+
:param _headers: set to override the headers for a single
|
210
|
+
request; this effectively ignores the headers
|
211
|
+
in the spec for a single request.
|
212
|
+
:type _headers: dict, optional
|
213
|
+
:param _host_index: set to override the host_index for a single
|
214
|
+
request; this effectively ignores the host_index
|
215
|
+
in the spec for a single request.
|
216
|
+
:type _host_index: int, optional
|
217
|
+
:return: Returns the result object.
|
218
|
+
""" # noqa: E501
|
219
|
+
|
220
|
+
_param = self._job_status_v1_serialize(
|
221
|
+
job_id=job_id,
|
222
|
+
_request_auth=_request_auth,
|
223
|
+
_content_type=_content_type,
|
224
|
+
_headers=_headers,
|
225
|
+
_host_index=_host_index
|
226
|
+
)
|
227
|
+
|
228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
229
|
+
'200': "GenericJob",
|
230
|
+
'202': "GenericJob",
|
231
|
+
}
|
232
|
+
response_data = self.api_client.call_api(
|
233
|
+
*_param,
|
234
|
+
_request_timeout=_request_timeout
|
235
|
+
)
|
236
|
+
return response_data.response
|
237
|
+
|
238
|
+
|
239
|
+
def _job_status_v1_serialize(
|
240
|
+
self,
|
241
|
+
job_id,
|
242
|
+
_request_auth,
|
243
|
+
_content_type,
|
244
|
+
_headers,
|
245
|
+
_host_index,
|
246
|
+
) -> RequestSerialized:
|
247
|
+
|
248
|
+
_host = None
|
249
|
+
|
250
|
+
_collection_formats: Dict[str, str] = {
|
251
|
+
}
|
252
|
+
|
253
|
+
_path_params: Dict[str, str] = {}
|
254
|
+
_query_params: List[Tuple[str, str]] = []
|
255
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
256
|
+
_form_params: List[Tuple[str, str]] = []
|
257
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
258
|
+
_body_params: Optional[bytes] = None
|
259
|
+
|
260
|
+
# process the path parameters
|
261
|
+
if job_id is not None:
|
262
|
+
_path_params['jobId'] = job_id
|
263
|
+
# process the query parameters
|
264
|
+
# process the header parameters
|
265
|
+
# process the form parameters
|
266
|
+
# process the body parameter
|
267
|
+
|
268
|
+
|
269
|
+
# set the HTTP header `Accept`
|
270
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
93
271
|
[
|
94
|
-
'
|
95
|
-
'_return_http_data_only',
|
96
|
-
'_preload_content',
|
97
|
-
'_request_timeout'
|
272
|
+
'application/json'
|
98
273
|
]
|
99
274
|
)
|
100
275
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
def jobs_in_instance_v1(self, instance_uuid, **kwargs): # noqa: E501
|
152
|
-
"""Get all jobs with a certain status under a particular instance. # noqa: E501
|
153
|
-
|
154
|
-
This method makes a synchronous HTTP request by default. To make an
|
155
|
-
asynchronous HTTP request, please pass async_req=True
|
156
|
-
>>> thread = api.jobs_in_instance_v1(instance_uuid, async_req=True)
|
157
|
-
>>> result = thread.get()
|
158
|
-
|
159
|
-
:param async_req bool: execute request asynchronously
|
160
|
-
:param str instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
161
|
-
:param list[str] statuses:
|
162
|
-
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
163
|
-
be returned without reading/decoding response
|
164
|
-
data. Default is True.
|
276
|
+
|
277
|
+
# authentication setting
|
278
|
+
_auth_settings: List[str] = [
|
279
|
+
'bearerAuth'
|
280
|
+
]
|
281
|
+
|
282
|
+
return self.api_client.param_serialize(
|
283
|
+
method='GET',
|
284
|
+
resource_path='/job/v1/{jobId}',
|
285
|
+
path_params=_path_params,
|
286
|
+
query_params=_query_params,
|
287
|
+
header_params=_header_params,
|
288
|
+
body=_body_params,
|
289
|
+
post_params=_form_params,
|
290
|
+
files=_files,
|
291
|
+
auth_settings=_auth_settings,
|
292
|
+
collection_formats=_collection_formats,
|
293
|
+
_host=_host,
|
294
|
+
_request_auth=_request_auth
|
295
|
+
)
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
@validate_call
|
301
|
+
def jobs_in_instance_v1(
|
302
|
+
self,
|
303
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
304
|
+
statuses: Optional[List[StrictStr]] = None,
|
305
|
+
_request_timeout: Union[
|
306
|
+
None,
|
307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
308
|
+
Tuple[
|
309
|
+
Annotated[StrictFloat, Field(gt=0)],
|
310
|
+
Annotated[StrictFloat, Field(gt=0)]
|
311
|
+
]
|
312
|
+
] = None,
|
313
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
314
|
+
_content_type: Optional[StrictStr] = None,
|
315
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
316
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
317
|
+
) -> List[GenericJob]:
|
318
|
+
"""Get all jobs with a certain status under a particular instance.
|
319
|
+
|
320
|
+
|
321
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
322
|
+
:type instance_uuid: str
|
323
|
+
:param statuses:
|
324
|
+
:type statuses: List[str]
|
165
325
|
:param _request_timeout: timeout setting for this request. If one
|
166
326
|
number provided, it will be total request
|
167
327
|
timeout. It can also be a pair (tuple) of
|
168
328
|
(connection, read) timeouts.
|
169
|
-
:
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
:
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
329
|
+
:type _request_timeout: int, tuple(int, int), optional
|
330
|
+
:param _request_auth: set to override the auth_settings for an a single
|
331
|
+
request; this effectively ignores the
|
332
|
+
authentication in the spec for a single request.
|
333
|
+
:type _request_auth: dict, optional
|
334
|
+
:param _content_type: force content-type for the request.
|
335
|
+
:type _content_type: str, Optional
|
336
|
+
:param _headers: set to override the headers for a single
|
337
|
+
request; this effectively ignores the headers
|
338
|
+
in the spec for a single request.
|
339
|
+
:type _headers: dict, optional
|
340
|
+
:param _host_index: set to override the host_index for a single
|
341
|
+
request; this effectively ignores the host_index
|
342
|
+
in the spec for a single request.
|
343
|
+
:type _host_index: int, optional
|
344
|
+
:return: Returns the result object.
|
345
|
+
""" # noqa: E501
|
346
|
+
|
347
|
+
_param = self._jobs_in_instance_v1_serialize(
|
348
|
+
instance_uuid=instance_uuid,
|
349
|
+
statuses=statuses,
|
350
|
+
_request_auth=_request_auth,
|
351
|
+
_content_type=_content_type,
|
352
|
+
_headers=_headers,
|
353
|
+
_host_index=_host_index
|
354
|
+
)
|
355
|
+
|
356
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
357
|
+
'200': "List[GenericJob]",
|
358
|
+
}
|
359
|
+
response_data = self.api_client.call_api(
|
360
|
+
*_param,
|
361
|
+
_request_timeout=_request_timeout
|
362
|
+
)
|
363
|
+
response_data.read()
|
364
|
+
return self.api_client.response_deserialize(
|
365
|
+
response_data=response_data,
|
366
|
+
response_types_map=_response_types_map,
|
367
|
+
).data
|
368
|
+
|
369
|
+
|
370
|
+
@validate_call
|
371
|
+
def jobs_in_instance_v1_with_http_info(
|
372
|
+
self,
|
373
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
374
|
+
statuses: Optional[List[StrictStr]] = None,
|
375
|
+
_request_timeout: Union[
|
376
|
+
None,
|
377
|
+
Annotated[StrictFloat, Field(gt=0)],
|
378
|
+
Tuple[
|
379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
380
|
+
Annotated[StrictFloat, Field(gt=0)]
|
381
|
+
]
|
382
|
+
] = None,
|
383
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
384
|
+
_content_type: Optional[StrictStr] = None,
|
385
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
386
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
387
|
+
) -> ApiResponse[List[GenericJob]]:
|
388
|
+
"""Get all jobs with a certain status under a particular instance.
|
389
|
+
|
390
|
+
|
391
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
392
|
+
:type instance_uuid: str
|
393
|
+
:param statuses:
|
394
|
+
:type statuses: List[str]
|
192
395
|
:param _request_timeout: timeout setting for this request. If one
|
193
396
|
number provided, it will be total request
|
194
397
|
timeout. It can also be a pair (tuple) of
|
195
398
|
(connection, read) timeouts.
|
196
|
-
:
|
197
|
-
|
198
|
-
|
199
|
-
|
399
|
+
:type _request_timeout: int, tuple(int, int), optional
|
400
|
+
:param _request_auth: set to override the auth_settings for an a single
|
401
|
+
request; this effectively ignores the
|
402
|
+
authentication in the spec for a single request.
|
403
|
+
:type _request_auth: dict, optional
|
404
|
+
:param _content_type: force content-type for the request.
|
405
|
+
:type _content_type: str, Optional
|
406
|
+
:param _headers: set to override the headers for a single
|
407
|
+
request; this effectively ignores the headers
|
408
|
+
in the spec for a single request.
|
409
|
+
:type _headers: dict, optional
|
410
|
+
:param _host_index: set to override the host_index for a single
|
411
|
+
request; this effectively ignores the host_index
|
412
|
+
in the spec for a single request.
|
413
|
+
:type _host_index: int, optional
|
414
|
+
:return: Returns the result object.
|
415
|
+
""" # noqa: E501
|
416
|
+
|
417
|
+
_param = self._jobs_in_instance_v1_serialize(
|
418
|
+
instance_uuid=instance_uuid,
|
419
|
+
statuses=statuses,
|
420
|
+
_request_auth=_request_auth,
|
421
|
+
_content_type=_content_type,
|
422
|
+
_headers=_headers,
|
423
|
+
_host_index=_host_index
|
424
|
+
)
|
200
425
|
|
201
|
-
|
426
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
427
|
+
'200': "List[GenericJob]",
|
428
|
+
}
|
429
|
+
response_data = self.api_client.call_api(
|
430
|
+
*_param,
|
431
|
+
_request_timeout=_request_timeout
|
432
|
+
)
|
433
|
+
response_data.read()
|
434
|
+
return self.api_client.response_deserialize(
|
435
|
+
response_data=response_data,
|
436
|
+
response_types_map=_response_types_map,
|
437
|
+
)
|
202
438
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
439
|
+
|
440
|
+
@validate_call
|
441
|
+
def jobs_in_instance_v1_without_preload_content(
|
442
|
+
self,
|
443
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
444
|
+
statuses: Optional[List[StrictStr]] = None,
|
445
|
+
_request_timeout: Union[
|
446
|
+
None,
|
447
|
+
Annotated[StrictFloat, Field(gt=0)],
|
448
|
+
Tuple[
|
449
|
+
Annotated[StrictFloat, Field(gt=0)],
|
450
|
+
Annotated[StrictFloat, Field(gt=0)]
|
451
|
+
]
|
452
|
+
] = None,
|
453
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
454
|
+
_content_type: Optional[StrictStr] = None,
|
455
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
456
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
457
|
+
) -> RESTResponseType:
|
458
|
+
"""Get all jobs with a certain status under a particular instance.
|
459
|
+
|
460
|
+
|
461
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
462
|
+
:type instance_uuid: str
|
463
|
+
:param statuses:
|
464
|
+
:type statuses: List[str]
|
465
|
+
:param _request_timeout: timeout setting for this request. If one
|
466
|
+
number provided, it will be total request
|
467
|
+
timeout. It can also be a pair (tuple) of
|
468
|
+
(connection, read) timeouts.
|
469
|
+
:type _request_timeout: int, tuple(int, int), optional
|
470
|
+
:param _request_auth: set to override the auth_settings for an a single
|
471
|
+
request; this effectively ignores the
|
472
|
+
authentication in the spec for a single request.
|
473
|
+
:type _request_auth: dict, optional
|
474
|
+
:param _content_type: force content-type for the request.
|
475
|
+
:type _content_type: str, Optional
|
476
|
+
:param _headers: set to override the headers for a single
|
477
|
+
request; this effectively ignores the headers
|
478
|
+
in the spec for a single request.
|
479
|
+
:type _headers: dict, optional
|
480
|
+
:param _host_index: set to override the host_index for a single
|
481
|
+
request; this effectively ignores the host_index
|
482
|
+
in the spec for a single request.
|
483
|
+
:type _host_index: int, optional
|
484
|
+
:return: Returns the result object.
|
485
|
+
""" # noqa: E501
|
486
|
+
|
487
|
+
_param = self._jobs_in_instance_v1_serialize(
|
488
|
+
instance_uuid=instance_uuid,
|
489
|
+
statuses=statuses,
|
490
|
+
_request_auth=_request_auth,
|
491
|
+
_content_type=_content_type,
|
492
|
+
_headers=_headers,
|
493
|
+
_host_index=_host_index
|
494
|
+
)
|
495
|
+
|
496
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
497
|
+
'200': "List[GenericJob]",
|
498
|
+
}
|
499
|
+
response_data = self.api_client.call_api(
|
500
|
+
*_param,
|
501
|
+
_request_timeout=_request_timeout
|
502
|
+
)
|
503
|
+
return response_data.response
|
504
|
+
|
505
|
+
|
506
|
+
def _jobs_in_instance_v1_serialize(
|
507
|
+
self,
|
508
|
+
instance_uuid,
|
509
|
+
statuses,
|
510
|
+
_request_auth,
|
511
|
+
_content_type,
|
512
|
+
_headers,
|
513
|
+
_host_index,
|
514
|
+
) -> RequestSerialized:
|
515
|
+
|
516
|
+
_host = None
|
517
|
+
|
518
|
+
_collection_formats: Dict[str, str] = {
|
519
|
+
'statuses': 'csv',
|
520
|
+
}
|
521
|
+
|
522
|
+
_path_params: Dict[str, str] = {}
|
523
|
+
_query_params: List[Tuple[str, str]] = []
|
524
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
525
|
+
_form_params: List[Tuple[str, str]] = []
|
526
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
527
|
+
_body_params: Optional[bytes] = None
|
528
|
+
|
529
|
+
# process the path parameters
|
530
|
+
if instance_uuid is not None:
|
531
|
+
_path_params['instanceUuid'] = instance_uuid
|
532
|
+
# process the query parameters
|
533
|
+
if statuses is not None:
|
534
|
+
|
535
|
+
_query_params.append(('statuses', statuses))
|
536
|
+
|
537
|
+
# process the header parameters
|
538
|
+
# process the form parameters
|
539
|
+
# process the body parameter
|
540
|
+
|
541
|
+
|
542
|
+
# set the HTTP header `Accept`
|
543
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
208
544
|
[
|
209
|
-
'
|
210
|
-
'_return_http_data_only',
|
211
|
-
'_preload_content',
|
212
|
-
'_request_timeout'
|
545
|
+
'application/json'
|
213
546
|
]
|
214
547
|
)
|
215
548
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
collection_formats['statuses'] = 'csv' # noqa: E501
|
239
|
-
|
240
|
-
header_params = {}
|
241
|
-
|
242
|
-
form_params = []
|
243
|
-
local_var_files = {}
|
244
|
-
|
245
|
-
body_params = None
|
246
|
-
# HTTP header `Accept`
|
247
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
248
|
-
['application/json']) # noqa: E501
|
249
|
-
|
250
|
-
# Authentication setting
|
251
|
-
auth_settings = ['bearerAuth'] # noqa: E501
|
252
|
-
|
253
|
-
return self.api_client.call_api(
|
254
|
-
'/job/v1/instance/{instanceUuid}', 'GET',
|
255
|
-
path_params,
|
256
|
-
query_params,
|
257
|
-
header_params,
|
258
|
-
body=body_params,
|
259
|
-
post_params=form_params,
|
260
|
-
files=local_var_files,
|
261
|
-
response_type='list[GenericJob]', # noqa: E501
|
262
|
-
auth_settings=auth_settings,
|
263
|
-
async_req=local_var_params.get('async_req'),
|
264
|
-
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
265
|
-
_preload_content=local_var_params.get('_preload_content', True),
|
266
|
-
_request_timeout=local_var_params.get('_request_timeout'),
|
267
|
-
collection_formats=collection_formats)
|
549
|
+
|
550
|
+
# authentication setting
|
551
|
+
_auth_settings: List[str] = [
|
552
|
+
'bearerAuth'
|
553
|
+
]
|
554
|
+
|
555
|
+
return self.api_client.param_serialize(
|
556
|
+
method='GET',
|
557
|
+
resource_path='/job/v1/instance/{instanceUuid}',
|
558
|
+
path_params=_path_params,
|
559
|
+
query_params=_query_params,
|
560
|
+
header_params=_header_params,
|
561
|
+
body=_body_params,
|
562
|
+
post_params=_form_params,
|
563
|
+
files=_files,
|
564
|
+
auth_settings=_auth_settings,
|
565
|
+
collection_formats=_collection_formats,
|
566
|
+
_host=_host,
|
567
|
+
_request_auth=_request_auth
|
568
|
+
)
|
569
|
+
|
570
|
+
|