From 0182cd1456ca1457747ff1363d9d5c5cf95ee2f7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 26 Dec 2018 23:26:22 -0800 Subject: codegen --- python/fatcat_client/models/file_entity.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'python/fatcat_client/models/file_entity.py') 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 -- cgit v1.2.3