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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. wds_client/__init__.py +8 -10
  2. wds_client/api/__init__.py +1 -2
  3. wds_client/api/capabilities_api.py +237 -102
  4. wds_client/api/cloning_api.py +782 -329
  5. wds_client/api/general_wds_information_api.py +463 -191
  6. wds_client/api/import_api.py +288 -127
  7. wds_client/api/instances_api.py +783 -333
  8. wds_client/api/job_api.py +518 -215
  9. wds_client/api/records_api.py +2512 -1089
  10. wds_client/api/schema_api.py +1450 -626
  11. wds_client/api_client.py +414 -310
  12. wds_client/api_response.py +21 -0
  13. wds_client/configuration.py +110 -53
  14. wds_client/exceptions.py +99 -20
  15. wds_client/models/__init__.py +4 -8
  16. wds_client/models/app.py +68 -125
  17. wds_client/models/attribute_data_type.py +31 -94
  18. wds_client/models/attribute_schema.py +71 -157
  19. wds_client/models/attribute_schema_update.py +69 -127
  20. wds_client/models/backup_job.py +96 -298
  21. wds_client/models/backup_response.py +70 -157
  22. wds_client/models/backup_restore_request.py +68 -129
  23. wds_client/models/batch_operation.py +83 -137
  24. wds_client/models/batch_record_request.py +70 -160
  25. wds_client/models/batch_response.py +68 -127
  26. wds_client/models/build.py +79 -207
  27. wds_client/models/capabilities.py +83 -103
  28. wds_client/models/clone_job.py +96 -298
  29. wds_client/models/clone_response.py +68 -129
  30. wds_client/models/commit.py +69 -125
  31. wds_client/models/error_response.py +78 -222
  32. wds_client/models/generic_job.py +102 -334
  33. wds_client/models/git.py +76 -129
  34. wds_client/models/import_request.py +77 -165
  35. wds_client/models/job.py +87 -243
  36. wds_client/models/job_v1.py +97 -277
  37. wds_client/models/record_query_response.py +86 -162
  38. wds_client/models/record_request.py +60 -96
  39. wds_client/models/record_response.py +70 -160
  40. wds_client/models/record_type_schema.py +84 -191
  41. wds_client/models/search_filter.py +60 -95
  42. wds_client/models/search_request.py +84 -220
  43. wds_client/models/search_sort_direction.py +17 -80
  44. wds_client/models/status_response.py +68 -125
  45. wds_client/models/tsv_upload_response.py +68 -127
  46. wds_client/models/version_response.py +86 -155
  47. wds_client/py.typed +0 -0
  48. wds_client/rest.py +136 -170
  49. wds_client-0.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,146 +3,88 @@
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 AttributeSchemaUpdate(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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from wds_client.models.attribute_data_type import AttributeDataType
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class AttributeSchemaUpdate(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
- 'name': 'str',
37
- 'datatype': 'AttributeDataType'
38
- }
39
-
40
- attribute_map = {
41
- 'name': 'name',
42
- 'datatype': 'datatype'
43
- }
44
-
45
- def __init__(self, name=None, datatype=None, local_vars_configuration=None): # noqa: E501
46
- """AttributeSchemaUpdate - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._name = None
52
- self._datatype = None
53
- self.discriminator = None
54
-
55
- if name is not None:
56
- self.name = name
57
- if datatype is not None:
58
- self.datatype = datatype
59
-
60
- @property
61
- def name(self):
62
- """Gets the name of this AttributeSchemaUpdate. # noqa: E501
63
-
64
- new name of this attribute. # noqa: E501
65
-
66
- :return: The name of this AttributeSchemaUpdate. # noqa: E501
67
- :rtype: str
28
+ AttributeSchemaUpdate
29
+ """ # noqa: E501
30
+ name: Optional[StrictStr] = Field(default=None, description="new name of this attribute.")
31
+ datatype: Optional[AttributeDataType] = None
32
+ __properties: ClassVar[List[str]] = ["name", "datatype"]
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 AttributeSchemaUpdate 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.
68
64
  """
69
- return self._name
70
-
71
- @name.setter
72
- def name(self, name):
73
- """Sets the name of this AttributeSchemaUpdate.
65
+ excluded_fields: Set[str] = set([
66
+ ])
74
67
 
75
- new name of this attribute. # noqa: E501
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
76
74
 
77
- :param name: The name of this AttributeSchemaUpdate. # noqa: E501
78
- :type: str
79
- """
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of AttributeSchemaUpdate from a dict"""
78
+ if obj is None:
79
+ return None
80
80
 
81
- self._name = name
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
82
83
 
83
- @property
84
- def datatype(self):
85
- """Gets the datatype of this AttributeSchemaUpdate. # noqa: E501
84
+ _obj = cls.model_validate({
85
+ "name": obj.get("name"),
86
+ "datatype": obj.get("datatype")
87
+ })
88
+ return _obj
86
89
 
87
90
 
88
- :return: The datatype of this AttributeSchemaUpdate. # noqa: E501
89
- :rtype: AttributeDataType
90
- """
91
- return self._datatype
92
-
93
- @datatype.setter
94
- def datatype(self, datatype):
95
- """Sets the datatype of this AttributeSchemaUpdate.
96
-
97
-
98
- :param datatype: The datatype of this AttributeSchemaUpdate. # noqa: E501
99
- :type: AttributeDataType
100
- """
101
-
102
- self._datatype = datatype
103
-
104
- def to_dict(self):
105
- """Returns the model properties as a dict"""
106
- result = {}
107
-
108
- for attr, _ in six.iteritems(self.openapi_types):
109
- value = getattr(self, attr)
110
- if isinstance(value, list):
111
- result[attr] = list(map(
112
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
113
- value
114
- ))
115
- elif hasattr(value, "to_dict"):
116
- result[attr] = value.to_dict()
117
- elif isinstance(value, dict):
118
- result[attr] = dict(map(
119
- lambda item: (item[0], item[1].to_dict())
120
- if hasattr(item[1], "to_dict") else item,
121
- value.items()
122
- ))
123
- else:
124
- result[attr] = value
125
-
126
- return result
127
-
128
- def to_str(self):
129
- """Returns the string representation of the model"""
130
- return pprint.pformat(self.to_dict())
131
-
132
- def __repr__(self):
133
- """For `print` and `pprint`"""
134
- return self.to_str()
135
-
136
- def __eq__(self, other):
137
- """Returns true if both objects are equal"""
138
- if not isinstance(other, AttributeSchemaUpdate):
139
- return False
140
-
141
- return self.to_dict() == other.to_dict()
142
-
143
- def __ne__(self, other):
144
- """Returns true if both objects are not equal"""
145
- if not isinstance(other, AttributeSchemaUpdate):
146
- return True
147
-
148
- 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 BackupJob(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.backup_response import BackupResponse
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class BackupJob(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': 'BackupResponse'
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
- """BackupJob - 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 BackupJob. # noqa: E501
89
-
90
-
91
- :return: The job_id of this BackupJob. # 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 BackupJob.
99
-
100
-
101
- :param job_id: The job_id of this BackupJob. # 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 BackupJob. # noqa: E501
112
-
113
-
114
- :return: The job_type of this BackupJob. # 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 BackupJob.
122
-
123
-
124
- :param job_type: The job_type of this BackupJob. # 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 BackupJob. # noqa: E501
133
-
134
-
135
- :return: The status of this BackupJob. # 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 BackupJob.
143
-
144
-
145
- :param status: The status of this BackupJob. # 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 BackupJob. # noqa: E501
162
-
163
-
164
- :return: The created of this BackupJob. # 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 BackupJob.
172
-
173
-
174
- :param created: The created of this BackupJob. # 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 BackupJob. # noqa: E501
185
-
186
-
187
- :return: The updated of this BackupJob. # 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 BackupJob.
195
-
196
-
197
- :param updated: The updated of this BackupJob. # 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 BackupJob. # noqa: E501
208
-
209
-
210
- :return: The error_message of this BackupJob. # 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 BackupJob.
218
-
219
-
220
- :param error_message: The error_message of this BackupJob. # 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 BackupJob. # noqa: E501
229
-
230
- Input arguments; expected to be empty. # noqa: E501
231
-
232
- :return: The input of this BackupJob. # 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 BackupJob.
240
-
241
- Input arguments; expected to be empty. # noqa: E501
242
-
243
- :param input: The input of this BackupJob. # noqa: E501
244
- :type: object
245
- """
246
-
247
- self._input = input
248
-
249
- @property
250
- def result(self):
251
- """Gets the result of this BackupJob. # noqa: E501
252
-
253
-
254
- :return: The result of this BackupJob. # noqa: E501
255
- :rtype: BackupResponse
256
- """
257
- return self._result
258
-
259
- @result.setter
260
- def result(self, result):
261
- """Sets the result of this BackupJob.
262
-
263
-
264
- :param result: The result of this BackupJob. # noqa: E501
265
- :type: BackupResponse
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, BackupJob):
305
- return False
306
-
307
- return self.to_dict() == other.to_dict()
28
+ BackupJob
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[BackupResponse] = 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 BackupJob 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 BackupJob 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": BackupResponse.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, BackupJob):
312
- return True
313
112
 
314
- return self.to_dict() != other.to_dict()