wds-client 0.6.0__py3-none-any.whl → 0.8.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.8.0.dist-info/METADATA +17 -0
  50. wds_client-0.8.0.dist-info/RECORD +52 -0
  51. wds_client/models/backup_job_all_of.py +0 -148
  52. wds_client/models/clone_job_all_of.py +0 -148
  53. wds_client/models/generic_job_all_of.py +0 -150
  54. wds_client/models/inline_object.py +0 -123
  55. wds_client-0.6.0.dist-info/METADATA +0 -16
  56. wds_client-0.6.0.dist-info/RECORD +0 -54
  57. {wds_client-0.6.0.dist-info → wds_client-0.8.0.dist-info}/WHEEL +0 -0
  58. {wds_client-0.6.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
@@ -3,206 +3,99 @@
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, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from wds_client.models.attribute_schema import AttributeSchema
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
20
25
 
21
- class RecordTypeSchema(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.
26
+ class RecordTypeSchema(BaseModel):
34
27
  """
35
- openapi_types = {
36
- 'name': 'str',
37
- 'attributes': 'list[AttributeSchema]',
38
- 'count': 'int',
39
- 'primary_key': 'str'
40
- }
41
-
42
- attribute_map = {
43
- 'name': 'name',
44
- 'attributes': 'attributes',
45
- 'count': 'count',
46
- 'primary_key': 'primaryKey'
47
- }
48
-
49
- def __init__(self, name=None, attributes=None, count=None, primary_key=None, local_vars_configuration=None): # noqa: E501
50
- """RecordTypeSchema - a model defined in OpenAPI""" # noqa: E501
51
- if local_vars_configuration is None:
52
- local_vars_configuration = Configuration()
53
- self.local_vars_configuration = local_vars_configuration
54
-
55
- self._name = None
56
- self._attributes = None
57
- self._count = None
58
- self._primary_key = None
59
- self.discriminator = None
60
-
61
- self.name = name
62
- self.attributes = attributes
63
- self.count = count
64
- self.primary_key = primary_key
65
-
66
- @property
67
- def name(self):
68
- """Gets the name of this RecordTypeSchema. # noqa: E501
69
-
70
- Record type name, valid characters for record type names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
71
-
72
- :return: The name of this RecordTypeSchema. # noqa: E501
73
- :rtype: str
28
+ RecordTypeSchema
29
+ """ # noqa: E501
30
+ name: StrictStr = Field(description="Record type name, valid characters for record type names are limited to letters, numbers, spaces, dashes, and underscores.")
31
+ attributes: List[AttributeSchema]
32
+ count: StrictInt = Field(description="Number of records of this type")
33
+ primary_key: StrictStr = Field(description="Attribute name that contains the value to uniquely identify each record, defined as a primary key column in the underlying table.", alias="primaryKey")
34
+ __properties: ClassVar[List[str]] = ["name", "attributes", "count", "primaryKey"]
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 RecordTypeSchema 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.
74
66
  """
75
- return self._name
76
-
77
- @name.setter
78
- def name(self, name):
79
- """Sets the name of this RecordTypeSchema.
80
-
81
- Record type name, valid characters for record type names are limited to letters, numbers, spaces, dashes, and underscores. # noqa: E501
82
-
83
- :param name: The name of this RecordTypeSchema. # noqa: E501
84
- :type: str
85
- """
86
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
87
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
88
-
89
- self._name = name
90
-
91
- @property
92
- def attributes(self):
93
- """Gets the attributes of this RecordTypeSchema. # noqa: E501
94
-
95
-
96
- :return: The attributes of this RecordTypeSchema. # noqa: E501
97
- :rtype: list[AttributeSchema]
98
- """
99
- return self._attributes
100
-
101
- @attributes.setter
102
- def attributes(self, attributes):
103
- """Sets the attributes of this RecordTypeSchema.
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
+ # override the default output from pydantic by calling `to_dict()` of each item in attributes (list)
76
+ _items = []
77
+ if self.attributes:
78
+ for _item in self.attributes:
79
+ if _item:
80
+ _items.append(_item.to_dict())
81
+ _dict['attributes'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of RecordTypeSchema from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "name": obj.get("name"),
95
+ "attributes": [AttributeSchema.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None,
96
+ "count": obj.get("count"),
97
+ "primaryKey": obj.get("primaryKey")
98
+ })
99
+ return _obj
104
100
 
105
101
 
106
- :param attributes: The attributes of this RecordTypeSchema. # noqa: E501
107
- :type: list[AttributeSchema]
108
- """
109
- if self.local_vars_configuration.client_side_validation and attributes is None: # noqa: E501
110
- raise ValueError("Invalid value for `attributes`, must not be `None`") # noqa: E501
111
-
112
- self._attributes = attributes
113
-
114
- @property
115
- def count(self):
116
- """Gets the count of this RecordTypeSchema. # noqa: E501
117
-
118
- Number of records of this type # noqa: E501
119
-
120
- :return: The count of this RecordTypeSchema. # noqa: E501
121
- :rtype: int
122
- """
123
- return self._count
124
-
125
- @count.setter
126
- def count(self, count):
127
- """Sets the count of this RecordTypeSchema.
128
-
129
- Number of records of this type # noqa: E501
130
-
131
- :param count: The count of this RecordTypeSchema. # noqa: E501
132
- :type: int
133
- """
134
- if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501
135
- raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501
136
-
137
- self._count = count
138
-
139
- @property
140
- def primary_key(self):
141
- """Gets the primary_key of this RecordTypeSchema. # noqa: E501
142
-
143
- Attribute name that contains the value to uniquely identify each record, defined as a primary key column in the underlying table. # noqa: E501
144
-
145
- :return: The primary_key of this RecordTypeSchema. # noqa: E501
146
- :rtype: str
147
- """
148
- return self._primary_key
149
-
150
- @primary_key.setter
151
- def primary_key(self, primary_key):
152
- """Sets the primary_key of this RecordTypeSchema.
153
-
154
- Attribute name that contains the value to uniquely identify each record, defined as a primary key column in the underlying table. # noqa: E501
155
-
156
- :param primary_key: The primary_key of this RecordTypeSchema. # noqa: E501
157
- :type: str
158
- """
159
- if self.local_vars_configuration.client_side_validation and primary_key is None: # noqa: E501
160
- raise ValueError("Invalid value for `primary_key`, must not be `None`") # noqa: E501
161
-
162
- self._primary_key = primary_key
163
-
164
- def to_dict(self):
165
- """Returns the model properties as a dict"""
166
- result = {}
167
-
168
- for attr, _ in six.iteritems(self.openapi_types):
169
- value = getattr(self, attr)
170
- if isinstance(value, list):
171
- result[attr] = list(map(
172
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
173
- value
174
- ))
175
- elif hasattr(value, "to_dict"):
176
- result[attr] = value.to_dict()
177
- elif isinstance(value, dict):
178
- result[attr] = dict(map(
179
- lambda item: (item[0], item[1].to_dict())
180
- if hasattr(item[1], "to_dict") else item,
181
- value.items()
182
- ))
183
- else:
184
- result[attr] = value
185
-
186
- return result
187
-
188
- def to_str(self):
189
- """Returns the string representation of the model"""
190
- return pprint.pformat(self.to_dict())
191
-
192
- def __repr__(self):
193
- """For `print` and `pprint`"""
194
- return self.to_str()
195
-
196
- def __eq__(self, other):
197
- """Returns true if both objects are equal"""
198
- if not isinstance(other, RecordTypeSchema):
199
- return False
200
-
201
- return self.to_dict() == other.to_dict()
202
-
203
- def __ne__(self, other):
204
- """Returns true if both objects are not equal"""
205
- if not isinstance(other, RecordTypeSchema):
206
- return True
207
-
208
- return self.to_dict() != other.to_dict()
@@ -3,120 +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
17
-
18
- from wds_client.configuration import Configuration
19
-
20
-
21
- class SearchFilter(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
24
 
25
- Do not edit the class manually.
25
+ class SearchFilter(BaseModel):
26
26
  """
27
+ SearchFilter
28
+ """ # noqa: E501
29
+ ids: Optional[List[StrictStr]] = Field(default=None, description="Record ids by which to filter the query")
30
+ __properties: ClassVar[List[str]] = ["ids"]
27
31
 
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
- 'ids': 'list[str]'
37
- }
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
38
37
 
39
- attribute_map = {
40
- 'ids': 'ids'
41
- }
42
38
 
43
- def __init__(self, ids=None, local_vars_configuration=None): # noqa: E501
44
- """SearchFilter - 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
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))
48
42
 
49
- self._ids = None
50
- self.discriminator = None
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())
51
47
 
52
- if ids is not None:
53
- self.ids = ids
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of SearchFilter from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
54
52
 
55
- @property
56
- def ids(self):
57
- """Gets the ids of this SearchFilter. # noqa: E501
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
58
55
 
59
- Record ids by which to filter the query # noqa: E501
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
60
58
 
61
- :return: The ids of this SearchFilter. # noqa: E501
62
- :rtype: list[str]
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.
63
62
  """
64
- return self._ids
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
65
 
66
- @ids.setter
67
- def ids(self, ids):
68
- """Sets the ids of this SearchFilter.
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
69
72
 
70
- Record ids by which to filter the query # noqa: E501
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of SearchFilter from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "ids": obj.get("ids")
84
+ })
85
+ return _obj
71
86
 
72
- :param ids: The ids of this SearchFilter. # noqa: E501
73
- :type: list[str]
74
- """
75
87
 
76
- self._ids = ids
77
-
78
- def to_dict(self):
79
- """Returns the model properties as a dict"""
80
- result = {}
81
-
82
- for attr, _ in six.iteritems(self.openapi_types):
83
- value = getattr(self, attr)
84
- if isinstance(value, list):
85
- result[attr] = list(map(
86
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
87
- value
88
- ))
89
- elif hasattr(value, "to_dict"):
90
- result[attr] = value.to_dict()
91
- elif isinstance(value, dict):
92
- result[attr] = dict(map(
93
- lambda item: (item[0], item[1].to_dict())
94
- if hasattr(item[1], "to_dict") else item,
95
- value.items()
96
- ))
97
- else:
98
- result[attr] = value
99
-
100
- return result
101
-
102
- def to_str(self):
103
- """Returns the string representation of the model"""
104
- return pprint.pformat(self.to_dict())
105
-
106
- def __repr__(self):
107
- """For `print` and `pprint`"""
108
- return self.to_str()
109
-
110
- def __eq__(self, other):
111
- """Returns true if both objects are equal"""
112
- if not isinstance(other, SearchFilter):
113
- return False
114
-
115
- return self.to_dict() == other.to_dict()
116
-
117
- def __ne__(self, other):
118
- """Returns true if both objects are not equal"""
119
- if not isinstance(other, SearchFilter):
120
- return True
121
-
122
- return self.to_dict() != other.to_dict()