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,152 +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
-
21
- class BatchOperation(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, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from wds_client.models.batch_record_request import BatchRecordRequest
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class BatchOperation(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
- 'operation': 'str',
37
- 'record': 'BatchRecordRequest'
38
- }
39
-
40
- attribute_map = {
41
- 'operation': 'operation',
42
- 'record': 'record'
43
- }
44
-
45
- def __init__(self, operation=None, record=None, local_vars_configuration=None): # noqa: E501
46
- """BatchOperation - 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._operation = None
52
- self._record = None
53
- self.discriminator = None
54
-
55
- self.operation = operation
56
- self.record = record
57
-
58
- @property
59
- def operation(self):
60
- """Gets the operation of this BatchOperation. # noqa: E501
61
-
62
-
63
- :return: The operation of this BatchOperation. # noqa: E501
64
- :rtype: str
65
- """
66
- return self._operation
67
-
68
- @operation.setter
69
- def operation(self, operation):
70
- """Sets the operation of this BatchOperation.
71
-
72
-
73
- :param operation: The operation of this BatchOperation. # noqa: E501
74
- :type: str
28
+ BatchOperation
29
+ """ # noqa: E501
30
+ operation: StrictStr
31
+ record: BatchRecordRequest
32
+ __properties: ClassVar[List[str]] = ["operation", "record"]
33
+
34
+ @field_validator('operation')
35
+ def operation_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['upsert', 'delete']):
38
+ raise ValueError("must be one of enum values ('upsert', 'delete')")
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 BatchOperation 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.
75
71
  """
76
- if self.local_vars_configuration.client_side_validation and operation is None: # noqa: E501
77
- raise ValueError("Invalid value for `operation`, must not be `None`") # noqa: E501
78
- allowed_values = ["upsert", "delete"] # noqa: E501
79
- if self.local_vars_configuration.client_side_validation and operation not in allowed_values: # noqa: E501
80
- raise ValueError(
81
- "Invalid value for `operation` ({0}), must be one of {1}" # noqa: E501
82
- .format(operation, allowed_values)
83
- )
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
+ # override the default output from pydantic by calling `to_dict()` of record
81
+ if self.record:
82
+ _dict['record'] = self.record.to_dict()
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of BatchOperation from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "operation": obj.get("operation"),
96
+ "record": BatchRecordRequest.from_dict(obj["record"]) if obj.get("record") is not None else None
97
+ })
98
+ return _obj
84
99
 
85
- self._operation = operation
86
100
 
87
- @property
88
- def record(self):
89
- """Gets the record of this BatchOperation. # noqa: E501
90
-
91
-
92
- :return: The record of this BatchOperation. # noqa: E501
93
- :rtype: BatchRecordRequest
94
- """
95
- return self._record
96
-
97
- @record.setter
98
- def record(self, record):
99
- """Sets the record of this BatchOperation.
100
-
101
-
102
- :param record: The record of this BatchOperation. # noqa: E501
103
- :type: BatchRecordRequest
104
- """
105
- if self.local_vars_configuration.client_side_validation and record is None: # noqa: E501
106
- raise ValueError("Invalid value for `record`, must not be `None`") # noqa: E501
107
-
108
- self._record = record
109
-
110
- def to_dict(self):
111
- """Returns the model properties as a dict"""
112
- result = {}
113
-
114
- for attr, _ in six.iteritems(self.openapi_types):
115
- value = getattr(self, attr)
116
- if isinstance(value, list):
117
- result[attr] = list(map(
118
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
119
- value
120
- ))
121
- elif hasattr(value, "to_dict"):
122
- result[attr] = value.to_dict()
123
- elif isinstance(value, dict):
124
- result[attr] = dict(map(
125
- lambda item: (item[0], item[1].to_dict())
126
- if hasattr(item[1], "to_dict") else item,
127
- value.items()
128
- ))
129
- else:
130
- result[attr] = value
131
-
132
- return result
133
-
134
- def to_str(self):
135
- """Returns the string representation of the model"""
136
- return pprint.pformat(self.to_dict())
137
-
138
- def __repr__(self):
139
- """For `print` and `pprint`"""
140
- return self.to_str()
141
-
142
- def __eq__(self, other):
143
- """Returns true if both objects are equal"""
144
- if not isinstance(other, BatchOperation):
145
- return False
146
-
147
- return self.to_dict() == other.to_dict()
148
-
149
- def __ne__(self, other):
150
- """Returns true if both objects are not equal"""
151
- if not isinstance(other, BatchOperation):
152
- return True
153
-
154
- return self.to_dict() != other.to_dict()
@@ -3,179 +3,89 @@
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
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
19
24
 
20
-
21
- class BatchRecordRequest(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.
25
+ class BatchRecordRequest(BaseModel):
26
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.
34
- """
35
- openapi_types = {
36
- 'id': 'str',
37
- 'type': 'str',
38
- 'attributes': 'dict(str, object)'
39
- }
40
-
41
- attribute_map = {
42
- 'id': 'id',
43
- 'type': 'type',
44
- 'attributes': 'attributes'
45
- }
46
-
47
- def __init__(self, id=None, type=None, attributes=None, local_vars_configuration=None): # noqa: E501
48
- """BatchRecordRequest - a model defined in OpenAPI""" # noqa: E501
49
- if local_vars_configuration is None:
50
- local_vars_configuration = Configuration()
51
- self.local_vars_configuration = local_vars_configuration
52
-
53
- self._id = None
54
- self._type = None
55
- self._attributes = None
56
- self.discriminator = None
57
-
58
- self.id = id
59
- self.type = type
60
- self.attributes = attributes
61
-
62
- @property
63
- def id(self):
64
- """Gets the id of this BatchRecordRequest. # noqa: E501
65
-
66
- Record id # noqa: E501
67
-
68
- :return: The id of this BatchRecordRequest. # noqa: E501
69
- :rtype: str
70
- """
71
- return self._id
72
-
73
- @id.setter
74
- def id(self, id):
75
- """Sets the id of this BatchRecordRequest.
76
-
77
- Record id # noqa: E501
78
-
79
- :param id: The id of this BatchRecordRequest. # noqa: E501
80
- :type: str
27
+ BatchRecordRequest
28
+ """ # noqa: E501
29
+ id: StrictStr = Field(description="Record id")
30
+ type: StrictStr = Field(description="Record type")
31
+ attributes: Dict[str, Any] = Field(description="KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores.")
32
+ __properties: ClassVar[List[str]] = ["id", "type", "attributes"]
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 BatchRecordRequest 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.
81
64
  """
82
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
83
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
84
-
85
- self._id = id
65
+ excluded_fields: Set[str] = set([
66
+ ])
86
67
 
87
- @property
88
- def type(self):
89
- """Gets the type of this BatchRecordRequest. # noqa: E501
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
90
74
 
91
- Record type # noqa: E501
92
-
93
- :return: The type of this BatchRecordRequest. # noqa: E501
94
- :rtype: str
95
- """
96
- return self._type
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of BatchRecordRequest from a dict"""
78
+ if obj is None:
79
+ return None
97
80
 
98
- @type.setter
99
- def type(self, type):
100
- """Sets the type of this BatchRecordRequest.
101
-
102
- Record type # noqa: E501
103
-
104
- :param type: The type of this BatchRecordRequest. # noqa: E501
105
- :type: str
106
- """
107
- if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
108
- raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
109
83
 
110
- self._type = type
84
+ _obj = cls.model_validate({
85
+ "id": obj.get("id"),
86
+ "type": obj.get("type"),
87
+ "attributes": obj.get("attributes")
88
+ })
89
+ return _obj
111
90
 
112
- @property
113
- def attributes(self):
114
- """Gets the attributes of this BatchRecordRequest. # noqa: E501
115
91
 
116
- KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
117
-
118
- :return: The attributes of this BatchRecordRequest. # noqa: E501
119
- :rtype: dict(str, object)
120
- """
121
- return self._attributes
122
-
123
- @attributes.setter
124
- def attributes(self, attributes):
125
- """Sets the attributes of this BatchRecordRequest.
126
-
127
- KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
128
-
129
- :param attributes: The attributes of this BatchRecordRequest. # noqa: E501
130
- :type: dict(str, object)
131
- """
132
- if self.local_vars_configuration.client_side_validation and attributes is None: # noqa: E501
133
- raise ValueError("Invalid value for `attributes`, must not be `None`") # noqa: E501
134
-
135
- self._attributes = attributes
136
-
137
- def to_dict(self):
138
- """Returns the model properties as a dict"""
139
- result = {}
140
-
141
- for attr, _ in six.iteritems(self.openapi_types):
142
- value = getattr(self, attr)
143
- if isinstance(value, list):
144
- result[attr] = list(map(
145
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
146
- value
147
- ))
148
- elif hasattr(value, "to_dict"):
149
- result[attr] = value.to_dict()
150
- elif isinstance(value, dict):
151
- result[attr] = dict(map(
152
- lambda item: (item[0], item[1].to_dict())
153
- if hasattr(item[1], "to_dict") else item,
154
- value.items()
155
- ))
156
- else:
157
- result[attr] = value
158
-
159
- return result
160
-
161
- def to_str(self):
162
- """Returns the string representation of the model"""
163
- return pprint.pformat(self.to_dict())
164
-
165
- def __repr__(self):
166
- """For `print` and `pprint`"""
167
- return self.to_str()
168
-
169
- def __eq__(self, other):
170
- """Returns true if both objects are equal"""
171
- if not isinstance(other, BatchRecordRequest):
172
- return False
173
-
174
- return self.to_dict() == other.to_dict()
175
-
176
- def __ne__(self, other):
177
- """Returns true if both objects are not equal"""
178
- if not isinstance(other, BatchRecordRequest):
179
- return True
180
-
181
- return self.to_dict() != other.to_dict()