summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models/release_ref.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/release_ref.py
parent81b40c73e9f6d17637b90dbea1808171f89c9351 (diff)
downloadfatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.tar.gz
fatcat-0182cd1456ca1457747ff1363d9d5c5cf95ee2f7.zip
codegen
Diffstat (limited to 'python/fatcat_client/models/release_ref.py')
-rw-r--r--python/fatcat_client/models/release_ref.py8
1 files changed, 8 insertions, 0 deletions
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