wds-client 0.14.0__py3-none-any.whl → 0.17.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 CHANGED
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "0.14.0"
17
+ __version__ = "0.17.0"
18
18
 
19
19
  # import apis into sdk package
20
20
  from wds_client.api.capabilities_api import CapabilitiesApi
@@ -26,6 +26,7 @@ from wds_client.api.instances_api import InstancesApi
26
26
  from wds_client.api.job_api import JobApi
27
27
  from wds_client.api.records_api import RecordsApi
28
28
  from wds_client.api.schema_api import SchemaApi
29
+ from wds_client.api.workspace_api import WorkspaceApi
29
30
 
30
31
  # import ApiClient
31
32
  from wds_client.api_response import ApiResponse
@@ -54,6 +55,7 @@ from wds_client.models.capabilities import Capabilities
54
55
  from wds_client.models.clone_job import CloneJob
55
56
  from wds_client.models.clone_response import CloneResponse
56
57
  from wds_client.models.collection import Collection
58
+ from wds_client.models.collection_request import CollectionRequest
57
59
  from wds_client.models.commit import Commit
58
60
  from wds_client.models.error_response import ErrorResponse
59
61
  from wds_client.models.generic_job import GenericJob
@@ -71,3 +73,5 @@ from wds_client.models.search_sort_direction import SearchSortDirection
71
73
  from wds_client.models.status_response import StatusResponse
72
74
  from wds_client.models.tsv_upload_response import TsvUploadResponse
73
75
  from wds_client.models.version_response import VersionResponse
76
+ from wds_client.models.workspace_init import WorkspaceInit
77
+ from wds_client.models.workspace_init_clone import WorkspaceInitClone
@@ -10,4 +10,5 @@ from wds_client.api.instances_api import InstancesApi
10
10
  from wds_client.api.job_api import JobApi
11
11
  from wds_client.api.records_api import RecordsApi
12
12
  from wds_client.api.schema_api import SchemaApi
13
+ from wds_client.api.workspace_api import WorkspaceApi
13
14
 
@@ -20,6 +20,7 @@ from pydantic import Field, StrictStr
20
20
  from typing import List
21
21
  from typing_extensions import Annotated
22
22
  from wds_client.models.collection import Collection
23
+ from wds_client.models.collection_request import CollectionRequest
23
24
 
24
25
  from wds_client.api_client import ApiClient, RequestSerialized
25
26
  from wds_client.api_response import ApiResponse
@@ -43,7 +44,7 @@ class CollectionApi:
43
44
  def create_collection_v1(
44
45
  self,
45
46
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
46
- collection: Annotated[Collection, Field(description="The collection to create")],
47
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to create")],
47
48
  _request_timeout: Union[
48
49
  None,
49
50
  Annotated[StrictFloat, Field(gt=0)],
@@ -59,12 +60,11 @@ class CollectionApi:
59
60
  ) -> Collection:
60
61
  """Create a collection in this workspace.
61
62
 
62
- If collection id is specified in the request body, it must be a valid UUID. If omitted, the system will generate an id.
63
63
 
64
64
  :param workspace_id: Workspace id (required)
65
65
  :type workspace_id: str
66
- :param collection: The collection to create (required)
67
- :type collection: Collection
66
+ :param collection_request: The collection to create (required)
67
+ :type collection_request: CollectionRequest
68
68
  :param _request_timeout: timeout setting for this request. If one
69
69
  number provided, it will be total request
70
70
  timeout. It can also be a pair (tuple) of
@@ -89,7 +89,7 @@ class CollectionApi:
89
89
 
90
90
  _param = self._create_collection_v1_serialize(
91
91
  workspace_id=workspace_id,
92
- collection=collection,
92
+ collection_request=collection_request,
93
93
  _request_auth=_request_auth,
94
94
  _content_type=_content_type,
95
95
  _headers=_headers,
@@ -114,7 +114,7 @@ class CollectionApi:
114
114
  def create_collection_v1_with_http_info(
115
115
  self,
116
116
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
117
- collection: Annotated[Collection, Field(description="The collection to create")],
117
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to create")],
118
118
  _request_timeout: Union[
119
119
  None,
120
120
  Annotated[StrictFloat, Field(gt=0)],
@@ -130,12 +130,11 @@ class CollectionApi:
130
130
  ) -> ApiResponse[Collection]:
131
131
  """Create a collection in this workspace.
132
132
 
133
- If collection id is specified in the request body, it must be a valid UUID. If omitted, the system will generate an id.
134
133
 
135
134
  :param workspace_id: Workspace id (required)
136
135
  :type workspace_id: str
137
- :param collection: The collection to create (required)
138
- :type collection: Collection
136
+ :param collection_request: The collection to create (required)
137
+ :type collection_request: CollectionRequest
139
138
  :param _request_timeout: timeout setting for this request. If one
140
139
  number provided, it will be total request
141
140
  timeout. It can also be a pair (tuple) of
@@ -160,7 +159,7 @@ class CollectionApi:
160
159
 
161
160
  _param = self._create_collection_v1_serialize(
162
161
  workspace_id=workspace_id,
163
- collection=collection,
162
+ collection_request=collection_request,
164
163
  _request_auth=_request_auth,
165
164
  _content_type=_content_type,
166
165
  _headers=_headers,
@@ -185,7 +184,7 @@ class CollectionApi:
185
184
  def create_collection_v1_without_preload_content(
186
185
  self,
187
186
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
188
- collection: Annotated[Collection, Field(description="The collection to create")],
187
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to create")],
189
188
  _request_timeout: Union[
190
189
  None,
191
190
  Annotated[StrictFloat, Field(gt=0)],
@@ -201,12 +200,11 @@ class CollectionApi:
201
200
  ) -> RESTResponseType:
202
201
  """Create a collection in this workspace.
203
202
 
204
- If collection id is specified in the request body, it must be a valid UUID. If omitted, the system will generate an id.
205
203
 
206
204
  :param workspace_id: Workspace id (required)
207
205
  :type workspace_id: str
208
- :param collection: The collection to create (required)
209
- :type collection: Collection
206
+ :param collection_request: The collection to create (required)
207
+ :type collection_request: CollectionRequest
210
208
  :param _request_timeout: timeout setting for this request. If one
211
209
  number provided, it will be total request
212
210
  timeout. It can also be a pair (tuple) of
@@ -231,7 +229,7 @@ class CollectionApi:
231
229
 
232
230
  _param = self._create_collection_v1_serialize(
233
231
  workspace_id=workspace_id,
234
- collection=collection,
232
+ collection_request=collection_request,
235
233
  _request_auth=_request_auth,
236
234
  _content_type=_content_type,
237
235
  _headers=_headers,
@@ -251,7 +249,7 @@ class CollectionApi:
251
249
  def _create_collection_v1_serialize(
252
250
  self,
253
251
  workspace_id,
254
- collection,
252
+ collection_request,
255
253
  _request_auth,
256
254
  _content_type,
257
255
  _headers,
@@ -277,8 +275,8 @@ class CollectionApi:
277
275
  # process the header parameters
278
276
  # process the form parameters
279
277
  # process the body parameter
280
- if collection is not None:
281
- _body_params = collection
278
+ if collection_request is not None:
279
+ _body_params = collection_request
282
280
 
283
281
 
284
282
  # set the HTTP header `Accept`
@@ -1122,7 +1120,7 @@ class CollectionApi:
1122
1120
  self,
1123
1121
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
1124
1122
  collection_id: Annotated[StrictStr, Field(description="Collection id")],
1125
- collection: Annotated[Collection, Field(description="The collection to update")],
1123
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to update")],
1126
1124
  _request_timeout: Union[
1127
1125
  None,
1128
1126
  Annotated[StrictFloat, Field(gt=0)],
@@ -1138,14 +1136,13 @@ class CollectionApi:
1138
1136
  ) -> Collection:
1139
1137
  """Update the specified collection.
1140
1138
 
1141
- Collection id is optional in the request body. If specified, it must match the collection id specified in the url.
1142
1139
 
1143
1140
  :param workspace_id: Workspace id (required)
1144
1141
  :type workspace_id: str
1145
1142
  :param collection_id: Collection id (required)
1146
1143
  :type collection_id: str
1147
- :param collection: The collection to update (required)
1148
- :type collection: Collection
1144
+ :param collection_request: The collection to update (required)
1145
+ :type collection_request: CollectionRequest
1149
1146
  :param _request_timeout: timeout setting for this request. If one
1150
1147
  number provided, it will be total request
1151
1148
  timeout. It can also be a pair (tuple) of
@@ -1171,7 +1168,7 @@ class CollectionApi:
1171
1168
  _param = self._update_collection_v1_serialize(
1172
1169
  workspace_id=workspace_id,
1173
1170
  collection_id=collection_id,
1174
- collection=collection,
1171
+ collection_request=collection_request,
1175
1172
  _request_auth=_request_auth,
1176
1173
  _content_type=_content_type,
1177
1174
  _headers=_headers,
@@ -1197,7 +1194,7 @@ class CollectionApi:
1197
1194
  self,
1198
1195
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
1199
1196
  collection_id: Annotated[StrictStr, Field(description="Collection id")],
1200
- collection: Annotated[Collection, Field(description="The collection to update")],
1197
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to update")],
1201
1198
  _request_timeout: Union[
1202
1199
  None,
1203
1200
  Annotated[StrictFloat, Field(gt=0)],
@@ -1213,14 +1210,13 @@ class CollectionApi:
1213
1210
  ) -> ApiResponse[Collection]:
1214
1211
  """Update the specified collection.
1215
1212
 
1216
- Collection id is optional in the request body. If specified, it must match the collection id specified in the url.
1217
1213
 
1218
1214
  :param workspace_id: Workspace id (required)
1219
1215
  :type workspace_id: str
1220
1216
  :param collection_id: Collection id (required)
1221
1217
  :type collection_id: str
1222
- :param collection: The collection to update (required)
1223
- :type collection: Collection
1218
+ :param collection_request: The collection to update (required)
1219
+ :type collection_request: CollectionRequest
1224
1220
  :param _request_timeout: timeout setting for this request. If one
1225
1221
  number provided, it will be total request
1226
1222
  timeout. It can also be a pair (tuple) of
@@ -1246,7 +1242,7 @@ class CollectionApi:
1246
1242
  _param = self._update_collection_v1_serialize(
1247
1243
  workspace_id=workspace_id,
1248
1244
  collection_id=collection_id,
1249
- collection=collection,
1245
+ collection_request=collection_request,
1250
1246
  _request_auth=_request_auth,
1251
1247
  _content_type=_content_type,
1252
1248
  _headers=_headers,
@@ -1272,7 +1268,7 @@ class CollectionApi:
1272
1268
  self,
1273
1269
  workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
1274
1270
  collection_id: Annotated[StrictStr, Field(description="Collection id")],
1275
- collection: Annotated[Collection, Field(description="The collection to update")],
1271
+ collection_request: Annotated[CollectionRequest, Field(description="The collection to update")],
1276
1272
  _request_timeout: Union[
1277
1273
  None,
1278
1274
  Annotated[StrictFloat, Field(gt=0)],
@@ -1288,14 +1284,13 @@ class CollectionApi:
1288
1284
  ) -> RESTResponseType:
1289
1285
  """Update the specified collection.
1290
1286
 
1291
- Collection id is optional in the request body. If specified, it must match the collection id specified in the url.
1292
1287
 
1293
1288
  :param workspace_id: Workspace id (required)
1294
1289
  :type workspace_id: str
1295
1290
  :param collection_id: Collection id (required)
1296
1291
  :type collection_id: str
1297
- :param collection: The collection to update (required)
1298
- :type collection: Collection
1292
+ :param collection_request: The collection to update (required)
1293
+ :type collection_request: CollectionRequest
1299
1294
  :param _request_timeout: timeout setting for this request. If one
1300
1295
  number provided, it will be total request
1301
1296
  timeout. It can also be a pair (tuple) of
@@ -1321,7 +1316,7 @@ class CollectionApi:
1321
1316
  _param = self._update_collection_v1_serialize(
1322
1317
  workspace_id=workspace_id,
1323
1318
  collection_id=collection_id,
1324
- collection=collection,
1319
+ collection_request=collection_request,
1325
1320
  _request_auth=_request_auth,
1326
1321
  _content_type=_content_type,
1327
1322
  _headers=_headers,
@@ -1342,7 +1337,7 @@ class CollectionApi:
1342
1337
  self,
1343
1338
  workspace_id,
1344
1339
  collection_id,
1345
- collection,
1340
+ collection_request,
1346
1341
  _request_auth,
1347
1342
  _content_type,
1348
1343
  _headers,
@@ -1370,8 +1365,8 @@ class CollectionApi:
1370
1365
  # process the header parameters
1371
1366
  # process the form parameters
1372
1367
  # process the body parameter
1373
- if collection is not None:
1374
- _body_params = collection
1368
+ if collection_request is not None:
1369
+ _body_params = collection_request
1375
1370
 
1376
1371
 
1377
1372
  # set the HTTP header `Accept`
@@ -0,0 +1,326 @@
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.generic_job import GenericJob
22
+ from wds_client.models.workspace_init import WorkspaceInit
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 WorkspaceApi:
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 init_workspace_v1(
44
+ self,
45
+ workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
46
+ workspace_init: Annotated[WorkspaceInit, Field(description="Initialization parameters")],
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
+ """Initialize WDS for a given workspace.
61
+
62
+ when the `clone` key is present in the request body, this API will clone all collections from sourceWorkspaceId into this workspace
63
+
64
+ :param workspace_id: Workspace id (required)
65
+ :type workspace_id: str
66
+ :param workspace_init: Initialization parameters (required)
67
+ :type workspace_init: WorkspaceInit
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
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._init_workspace_v1_serialize(
91
+ workspace_id=workspace_id,
92
+ workspace_init=workspace_init,
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 init_workspace_v1_with_http_info(
115
+ self,
116
+ workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
117
+ workspace_init: Annotated[WorkspaceInit, Field(description="Initialization parameters")],
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
+ """Initialize WDS for a given workspace.
132
+
133
+ when the `clone` key is present in the request body, this API will clone all collections from sourceWorkspaceId into this workspace
134
+
135
+ :param workspace_id: Workspace id (required)
136
+ :type workspace_id: str
137
+ :param workspace_init: Initialization parameters (required)
138
+ :type workspace_init: WorkspaceInit
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
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
160
+
161
+ _param = self._init_workspace_v1_serialize(
162
+ workspace_id=workspace_id,
163
+ workspace_init=workspace_init,
164
+ _request_auth=_request_auth,
165
+ _content_type=_content_type,
166
+ _headers=_headers,
167
+ _host_index=_host_index
168
+ )
169
+
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 init_workspace_v1_without_preload_content(
186
+ self,
187
+ workspace_id: Annotated[StrictStr, Field(description="Workspace id")],
188
+ workspace_init: Annotated[WorkspaceInit, Field(description="Initialization parameters")],
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
+ """Initialize WDS for a given workspace.
203
+
204
+ when the `clone` key is present in the request body, this API will clone all collections from sourceWorkspaceId into this workspace
205
+
206
+ :param workspace_id: Workspace id (required)
207
+ :type workspace_id: str
208
+ :param workspace_init: Initialization parameters (required)
209
+ :type workspace_init: WorkspaceInit
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._init_workspace_v1_serialize(
233
+ workspace_id=workspace_id,
234
+ workspace_init=workspace_init,
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 _init_workspace_v1_serialize(
252
+ self,
253
+ workspace_id,
254
+ workspace_init,
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 workspace_id is not None:
275
+ _path_params['workspaceId'] = workspace_id
276
+ # process the query parameters
277
+ # process the header parameters
278
+ # process the form parameters
279
+ # process the body parameter
280
+ if workspace_init is not None:
281
+ _body_params = workspace_init
282
+
283
+
284
+ # set the HTTP header `Accept`
285
+ if 'Accept' not in _header_params:
286
+ _header_params['Accept'] = self.api_client.select_header_accept(
287
+ [
288
+ 'application/json'
289
+ ]
290
+ )
291
+
292
+ # set the HTTP header `Content-Type`
293
+ if _content_type:
294
+ _header_params['Content-Type'] = _content_type
295
+ else:
296
+ _default_content_type = (
297
+ self.api_client.select_header_content_type(
298
+ [
299
+ 'application/json'
300
+ ]
301
+ )
302
+ )
303
+ if _default_content_type is not None:
304
+ _header_params['Content-Type'] = _default_content_type
305
+
306
+ # authentication setting
307
+ _auth_settings: List[str] = [
308
+ 'bearerAuth'
309
+ ]
310
+
311
+ return self.api_client.param_serialize(
312
+ method='POST',
313
+ resource_path='/workspaces/v1/{workspaceId}',
314
+ path_params=_path_params,
315
+ query_params=_query_params,
316
+ header_params=_header_params,
317
+ body=_body_params,
318
+ post_params=_form_params,
319
+ files=_files,
320
+ auth_settings=_auth_settings,
321
+ collection_formats=_collection_formats,
322
+ _host=_host,
323
+ _request_auth=_request_auth
324
+ )
325
+
326
+
wds_client/api_client.py CHANGED
@@ -88,7 +88,7 @@ class ApiClient:
88
88
  self.default_headers[header_name] = header_value
89
89
  self.cookie = cookie
90
90
  # Set default User-Agent.
91
- self.user_agent = 'wds-client/0.14.0/python'
91
+ self.user_agent = 'wds-client/0.17.0/python'
92
92
  self.client_side_validation = configuration.client_side_validation
93
93
 
94
94
  def __enter__(self):
@@ -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.14.0".\
395
+ "SDK Package Version: 0.17.0".\
396
396
  format(env=sys.platform, pyversion=sys.version)
397
397
 
398
398
  def get_host_settings(self):
@@ -29,6 +29,7 @@ from wds_client.models.capabilities import Capabilities
29
29
  from wds_client.models.clone_job import CloneJob
30
30
  from wds_client.models.clone_response import CloneResponse
31
31
  from wds_client.models.collection import Collection
32
+ from wds_client.models.collection_request import CollectionRequest
32
33
  from wds_client.models.commit import Commit
33
34
  from wds_client.models.error_response import ErrorResponse
34
35
  from wds_client.models.generic_job import GenericJob
@@ -46,3 +47,5 @@ from wds_client.models.search_sort_direction import SearchSortDirection
46
47
  from wds_client.models.status_response import StatusResponse
47
48
  from wds_client.models.tsv_upload_response import TsvUploadResponse
48
49
  from wds_client.models.version_response import VersionResponse
50
+ from wds_client.models.workspace_init import WorkspaceInit
51
+ from wds_client.models.workspace_init_clone import WorkspaceInitClone
@@ -0,0 +1,97 @@
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, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CollectionRequest(BaseModel):
27
+ """
28
+ CollectionRequest
29
+ """ # noqa: E501
30
+ name: Annotated[str, Field(strict=True)] = Field(description="Letters, numbers, dash and underscore only. Max 128 characters.")
31
+ description: StrictStr
32
+ __properties: ClassVar[List[str]] = ["name", "description"]
33
+
34
+ @field_validator('name')
35
+ def name_validate_regular_expression(cls, value):
36
+ """Validates the regular expression"""
37
+ if not re.match(r"[a-zA-Z0-9-_]{1,128}", value):
38
+ raise ValueError(r"must validate the regular expression /[a-zA-Z0-9-_]{1,128}/")
39
+ return value
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of CollectionRequest from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of CollectionRequest from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "name": obj.get("name"),
93
+ "description": obj.get("description")
94
+ })
95
+ return _obj
96
+
97
+
@@ -27,7 +27,8 @@ class SearchFilter(BaseModel):
27
27
  SearchFilter
28
28
  """ # noqa: E501
29
29
  ids: Optional[List[StrictStr]] = Field(default=None, description="Record ids by which to filter the query")
30
- __properties: ClassVar[List[str]] = ["ids"]
30
+ query: Optional[StrictStr] = Field(default=None, description="in the form column:text")
31
+ __properties: ClassVar[List[str]] = ["ids", "query"]
31
32
 
32
33
  model_config = ConfigDict(
33
34
  populate_by_name=True,
@@ -80,7 +81,8 @@ class SearchFilter(BaseModel):
80
81
  return cls.model_validate(obj)
81
82
 
82
83
  _obj = cls.model_validate({
83
- "ids": obj.get("ids")
84
+ "ids": obj.get("ids"),
85
+ "query": obj.get("query")
84
86
  })
85
87
  return _obj
86
88
 
@@ -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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from wds_client.models.workspace_init_clone import WorkspaceInitClone
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class WorkspaceInit(BaseModel):
27
+ """
28
+ WorkspaceInit
29
+ """ # noqa: E501
30
+ clone: Optional[WorkspaceInitClone] = None
31
+ __properties: ClassVar[List[str]] = ["clone"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of WorkspaceInit from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of clone
73
+ if self.clone:
74
+ _dict['clone'] = self.clone.to_dict()
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of WorkspaceInit from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "clone": WorkspaceInitClone.from_dict(obj["clone"]) if obj.get("clone") is not None else None
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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class WorkspaceInitClone(BaseModel):
26
+ """
27
+ when present, will clone all collections from sourceWorkspaceId into this workspace
28
+ """ # noqa: E501
29
+ source_workspace_id: StrictStr = Field(description="id of the workspace being cloned", alias="sourceWorkspaceId")
30
+ __properties: ClassVar[List[str]] = ["sourceWorkspaceId"]
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 WorkspaceInitClone 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 WorkspaceInitClone 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
+ "sourceWorkspaceId": obj.get("sourceWorkspaceId")
84
+ })
85
+ return _obj
86
+
87
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wds-client
3
- Version: 0.14.0
3
+ Version: 0.17.0
4
4
  Summary: Workspace Data Service
5
5
  Home-page:
6
6
  Author: OpenAPI Generator community
@@ -1,21 +1,22 @@
1
- wds_client/__init__.py,sha256=Zyv1FMT1jtZNn4Bf7zROrzogHkRXXsQ896uXa3F0TWM,3366
2
- wds_client/api_client.py,sha256=YT6Wg_plyWrg810qcFPlyrxmnCEAg6nG42e6wB4azV8,26923
1
+ wds_client/__init__.py,sha256=_I29FxGwyTAXDVzA5RIhDLnTKMP7RHM9KkJN_tZK2Jc,3616
2
+ wds_client/api_client.py,sha256=09xoIXBaXge41gPhka8a6slRTEInW2jKkTvjhjFHOyY,26923
3
3
  wds_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- wds_client/configuration.py,sha256=le8su8SOPGJIsX0NeE5N-dk9eIZGA_EQM86lCUOPOOE,15455
4
+ wds_client/configuration.py,sha256=8GeNJ4p-YFubGS_9OrlCA1sbjErD9OWp6sfBQhH2c3w,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=v5lOQMp34S1yRr6sWAlsQqoBXvLb6jvHS7DAF4-ZorY,536
8
+ wds_client/api/__init__.py,sha256=0i7Q7g32_5zFZT31bR9BQj6gH7kQDAh17yH8OMfj9Sc,590
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
- wds_client/api/collection_api.py,sha256=289_Hh_hll8IJu_MKx5AxvgUVCWdHbW9oMPgWVJfaDk,55999
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/instances_api.py,sha256=chNSyh-oiihu_6CcsUa2af853TwtDLFRxGTWpPKS9zo,33855
15
15
  wds_client/api/job_api.py,sha256=2oQdl-1Si_QloKtiPGgOitftCb0GMto-O-PZoyUZ7kE,21802
16
16
  wds_client/api/records_api.py,sha256=5sESj3Wq6oG2f82Rbtr-Wab4yOr64N023IFr5U5YFNo,106659
17
17
  wds_client/api/schema_api.py,sha256=nIuLrh_GJUjkoAZwomIrQXagYZU4HLvg4naHh3uBWZM,61103
18
- wds_client/models/__init__.py,sha256=_LXg2jqctQ-W-B3Ry3VJpyY_em3EsGE9fWGx7txnvhE,2369
18
+ wds_client/api/workspace_api.py,sha256=1dYyHxLRoCxX9fy-gbqXWOfGPRJSlayqWoNK1sFio1A,12985
19
+ wds_client/models/__init__.py,sha256=xWv8s7r50bVB6aWNzIDPUMLu4uHj9qYCE0ps2IcyiLI,2565
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
@@ -31,6 +32,7 @@ wds_client/models/capabilities.py,sha256=Vqh62U0ZX_tNaBnAvabkdOCzByLp49FHBToxOZ6
31
32
  wds_client/models/clone_job.py,sha256=Dt7imPtHrLgJbdWBbABjXo3ArZ4aJVRKEHgETiCTI1Y,4057
32
33
  wds_client/models/clone_response.py,sha256=qrBpBfS-b3EmAszCdY7vzfMJj4zr36xvp5Zlj0fLjoM,2943
33
34
  wds_client/models/collection.py,sha256=LxuptlecUwSBpieeyuIUCgKghO47i1R7xyv_-HHKoOQ,3261
35
+ wds_client/models/collection_request.py,sha256=eNm5jUvaTqz20jrN0qoNg8iXf84sNmEF1ZpyP608fPM,3205
34
36
  wds_client/models/commit.py,sha256=yE9OxZ_1kGnbD3U80QTBi8HOELfxd21Eb3-RraPqbsc,2720
35
37
  wds_client/models/error_response.py,sha256=U1Fl24jQhD2gEEREBSemaUp8PHKO7XHJ4pSLmgnVxz0,3115
36
38
  wds_client/models/generic_job.py,sha256=XCO9Ll3aFcuVEZtbhbGzJ-u-KqgA18JBjj7MGPOWGck,4385
@@ -42,13 +44,15 @@ wds_client/models/record_query_response.py,sha256=MnWYml3zasmWKLaFObZmkkredGo_mp
42
44
  wds_client/models/record_request.py,sha256=c-jJuqOgogRM5HdR2HoafMnpIAdfCukysSBFCqnwCjM,2796
43
45
  wds_client/models/record_response.py,sha256=ZniN8hDVM7QAEbhwbUnr5RXYpZJHqwFPxBlmlhorBDk,3001
44
46
  wds_client/models/record_type_schema.py,sha256=WITuWzyFehg0sYNwhixeeCT7lODEZvEFnlDLVjxAugw,3752
45
- wds_client/models/search_filter.py,sha256=x7DKOQEgJfYZ71b2AmBvvGLSnhZhycSKsjAIOr135ZY,2720
47
+ wds_client/models/search_filter.py,sha256=TWUJEqSOdgER6OV9IrNodSnn9JZ8Q7Spc0e1EYWm7M0,2860
46
48
  wds_client/models/search_request.py,sha256=RLJq3S4vC4bg9dprEH0kT-h9m6PVblBkAzVHYw5XW-I,3801
47
49
  wds_client/models/search_sort_direction.py,sha256=fnqUYvbgXHQ5mESZnxDvcUZ5wi6i770fkqu00jtCATM,932
48
50
  wds_client/models/status_response.py,sha256=A5i2yWShlaGVVyi1DGg1KsC8S4fyLbmxJmqLlMKmtH0,2768
49
51
  wds_client/models/tsv_upload_response.py,sha256=yhj-3KEFzs-EYnaGZvsr6KgrK6wlYCZKVA7ObfZ2ECc,2807
50
52
  wds_client/models/version_response.py,sha256=pQ9eukrGQPdLBwvPKN_ucFlMKff25oGywruwIdL918o,3516
51
- wds_client-0.14.0.dist-info/METADATA,sha256=VRKZa_7Ika2vkNH4SWi1pAt3psZ1Z1ot2x6FT55tfjw,675
52
- wds_client-0.14.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
53
- wds_client-0.14.0.dist-info/top_level.txt,sha256=hU2h533r5-3FzApV8ps3zXmQJKy74SPT3sYR8-uZhp8,11
54
- wds_client-0.14.0.dist-info/RECORD,,
53
+ wds_client/models/workspace_init.py,sha256=XHtI3gddZY3_X0byd232m15cChbvln_jWBDZoE8_20w,2942
54
+ wds_client/models/workspace_init_clone.py,sha256=MTQuoSuJrYCQLbWGPA8VCcB3phs7101HcUj3Q27yVK0,2847
55
+ wds_client-0.17.0.dist-info/METADATA,sha256=oNbngKvcGYRzI8xNiut_ASDEdeKNLk1kj9TmnnIBnAY,675
56
+ wds_client-0.17.0.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
57
+ wds_client-0.17.0.dist-info/top_level.txt,sha256=hU2h533r5-3FzApV8ps3zXmQJKy74SPT3sYR8-uZhp8,11
58
+ wds_client-0.17.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (71.1.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5