summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/README_codegen.md2
-rw-r--r--python/fatcat_client/api/default_api.py70
-rw-r--r--python/fatcat_client/models/container_entity.py38
-rw-r--r--python/fatcat_client/models/creator_entity.py38
-rw-r--r--python/fatcat_client/models/editgroup.py16
-rw-r--r--python/fatcat_client/models/file_entity.py32
-rw-r--r--python/fatcat_client/models/release_contrib.py32
-rw-r--r--python/fatcat_client/models/release_entity.py92
-rw-r--r--python/fatcat_client/models/work_entity.py32
9 files changed, 340 insertions, 12 deletions
diff --git a/python/README_codegen.md b/python/README_codegen.md
index 6751c3fe..393fae32 100644
--- a/python/README_codegen.md
+++ b/python/README_codegen.md
@@ -52,7 +52,7 @@ from fatcat_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = fatcat_client.DefaultApi()
-id = 'id_example' # str |
+id = 'id_example' # str | base32-encoded unique identifier
try:
api_response = api_instance.accept_editgroup(id)
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py
index 11e76aa4..b7f23e25 100644
--- a/python/fatcat_client/api/default_api.py
+++ b/python/fatcat_client/api/default_api.py
@@ -42,7 +42,7 @@ class DefaultApi(object):
>>> result = thread.get()
:param async bool
- :param str id: (required)
+ :param str id: base32-encoded unique identifier (required)
:return: Success
If the method is called asynchronously,
returns the request thread.
@@ -63,7 +63,7 @@ class DefaultApi(object):
>>> result = thread.get()
:param async bool
- :param str id: (required)
+ :param str id: base32-encoded unique identifier (required)
:return: Success
If the method is called asynchronously,
returns the request thread.
@@ -89,6 +89,14 @@ class DefaultApi(object):
params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `accept_editgroup`") # noqa: E501
+ if ('id' in params and
+ len(params['id']) > 26):
+ raise ValueError("Invalid value for parameter `id` when calling `accept_editgroup`, length must be less than or equal to `26`") # noqa: E501
+ if ('id' in params and
+ len(params['id']) < 26):
+ raise ValueError("Invalid value for parameter `id` when calling `accept_editgroup`, length must be greater than or equal to `26`") # noqa: E501
+ if 'id' in params and not re.search('[a-zA-Z2-7]{26}', params['id']): # noqa: E501
+ raise ValueError("Invalid value for parameter `id` when calling `accept_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -1397,6 +1405,7 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: ContainerEntity
If the method is called asynchronously,
returns the request thread.
@@ -1418,12 +1427,13 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: ContainerEntity
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['id'] # noqa: E501
+ all_params = ['id', 'expand'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -1450,6 +1460,8 @@ class DefaultApi(object):
path_params['id'] = params['id'] # noqa: E501
query_params = []
+ if 'expand' in params:
+ query_params.append(('expand', params['expand'])) # noqa: E501
header_params = {}
@@ -1595,6 +1607,7 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: CreatorEntity
If the method is called asynchronously,
returns the request thread.
@@ -1616,12 +1629,13 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: CreatorEntity
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['id'] # noqa: E501
+ all_params = ['id', 'expand'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -1648,6 +1662,8 @@ class DefaultApi(object):
path_params['id'] = params['id'] # noqa: E501
query_params = []
+ if 'expand' in params:
+ query_params.append(('expand', params['expand'])) # noqa: E501
header_params = {}
@@ -1889,7 +1905,7 @@ class DefaultApi(object):
>>> result = thread.get()
:param async bool
- :param str id: (required)
+ :param str id: base32-encoded unique identifier (required)
:return: Editgroup
If the method is called asynchronously,
returns the request thread.
@@ -1910,7 +1926,7 @@ class DefaultApi(object):
>>> result = thread.get()
:param async bool
- :param str id: (required)
+ :param str id: base32-encoded unique identifier (required)
:return: Editgroup
If the method is called asynchronously,
returns the request thread.
@@ -1936,6 +1952,14 @@ class DefaultApi(object):
params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `get_editgroup`") # noqa: E501
+ if ('id' in params and
+ len(params['id']) > 26):
+ raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be less than or equal to `26`") # noqa: E501
+ if ('id' in params and
+ len(params['id']) < 26):
+ raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, length must be greater than or equal to `26`") # noqa: E501
+ if 'id' in params and not re.search('[a-zA-Z2-7]{26}', params['id']): # noqa: E501
+ raise ValueError("Invalid value for parameter `id` when calling `get_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -2181,6 +2205,7 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: FileEntity
If the method is called asynchronously,
returns the request thread.
@@ -2202,12 +2227,13 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: FileEntity
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['id'] # noqa: E501
+ all_params = ['id', 'expand'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -2234,6 +2260,8 @@ class DefaultApi(object):
path_params['id'] = params['id'] # noqa: E501
query_params = []
+ if 'expand' in params:
+ query_params.append(('expand', params['expand'])) # noqa: E501
header_params = {}
@@ -2379,6 +2407,7 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: ReleaseEntity
If the method is called asynchronously,
returns the request thread.
@@ -2400,12 +2429,13 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: ReleaseEntity
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['id'] # noqa: E501
+ all_params = ['id', 'expand'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -2432,6 +2462,8 @@ class DefaultApi(object):
path_params['id'] = params['id'] # noqa: E501
query_params = []
+ if 'expand' in params:
+ query_params.append(('expand', params['expand'])) # noqa: E501
header_params = {}
@@ -2767,6 +2799,7 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: WorkEntity
If the method is called asynchronously,
returns the request thread.
@@ -2788,12 +2821,13 @@ class DefaultApi(object):
:param async bool
:param str id: (required)
+ :param str expand: List of sub-entities to expand in response. For now, only 'all' accepted.
:return: WorkEntity
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['id'] # noqa: E501
+ all_params = ['id', 'expand'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -2820,6 +2854,8 @@ class DefaultApi(object):
path_params['id'] = params['id'] # noqa: E501
query_params = []
+ if 'expand' in params:
+ query_params.append(('expand', params['expand'])) # noqa: E501
header_params = {}
@@ -3108,6 +3144,14 @@ class DefaultApi(object):
params['issnl'] is None):
raise ValueError("Missing the required parameter `issnl` when calling `lookup_container`") # noqa: E501
+ if ('issnl' in params and
+ len(params['issnl']) > 9):
+ raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
+ if ('issnl' in params and
+ len(params['issnl']) < 9):
+ raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
+ if 'issnl' in params and not re.search('\\d{4}-\\d{3}[0-9X]', params['issnl']): # noqa: E501
+ raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\\d{4}-\\d{3}[0-9X]/`") # noqa: E501
collection_formats = {}
path_params = {}
@@ -3205,6 +3249,14 @@ class DefaultApi(object):
params['orcid'] is None):
raise ValueError("Missing the required parameter `orcid` when calling `lookup_creator`") # noqa: E501
+ if ('orcid' in params and
+ len(params['orcid']) > 19):
+ raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be less than or equal to `19`") # noqa: E501
+ if ('orcid' in params and
+ len(params['orcid']) < 19):
+ raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501
+ if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{4}', params['orcid']): # noqa: E501
+ raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\\d{4}-\\d{4}-\\d{4}-\\d{4}/`") # noqa: E501
collection_formats = {}
path_params = {}
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