wds-client 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
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.8.0.dist-info/METADATA +17 -0
  50. wds_client-0.8.0.dist-info/RECORD +52 -0
  51. wds_client/models/backup_job_all_of.py +0 -148
  52. wds_client/models/clone_job_all_of.py +0 -148
  53. wds_client/models/generic_job_all_of.py +0 -150
  54. wds_client/models/inline_object.py +0 -123
  55. wds_client-0.7.0.dist-info/METADATA +0 -16
  56. wds_client-0.7.0.dist-info/RECORD +0 -54
  57. {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/WHEEL +0 -0
  58. {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
@@ -3,393 +3,846 @@
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
20
+ from typing_extensions import Annotated
21
+ from wds_client.models.backup_job import BackupJob
22
+ from wds_client.models.backup_restore_request import BackupRestoreRequest
23
+ from wds_client.models.clone_job import CloneJob
19
24
 
20
- from wds_client.api_client import ApiClient
21
- from wds_client.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
25
+ from wds_client.api_client import ApiClient, RequestSerialized
26
+ from wds_client.api_response import ApiResponse
27
+ from wds_client.rest import RESTResponseType
25
28
 
26
29
 
27
- class CloningApi(object):
30
+ class CloningApi:
28
31
  """NOTE: This class is auto generated by OpenAPI Generator
29
32
  Ref: https://openapi-generator.tech
30
33
 
31
34
  Do not edit the class manually.
32
35
  """
33
36
 
34
- def __init__(self, api_client=None):
37
+ def __init__(self, api_client=None) -> None:
35
38
  if api_client is None:
36
- api_client = ApiClient()
39
+ api_client = ApiClient.get_default()
37
40
  self.api_client = api_client
38
41
 
39
- def create_backup(self, v, backup_restore_request, **kwargs): # noqa: E501
40
- """Create a backup of all WDS data # noqa: E501
41
42
 
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.create_backup(v, backup_restore_request, async_req=True)
45
- >>> result = thread.get()
46
-
47
- :param async_req bool: execute request asynchronously
48
- :param str v: API version (required)
49
- :param BackupRestoreRequest backup_restore_request: A backup request (required)
50
- :param _preload_content: if False, the urllib3.HTTPResponse object will
51
- be returned without reading/decoding response
52
- data. Default is True.
43
+ @validate_call
44
+ def create_backup(
45
+ self,
46
+ v: Annotated[StrictStr, Field(description="API version")],
47
+ backup_restore_request: Annotated[BackupRestoreRequest, Field(description="A backup request")],
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> BackupJob:
61
+ """Create a backup of all WDS data
62
+
63
+
64
+ :param v: API version (required)
65
+ :type v: str
66
+ :param backup_restore_request: A backup request (required)
67
+ :type backup_restore_request: BackupRestoreRequest
53
68
  :param _request_timeout: timeout setting for this request. If one
54
69
  number provided, it will be total request
55
70
  timeout. It can also be a pair (tuple) of
56
71
  (connection, read) timeouts.
57
- :return: BackupJob
58
- If the method is called asynchronously,
59
- returns the request thread.
60
- """
61
- kwargs['_return_http_data_only'] = True
62
- return self.create_backup_with_http_info(v, backup_restore_request, **kwargs) # noqa: E501
63
-
64
- def create_backup_with_http_info(self, v, backup_restore_request, **kwargs): # noqa: E501
65
- """Create a backup of all WDS data # noqa: E501
66
-
67
- This method makes a synchronous HTTP request by default. To make an
68
- asynchronous HTTP request, please pass async_req=True
69
- >>> thread = api.create_backup_with_http_info(v, backup_restore_request, async_req=True)
70
- >>> result = thread.get()
71
-
72
- :param async_req bool: execute request asynchronously
73
- :param str v: API version (required)
74
- :param BackupRestoreRequest backup_restore_request: A backup request (required)
75
- :param _return_http_data_only: response data without head status code
76
- and headers
77
- :param _preload_content: if False, the urllib3.HTTPResponse object will
78
- be returned without reading/decoding response
79
- data. Default is True.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._create_backup_serialize(
91
+ v=v,
92
+ backup_restore_request=backup_restore_request,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "BackupJob",
101
+ }
102
+ response_data = self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ response_data.read()
107
+ return self.api_client.response_deserialize(
108
+ response_data=response_data,
109
+ response_types_map=_response_types_map,
110
+ ).data
111
+
112
+
113
+ @validate_call
114
+ def create_backup_with_http_info(
115
+ self,
116
+ v: Annotated[StrictStr, Field(description="API version")],
117
+ backup_restore_request: Annotated[BackupRestoreRequest, Field(description="A backup request")],
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[BackupJob]:
131
+ """Create a backup of all WDS data
132
+
133
+
134
+ :param v: API version (required)
135
+ :type v: str
136
+ :param backup_restore_request: A backup request (required)
137
+ :type backup_restore_request: BackupRestoreRequest
80
138
  :param _request_timeout: timeout setting for this request. If one
81
139
  number provided, it will be total request
82
140
  timeout. It can also be a pair (tuple) of
83
141
  (connection, read) timeouts.
84
- :return: tuple(BackupJob, status_code(int), headers(HTTPHeaderDict))
85
- If the method is called asynchronously,
86
- returns the request thread.
87
- """
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._create_backup_serialize(
161
+ v=v,
162
+ backup_restore_request=backup_restore_request,
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
+ '200': "BackupJob",
171
+ }
172
+ response_data = self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
88
181
 
89
- local_var_params = locals()
90
182
 
91
- all_params = [
92
- 'v',
93
- 'backup_restore_request'
94
- ]
95
- all_params.extend(
183
+ @validate_call
184
+ def create_backup_without_preload_content(
185
+ self,
186
+ v: Annotated[StrictStr, Field(description="API version")],
187
+ backup_restore_request: Annotated[BackupRestoreRequest, Field(description="A backup request")],
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Annotated[StrictFloat, Field(gt=0)]
194
+ ]
195
+ ] = None,
196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
197
+ _content_type: Optional[StrictStr] = None,
198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
200
+ ) -> RESTResponseType:
201
+ """Create a backup of all WDS data
202
+
203
+
204
+ :param v: API version (required)
205
+ :type v: str
206
+ :param backup_restore_request: A backup request (required)
207
+ :type backup_restore_request: BackupRestoreRequest
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._create_backup_serialize(
231
+ v=v,
232
+ backup_restore_request=backup_restore_request,
233
+ _request_auth=_request_auth,
234
+ _content_type=_content_type,
235
+ _headers=_headers,
236
+ _host_index=_host_index
237
+ )
238
+
239
+ _response_types_map: Dict[str, Optional[str]] = {
240
+ '200': "BackupJob",
241
+ }
242
+ response_data = self.api_client.call_api(
243
+ *_param,
244
+ _request_timeout=_request_timeout
245
+ )
246
+ return response_data.response
247
+
248
+
249
+ def _create_backup_serialize(
250
+ self,
251
+ v,
252
+ backup_restore_request,
253
+ _request_auth,
254
+ _content_type,
255
+ _headers,
256
+ _host_index,
257
+ ) -> RequestSerialized:
258
+
259
+ _host = None
260
+
261
+ _collection_formats: Dict[str, str] = {
262
+ }
263
+
264
+ _path_params: Dict[str, str] = {}
265
+ _query_params: List[Tuple[str, str]] = []
266
+ _header_params: Dict[str, Optional[str]] = _headers or {}
267
+ _form_params: List[Tuple[str, str]] = []
268
+ _files: Dict[str, Union[str, bytes]] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if v is not None:
273
+ _path_params['v'] = v
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+ if backup_restore_request is not None:
279
+ _body_params = backup_restore_request
280
+
281
+
282
+ # set the HTTP header `Accept`
283
+ _header_params['Accept'] = self.api_client.select_header_accept(
96
284
  [
97
- 'async_req',
98
- '_return_http_data_only',
99
- '_preload_content',
100
- '_request_timeout'
285
+ 'application/json'
101
286
  ]
102
287
  )
103
288
 
104
- for key, val in six.iteritems(local_var_params['kwargs']):
105
- if key not in all_params:
106
- raise ApiTypeError(
107
- "Got an unexpected keyword argument '%s'"
108
- " to method create_backup" % key
289
+ # set the HTTP header `Content-Type`
290
+ if _content_type:
291
+ _header_params['Content-Type'] = _content_type
292
+ else:
293
+ _default_content_type = (
294
+ self.api_client.select_header_content_type(
295
+ [
296
+ 'application/json'
297
+ ]
109
298
  )
110
- local_var_params[key] = val
111
- del local_var_params['kwargs']
112
- # verify the required parameter 'v' is set
113
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
114
- local_var_params['v'] is None): # noqa: E501
115
- raise ApiValueError("Missing the required parameter `v` when calling `create_backup`") # noqa: E501
116
- # verify the required parameter 'backup_restore_request' is set
117
- if self.api_client.client_side_validation and ('backup_restore_request' not in local_var_params or # noqa: E501
118
- local_var_params['backup_restore_request'] is None): # noqa: E501
119
- raise ApiValueError("Missing the required parameter `backup_restore_request` when calling `create_backup`") # noqa: E501
120
-
121
- collection_formats = {}
122
-
123
- path_params = {}
124
- if 'v' in local_var_params:
125
- path_params['v'] = local_var_params['v'] # noqa: E501
126
-
127
- query_params = []
128
-
129
- header_params = {}
130
-
131
- form_params = []
132
- local_var_files = {}
133
-
134
- body_params = None
135
- if 'backup_restore_request' in local_var_params:
136
- body_params = local_var_params['backup_restore_request']
137
- # HTTP header `Accept`
138
- header_params['Accept'] = self.api_client.select_header_accept(
139
- ['application/json']) # noqa: E501
140
-
141
- # HTTP header `Content-Type`
142
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
143
- ['application/json']) # noqa: E501
144
-
145
- # Authentication setting
146
- auth_settings = ['bearerAuth'] # noqa: E501
147
-
148
- return self.api_client.call_api(
149
- '/backup/{v}', 'POST',
150
- path_params,
151
- query_params,
152
- header_params,
153
- body=body_params,
154
- post_params=form_params,
155
- files=local_var_files,
156
- response_type='BackupJob', # noqa: E501
157
- auth_settings=auth_settings,
158
- async_req=local_var_params.get('async_req'),
159
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
160
- _preload_content=local_var_params.get('_preload_content', True),
161
- _request_timeout=local_var_params.get('_request_timeout'),
162
- collection_formats=collection_formats)
163
-
164
- def get_backup_status(self, v, tracking_id, **kwargs): # noqa: E501
165
- """Check status of a WDS data backup # noqa: E501
166
-
167
- This method makes a synchronous HTTP request by default. To make an
168
- asynchronous HTTP request, please pass async_req=True
169
- >>> thread = api.get_backup_status(v, tracking_id, async_req=True)
170
- >>> result = thread.get()
171
-
172
- :param async_req bool: execute request asynchronously
173
- :param str v: API version (required)
174
- :param str tracking_id: Backup tracking id (required)
175
- :param _preload_content: if False, the urllib3.HTTPResponse object will
176
- be returned without reading/decoding response
177
- data. Default is True.
299
+ )
300
+ if _default_content_type is not None:
301
+ _header_params['Content-Type'] = _default_content_type
302
+
303
+ # authentication setting
304
+ _auth_settings: List[str] = [
305
+ 'bearerAuth'
306
+ ]
307
+
308
+ return self.api_client.param_serialize(
309
+ method='POST',
310
+ resource_path='/backup/{v}',
311
+ path_params=_path_params,
312
+ query_params=_query_params,
313
+ header_params=_header_params,
314
+ body=_body_params,
315
+ post_params=_form_params,
316
+ files=_files,
317
+ auth_settings=_auth_settings,
318
+ collection_formats=_collection_formats,
319
+ _host=_host,
320
+ _request_auth=_request_auth
321
+ )
322
+
323
+
324
+
325
+
326
+ @validate_call
327
+ def get_backup_status(
328
+ self,
329
+ v: Annotated[StrictStr, Field(description="API version")],
330
+ tracking_id: Annotated[StrictStr, Field(description="Backup tracking id")],
331
+ _request_timeout: Union[
332
+ None,
333
+ Annotated[StrictFloat, Field(gt=0)],
334
+ Tuple[
335
+ Annotated[StrictFloat, Field(gt=0)],
336
+ Annotated[StrictFloat, Field(gt=0)]
337
+ ]
338
+ ] = None,
339
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
340
+ _content_type: Optional[StrictStr] = None,
341
+ _headers: Optional[Dict[StrictStr, Any]] = None,
342
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
343
+ ) -> BackupJob:
344
+ """Check status of a WDS data backup
345
+
346
+
347
+ :param v: API version (required)
348
+ :type v: str
349
+ :param tracking_id: Backup tracking id (required)
350
+ :type tracking_id: str
178
351
  :param _request_timeout: timeout setting for this request. If one
179
352
  number provided, it will be total request
180
353
  timeout. It can also be a pair (tuple) of
181
354
  (connection, read) timeouts.
182
- :return: BackupJob
183
- If the method is called asynchronously,
184
- returns the request thread.
185
- """
186
- kwargs['_return_http_data_only'] = True
187
- return self.get_backup_status_with_http_info(v, tracking_id, **kwargs) # noqa: E501
188
-
189
- def get_backup_status_with_http_info(self, v, tracking_id, **kwargs): # noqa: E501
190
- """Check status of a WDS data backup # noqa: E501
191
-
192
- This method makes a synchronous HTTP request by default. To make an
193
- asynchronous HTTP request, please pass async_req=True
194
- >>> thread = api.get_backup_status_with_http_info(v, tracking_id, async_req=True)
195
- >>> result = thread.get()
196
-
197
- :param async_req bool: execute request asynchronously
198
- :param str v: API version (required)
199
- :param str tracking_id: Backup tracking id (required)
200
- :param _return_http_data_only: response data without head status code
201
- and headers
202
- :param _preload_content: if False, the urllib3.HTTPResponse object will
203
- be returned without reading/decoding response
204
- data. Default is True.
355
+ :type _request_timeout: int, tuple(int, int), optional
356
+ :param _request_auth: set to override the auth_settings for an a single
357
+ request; this effectively ignores the
358
+ authentication in the spec for a single request.
359
+ :type _request_auth: dict, optional
360
+ :param _content_type: force content-type for the request.
361
+ :type _content_type: str, Optional
362
+ :param _headers: set to override the headers for a single
363
+ request; this effectively ignores the headers
364
+ in the spec for a single request.
365
+ :type _headers: dict, optional
366
+ :param _host_index: set to override the host_index for a single
367
+ request; this effectively ignores the host_index
368
+ in the spec for a single request.
369
+ :type _host_index: int, optional
370
+ :return: Returns the result object.
371
+ """ # noqa: E501
372
+
373
+ _param = self._get_backup_status_serialize(
374
+ v=v,
375
+ tracking_id=tracking_id,
376
+ _request_auth=_request_auth,
377
+ _content_type=_content_type,
378
+ _headers=_headers,
379
+ _host_index=_host_index
380
+ )
381
+
382
+ _response_types_map: Dict[str, Optional[str]] = {
383
+ '200': "BackupJob",
384
+ }
385
+ response_data = self.api_client.call_api(
386
+ *_param,
387
+ _request_timeout=_request_timeout
388
+ )
389
+ response_data.read()
390
+ return self.api_client.response_deserialize(
391
+ response_data=response_data,
392
+ response_types_map=_response_types_map,
393
+ ).data
394
+
395
+
396
+ @validate_call
397
+ def get_backup_status_with_http_info(
398
+ self,
399
+ v: Annotated[StrictStr, Field(description="API version")],
400
+ tracking_id: Annotated[StrictStr, Field(description="Backup tracking id")],
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> ApiResponse[BackupJob]:
414
+ """Check status of a WDS data backup
415
+
416
+
417
+ :param v: API version (required)
418
+ :type v: str
419
+ :param tracking_id: Backup tracking id (required)
420
+ :type tracking_id: str
205
421
  :param _request_timeout: timeout setting for this request. If one
206
422
  number provided, it will be total request
207
423
  timeout. It can also be a pair (tuple) of
208
424
  (connection, read) timeouts.
209
- :return: tuple(BackupJob, status_code(int), headers(HTTPHeaderDict))
210
- If the method is called asynchronously,
211
- returns the request thread.
212
- """
425
+ :type _request_timeout: int, tuple(int, int), optional
426
+ :param _request_auth: set to override the auth_settings for an a single
427
+ request; this effectively ignores the
428
+ authentication in the spec for a single request.
429
+ :type _request_auth: dict, optional
430
+ :param _content_type: force content-type for the request.
431
+ :type _content_type: str, Optional
432
+ :param _headers: set to override the headers for a single
433
+ request; this effectively ignores the headers
434
+ in the spec for a single request.
435
+ :type _headers: dict, optional
436
+ :param _host_index: set to override the host_index for a single
437
+ request; this effectively ignores the host_index
438
+ in the spec for a single request.
439
+ :type _host_index: int, optional
440
+ :return: Returns the result object.
441
+ """ # noqa: E501
442
+
443
+ _param = self._get_backup_status_serialize(
444
+ v=v,
445
+ tracking_id=tracking_id,
446
+ _request_auth=_request_auth,
447
+ _content_type=_content_type,
448
+ _headers=_headers,
449
+ _host_index=_host_index
450
+ )
213
451
 
214
- local_var_params = locals()
452
+ _response_types_map: Dict[str, Optional[str]] = {
453
+ '200': "BackupJob",
454
+ }
455
+ response_data = self.api_client.call_api(
456
+ *_param,
457
+ _request_timeout=_request_timeout
458
+ )
459
+ response_data.read()
460
+ return self.api_client.response_deserialize(
461
+ response_data=response_data,
462
+ response_types_map=_response_types_map,
463
+ )
215
464
 
216
- all_params = [
217
- 'v',
218
- 'tracking_id'
219
- ]
220
- all_params.extend(
465
+
466
+ @validate_call
467
+ def get_backup_status_without_preload_content(
468
+ self,
469
+ v: Annotated[StrictStr, Field(description="API version")],
470
+ tracking_id: Annotated[StrictStr, Field(description="Backup tracking id")],
471
+ _request_timeout: Union[
472
+ None,
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Tuple[
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Annotated[StrictFloat, Field(gt=0)]
477
+ ]
478
+ ] = None,
479
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
480
+ _content_type: Optional[StrictStr] = None,
481
+ _headers: Optional[Dict[StrictStr, Any]] = None,
482
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
483
+ ) -> RESTResponseType:
484
+ """Check status of a WDS data backup
485
+
486
+
487
+ :param v: API version (required)
488
+ :type v: str
489
+ :param tracking_id: Backup tracking id (required)
490
+ :type tracking_id: str
491
+ :param _request_timeout: timeout setting for this request. If one
492
+ number provided, it will be total request
493
+ timeout. It can also be a pair (tuple) of
494
+ (connection, read) timeouts.
495
+ :type _request_timeout: int, tuple(int, int), optional
496
+ :param _request_auth: set to override the auth_settings for an a single
497
+ request; this effectively ignores the
498
+ authentication in the spec for a single request.
499
+ :type _request_auth: dict, optional
500
+ :param _content_type: force content-type for the request.
501
+ :type _content_type: str, Optional
502
+ :param _headers: set to override the headers for a single
503
+ request; this effectively ignores the headers
504
+ in the spec for a single request.
505
+ :type _headers: dict, optional
506
+ :param _host_index: set to override the host_index for a single
507
+ request; this effectively ignores the host_index
508
+ in the spec for a single request.
509
+ :type _host_index: int, optional
510
+ :return: Returns the result object.
511
+ """ # noqa: E501
512
+
513
+ _param = self._get_backup_status_serialize(
514
+ v=v,
515
+ tracking_id=tracking_id,
516
+ _request_auth=_request_auth,
517
+ _content_type=_content_type,
518
+ _headers=_headers,
519
+ _host_index=_host_index
520
+ )
521
+
522
+ _response_types_map: Dict[str, Optional[str]] = {
523
+ '200': "BackupJob",
524
+ }
525
+ response_data = self.api_client.call_api(
526
+ *_param,
527
+ _request_timeout=_request_timeout
528
+ )
529
+ return response_data.response
530
+
531
+
532
+ def _get_backup_status_serialize(
533
+ self,
534
+ v,
535
+ tracking_id,
536
+ _request_auth,
537
+ _content_type,
538
+ _headers,
539
+ _host_index,
540
+ ) -> RequestSerialized:
541
+
542
+ _host = None
543
+
544
+ _collection_formats: Dict[str, str] = {
545
+ }
546
+
547
+ _path_params: Dict[str, str] = {}
548
+ _query_params: List[Tuple[str, str]] = []
549
+ _header_params: Dict[str, Optional[str]] = _headers or {}
550
+ _form_params: List[Tuple[str, str]] = []
551
+ _files: Dict[str, Union[str, bytes]] = {}
552
+ _body_params: Optional[bytes] = None
553
+
554
+ # process the path parameters
555
+ if v is not None:
556
+ _path_params['v'] = v
557
+ if tracking_id is not None:
558
+ _path_params['trackingId'] = tracking_id
559
+ # process the query parameters
560
+ # process the header parameters
561
+ # process the form parameters
562
+ # process the body parameter
563
+
564
+
565
+ # set the HTTP header `Accept`
566
+ _header_params['Accept'] = self.api_client.select_header_accept(
221
567
  [
222
- 'async_req',
223
- '_return_http_data_only',
224
- '_preload_content',
225
- '_request_timeout'
568
+ 'application/json'
226
569
  ]
227
570
  )
228
571
 
229
- for key, val in six.iteritems(local_var_params['kwargs']):
230
- if key not in all_params:
231
- raise ApiTypeError(
232
- "Got an unexpected keyword argument '%s'"
233
- " to method get_backup_status" % key
234
- )
235
- local_var_params[key] = val
236
- del local_var_params['kwargs']
237
- # verify the required parameter 'v' is set
238
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
239
- local_var_params['v'] is None): # noqa: E501
240
- raise ApiValueError("Missing the required parameter `v` when calling `get_backup_status`") # noqa: E501
241
- # verify the required parameter 'tracking_id' is set
242
- if self.api_client.client_side_validation and ('tracking_id' not in local_var_params or # noqa: E501
243
- local_var_params['tracking_id'] is None): # noqa: E501
244
- raise ApiValueError("Missing the required parameter `tracking_id` when calling `get_backup_status`") # noqa: E501
245
-
246
- collection_formats = {}
247
-
248
- path_params = {}
249
- if 'v' in local_var_params:
250
- path_params['v'] = local_var_params['v'] # noqa: E501
251
- if 'tracking_id' in local_var_params:
252
- path_params['trackingId'] = local_var_params['tracking_id'] # noqa: E501
253
-
254
- query_params = []
255
-
256
- header_params = {}
257
-
258
- form_params = []
259
- local_var_files = {}
260
-
261
- body_params = None
262
- # HTTP header `Accept`
263
- header_params['Accept'] = self.api_client.select_header_accept(
264
- ['application/json']) # noqa: E501
265
-
266
- # Authentication setting
267
- auth_settings = ['bearerAuth'] # noqa: E501
268
-
269
- return self.api_client.call_api(
270
- '/backup/{v}/{trackingId}', 'GET',
271
- path_params,
272
- query_params,
273
- header_params,
274
- body=body_params,
275
- post_params=form_params,
276
- files=local_var_files,
277
- response_type='BackupJob', # noqa: E501
278
- auth_settings=auth_settings,
279
- async_req=local_var_params.get('async_req'),
280
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
281
- _preload_content=local_var_params.get('_preload_content', True),
282
- _request_timeout=local_var_params.get('_request_timeout'),
283
- collection_formats=collection_formats)
284
-
285
- def get_clone_status(self, v, **kwargs): # noqa: E501
286
- """Check status of a WDS data clone # noqa: E501
287
-
288
- This method makes a synchronous HTTP request by default. To make an
289
- asynchronous HTTP request, please pass async_req=True
290
- >>> thread = api.get_clone_status(v, async_req=True)
291
- >>> result = thread.get()
292
-
293
- :param async_req bool: execute request asynchronously
294
- :param str v: API version (required)
295
- :param _preload_content: if False, the urllib3.HTTPResponse object will
296
- be returned without reading/decoding response
297
- data. Default is True.
572
+
573
+ # authentication setting
574
+ _auth_settings: List[str] = [
575
+ 'bearerAuth'
576
+ ]
577
+
578
+ return self.api_client.param_serialize(
579
+ method='GET',
580
+ resource_path='/backup/{v}/{trackingId}',
581
+ path_params=_path_params,
582
+ query_params=_query_params,
583
+ header_params=_header_params,
584
+ body=_body_params,
585
+ post_params=_form_params,
586
+ files=_files,
587
+ auth_settings=_auth_settings,
588
+ collection_formats=_collection_formats,
589
+ _host=_host,
590
+ _request_auth=_request_auth
591
+ )
592
+
593
+
594
+
595
+
596
+ @validate_call
597
+ def get_clone_status(
598
+ self,
599
+ v: Annotated[StrictStr, Field(description="API version")],
600
+ _request_timeout: Union[
601
+ None,
602
+ Annotated[StrictFloat, Field(gt=0)],
603
+ Tuple[
604
+ Annotated[StrictFloat, Field(gt=0)],
605
+ Annotated[StrictFloat, Field(gt=0)]
606
+ ]
607
+ ] = None,
608
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
609
+ _content_type: Optional[StrictStr] = None,
610
+ _headers: Optional[Dict[StrictStr, Any]] = None,
611
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
612
+ ) -> CloneJob:
613
+ """Check status of a WDS data clone
614
+
615
+
616
+ :param v: API version (required)
617
+ :type v: str
298
618
  :param _request_timeout: timeout setting for this request. If one
299
619
  number provided, it will be total request
300
620
  timeout. It can also be a pair (tuple) of
301
621
  (connection, read) timeouts.
302
- :return: CloneJob
303
- If the method is called asynchronously,
304
- returns the request thread.
305
- """
306
- kwargs['_return_http_data_only'] = True
307
- return self.get_clone_status_with_http_info(v, **kwargs) # noqa: E501
308
-
309
- def get_clone_status_with_http_info(self, v, **kwargs): # noqa: E501
310
- """Check status of a WDS data clone # noqa: E501
311
-
312
- This method makes a synchronous HTTP request by default. To make an
313
- asynchronous HTTP request, please pass async_req=True
314
- >>> thread = api.get_clone_status_with_http_info(v, async_req=True)
315
- >>> result = thread.get()
316
-
317
- :param async_req bool: execute request asynchronously
318
- :param str v: API version (required)
319
- :param _return_http_data_only: response data without head status code
320
- and headers
321
- :param _preload_content: if False, the urllib3.HTTPResponse object will
322
- be returned without reading/decoding response
323
- data. Default is True.
622
+ :type _request_timeout: int, tuple(int, int), optional
623
+ :param _request_auth: set to override the auth_settings for an a single
624
+ request; this effectively ignores the
625
+ authentication in the spec for a single request.
626
+ :type _request_auth: dict, optional
627
+ :param _content_type: force content-type for the request.
628
+ :type _content_type: str, Optional
629
+ :param _headers: set to override the headers for a single
630
+ request; this effectively ignores the headers
631
+ in the spec for a single request.
632
+ :type _headers: dict, optional
633
+ :param _host_index: set to override the host_index for a single
634
+ request; this effectively ignores the host_index
635
+ in the spec for a single request.
636
+ :type _host_index: int, optional
637
+ :return: Returns the result object.
638
+ """ # noqa: E501
639
+
640
+ _param = self._get_clone_status_serialize(
641
+ v=v,
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
+ '200': "CloneJob",
650
+ }
651
+ response_data = self.api_client.call_api(
652
+ *_param,
653
+ _request_timeout=_request_timeout
654
+ )
655
+ response_data.read()
656
+ return self.api_client.response_deserialize(
657
+ response_data=response_data,
658
+ response_types_map=_response_types_map,
659
+ ).data
660
+
661
+
662
+ @validate_call
663
+ def get_clone_status_with_http_info(
664
+ self,
665
+ v: Annotated[StrictStr, Field(description="API version")],
666
+ _request_timeout: Union[
667
+ None,
668
+ Annotated[StrictFloat, Field(gt=0)],
669
+ Tuple[
670
+ Annotated[StrictFloat, Field(gt=0)],
671
+ Annotated[StrictFloat, Field(gt=0)]
672
+ ]
673
+ ] = None,
674
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
675
+ _content_type: Optional[StrictStr] = None,
676
+ _headers: Optional[Dict[StrictStr, Any]] = None,
677
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
678
+ ) -> ApiResponse[CloneJob]:
679
+ """Check status of a WDS data clone
680
+
681
+
682
+ :param v: API version (required)
683
+ :type v: str
324
684
  :param _request_timeout: timeout setting for this request. If one
325
685
  number provided, it will be total request
326
686
  timeout. It can also be a pair (tuple) of
327
687
  (connection, read) timeouts.
328
- :return: tuple(CloneJob, status_code(int), headers(HTTPHeaderDict))
329
- If the method is called asynchronously,
330
- returns the request thread.
331
- """
688
+ :type _request_timeout: int, tuple(int, int), optional
689
+ :param _request_auth: set to override the auth_settings for an a single
690
+ request; this effectively ignores the
691
+ authentication in the spec for a single request.
692
+ :type _request_auth: dict, optional
693
+ :param _content_type: force content-type for the request.
694
+ :type _content_type: str, Optional
695
+ :param _headers: set to override the headers for a single
696
+ request; this effectively ignores the headers
697
+ in the spec for a single request.
698
+ :type _headers: dict, optional
699
+ :param _host_index: set to override the host_index for a single
700
+ request; this effectively ignores the host_index
701
+ in the spec for a single request.
702
+ :type _host_index: int, optional
703
+ :return: Returns the result object.
704
+ """ # noqa: E501
705
+
706
+ _param = self._get_clone_status_serialize(
707
+ v=v,
708
+ _request_auth=_request_auth,
709
+ _content_type=_content_type,
710
+ _headers=_headers,
711
+ _host_index=_host_index
712
+ )
713
+
714
+ _response_types_map: Dict[str, Optional[str]] = {
715
+ '200': "CloneJob",
716
+ }
717
+ response_data = self.api_client.call_api(
718
+ *_param,
719
+ _request_timeout=_request_timeout
720
+ )
721
+ response_data.read()
722
+ return self.api_client.response_deserialize(
723
+ response_data=response_data,
724
+ response_types_map=_response_types_map,
725
+ )
332
726
 
333
- local_var_params = locals()
334
727
 
335
- all_params = [
336
- 'v'
337
- ]
338
- all_params.extend(
728
+ @validate_call
729
+ def get_clone_status_without_preload_content(
730
+ self,
731
+ v: Annotated[StrictStr, Field(description="API version")],
732
+ _request_timeout: Union[
733
+ None,
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Tuple[
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Annotated[StrictFloat, Field(gt=0)]
738
+ ]
739
+ ] = None,
740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
741
+ _content_type: Optional[StrictStr] = None,
742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
+ ) -> RESTResponseType:
745
+ """Check status of a WDS data clone
746
+
747
+
748
+ :param v: API version (required)
749
+ :type v: str
750
+ :param _request_timeout: timeout setting for this request. If one
751
+ number provided, it will be total request
752
+ timeout. It can also be a pair (tuple) of
753
+ (connection, read) timeouts.
754
+ :type _request_timeout: int, tuple(int, int), optional
755
+ :param _request_auth: set to override the auth_settings for an a single
756
+ request; this effectively ignores the
757
+ authentication in the spec for a single request.
758
+ :type _request_auth: dict, optional
759
+ :param _content_type: force content-type for the request.
760
+ :type _content_type: str, Optional
761
+ :param _headers: set to override the headers for a single
762
+ request; this effectively ignores the headers
763
+ in the spec for a single request.
764
+ :type _headers: dict, optional
765
+ :param _host_index: set to override the host_index for a single
766
+ request; this effectively ignores the host_index
767
+ in the spec for a single request.
768
+ :type _host_index: int, optional
769
+ :return: Returns the result object.
770
+ """ # noqa: E501
771
+
772
+ _param = self._get_clone_status_serialize(
773
+ v=v,
774
+ _request_auth=_request_auth,
775
+ _content_type=_content_type,
776
+ _headers=_headers,
777
+ _host_index=_host_index
778
+ )
779
+
780
+ _response_types_map: Dict[str, Optional[str]] = {
781
+ '200': "CloneJob",
782
+ }
783
+ response_data = self.api_client.call_api(
784
+ *_param,
785
+ _request_timeout=_request_timeout
786
+ )
787
+ return response_data.response
788
+
789
+
790
+ def _get_clone_status_serialize(
791
+ self,
792
+ v,
793
+ _request_auth,
794
+ _content_type,
795
+ _headers,
796
+ _host_index,
797
+ ) -> RequestSerialized:
798
+
799
+ _host = None
800
+
801
+ _collection_formats: Dict[str, str] = {
802
+ }
803
+
804
+ _path_params: Dict[str, str] = {}
805
+ _query_params: List[Tuple[str, str]] = []
806
+ _header_params: Dict[str, Optional[str]] = _headers or {}
807
+ _form_params: List[Tuple[str, str]] = []
808
+ _files: Dict[str, Union[str, bytes]] = {}
809
+ _body_params: Optional[bytes] = None
810
+
811
+ # process the path parameters
812
+ if v is not None:
813
+ _path_params['v'] = v
814
+ # process the query parameters
815
+ # process the header parameters
816
+ # process the form parameters
817
+ # process the body parameter
818
+
819
+
820
+ # set the HTTP header `Accept`
821
+ _header_params['Accept'] = self.api_client.select_header_accept(
339
822
  [
340
- 'async_req',
341
- '_return_http_data_only',
342
- '_preload_content',
343
- '_request_timeout'
823
+ 'application/json'
344
824
  ]
345
825
  )
346
826
 
347
- for key, val in six.iteritems(local_var_params['kwargs']):
348
- if key not in all_params:
349
- raise ApiTypeError(
350
- "Got an unexpected keyword argument '%s'"
351
- " to method get_clone_status" % key
352
- )
353
- local_var_params[key] = val
354
- del local_var_params['kwargs']
355
- # verify the required parameter 'v' is set
356
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
357
- local_var_params['v'] is None): # noqa: E501
358
- raise ApiValueError("Missing the required parameter `v` when calling `get_clone_status`") # noqa: E501
359
-
360
- collection_formats = {}
361
-
362
- path_params = {}
363
- if 'v' in local_var_params:
364
- path_params['v'] = local_var_params['v'] # noqa: E501
365
-
366
- query_params = []
367
-
368
- header_params = {}
369
-
370
- form_params = []
371
- local_var_files = {}
372
-
373
- body_params = None
374
- # HTTP header `Accept`
375
- header_params['Accept'] = self.api_client.select_header_accept(
376
- ['application/json']) # noqa: E501
377
-
378
- # Authentication setting
379
- auth_settings = ['bearerAuth'] # noqa: E501
380
-
381
- return self.api_client.call_api(
382
- '/clone/{v}', 'GET',
383
- path_params,
384
- query_params,
385
- header_params,
386
- body=body_params,
387
- post_params=form_params,
388
- files=local_var_files,
389
- response_type='CloneJob', # noqa: E501
390
- auth_settings=auth_settings,
391
- async_req=local_var_params.get('async_req'),
392
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
393
- _preload_content=local_var_params.get('_preload_content', True),
394
- _request_timeout=local_var_params.get('_request_timeout'),
395
- collection_formats=collection_formats)
827
+
828
+ # authentication setting
829
+ _auth_settings: List[str] = [
830
+ 'bearerAuth'
831
+ ]
832
+
833
+ return self.api_client.param_serialize(
834
+ method='GET',
835
+ resource_path='/clone/{v}',
836
+ path_params=_path_params,
837
+ query_params=_query_params,
838
+ header_params=_header_params,
839
+ body=_body_params,
840
+ post_params=_form_params,
841
+ files=_files,
842
+ auth_settings=_auth_settings,
843
+ collection_formats=_collection_formats,
844
+ _host=_host,
845
+ _request_auth=_request_auth
846
+ )
847
+
848
+