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.
- wds_client/__init__.py +8 -10
- wds_client/api/__init__.py +1 -2
- wds_client/api/capabilities_api.py +237 -102
- wds_client/api/cloning_api.py +782 -329
- wds_client/api/general_wds_information_api.py +463 -191
- wds_client/api/import_api.py +288 -127
- wds_client/api/instances_api.py +783 -333
- wds_client/api/job_api.py +518 -215
- wds_client/api/records_api.py +2512 -1089
- wds_client/api/schema_api.py +1450 -626
- wds_client/api_client.py +414 -310
- wds_client/api_response.py +21 -0
- wds_client/configuration.py +110 -53
- wds_client/exceptions.py +99 -20
- wds_client/models/__init__.py +4 -8
- wds_client/models/app.py +68 -125
- wds_client/models/attribute_data_type.py +31 -94
- wds_client/models/attribute_schema.py +71 -157
- wds_client/models/attribute_schema_update.py +69 -127
- wds_client/models/backup_job.py +96 -298
- wds_client/models/backup_response.py +70 -157
- wds_client/models/backup_restore_request.py +68 -129
- wds_client/models/batch_operation.py +83 -137
- wds_client/models/batch_record_request.py +70 -160
- wds_client/models/batch_response.py +68 -127
- wds_client/models/build.py +79 -207
- wds_client/models/capabilities.py +83 -103
- wds_client/models/clone_job.py +96 -298
- wds_client/models/clone_response.py +68 -129
- wds_client/models/commit.py +69 -125
- wds_client/models/error_response.py +78 -222
- wds_client/models/generic_job.py +102 -334
- wds_client/models/git.py +76 -129
- wds_client/models/import_request.py +77 -165
- wds_client/models/job.py +87 -243
- wds_client/models/job_v1.py +97 -277
- wds_client/models/record_query_response.py +86 -162
- wds_client/models/record_request.py +60 -96
- wds_client/models/record_response.py +70 -160
- wds_client/models/record_type_schema.py +84 -191
- wds_client/models/search_filter.py +60 -95
- wds_client/models/search_request.py +84 -220
- wds_client/models/search_sort_direction.py +17 -80
- wds_client/models/status_response.py +68 -125
- wds_client/models/tsv_upload_response.py +68 -127
- wds_client/models/version_response.py +86 -155
- wds_client/py.typed +0 -0
- wds_client/rest.py +136 -170
- wds_client-0.9.0.dist-info/METADATA +17 -0
- wds_client-0.9.0.dist-info/RECORD +52 -0
- {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/WHEEL +1 -1
- wds_client/models/backup_job_all_of.py +0 -148
- wds_client/models/clone_job_all_of.py +0 -148
- wds_client/models/generic_job_all_of.py +0 -150
- wds_client/models/inline_object.py +0 -123
- wds_client-0.7.0.dist-info/METADATA +0 -16
- wds_client-0.7.0.dist-info/RECORD +0 -54
- {wds_client-0.7.0.dist-info → wds_client-0.9.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.
|
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
|
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
|
17
|
-
|
18
|
-
from wds_client.
|
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(
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
self.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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.
|
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
|
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
|
17
|
-
|
18
|
-
from
|
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
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
44
|
-
"""
|
45
|
-
|
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
|
-
|
50
|
-
|
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
|
-
|
53
|
-
|
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
|
-
|
56
|
-
|
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
|
-
|
56
|
+
This has the following differences from calling pydantic's
|
57
|
+
`self.model_dump(by_alias=True)`:
|
60
58
|
|
61
|
-
|
62
|
-
|
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
|
-
|
63
|
+
excluded_fields: Set[str] = set([
|
64
|
+
])
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
_dict = self.model_dump(
|
67
|
+
by_alias=True,
|
68
|
+
exclude=excluded_fields,
|
69
|
+
exclude_none=True,
|
70
|
+
)
|
71
|
+
return _dict
|
69
72
|
|
70
|
-
|
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()
|