diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-26 01:01:15 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-26 01:01:15 -0700 |
commit | e564602a656abedd3c5f15ee4b4495d29ef96e04 (patch) | |
tree | 671c776d0389040d92575d641cc3b15356e151c2 /python/fatcat_client/models | |
parent | 38b145908bee4b7fd9be5d1310a0fe875d92aeff (diff) | |
download | fatcat-e564602a656abedd3c5f15ee4b4495d29ef96e04.tar.gz fatcat-e564602a656abedd3c5f15ee4b4495d29ef96e04.zip |
update fatcat_client with codegen changes
Diffstat (limited to 'python/fatcat_client/models')
-rw-r--r-- | python/fatcat_client/models/container_entity.py | 38 | ||||
-rw-r--r-- | python/fatcat_client/models/creator_entity.py | 38 | ||||
-rw-r--r-- | python/fatcat_client/models/editgroup.py | 16 | ||||
-rw-r--r-- | python/fatcat_client/models/file_entity.py | 32 | ||||
-rw-r--r-- | python/fatcat_client/models/release_contrib.py | 32 | ||||
-rw-r--r-- | python/fatcat_client/models/release_entity.py | 92 | ||||
-rw-r--r-- | python/fatcat_client/models/work_entity.py | 32 |
7 files changed, 278 insertions, 2 deletions
diff --git a/python/fatcat_client/models/container_entity.py b/python/fatcat_client/models/container_entity.py index 0d8dffef..4ca2653e 100644 --- a/python/fatcat_client/models/container_entity.py +++ b/python/fatcat_client/models/container_entity.py @@ -182,6 +182,12 @@ class ContainerEntity(object): :param issnl: The issnl of this ContainerEntity. # noqa: E501 :type: str """ + if issnl is not None and len(issnl) > 9: + raise ValueError("Invalid value for `issnl`, length must be less than or equal to `9`") # noqa: E501 + if issnl is not None and len(issnl) < 9: + raise ValueError("Invalid value for `issnl`, length must be greater than or equal to `9`") # noqa: E501 + if issnl is not None and not re.search('\\d{4}-\\d{3}[0-9X]', issnl): # noqa: E501 + raise ValueError("Invalid value for `issnl`, must be a follow pattern or equal to `/\\d{4}-\\d{3}[0-9X]/`") # noqa: E501 self._issnl = issnl @@ -254,6 +260,7 @@ class ContainerEntity(object): def editgroup_id(self): """Gets the editgroup_id of this ContainerEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editgroup_id of this ContainerEntity. # noqa: E501 :rtype: str @@ -264,10 +271,17 @@ class ContainerEntity(object): def editgroup_id(self, editgroup_id): """Sets the editgroup_id of this ContainerEntity. + base32-encoded unique identifier # noqa: E501 :param editgroup_id: The editgroup_id of this ContainerEntity. # 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 @@ -275,6 +289,7 @@ class ContainerEntity(object): def redirect(self): """Gets the redirect of this ContainerEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The redirect of this ContainerEntity. # noqa: E501 :rtype: str @@ -285,10 +300,17 @@ class ContainerEntity(object): def redirect(self, redirect): """Sets the redirect of this ContainerEntity. + base32-encoded unique identifier # noqa: E501 :param redirect: The redirect of this ContainerEntity. # 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 @@ -296,6 +318,7 @@ class ContainerEntity(object): def revision(self): """Gets the revision of this ContainerEntity. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The revision of this ContainerEntity. # noqa: E501 :rtype: str @@ -306,10 +329,17 @@ class ContainerEntity(object): def revision(self, revision): """Sets the revision of this ContainerEntity. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :param revision: The revision of this ContainerEntity. # 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 @@ -317,6 +347,7 @@ class ContainerEntity(object): def ident(self): """Gets the ident of this ContainerEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The ident of this ContainerEntity. # noqa: E501 :rtype: str @@ -327,10 +358,17 @@ class ContainerEntity(object): def ident(self, ident): """Sets the ident of this ContainerEntity. + base32-encoded unique identifier # noqa: E501 :param ident: The ident of this ContainerEntity. # 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 diff --git a/python/fatcat_client/models/creator_entity.py b/python/fatcat_client/models/creator_entity.py index fa6f8619..a9e459ee 100644 --- a/python/fatcat_client/models/creator_entity.py +++ b/python/fatcat_client/models/creator_entity.py @@ -135,6 +135,12 @@ class CreatorEntity(object): :param orcid: The orcid of this CreatorEntity. # noqa: E501 :type: str """ + if orcid is not None and len(orcid) > 19: + raise ValueError("Invalid value for `orcid`, length must be less than or equal to `19`") # noqa: E501 + if orcid is not None and len(orcid) < 19: + raise ValueError("Invalid value for `orcid`, length must be greater than or equal to `19`") # noqa: E501 + if orcid is not None and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{4}', orcid): # noqa: E501 + raise ValueError("Invalid value for `orcid`, must be a follow pattern or equal to `/\\d{4}-\\d{4}-\\d{4}-\\d{4}/`") # noqa: E501 self._orcid = orcid @@ -234,6 +240,7 @@ class CreatorEntity(object): def ident(self): """Gets the ident of this CreatorEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The ident of this CreatorEntity. # noqa: E501 :rtype: str @@ -244,10 +251,17 @@ class CreatorEntity(object): def ident(self, ident): """Sets the ident of this CreatorEntity. + base32-encoded unique identifier # noqa: E501 :param ident: The ident of this CreatorEntity. # 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 @@ -255,6 +269,7 @@ class CreatorEntity(object): def revision(self): """Gets the revision of this CreatorEntity. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The revision of this CreatorEntity. # noqa: E501 :rtype: str @@ -265,10 +280,17 @@ class CreatorEntity(object): def revision(self, revision): """Sets the revision of this CreatorEntity. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :param revision: The revision of this CreatorEntity. # 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 @@ -276,6 +298,7 @@ class CreatorEntity(object): def redirect(self): """Gets the redirect of this CreatorEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The redirect of this CreatorEntity. # noqa: E501 :rtype: str @@ -286,10 +309,17 @@ class CreatorEntity(object): def redirect(self, redirect): """Sets the redirect of this CreatorEntity. + base32-encoded unique identifier # noqa: E501 :param redirect: The redirect of this CreatorEntity. # 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 @@ -297,6 +327,7 @@ class CreatorEntity(object): def editgroup_id(self): """Gets the editgroup_id of this CreatorEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editgroup_id of this CreatorEntity. # noqa: E501 :rtype: str @@ -307,10 +338,17 @@ class CreatorEntity(object): def editgroup_id(self, editgroup_id): """Sets the editgroup_id of this CreatorEntity. + base32-encoded unique identifier # noqa: E501 :param editgroup_id: The editgroup_id of this CreatorEntity. # 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 diff --git a/python/fatcat_client/models/editgroup.py b/python/fatcat_client/models/editgroup.py index e350f2e1..ff21b800 100644 --- a/python/fatcat_client/models/editgroup.py +++ b/python/fatcat_client/models/editgroup.py @@ -72,6 +72,7 @@ class Editgroup(object): def id(self): """Gets the id of this Editgroup. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The id of this Editgroup. # noqa: E501 :rtype: str @@ -82,10 +83,17 @@ class Editgroup(object): def id(self, id): """Sets the id of this Editgroup. + base32-encoded unique identifier # noqa: E501 :param id: The id of this Editgroup. # noqa: E501 :type: str """ + if id is not None and len(id) > 26: + raise ValueError("Invalid value for `id`, length must be less than or equal to `26`") # noqa: E501 + if id is not None and len(id) < 26: + raise ValueError("Invalid value for `id`, length must be greater than or equal to `26`") # noqa: E501 + if id is not None and not re.search('[a-zA-Z2-7]{26}', id): # noqa: E501 + raise ValueError("Invalid value for `id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._id = id @@ -93,6 +101,7 @@ class Editgroup(object): def editor_id(self): """Gets the editor_id of this Editgroup. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editor_id of this Editgroup. # noqa: E501 :rtype: str @@ -103,12 +112,19 @@ class Editgroup(object): def editor_id(self, editor_id): """Sets the editor_id of this Editgroup. + base32-encoded unique identifier # noqa: E501 :param editor_id: The editor_id of this Editgroup. # noqa: E501 :type: str """ if editor_id is None: raise ValueError("Invalid value for `editor_id`, must not be `None`") # noqa: E501 + 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 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 diff --git a/python/fatcat_client/models/release_contrib.py b/python/fatcat_client/models/release_contrib.py index f2eeac8f..a06b0e66 100644 --- a/python/fatcat_client/models/release_contrib.py +++ b/python/fatcat_client/models/release_contrib.py @@ -16,6 +16,8 @@ import re # noqa: F401 import six +from fatcat_client.models.creator_entity import CreatorEntity # noqa: F401,E501 + class ReleaseContrib(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -33,6 +35,7 @@ class ReleaseContrib(object): swagger_types = { 'index': 'int', 'creator_id': 'str', + 'creator': 'CreatorEntity', 'raw_name': 'str', 'extra': 'object', 'role': 'str' @@ -41,16 +44,18 @@ class ReleaseContrib(object): attribute_map = { 'index': 'index', 'creator_id': 'creator_id', + 'creator': 'creator', 'raw_name': 'raw_name', 'extra': 'extra', 'role': 'role' } - def __init__(self, index=None, creator_id=None, raw_name=None, extra=None, role=None): # noqa: E501 + def __init__(self, index=None, creator_id=None, creator=None, raw_name=None, extra=None, role=None): # noqa: E501 """ReleaseContrib - a model defined in Swagger""" # noqa: E501 self._index = None self._creator_id = None + self._creator = None self._raw_name = None self._extra = None self._role = None @@ -60,6 +65,8 @@ class ReleaseContrib(object): self.index = index if creator_id is not None: self.creator_id = creator_id + if creator is not None: + self.creator = creator if raw_name is not None: self.raw_name = raw_name if extra is not None: @@ -110,6 +117,29 @@ class ReleaseContrib(object): self._creator_id = creator_id @property + def creator(self): + """Gets the creator of this ReleaseContrib. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The creator of this ReleaseContrib. # noqa: E501 + :rtype: CreatorEntity + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ReleaseContrib. + + Optional; GET-only # noqa: E501 + + :param creator: The creator of this ReleaseContrib. # noqa: E501 + :type: CreatorEntity + """ + + self._creator = creator + + @property def raw_name(self): """Gets the raw_name of this ReleaseContrib. # noqa: E501 diff --git a/python/fatcat_client/models/release_entity.py b/python/fatcat_client/models/release_entity.py index 07b1cd80..3412ca92 100644 --- a/python/fatcat_client/models/release_entity.py +++ b/python/fatcat_client/models/release_entity.py @@ -16,6 +16,8 @@ import re # noqa: F401 import six +from fatcat_client.models.container_entity import ContainerEntity # noqa: F401,E501 +from fatcat_client.models.file_entity import FileEntity # noqa: F401,E501 from fatcat_client.models.release_contrib import ReleaseContrib # noqa: F401,E501 from fatcat_client.models.release_entity_abstracts import ReleaseEntityAbstracts # noqa: F401,E501 from fatcat_client.models.release_ref import ReleaseRef # noqa: F401,E501 @@ -52,6 +54,8 @@ class ReleaseEntity(object): 'release_status': 'str', 'release_type': 'str', 'container_id': 'str', + 'files': 'list[FileEntity]', + 'container': 'ContainerEntity', 'work_id': 'str', 'title': 'str', 'state': 'str', @@ -80,6 +84,8 @@ class ReleaseEntity(object): 'release_status': 'release_status', 'release_type': 'release_type', 'container_id': 'container_id', + 'files': 'files', + 'container': 'container', 'work_id': 'work_id', 'title': 'title', 'state': 'state', @@ -90,7 +96,7 @@ class ReleaseEntity(object): 'extra': 'extra' } - def __init__(self, abstracts=None, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=None, wikidata_qid=None, pmcid=None, pmid=None, isbn13=None, doi=None, release_date=None, release_status=None, release_type=None, container_id=None, work_id=None, title=None, state=None, ident=None, revision=None, redirect=None, editgroup_id=None, extra=None): # noqa: E501 + def __init__(self, abstracts=None, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=None, wikidata_qid=None, pmcid=None, pmid=None, isbn13=None, doi=None, release_date=None, release_status=None, release_type=None, container_id=None, files=None, container=None, work_id=None, title=None, state=None, ident=None, revision=None, redirect=None, editgroup_id=None, extra=None): # noqa: E501 """ReleaseEntity - a model defined in Swagger""" # noqa: E501 self._abstracts = None @@ -110,6 +116,8 @@ class ReleaseEntity(object): self._release_status = None self._release_type = None self._container_id = None + self._files = None + self._container = None self._work_id = None self._title = None self._state = None @@ -154,6 +162,10 @@ class ReleaseEntity(object): self.release_type = release_type if container_id is not None: self.container_id = container_id + if files is not None: + self.files = files + if container is not None: + self.container = container if work_id is not None: self.work_id = work_id self.title = title @@ -530,6 +542,52 @@ class ReleaseEntity(object): self._container_id = container_id @property + def files(self): + """Gets the files of this ReleaseEntity. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The files of this ReleaseEntity. # noqa: E501 + :rtype: list[FileEntity] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this ReleaseEntity. + + Optional; GET-only # noqa: E501 + + :param files: The files of this ReleaseEntity. # noqa: E501 + :type: list[FileEntity] + """ + + self._files = files + + @property + def container(self): + """Gets the container of this ReleaseEntity. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The container of this ReleaseEntity. # noqa: E501 + :rtype: ContainerEntity + """ + return self._container + + @container.setter + def container(self, container): + """Sets the container of this ReleaseEntity. + + Optional; GET-only # noqa: E501 + + :param container: The container of this ReleaseEntity. # noqa: E501 + :type: ContainerEntity + """ + + self._container = container + + @property def work_id(self): """Gets the work_id of this ReleaseEntity. # noqa: E501 @@ -604,6 +662,7 @@ class ReleaseEntity(object): def ident(self): """Gets the ident of this ReleaseEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The ident of this ReleaseEntity. # noqa: E501 :rtype: str @@ -614,10 +673,17 @@ class ReleaseEntity(object): def ident(self, ident): """Sets the ident of this ReleaseEntity. + base32-encoded unique identifier # noqa: E501 :param ident: The ident of this ReleaseEntity. # 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 @@ -625,6 +691,7 @@ class ReleaseEntity(object): def revision(self): """Gets the revision of this ReleaseEntity. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The revision of this ReleaseEntity. # noqa: E501 :rtype: str @@ -635,10 +702,17 @@ class ReleaseEntity(object): def revision(self, revision): """Sets the revision of this ReleaseEntity. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :param revision: The revision of this ReleaseEntity. # 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 @@ -646,6 +720,7 @@ class ReleaseEntity(object): def redirect(self): """Gets the redirect of this ReleaseEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The redirect of this ReleaseEntity. # noqa: E501 :rtype: str @@ -656,10 +731,17 @@ class ReleaseEntity(object): def redirect(self, redirect): """Sets the redirect of this ReleaseEntity. + base32-encoded unique identifier # noqa: E501 :param redirect: The redirect of this ReleaseEntity. # 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 @@ -667,6 +749,7 @@ class ReleaseEntity(object): def editgroup_id(self): """Gets the editgroup_id of this ReleaseEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editgroup_id of this ReleaseEntity. # noqa: E501 :rtype: str @@ -677,10 +760,17 @@ class ReleaseEntity(object): def editgroup_id(self, editgroup_id): """Sets the editgroup_id of this ReleaseEntity. + base32-encoded unique identifier # noqa: E501 :param editgroup_id: The editgroup_id of this ReleaseEntity. # 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 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 |