summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models/webcapture_entity_cdx.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:26:22 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:26:22 -0800
commit0182cd1456ca1457747ff1363d9d5c5cf95ee2f7 (patch)
treef619d908954e47f7fcc357e3b089b812e8885790 /python/fatcat_client/models/webcapture_entity_cdx.py
parent81b40c73e9f6d17637b90dbea1808171f89c9351 (diff)
downloadfatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.tar.gz
fatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.zip
codegen
Diffstat (limited to 'python/fatcat_client/models/webcapture_entity_cdx.py')
-rw-r--r--python/fatcat_client/models/webcapture_entity_cdx.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/python/fatcat_client/models/webcapture_entity_cdx.py b/python/fatcat_client/models/webcapture_entity_cdx.py
index eb621d2f..a34ea2f1 100644
--- a/python/fatcat_client/models/webcapture_entity_cdx.py
+++ b/python/fatcat_client/models/webcapture_entity_cdx.py
@@ -32,7 +32,7 @@ class WebcaptureEntityCdx(object):
"""
swagger_types = {
'surt': 'str',
- 'timestamp': 'int',
+ 'timestamp': 'str',
'url': 'str',
'mimetype': 'str',
'status_code': 'int',
@@ -67,7 +67,8 @@ class WebcaptureEntityCdx(object):
self.url = url
if mimetype is not None:
self.mimetype = mimetype
- self.status_code = status_code
+ if status_code is not None:
+ self.status_code = status_code
self.sha1 = sha1
if sha256 is not None:
self.sha256 = sha256
@@ -101,7 +102,7 @@ class WebcaptureEntityCdx(object):
:return: The timestamp of this WebcaptureEntityCdx. # noqa: E501
- :rtype: int
+ :rtype: str
"""
return self._timestamp
@@ -111,7 +112,7 @@ class WebcaptureEntityCdx(object):
:param timestamp: The timestamp of this WebcaptureEntityCdx. # noqa: E501
- :type: int
+ :type: str
"""
if timestamp is None:
raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
@@ -180,8 +181,6 @@ class WebcaptureEntityCdx(object):
:param status_code: The status_code of this WebcaptureEntityCdx. # noqa: E501
:type: int
"""
- if status_code is None:
- raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501
self._status_code = status_code
@@ -205,6 +204,12 @@ class WebcaptureEntityCdx(object):
"""
if sha1 is None:
raise ValueError("Invalid value for `sha1`, must not be `None`") # noqa: E501
+ if sha1 is not None and len(sha1) > 40:
+ raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501
+ if sha1 is not None and len(sha1) < 40:
+ raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501
+ if sha1 is not None and not re.search('[a-f0-9]{40}', sha1): # noqa: E501
+ raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501
self._sha1 = sha1
@@ -226,6 +231,12 @@ class WebcaptureEntityCdx(object):
:param sha256: The sha256 of this WebcaptureEntityCdx. # noqa: E501
:type: str
"""
+ if sha256 is not None and len(sha256) > 64:
+ raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501
+ if sha256 is not None and len(sha256) < 64:
+ raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501
+ if sha256 is not None and not re.search('[a-f0-9]{64}', sha256): # noqa: E501
+ raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501
self._sha256 = sha256