wds-client 0.7.0__py3-none-any.whl → 0.9.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.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
wds_client/models/app.py CHANGED
@@ -3,144 +3,87 @@
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 App(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, Field, 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 App(BaseModel):
28
26
  """
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
- 'chart_version': 'str',
37
- 'image': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'chart_version': 'chart-version',
42
- 'image': 'image'
43
- }
44
-
45
- def __init__(self, chart_version=None, image=None, local_vars_configuration=None): # noqa: E501
46
- """App - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._chart_version = None
52
- self._image = None
53
- self.discriminator = None
54
-
55
- if chart_version is not None:
56
- self.chart_version = chart_version
57
- if image is not None:
58
- self.image = image
59
-
60
- @property
61
- def chart_version(self):
62
- """Gets the chart_version of this App. # noqa: E501
63
-
64
-
65
- :return: The chart_version of this App. # noqa: E501
66
- :rtype: str
27
+ App
28
+ """ # noqa: E501
29
+ chart_version: Optional[StrictStr] = Field(default=None, alias="chart-version")
30
+ image: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["chart-version", "image"]
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 App 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
- return self._chart_version
69
-
70
- @chart_version.setter
71
- def chart_version(self, chart_version):
72
- """Sets the chart_version of this App.
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
- :param chart_version: The chart_version of this App. # noqa: E501
76
- :type: str
77
- """
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of App from a dict"""
77
+ if obj is None:
78
+ return None
78
79
 
79
- self._chart_version = chart_version
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
80
82
 
81
- @property
82
- def image(self):
83
- """Gets the image of this App. # noqa: E501
83
+ _obj = cls.model_validate({
84
+ "chart-version": obj.get("chart-version"),
85
+ "image": obj.get("image")
86
+ })
87
+ return _obj
84
88
 
85
89
 
86
- :return: The image of this App. # noqa: E501
87
- :rtype: str
88
- """
89
- return self._image
90
-
91
- @image.setter
92
- def image(self, image):
93
- """Sets the image of this App.
94
-
95
-
96
- :param image: The image of this App. # noqa: E501
97
- :type: str
98
- """
99
-
100
- self._image = image
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, App):
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, App):
144
- return True
145
-
146
- return self.to_dict() != other.to_dict()
@@ -3,111 +3,48 @@
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
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
15
10
 
16
- import six
17
-
18
- from wds_client.configuration import Configuration
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
19
13
 
20
14
 
21
- class AttributeDataType(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
24
19
 
25
- Do not edit the class manually.
26
- """
27
20
 
21
+ class AttributeDataType(str, Enum):
28
22
  """
29
- allowed enum values
23
+ Datatype of attribute. The enum of data types is in flux and will change. Please comment at https://docs.google.com/document/d/1d352ZoN5kEYWPjy0NqqWGxdf7HEu5VEdrLmiAv7dMmQ/edit#heading=h.naxag0augkgf.
30
24
  """
31
- BOOLEAN = "BOOLEAN"
32
- NUMBER = "NUMBER"
33
- DATE = "DATE"
34
- DATE_TIME = "DATE_TIME"
35
- STRING = "STRING"
36
- JSON = "JSON"
37
- RELATION = "RELATION"
38
- FILE = "FILE"
39
- ARRAY_OF_BOOLEAN = "ARRAY_OF_BOOLEAN"
40
- ARRAY_OF_STRING = "ARRAY_OF_STRING"
41
- ARRAY_OF_NUMBER = "ARRAY_OF_NUMBER"
42
- ARRAY_OF_DATE = "ARRAY_OF_DATE"
43
- ARRAY_OF_DATE_TIME = "ARRAY_OF_DATE_TIME"
44
- ARRAY_OF_RELATION = "ARRAY_OF_RELATION"
45
- ARRAY_OF_FILE = "ARRAY_OF_FILE"
46
-
47
- allowable_values = [BOOLEAN, NUMBER, DATE, DATE_TIME, STRING, JSON, RELATION, FILE, ARRAY_OF_BOOLEAN, ARRAY_OF_STRING, ARRAY_OF_NUMBER, ARRAY_OF_DATE, ARRAY_OF_DATE_TIME, ARRAY_OF_RELATION, ARRAY_OF_FILE] # noqa: E501
48
25
 
49
26
  """
50
- Attributes:
51
- openapi_types (dict): The key is attribute name
52
- and the value is attribute type.
53
- attribute_map (dict): The key is attribute name
54
- and the value is json key in definition.
27
+ allowed enum values
55
28
  """
56
- openapi_types = {
57
- }
58
-
59
- attribute_map = {
60
- }
61
-
62
- def __init__(self, local_vars_configuration=None): # noqa: E501
63
- """AttributeDataType - a model defined in OpenAPI""" # noqa: E501
64
- if local_vars_configuration is None:
65
- local_vars_configuration = Configuration()
66
- self.local_vars_configuration = local_vars_configuration
67
- self.discriminator = None
68
-
69
- def to_dict(self):
70
- """Returns the model properties as a dict"""
71
- result = {}
72
-
73
- for attr, _ in six.iteritems(self.openapi_types):
74
- value = getattr(self, attr)
75
- if isinstance(value, list):
76
- result[attr] = list(map(
77
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
78
- value
79
- ))
80
- elif hasattr(value, "to_dict"):
81
- result[attr] = value.to_dict()
82
- elif isinstance(value, dict):
83
- result[attr] = dict(map(
84
- lambda item: (item[0], item[1].to_dict())
85
- if hasattr(item[1], "to_dict") else item,
86
- value.items()
87
- ))
88
- else:
89
- result[attr] = value
90
-
91
- return result
92
-
93
- def to_str(self):
94
- """Returns the string representation of the model"""
95
- return pprint.pformat(self.to_dict())
96
-
97
- def __repr__(self):
98
- """For `print` and `pprint`"""
99
- return self.to_str()
100
-
101
- def __eq__(self, other):
102
- """Returns true if both objects are equal"""
103
- if not isinstance(other, AttributeDataType):
104
- return False
105
-
106
- return self.to_dict() == other.to_dict()
29
+ BOOLEAN = 'BOOLEAN'
30
+ NUMBER = 'NUMBER'
31
+ DATE = 'DATE'
32
+ DATE_TIME = 'DATE_TIME'
33
+ STRING = 'STRING'
34
+ JSON = 'JSON'
35
+ RELATION = 'RELATION'
36
+ FILE = 'FILE'
37
+ ARRAY_OF_BOOLEAN = 'ARRAY_OF_BOOLEAN'
38
+ ARRAY_OF_STRING = 'ARRAY_OF_STRING'
39
+ ARRAY_OF_NUMBER = 'ARRAY_OF_NUMBER'
40
+ ARRAY_OF_DATE = 'ARRAY_OF_DATE'
41
+ ARRAY_OF_DATE_TIME = 'ARRAY_OF_DATE_TIME'
42
+ ARRAY_OF_RELATION = 'ARRAY_OF_RELATION'
43
+ ARRAY_OF_FILE = 'ARRAY_OF_FILE'
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> Self:
47
+ """Create an instance of AttributeDataType from a JSON string"""
48
+ return cls(json.loads(json_str))
107
49
 
108
- def __ne__(self, other):
109
- """Returns true if both objects are not equal"""
110
- if not isinstance(other, AttributeDataType):
111
- return True
112
50
 
113
- return self.to_dict() != other.to_dict()
@@ -3,176 +3,90 @@
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 AttributeSchema(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, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from wds_client.models.attribute_data_type import AttributeDataType
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
27
25
 
26
+ class AttributeSchema(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
- 'name': 'str',
37
- 'datatype': 'AttributeDataType',
38
- 'relates_to': 'str'
39
- }
40
-
41
- attribute_map = {
42
- 'name': 'name',
43
- 'datatype': 'datatype',
44
- 'relates_to': 'relatesTo'
45
- }
46
-
47
- def __init__(self, name=None, datatype=None, relates_to=None, local_vars_configuration=None): # noqa: E501
48
- """AttributeSchema - 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._name = None
54
- self._datatype = None
55
- self._relates_to = None
56
- self.discriminator = None
57
-
58
- self.name = name
59
- self.datatype = datatype
60
- if relates_to is not None:
61
- self.relates_to = relates_to
62
-
63
- @property
64
- def name(self):
65
- """Gets the name of this AttributeSchema. # noqa: E501
66
-
67
- name of this attribute. # noqa: E501
68
-
69
- :return: The name of this AttributeSchema. # noqa: E501
70
- :rtype: str
28
+ AttributeSchema
29
+ """ # noqa: E501
30
+ name: StrictStr = Field(description="name of this attribute.")
31
+ datatype: AttributeDataType
32
+ relates_to: Optional[StrictStr] = Field(default=None, description="Name of type to which this attribute relates. Only present if this is a relation attribute.", alias="relatesTo")
33
+ __properties: ClassVar[List[str]] = ["name", "datatype", "relatesTo"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of AttributeSchema from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
71
65
  """
72
- return self._name
66
+ excluded_fields: Set[str] = set([
67
+ ])
73
68
 
74
- @name.setter
75
- def name(self, name):
76
- """Sets the name of this AttributeSchema.
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
77
75
 
78
- name of this attribute. # noqa: E501
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of AttributeSchema from a dict"""
79
+ if obj is None:
80
+ return None
79
81
 
80
- :param name: The name of this AttributeSchema. # noqa: E501
81
- :type: str
82
- """
83
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
84
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
85
84
 
86
- self._name = name
85
+ _obj = cls.model_validate({
86
+ "name": obj.get("name"),
87
+ "datatype": obj.get("datatype"),
88
+ "relatesTo": obj.get("relatesTo")
89
+ })
90
+ return _obj
87
91
 
88
- @property
89
- def datatype(self):
90
- """Gets the datatype of this AttributeSchema. # noqa: E501
91
-
92
-
93
- :return: The datatype of this AttributeSchema. # noqa: E501
94
- :rtype: AttributeDataType
95
- """
96
- return self._datatype
97
-
98
- @datatype.setter
99
- def datatype(self, datatype):
100
- """Sets the datatype of this AttributeSchema.
101
-
102
-
103
- :param datatype: The datatype of this AttributeSchema. # noqa: E501
104
- :type: AttributeDataType
105
- """
106
- if self.local_vars_configuration.client_side_validation and datatype is None: # noqa: E501
107
- raise ValueError("Invalid value for `datatype`, must not be `None`") # noqa: E501
108
-
109
- self._datatype = datatype
110
-
111
- @property
112
- def relates_to(self):
113
- """Gets the relates_to of this AttributeSchema. # noqa: E501
114
-
115
- Name of type to which this attribute relates. Only present if this is a relation attribute. # noqa: E501
116
-
117
- :return: The relates_to of this AttributeSchema. # noqa: E501
118
- :rtype: str
119
- """
120
- return self._relates_to
121
-
122
- @relates_to.setter
123
- def relates_to(self, relates_to):
124
- """Sets the relates_to of this AttributeSchema.
125
-
126
- Name of type to which this attribute relates. Only present if this is a relation attribute. # noqa: E501
127
-
128
- :param relates_to: The relates_to of this AttributeSchema. # noqa: E501
129
- :type: str
130
- """
131
92
 
132
- self._relates_to = relates_to
133
-
134
- def to_dict(self):
135
- """Returns the model properties as a dict"""
136
- result = {}
137
-
138
- for attr, _ in six.iteritems(self.openapi_types):
139
- value = getattr(self, attr)
140
- if isinstance(value, list):
141
- result[attr] = list(map(
142
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
143
- value
144
- ))
145
- elif hasattr(value, "to_dict"):
146
- result[attr] = value.to_dict()
147
- elif isinstance(value, dict):
148
- result[attr] = dict(map(
149
- lambda item: (item[0], item[1].to_dict())
150
- if hasattr(item[1], "to_dict") else item,
151
- value.items()
152
- ))
153
- else:
154
- result[attr] = value
155
-
156
- return result
157
-
158
- def to_str(self):
159
- """Returns the string representation of the model"""
160
- return pprint.pformat(self.to_dict())
161
-
162
- def __repr__(self):
163
- """For `print` and `pprint`"""
164
- return self.to_str()
165
-
166
- def __eq__(self, other):
167
- """Returns true if both objects are equal"""
168
- if not isinstance(other, AttributeSchema):
169
- return False
170
-
171
- return self.to_dict() == other.to_dict()
172
-
173
- def __ne__(self, other):
174
- """Returns true if both objects are not equal"""
175
- if not isinstance(other, AttributeSchema):
176
- return True
177
-
178
- return self.to_dict() != other.to_dict()