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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. wds_client/__init__.py +8 -10
  2. wds_client/api/__init__.py +1 -2
  3. wds_client/api/capabilities_api.py +237 -102
  4. wds_client/api/cloning_api.py +782 -329
  5. wds_client/api/general_wds_information_api.py +463 -191
  6. wds_client/api/import_api.py +288 -127
  7. wds_client/api/instances_api.py +783 -333
  8. wds_client/api/job_api.py +518 -215
  9. wds_client/api/records_api.py +2512 -1089
  10. wds_client/api/schema_api.py +1450 -626
  11. wds_client/api_client.py +414 -310
  12. wds_client/api_response.py +21 -0
  13. wds_client/configuration.py +110 -53
  14. wds_client/exceptions.py +99 -20
  15. wds_client/models/__init__.py +4 -8
  16. wds_client/models/app.py +68 -125
  17. wds_client/models/attribute_data_type.py +31 -94
  18. wds_client/models/attribute_schema.py +71 -157
  19. wds_client/models/attribute_schema_update.py +69 -127
  20. wds_client/models/backup_job.py +96 -298
  21. wds_client/models/backup_response.py +70 -157
  22. wds_client/models/backup_restore_request.py +68 -129
  23. wds_client/models/batch_operation.py +83 -137
  24. wds_client/models/batch_record_request.py +70 -160
  25. wds_client/models/batch_response.py +68 -127
  26. wds_client/models/build.py +79 -207
  27. wds_client/models/capabilities.py +83 -103
  28. wds_client/models/clone_job.py +96 -298
  29. wds_client/models/clone_response.py +68 -129
  30. wds_client/models/commit.py +69 -125
  31. wds_client/models/error_response.py +78 -222
  32. wds_client/models/generic_job.py +102 -334
  33. wds_client/models/git.py +76 -129
  34. wds_client/models/import_request.py +77 -165
  35. wds_client/models/job.py +87 -243
  36. wds_client/models/job_v1.py +97 -277
  37. wds_client/models/record_query_response.py +86 -162
  38. wds_client/models/record_request.py +60 -96
  39. wds_client/models/record_response.py +70 -160
  40. wds_client/models/record_type_schema.py +84 -191
  41. wds_client/models/search_filter.py +60 -95
  42. wds_client/models/search_request.py +84 -220
  43. wds_client/models/search_sort_direction.py +17 -80
  44. wds_client/models/status_response.py +68 -125
  45. wds_client/models/tsv_upload_response.py +68 -127
  46. wds_client/models/version_response.py +86 -155
  47. wds_client/py.typed +0 -0
  48. wds_client/rest.py +136 -170
  49. wds_client-0.9.0.dist-info/METADATA +17 -0
  50. wds_client-0.9.0.dist-info/RECORD +52 -0
  51. {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/WHEEL +1 -1
  52. wds_client/models/backup_job_all_of.py +0 -148
  53. wds_client/models/clone_job_all_of.py +0 -148
  54. wds_client/models/generic_job_all_of.py +0 -150
  55. wds_client/models/inline_object.py +0 -123
  56. wds_client-0.7.0.dist-info/METADATA +0 -16
  57. wds_client-0.7.0.dist-info/RECORD +0 -54
  58. {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/top_level.txt +0 -0
@@ -3,118 +3,98 @@
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
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
11
13
 
12
14
 
15
+ from __future__ import annotations
13
16
  import pprint
14
17
  import re # noqa: F401
18
+ import json
15
19
 
16
- import six
17
-
18
- from wds_client.configuration import Configuration
19
-
20
+ from pydantic import BaseModel, ConfigDict, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
20
24
 
21
- class Capabilities(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
25
+ class Capabilities(BaseModel):
34
26
  """
35
- openapi_types = {
36
- 'capabilities': 'bool'
37
- }
38
-
39
- attribute_map = {
40
- 'capabilities': 'capabilities'
41
- }
42
-
43
- def __init__(self, capabilities=None, local_vars_configuration=None): # noqa: E501
44
- """Capabilities - a model defined in OpenAPI""" # noqa: E501
45
- if local_vars_configuration is None:
46
- local_vars_configuration = Configuration()
47
- self.local_vars_configuration = local_vars_configuration
48
-
49
- self._capabilities = None
50
- self.discriminator = None
51
-
52
- if capabilities is not None:
53
- self.capabilities = capabilities
54
-
55
- @property
56
- def capabilities(self):
57
- """Gets the capabilities of this Capabilities. # noqa: E501
58
-
59
-
60
- :return: The capabilities of this Capabilities. # noqa: E501
61
- :rtype: bool
27
+ Capabilities
28
+ """ # noqa: E501
29
+ capabilities: Optional[StrictBool] = None
30
+ additional_properties: Dict[str, Any] = {}
31
+ __properties: ClassVar[List[str]] = ["capabilities"]
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 Capabilities 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
+ * Fields in `self.additional_properties` are added to the output dict.
62
64
  """
63
- return self._capabilities
64
-
65
- @capabilities.setter
66
- def capabilities(self, capabilities):
67
- """Sets the capabilities of this Capabilities.
65
+ excluded_fields: Set[str] = set([
66
+ "additional_properties",
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # puts key-value pairs in additional_properties in the top level
75
+ if self.additional_properties is not None:
76
+ for _key, _value in self.additional_properties.items():
77
+ _dict[_key] = _value
78
+
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of Capabilities from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "capabilities": obj.get("capabilities")
92
+ })
93
+ # store additional fields in additional_properties
94
+ for _key in obj.keys():
95
+ if _key not in cls.__properties:
96
+ _obj.additional_properties[_key] = obj.get(_key)
97
+
98
+ return _obj
68
99
 
69
100
 
70
- :param capabilities: The capabilities of this Capabilities. # noqa: E501
71
- :type: bool
72
- """
73
-
74
- self._capabilities = capabilities
75
-
76
- def to_dict(self):
77
- """Returns the model properties as a dict"""
78
- result = {}
79
-
80
- for attr, _ in six.iteritems(self.openapi_types):
81
- value = getattr(self, attr)
82
- if isinstance(value, list):
83
- result[attr] = list(map(
84
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
85
- value
86
- ))
87
- elif hasattr(value, "to_dict"):
88
- result[attr] = value.to_dict()
89
- elif isinstance(value, dict):
90
- result[attr] = dict(map(
91
- lambda item: (item[0], item[1].to_dict())
92
- if hasattr(item[1], "to_dict") else item,
93
- value.items()
94
- ))
95
- else:
96
- result[attr] = value
97
-
98
- return result
99
-
100
- def to_str(self):
101
- """Returns the string representation of the model"""
102
- return pprint.pformat(self.to_dict())
103
-
104
- def __repr__(self):
105
- """For `print` and `pprint`"""
106
- return self.to_str()
107
-
108
- def __eq__(self, other):
109
- """Returns true if both objects are equal"""
110
- if not isinstance(other, Capabilities):
111
- return False
112
-
113
- return self.to_dict() == other.to_dict()
114
-
115
- def __ne__(self, other):
116
- """Returns true if both objects are not equal"""
117
- if not isinstance(other, Capabilities):
118
- return True
119
-
120
- return self.to_dict() != other.to_dict()
@@ -3,312 +3,110 @@
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
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
11
13
 
12
14
 
15
+ from __future__ import annotations
13
16
  import pprint
14
17
  import re # noqa: F401
18
+ import json
15
19
 
16
- import six
17
-
18
- from wds_client.configuration import Configuration
19
-
20
-
21
- class CloneJob(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from wds_client.models.clone_response import CloneResponse
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class CloneJob(BaseModel):
28
27
  """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'job_id': 'str',
37
- 'job_type': 'str',
38
- 'status': 'str',
39
- 'created': 'str',
40
- 'updated': 'str',
41
- 'error_message': 'str',
42
- 'input': 'object',
43
- 'result': 'CloneResponse'
44
- }
45
-
46
- attribute_map = {
47
- 'job_id': 'jobId',
48
- 'job_type': 'jobType',
49
- 'status': 'status',
50
- 'created': 'created',
51
- 'updated': 'updated',
52
- 'error_message': 'errorMessage',
53
- 'input': 'input',
54
- 'result': 'result'
55
- }
56
-
57
- def __init__(self, job_id=None, job_type=None, status=None, created=None, updated=None, error_message=None, input=None, result=None, local_vars_configuration=None): # noqa: E501
58
- """CloneJob - a model defined in OpenAPI""" # noqa: E501
59
- if local_vars_configuration is None:
60
- local_vars_configuration = Configuration()
61
- self.local_vars_configuration = local_vars_configuration
62
-
63
- self._job_id = None
64
- self._job_type = None
65
- self._status = None
66
- self._created = None
67
- self._updated = None
68
- self._error_message = None
69
- self._input = None
70
- self._result = None
71
- self.discriminator = None
72
-
73
- self.job_id = job_id
74
- if job_type is not None:
75
- self.job_type = job_type
76
- self.status = status
77
- self.created = created
78
- self.updated = updated
79
- if error_message is not None:
80
- self.error_message = error_message
81
- if input is not None:
82
- self.input = input
83
- if result is not None:
84
- self.result = result
85
-
86
- @property
87
- def job_id(self):
88
- """Gets the job_id of this CloneJob. # noqa: E501
89
-
90
-
91
- :return: The job_id of this CloneJob. # noqa: E501
92
- :rtype: str
93
- """
94
- return self._job_id
95
-
96
- @job_id.setter
97
- def job_id(self, job_id):
98
- """Sets the job_id of this CloneJob.
99
-
100
-
101
- :param job_id: The job_id of this CloneJob. # noqa: E501
102
- :type: str
103
- """
104
- if self.local_vars_configuration.client_side_validation and job_id is None: # noqa: E501
105
- raise ValueError("Invalid value for `job_id`, must not be `None`") # noqa: E501
106
-
107
- self._job_id = job_id
108
-
109
- @property
110
- def job_type(self):
111
- """Gets the job_type of this CloneJob. # noqa: E501
112
-
113
-
114
- :return: The job_type of this CloneJob. # noqa: E501
115
- :rtype: str
116
- """
117
- return self._job_type
118
-
119
- @job_type.setter
120
- def job_type(self, job_type):
121
- """Sets the job_type of this CloneJob.
122
-
123
-
124
- :param job_type: The job_type of this CloneJob. # noqa: E501
125
- :type: str
126
- """
127
-
128
- self._job_type = job_type
129
-
130
- @property
131
- def status(self):
132
- """Gets the status of this CloneJob. # noqa: E501
133
-
134
-
135
- :return: The status of this CloneJob. # noqa: E501
136
- :rtype: str
137
- """
138
- return self._status
139
-
140
- @status.setter
141
- def status(self, status):
142
- """Sets the status of this CloneJob.
143
-
144
-
145
- :param status: The status of this CloneJob. # noqa: E501
146
- :type: str
147
- """
148
- if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
149
- raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
150
- allowed_values = ["QUEUED", "RUNNING", "SUCCEEDED", "ERROR", "CANCELLED", "UNKNOWN"] # noqa: E501
151
- if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
152
- raise ValueError(
153
- "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
154
- .format(status, allowed_values)
155
- )
156
-
157
- self._status = status
158
-
159
- @property
160
- def created(self):
161
- """Gets the created of this CloneJob. # noqa: E501
162
-
163
-
164
- :return: The created of this CloneJob. # noqa: E501
165
- :rtype: str
166
- """
167
- return self._created
168
-
169
- @created.setter
170
- def created(self, created):
171
- """Sets the created of this CloneJob.
172
-
173
-
174
- :param created: The created of this CloneJob. # noqa: E501
175
- :type: str
176
- """
177
- if self.local_vars_configuration.client_side_validation and created is None: # noqa: E501
178
- raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501
179
-
180
- self._created = created
181
-
182
- @property
183
- def updated(self):
184
- """Gets the updated of this CloneJob. # noqa: E501
185
-
186
-
187
- :return: The updated of this CloneJob. # noqa: E501
188
- :rtype: str
189
- """
190
- return self._updated
191
-
192
- @updated.setter
193
- def updated(self, updated):
194
- """Sets the updated of this CloneJob.
195
-
196
-
197
- :param updated: The updated of this CloneJob. # noqa: E501
198
- :type: str
199
- """
200
- if self.local_vars_configuration.client_side_validation and updated is None: # noqa: E501
201
- raise ValueError("Invalid value for `updated`, must not be `None`") # noqa: E501
202
-
203
- self._updated = updated
204
-
205
- @property
206
- def error_message(self):
207
- """Gets the error_message of this CloneJob. # noqa: E501
208
-
209
-
210
- :return: The error_message of this CloneJob. # noqa: E501
211
- :rtype: str
212
- """
213
- return self._error_message
214
-
215
- @error_message.setter
216
- def error_message(self, error_message):
217
- """Sets the error_message of this CloneJob.
218
-
219
-
220
- :param error_message: The error_message of this CloneJob. # noqa: E501
221
- :type: str
222
- """
223
-
224
- self._error_message = error_message
225
-
226
- @property
227
- def input(self):
228
- """Gets the input of this CloneJob. # noqa: E501
229
-
230
- Input arguments; expected to be empty. # noqa: E501
231
-
232
- :return: The input of this CloneJob. # noqa: E501
233
- :rtype: object
234
- """
235
- return self._input
236
-
237
- @input.setter
238
- def input(self, input):
239
- """Sets the input of this CloneJob.
240
-
241
- Input arguments; expected to be empty. # noqa: E501
242
-
243
- :param input: The input of this CloneJob. # noqa: E501
244
- :type: object
245
- """
246
-
247
- self._input = input
248
-
249
- @property
250
- def result(self):
251
- """Gets the result of this CloneJob. # noqa: E501
252
-
253
-
254
- :return: The result of this CloneJob. # noqa: E501
255
- :rtype: CloneResponse
256
- """
257
- return self._result
258
-
259
- @result.setter
260
- def result(self, result):
261
- """Sets the result of this CloneJob.
262
-
263
-
264
- :param result: The result of this CloneJob. # noqa: E501
265
- :type: CloneResponse
266
- """
267
-
268
- self._result = result
269
-
270
- def to_dict(self):
271
- """Returns the model properties as a dict"""
272
- result = {}
273
-
274
- for attr, _ in six.iteritems(self.openapi_types):
275
- value = getattr(self, attr)
276
- if isinstance(value, list):
277
- result[attr] = list(map(
278
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
279
- value
280
- ))
281
- elif hasattr(value, "to_dict"):
282
- result[attr] = value.to_dict()
283
- elif isinstance(value, dict):
284
- result[attr] = dict(map(
285
- lambda item: (item[0], item[1].to_dict())
286
- if hasattr(item[1], "to_dict") else item,
287
- value.items()
288
- ))
289
- else:
290
- result[attr] = value
291
-
292
- return result
293
-
294
- def to_str(self):
295
- """Returns the string representation of the model"""
296
- return pprint.pformat(self.to_dict())
297
-
298
- def __repr__(self):
299
- """For `print` and `pprint`"""
300
- return self.to_str()
301
-
302
- def __eq__(self, other):
303
- """Returns true if both objects are equal"""
304
- if not isinstance(other, CloneJob):
305
- return False
306
-
307
- return self.to_dict() == other.to_dict()
28
+ CloneJob
29
+ """ # noqa: E501
30
+ job_id: StrictStr = Field(alias="jobId")
31
+ job_type: Optional[StrictStr] = Field(default=None, alias="jobType")
32
+ status: StrictStr
33
+ created: StrictStr
34
+ updated: StrictStr
35
+ error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
36
+ input: Optional[Dict[str, Any]] = Field(default=None, description="Input arguments; expected to be empty.")
37
+ result: Optional[CloneResponse] = None
38
+ __properties: ClassVar[List[str]] = ["jobId", "jobType", "status", "created", "updated", "errorMessage", "input", "result"]
39
+
40
+ @field_validator('status')
41
+ def status_validate_enum(cls, value):
42
+ """Validates the enum"""
43
+ if value not in set(['QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN']):
44
+ raise ValueError("must be one of enum values ('QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN')")
45
+ return value
46
+
47
+ model_config = ConfigDict(
48
+ populate_by_name=True,
49
+ validate_assignment=True,
50
+ protected_namespaces=(),
51
+ )
52
+
53
+
54
+ def to_str(self) -> str:
55
+ """Returns the string representation of the model using alias"""
56
+ return pprint.pformat(self.model_dump(by_alias=True))
57
+
58
+ def to_json(self) -> str:
59
+ """Returns the JSON representation of the model using alias"""
60
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
61
+ return json.dumps(self.to_dict())
62
+
63
+ @classmethod
64
+ def from_json(cls, json_str: str) -> Optional[Self]:
65
+ """Create an instance of CloneJob from a JSON string"""
66
+ return cls.from_dict(json.loads(json_str))
67
+
68
+ def to_dict(self) -> Dict[str, Any]:
69
+ """Return the dictionary representation of the model using alias.
70
+
71
+ This has the following differences from calling pydantic's
72
+ `self.model_dump(by_alias=True)`:
73
+
74
+ * `None` is only added to the output dict for nullable fields that
75
+ were set at model initialization. Other fields with value `None`
76
+ are ignored.
77
+ """
78
+ excluded_fields: Set[str] = set([
79
+ ])
80
+
81
+ _dict = self.model_dump(
82
+ by_alias=True,
83
+ exclude=excluded_fields,
84
+ exclude_none=True,
85
+ )
86
+ # override the default output from pydantic by calling `to_dict()` of result
87
+ if self.result:
88
+ _dict['result'] = self.result.to_dict()
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of CloneJob from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "jobId": obj.get("jobId"),
102
+ "jobType": obj.get("jobType"),
103
+ "status": obj.get("status"),
104
+ "created": obj.get("created"),
105
+ "updated": obj.get("updated"),
106
+ "errorMessage": obj.get("errorMessage"),
107
+ "input": obj.get("input"),
108
+ "result": CloneResponse.from_dict(obj["result"]) if obj.get("result") is not None else None
109
+ })
110
+ return _obj
308
111
 
309
- def __ne__(self, other):
310
- """Returns true if both objects are not equal"""
311
- if not isinstance(other, CloneJob):
312
- return True
313
112
 
314
- return self.to_dict() != other.to_dict()