summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models
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
parent81b40c73e9f6d17637b90dbea1808171f89c9351 (diff)
downloadfatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.tar.gz
fatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.zip
codegen
Diffstat (limited to 'python/fatcat_client/models')
-rw-r--r--python/fatcat_client/models/editor.py8
-rw-r--r--python/fatcat_client/models/entity_edit.py54
-rw-r--r--python/fatcat_client/models/file_entity.py18
-rw-r--r--python/fatcat_client/models/fileset_entity_manifest.py18
-rw-r--r--python/fatcat_client/models/release_entity_abstracts.py6
-rw-r--r--python/fatcat_client/models/release_ref.py8
-rw-r--r--python/fatcat_client/models/webcapture_entity_cdx.py23
7 files changed, 126 insertions, 9 deletions
diff --git a/python/fatcat_client/models/editor.py b/python/fatcat_client/models/editor.py
index c926f86f..2010d454 100644
--- a/python/fatcat_client/models/editor.py
+++ b/python/fatcat_client/models/editor.py
@@ -55,6 +55,7 @@ class Editor(object):
def editor_id(self):
"""Gets the editor_id of this Editor. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The editor_id of this Editor. # noqa: E501
:rtype: str
@@ -65,10 +66,17 @@ class Editor(object):
def editor_id(self, editor_id):
"""Sets the editor_id of this Editor.
+ base32-encoded unique identifier # noqa: E501
:param editor_id: The editor_id of this Editor. # noqa: E501
:type: str
"""
+ if editor_id is not None and len(editor_id) > 26:
+ raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501
+ if editor_id is not None and len(editor_id) < 26:
+ raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501
+ if editor_id is not None and not re.search('[a-zA-Z2-7]{26}', editor_id): # noqa: E501
+ raise ValueError("Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._editor_id = editor_id
diff --git a/python/fatcat_client/models/entity_edit.py b/python/fatcat_client/models/entity_edit.py
index 27af5eb6..cb1da67b 100644
--- a/python/fatcat_client/models/entity_edit.py
+++ b/python/fatcat_client/models/entity_edit.py
@@ -31,7 +31,7 @@ class EntityEdit(object):
and the value is json key in definition.
"""
swagger_types = {
- 'edit_id': 'int',
+ 'edit_id': 'str',
'ident': 'str',
'revision': 'str',
'prev_revision': 'str',
@@ -78,9 +78,10 @@ class EntityEdit(object):
def edit_id(self):
"""Gets the edit_id of this EntityEdit. # noqa: E501
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:return: The edit_id of this EntityEdit. # noqa: E501
- :rtype: int
+ :rtype: str
"""
return self._edit_id
@@ -88,12 +89,19 @@ class EntityEdit(object):
def edit_id(self, edit_id):
"""Sets the edit_id of this EntityEdit.
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:param edit_id: The edit_id of this EntityEdit. # noqa: E501
- :type: int
+ :type: str
"""
if edit_id is None:
raise ValueError("Invalid value for `edit_id`, must not be `None`") # noqa: E501
+ if edit_id is not None and len(edit_id) > 36:
+ raise ValueError("Invalid value for `edit_id`, length must be less than or equal to `36`") # noqa: E501
+ if edit_id is not None and len(edit_id) < 36:
+ raise ValueError("Invalid value for `edit_id`, length must be greater than or equal to `36`") # noqa: E501
+ if edit_id is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501
+ raise ValueError("Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
self._edit_id = edit_id
@@ -101,6 +109,7 @@ class EntityEdit(object):
def ident(self):
"""Gets the ident of this EntityEdit. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The ident of this EntityEdit. # noqa: E501
:rtype: str
@@ -111,12 +120,19 @@ class EntityEdit(object):
def ident(self, ident):
"""Sets the ident of this EntityEdit.
+ base32-encoded unique identifier # noqa: E501
:param ident: The ident of this EntityEdit. # noqa: E501
:type: str
"""
if ident is None:
raise ValueError("Invalid value for `ident`, must not be `None`") # noqa: E501
+ if ident is not None and len(ident) > 26:
+ raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
+ if ident is not None and len(ident) < 26:
+ raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
+ if ident is not None and not re.search('[a-zA-Z2-7]{26}', ident): # noqa: E501
+ raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._ident = ident
@@ -124,6 +140,7 @@ class EntityEdit(object):
def revision(self):
"""Gets the revision of this EntityEdit. # noqa: E501
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:return: The revision of this EntityEdit. # noqa: E501
:rtype: str
@@ -134,10 +151,17 @@ class EntityEdit(object):
def revision(self, revision):
"""Sets the revision of this EntityEdit.
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:param revision: The revision of this EntityEdit. # noqa: E501
:type: str
"""
+ if revision is not None and len(revision) > 36:
+ raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
+ if revision is not None and len(revision) < 36:
+ raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
+ if revision is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
+ raise ValueError("Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
self._revision = revision
@@ -145,6 +169,7 @@ class EntityEdit(object):
def prev_revision(self):
"""Gets the prev_revision of this EntityEdit. # noqa: E501
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:return: The prev_revision of this EntityEdit. # noqa: E501
:rtype: str
@@ -155,10 +180,17 @@ class EntityEdit(object):
def prev_revision(self, prev_revision):
"""Sets the prev_revision of this EntityEdit.
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:param prev_revision: The prev_revision of this EntityEdit. # noqa: E501
:type: str
"""
+ if prev_revision is not None and len(prev_revision) > 36:
+ raise ValueError("Invalid value for `prev_revision`, length must be less than or equal to `36`") # noqa: E501
+ if prev_revision is not None and len(prev_revision) < 36:
+ raise ValueError("Invalid value for `prev_revision`, length must be greater than or equal to `36`") # noqa: E501
+ if prev_revision is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501
+ raise ValueError("Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
self._prev_revision = prev_revision
@@ -166,6 +198,7 @@ class EntityEdit(object):
def redirect_ident(self):
"""Gets the redirect_ident of this EntityEdit. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The redirect_ident of this EntityEdit. # noqa: E501
:rtype: str
@@ -176,10 +209,17 @@ class EntityEdit(object):
def redirect_ident(self, redirect_ident):
"""Sets the redirect_ident of this EntityEdit.
+ base32-encoded unique identifier # noqa: E501
:param redirect_ident: The redirect_ident of this EntityEdit. # noqa: E501
:type: str
"""
+ if redirect_ident is not None and len(redirect_ident) > 26:
+ raise ValueError("Invalid value for `redirect_ident`, length must be less than or equal to `26`") # noqa: E501
+ if redirect_ident is not None and len(redirect_ident) < 26:
+ raise ValueError("Invalid value for `redirect_ident`, length must be greater than or equal to `26`") # noqa: E501
+ if redirect_ident is not None and not re.search('[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501
+ raise ValueError("Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._redirect_ident = redirect_ident
@@ -187,6 +227,7 @@ class EntityEdit(object):
def editgroup_id(self):
"""Gets the editgroup_id of this EntityEdit. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The editgroup_id of this EntityEdit. # noqa: E501
:rtype: str
@@ -197,12 +238,19 @@ class EntityEdit(object):
def editgroup_id(self, editgroup_id):
"""Sets the editgroup_id of this EntityEdit.
+ base32-encoded unique identifier # noqa: E501
:param editgroup_id: The editgroup_id of this EntityEdit. # noqa: E501
:type: str
"""
if editgroup_id is None:
raise ValueError("Invalid value for `editgroup_id`, must not be `None`") # noqa: E501
+ if editgroup_id is not None and len(editgroup_id) > 26:
+ raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501
+ if editgroup_id is not None and len(editgroup_id) < 26:
+ raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501
+ if editgroup_id is not None and not re.search('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501
+ raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._editgroup_id = editgroup_id
diff --git a/python/fatcat_client/models/file_entity.py b/python/fatcat_client/models/file_entity.py
index 001f5b6e..5d0105bd 100644
--- a/python/fatcat_client/models/file_entity.py
+++ b/python/fatcat_client/models/file_entity.py
@@ -190,6 +190,12 @@ class FileEntity(object):
:param sha256: The sha256 of this FileEntity. # 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
@@ -211,6 +217,12 @@ class FileEntity(object):
:param sha1: The sha1 of this FileEntity. # noqa: E501
:type: str
"""
+ 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
@@ -232,6 +244,12 @@ class FileEntity(object):
:param md5: The md5 of this FileEntity. # noqa: E501
:type: str
"""
+ if md5 is not None and len(md5) > 32:
+ raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501
+ if md5 is not None and len(md5) < 32:
+ raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501
+ if md5 is not None and not re.search('[a-f0-9]{32}', md5): # noqa: E501
+ raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501
self._md5 = md5
diff --git a/python/fatcat_client/models/fileset_entity_manifest.py b/python/fatcat_client/models/fileset_entity_manifest.py
index 51990ebe..6dd5800f 100644
--- a/python/fatcat_client/models/fileset_entity_manifest.py
+++ b/python/fatcat_client/models/fileset_entity_manifest.py
@@ -134,6 +134,12 @@ class FilesetEntityManifest(object):
:param md5: The md5 of this FilesetEntityManifest. # noqa: E501
:type: str
"""
+ if md5 is not None and len(md5) > 32:
+ raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501
+ if md5 is not None and len(md5) < 32:
+ raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501
+ if md5 is not None and not re.search('[a-f0-9]{32}', md5): # noqa: E501
+ raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501
self._md5 = md5
@@ -155,6 +161,12 @@ class FilesetEntityManifest(object):
:param sha1: The sha1 of this FilesetEntityManifest. # noqa: E501
:type: str
"""
+ 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
@@ -176,6 +188,12 @@ class FilesetEntityManifest(object):
:param sha256: The sha256 of this FilesetEntityManifest. # 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
diff --git a/python/fatcat_client/models/release_entity_abstracts.py b/python/fatcat_client/models/release_entity_abstracts.py
index 1adf832a..2818e112 100644
--- a/python/fatcat_client/models/release_entity_abstracts.py
+++ b/python/fatcat_client/models/release_entity_abstracts.py
@@ -80,6 +80,12 @@ class ReleaseEntityAbstracts(object):
:param sha1: The sha1 of this ReleaseEntityAbstracts. # noqa: E501
:type: str
"""
+ 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
diff --git a/python/fatcat_client/models/release_ref.py b/python/fatcat_client/models/release_ref.py
index 99012c42..81ad9cfe 100644
--- a/python/fatcat_client/models/release_ref.py
+++ b/python/fatcat_client/models/release_ref.py
@@ -107,6 +107,7 @@ class ReleaseRef(object):
def target_release_id(self):
"""Gets the target_release_id of this ReleaseRef. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The target_release_id of this ReleaseRef. # noqa: E501
:rtype: str
@@ -117,10 +118,17 @@ class ReleaseRef(object):
def target_release_id(self, target_release_id):
"""Sets the target_release_id of this ReleaseRef.
+ base32-encoded unique identifier # noqa: E501
:param target_release_id: The target_release_id of this ReleaseRef. # noqa: E501
:type: str
"""
+ if target_release_id is not None and len(target_release_id) > 26:
+ raise ValueError("Invalid value for `target_release_id`, length must be less than or equal to `26`") # noqa: E501
+ if target_release_id is not None and len(target_release_id) < 26:
+ raise ValueError("Invalid value for `target_release_id`, length must be greater than or equal to `26`") # noqa: E501
+ if target_release_id is not None and not re.search('[a-zA-Z2-7]{26}', target_release_id): # noqa: E501
+ raise ValueError("Invalid value for `target_release_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._target_release_id = target_release_id
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