aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client/models/editor.py')
-rw-r--r--python/fatcat_client/models/editor.py8
1 files changed, 8 insertions, 0 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