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.
Files changed (93) hide show
  1. lockss/pyclient/__init__.py +8 -29
  2. lockss/pyclient/__main__.py +37 -0
  3. lockss/pyclient/_internal_common.py +395 -0
  4. lockss/pyclient/_internal_config.py +207 -0
  5. lockss/pyclient/_internal_crawler.py +251 -0
  6. lockss/pyclient/_internal_md.py +111 -0
  7. lockss/pyclient/_internal_poller.py +174 -0
  8. lockss/pyclient/_internal_rs.py +232 -0
  9. lockss/pyclient/cli.py +839 -0
  10. lockss/pyclient/config/__init__.py +15 -0
  11. lockss/pyclient/config/api/aus_api.py +14 -6
  12. lockss/pyclient/config/api/config_api.py +12 -12
  13. lockss/pyclient/config/api/utils_api.py +2 -2
  14. lockss/pyclient/config/configuration.py +1 -1
  15. lockss/pyclient/config/models/__init__.py +15 -0
  16. lockss/pyclient/config/models/access_type.py +90 -0
  17. lockss/pyclient/config/models/au_agreements.py +136 -0
  18. lockss/pyclient/config/models/au_config_page_info.py +140 -0
  19. lockss/pyclient/config/models/au_state_bean.py +942 -0
  20. lockss/pyclient/config/models/au_status.py +837 -8
  21. lockss/pyclient/config/models/au_suspect_url_versions.py +136 -0
  22. lockss/pyclient/config/models/check_substance_result.py +6 -22
  23. lockss/pyclient/config/models/dated_peer_id_set_impl.py +162 -0
  24. lockss/pyclient/config/models/hash_result.py +136 -0
  25. lockss/pyclient/config/models/page_info.py +226 -0
  26. lockss/pyclient/config/models/peer_agreement.py +188 -0
  27. lockss/pyclient/config/models/peer_agreements.py +136 -0
  28. lockss/pyclient/config/models/platform_configuration_ws_result.py +421 -8
  29. lockss/pyclient/config/models/platform_configuration_ws_result_daemon_version.py +188 -0
  30. lockss/pyclient/config/models/platform_configuration_ws_result_java_version.py +188 -0
  31. lockss/pyclient/config/models/platform_configuration_ws_result_platform.py +162 -0
  32. lockss/pyclient/config/models/substance_checker_state.py +91 -0
  33. lockss/pyclient/config/models/suspect_url_version.py +214 -0
  34. lockss/pyclient/config/swagger.yaml +2031 -0
  35. lockss/pyclient/crawler/__init__.py +1 -0
  36. lockss/pyclient/crawler/api/crawls_api.py +2 -2
  37. lockss/pyclient/crawler/configuration.py +1 -1
  38. lockss/pyclient/crawler/models/__init__.py +1 -0
  39. lockss/pyclient/crawler/models/crawl_desc.py +4 -12
  40. lockss/pyclient/crawler/models/crawl_kind_enum.py +90 -0
  41. lockss/pyclient/crawler/models/page_info.py +22 -24
  42. lockss/pyclient/crawler/swagger.yaml +1197 -0
  43. lockss/pyclient/md/configuration.py +1 -1
  44. lockss/pyclient/md/models/page_info.py +22 -24
  45. lockss/pyclient/md/swagger.yaml +583 -0
  46. lockss/pyclient/output.py +131 -0
  47. lockss/pyclient/poller/__init__.py +11 -5
  48. lockss/pyclient/poller/api/export_api.py +5 -5
  49. lockss/pyclient/poller/api/hash_api.py +3 -3
  50. lockss/pyclient/poller/api/poll_detail_api.py +42 -42
  51. lockss/pyclient/poller/api/poller_polls_api.py +18 -18
  52. lockss/pyclient/poller/api/service_api.py +2 -2
  53. lockss/pyclient/poller/api/voter_polls_api.py +18 -18
  54. lockss/pyclient/poller/configuration.py +1 -1
  55. lockss/pyclient/poller/models/__init__.py +11 -5
  56. lockss/pyclient/poller/models/export_file_type_enum.py +93 -0
  57. lockss/pyclient/poller/models/export_filename_translation_enum.py +91 -0
  58. lockss/pyclient/poller/models/page_info.py +226 -0
  59. lockss/pyclient/poller/models/poll_desc.py +3 -11
  60. lockss/pyclient/poller/models/poll_variant_enum.py +92 -0
  61. lockss/pyclient/poller/models/poller_page_info.py +140 -0
  62. lockss/pyclient/poller/models/repair_page_info.py +140 -0
  63. lockss/pyclient/poller/models/repair_type_enum.py +91 -0
  64. lockss/pyclient/poller/models/tally_type_enum.py +93 -0
  65. lockss/pyclient/poller/models/url_page_info.py +140 -0
  66. lockss/pyclient/poller/models/voter_page_info.py +140 -0
  67. lockss/pyclient/poller/models/voter_urls_enum.py +92 -0
  68. lockss/pyclient/poller/swagger.yaml +1658 -0
  69. lockss/pyclient/rs/__init__.py +6 -0
  70. lockss/pyclient/rs/api/artifacts_api.py +20 -20
  71. lockss/pyclient/rs/api/aus_api.py +5 -5
  72. lockss/pyclient/rs/api/repo_api.py +4 -4
  73. lockss/pyclient/rs/api/status_api.py +1 -1
  74. lockss/pyclient/rs/api/wayback_api.py +12 -12
  75. lockss/pyclient/rs/configuration.py +8 -1
  76. lockss/pyclient/rs/models/__init__.py +6 -0
  77. lockss/pyclient/rs/models/artifact.py +111 -81
  78. lockss/pyclient/rs/models/au_size.py +6 -0
  79. lockss/pyclient/rs/models/auid_page_info.py +2 -2
  80. lockss/pyclient/rs/models/bulk_au_op_enum.py +90 -0
  81. lockss/pyclient/rs/models/include_content_enum.py +91 -0
  82. lockss/pyclient/rs/models/page_info.py +26 -29
  83. lockss/pyclient/rs/models/pywb_match_enum.py +93 -0
  84. lockss/pyclient/rs/models/pywb_output_enum.py +90 -0
  85. lockss/pyclient/rs/models/pywb_sort_enum.py +91 -0
  86. lockss/pyclient/rs/models/storage_info.py +131 -80
  87. lockss/pyclient/rs/models/versions_enum.py +90 -0
  88. lockss/pyclient/rs/swagger.yaml +1306 -0
  89. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/METADATA +10 -3
  90. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/RECORD +93 -45
  91. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info}/WHEEL +1 -1
  92. lockss_pyclient-0.1.0.dev3.dist-info/entry_points.txt +3 -0
  93. {lockss_pyclient-0.1.0.dev2.dist-info → lockss_pyclient-0.1.0.dev3.dist-info/licenses}/LICENSE +0 -0
@@ -18,24 +18,30 @@ from lockss.pyclient.poller.models.api_status import ApiStatus
18
18
  from lockss.pyclient.poller.models.aus_import_body import AusImportBody
19
19
  from lockss.pyclient.poller.models.cached_uri_set_spec import CachedUriSetSpec
20
20
  from lockss.pyclient.poller.models.error_result import ErrorResult
21
+ from lockss.pyclient.poller.models.export_file_type_enum import ExportFileTypeEnum
22
+ from lockss.pyclient.poller.models.export_filename_translation_enum import ExportFilenameTranslationEnum
21
23
  from lockss.pyclient.poller.models.hasher_ws_params import HasherWsParams
22
24
  from lockss.pyclient.poller.models.link_desc import LinkDesc
23
- from lockss.pyclient.poller.models.page_desc import PageDesc
25
+ from lockss.pyclient.poller.models.page_info import PageInfo
24
26
  from lockss.pyclient.poller.models.peer_data import PeerData
25
27
  from lockss.pyclient.poller.models.peer_ws_result import PeerWsResult
26
28
  from lockss.pyclient.poller.models.poll_desc import PollDesc
29
+ from lockss.pyclient.poller.models.poll_variant_enum import PollVariantEnum
27
30
  from lockss.pyclient.poller.models.poll_ws_result import PollWsResult
28
31
  from lockss.pyclient.poller.models.poller_detail import PollerDetail
29
- from lockss.pyclient.poller.models.poller_pager import PollerPager
32
+ from lockss.pyclient.poller.models.poller_page_info import PollerPageInfo
30
33
  from lockss.pyclient.poller.models.poller_summary import PollerSummary
31
34
  from lockss.pyclient.poller.models.repair_data import RepairData
32
- from lockss.pyclient.poller.models.repair_pager import RepairPager
35
+ from lockss.pyclient.poller.models.repair_page_info import RepairPageInfo
33
36
  from lockss.pyclient.poller.models.repair_queue import RepairQueue
37
+ from lockss.pyclient.poller.models.repair_type_enum import RepairTypeEnum
34
38
  from lockss.pyclient.poller.models.repository_space_ws_result import RepositorySpaceWsResult
35
39
  from lockss.pyclient.poller.models.repository_ws_result import RepositoryWsResult
36
40
  from lockss.pyclient.poller.models.tally_data import TallyData
37
- from lockss.pyclient.poller.models.url_pager import UrlPager
41
+ from lockss.pyclient.poller.models.tally_type_enum import TallyTypeEnum
42
+ from lockss.pyclient.poller.models.url_page_info import UrlPageInfo
38
43
  from lockss.pyclient.poller.models.vote_ws_result import VoteWsResult
39
44
  from lockss.pyclient.poller.models.voter_detail import VoterDetail
40
- from lockss.pyclient.poller.models.voter_pager import VoterPager
45
+ from lockss.pyclient.poller.models.voter_page_info import VoterPageInfo
41
46
  from lockss.pyclient.poller.models.voter_summary import VoterSummary
47
+ from lockss.pyclient.poller.models.voter_urls_enum import VoterUrlsEnum
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Poller Service REST API
5
+
6
+ REST API of the LOCKSS Poller 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 ExportFileTypeEnum(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
+ WARC_RESPONSE = "WARC_RESPONSE"
28
+ WARC_RESOURCE = "WARC_RESOURCE"
29
+ ARC_RESPONSE = "ARC_RESPONSE"
30
+ ARC_RESOURCE = "ARC_RESOURCE"
31
+ ZIP = "ZIP"
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
+ """ExportFileTypeEnum - 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(ExportFileTypeEnum, 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, ExportFileTypeEnum):
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,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Poller Service REST API
5
+
6
+ REST API of the LOCKSS Poller 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 ExportFilenameTranslationEnum(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
+ NONE = "XLATE_NONE"
28
+ WINDOWS = "XLATE_WINDOWS"
29
+ MAC = "XLATE_MAC"
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
+ """ExportFilenameTranslationEnum - 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(ExportFilenameTranslationEnum, 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, ExportFilenameTranslationEnum):
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
@@ -0,0 +1,226 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Poller Service REST API
5
+
6
+ REST API of the LOCKSS Poller 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 PageInfo(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
+ Attributes:
25
+ swagger_types (dict): The key is attribute name
26
+ and the value is attribute type.
27
+ attribute_map (dict): The key is attribute name
28
+ and the value is json key in definition.
29
+ """
30
+ swagger_types = {
31
+ 'total_count': 'int',
32
+ 'items_in_page': 'int',
33
+ 'continuation_token': 'str',
34
+ 'cur_link': 'str',
35
+ 'next_link': 'str'
36
+ }
37
+
38
+ attribute_map = {
39
+ 'total_count': 'totalCount',
40
+ 'items_in_page': 'itemsInPage',
41
+ 'continuation_token': 'continuationToken',
42
+ 'cur_link': 'curLink',
43
+ 'next_link': 'nextLink'
44
+ }
45
+
46
+ def __init__(self, total_count=None, items_in_page=None, continuation_token=None, cur_link=None, next_link=None): # noqa: E501
47
+ """PageInfo - a model defined in Swagger""" # noqa: E501
48
+ self._total_count = None
49
+ self._items_in_page = None
50
+ self._continuation_token = None
51
+ self._cur_link = None
52
+ self._next_link = None
53
+ self.discriminator = None
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
59
+ self.cur_link = cur_link
60
+ if next_link is not None:
61
+ self.next_link = next_link
62
+
63
+ @property
64
+ def total_count(self):
65
+ """Gets the total_count of this PageInfo. # noqa: E501
66
+
67
+ The total number of items # noqa: E501
68
+
69
+ :return: The total_count of this PageInfo. # noqa: E501
70
+ :rtype: int
71
+ """
72
+ return self._total_count
73
+
74
+ @total_count.setter
75
+ def total_count(self, total_count):
76
+ """Sets the total_count of this PageInfo.
77
+
78
+ The total number of items # noqa: E501
79
+
80
+ :param total_count: The total_count of this PageInfo. # noqa: E501
81
+ :type: int
82
+ """
83
+
84
+ self._total_count = total_count
85
+
86
+ @property
87
+ def items_in_page(self):
88
+ """Gets the items_in_page of this PageInfo. # noqa: E501
89
+
90
+ The number of items in the page # noqa: E501
91
+
92
+ :return: The items_in_page of this PageInfo. # noqa: E501
93
+ :rtype: int
94
+ """
95
+ return self._items_in_page
96
+
97
+ @items_in_page.setter
98
+ def items_in_page(self, items_in_page):
99
+ """Sets the items_in_page of this PageInfo.
100
+
101
+ The number of items in the page # noqa: E501
102
+
103
+ :param items_in_page: The items_in_page of this PageInfo. # noqa: E501
104
+ :type: int
105
+ """
106
+ if items_in_page is None:
107
+ raise ValueError("Invalid value for `items_in_page`, must not be `None`") # noqa: E501
108
+
109
+ self._items_in_page = items_in_page
110
+
111
+ @property
112
+ def continuation_token(self):
113
+ """Gets the continuation_token of this PageInfo. # noqa: E501
114
+
115
+ The continuation token # noqa: E501
116
+
117
+ :return: The continuation_token of this PageInfo. # noqa: E501
118
+ :rtype: str
119
+ """
120
+ return self._continuation_token
121
+
122
+ @continuation_token.setter
123
+ def continuation_token(self, continuation_token):
124
+ """Sets the continuation_token of this PageInfo.
125
+
126
+ The continuation token # noqa: E501
127
+
128
+ :param continuation_token: The continuation_token of this PageInfo. # noqa: E501
129
+ :type: str
130
+ """
131
+
132
+ self._continuation_token = continuation_token
133
+
134
+ @property
135
+ def cur_link(self):
136
+ """Gets the cur_link of this PageInfo. # noqa: E501
137
+
138
+ The link of the current request # noqa: E501
139
+
140
+ :return: The cur_link of this PageInfo. # noqa: E501
141
+ :rtype: str
142
+ """
143
+ return self._cur_link
144
+
145
+ @cur_link.setter
146
+ def cur_link(self, cur_link):
147
+ """Sets the cur_link of this PageInfo.
148
+
149
+ The link of the current request # noqa: E501
150
+
151
+ :param cur_link: The cur_link of this PageInfo. # noqa: E501
152
+ :type: str
153
+ """
154
+ if cur_link is None:
155
+ raise ValueError("Invalid value for `cur_link`, must not be `None`") # noqa: E501
156
+
157
+ self._cur_link = cur_link
158
+
159
+ @property
160
+ def next_link(self):
161
+ """Gets the next_link of this PageInfo. # noqa: E501
162
+
163
+ The link of the next request # noqa: E501
164
+
165
+ :return: The next_link of this PageInfo. # noqa: E501
166
+ :rtype: str
167
+ """
168
+ return self._next_link
169
+
170
+ @next_link.setter
171
+ def next_link(self, next_link):
172
+ """Sets the next_link of this PageInfo.
173
+
174
+ The link of the next request # noqa: E501
175
+
176
+ :param next_link: The next_link of this PageInfo. # noqa: E501
177
+ :type: str
178
+ """
179
+
180
+ self._next_link = next_link
181
+
182
+ def to_dict(self):
183
+ """Returns the model properties as a dict"""
184
+ result = {}
185
+
186
+ for attr, _ in six.iteritems(self.swagger_types):
187
+ value = getattr(self, attr)
188
+ if isinstance(value, list):
189
+ result[attr] = list(map(
190
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
191
+ value
192
+ ))
193
+ elif hasattr(value, "to_dict"):
194
+ result[attr] = value.to_dict()
195
+ elif isinstance(value, dict):
196
+ result[attr] = dict(map(
197
+ lambda item: (item[0], item[1].to_dict())
198
+ if hasattr(item[1], "to_dict") else item,
199
+ value.items()
200
+ ))
201
+ else:
202
+ result[attr] = value
203
+ if issubclass(PageInfo, dict):
204
+ for key, value in self.items():
205
+ result[key] = value
206
+
207
+ return result
208
+
209
+ def to_str(self):
210
+ """Returns the string representation of the model"""
211
+ return pprint.pformat(self.to_dict())
212
+
213
+ def __repr__(self):
214
+ """For `print` and `pprint`"""
215
+ return self.to_str()
216
+
217
+ def __eq__(self, other):
218
+ """Returns true if both objects are equal"""
219
+ if not isinstance(other, PageInfo):
220
+ return False
221
+
222
+ return self.__dict__ == other.__dict__
223
+
224
+ def __ne__(self, other):
225
+ """Returns true if both objects are not equal"""
226
+ return not self == other
@@ -33,7 +33,7 @@ class PollDesc(object):
33
33
  'poll_type': 'int',
34
34
  'protocol': 'int',
35
35
  'plugin_poll_version': 'str',
36
- 'variant': 'str',
36
+ 'variant': 'PollVariantEnum',
37
37
  'modulus': 'int'
38
38
  }
39
39
 
@@ -190,10 +190,9 @@ class PollDesc(object):
190
190
  def variant(self):
191
191
  """Gets the variant of this PollDesc. # noqa: E501
192
192
 
193
- The V3 poll variation. # noqa: E501
194
193
 
195
194
  :return: The variant of this PollDesc. # noqa: E501
196
- :rtype: str
195
+ :rtype: PollVariantEnum
197
196
  """
198
197
  return self._variant
199
198
 
@@ -201,17 +200,10 @@ class PollDesc(object):
201
200
  def variant(self, variant):
202
201
  """Sets the variant of this PollDesc.
203
202
 
204
- The V3 poll variation. # noqa: E501
205
203
 
206
204
  :param variant: The variant of this PollDesc. # noqa: E501
207
- :type: str
205
+ :type: PollVariantEnum
208
206
  """
209
- allowed_values = ["PoR", "PoP", "Local", "NoPoll"] # noqa: E501
210
- if variant not in allowed_values:
211
- raise ValueError(
212
- "Invalid value for `variant` ({0}), must be one of {1}" # noqa: E501
213
- .format(variant, allowed_values)
214
- )
215
207
 
216
208
  self._variant = variant
217
209
 
@@ -0,0 +1,92 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LOCKSS Poller Service REST API
5
+
6
+ REST API of the LOCKSS Poller 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 PollVariantEnum(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
+ POR = "PoR"
28
+ POP = "PoP"
29
+ LOCAL = "Local"
30
+ NOPOLL = "NoPoll"
31
+ """
32
+ Attributes:
33
+ swagger_types (dict): The key is attribute name
34
+ and the value is attribute type.
35
+ attribute_map (dict): The key is attribute name
36
+ and the value is json key in definition.
37
+ """
38
+ swagger_types = {
39
+ }
40
+
41
+ attribute_map = {
42
+ }
43
+
44
+ def __init__(self): # noqa: E501
45
+ """PollVariantEnum - a model defined in Swagger""" # noqa: E501
46
+ self.discriminator = None
47
+
48
+ def to_dict(self):
49
+ """Returns the model properties as a dict"""
50
+ result = {}
51
+
52
+ for attr, _ in six.iteritems(self.swagger_types):
53
+ value = getattr(self, attr)
54
+ if isinstance(value, list):
55
+ result[attr] = list(map(
56
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
57
+ value
58
+ ))
59
+ elif hasattr(value, "to_dict"):
60
+ result[attr] = value.to_dict()
61
+ elif isinstance(value, dict):
62
+ result[attr] = dict(map(
63
+ lambda item: (item[0], item[1].to_dict())
64
+ if hasattr(item[1], "to_dict") else item,
65
+ value.items()
66
+ ))
67
+ else:
68
+ result[attr] = value
69
+ if issubclass(PollVariantEnum, dict):
70
+ for key, value in self.items():
71
+ result[key] = value
72
+
73
+ return result
74
+
75
+ def to_str(self):
76
+ """Returns the string representation of the model"""
77
+ return pprint.pformat(self.to_dict())
78
+
79
+ def __repr__(self):
80
+ """For `print` and `pprint`"""
81
+ return self.to_str()
82
+
83
+ def __eq__(self, other):
84
+ """Returns true if both objects are equal"""
85
+ if not isinstance(other, PollVariantEnum):
86
+ return False
87
+
88
+ return self.__dict__ == other.__dict__
89
+
90
+ def __ne__(self, other):
91
+ """Returns true if both objects are not equal"""
92
+ return not self == other