aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models/work_entity.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client/models/work_entity.py')
-rw-r--r--python/fatcat_client/models/work_entity.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/python/fatcat_client/models/work_entity.py b/python/fatcat_client/models/work_entity.py
index ab7d933b..f49ccadf 100644
--- a/python/fatcat_client/models/work_entity.py
+++ b/python/fatcat_client/models/work_entity.py
@@ -97,6 +97,7 @@ class WorkEntity(object):
def editgroup_id(self):
"""Gets the editgroup_id of this WorkEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The editgroup_id of this WorkEntity. # noqa: E501
:rtype: str
@@ -107,10 +108,17 @@ class WorkEntity(object):
def editgroup_id(self, editgroup_id):
"""Sets the editgroup_id of this WorkEntity.
+ base32-encoded unique identifier # noqa: E501
:param editgroup_id: The editgroup_id of this WorkEntity. # 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
@@ -118,6 +126,7 @@ class WorkEntity(object):
def redirect(self):
"""Gets the redirect of this WorkEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The redirect of this WorkEntity. # noqa: E501
:rtype: str
@@ -128,10 +137,17 @@ class WorkEntity(object):
def redirect(self, redirect):
"""Sets the redirect of this WorkEntity.
+ base32-encoded unique identifier # noqa: E501
:param redirect: The redirect of this WorkEntity. # 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
@@ -139,6 +155,7 @@ class WorkEntity(object):
def revision(self):
"""Gets the revision of this WorkEntity. # noqa: E501
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:return: The revision of this WorkEntity. # noqa: E501
:rtype: str
@@ -149,10 +166,17 @@ class WorkEntity(object):
def revision(self, revision):
"""Sets the revision of this WorkEntity.
+ UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
:param revision: The revision of this WorkEntity. # 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
@@ -160,6 +184,7 @@ class WorkEntity(object):
def ident(self):
"""Gets the ident of this WorkEntity. # noqa: E501
+ base32-encoded unique identifier # noqa: E501
:return: The ident of this WorkEntity. # noqa: E501
:rtype: str
@@ -170,10 +195,17 @@ class WorkEntity(object):
def ident(self, ident):
"""Sets the ident of this WorkEntity.
+ base32-encoded unique identifier # noqa: E501
:param ident: The ident of this WorkEntity. # 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