summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models/file_entity.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client/models/file_entity.py')
-rw-r--r--python/fatcat_client/models/file_entity.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/python/fatcat_client/models/file_entity.py b/python/fatcat_client/models/file_entity.py
index f6f315c1..475b914b 100644
--- a/python/fatcat_client/models/file_entity.py
+++ b/python/fatcat_client/models/file_entity.py
@@ -281,6 +281,7 @@ class FileEntity(object):
def editgroup_id(self):
"""Gets the editgroup_id of this FileEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The editgroup_id of this FileEntity. # noqa: E501
:rtype: str
@@ -291,10 +292,17 @@ class FileEntity(object):
def editgroup_id(self, editgroup_id):
"""Sets the editgroup_id of this FileEntity.
+ base32-encoded unique identifier # noqa: E501
:param editgroup_id: The editgroup_id of this FileEntity. # noqa: E501
:type: str
"""
+ 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
@@ -302,6 +310,7 @@ class FileEntity(object):
def redirect(self):
"""Gets the redirect of this FileEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The redirect of this FileEntity. # noqa: E501
:rtype: str
@@ -312,10 +321,17 @@ class FileEntity(object):
def redirect(self, redirect):
"""Sets the redirect of this FileEntity.
+ base32-encoded unique identifier # noqa: E501
:param redirect: The redirect of this FileEntity. # noqa: E501
:type: str
"""
+ if redirect is not None and len(redirect) > 26:
+ raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
+ if redirect is not None and len(redirect) < 26:
+ raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
+ if redirect is not None and not re.search('[a-zA-Z2-7]{26}', redirect): # noqa: E501
+ raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
self._redirect = redirect
@@ -323,6 +339,7 @@ class FileEntity(object):
def revision(self):
"""Gets the revision of this FileEntity. # noqa: E501
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:return: The revision of this FileEntity. # noqa: E501
:rtype: str
@@ -333,10 +350,17 @@ class FileEntity(object):
def revision(self, revision):
"""Sets the revision of this FileEntity.
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:param revision: The revision of this FileEntity. # 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
@@ -344,6 +368,7 @@ class FileEntity(object):
def ident(self):
"""Gets the ident of this FileEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The ident of this FileEntity. # noqa: E501
:rtype: str
@@ -354,10 +379,17 @@ class FileEntity(object):
def ident(self, ident):
"""Sets the ident of this FileEntity.
+ base32-encoded unique identifier # noqa: E501
:param ident: The ident of this FileEntity. # noqa: E501
:type: str
"""
+ 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