wds-client 0.7.0__py3-none-any.whl → 0.8.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.8.0.dist-info/METADATA +17 -0
- wds_client-0.8.0.dist-info/RECORD +52 -0
- 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.8.0.dist-info}/WHEEL +0 -0
- {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
@@ -3,235 +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
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing_extensions import Annotated
|
23
|
+
from wds_client.models.search_filter import SearchFilter
|
24
|
+
from wds_client.models.search_sort_direction import SearchSortDirection
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
19
27
|
|
20
|
-
|
21
|
-
class SearchRequest(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.
|
28
|
+
class SearchRequest(BaseModel):
|
26
29
|
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
"""
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
self.
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
if limit is not None:
|
67
|
-
self.limit = limit
|
68
|
-
if sort is not None:
|
69
|
-
self.sort = sort
|
70
|
-
if sort_attribute is not None:
|
71
|
-
self.sort_attribute = sort_attribute
|
72
|
-
if filter is not None:
|
73
|
-
self.filter = filter
|
74
|
-
|
75
|
-
@property
|
76
|
-
def offset(self):
|
77
|
-
"""Gets the offset of this SearchRequest. # noqa: E501
|
78
|
-
|
79
|
-
Pagination offset # noqa: E501
|
80
|
-
|
81
|
-
:return: The offset of this SearchRequest. # noqa: E501
|
82
|
-
:rtype: int
|
30
|
+
SearchRequest
|
31
|
+
""" # noqa: E501
|
32
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=0, description="Pagination offset")
|
33
|
+
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=10, description="Pagination limit")
|
34
|
+
sort: Optional[SearchSortDirection] = None
|
35
|
+
sort_attribute: Optional[StrictStr] = Field(default=None, alias="sortAttribute")
|
36
|
+
filter: Optional[SearchFilter] = None
|
37
|
+
__properties: ClassVar[List[str]] = ["offset", "limit", "sort", "sortAttribute", "filter"]
|
38
|
+
|
39
|
+
model_config = ConfigDict(
|
40
|
+
populate_by_name=True,
|
41
|
+
validate_assignment=True,
|
42
|
+
protected_namespaces=(),
|
43
|
+
)
|
44
|
+
|
45
|
+
|
46
|
+
def to_str(self) -> str:
|
47
|
+
"""Returns the string representation of the model using alias"""
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
49
|
+
|
50
|
+
def to_json(self) -> str:
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
53
|
+
return json.dumps(self.to_dict())
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
57
|
+
"""Create an instance of SearchRequest from a JSON string"""
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
59
|
+
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
62
|
+
|
63
|
+
This has the following differences from calling pydantic's
|
64
|
+
`self.model_dump(by_alias=True)`:
|
65
|
+
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
67
|
+
were set at model initialization. Other fields with value `None`
|
68
|
+
are ignored.
|
83
69
|
"""
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
"""Sets the limit of this SearchRequest.
|
115
|
-
|
116
|
-
Pagination limit # noqa: E501
|
117
|
-
|
118
|
-
:param limit: The limit of this SearchRequest. # noqa: E501
|
119
|
-
:type: int
|
120
|
-
"""
|
121
|
-
if (self.local_vars_configuration.client_side_validation and
|
122
|
-
limit is not None and limit > 1000): # noqa: E501
|
123
|
-
raise ValueError("Invalid value for `limit`, must be a value less than or equal to `1000`") # noqa: E501
|
124
|
-
if (self.local_vars_configuration.client_side_validation and
|
125
|
-
limit is not None and limit < 0): # noqa: E501
|
126
|
-
raise ValueError("Invalid value for `limit`, must be a value greater than or equal to `0`") # noqa: E501
|
127
|
-
|
128
|
-
self._limit = limit
|
129
|
-
|
130
|
-
@property
|
131
|
-
def sort(self):
|
132
|
-
"""Gets the sort of this SearchRequest. # noqa: E501
|
70
|
+
excluded_fields: Set[str] = set([
|
71
|
+
])
|
72
|
+
|
73
|
+
_dict = self.model_dump(
|
74
|
+
by_alias=True,
|
75
|
+
exclude=excluded_fields,
|
76
|
+
exclude_none=True,
|
77
|
+
)
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of filter
|
79
|
+
if self.filter:
|
80
|
+
_dict['filter'] = self.filter.to_dict()
|
81
|
+
return _dict
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
85
|
+
"""Create an instance of SearchRequest from a dict"""
|
86
|
+
if obj is None:
|
87
|
+
return None
|
88
|
+
|
89
|
+
if not isinstance(obj, dict):
|
90
|
+
return cls.model_validate(obj)
|
91
|
+
|
92
|
+
_obj = cls.model_validate({
|
93
|
+
"offset": obj.get("offset") if obj.get("offset") is not None else 0,
|
94
|
+
"limit": obj.get("limit") if obj.get("limit") is not None else 10,
|
95
|
+
"sort": obj.get("sort"),
|
96
|
+
"sortAttribute": obj.get("sortAttribute"),
|
97
|
+
"filter": SearchFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None
|
98
|
+
})
|
99
|
+
return _obj
|
133
100
|
|
134
101
|
|
135
|
-
:return: The sort of this SearchRequest. # noqa: E501
|
136
|
-
:rtype: SearchSortDirection
|
137
|
-
"""
|
138
|
-
return self._sort
|
139
|
-
|
140
|
-
@sort.setter
|
141
|
-
def sort(self, sort):
|
142
|
-
"""Sets the sort of this SearchRequest.
|
143
|
-
|
144
|
-
|
145
|
-
:param sort: The sort of this SearchRequest. # noqa: E501
|
146
|
-
:type: SearchSortDirection
|
147
|
-
"""
|
148
|
-
|
149
|
-
self._sort = sort
|
150
|
-
|
151
|
-
@property
|
152
|
-
def sort_attribute(self):
|
153
|
-
"""Gets the sort_attribute of this SearchRequest. # noqa: E501
|
154
|
-
|
155
|
-
|
156
|
-
:return: The sort_attribute of this SearchRequest. # noqa: E501
|
157
|
-
:rtype: str
|
158
|
-
"""
|
159
|
-
return self._sort_attribute
|
160
|
-
|
161
|
-
@sort_attribute.setter
|
162
|
-
def sort_attribute(self, sort_attribute):
|
163
|
-
"""Sets the sort_attribute of this SearchRequest.
|
164
|
-
|
165
|
-
|
166
|
-
:param sort_attribute: The sort_attribute of this SearchRequest. # noqa: E501
|
167
|
-
:type: str
|
168
|
-
"""
|
169
|
-
|
170
|
-
self._sort_attribute = sort_attribute
|
171
|
-
|
172
|
-
@property
|
173
|
-
def filter(self):
|
174
|
-
"""Gets the filter of this SearchRequest. # noqa: E501
|
175
|
-
|
176
|
-
|
177
|
-
:return: The filter of this SearchRequest. # noqa: E501
|
178
|
-
:rtype: SearchFilter
|
179
|
-
"""
|
180
|
-
return self._filter
|
181
|
-
|
182
|
-
@filter.setter
|
183
|
-
def filter(self, filter):
|
184
|
-
"""Sets the filter of this SearchRequest.
|
185
|
-
|
186
|
-
|
187
|
-
:param filter: The filter of this SearchRequest. # noqa: E501
|
188
|
-
:type: SearchFilter
|
189
|
-
"""
|
190
|
-
|
191
|
-
self._filter = filter
|
192
|
-
|
193
|
-
def to_dict(self):
|
194
|
-
"""Returns the model properties as a dict"""
|
195
|
-
result = {}
|
196
|
-
|
197
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
198
|
-
value = getattr(self, attr)
|
199
|
-
if isinstance(value, list):
|
200
|
-
result[attr] = list(map(
|
201
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
202
|
-
value
|
203
|
-
))
|
204
|
-
elif hasattr(value, "to_dict"):
|
205
|
-
result[attr] = value.to_dict()
|
206
|
-
elif isinstance(value, dict):
|
207
|
-
result[attr] = dict(map(
|
208
|
-
lambda item: (item[0], item[1].to_dict())
|
209
|
-
if hasattr(item[1], "to_dict") else item,
|
210
|
-
value.items()
|
211
|
-
))
|
212
|
-
else:
|
213
|
-
result[attr] = value
|
214
|
-
|
215
|
-
return result
|
216
|
-
|
217
|
-
def to_str(self):
|
218
|
-
"""Returns the string representation of the model"""
|
219
|
-
return pprint.pformat(self.to_dict())
|
220
|
-
|
221
|
-
def __repr__(self):
|
222
|
-
"""For `print` and `pprint`"""
|
223
|
-
return self.to_str()
|
224
|
-
|
225
|
-
def __eq__(self, other):
|
226
|
-
"""Returns true if both objects are equal"""
|
227
|
-
if not isinstance(other, SearchRequest):
|
228
|
-
return False
|
229
|
-
|
230
|
-
return self.to_dict() == other.to_dict()
|
231
|
-
|
232
|
-
def __ne__(self, other):
|
233
|
-
"""Returns true if both objects are not equal"""
|
234
|
-
if not isinstance(other, SearchRequest):
|
235
|
-
return True
|
236
|
-
|
237
|
-
return self.to_dict() != other.to_dict()
|
@@ -3,98 +3,35 @@
|
|
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
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
15
10
|
|
16
|
-
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
17
13
|
|
18
|
-
from wds_client.configuration import Configuration
|
19
14
|
|
15
|
+
from __future__ import annotations
|
16
|
+
import json
|
17
|
+
from enum import Enum
|
18
|
+
from typing_extensions import Self
|
20
19
|
|
21
|
-
class SearchSortDirection(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
20
|
|
25
|
-
|
21
|
+
class SearchSortDirection(str, Enum):
|
26
22
|
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
allowed enum values
|
23
|
+
Sort direction (descending or ascending)
|
30
24
|
"""
|
31
|
-
ASC = "ASC"
|
32
|
-
DESC = "DESC"
|
33
|
-
|
34
|
-
allowable_values = [ASC, DESC] # noqa: E501
|
35
25
|
|
36
26
|
"""
|
37
|
-
|
38
|
-
openapi_types (dict): The key is attribute name
|
39
|
-
and the value is attribute type.
|
40
|
-
attribute_map (dict): The key is attribute name
|
41
|
-
and the value is json key in definition.
|
27
|
+
allowed enum values
|
42
28
|
"""
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
attribute_map = {
|
47
|
-
}
|
48
|
-
|
49
|
-
def __init__(self, local_vars_configuration=None): # noqa: E501
|
50
|
-
"""SearchSortDirection - 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
|
-
self.discriminator = None
|
55
|
-
|
56
|
-
def to_dict(self):
|
57
|
-
"""Returns the model properties as a dict"""
|
58
|
-
result = {}
|
59
|
-
|
60
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
61
|
-
value = getattr(self, attr)
|
62
|
-
if isinstance(value, list):
|
63
|
-
result[attr] = list(map(
|
64
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
65
|
-
value
|
66
|
-
))
|
67
|
-
elif hasattr(value, "to_dict"):
|
68
|
-
result[attr] = value.to_dict()
|
69
|
-
elif isinstance(value, dict):
|
70
|
-
result[attr] = dict(map(
|
71
|
-
lambda item: (item[0], item[1].to_dict())
|
72
|
-
if hasattr(item[1], "to_dict") else item,
|
73
|
-
value.items()
|
74
|
-
))
|
75
|
-
else:
|
76
|
-
result[attr] = value
|
77
|
-
|
78
|
-
return result
|
79
|
-
|
80
|
-
def to_str(self):
|
81
|
-
"""Returns the string representation of the model"""
|
82
|
-
return pprint.pformat(self.to_dict())
|
83
|
-
|
84
|
-
def __repr__(self):
|
85
|
-
"""For `print` and `pprint`"""
|
86
|
-
return self.to_str()
|
87
|
-
|
88
|
-
def __eq__(self, other):
|
89
|
-
"""Returns true if both objects are equal"""
|
90
|
-
if not isinstance(other, SearchSortDirection):
|
91
|
-
return False
|
29
|
+
ASC = 'ASC'
|
30
|
+
DESC = 'DESC'
|
92
31
|
|
93
|
-
|
32
|
+
@classmethod
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
34
|
+
"""Create an instance of SearchSortDirection from a JSON string"""
|
35
|
+
return cls(json.loads(json_str))
|
94
36
|
|
95
|
-
def __ne__(self, other):
|
96
|
-
"""Returns true if both objects are not equal"""
|
97
|
-
if not isinstance(other, SearchSortDirection):
|
98
|
-
return True
|
99
37
|
|
100
|
-
return self.to_dict() != other.to_dict()
|
@@ -3,144 +3,87 @@
|
|
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 StatusResponse(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
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
27
24
|
|
25
|
+
class StatusResponse(BaseModel):
|
28
26
|
"""
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
self.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
:return: The status of this StatusResponse. # noqa: E501
|
66
|
-
:rtype: str
|
27
|
+
StatusResponse
|
28
|
+
""" # noqa: E501
|
29
|
+
status: Optional[StrictStr] = None
|
30
|
+
components: Optional[Dict[str, Any]] = None
|
31
|
+
__properties: ClassVar[List[str]] = ["status", "components"]
|
32
|
+
|
33
|
+
model_config = ConfigDict(
|
34
|
+
populate_by_name=True,
|
35
|
+
validate_assignment=True,
|
36
|
+
protected_namespaces=(),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
+
"""Create an instance of StatusResponse from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
56
|
+
|
57
|
+
This has the following differences from calling pydantic's
|
58
|
+
`self.model_dump(by_alias=True)`:
|
59
|
+
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
61
|
+
were set at model initialization. Other fields with value `None`
|
62
|
+
are ignored.
|
67
63
|
"""
|
68
|
-
|
69
|
-
|
70
|
-
@status.setter
|
71
|
-
def status(self, status):
|
72
|
-
"""Sets the status of this StatusResponse.
|
64
|
+
excluded_fields: Set[str] = set([
|
65
|
+
])
|
73
66
|
|
67
|
+
_dict = self.model_dump(
|
68
|
+
by_alias=True,
|
69
|
+
exclude=excluded_fields,
|
70
|
+
exclude_none=True,
|
71
|
+
)
|
72
|
+
return _dict
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
"""
|
74
|
+
@classmethod
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
76
|
+
"""Create an instance of StatusResponse from a dict"""
|
77
|
+
if obj is None:
|
78
|
+
return None
|
78
79
|
|
79
|
-
|
80
|
+
if not isinstance(obj, dict):
|
81
|
+
return cls.model_validate(obj)
|
80
82
|
|
81
|
-
|
82
|
-
|
83
|
-
|
83
|
+
_obj = cls.model_validate({
|
84
|
+
"status": obj.get("status"),
|
85
|
+
"components": obj.get("components")
|
86
|
+
})
|
87
|
+
return _obj
|
84
88
|
|
85
89
|
|
86
|
-
:return: The components of this StatusResponse. # noqa: E501
|
87
|
-
:rtype: object
|
88
|
-
"""
|
89
|
-
return self._components
|
90
|
-
|
91
|
-
@components.setter
|
92
|
-
def components(self, components):
|
93
|
-
"""Sets the components of this StatusResponse.
|
94
|
-
|
95
|
-
|
96
|
-
:param components: The components of this StatusResponse. # noqa: E501
|
97
|
-
:type: object
|
98
|
-
"""
|
99
|
-
|
100
|
-
self._components = components
|
101
|
-
|
102
|
-
def to_dict(self):
|
103
|
-
"""Returns the model properties as a dict"""
|
104
|
-
result = {}
|
105
|
-
|
106
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
107
|
-
value = getattr(self, attr)
|
108
|
-
if isinstance(value, list):
|
109
|
-
result[attr] = list(map(
|
110
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
111
|
-
value
|
112
|
-
))
|
113
|
-
elif hasattr(value, "to_dict"):
|
114
|
-
result[attr] = value.to_dict()
|
115
|
-
elif isinstance(value, dict):
|
116
|
-
result[attr] = dict(map(
|
117
|
-
lambda item: (item[0], item[1].to_dict())
|
118
|
-
if hasattr(item[1], "to_dict") else item,
|
119
|
-
value.items()
|
120
|
-
))
|
121
|
-
else:
|
122
|
-
result[attr] = value
|
123
|
-
|
124
|
-
return result
|
125
|
-
|
126
|
-
def to_str(self):
|
127
|
-
"""Returns the string representation of the model"""
|
128
|
-
return pprint.pformat(self.to_dict())
|
129
|
-
|
130
|
-
def __repr__(self):
|
131
|
-
"""For `print` and `pprint`"""
|
132
|
-
return self.to_str()
|
133
|
-
|
134
|
-
def __eq__(self, other):
|
135
|
-
"""Returns true if both objects are equal"""
|
136
|
-
if not isinstance(other, StatusResponse):
|
137
|
-
return False
|
138
|
-
|
139
|
-
return self.to_dict() == other.to_dict()
|
140
|
-
|
141
|
-
def __ne__(self, other):
|
142
|
-
"""Returns true if both objects are not equal"""
|
143
|
-
if not isinstance(other, StatusResponse):
|
144
|
-
return True
|
145
|
-
|
146
|
-
return self.to_dict() != other.to_dict()
|