lockss-pyclient 0.1.0.dev1__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 +67 -0
- lockss/pyclient/config/__init__.py +42 -0
- lockss/pyclient/config/api/__init__.py +12 -0
- lockss/pyclient/config/api/aus_api.py +2195 -0
- lockss/pyclient/config/api/config_api.py +718 -0
- lockss/pyclient/config/api/plugins_api.py +128 -0
- lockss/pyclient/config/api/status_api.py +120 -0
- lockss/pyclient/config/api/tdb_api.py +318 -0
- lockss/pyclient/config/api/users_api.py +516 -0
- lockss/pyclient/config/api/utils_api.py +128 -0
- lockss/pyclient/config/api_client.py +632 -0
- lockss/pyclient/config/configuration.py +254 -0
- lockss/pyclient/config/models/__init__.py +30 -0
- lockss/pyclient/config/models/api_status.py +344 -0
- lockss/pyclient/config/models/au_configuration.py +142 -0
- lockss/pyclient/config/models/au_status.py +113 -0
- lockss/pyclient/config/models/au_ws_result.py +113 -0
- lockss/pyclient/config/models/auids_body.py +168 -0
- lockss/pyclient/config/models/check_substance_result.py +212 -0
- lockss/pyclient/config/models/content_configuration_result.py +200 -0
- lockss/pyclient/config/models/file_section_name_body.py +113 -0
- lockss/pyclient/config/models/platform_configuration_ws_result.py +113 -0
- lockss/pyclient/config/models/plugin_ws_result.py +345 -0
- lockss/pyclient/config/models/request_au_control_result.py +171 -0
- lockss/pyclient/config/models/tdb_au_ws_result.py +360 -0
- lockss/pyclient/config/models/tdb_publisher_ws_result.py +113 -0
- lockss/pyclient/config/models/tdb_title_ws_result.py +390 -0
- lockss/pyclient/config/rest.py +317 -0
- lockss/pyclient/crawler/__init__.py +45 -0
- lockss/pyclient/crawler/api/__init__.py +10 -0
- lockss/pyclient/crawler/api/crawlers_api.py +215 -0
- lockss/pyclient/crawler/api/crawls_api.py +952 -0
- lockss/pyclient/crawler/api/jobs_api.py +504 -0
- lockss/pyclient/crawler/api/status_api.py +120 -0
- lockss/pyclient/crawler/api/ws_api.py +128 -0
- lockss/pyclient/crawler/api_client.py +632 -0
- lockss/pyclient/crawler/configuration.py +254 -0
- lockss/pyclient/crawler/models/__init__.py +35 -0
- lockss/pyclient/crawler/models/api_status.py +344 -0
- lockss/pyclient/crawler/models/counter.py +142 -0
- lockss/pyclient/crawler/models/crawl_desc.py +344 -0
- lockss/pyclient/crawler/models/crawl_job.py +280 -0
- lockss/pyclient/crawler/models/crawl_pager.py +140 -0
- lockss/pyclient/crawler/models/crawl_status.py +780 -0
- lockss/pyclient/crawler/models/crawl_ws_result.py +814 -0
- lockss/pyclient/crawler/models/crawl_ws_result_pages_with_errors.py +162 -0
- lockss/pyclient/crawler/models/crawler_config.py +142 -0
- lockss/pyclient/crawler/models/crawler_status.py +279 -0
- lockss/pyclient/crawler/models/crawler_statuses.py +112 -0
- lockss/pyclient/crawler/models/error_result.py +164 -0
- lockss/pyclient/crawler/models/job_pager.py +140 -0
- lockss/pyclient/crawler/models/job_status.py +147 -0
- lockss/pyclient/crawler/models/mime_counter.py +169 -0
- lockss/pyclient/crawler/models/page_info.py +228 -0
- lockss/pyclient/crawler/models/url_error.py +148 -0
- lockss/pyclient/crawler/models/url_info.py +167 -0
- lockss/pyclient/crawler/models/url_pager.py +140 -0
- lockss/pyclient/crawler/rest.py +317 -0
- lockss/pyclient/md/__init__.py +36 -0
- lockss/pyclient/md/api/__init__.py +9 -0
- lockss/pyclient/md/api/mdupdates_api.py +508 -0
- lockss/pyclient/md/api/metadata_api.py +136 -0
- lockss/pyclient/md/api/status_api.py +120 -0
- lockss/pyclient/md/api/urls_api.py +224 -0
- lockss/pyclient/md/api_client.py +632 -0
- lockss/pyclient/md/configuration.py +254 -0
- lockss/pyclient/md/models/__init__.py +27 -0
- lockss/pyclient/md/models/api_status.py +344 -0
- lockss/pyclient/md/models/au.py +169 -0
- lockss/pyclient/md/models/au_metadata_page_info.py +140 -0
- lockss/pyclient/md/models/error_result.py +164 -0
- lockss/pyclient/md/models/item_metadata.py +196 -0
- lockss/pyclient/md/models/job.py +280 -0
- lockss/pyclient/md/models/job_page_info.py +140 -0
- lockss/pyclient/md/models/metadata_update_spec.py +142 -0
- lockss/pyclient/md/models/page_info.py +228 -0
- lockss/pyclient/md/models/status.py +142 -0
- lockss/pyclient/md/models/url_info.py +142 -0
- lockss/pyclient/md/rest.py +317 -0
- lockss/pyclient/poller/__init__.py +54 -0
- lockss/pyclient/poller/api/__init__.py +13 -0
- lockss/pyclient/poller/api/export_api.py +156 -0
- lockss/pyclient/poller/api/hash_api.py +413 -0
- lockss/pyclient/poller/api/import_api.py +157 -0
- lockss/pyclient/poller/api/poll_detail_api.py +374 -0
- lockss/pyclient/poller/api/poller_polls_api.py +223 -0
- lockss/pyclient/poller/api/repo_api.py +223 -0
- lockss/pyclient/poller/api/service_api.py +694 -0
- lockss/pyclient/poller/api/voter_polls_api.py +223 -0
- lockss/pyclient/poller/api_client.py +632 -0
- lockss/pyclient/poller/configuration.py +254 -0
- lockss/pyclient/poller/models/__init__.py +41 -0
- lockss/pyclient/poller/models/api_status.py +344 -0
- lockss/pyclient/poller/models/aus_import_body.py +199 -0
- lockss/pyclient/poller/models/cached_uri_set_spec.py +169 -0
- lockss/pyclient/poller/models/error_result.py +164 -0
- lockss/pyclient/poller/models/hasher_ws_params.py +432 -0
- lockss/pyclient/poller/models/link_desc.py +141 -0
- lockss/pyclient/poller/models/page_desc.py +227 -0
- lockss/pyclient/poller/models/peer_data.py +638 -0
- lockss/pyclient/poller/models/peer_ws_result.py +113 -0
- lockss/pyclient/poller/models/poll_desc.py +285 -0
- lockss/pyclient/poller/models/poll_ws_result.py +142 -0
- lockss/pyclient/poller/models/poller_detail.py +613 -0
- lockss/pyclient/poller/models/poller_pager.py +139 -0
- lockss/pyclient/poller/models/poller_summary.py +452 -0
- lockss/pyclient/poller/models/repair_data.py +176 -0
- lockss/pyclient/poller/models/repair_pager.py +139 -0
- lockss/pyclient/poller/models/repair_queue.py +249 -0
- lockss/pyclient/poller/models/repository_space_ws_result.py +113 -0
- lockss/pyclient/poller/models/repository_ws_result.py +113 -0
- lockss/pyclient/poller/models/tally_data.py +471 -0
- lockss/pyclient/poller/models/url_pager.py +139 -0
- lockss/pyclient/poller/models/vote_ws_result.py +142 -0
- lockss/pyclient/poller/models/voter_detail.py +701 -0
- lockss/pyclient/poller/models/voter_pager.py +139 -0
- lockss/pyclient/poller/models/voter_summary.py +284 -0
- lockss/pyclient/poller/rest.py +317 -0
- lockss/pyclient/rs/__init__.py +41 -0
- lockss/pyclient/rs/api/__init__.py +10 -0
- lockss/pyclient/rs/api/artifacts_api.py +988 -0
- lockss/pyclient/rs/api/aus_api.py +334 -0
- lockss/pyclient/rs/api/repo_api.py +379 -0
- lockss/pyclient/rs/api/status_api.py +120 -0
- lockss/pyclient/rs/api/wayback_api.py +386 -0
- lockss/pyclient/rs/api_client.py +632 -0
- lockss/pyclient/rs/configuration.py +247 -0
- lockss/pyclient/rs/models/__init__.py +31 -0
- lockss/pyclient/rs/models/api_status.py +344 -0
- lockss/pyclient/rs/models/archives_body.py +142 -0
- lockss/pyclient/rs/models/artifact.py +344 -0
- lockss/pyclient/rs/models/artifact_page_info.py +140 -0
- lockss/pyclient/rs/models/artifact_properties.py +344 -0
- lockss/pyclient/rs/models/artifacts_body.py +170 -0
- lockss/pyclient/rs/models/au_size.py +162 -0
- lockss/pyclient/rs/models/auid_page_info.py +140 -0
- lockss/pyclient/rs/models/error_result.py +164 -0
- lockss/pyclient/rs/models/import_status.py +298 -0
- lockss/pyclient/rs/models/page_info.py +229 -0
- lockss/pyclient/rs/models/repository_info.py +164 -0
- lockss/pyclient/rs/models/repository_statistics.py +112 -0
- lockss/pyclient/rs/models/storage_info.py +287 -0
- lockss/pyclient/rs/models/streaming_response_body.py +84 -0
- lockss/pyclient/rs/rest.py +317 -0
- lockss_pyclient-0.1.0.dev1.dist-info/LICENSE +27 -0
- lockss_pyclient-0.1.0.dev1.dist-info/METADATA +29 -0
- lockss_pyclient-0.1.0.dev1.dist-info/RECORD +148 -0
- lockss_pyclient-0.1.0.dev1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Crawler Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Crawler 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 CrawlWsResultPagesWithErrors(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
|
+
'url': 'str',
|
|
32
|
+
'severity': 'str',
|
|
33
|
+
'message': 'str'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
attribute_map = {
|
|
37
|
+
'url': 'url',
|
|
38
|
+
'severity': 'severity',
|
|
39
|
+
'message': 'message'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
def __init__(self, url=None, severity=None, message=None): # noqa: E501
|
|
43
|
+
"""CrawlWsResultPagesWithErrors - a model defined in Swagger""" # noqa: E501
|
|
44
|
+
self._url = None
|
|
45
|
+
self._severity = None
|
|
46
|
+
self._message = None
|
|
47
|
+
self.discriminator = None
|
|
48
|
+
if url is not None:
|
|
49
|
+
self.url = url
|
|
50
|
+
if severity is not None:
|
|
51
|
+
self.severity = severity
|
|
52
|
+
if message is not None:
|
|
53
|
+
self.message = message
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def url(self):
|
|
57
|
+
"""Gets the url of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
:return: The url of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
61
|
+
:rtype: str
|
|
62
|
+
"""
|
|
63
|
+
return self._url
|
|
64
|
+
|
|
65
|
+
@url.setter
|
|
66
|
+
def url(self, url):
|
|
67
|
+
"""Sets the url of this CrawlWsResultPagesWithErrors.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
:param url: The url of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
71
|
+
:type: str
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
self._url = url
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def severity(self):
|
|
78
|
+
"""Gets the severity of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
:return: The severity of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
82
|
+
:rtype: str
|
|
83
|
+
"""
|
|
84
|
+
return self._severity
|
|
85
|
+
|
|
86
|
+
@severity.setter
|
|
87
|
+
def severity(self, severity):
|
|
88
|
+
"""Sets the severity of this CrawlWsResultPagesWithErrors.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
:param severity: The severity of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
92
|
+
:type: str
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
self._severity = severity
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def message(self):
|
|
99
|
+
"""Gets the message of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
:return: The message of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
103
|
+
:rtype: str
|
|
104
|
+
"""
|
|
105
|
+
return self._message
|
|
106
|
+
|
|
107
|
+
@message.setter
|
|
108
|
+
def message(self, message):
|
|
109
|
+
"""Sets the message of this CrawlWsResultPagesWithErrors.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
:param message: The message of this CrawlWsResultPagesWithErrors. # noqa: E501
|
|
113
|
+
:type: str
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
self._message = message
|
|
117
|
+
|
|
118
|
+
def to_dict(self):
|
|
119
|
+
"""Returns the model properties as a dict"""
|
|
120
|
+
result = {}
|
|
121
|
+
|
|
122
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
123
|
+
value = getattr(self, attr)
|
|
124
|
+
if isinstance(value, list):
|
|
125
|
+
result[attr] = list(map(
|
|
126
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
127
|
+
value
|
|
128
|
+
))
|
|
129
|
+
elif hasattr(value, "to_dict"):
|
|
130
|
+
result[attr] = value.to_dict()
|
|
131
|
+
elif isinstance(value, dict):
|
|
132
|
+
result[attr] = dict(map(
|
|
133
|
+
lambda item: (item[0], item[1].to_dict())
|
|
134
|
+
if hasattr(item[1], "to_dict") else item,
|
|
135
|
+
value.items()
|
|
136
|
+
))
|
|
137
|
+
else:
|
|
138
|
+
result[attr] = value
|
|
139
|
+
if issubclass(CrawlWsResultPagesWithErrors, dict):
|
|
140
|
+
for key, value in self.items():
|
|
141
|
+
result[key] = value
|
|
142
|
+
|
|
143
|
+
return result
|
|
144
|
+
|
|
145
|
+
def to_str(self):
|
|
146
|
+
"""Returns the string representation of the model"""
|
|
147
|
+
return pprint.pformat(self.to_dict())
|
|
148
|
+
|
|
149
|
+
def __repr__(self):
|
|
150
|
+
"""For `print` and `pprint`"""
|
|
151
|
+
return self.to_str()
|
|
152
|
+
|
|
153
|
+
def __eq__(self, other):
|
|
154
|
+
"""Returns true if both objects are equal"""
|
|
155
|
+
if not isinstance(other, CrawlWsResultPagesWithErrors):
|
|
156
|
+
return False
|
|
157
|
+
|
|
158
|
+
return self.__dict__ == other.__dict__
|
|
159
|
+
|
|
160
|
+
def __ne__(self, other):
|
|
161
|
+
"""Returns true if both objects are not equal"""
|
|
162
|
+
return not self == other
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Crawler Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Crawler 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 CrawlerConfig(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
|
+
'crawler_id': 'str',
|
|
32
|
+
'attributes': 'dict(str, str)'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
attribute_map = {
|
|
36
|
+
'crawler_id': 'crawlerId',
|
|
37
|
+
'attributes': 'attributes'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
def __init__(self, crawler_id=None, attributes=None): # noqa: E501
|
|
41
|
+
"""CrawlerConfig - a model defined in Swagger""" # noqa: E501
|
|
42
|
+
self._crawler_id = None
|
|
43
|
+
self._attributes = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
self.crawler_id = crawler_id
|
|
46
|
+
self.attributes = attributes
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def crawler_id(self):
|
|
50
|
+
"""Gets the crawler_id of this CrawlerConfig. # noqa: E501
|
|
51
|
+
|
|
52
|
+
The identifier for this crawler # noqa: E501
|
|
53
|
+
|
|
54
|
+
:return: The crawler_id of this CrawlerConfig. # noqa: E501
|
|
55
|
+
:rtype: str
|
|
56
|
+
"""
|
|
57
|
+
return self._crawler_id
|
|
58
|
+
|
|
59
|
+
@crawler_id.setter
|
|
60
|
+
def crawler_id(self, crawler_id):
|
|
61
|
+
"""Sets the crawler_id of this CrawlerConfig.
|
|
62
|
+
|
|
63
|
+
The identifier for this crawler # noqa: E501
|
|
64
|
+
|
|
65
|
+
:param crawler_id: The crawler_id of this CrawlerConfig. # noqa: E501
|
|
66
|
+
:type: str
|
|
67
|
+
"""
|
|
68
|
+
if crawler_id is None:
|
|
69
|
+
raise ValueError("Invalid value for `crawler_id`, must not be `None`") # noqa: E501
|
|
70
|
+
|
|
71
|
+
self._crawler_id = crawler_id
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def attributes(self):
|
|
75
|
+
"""Gets the attributes of this CrawlerConfig. # noqa: E501
|
|
76
|
+
|
|
77
|
+
key value pairs specific providing attributes and configuration information. # noqa: E501
|
|
78
|
+
|
|
79
|
+
:return: The attributes of this CrawlerConfig. # noqa: E501
|
|
80
|
+
:rtype: dict(str, str)
|
|
81
|
+
"""
|
|
82
|
+
return self._attributes
|
|
83
|
+
|
|
84
|
+
@attributes.setter
|
|
85
|
+
def attributes(self, attributes):
|
|
86
|
+
"""Sets the attributes of this CrawlerConfig.
|
|
87
|
+
|
|
88
|
+
key value pairs specific providing attributes and configuration information. # noqa: E501
|
|
89
|
+
|
|
90
|
+
:param attributes: The attributes of this CrawlerConfig. # noqa: E501
|
|
91
|
+
:type: dict(str, str)
|
|
92
|
+
"""
|
|
93
|
+
if attributes is None:
|
|
94
|
+
raise ValueError("Invalid value for `attributes`, must not be `None`") # noqa: E501
|
|
95
|
+
|
|
96
|
+
self._attributes = attributes
|
|
97
|
+
|
|
98
|
+
def to_dict(self):
|
|
99
|
+
"""Returns the model properties as a dict"""
|
|
100
|
+
result = {}
|
|
101
|
+
|
|
102
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
103
|
+
value = getattr(self, attr)
|
|
104
|
+
if isinstance(value, list):
|
|
105
|
+
result[attr] = list(map(
|
|
106
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
107
|
+
value
|
|
108
|
+
))
|
|
109
|
+
elif hasattr(value, "to_dict"):
|
|
110
|
+
result[attr] = value.to_dict()
|
|
111
|
+
elif isinstance(value, dict):
|
|
112
|
+
result[attr] = dict(map(
|
|
113
|
+
lambda item: (item[0], item[1].to_dict())
|
|
114
|
+
if hasattr(item[1], "to_dict") else item,
|
|
115
|
+
value.items()
|
|
116
|
+
))
|
|
117
|
+
else:
|
|
118
|
+
result[attr] = value
|
|
119
|
+
if issubclass(CrawlerConfig, dict):
|
|
120
|
+
for key, value in self.items():
|
|
121
|
+
result[key] = value
|
|
122
|
+
|
|
123
|
+
return result
|
|
124
|
+
|
|
125
|
+
def to_str(self):
|
|
126
|
+
"""Returns the string representation of the model"""
|
|
127
|
+
return pprint.pformat(self.to_dict())
|
|
128
|
+
|
|
129
|
+
def __repr__(self):
|
|
130
|
+
"""For `print` and `pprint`"""
|
|
131
|
+
return self.to_str()
|
|
132
|
+
|
|
133
|
+
def __eq__(self, other):
|
|
134
|
+
"""Returns true if both objects are equal"""
|
|
135
|
+
if not isinstance(other, CrawlerConfig):
|
|
136
|
+
return False
|
|
137
|
+
|
|
138
|
+
return self.__dict__ == other.__dict__
|
|
139
|
+
|
|
140
|
+
def __ne__(self, other):
|
|
141
|
+
"""Returns true if both objects are not equal"""
|
|
142
|
+
return not self == other
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Crawler Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Crawler 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 CrawlerStatus(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
|
+
'is_enabled': 'bool',
|
|
32
|
+
'is_auto_crawl_enabled': 'bool',
|
|
33
|
+
'num_jobs_active': 'int',
|
|
34
|
+
'num_jobs_failed': 'int',
|
|
35
|
+
'num_jobs_successful': 'int',
|
|
36
|
+
'num_jobs_pending': 'int',
|
|
37
|
+
'err_message': 'str'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
attribute_map = {
|
|
41
|
+
'is_enabled': 'isEnabled',
|
|
42
|
+
'is_auto_crawl_enabled': 'isAutoCrawlEnabled',
|
|
43
|
+
'num_jobs_active': 'numJobsActive',
|
|
44
|
+
'num_jobs_failed': 'numJobsFailed',
|
|
45
|
+
'num_jobs_successful': 'numJobsSuccessful',
|
|
46
|
+
'num_jobs_pending': 'numJobsPending',
|
|
47
|
+
'err_message': 'errMessage'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
def __init__(self, is_enabled=None, is_auto_crawl_enabled=None, num_jobs_active=None, num_jobs_failed=None, num_jobs_successful=None, num_jobs_pending=None, err_message=None): # noqa: E501
|
|
51
|
+
"""CrawlerStatus - a model defined in Swagger""" # noqa: E501
|
|
52
|
+
self._is_enabled = None
|
|
53
|
+
self._is_auto_crawl_enabled = None
|
|
54
|
+
self._num_jobs_active = None
|
|
55
|
+
self._num_jobs_failed = None
|
|
56
|
+
self._num_jobs_successful = None
|
|
57
|
+
self._num_jobs_pending = None
|
|
58
|
+
self._err_message = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
self.is_enabled = is_enabled
|
|
61
|
+
if is_auto_crawl_enabled is not None:
|
|
62
|
+
self.is_auto_crawl_enabled = is_auto_crawl_enabled
|
|
63
|
+
if num_jobs_active is not None:
|
|
64
|
+
self.num_jobs_active = num_jobs_active
|
|
65
|
+
if num_jobs_failed is not None:
|
|
66
|
+
self.num_jobs_failed = num_jobs_failed
|
|
67
|
+
if num_jobs_successful is not None:
|
|
68
|
+
self.num_jobs_successful = num_jobs_successful
|
|
69
|
+
if num_jobs_pending is not None:
|
|
70
|
+
self.num_jobs_pending = num_jobs_pending
|
|
71
|
+
if err_message is not None:
|
|
72
|
+
self.err_message = err_message
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def is_enabled(self):
|
|
76
|
+
"""Gets the is_enabled of this CrawlerStatus. # noqa: E501
|
|
77
|
+
|
|
78
|
+
Is the crawler enabled # noqa: E501
|
|
79
|
+
|
|
80
|
+
:return: The is_enabled of this CrawlerStatus. # noqa: E501
|
|
81
|
+
:rtype: bool
|
|
82
|
+
"""
|
|
83
|
+
return self._is_enabled
|
|
84
|
+
|
|
85
|
+
@is_enabled.setter
|
|
86
|
+
def is_enabled(self, is_enabled):
|
|
87
|
+
"""Sets the is_enabled of this CrawlerStatus.
|
|
88
|
+
|
|
89
|
+
Is the crawler enabled # noqa: E501
|
|
90
|
+
|
|
91
|
+
:param is_enabled: The is_enabled of this CrawlerStatus. # noqa: E501
|
|
92
|
+
:type: bool
|
|
93
|
+
"""
|
|
94
|
+
if is_enabled is None:
|
|
95
|
+
raise ValueError("Invalid value for `is_enabled`, must not be `None`") # noqa: E501
|
|
96
|
+
|
|
97
|
+
self._is_enabled = is_enabled
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def is_auto_crawl_enabled(self):
|
|
101
|
+
"""Gets the is_auto_crawl_enabled of this CrawlerStatus. # noqa: E501
|
|
102
|
+
|
|
103
|
+
Does crawler autocrawl AUs when needed. # noqa: E501
|
|
104
|
+
|
|
105
|
+
:return: The is_auto_crawl_enabled of this CrawlerStatus. # noqa: E501
|
|
106
|
+
:rtype: bool
|
|
107
|
+
"""
|
|
108
|
+
return self._is_auto_crawl_enabled
|
|
109
|
+
|
|
110
|
+
@is_auto_crawl_enabled.setter
|
|
111
|
+
def is_auto_crawl_enabled(self, is_auto_crawl_enabled):
|
|
112
|
+
"""Sets the is_auto_crawl_enabled of this CrawlerStatus.
|
|
113
|
+
|
|
114
|
+
Does crawler autocrawl AUs when needed. # noqa: E501
|
|
115
|
+
|
|
116
|
+
:param is_auto_crawl_enabled: The is_auto_crawl_enabled of this CrawlerStatus. # noqa: E501
|
|
117
|
+
:type: bool
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
self._is_auto_crawl_enabled = is_auto_crawl_enabled
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def num_jobs_active(self):
|
|
124
|
+
"""Gets the num_jobs_active of this CrawlerStatus. # noqa: E501
|
|
125
|
+
|
|
126
|
+
The number of jobs running. # noqa: E501
|
|
127
|
+
|
|
128
|
+
:return: The num_jobs_active of this CrawlerStatus. # noqa: E501
|
|
129
|
+
:rtype: int
|
|
130
|
+
"""
|
|
131
|
+
return self._num_jobs_active
|
|
132
|
+
|
|
133
|
+
@num_jobs_active.setter
|
|
134
|
+
def num_jobs_active(self, num_jobs_active):
|
|
135
|
+
"""Sets the num_jobs_active of this CrawlerStatus.
|
|
136
|
+
|
|
137
|
+
The number of jobs running. # noqa: E501
|
|
138
|
+
|
|
139
|
+
:param num_jobs_active: The num_jobs_active of this CrawlerStatus. # noqa: E501
|
|
140
|
+
:type: int
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._num_jobs_active = num_jobs_active
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def num_jobs_failed(self):
|
|
147
|
+
"""Gets the num_jobs_failed of this CrawlerStatus. # noqa: E501
|
|
148
|
+
|
|
149
|
+
The number of jobs failed. # noqa: E501
|
|
150
|
+
|
|
151
|
+
:return: The num_jobs_failed of this CrawlerStatus. # noqa: E501
|
|
152
|
+
:rtype: int
|
|
153
|
+
"""
|
|
154
|
+
return self._num_jobs_failed
|
|
155
|
+
|
|
156
|
+
@num_jobs_failed.setter
|
|
157
|
+
def num_jobs_failed(self, num_jobs_failed):
|
|
158
|
+
"""Sets the num_jobs_failed of this CrawlerStatus.
|
|
159
|
+
|
|
160
|
+
The number of jobs failed. # noqa: E501
|
|
161
|
+
|
|
162
|
+
:param num_jobs_failed: The num_jobs_failed of this CrawlerStatus. # noqa: E501
|
|
163
|
+
:type: int
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
self._num_jobs_failed = num_jobs_failed
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def num_jobs_successful(self):
|
|
170
|
+
"""Gets the num_jobs_successful of this CrawlerStatus. # noqa: E501
|
|
171
|
+
|
|
172
|
+
The number of jobs succeeded # noqa: E501
|
|
173
|
+
|
|
174
|
+
:return: The num_jobs_successful of this CrawlerStatus. # noqa: E501
|
|
175
|
+
:rtype: int
|
|
176
|
+
"""
|
|
177
|
+
return self._num_jobs_successful
|
|
178
|
+
|
|
179
|
+
@num_jobs_successful.setter
|
|
180
|
+
def num_jobs_successful(self, num_jobs_successful):
|
|
181
|
+
"""Sets the num_jobs_successful of this CrawlerStatus.
|
|
182
|
+
|
|
183
|
+
The number of jobs succeeded # noqa: E501
|
|
184
|
+
|
|
185
|
+
:param num_jobs_successful: The num_jobs_successful of this CrawlerStatus. # noqa: E501
|
|
186
|
+
:type: int
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
self._num_jobs_successful = num_jobs_successful
|
|
190
|
+
|
|
191
|
+
@property
|
|
192
|
+
def num_jobs_pending(self):
|
|
193
|
+
"""Gets the num_jobs_pending of this CrawlerStatus. # noqa: E501
|
|
194
|
+
|
|
195
|
+
The number of active jobs # noqa: E501
|
|
196
|
+
|
|
197
|
+
:return: The num_jobs_pending of this CrawlerStatus. # noqa: E501
|
|
198
|
+
:rtype: int
|
|
199
|
+
"""
|
|
200
|
+
return self._num_jobs_pending
|
|
201
|
+
|
|
202
|
+
@num_jobs_pending.setter
|
|
203
|
+
def num_jobs_pending(self, num_jobs_pending):
|
|
204
|
+
"""Sets the num_jobs_pending of this CrawlerStatus.
|
|
205
|
+
|
|
206
|
+
The number of active jobs # noqa: E501
|
|
207
|
+
|
|
208
|
+
:param num_jobs_pending: The num_jobs_pending of this CrawlerStatus. # noqa: E501
|
|
209
|
+
:type: int
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
self._num_jobs_pending = num_jobs_pending
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def err_message(self):
|
|
216
|
+
"""Gets the err_message of this CrawlerStatus. # noqa: E501
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
:return: The err_message of this CrawlerStatus. # noqa: E501
|
|
220
|
+
:rtype: str
|
|
221
|
+
"""
|
|
222
|
+
return self._err_message
|
|
223
|
+
|
|
224
|
+
@err_message.setter
|
|
225
|
+
def err_message(self, err_message):
|
|
226
|
+
"""Sets the err_message of this CrawlerStatus.
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
:param err_message: The err_message of this CrawlerStatus. # noqa: E501
|
|
230
|
+
:type: str
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
self._err_message = err_message
|
|
234
|
+
|
|
235
|
+
def to_dict(self):
|
|
236
|
+
"""Returns the model properties as a dict"""
|
|
237
|
+
result = {}
|
|
238
|
+
|
|
239
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
240
|
+
value = getattr(self, attr)
|
|
241
|
+
if isinstance(value, list):
|
|
242
|
+
result[attr] = list(map(
|
|
243
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
244
|
+
value
|
|
245
|
+
))
|
|
246
|
+
elif hasattr(value, "to_dict"):
|
|
247
|
+
result[attr] = value.to_dict()
|
|
248
|
+
elif isinstance(value, dict):
|
|
249
|
+
result[attr] = dict(map(
|
|
250
|
+
lambda item: (item[0], item[1].to_dict())
|
|
251
|
+
if hasattr(item[1], "to_dict") else item,
|
|
252
|
+
value.items()
|
|
253
|
+
))
|
|
254
|
+
else:
|
|
255
|
+
result[attr] = value
|
|
256
|
+
if issubclass(CrawlerStatus, dict):
|
|
257
|
+
for key, value in self.items():
|
|
258
|
+
result[key] = value
|
|
259
|
+
|
|
260
|
+
return result
|
|
261
|
+
|
|
262
|
+
def to_str(self):
|
|
263
|
+
"""Returns the string representation of the model"""
|
|
264
|
+
return pprint.pformat(self.to_dict())
|
|
265
|
+
|
|
266
|
+
def __repr__(self):
|
|
267
|
+
"""For `print` and `pprint`"""
|
|
268
|
+
return self.to_str()
|
|
269
|
+
|
|
270
|
+
def __eq__(self, other):
|
|
271
|
+
"""Returns true if both objects are equal"""
|
|
272
|
+
if not isinstance(other, CrawlerStatus):
|
|
273
|
+
return False
|
|
274
|
+
|
|
275
|
+
return self.__dict__ == other.__dict__
|
|
276
|
+
|
|
277
|
+
def __ne__(self, other):
|
|
278
|
+
"""Returns true if both objects are not equal"""
|
|
279
|
+
return not self == other
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Crawler Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Crawler 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 CrawlerStatuses(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
|
+
'crawler_map': 'dict(str, CrawlerStatus)'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
attribute_map = {
|
|
35
|
+
'crawler_map': 'crawlerMap'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
def __init__(self, crawler_map=None): # noqa: E501
|
|
39
|
+
"""CrawlerStatuses - a model defined in Swagger""" # noqa: E501
|
|
40
|
+
self._crawler_map = None
|
|
41
|
+
self.discriminator = None
|
|
42
|
+
if crawler_map is not None:
|
|
43
|
+
self.crawler_map = crawler_map
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def crawler_map(self):
|
|
47
|
+
"""Gets the crawler_map of this CrawlerStatuses. # noqa: E501
|
|
48
|
+
|
|
49
|
+
An map of crawler status objects # noqa: E501
|
|
50
|
+
|
|
51
|
+
:return: The crawler_map of this CrawlerStatuses. # noqa: E501
|
|
52
|
+
:rtype: dict(str, CrawlerStatus)
|
|
53
|
+
"""
|
|
54
|
+
return self._crawler_map
|
|
55
|
+
|
|
56
|
+
@crawler_map.setter
|
|
57
|
+
def crawler_map(self, crawler_map):
|
|
58
|
+
"""Sets the crawler_map of this CrawlerStatuses.
|
|
59
|
+
|
|
60
|
+
An map of crawler status objects # noqa: E501
|
|
61
|
+
|
|
62
|
+
:param crawler_map: The crawler_map of this CrawlerStatuses. # noqa: E501
|
|
63
|
+
:type: dict(str, CrawlerStatus)
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
self._crawler_map = crawler_map
|
|
67
|
+
|
|
68
|
+
def to_dict(self):
|
|
69
|
+
"""Returns the model properties as a dict"""
|
|
70
|
+
result = {}
|
|
71
|
+
|
|
72
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
73
|
+
value = getattr(self, attr)
|
|
74
|
+
if isinstance(value, list):
|
|
75
|
+
result[attr] = list(map(
|
|
76
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
77
|
+
value
|
|
78
|
+
))
|
|
79
|
+
elif hasattr(value, "to_dict"):
|
|
80
|
+
result[attr] = value.to_dict()
|
|
81
|
+
elif isinstance(value, dict):
|
|
82
|
+
result[attr] = dict(map(
|
|
83
|
+
lambda item: (item[0], item[1].to_dict())
|
|
84
|
+
if hasattr(item[1], "to_dict") else item,
|
|
85
|
+
value.items()
|
|
86
|
+
))
|
|
87
|
+
else:
|
|
88
|
+
result[attr] = value
|
|
89
|
+
if issubclass(CrawlerStatuses, dict):
|
|
90
|
+
for key, value in self.items():
|
|
91
|
+
result[key] = value
|
|
92
|
+
|
|
93
|
+
return result
|
|
94
|
+
|
|
95
|
+
def to_str(self):
|
|
96
|
+
"""Returns the string representation of the model"""
|
|
97
|
+
return pprint.pformat(self.to_dict())
|
|
98
|
+
|
|
99
|
+
def __repr__(self):
|
|
100
|
+
"""For `print` and `pprint`"""
|
|
101
|
+
return self.to_str()
|
|
102
|
+
|
|
103
|
+
def __eq__(self, other):
|
|
104
|
+
"""Returns true if both objects are equal"""
|
|
105
|
+
if not isinstance(other, CrawlerStatuses):
|
|
106
|
+
return False
|
|
107
|
+
|
|
108
|
+
return self.__dict__ == other.__dict__
|
|
109
|
+
|
|
110
|
+
def __ne__(self, other):
|
|
111
|
+
"""Returns true if both objects are not equal"""
|
|
112
|
+
return not self == other
|