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,292 +3,112 @@
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 JobV1(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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class JobV1(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
- 'job_id': 'str',
37
- 'job_type': 'str',
38
- 'instance_id': 'str',
39
- 'status': 'str',
40
- 'created': 'datetime',
41
- 'updated': 'datetime',
42
- 'error_message': 'str'
43
- }
44
-
45
- attribute_map = {
46
- 'job_id': 'jobId',
47
- 'job_type': 'jobType',
48
- 'instance_id': 'instanceId',
49
- 'status': 'status',
50
- 'created': 'created',
51
- 'updated': 'updated',
52
- 'error_message': 'errorMessage'
53
- }
54
-
55
- def __init__(self, job_id=None, job_type=None, instance_id=None, status=None, created=None, updated=None, error_message=None, local_vars_configuration=None): # noqa: E501
56
- """JobV1 - a model defined in OpenAPI""" # noqa: E501
57
- if local_vars_configuration is None:
58
- local_vars_configuration = Configuration()
59
- self.local_vars_configuration = local_vars_configuration
60
-
61
- self._job_id = None
62
- self._job_type = None
63
- self._instance_id = None
64
- self._status = None
65
- self._created = None
66
- self._updated = None
67
- self._error_message = None
68
- self.discriminator = None
69
-
70
- self.job_id = job_id
71
- self.job_type = job_type
72
- self.instance_id = instance_id
73
- self.status = status
74
- self.created = created
75
- self.updated = updated
76
- if error_message is not None:
77
- self.error_message = error_message
78
-
79
- @property
80
- def job_id(self):
81
- """Gets the job_id of this JobV1. # noqa: E501
82
-
83
-
84
- :return: The job_id of this JobV1. # noqa: E501
85
- :rtype: str
86
- """
87
- return self._job_id
88
-
89
- @job_id.setter
90
- def job_id(self, job_id):
91
- """Sets the job_id of this JobV1.
92
-
93
-
94
- :param job_id: The job_id of this JobV1. # noqa: E501
95
- :type: str
28
+ JobV1
29
+ """ # noqa: E501
30
+ job_id: StrictStr = Field(alias="jobId")
31
+ job_type: StrictStr = Field(alias="jobType")
32
+ instance_id: StrictStr = Field(alias="instanceId")
33
+ status: StrictStr
34
+ created: datetime
35
+ updated: datetime
36
+ error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
37
+ __properties: ClassVar[List[str]] = ["jobId", "jobType", "instanceId", "status", "created", "updated", "errorMessage"]
38
+
39
+ @field_validator('job_type')
40
+ def job_type_validate_enum(cls, value):
41
+ """Validates the enum"""
42
+ if value not in set(['DATA_IMPORT', 'UNKNOWN']):
43
+ raise ValueError("must be one of enum values ('DATA_IMPORT', 'UNKNOWN')")
44
+ return value
45
+
46
+ @field_validator('status')
47
+ def status_validate_enum(cls, value):
48
+ """Validates the enum"""
49
+ if value not in set(['CREATED', 'QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN']):
50
+ raise ValueError("must be one of enum values ('CREATED', 'QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN')")
51
+ return value
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def to_str(self) -> str:
61
+ """Returns the string representation of the model using alias"""
62
+ return pprint.pformat(self.model_dump(by_alias=True))
63
+
64
+ def to_json(self) -> str:
65
+ """Returns the JSON representation of the model using alias"""
66
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
+ return json.dumps(self.to_dict())
68
+
69
+ @classmethod
70
+ def from_json(cls, json_str: str) -> Optional[Self]:
71
+ """Create an instance of JobV1 from a JSON string"""
72
+ return cls.from_dict(json.loads(json_str))
73
+
74
+ def to_dict(self) -> Dict[str, Any]:
75
+ """Return the dictionary representation of the model using alias.
76
+
77
+ This has the following differences from calling pydantic's
78
+ `self.model_dump(by_alias=True)`:
79
+
80
+ * `None` is only added to the output dict for nullable fields that
81
+ were set at model initialization. Other fields with value `None`
82
+ are ignored.
96
83
  """
97
- if self.local_vars_configuration.client_side_validation and job_id is None: # noqa: E501
98
- raise ValueError("Invalid value for `job_id`, must not be `None`") # noqa: E501
99
-
100
- self._job_id = job_id
101
-
102
- @property
103
- def job_type(self):
104
- """Gets the job_type of this JobV1. # noqa: E501
105
-
106
-
107
- :return: The job_type of this JobV1. # noqa: E501
108
- :rtype: str
109
- """
110
- return self._job_type
111
-
112
- @job_type.setter
113
- def job_type(self, job_type):
114
- """Sets the job_type of this JobV1.
115
-
116
-
117
- :param job_type: The job_type of this JobV1. # noqa: E501
118
- :type: str
119
- """
120
- if self.local_vars_configuration.client_side_validation and job_type is None: # noqa: E501
121
- raise ValueError("Invalid value for `job_type`, must not be `None`") # noqa: E501
122
- allowed_values = ["DATA_IMPORT", "UNKNOWN"] # noqa: E501
123
- if self.local_vars_configuration.client_side_validation and job_type not in allowed_values: # noqa: E501
124
- raise ValueError(
125
- "Invalid value for `job_type` ({0}), must be one of {1}" # noqa: E501
126
- .format(job_type, allowed_values)
127
- )
128
-
129
- self._job_type = job_type
130
-
131
- @property
132
- def instance_id(self):
133
- """Gets the instance_id of this JobV1. # noqa: E501
134
-
135
-
136
- :return: The instance_id of this JobV1. # noqa: E501
137
- :rtype: str
138
- """
139
- return self._instance_id
140
-
141
- @instance_id.setter
142
- def instance_id(self, instance_id):
143
- """Sets the instance_id of this JobV1.
144
-
145
-
146
- :param instance_id: The instance_id of this JobV1. # noqa: E501
147
- :type: str
148
- """
149
- if self.local_vars_configuration.client_side_validation and instance_id is None: # noqa: E501
150
- raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501
151
-
152
- self._instance_id = instance_id
153
-
154
- @property
155
- def status(self):
156
- """Gets the status of this JobV1. # noqa: E501
157
-
158
-
159
- :return: The status of this JobV1. # noqa: E501
160
- :rtype: str
161
- """
162
- return self._status
163
-
164
- @status.setter
165
- def status(self, status):
166
- """Sets the status of this JobV1.
167
-
168
-
169
- :param status: The status of this JobV1. # noqa: E501
170
- :type: str
171
- """
172
- if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
173
- raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
174
- allowed_values = ["CREATED", "QUEUED", "RUNNING", "SUCCEEDED", "ERROR", "CANCELLED", "UNKNOWN"] # noqa: E501
175
- if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
176
- raise ValueError(
177
- "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
178
- .format(status, allowed_values)
179
- )
180
-
181
- self._status = status
182
-
183
- @property
184
- def created(self):
185
- """Gets the created of this JobV1. # noqa: E501
186
-
187
-
188
- :return: The created of this JobV1. # noqa: E501
189
- :rtype: datetime
190
- """
191
- return self._created
192
-
193
- @created.setter
194
- def created(self, created):
195
- """Sets the created of this JobV1.
196
-
197
-
198
- :param created: The created of this JobV1. # noqa: E501
199
- :type: datetime
200
- """
201
- if self.local_vars_configuration.client_side_validation and created is None: # noqa: E501
202
- raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501
203
-
204
- self._created = created
205
-
206
- @property
207
- def updated(self):
208
- """Gets the updated of this JobV1. # noqa: E501
209
-
210
-
211
- :return: The updated of this JobV1. # noqa: E501
212
- :rtype: datetime
213
- """
214
- return self._updated
215
-
216
- @updated.setter
217
- def updated(self, updated):
218
- """Sets the updated of this JobV1.
219
-
220
-
221
- :param updated: The updated of this JobV1. # noqa: E501
222
- :type: datetime
223
- """
224
- if self.local_vars_configuration.client_side_validation and updated is None: # noqa: E501
225
- raise ValueError("Invalid value for `updated`, must not be `None`") # noqa: E501
226
-
227
- self._updated = updated
228
-
229
- @property
230
- def error_message(self):
231
- """Gets the error_message of this JobV1. # noqa: E501
232
-
233
-
234
- :return: The error_message of this JobV1. # noqa: E501
235
- :rtype: str
236
- """
237
- return self._error_message
238
-
239
- @error_message.setter
240
- def error_message(self, error_message):
241
- """Sets the error_message of this JobV1.
242
-
243
-
244
- :param error_message: The error_message of this JobV1. # noqa: E501
245
- :type: str
246
- """
247
-
248
- self._error_message = error_message
249
-
250
- def to_dict(self):
251
- """Returns the model properties as a dict"""
252
- result = {}
253
-
254
- for attr, _ in six.iteritems(self.openapi_types):
255
- value = getattr(self, attr)
256
- if isinstance(value, list):
257
- result[attr] = list(map(
258
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
259
- value
260
- ))
261
- elif hasattr(value, "to_dict"):
262
- result[attr] = value.to_dict()
263
- elif isinstance(value, dict):
264
- result[attr] = dict(map(
265
- lambda item: (item[0], item[1].to_dict())
266
- if hasattr(item[1], "to_dict") else item,
267
- value.items()
268
- ))
269
- else:
270
- result[attr] = value
271
-
272
- return result
273
-
274
- def to_str(self):
275
- """Returns the string representation of the model"""
276
- return pprint.pformat(self.to_dict())
277
-
278
- def __repr__(self):
279
- """For `print` and `pprint`"""
280
- return self.to_str()
281
-
282
- def __eq__(self, other):
283
- """Returns true if both objects are equal"""
284
- if not isinstance(other, JobV1):
285
- return False
286
-
287
- return self.to_dict() == other.to_dict()
84
+ excluded_fields: Set[str] = set([
85
+ ])
86
+
87
+ _dict = self.model_dump(
88
+ by_alias=True,
89
+ exclude=excluded_fields,
90
+ exclude_none=True,
91
+ )
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of JobV1 from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate({
104
+ "jobId": obj.get("jobId"),
105
+ "jobType": obj.get("jobType"),
106
+ "instanceId": obj.get("instanceId"),
107
+ "status": obj.get("status"),
108
+ "created": obj.get("created"),
109
+ "updated": obj.get("updated"),
110
+ "errorMessage": obj.get("errorMessage")
111
+ })
112
+ return _obj
288
113
 
289
- def __ne__(self, other):
290
- """Returns true if both objects are not equal"""
291
- if not isinstance(other, JobV1):
292
- return True
293
114
 
294
- return self.to_dict() != other.to_dict()
@@ -3,177 +3,101 @@
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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List
22
+ from wds_client.models.record_response import RecordResponse
23
+ from wds_client.models.search_request import SearchRequest
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
19
26
 
20
-
21
- class RecordQueryResponse(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.
27
+ class RecordQueryResponse(BaseModel):
26
28
  """
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
- 'search_request': 'SearchRequest',
37
- 'total_records': 'int',
38
- 'records': 'list[RecordResponse]'
39
- }
40
-
41
- attribute_map = {
42
- 'search_request': 'searchRequest',
43
- 'total_records': 'totalRecords',
44
- 'records': 'records'
45
- }
46
-
47
- def __init__(self, search_request=None, total_records=None, records=None, local_vars_configuration=None): # noqa: E501
48
- """RecordQueryResponse - 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._search_request = None
54
- self._total_records = None
55
- self._records = None
56
- self.discriminator = None
57
-
58
- self.search_request = search_request
59
- self.total_records = total_records
60
- self.records = records
61
-
62
- @property
63
- def search_request(self):
64
- """Gets the search_request of this RecordQueryResponse. # noqa: E501
65
-
66
-
67
- :return: The search_request of this RecordQueryResponse. # noqa: E501
68
- :rtype: SearchRequest
69
- """
70
- return self._search_request
71
-
72
- @search_request.setter
73
- def search_request(self, search_request):
74
- """Sets the search_request of this RecordQueryResponse.
75
-
76
-
77
- :param search_request: The search_request of this RecordQueryResponse. # noqa: E501
78
- :type: SearchRequest
79
- """
80
- if self.local_vars_configuration.client_side_validation and search_request is None: # noqa: E501
81
- raise ValueError("Invalid value for `search_request`, must not be `None`") # noqa: E501
82
-
83
- self._search_request = search_request
84
-
85
- @property
86
- def total_records(self):
87
- """Gets the total_records of this RecordQueryResponse. # noqa: E501
88
-
89
- number of records in the record type # noqa: E501
90
-
91
- :return: The total_records of this RecordQueryResponse. # noqa: E501
92
- :rtype: int
93
- """
94
- return self._total_records
95
-
96
- @total_records.setter
97
- def total_records(self, total_records):
98
- """Sets the total_records of this RecordQueryResponse.
99
-
100
- number of records in the record type # noqa: E501
101
-
102
- :param total_records: The total_records of this RecordQueryResponse. # noqa: E501
103
- :type: int
29
+ RecordQueryResponse
30
+ """ # noqa: E501
31
+ search_request: SearchRequest = Field(alias="searchRequest")
32
+ total_records: StrictInt = Field(description="number of records in the record type", alias="totalRecords")
33
+ records: List[RecordResponse] = Field(description="list of records found")
34
+ __properties: ClassVar[List[str]] = ["searchRequest", "totalRecords", "records"]
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 RecordQueryResponse 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.
104
66
  """
105
- if self.local_vars_configuration.client_side_validation and total_records is None: # noqa: E501
106
- raise ValueError("Invalid value for `total_records`, must not be `None`") # noqa: E501
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 search_request
76
+ if self.search_request:
77
+ _dict['searchRequest'] = self.search_request.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of each item in records (list)
79
+ _items = []
80
+ if self.records:
81
+ for _item in self.records:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['records'] = _items
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of RecordQueryResponse from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "searchRequest": SearchRequest.from_dict(obj["searchRequest"]) if obj.get("searchRequest") is not None else None,
98
+ "totalRecords": obj.get("totalRecords"),
99
+ "records": [RecordResponse.from_dict(_item) for _item in obj["records"]] if obj.get("records") is not None else None
100
+ })
101
+ return _obj
107
102
 
108
- self._total_records = total_records
109
103
 
110
- @property
111
- def records(self):
112
- """Gets the records of this RecordQueryResponse. # noqa: E501
113
-
114
- list of records found # noqa: E501
115
-
116
- :return: The records of this RecordQueryResponse. # noqa: E501
117
- :rtype: list[RecordResponse]
118
- """
119
- return self._records
120
-
121
- @records.setter
122
- def records(self, records):
123
- """Sets the records of this RecordQueryResponse.
124
-
125
- list of records found # noqa: E501
126
-
127
- :param records: The records of this RecordQueryResponse. # noqa: E501
128
- :type: list[RecordResponse]
129
- """
130
- if self.local_vars_configuration.client_side_validation and records is None: # noqa: E501
131
- raise ValueError("Invalid value for `records`, must not be `None`") # noqa: E501
132
-
133
- self._records = records
134
-
135
- def to_dict(self):
136
- """Returns the model properties as a dict"""
137
- result = {}
138
-
139
- for attr, _ in six.iteritems(self.openapi_types):
140
- value = getattr(self, attr)
141
- if isinstance(value, list):
142
- result[attr] = list(map(
143
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
144
- value
145
- ))
146
- elif hasattr(value, "to_dict"):
147
- result[attr] = value.to_dict()
148
- elif isinstance(value, dict):
149
- result[attr] = dict(map(
150
- lambda item: (item[0], item[1].to_dict())
151
- if hasattr(item[1], "to_dict") else item,
152
- value.items()
153
- ))
154
- else:
155
- result[attr] = value
156
-
157
- return result
158
-
159
- def to_str(self):
160
- """Returns the string representation of the model"""
161
- return pprint.pformat(self.to_dict())
162
-
163
- def __repr__(self):
164
- """For `print` and `pprint`"""
165
- return self.to_str()
166
-
167
- def __eq__(self, other):
168
- """Returns true if both objects are equal"""
169
- if not isinstance(other, RecordQueryResponse):
170
- return False
171
-
172
- return self.to_dict() == other.to_dict()
173
-
174
- def __ne__(self, other):
175
- """Returns true if both objects are not equal"""
176
- if not isinstance(other, RecordQueryResponse):
177
- return True
178
-
179
- return self.to_dict() != other.to_dict()