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.
Files changed (58) hide show
  1. wds_client/__init__.py +8 -10
  2. wds_client/api/__init__.py +1 -2
  3. wds_client/api/capabilities_api.py +237 -102
  4. wds_client/api/cloning_api.py +782 -329
  5. wds_client/api/general_wds_information_api.py +463 -191
  6. wds_client/api/import_api.py +288 -127
  7. wds_client/api/instances_api.py +783 -333
  8. wds_client/api/job_api.py +518 -215
  9. wds_client/api/records_api.py +2512 -1089
  10. wds_client/api/schema_api.py +1450 -626
  11. wds_client/api_client.py +414 -310
  12. wds_client/api_response.py +21 -0
  13. wds_client/configuration.py +110 -53
  14. wds_client/exceptions.py +99 -20
  15. wds_client/models/__init__.py +4 -8
  16. wds_client/models/app.py +68 -125
  17. wds_client/models/attribute_data_type.py +31 -94
  18. wds_client/models/attribute_schema.py +71 -157
  19. wds_client/models/attribute_schema_update.py +69 -127
  20. wds_client/models/backup_job.py +96 -298
  21. wds_client/models/backup_response.py +70 -157
  22. wds_client/models/backup_restore_request.py +68 -129
  23. wds_client/models/batch_operation.py +83 -137
  24. wds_client/models/batch_record_request.py +70 -160
  25. wds_client/models/batch_response.py +68 -127
  26. wds_client/models/build.py +79 -207
  27. wds_client/models/capabilities.py +83 -103
  28. wds_client/models/clone_job.py +96 -298
  29. wds_client/models/clone_response.py +68 -129
  30. wds_client/models/commit.py +69 -125
  31. wds_client/models/error_response.py +78 -222
  32. wds_client/models/generic_job.py +102 -334
  33. wds_client/models/git.py +76 -129
  34. wds_client/models/import_request.py +77 -165
  35. wds_client/models/job.py +87 -243
  36. wds_client/models/job_v1.py +97 -277
  37. wds_client/models/record_query_response.py +86 -162
  38. wds_client/models/record_request.py +60 -96
  39. wds_client/models/record_response.py +70 -160
  40. wds_client/models/record_type_schema.py +84 -191
  41. wds_client/models/search_filter.py +60 -95
  42. wds_client/models/search_request.py +84 -220
  43. wds_client/models/search_sort_direction.py +17 -80
  44. wds_client/models/status_response.py +68 -125
  45. wds_client/models/tsv_upload_response.py +68 -127
  46. wds_client/models/version_response.py +86 -155
  47. wds_client/py.typed +0 -0
  48. wds_client/rest.py +136 -170
  49. wds_client-0.9.0.dist-info/METADATA +17 -0
  50. wds_client-0.9.0.dist-info/RECORD +52 -0
  51. {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/WHEEL +1 -1
  52. wds_client/models/backup_job_all_of.py +0 -148
  53. wds_client/models/clone_job_all_of.py +0 -148
  54. wds_client/models/generic_job_all_of.py +0 -150
  55. wds_client/models/inline_object.py +0 -123
  56. wds_client-0.7.0.dist-info/METADATA +0 -16
  57. wds_client-0.7.0.dist-info/RECORD +0 -54
  58. {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. As of v0.2, all APIs are subject to change without notice. # noqa: E501
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: https://openapi-generator.tech
10
- """
11
-
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
10
 
13
- from __future__ import absolute_import
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
14
13
 
15
- import re # noqa: F401
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
- # python 2 and python 3 compatibility library
18
- import six
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.exceptions import ( # noqa: F401
22
- ApiTypeError,
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(object):
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
- This method makes a synchronous HTTP request by default. To make an
43
- asynchronous HTTP request, please pass async_req=True
44
- >>> thread = api.job_status_v1(job_id, async_req=True)
45
- >>> result = thread.get()
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 async_req bool: execute request asynchronously
48
- :param str job_id: (required)
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
- :return: GenericJob
57
- If the method is called asynchronously,
58
- returns the request thread.
59
- """
60
- kwargs['_return_http_data_only'] = True
61
- return self.job_status_v1_with_http_info(job_id, **kwargs) # noqa: E501
62
-
63
- def job_status_v1_with_http_info(self, job_id, **kwargs): # noqa: E501
64
- """Get status of a long-running job. # noqa: E501
65
-
66
- This method makes a synchronous HTTP request by default. To make an
67
- asynchronous HTTP request, please pass async_req=True
68
- >>> thread = api.job_status_v1_with_http_info(job_id, async_req=True)
69
- >>> result = thread.get()
70
-
71
- :param async_req bool: execute request asynchronously
72
- :param str job_id: (required)
73
- :param _return_http_data_only: response data without head status code
74
- and headers
75
- :param _preload_content: if False, the urllib3.HTTPResponse object will
76
- be returned without reading/decoding response
77
- data. Default is True.
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
- :return: tuple(GenericJob, status_code(int), headers(HTTPHeaderDict))
83
- If the method is called asynchronously,
84
- returns the request thread.
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
- all_params = [
90
- 'job_id'
91
- ]
92
- all_params.extend(
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
- 'async_req',
95
- '_return_http_data_only',
96
- '_preload_content',
97
- '_request_timeout'
272
+ 'application/json'
98
273
  ]
99
274
  )
100
275
 
101
- for key, val in six.iteritems(local_var_params['kwargs']):
102
- if key not in all_params:
103
- raise ApiTypeError(
104
- "Got an unexpected keyword argument '%s'"
105
- " to method job_status_v1" % key
106
- )
107
- local_var_params[key] = val
108
- del local_var_params['kwargs']
109
- # verify the required parameter 'job_id' is set
110
- if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501
111
- local_var_params['job_id'] is None): # noqa: E501
112
- raise ApiValueError("Missing the required parameter `job_id` when calling `job_status_v1`") # noqa: E501
113
-
114
- collection_formats = {}
115
-
116
- path_params = {}
117
- if 'job_id' in local_var_params:
118
- path_params['jobId'] = local_var_params['job_id'] # noqa: E501
119
-
120
- query_params = []
121
-
122
- header_params = {}
123
-
124
- form_params = []
125
- local_var_files = {}
126
-
127
- body_params = None
128
- # HTTP header `Accept`
129
- header_params['Accept'] = self.api_client.select_header_accept(
130
- ['application/json']) # noqa: E501
131
-
132
- # Authentication setting
133
- auth_settings = ['bearerAuth'] # noqa: E501
134
-
135
- return self.api_client.call_api(
136
- '/job/v1/{jobId}', 'GET',
137
- path_params,
138
- query_params,
139
- header_params,
140
- body=body_params,
141
- post_params=form_params,
142
- files=local_var_files,
143
- response_type='GenericJob', # noqa: E501
144
- auth_settings=auth_settings,
145
- async_req=local_var_params.get('async_req'),
146
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
147
- _preload_content=local_var_params.get('_preload_content', True),
148
- _request_timeout=local_var_params.get('_request_timeout'),
149
- collection_formats=collection_formats)
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
- :return: list[GenericJob]
170
- If the method is called asynchronously,
171
- returns the request thread.
172
- """
173
- kwargs['_return_http_data_only'] = True
174
- return self.jobs_in_instance_v1_with_http_info(instance_uuid, **kwargs) # noqa: E501
175
-
176
- def jobs_in_instance_v1_with_http_info(self, instance_uuid, **kwargs): # noqa: E501
177
- """Get all jobs with a certain status under a particular instance. # noqa: E501
178
-
179
- This method makes a synchronous HTTP request by default. To make an
180
- asynchronous HTTP request, please pass async_req=True
181
- >>> thread = api.jobs_in_instance_v1_with_http_info(instance_uuid, async_req=True)
182
- >>> result = thread.get()
183
-
184
- :param async_req bool: execute request asynchronously
185
- :param str instance_uuid: WDS instance id; by convention equal to workspace id (required)
186
- :param list[str] statuses:
187
- :param _return_http_data_only: response data without head status code
188
- and headers
189
- :param _preload_content: if False, the urllib3.HTTPResponse object will
190
- be returned without reading/decoding response
191
- data. Default is True.
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
- :return: tuple(list[GenericJob], status_code(int), headers(HTTPHeaderDict))
197
- If the method is called asynchronously,
198
- returns the request thread.
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
- local_var_params = locals()
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
- all_params = [
204
- 'instance_uuid',
205
- 'statuses'
206
- ]
207
- all_params.extend(
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
- 'async_req',
210
- '_return_http_data_only',
211
- '_preload_content',
212
- '_request_timeout'
545
+ 'application/json'
213
546
  ]
214
547
  )
215
548
 
216
- for key, val in six.iteritems(local_var_params['kwargs']):
217
- if key not in all_params:
218
- raise ApiTypeError(
219
- "Got an unexpected keyword argument '%s'"
220
- " to method jobs_in_instance_v1" % key
221
- )
222
- local_var_params[key] = val
223
- del local_var_params['kwargs']
224
- # verify the required parameter 'instance_uuid' is set
225
- if self.api_client.client_side_validation and ('instance_uuid' not in local_var_params or # noqa: E501
226
- local_var_params['instance_uuid'] is None): # noqa: E501
227
- raise ApiValueError("Missing the required parameter `instance_uuid` when calling `jobs_in_instance_v1`") # noqa: E501
228
-
229
- collection_formats = {}
230
-
231
- path_params = {}
232
- if 'instance_uuid' in local_var_params:
233
- path_params['instanceUuid'] = local_var_params['instance_uuid'] # noqa: E501
234
-
235
- query_params = []
236
- if 'statuses' in local_var_params and local_var_params['statuses'] is not None: # noqa: E501
237
- query_params.append(('statuses', local_var_params['statuses'])) # noqa: E501
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
+