lockss-pyclient 0.1.0.dev2__py3-none-any.whl → 0.1.0.dev3__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.
- lockss/pyclient/__init__.py +8 -29
- lockss/pyclient/__main__.py +37 -0
- lockss/pyclient/_internal_common.py +395 -0
- lockss/pyclient/_internal_config.py +207 -0
- lockss/pyclient/_internal_crawler.py +251 -0
- lockss/pyclient/_internal_md.py +111 -0
- lockss/pyclient/_internal_poller.py +174 -0
- lockss/pyclient/_internal_rs.py +232 -0
- lockss/pyclient/cli.py +839 -0
- lockss/pyclient/config/__init__.py +15 -0
- lockss/pyclient/config/api/aus_api.py +14 -6
- lockss/pyclient/config/api/config_api.py +12 -12
- lockss/pyclient/config/api/utils_api.py +2 -2
- lockss/pyclient/config/configuration.py +1 -1
- lockss/pyclient/config/models/__init__.py +15 -0
- lockss/pyclient/config/models/access_type.py +90 -0
- lockss/pyclient/config/models/au_agreements.py +136 -0
- lockss/pyclient/config/models/au_config_page_info.py +140 -0
- lockss/pyclient/config/models/au_state_bean.py +942 -0
- lockss/pyclient/config/models/au_status.py +837 -8
- lockss/pyclient/config/models/au_suspect_url_versions.py +136 -0
- lockss/pyclient/config/models/check_substance_result.py +6 -22
- lockss/pyclient/config/models/dated_peer_id_set_impl.py +162 -0
- lockss/pyclient/config/models/hash_result.py +136 -0
- lockss/pyclient/config/models/page_info.py +226 -0
- lockss/pyclient/config/models/peer_agreement.py +188 -0
- lockss/pyclient/config/models/peer_agreements.py +136 -0
- lockss/pyclient/config/models/platform_configuration_ws_result.py +421 -8
- lockss/pyclient/config/models/platform_configuration_ws_result_daemon_version.py +188 -0
- lockss/pyclient/config/models/platform_configuration_ws_result_java_version.py +188 -0
- lockss/pyclient/config/models/platform_configuration_ws_result_platform.py +162 -0
- lockss/pyclient/config/models/substance_checker_state.py +91 -0
- lockss/pyclient/config/models/suspect_url_version.py +214 -0
- lockss/pyclient/config/swagger.yaml +2031 -0
- lockss/pyclient/crawler/__init__.py +1 -0
- lockss/pyclient/crawler/api/crawls_api.py +2 -2
- lockss/pyclient/crawler/configuration.py +1 -1
- lockss/pyclient/crawler/models/__init__.py +1 -0
- lockss/pyclient/crawler/models/crawl_desc.py +4 -12
- lockss/pyclient/crawler/models/crawl_kind_enum.py +90 -0
- lockss/pyclient/crawler/models/page_info.py +22 -24
- lockss/pyclient/crawler/swagger.yaml +1197 -0
- lockss/pyclient/md/configuration.py +1 -1
- lockss/pyclient/md/models/page_info.py +22 -24
- lockss/pyclient/md/swagger.yaml +583 -0
- lockss/pyclient/output.py +131 -0
- lockss/pyclient/poller/__init__.py +11 -5
- lockss/pyclient/poller/api/export_api.py +5 -5
- lockss/pyclient/poller/api/hash_api.py +3 -3
- lockss/pyclient/poller/api/poll_detail_api.py +42 -42
- lockss/pyclient/poller/api/poller_polls_api.py +18 -18
- lockss/pyclient/poller/api/service_api.py +2 -2
- lockss/pyclient/poller/api/voter_polls_api.py +18 -18
- lockss/pyclient/poller/configuration.py +1 -1
- lockss/pyclient/poller/models/__init__.py +11 -5
- lockss/pyclient/poller/models/export_file_type_enum.py +93 -0
- lockss/pyclient/poller/models/export_filename_translation_enum.py +91 -0
- lockss/pyclient/poller/models/page_info.py +226 -0
- lockss/pyclient/poller/models/poll_desc.py +3 -11
- lockss/pyclient/poller/models/poll_variant_enum.py +92 -0
- lockss/pyclient/poller/models/poller_page_info.py +140 -0
- lockss/pyclient/poller/models/repair_page_info.py +140 -0
- lockss/pyclient/poller/models/repair_type_enum.py +91 -0
- lockss/pyclient/poller/models/tally_type_enum.py +93 -0
- lockss/pyclient/poller/models/url_page_info.py +140 -0
- lockss/pyclient/poller/models/voter_page_info.py +140 -0
- lockss/pyclient/poller/models/voter_urls_enum.py +92 -0
- lockss/pyclient/poller/swagger.yaml +1658 -0
- lockss/pyclient/rs/__init__.py +6 -0
- lockss/pyclient/rs/api/artifacts_api.py +20 -20
- lockss/pyclient/rs/api/aus_api.py +5 -5
- lockss/pyclient/rs/api/repo_api.py +4 -4
- lockss/pyclient/rs/api/status_api.py +1 -1
- lockss/pyclient/rs/api/wayback_api.py +12 -12
- lockss/pyclient/rs/configuration.py +8 -1
- lockss/pyclient/rs/models/__init__.py +6 -0
- lockss/pyclient/rs/models/artifact.py +111 -81
- lockss/pyclient/rs/models/au_size.py +6 -0
- lockss/pyclient/rs/models/auid_page_info.py +2 -2
- lockss/pyclient/rs/models/bulk_au_op_enum.py +90 -0
- lockss/pyclient/rs/models/include_content_enum.py +91 -0
- lockss/pyclient/rs/models/page_info.py +26 -29
- lockss/pyclient/rs/models/pywb_match_enum.py +93 -0
- lockss/pyclient/rs/models/pywb_output_enum.py +90 -0
- lockss/pyclient/rs/models/pywb_sort_enum.py +91 -0
- lockss/pyclient/rs/models/storage_info.py +131 -80
- lockss/pyclient/rs/models/versions_enum.py +90 -0
- lockss/pyclient/rs/swagger.yaml +1306 -0
- {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/METADATA +10 -3
- {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/RECORD +93 -45
- {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/WHEEL +1 -1
- lockss_pyclient-0.1.0.dev3.dist-info/entry_points.txt +3 -0
- {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info/licenses}/LICENSE +0 -0
|
@@ -29,7 +29,7 @@ class PageInfo(object):
|
|
|
29
29
|
"""
|
|
30
30
|
swagger_types = {
|
|
31
31
|
'total_count': 'int',
|
|
32
|
-
'
|
|
32
|
+
'items_in_page': 'int',
|
|
33
33
|
'continuation_token': 'str',
|
|
34
34
|
'cur_link': 'str',
|
|
35
35
|
'next_link': 'str'
|
|
@@ -37,31 +37,34 @@ class PageInfo(object):
|
|
|
37
37
|
|
|
38
38
|
attribute_map = {
|
|
39
39
|
'total_count': 'totalCount',
|
|
40
|
-
'
|
|
40
|
+
'items_in_page': 'itemsInPage',
|
|
41
41
|
'continuation_token': 'continuationToken',
|
|
42
42
|
'cur_link': 'curLink',
|
|
43
43
|
'next_link': 'nextLink'
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
def __init__(self, total_count=None,
|
|
46
|
+
def __init__(self, total_count=None, items_in_page=None, continuation_token=None, cur_link=None, next_link=None): # noqa: E501
|
|
47
47
|
"""PageInfo - a model defined in Swagger""" # noqa: E501
|
|
48
48
|
self._total_count = None
|
|
49
|
-
self.
|
|
49
|
+
self._items_in_page = None
|
|
50
50
|
self._continuation_token = None
|
|
51
51
|
self._cur_link = None
|
|
52
52
|
self._next_link = None
|
|
53
53
|
self.discriminator = None
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
self.
|
|
54
|
+
if total_count is not None:
|
|
55
|
+
self.total_count = total_count
|
|
56
|
+
self.items_in_page = items_in_page
|
|
57
|
+
if continuation_token is not None:
|
|
58
|
+
self.continuation_token = continuation_token
|
|
57
59
|
self.cur_link = cur_link
|
|
58
|
-
|
|
60
|
+
if next_link is not None:
|
|
61
|
+
self.next_link = next_link
|
|
59
62
|
|
|
60
63
|
@property
|
|
61
64
|
def total_count(self):
|
|
62
65
|
"""Gets the total_count of this PageInfo. # noqa: E501
|
|
63
66
|
|
|
64
|
-
The total number of
|
|
67
|
+
The total number of items # noqa: E501
|
|
65
68
|
|
|
66
69
|
:return: The total_count of this PageInfo. # noqa: E501
|
|
67
70
|
:rtype: int
|
|
@@ -72,40 +75,38 @@ class PageInfo(object):
|
|
|
72
75
|
def total_count(self, total_count):
|
|
73
76
|
"""Sets the total_count of this PageInfo.
|
|
74
77
|
|
|
75
|
-
The total number of
|
|
78
|
+
The total number of items # noqa: E501
|
|
76
79
|
|
|
77
80
|
:param total_count: The total_count of this PageInfo. # noqa: E501
|
|
78
81
|
:type: int
|
|
79
82
|
"""
|
|
80
|
-
if total_count is None:
|
|
81
|
-
raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501
|
|
82
83
|
|
|
83
84
|
self._total_count = total_count
|
|
84
85
|
|
|
85
86
|
@property
|
|
86
|
-
def
|
|
87
|
-
"""Gets the
|
|
87
|
+
def items_in_page(self):
|
|
88
|
+
"""Gets the items_in_page of this PageInfo. # noqa: E501
|
|
88
89
|
|
|
89
|
-
The number of
|
|
90
|
+
The number of items in the page # noqa: E501
|
|
90
91
|
|
|
91
|
-
:return: The
|
|
92
|
+
:return: The items_in_page of this PageInfo. # noqa: E501
|
|
92
93
|
:rtype: int
|
|
93
94
|
"""
|
|
94
|
-
return self.
|
|
95
|
+
return self._items_in_page
|
|
95
96
|
|
|
96
|
-
@
|
|
97
|
-
def
|
|
98
|
-
"""Sets the
|
|
97
|
+
@items_in_page.setter
|
|
98
|
+
def items_in_page(self, items_in_page):
|
|
99
|
+
"""Sets the items_in_page of this PageInfo.
|
|
99
100
|
|
|
100
|
-
The number of
|
|
101
|
+
The number of items in the page # noqa: E501
|
|
101
102
|
|
|
102
|
-
:param
|
|
103
|
+
:param items_in_page: The items_in_page of this PageInfo. # noqa: E501
|
|
103
104
|
:type: int
|
|
104
105
|
"""
|
|
105
|
-
if
|
|
106
|
-
raise ValueError("Invalid value for `
|
|
106
|
+
if items_in_page is None:
|
|
107
|
+
raise ValueError("Invalid value for `items_in_page`, must not be `None`") # noqa: E501
|
|
107
108
|
|
|
108
|
-
self.
|
|
109
|
+
self._items_in_page = items_in_page
|
|
109
110
|
|
|
110
111
|
@property
|
|
111
112
|
def continuation_token(self):
|
|
@@ -127,8 +128,6 @@ class PageInfo(object):
|
|
|
127
128
|
:param continuation_token: The continuation_token of this PageInfo. # noqa: E501
|
|
128
129
|
:type: str
|
|
129
130
|
"""
|
|
130
|
-
if continuation_token is None:
|
|
131
|
-
raise ValueError("Invalid value for `continuation_token`, must not be `None`") # noqa: E501
|
|
132
131
|
|
|
133
132
|
self._continuation_token = continuation_token
|
|
134
133
|
|
|
@@ -177,8 +176,6 @@ class PageInfo(object):
|
|
|
177
176
|
:param next_link: The next_link of this PageInfo. # noqa: E501
|
|
178
177
|
:type: str
|
|
179
178
|
"""
|
|
180
|
-
if next_link is None:
|
|
181
|
-
raise ValueError("Invalid value for `next_link`, must not be `None`") # noqa: E501
|
|
182
179
|
|
|
183
180
|
self._next_link = next_link
|
|
184
181
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Repository Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Repository Service # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
Contact: lockss-support@lockss.org
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import pprint
|
|
14
|
+
import re # noqa: F401
|
|
15
|
+
|
|
16
|
+
import six
|
|
17
|
+
|
|
18
|
+
class PywbMatchEnum(object):
|
|
19
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
20
|
+
|
|
21
|
+
Do not edit the class manually.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
allowed enum values
|
|
26
|
+
"""
|
|
27
|
+
EXACT = "exact"
|
|
28
|
+
PREFIX = "prefix"
|
|
29
|
+
HOST = "host"
|
|
30
|
+
DOMAIN = "domain"
|
|
31
|
+
RANGE = "range"
|
|
32
|
+
"""
|
|
33
|
+
Attributes:
|
|
34
|
+
swagger_types (dict): The key is attribute name
|
|
35
|
+
and the value is attribute type.
|
|
36
|
+
attribute_map (dict): The key is attribute name
|
|
37
|
+
and the value is json key in definition.
|
|
38
|
+
"""
|
|
39
|
+
swagger_types = {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
attribute_map = {
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
def __init__(self): # noqa: E501
|
|
46
|
+
"""PywbMatchEnum - a model defined in Swagger""" # noqa: E501
|
|
47
|
+
self.discriminator = None
|
|
48
|
+
|
|
49
|
+
def to_dict(self):
|
|
50
|
+
"""Returns the model properties as a dict"""
|
|
51
|
+
result = {}
|
|
52
|
+
|
|
53
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
54
|
+
value = getattr(self, attr)
|
|
55
|
+
if isinstance(value, list):
|
|
56
|
+
result[attr] = list(map(
|
|
57
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
58
|
+
value
|
|
59
|
+
))
|
|
60
|
+
elif hasattr(value, "to_dict"):
|
|
61
|
+
result[attr] = value.to_dict()
|
|
62
|
+
elif isinstance(value, dict):
|
|
63
|
+
result[attr] = dict(map(
|
|
64
|
+
lambda item: (item[0], item[1].to_dict())
|
|
65
|
+
if hasattr(item[1], "to_dict") else item,
|
|
66
|
+
value.items()
|
|
67
|
+
))
|
|
68
|
+
else:
|
|
69
|
+
result[attr] = value
|
|
70
|
+
if issubclass(PywbMatchEnum, dict):
|
|
71
|
+
for key, value in self.items():
|
|
72
|
+
result[key] = value
|
|
73
|
+
|
|
74
|
+
return result
|
|
75
|
+
|
|
76
|
+
def to_str(self):
|
|
77
|
+
"""Returns the string representation of the model"""
|
|
78
|
+
return pprint.pformat(self.to_dict())
|
|
79
|
+
|
|
80
|
+
def __repr__(self):
|
|
81
|
+
"""For `print` and `pprint`"""
|
|
82
|
+
return self.to_str()
|
|
83
|
+
|
|
84
|
+
def __eq__(self, other):
|
|
85
|
+
"""Returns true if both objects are equal"""
|
|
86
|
+
if not isinstance(other, PywbMatchEnum):
|
|
87
|
+
return False
|
|
88
|
+
|
|
89
|
+
return self.__dict__ == other.__dict__
|
|
90
|
+
|
|
91
|
+
def __ne__(self, other):
|
|
92
|
+
"""Returns true if both objects are not equal"""
|
|
93
|
+
return not self == other
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Repository Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Repository Service # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
Contact: lockss-support@lockss.org
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import pprint
|
|
14
|
+
import re # noqa: F401
|
|
15
|
+
|
|
16
|
+
import six
|
|
17
|
+
|
|
18
|
+
class PywbOutputEnum(object):
|
|
19
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
20
|
+
|
|
21
|
+
Do not edit the class manually.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
allowed enum values
|
|
26
|
+
"""
|
|
27
|
+
CDX = "cdx"
|
|
28
|
+
JSON = "json"
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
swagger_types (dict): The key is attribute name
|
|
32
|
+
and the value is attribute type.
|
|
33
|
+
attribute_map (dict): The key is attribute name
|
|
34
|
+
and the value is json key in definition.
|
|
35
|
+
"""
|
|
36
|
+
swagger_types = {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
attribute_map = {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
def __init__(self): # noqa: E501
|
|
43
|
+
"""PywbOutputEnum - a model defined in Swagger""" # noqa: E501
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
def to_dict(self):
|
|
47
|
+
"""Returns the model properties as a dict"""
|
|
48
|
+
result = {}
|
|
49
|
+
|
|
50
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
51
|
+
value = getattr(self, attr)
|
|
52
|
+
if isinstance(value, list):
|
|
53
|
+
result[attr] = list(map(
|
|
54
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
55
|
+
value
|
|
56
|
+
))
|
|
57
|
+
elif hasattr(value, "to_dict"):
|
|
58
|
+
result[attr] = value.to_dict()
|
|
59
|
+
elif isinstance(value, dict):
|
|
60
|
+
result[attr] = dict(map(
|
|
61
|
+
lambda item: (item[0], item[1].to_dict())
|
|
62
|
+
if hasattr(item[1], "to_dict") else item,
|
|
63
|
+
value.items()
|
|
64
|
+
))
|
|
65
|
+
else:
|
|
66
|
+
result[attr] = value
|
|
67
|
+
if issubclass(PywbOutputEnum, dict):
|
|
68
|
+
for key, value in self.items():
|
|
69
|
+
result[key] = value
|
|
70
|
+
|
|
71
|
+
return result
|
|
72
|
+
|
|
73
|
+
def to_str(self):
|
|
74
|
+
"""Returns the string representation of the model"""
|
|
75
|
+
return pprint.pformat(self.to_dict())
|
|
76
|
+
|
|
77
|
+
def __repr__(self):
|
|
78
|
+
"""For `print` and `pprint`"""
|
|
79
|
+
return self.to_str()
|
|
80
|
+
|
|
81
|
+
def __eq__(self, other):
|
|
82
|
+
"""Returns true if both objects are equal"""
|
|
83
|
+
if not isinstance(other, PywbOutputEnum):
|
|
84
|
+
return False
|
|
85
|
+
|
|
86
|
+
return self.__dict__ == other.__dict__
|
|
87
|
+
|
|
88
|
+
def __ne__(self, other):
|
|
89
|
+
"""Returns true if both objects are not equal"""
|
|
90
|
+
return not self == other
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Repository Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Repository Service # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
Contact: lockss-support@lockss.org
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import pprint
|
|
14
|
+
import re # noqa: F401
|
|
15
|
+
|
|
16
|
+
import six
|
|
17
|
+
|
|
18
|
+
class PywbSortEnum(object):
|
|
19
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
20
|
+
|
|
21
|
+
Do not edit the class manually.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
allowed enum values
|
|
26
|
+
"""
|
|
27
|
+
DEFAULT = "default"
|
|
28
|
+
CLOSEST = "closest"
|
|
29
|
+
REVERSE = "reverse"
|
|
30
|
+
"""
|
|
31
|
+
Attributes:
|
|
32
|
+
swagger_types (dict): The key is attribute name
|
|
33
|
+
and the value is attribute type.
|
|
34
|
+
attribute_map (dict): The key is attribute name
|
|
35
|
+
and the value is json key in definition.
|
|
36
|
+
"""
|
|
37
|
+
swagger_types = {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
attribute_map = {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
def __init__(self): # noqa: E501
|
|
44
|
+
"""PywbSortEnum - a model defined in Swagger""" # noqa: E501
|
|
45
|
+
self.discriminator = None
|
|
46
|
+
|
|
47
|
+
def to_dict(self):
|
|
48
|
+
"""Returns the model properties as a dict"""
|
|
49
|
+
result = {}
|
|
50
|
+
|
|
51
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
52
|
+
value = getattr(self, attr)
|
|
53
|
+
if isinstance(value, list):
|
|
54
|
+
result[attr] = list(map(
|
|
55
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
56
|
+
value
|
|
57
|
+
))
|
|
58
|
+
elif hasattr(value, "to_dict"):
|
|
59
|
+
result[attr] = value.to_dict()
|
|
60
|
+
elif isinstance(value, dict):
|
|
61
|
+
result[attr] = dict(map(
|
|
62
|
+
lambda item: (item[0], item[1].to_dict())
|
|
63
|
+
if hasattr(item[1], "to_dict") else item,
|
|
64
|
+
value.items()
|
|
65
|
+
))
|
|
66
|
+
else:
|
|
67
|
+
result[attr] = value
|
|
68
|
+
if issubclass(PywbSortEnum, dict):
|
|
69
|
+
for key, value in self.items():
|
|
70
|
+
result[key] = value
|
|
71
|
+
|
|
72
|
+
return result
|
|
73
|
+
|
|
74
|
+
def to_str(self):
|
|
75
|
+
"""Returns the string representation of the model"""
|
|
76
|
+
return pprint.pformat(self.to_dict())
|
|
77
|
+
|
|
78
|
+
def __repr__(self):
|
|
79
|
+
"""For `print` and `pprint`"""
|
|
80
|
+
return self.to_str()
|
|
81
|
+
|
|
82
|
+
def __eq__(self, other):
|
|
83
|
+
"""Returns true if both objects are equal"""
|
|
84
|
+
if not isinstance(other, PywbSortEnum):
|
|
85
|
+
return False
|
|
86
|
+
|
|
87
|
+
return self.__dict__ == other.__dict__
|
|
88
|
+
|
|
89
|
+
def __ne__(self, other):
|
|
90
|
+
"""Returns true if both objects are not equal"""
|
|
91
|
+
return not self == other
|