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,121 +3,85 @@
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
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
17
24
 
18
- from wds_client.configuration import Configuration
25
+ class RecordRequest(BaseModel):
26
+ """
27
+ RecordRequest
28
+ """ # noqa: E501
29
+ attributes: Dict[str, Any] = Field(description="KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores.")
30
+ __properties: ClassVar[List[str]] = ["attributes"]
19
31
 
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
20
37
 
21
- class RecordRequest(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
38
 
25
- Do not edit the class manually.
26
- """
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))
27
42
 
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
- 'attributes': 'dict(str, object)'
37
- }
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())
38
47
 
39
- attribute_map = {
40
- 'attributes': 'attributes'
41
- }
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of RecordRequest from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
42
52
 
43
- def __init__(self, attributes=None, local_vars_configuration=None): # noqa: E501
44
- """RecordRequest - 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
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
48
55
 
49
- self._attributes = None
50
- self.discriminator = None
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
51
58
 
52
- self.attributes = attributes
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
+ ])
53
65
 
54
- @property
55
- def attributes(self):
56
- """Gets the attributes of this RecordRequest. # noqa: E501
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
57
72
 
58
- KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of RecordRequest from a dict"""
76
+ if obj is None:
77
+ return None
59
78
 
60
- :return: The attributes of this RecordRequest. # noqa: E501
61
- :rtype: dict(str, object)
62
- """
63
- return self._attributes
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
64
81
 
65
- @attributes.setter
66
- def attributes(self, attributes):
67
- """Sets the attributes of this RecordRequest.
82
+ _obj = cls.model_validate({
83
+ "attributes": obj.get("attributes")
84
+ })
85
+ return _obj
68
86
 
69
- KVPs of record attributes, valid characters for attribute names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
70
87
 
71
- :param attributes: The attributes of this RecordRequest. # noqa: E501
72
- :type: dict(str, object)
73
- """
74
- if self.local_vars_configuration.client_side_validation and attributes is None: # noqa: E501
75
- raise ValueError("Invalid value for `attributes`, must not be `None`") # noqa: E501
76
-
77
- self._attributes = attributes
78
-
79
- def to_dict(self):
80
- """Returns the model properties as a dict"""
81
- result = {}
82
-
83
- for attr, _ in six.iteritems(self.openapi_types):
84
- value = getattr(self, attr)
85
- if isinstance(value, list):
86
- result[attr] = list(map(
87
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
- value
89
- ))
90
- elif hasattr(value, "to_dict"):
91
- result[attr] = value.to_dict()
92
- elif isinstance(value, dict):
93
- result[attr] = dict(map(
94
- lambda item: (item[0], item[1].to_dict())
95
- if hasattr(item[1], "to_dict") else item,
96
- value.items()
97
- ))
98
- else:
99
- result[attr] = value
100
-
101
- return result
102
-
103
- def to_str(self):
104
- """Returns the string representation of the model"""
105
- return pprint.pformat(self.to_dict())
106
-
107
- def __repr__(self):
108
- """For `print` and `pprint`"""
109
- return self.to_str()
110
-
111
- def __eq__(self, other):
112
- """Returns true if both objects are equal"""
113
- if not isinstance(other, RecordRequest):
114
- return False
115
-
116
- return self.to_dict() == other.to_dict()
117
-
118
- def __ne__(self, other):
119
- """Returns true if both objects are not equal"""
120
- if not isinstance(other, RecordRequest):
121
- return True
122
-
123
- 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 RecordResponse(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 RecordResponse(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
- """RecordResponse - 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 RecordResponse. # noqa: E501
65
-
66
- Record id # noqa: E501
67
-
68
- :return: The id of this RecordResponse. # 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 RecordResponse.
76
-
77
- Record id # noqa: E501
78
-
79
- :param id: The id of this RecordResponse. # noqa: E501
80
- :type: str
27
+ RecordResponse
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 RecordResponse 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 RecordResponse. # 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 RecordResponse. # 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 RecordResponse 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 RecordResponse.
101
-
102
- Record type # noqa: E501
103
-
104
- :param type: The type of this RecordResponse. # 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 RecordResponse. # 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 RecordResponse. # 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 RecordResponse.
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 RecordResponse. # 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, RecordResponse):
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, RecordResponse):
179
- return True
180
-
181
- return self.to_dict() != other.to_dict()