wds-client 0.7.0__py3-none-any.whl → 0.8.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.8.0.dist-info/METADATA +17 -0
- wds_client-0.8.0.dist-info/RECORD +52 -0
- 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.8.0.dist-info}/WHEEL +0 -0
- {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
wds_client/api/import_api.py
CHANGED
@@ -3,162 +3,323 @@
|
|
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
|
20
|
+
from typing_extensions import Annotated
|
21
|
+
from wds_client.models.generic_job import GenericJob
|
22
|
+
from wds_client.models.import_request import ImportRequest
|
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 ImportApi
|
29
|
+
class ImportApi:
|
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
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
41
|
+
|
42
|
+
@validate_call
|
43
|
+
def import_v1(
|
44
|
+
self,
|
45
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
46
|
+
import_request: Annotated[ImportRequest, Field(description="A request to import records from a file")],
|
47
|
+
_request_timeout: Union[
|
48
|
+
None,
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
50
|
+
Tuple[
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
53
|
+
]
|
54
|
+
] = None,
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
59
|
+
) -> GenericJob:
|
60
|
+
"""Import from a file
|
61
|
+
|
62
|
+
Imports records from the specified URL.
|
63
|
+
|
64
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
65
|
+
:type instance_uuid: str
|
66
|
+
:param import_request: A request to import records from a file (required)
|
67
|
+
:type import_request: ImportRequest
|
54
68
|
:param _request_timeout: timeout setting for this request. If one
|
55
69
|
number provided, it will be total request
|
56
70
|
timeout. It can also be a pair (tuple) of
|
57
71
|
(connection, read) timeouts.
|
58
|
-
:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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._import_v1_serialize(
|
91
|
+
instance_uuid=instance_uuid,
|
92
|
+
import_request=import_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
|
+
'202': "GenericJob",
|
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 import_v1_with_http_info(
|
115
|
+
self,
|
116
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
117
|
+
import_request: Annotated[ImportRequest, Field(description="A request to import records from a file")],
|
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[GenericJob]:
|
131
|
+
"""Import from a file
|
132
|
+
|
133
|
+
Imports records from the specified URL.
|
134
|
+
|
135
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
136
|
+
:type instance_uuid: str
|
137
|
+
:param import_request: A request to import records from a file (required)
|
138
|
+
:type import_request: ImportRequest
|
82
139
|
:param _request_timeout: timeout setting for this request. If one
|
83
140
|
number provided, it will be total request
|
84
141
|
timeout. It can also be a pair (tuple) of
|
85
142
|
(connection, read) timeouts.
|
86
|
-
:
|
87
|
-
|
88
|
-
|
89
|
-
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
145
|
+
request; this effectively ignores the
|
146
|
+
authentication in the spec for a single request.
|
147
|
+
:type _request_auth: dict, optional
|
148
|
+
:param _content_type: force content-type for the request.
|
149
|
+
:type _content_type: str, Optional
|
150
|
+
:param _headers: set to override the headers for a single
|
151
|
+
request; this effectively ignores the headers
|
152
|
+
in the spec for a single request.
|
153
|
+
:type _headers: dict, optional
|
154
|
+
:param _host_index: set to override the host_index for a single
|
155
|
+
request; this effectively ignores the host_index
|
156
|
+
in the spec for a single request.
|
157
|
+
:type _host_index: int, optional
|
158
|
+
:return: Returns the result object.
|
159
|
+
""" # noqa: E501
|
90
160
|
|
91
|
-
|
161
|
+
_param = self._import_v1_serialize(
|
162
|
+
instance_uuid=instance_uuid,
|
163
|
+
import_request=import_request,
|
164
|
+
_request_auth=_request_auth,
|
165
|
+
_content_type=_content_type,
|
166
|
+
_headers=_headers,
|
167
|
+
_host_index=_host_index
|
168
|
+
)
|
92
169
|
|
93
|
-
|
94
|
-
'
|
95
|
-
|
96
|
-
|
97
|
-
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
171
|
+
'202': "GenericJob",
|
172
|
+
}
|
173
|
+
response_data = self.api_client.call_api(
|
174
|
+
*_param,
|
175
|
+
_request_timeout=_request_timeout
|
176
|
+
)
|
177
|
+
response_data.read()
|
178
|
+
return self.api_client.response_deserialize(
|
179
|
+
response_data=response_data,
|
180
|
+
response_types_map=_response_types_map,
|
181
|
+
)
|
182
|
+
|
183
|
+
|
184
|
+
@validate_call
|
185
|
+
def import_v1_without_preload_content(
|
186
|
+
self,
|
187
|
+
instance_uuid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
|
188
|
+
import_request: Annotated[ImportRequest, Field(description="A request to import records from a file")],
|
189
|
+
_request_timeout: Union[
|
190
|
+
None,
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
192
|
+
Tuple[
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
195
|
+
]
|
196
|
+
] = None,
|
197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
198
|
+
_content_type: Optional[StrictStr] = None,
|
199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
201
|
+
) -> RESTResponseType:
|
202
|
+
"""Import from a file
|
203
|
+
|
204
|
+
Imports records from the specified URL.
|
205
|
+
|
206
|
+
:param instance_uuid: WDS instance id; by convention equal to workspace id (required)
|
207
|
+
:type instance_uuid: str
|
208
|
+
:param import_request: A request to import records from a file (required)
|
209
|
+
:type import_request: ImportRequest
|
210
|
+
:param _request_timeout: timeout setting for this request. If one
|
211
|
+
number provided, it will be total request
|
212
|
+
timeout. It can also be a pair (tuple) of
|
213
|
+
(connection, read) timeouts.
|
214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
216
|
+
request; this effectively ignores the
|
217
|
+
authentication in the spec for a single request.
|
218
|
+
:type _request_auth: dict, optional
|
219
|
+
:param _content_type: force content-type for the request.
|
220
|
+
:type _content_type: str, Optional
|
221
|
+
:param _headers: set to override the headers for a single
|
222
|
+
request; this effectively ignores the headers
|
223
|
+
in the spec for a single request.
|
224
|
+
:type _headers: dict, optional
|
225
|
+
:param _host_index: set to override the host_index for a single
|
226
|
+
request; this effectively ignores the host_index
|
227
|
+
in the spec for a single request.
|
228
|
+
:type _host_index: int, optional
|
229
|
+
:return: Returns the result object.
|
230
|
+
""" # noqa: E501
|
231
|
+
|
232
|
+
_param = self._import_v1_serialize(
|
233
|
+
instance_uuid=instance_uuid,
|
234
|
+
import_request=import_request,
|
235
|
+
_request_auth=_request_auth,
|
236
|
+
_content_type=_content_type,
|
237
|
+
_headers=_headers,
|
238
|
+
_host_index=_host_index
|
239
|
+
)
|
240
|
+
|
241
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
242
|
+
'202': "GenericJob",
|
243
|
+
}
|
244
|
+
response_data = self.api_client.call_api(
|
245
|
+
*_param,
|
246
|
+
_request_timeout=_request_timeout
|
247
|
+
)
|
248
|
+
return response_data.response
|
249
|
+
|
250
|
+
|
251
|
+
def _import_v1_serialize(
|
252
|
+
self,
|
253
|
+
instance_uuid,
|
254
|
+
import_request,
|
255
|
+
_request_auth,
|
256
|
+
_content_type,
|
257
|
+
_headers,
|
258
|
+
_host_index,
|
259
|
+
) -> RequestSerialized:
|
260
|
+
|
261
|
+
_host = None
|
262
|
+
|
263
|
+
_collection_formats: Dict[str, str] = {
|
264
|
+
}
|
265
|
+
|
266
|
+
_path_params: Dict[str, str] = {}
|
267
|
+
_query_params: List[Tuple[str, str]] = []
|
268
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
269
|
+
_form_params: List[Tuple[str, str]] = []
|
270
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
271
|
+
_body_params: Optional[bytes] = None
|
272
|
+
|
273
|
+
# process the path parameters
|
274
|
+
if instance_uuid is not None:
|
275
|
+
_path_params['instanceUuid'] = instance_uuid
|
276
|
+
# process the query parameters
|
277
|
+
# process the header parameters
|
278
|
+
# process the form parameters
|
279
|
+
# process the body parameter
|
280
|
+
if import_request is not None:
|
281
|
+
_body_params = import_request
|
282
|
+
|
283
|
+
|
284
|
+
# set the HTTP header `Accept`
|
285
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
98
286
|
[
|
99
|
-
'
|
100
|
-
'_return_http_data_only',
|
101
|
-
'_preload_content',
|
102
|
-
'_request_timeout'
|
287
|
+
'application/json'
|
103
288
|
]
|
104
289
|
)
|
105
290
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
291
|
+
# set the HTTP header `Content-Type`
|
292
|
+
if _content_type:
|
293
|
+
_header_params['Content-Type'] = _content_type
|
294
|
+
else:
|
295
|
+
_default_content_type = (
|
296
|
+
self.api_client.select_header_content_type(
|
297
|
+
[
|
298
|
+
'application/json'
|
299
|
+
]
|
111
300
|
)
|
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
|
-
if 'import_request' in local_var_params:
|
138
|
-
body_params = local_var_params['import_request']
|
139
|
-
# HTTP header `Accept`
|
140
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
141
|
-
['application/json']) # noqa: E501
|
142
|
-
|
143
|
-
# HTTP header `Content-Type`
|
144
|
-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
145
|
-
['application/json']) # noqa: E501
|
146
|
-
|
147
|
-
# Authentication setting
|
148
|
-
auth_settings = ['bearerAuth'] # noqa: E501
|
149
|
-
|
150
|
-
return self.api_client.call_api(
|
151
|
-
'/{instanceUuid}/import/v1', 'POST',
|
152
|
-
path_params,
|
153
|
-
query_params,
|
154
|
-
header_params,
|
155
|
-
body=body_params,
|
156
|
-
post_params=form_params,
|
157
|
-
files=local_var_files,
|
158
|
-
response_type='GenericJob', # noqa: E501
|
159
|
-
auth_settings=auth_settings,
|
160
|
-
async_req=local_var_params.get('async_req'),
|
161
|
-
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
162
|
-
_preload_content=local_var_params.get('_preload_content', True),
|
163
|
-
_request_timeout=local_var_params.get('_request_timeout'),
|
164
|
-
collection_formats=collection_formats)
|
301
|
+
)
|
302
|
+
if _default_content_type is not None:
|
303
|
+
_header_params['Content-Type'] = _default_content_type
|
304
|
+
|
305
|
+
# authentication setting
|
306
|
+
_auth_settings: List[str] = [
|
307
|
+
'bearerAuth'
|
308
|
+
]
|
309
|
+
|
310
|
+
return self.api_client.param_serialize(
|
311
|
+
method='POST',
|
312
|
+
resource_path='/{instanceUuid}/import/v1',
|
313
|
+
path_params=_path_params,
|
314
|
+
query_params=_query_params,
|
315
|
+
header_params=_header_params,
|
316
|
+
body=_body_params,
|
317
|
+
post_params=_form_params,
|
318
|
+
files=_files,
|
319
|
+
auth_settings=_auth_settings,
|
320
|
+
collection_formats=_collection_formats,
|
321
|
+
_host=_host,
|
322
|
+
_request_auth=_request_auth
|
323
|
+
)
|
324
|
+
|
325
|
+
|