wds-client 0.20.0__py3-none-any.whl → 0.21.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- wds_client/__init__.py +4 -1
- wds_client/api/__init__.py +1 -0
- wds_client/api/record_api.py +341 -0
- wds_client/api_client.py +1 -1
- wds_client/configuration.py +1 -1
- wds_client/models/__init__.py +2 -0
- wds_client/models/delete_records_request.py +91 -0
- wds_client/models/delete_records_response.py +87 -0
- {wds_client-0.20.0.dist-info → wds_client-0.21.0.dist-info}/METADATA +1 -1
- {wds_client-0.20.0.dist-info → wds_client-0.21.0.dist-info}/RECORD +12 -9
- {wds_client-0.20.0.dist-info → wds_client-0.21.0.dist-info}/WHEEL +1 -1
- {wds_client-0.20.0.dist-info → wds_client-0.21.0.dist-info}/top_level.txt +0 -0
wds_client/__init__.py
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
""" # noqa: E501
|
15
15
|
|
16
16
|
|
17
|
-
__version__ = "0.
|
17
|
+
__version__ = "0.21.0"
|
18
18
|
|
19
19
|
# import apis into sdk package
|
20
20
|
from wds_client.api.capabilities_api import CapabilitiesApi
|
@@ -23,6 +23,7 @@ from wds_client.api.collection_api import CollectionApi
|
|
23
23
|
from wds_client.api.general_wds_information_api import GeneralWDSInformationApi
|
24
24
|
from wds_client.api.import_api import ImportApi
|
25
25
|
from wds_client.api.job_api import JobApi
|
26
|
+
from wds_client.api.record_api import RecordApi
|
26
27
|
from wds_client.api.records_api import RecordsApi
|
27
28
|
from wds_client.api.schema_api import SchemaApi
|
28
29
|
from wds_client.api.workspace_api import WorkspaceApi
|
@@ -56,6 +57,8 @@ from wds_client.models.clone_response import CloneResponse
|
|
56
57
|
from wds_client.models.collection import Collection
|
57
58
|
from wds_client.models.collection_request import CollectionRequest
|
58
59
|
from wds_client.models.commit import Commit
|
60
|
+
from wds_client.models.delete_records_request import DeleteRecordsRequest
|
61
|
+
from wds_client.models.delete_records_response import DeleteRecordsResponse
|
59
62
|
from wds_client.models.error_response import ErrorResponse
|
60
63
|
from wds_client.models.generic_job import GenericJob
|
61
64
|
from wds_client.models.git import Git
|
wds_client/api/__init__.py
CHANGED
@@ -7,6 +7,7 @@ from wds_client.api.collection_api import CollectionApi
|
|
7
7
|
from wds_client.api.general_wds_information_api import GeneralWDSInformationApi
|
8
8
|
from wds_client.api.import_api import ImportApi
|
9
9
|
from wds_client.api.job_api import JobApi
|
10
|
+
from wds_client.api.record_api import RecordApi
|
10
11
|
from wds_client.api.records_api import RecordsApi
|
11
12
|
from wds_client.api.schema_api import SchemaApi
|
12
13
|
from wds_client.api.workspace_api import WorkspaceApi
|
@@ -0,0 +1,341 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Workspace Data Service
|
5
|
+
|
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
|
+
|
8
|
+
The version of the OpenAPI document: v0.2
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from pydantic import Field, StrictStr
|
20
|
+
from typing_extensions import Annotated
|
21
|
+
from wds_client.models.delete_records_request import DeleteRecordsRequest
|
22
|
+
from wds_client.models.delete_records_response import DeleteRecordsResponse
|
23
|
+
|
24
|
+
from wds_client.api_client import ApiClient, RequestSerialized
|
25
|
+
from wds_client.api_response import ApiResponse
|
26
|
+
from wds_client.rest import RESTResponseType
|
27
|
+
|
28
|
+
|
29
|
+
class RecordApi:
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
31
|
+
Ref: https://openapi-generator.tech
|
32
|
+
|
33
|
+
Do not edit the class manually.
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __init__(self, api_client=None) -> None:
|
37
|
+
if api_client is None:
|
38
|
+
api_client = ApiClient.get_default()
|
39
|
+
self.api_client = api_client
|
40
|
+
|
41
|
+
|
42
|
+
@validate_call
|
43
|
+
def delete_records(
|
44
|
+
self,
|
45
|
+
collection_id: Annotated[StrictStr, Field(description="Collection id")],
|
46
|
+
type: Annotated[StrictStr, Field(description="Record type")],
|
47
|
+
delete_records_request: Annotated[DeleteRecordsRequest, Field(description="Record deletion specification")],
|
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
|
+
) -> DeleteRecordsResponse:
|
61
|
+
"""Bulk delete records
|
62
|
+
|
63
|
+
Deletes records by record ID, using collection ID.
|
64
|
+
|
65
|
+
:param collection_id: Collection id (required)
|
66
|
+
:type collection_id: str
|
67
|
+
:param type: Record type (required)
|
68
|
+
:type type: str
|
69
|
+
:param delete_records_request: Record deletion specification (required)
|
70
|
+
:type delete_records_request: DeleteRecordsRequest
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
72
|
+
number provided, it will be total request
|
73
|
+
timeout. It can also be a pair (tuple) of
|
74
|
+
(connection, read) timeouts.
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
77
|
+
request; this effectively ignores the
|
78
|
+
authentication in the spec for a single request.
|
79
|
+
:type _request_auth: dict, optional
|
80
|
+
:param _content_type: force content-type for the request.
|
81
|
+
:type _content_type: str, Optional
|
82
|
+
:param _headers: set to override the headers for a single
|
83
|
+
request; this effectively ignores the headers
|
84
|
+
in the spec for a single request.
|
85
|
+
:type _headers: dict, optional
|
86
|
+
:param _host_index: set to override the host_index for a single
|
87
|
+
request; this effectively ignores the host_index
|
88
|
+
in the spec for a single request.
|
89
|
+
:type _host_index: int, optional
|
90
|
+
:return: Returns the result object.
|
91
|
+
""" # noqa: E501
|
92
|
+
|
93
|
+
_param = self._delete_records_serialize(
|
94
|
+
collection_id=collection_id,
|
95
|
+
type=type,
|
96
|
+
delete_records_request=delete_records_request,
|
97
|
+
_request_auth=_request_auth,
|
98
|
+
_content_type=_content_type,
|
99
|
+
_headers=_headers,
|
100
|
+
_host_index=_host_index
|
101
|
+
)
|
102
|
+
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
104
|
+
'200': "DeleteRecordsResponse",
|
105
|
+
}
|
106
|
+
response_data = self.api_client.call_api(
|
107
|
+
*_param,
|
108
|
+
_request_timeout=_request_timeout
|
109
|
+
)
|
110
|
+
response_data.read()
|
111
|
+
return self.api_client.response_deserialize(
|
112
|
+
response_data=response_data,
|
113
|
+
response_types_map=_response_types_map,
|
114
|
+
).data
|
115
|
+
|
116
|
+
|
117
|
+
@validate_call
|
118
|
+
def delete_records_with_http_info(
|
119
|
+
self,
|
120
|
+
collection_id: Annotated[StrictStr, Field(description="Collection id")],
|
121
|
+
type: Annotated[StrictStr, Field(description="Record type")],
|
122
|
+
delete_records_request: Annotated[DeleteRecordsRequest, Field(description="Record deletion specification")],
|
123
|
+
_request_timeout: Union[
|
124
|
+
None,
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
126
|
+
Tuple[
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
129
|
+
]
|
130
|
+
] = None,
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
135
|
+
) -> ApiResponse[DeleteRecordsResponse]:
|
136
|
+
"""Bulk delete records
|
137
|
+
|
138
|
+
Deletes records by record ID, using collection ID.
|
139
|
+
|
140
|
+
:param collection_id: Collection id (required)
|
141
|
+
:type collection_id: str
|
142
|
+
:param type: Record type (required)
|
143
|
+
:type type: str
|
144
|
+
:param delete_records_request: Record deletion specification (required)
|
145
|
+
:type delete_records_request: DeleteRecordsRequest
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
147
|
+
number provided, it will be total request
|
148
|
+
timeout. It can also be a pair (tuple) of
|
149
|
+
(connection, read) timeouts.
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
152
|
+
request; this effectively ignores the
|
153
|
+
authentication in the spec for a single request.
|
154
|
+
:type _request_auth: dict, optional
|
155
|
+
:param _content_type: force content-type for the request.
|
156
|
+
:type _content_type: str, Optional
|
157
|
+
:param _headers: set to override the headers for a single
|
158
|
+
request; this effectively ignores the headers
|
159
|
+
in the spec for a single request.
|
160
|
+
:type _headers: dict, optional
|
161
|
+
:param _host_index: set to override the host_index for a single
|
162
|
+
request; this effectively ignores the host_index
|
163
|
+
in the spec for a single request.
|
164
|
+
:type _host_index: int, optional
|
165
|
+
:return: Returns the result object.
|
166
|
+
""" # noqa: E501
|
167
|
+
|
168
|
+
_param = self._delete_records_serialize(
|
169
|
+
collection_id=collection_id,
|
170
|
+
type=type,
|
171
|
+
delete_records_request=delete_records_request,
|
172
|
+
_request_auth=_request_auth,
|
173
|
+
_content_type=_content_type,
|
174
|
+
_headers=_headers,
|
175
|
+
_host_index=_host_index
|
176
|
+
)
|
177
|
+
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
179
|
+
'200': "DeleteRecordsResponse",
|
180
|
+
}
|
181
|
+
response_data = self.api_client.call_api(
|
182
|
+
*_param,
|
183
|
+
_request_timeout=_request_timeout
|
184
|
+
)
|
185
|
+
response_data.read()
|
186
|
+
return self.api_client.response_deserialize(
|
187
|
+
response_data=response_data,
|
188
|
+
response_types_map=_response_types_map,
|
189
|
+
)
|
190
|
+
|
191
|
+
|
192
|
+
@validate_call
|
193
|
+
def delete_records_without_preload_content(
|
194
|
+
self,
|
195
|
+
collection_id: Annotated[StrictStr, Field(description="Collection id")],
|
196
|
+
type: Annotated[StrictStr, Field(description="Record type")],
|
197
|
+
delete_records_request: Annotated[DeleteRecordsRequest, Field(description="Record deletion specification")],
|
198
|
+
_request_timeout: Union[
|
199
|
+
None,
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
201
|
+
Tuple[
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
204
|
+
]
|
205
|
+
] = None,
|
206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
207
|
+
_content_type: Optional[StrictStr] = None,
|
208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
210
|
+
) -> RESTResponseType:
|
211
|
+
"""Bulk delete records
|
212
|
+
|
213
|
+
Deletes records by record ID, using collection ID.
|
214
|
+
|
215
|
+
:param collection_id: Collection id (required)
|
216
|
+
:type collection_id: str
|
217
|
+
:param type: Record type (required)
|
218
|
+
:type type: str
|
219
|
+
:param delete_records_request: Record deletion specification (required)
|
220
|
+
:type delete_records_request: DeleteRecordsRequest
|
221
|
+
:param _request_timeout: timeout setting for this request. If one
|
222
|
+
number provided, it will be total request
|
223
|
+
timeout. It can also be a pair (tuple) of
|
224
|
+
(connection, read) timeouts.
|
225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
227
|
+
request; this effectively ignores the
|
228
|
+
authentication in the spec for a single request.
|
229
|
+
:type _request_auth: dict, optional
|
230
|
+
:param _content_type: force content-type for the request.
|
231
|
+
:type _content_type: str, Optional
|
232
|
+
:param _headers: set to override the headers for a single
|
233
|
+
request; this effectively ignores the headers
|
234
|
+
in the spec for a single request.
|
235
|
+
:type _headers: dict, optional
|
236
|
+
:param _host_index: set to override the host_index for a single
|
237
|
+
request; this effectively ignores the host_index
|
238
|
+
in the spec for a single request.
|
239
|
+
:type _host_index: int, optional
|
240
|
+
:return: Returns the result object.
|
241
|
+
""" # noqa: E501
|
242
|
+
|
243
|
+
_param = self._delete_records_serialize(
|
244
|
+
collection_id=collection_id,
|
245
|
+
type=type,
|
246
|
+
delete_records_request=delete_records_request,
|
247
|
+
_request_auth=_request_auth,
|
248
|
+
_content_type=_content_type,
|
249
|
+
_headers=_headers,
|
250
|
+
_host_index=_host_index
|
251
|
+
)
|
252
|
+
|
253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
254
|
+
'200': "DeleteRecordsResponse",
|
255
|
+
}
|
256
|
+
response_data = self.api_client.call_api(
|
257
|
+
*_param,
|
258
|
+
_request_timeout=_request_timeout
|
259
|
+
)
|
260
|
+
return response_data.response
|
261
|
+
|
262
|
+
|
263
|
+
def _delete_records_serialize(
|
264
|
+
self,
|
265
|
+
collection_id,
|
266
|
+
type,
|
267
|
+
delete_records_request,
|
268
|
+
_request_auth,
|
269
|
+
_content_type,
|
270
|
+
_headers,
|
271
|
+
_host_index,
|
272
|
+
) -> RequestSerialized:
|
273
|
+
|
274
|
+
_host = None
|
275
|
+
|
276
|
+
_collection_formats: Dict[str, str] = {
|
277
|
+
}
|
278
|
+
|
279
|
+
_path_params: Dict[str, str] = {}
|
280
|
+
_query_params: List[Tuple[str, str]] = []
|
281
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
282
|
+
_form_params: List[Tuple[str, str]] = []
|
283
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
284
|
+
_body_params: Optional[bytes] = None
|
285
|
+
|
286
|
+
# process the path parameters
|
287
|
+
if collection_id is not None:
|
288
|
+
_path_params['collectionId'] = collection_id
|
289
|
+
if type is not None:
|
290
|
+
_path_params['type'] = type
|
291
|
+
# process the query parameters
|
292
|
+
# process the header parameters
|
293
|
+
# process the form parameters
|
294
|
+
# process the body parameter
|
295
|
+
if delete_records_request is not None:
|
296
|
+
_body_params = delete_records_request
|
297
|
+
|
298
|
+
|
299
|
+
# set the HTTP header `Accept`
|
300
|
+
if 'Accept' not in _header_params:
|
301
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
302
|
+
[
|
303
|
+
'application/json'
|
304
|
+
]
|
305
|
+
)
|
306
|
+
|
307
|
+
# set the HTTP header `Content-Type`
|
308
|
+
if _content_type:
|
309
|
+
_header_params['Content-Type'] = _content_type
|
310
|
+
else:
|
311
|
+
_default_content_type = (
|
312
|
+
self.api_client.select_header_content_type(
|
313
|
+
[
|
314
|
+
'application/json'
|
315
|
+
]
|
316
|
+
)
|
317
|
+
)
|
318
|
+
if _default_content_type is not None:
|
319
|
+
_header_params['Content-Type'] = _default_content_type
|
320
|
+
|
321
|
+
# authentication setting
|
322
|
+
_auth_settings: List[str] = [
|
323
|
+
'bearerAuth'
|
324
|
+
]
|
325
|
+
|
326
|
+
return self.api_client.param_serialize(
|
327
|
+
method='POST',
|
328
|
+
resource_path='/records/v1/{collectionId}/{recordType}/delete',
|
329
|
+
path_params=_path_params,
|
330
|
+
query_params=_query_params,
|
331
|
+
header_params=_header_params,
|
332
|
+
body=_body_params,
|
333
|
+
post_params=_form_params,
|
334
|
+
files=_files,
|
335
|
+
auth_settings=_auth_settings,
|
336
|
+
collection_formats=_collection_formats,
|
337
|
+
_host=_host,
|
338
|
+
_request_auth=_request_auth
|
339
|
+
)
|
340
|
+
|
341
|
+
|
wds_client/api_client.py
CHANGED
@@ -90,7 +90,7 @@ class ApiClient:
|
|
90
90
|
self.default_headers[header_name] = header_value
|
91
91
|
self.cookie = cookie
|
92
92
|
# Set default User-Agent.
|
93
|
-
self.user_agent = 'wds-client/0.
|
93
|
+
self.user_agent = 'wds-client/0.21.0/python'
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
95
95
|
|
96
96
|
def __enter__(self):
|
wds_client/configuration.py
CHANGED
@@ -392,7 +392,7 @@ class Configuration:
|
|
392
392
|
"OS: {env}\n"\
|
393
393
|
"Python Version: {pyversion}\n"\
|
394
394
|
"Version of the API: v0.2\n"\
|
395
|
-
"SDK Package Version: 0.
|
395
|
+
"SDK Package Version: 0.21.0".\
|
396
396
|
format(env=sys.platform, pyversion=sys.version)
|
397
397
|
|
398
398
|
def get_host_settings(self):
|
wds_client/models/__init__.py
CHANGED
@@ -31,6 +31,8 @@ from wds_client.models.clone_response import CloneResponse
|
|
31
31
|
from wds_client.models.collection import Collection
|
32
32
|
from wds_client.models.collection_request import CollectionRequest
|
33
33
|
from wds_client.models.commit import Commit
|
34
|
+
from wds_client.models.delete_records_request import DeleteRecordsRequest
|
35
|
+
from wds_client.models.delete_records_response import DeleteRecordsResponse
|
34
36
|
from wds_client.models.error_response import ErrorResponse
|
35
37
|
from wds_client.models.generic_job import GenericJob
|
36
38
|
from wds_client.models.git import Git
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Workspace Data Service
|
5
|
+
|
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
|
+
|
8
|
+
The version of the OpenAPI document: v0.2
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class DeleteRecordsRequest(BaseModel):
|
26
|
+
"""
|
27
|
+
A request body to delete records in bulk. The caller must either: (1) specify which records should be deleted using the `record_ids` field *OR* (2) set `delete_all=true`. If `delete_all=true`, the caller may optionally specify a list of records to be spared from deletion using the `excluded_record_ids` field.
|
28
|
+
""" # noqa: E501
|
29
|
+
record_ids: Optional[List[StrictStr]] = Field(default=None, description="an array of record IDs that should be deleted")
|
30
|
+
excluded_record_ids: Optional[List[StrictStr]] = Field(default=None, description="an array of record IDs that should NOT be deleted.")
|
31
|
+
delete_all: Optional[StrictBool] = Field(default=False, description="if true, deletes all records")
|
32
|
+
__properties: ClassVar[List[str]] = ["record_ids", "excluded_record_ids", "delete_all"]
|
33
|
+
|
34
|
+
model_config = ConfigDict(
|
35
|
+
populate_by_name=True,
|
36
|
+
validate_assignment=True,
|
37
|
+
protected_namespaces=(),
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of DeleteRecordsRequest from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
"""
|
65
|
+
excluded_fields: Set[str] = set([
|
66
|
+
])
|
67
|
+
|
68
|
+
_dict = self.model_dump(
|
69
|
+
by_alias=True,
|
70
|
+
exclude=excluded_fields,
|
71
|
+
exclude_none=True,
|
72
|
+
)
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
+
"""Create an instance of DeleteRecordsRequest from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return cls.model_validate(obj)
|
83
|
+
|
84
|
+
_obj = cls.model_validate({
|
85
|
+
"record_ids": obj.get("record_ids"),
|
86
|
+
"excluded_record_ids": obj.get("excluded_record_ids"),
|
87
|
+
"delete_all": obj.get("delete_all") if obj.get("delete_all") is not None else False
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Workspace Data Service
|
5
|
+
|
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
|
+
|
8
|
+
The version of the OpenAPI document: v0.2
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class DeleteRecordsResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
A response body for a bulk record deletion request. Contains a count of records deleted by the request.
|
28
|
+
""" # noqa: E501
|
29
|
+
count: Optional[StrictInt] = Field(default=None, description="the number of records deleted")
|
30
|
+
__properties: ClassVar[List[str]] = ["count"]
|
31
|
+
|
32
|
+
model_config = ConfigDict(
|
33
|
+
populate_by_name=True,
|
34
|
+
validate_assignment=True,
|
35
|
+
protected_namespaces=(),
|
36
|
+
)
|
37
|
+
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
+
"""Create an instance of DeleteRecordsResponse from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
55
|
+
|
56
|
+
This has the following differences from calling pydantic's
|
57
|
+
`self.model_dump(by_alias=True)`:
|
58
|
+
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
60
|
+
were set at model initialization. Other fields with value `None`
|
61
|
+
are ignored.
|
62
|
+
"""
|
63
|
+
excluded_fields: Set[str] = set([
|
64
|
+
])
|
65
|
+
|
66
|
+
_dict = self.model_dump(
|
67
|
+
by_alias=True,
|
68
|
+
exclude=excluded_fields,
|
69
|
+
exclude_none=True,
|
70
|
+
)
|
71
|
+
return _dict
|
72
|
+
|
73
|
+
@classmethod
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
+
"""Create an instance of DeleteRecordsResponse from a dict"""
|
76
|
+
if obj is None:
|
77
|
+
return None
|
78
|
+
|
79
|
+
if not isinstance(obj, dict):
|
80
|
+
return cls.model_validate(obj)
|
81
|
+
|
82
|
+
_obj = cls.model_validate({
|
83
|
+
"count": obj.get("count")
|
84
|
+
})
|
85
|
+
return _obj
|
86
|
+
|
87
|
+
|
@@ -1,21 +1,22 @@
|
|
1
|
-
wds_client/__init__.py,sha256=
|
2
|
-
wds_client/api_client.py,sha256=
|
1
|
+
wds_client/__init__.py,sha256=d_7gTjoLJ-RFv9s6oms_Kpm5_MiJM_8VESqxfQ2iLWM,3760
|
2
|
+
wds_client/api_client.py,sha256=cR4UnfdrTcc0wUMyrbfFqta337N9UT3vA5TFiH5Q2Yw,27193
|
3
3
|
wds_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
4
|
-
wds_client/configuration.py,sha256
|
4
|
+
wds_client/configuration.py,sha256=h-zOgsStBsGs5qPwF52VXDBZezyV9Qk2Hzv_oxp5-7Y,15455
|
5
5
|
wds_client/exceptions.py,sha256=674T2OrRc-tySXqf45i00iZdt3r6AS-RnWjBUgRxAvc,6122
|
6
6
|
wds_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
wds_client/rest.py,sha256=Gbp9F8A2qoMDg4xrkCjSAG0FDHXUxcNB8oyfzJXxw4U,9554
|
8
|
-
wds_client/api/__init__.py,sha256=
|
8
|
+
wds_client/api/__init__.py,sha256=_TZIY-8DsGSlYlfoqzTcd0pmCqBeMcW85x6Lzq1dy6U,584
|
9
9
|
wds_client/api/capabilities_api.py,sha256=fbu84ZPzJq2cWS_x4HK_AeuvycDavlvbD-RkumXzs1M,10329
|
10
10
|
wds_client/api/cloning_api.py,sha256=LkDwC-FYSyWqYqWHZZTI5Xic-jo01VlrjbT9J1joLjw,32455
|
11
11
|
wds_client/api/collection_api.py,sha256=abZF56OGRIiqbloMi6zd7ahdBkwFwEMO6m4ZbNP8DXA,55679
|
12
12
|
wds_client/api/general_wds_information_api.py,sha256=xwfn820K0Q1BaWtIEWWuIkMUNxeFFq2LQiiYIY4BUrA,20256
|
13
13
|
wds_client/api/import_api.py,sha256=-R7A7mr-FkkF-CKA_aEdXw_gFi101vm3n6pgWEoXgfU,12930
|
14
14
|
wds_client/api/job_api.py,sha256=2oQdl-1Si_QloKtiPGgOitftCb0GMto-O-PZoyUZ7kE,21802
|
15
|
+
wds_client/api/record_api.py,sha256=tsxjGa-fiKBRkQJ0wiZ3A_wfyXQVAFQMYVYQohyhceY,13576
|
15
16
|
wds_client/api/records_api.py,sha256=5sESj3Wq6oG2f82Rbtr-Wab4yOr64N023IFr5U5YFNo,106659
|
16
17
|
wds_client/api/schema_api.py,sha256=nIuLrh_GJUjkoAZwomIrQXagYZU4HLvg4naHh3uBWZM,61103
|
17
18
|
wds_client/api/workspace_api.py,sha256=1dYyHxLRoCxX9fy-gbqXWOfGPRJSlayqWoNK1sFio1A,12985
|
18
|
-
wds_client/models/__init__.py,sha256=
|
19
|
+
wds_client/models/__init__.py,sha256=mJnZhtmUqIN-FFZwMZJkvy9Bzkz63E3XyzkGBtJbB34,2715
|
19
20
|
wds_client/models/app.py,sha256=9aTIAS8vTOch8zKHBvZHuXumL0vYZBOO2g9Y8VKjPPw,2772
|
20
21
|
wds_client/models/attribute_data_type.py,sha256=R4kI1B2oH7pcyNYcIUElp5MmAMWGj0KY1AeQ5zo0lKk,1514
|
21
22
|
wds_client/models/attribute_schema.py,sha256=Lrrw5iTq9O56DbcCgAGgif500eO9-aaJ8FWHNM6pF7U,3091
|
@@ -33,6 +34,8 @@ wds_client/models/clone_response.py,sha256=qrBpBfS-b3EmAszCdY7vzfMJj4zr36xvp5Zlj
|
|
33
34
|
wds_client/models/collection.py,sha256=LxuptlecUwSBpieeyuIUCgKghO47i1R7xyv_-HHKoOQ,3261
|
34
35
|
wds_client/models/collection_request.py,sha256=eNm5jUvaTqz20jrN0qoNg8iXf84sNmEF1ZpyP608fPM,3205
|
35
36
|
wds_client/models/commit.py,sha256=yE9OxZ_1kGnbD3U80QTBi8HOELfxd21Eb3-RraPqbsc,2720
|
37
|
+
wds_client/models/delete_records_request.py,sha256=Een5GjtAb6rGYh7GkiThRx8HGb5rfHkQ9j3exjWAwqQ,3538
|
38
|
+
wds_client/models/delete_records_response.py,sha256=cZDwL8EYH_X7vLMHJmhN4NX4uKvrDRZBsmP8D-RsZPg,2831
|
36
39
|
wds_client/models/error_response.py,sha256=U1Fl24jQhD2gEEREBSemaUp8PHKO7XHJ4pSLmgnVxz0,3115
|
37
40
|
wds_client/models/generic_job.py,sha256=-LW-WC1T_SSfpAZTdxoEKc3_Njn-Iab1Opmy7E2hwfU,4421
|
38
41
|
wds_client/models/git.py,sha256=ylt-GWcCKsfZmWfBHQIT7EO5mHhLqQnnf8hANgUZcl0,2962
|
@@ -51,7 +54,7 @@ wds_client/models/tsv_upload_response.py,sha256=yhj-3KEFzs-EYnaGZvsr6KgrK6wlYCZK
|
|
51
54
|
wds_client/models/version_response.py,sha256=pQ9eukrGQPdLBwvPKN_ucFlMKff25oGywruwIdL918o,3516
|
52
55
|
wds_client/models/workspace_init.py,sha256=XHtI3gddZY3_X0byd232m15cChbvln_jWBDZoE8_20w,2942
|
53
56
|
wds_client/models/workspace_init_clone.py,sha256=MTQuoSuJrYCQLbWGPA8VCcB3phs7101HcUj3Q27yVK0,2847
|
54
|
-
wds_client-0.
|
55
|
-
wds_client-0.
|
56
|
-
wds_client-0.
|
57
|
-
wds_client-0.
|
57
|
+
wds_client-0.21.0.dist-info/METADATA,sha256=Vkyi5bUjorodZ_PWOY4VE-vlPWMAUIzTKn4qcfLUEgk,675
|
58
|
+
wds_client-0.21.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
59
|
+
wds_client-0.21.0.dist-info/top_level.txt,sha256=hU2h533r5-3FzApV8ps3zXmQJKy74SPT3sYR8-uZhp8,11
|
60
|
+
wds_client-0.21.0.dist-info/RECORD,,
|
File without changes
|