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,237 +3,93 @@
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 ErrorResponse(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, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
27
24
 
25
+ class ErrorResponse(BaseModel):
28
26
  """
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
- 'status': 'int',
37
- 'error': 'str',
38
- 'message': 'str',
39
- 'path': 'str',
40
- 'timestamp': 'str'
41
- }
42
-
43
- attribute_map = {
44
- 'status': 'status',
45
- 'error': 'error',
46
- 'message': 'message',
47
- 'path': 'path',
48
- 'timestamp': 'timestamp'
49
- }
50
-
51
- def __init__(self, status=None, error=None, message=None, path=None, timestamp=None, local_vars_configuration=None): # noqa: E501
52
- """ErrorResponse - a model defined in OpenAPI""" # noqa: E501
53
- if local_vars_configuration is None:
54
- local_vars_configuration = Configuration()
55
- self.local_vars_configuration = local_vars_configuration
56
-
57
- self._status = None
58
- self._error = None
59
- self._message = None
60
- self._path = None
61
- self._timestamp = None
62
- self.discriminator = None
63
-
64
- self.status = status
65
- self.error = error
66
- self.message = message
67
- self.path = path
68
- self.timestamp = timestamp
69
-
70
- @property
71
- def status(self):
72
- """Gets the status of this ErrorResponse. # noqa: E501
73
-
74
- HTTP status code # noqa: E501
75
-
76
- :return: The status of this ErrorResponse. # noqa: E501
77
- :rtype: int
78
- """
79
- return self._status
80
-
81
- @status.setter
82
- def status(self, status):
83
- """Sets the status of this ErrorResponse.
84
-
85
- HTTP status code # noqa: E501
86
-
87
- :param status: The status of this ErrorResponse. # noqa: E501
88
- :type: int
89
- """
90
- if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
91
- raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
92
-
93
- self._status = status
94
-
95
- @property
96
- def error(self):
97
- """Gets the error of this ErrorResponse. # noqa: E501
98
-
99
- error # noqa: E501
100
-
101
- :return: The error of this ErrorResponse. # noqa: E501
102
- :rtype: str
103
- """
104
- return self._error
105
-
106
- @error.setter
107
- def error(self, error):
108
- """Sets the error of this ErrorResponse.
109
-
110
- error # noqa: E501
111
-
112
- :param error: The error of this ErrorResponse. # noqa: E501
113
- :type: str
114
- """
115
- if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501
116
- raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501
117
-
118
- self._error = error
119
-
120
- @property
121
- def message(self):
122
- """Gets the message of this ErrorResponse. # noqa: E501
123
-
124
- error message # noqa: E501
125
-
126
- :return: The message of this ErrorResponse. # noqa: E501
127
- :rtype: str
128
- """
129
- return self._message
130
-
131
- @message.setter
132
- def message(self, message):
133
- """Sets the message of this ErrorResponse.
134
-
135
- error message # noqa: E501
136
-
137
- :param message: The message of this ErrorResponse. # noqa: E501
138
- :type: str
139
- """
140
- if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501
141
- raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
142
-
143
- self._message = message
144
-
145
- @property
146
- def path(self):
147
- """Gets the path of this ErrorResponse. # noqa: E501
148
-
149
- requested record path # noqa: E501
150
-
151
- :return: The path of this ErrorResponse. # noqa: E501
152
- :rtype: str
153
- """
154
- return self._path
155
-
156
- @path.setter
157
- def path(self, path):
158
- """Sets the path of this ErrorResponse.
159
-
160
- requested record path # noqa: E501
161
-
162
- :param path: The path of this ErrorResponse. # noqa: E501
163
- :type: str
164
- """
165
- if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501
166
- raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501
167
-
168
- self._path = path
169
-
170
- @property
171
- def timestamp(self):
172
- """Gets the timestamp of this ErrorResponse. # noqa: E501
173
-
174
- time of error # noqa: E501
175
-
176
- :return: The timestamp of this ErrorResponse. # noqa: E501
177
- :rtype: str
27
+
28
+ """ # noqa: E501
29
+ status: StrictInt = Field(description="HTTP status code")
30
+ error: StrictStr = Field(description="error")
31
+ message: StrictStr = Field(description="error message")
32
+ path: StrictStr = Field(description="requested record path")
33
+ timestamp: StrictStr = Field(description="time of error")
34
+ __properties: ClassVar[List[str]] = ["status", "error", "message", "path", "timestamp"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of ErrorResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
178
66
  """
179
- return self._timestamp
180
-
181
- @timestamp.setter
182
- def timestamp(self, timestamp):
183
- """Sets the timestamp of this ErrorResponse.
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of ErrorResponse 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
+ "status": obj.get("status"),
88
+ "error": obj.get("error"),
89
+ "message": obj.get("message"),
90
+ "path": obj.get("path"),
91
+ "timestamp": obj.get("timestamp")
92
+ })
93
+ return _obj
184
94
 
185
- time of error # noqa: E501
186
95
 
187
- :param timestamp: The timestamp of this ErrorResponse. # noqa: E501
188
- :type: str
189
- """
190
- if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501
191
- raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
192
-
193
- self._timestamp = timestamp
194
-
195
- def to_dict(self):
196
- """Returns the model properties as a dict"""
197
- result = {}
198
-
199
- for attr, _ in six.iteritems(self.openapi_types):
200
- value = getattr(self, attr)
201
- if isinstance(value, list):
202
- result[attr] = list(map(
203
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
204
- value
205
- ))
206
- elif hasattr(value, "to_dict"):
207
- result[attr] = value.to_dict()
208
- elif isinstance(value, dict):
209
- result[attr] = dict(map(
210
- lambda item: (item[0], item[1].to_dict())
211
- if hasattr(item[1], "to_dict") else item,
212
- value.items()
213
- ))
214
- else:
215
- result[attr] = value
216
-
217
- return result
218
-
219
- def to_str(self):
220
- """Returns the string representation of the model"""
221
- return pprint.pformat(self.to_dict())
222
-
223
- def __repr__(self):
224
- """For `print` and `pprint`"""
225
- return self.to_str()
226
-
227
- def __eq__(self, other):
228
- """Returns true if both objects are equal"""
229
- if not isinstance(other, ErrorResponse):
230
- return False
231
-
232
- return self.to_dict() == other.to_dict()
233
-
234
- def __ne__(self, other):
235
- """Returns true if both objects are not equal"""
236
- if not isinstance(other, ErrorResponse):
237
- return True
238
-
239
- return self.to_dict() != other.to_dict()