summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_client/models')
-rw-r--r--python/fatcat_client/models/container_entity.py7
-rw-r--r--python/fatcat_client/models/creator_entity.py7
-rw-r--r--python/fatcat_client/models/file_entity.py48
-rw-r--r--python/fatcat_client/models/release_entity.py83
4 files changed, 74 insertions, 71 deletions
diff --git a/python/fatcat_client/models/container_entity.py b/python/fatcat_client/models/container_entity.py
index 5fc48a7e..5ed7eb0a 100644
--- a/python/fatcat_client/models/container_entity.py
+++ b/python/fatcat_client/models/container_entity.py
@@ -87,7 +87,8 @@ class ContainerEntity(object):
self.issnl = issnl
if publisher is not None:
self.publisher = publisher
- self.name = name
+ if name is not None:
+ self.name = name
if edit_extra is not None:
self.edit_extra = edit_extra
if extra is not None:
@@ -216,6 +217,7 @@ class ContainerEntity(object):
def name(self):
"""Gets the name of this ContainerEntity. # noqa: E501
+ Required for valid entities # noqa: E501
:return: The name of this ContainerEntity. # noqa: E501
:rtype: str
@@ -226,12 +228,11 @@ class ContainerEntity(object):
def name(self, name):
"""Sets the name of this ContainerEntity.
+ Required for valid entities # noqa: E501
:param name: The name of this ContainerEntity. # noqa: E501
:type: str
"""
- if name is None:
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
diff --git a/python/fatcat_client/models/creator_entity.py b/python/fatcat_client/models/creator_entity.py
index 34035f81..8f04df19 100644
--- a/python/fatcat_client/models/creator_entity.py
+++ b/python/fatcat_client/models/creator_entity.py
@@ -82,7 +82,8 @@ class CreatorEntity(object):
self.surname = surname
if given_name is not None:
self.given_name = given_name
- self.display_name = display_name
+ if display_name is not None:
+ self.display_name = display_name
if state is not None:
self.state = state
if ident is not None:
@@ -190,6 +191,7 @@ class CreatorEntity(object):
def display_name(self):
"""Gets the display_name of this CreatorEntity. # noqa: E501
+ Required for valid entities # noqa: E501
:return: The display_name of this CreatorEntity. # noqa: E501
:rtype: str
@@ -200,12 +202,11 @@ class CreatorEntity(object):
def display_name(self, display_name):
"""Sets the display_name of this CreatorEntity.
+ Required for valid entities # noqa: E501
:param display_name: The display_name of this CreatorEntity. # noqa: E501
:type: str
"""
- if display_name is None:
- raise ValueError("Invalid value for `display_name`, must not be `None`") # noqa: E501
self._display_name = display_name
diff --git a/python/fatcat_client/models/file_entity.py b/python/fatcat_client/models/file_entity.py
index 40073f62..c130c755 100644
--- a/python/fatcat_client/models/file_entity.py
+++ b/python/fatcat_client/models/file_entity.py
@@ -37,8 +37,8 @@ class FileEntity(object):
'mimetype': 'str',
'urls': 'list[FileEntityUrls]',
'sha256': 'str',
- 'md5': 'str',
'sha1': 'str',
+ 'md5': 'str',
'size': 'int',
'edit_extra': 'object',
'extra': 'object',
@@ -53,8 +53,8 @@ class FileEntity(object):
'mimetype': 'mimetype',
'urls': 'urls',
'sha256': 'sha256',
- 'md5': 'md5',
'sha1': 'sha1',
+ 'md5': 'md5',
'size': 'size',
'edit_extra': 'edit_extra',
'extra': 'extra',
@@ -64,15 +64,15 @@ class FileEntity(object):
'state': 'state'
}
- def __init__(self, releases=None, mimetype=None, urls=None, sha256=None, md5=None, sha1=None, size=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501
+ def __init__(self, releases=None, mimetype=None, urls=None, sha256=None, sha1=None, md5=None, size=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501
"""FileEntity - a model defined in Swagger""" # noqa: E501
self._releases = None
self._mimetype = None
self._urls = None
self._sha256 = None
- self._md5 = None
self._sha1 = None
+ self._md5 = None
self._size = None
self._edit_extra = None
self._extra = None
@@ -90,10 +90,10 @@ class FileEntity(object):
self.urls = urls
if sha256 is not None:
self.sha256 = sha256
- if md5 is not None:
- self.md5 = md5
if sha1 is not None:
self.sha1 = sha1
+ if md5 is not None:
+ self.md5 = md5
if size is not None:
self.size = size
if edit_extra is not None:
@@ -194,46 +194,46 @@ class FileEntity(object):
self._sha256 = sha256
@property
- def md5(self):
- """Gets the md5 of this FileEntity. # noqa: E501
+ def sha1(self):
+ """Gets the sha1 of this FileEntity. # noqa: E501
- :return: The md5 of this FileEntity. # noqa: E501
+ :return: The sha1 of this FileEntity. # noqa: E501
:rtype: str
"""
- return self._md5
+ return self._sha1
- @md5.setter
- def md5(self, md5):
- """Sets the md5 of this FileEntity.
+ @sha1.setter
+ def sha1(self, sha1):
+ """Sets the sha1 of this FileEntity.
- :param md5: The md5 of this FileEntity. # noqa: E501
+ :param sha1: The sha1 of this FileEntity. # noqa: E501
:type: str
"""
- self._md5 = md5
+ self._sha1 = sha1
@property
- def sha1(self):
- """Gets the sha1 of this FileEntity. # noqa: E501
+ def md5(self):
+ """Gets the md5 of this FileEntity. # noqa: E501
- :return: The sha1 of this FileEntity. # noqa: E501
+ :return: The md5 of this FileEntity. # noqa: E501
:rtype: str
"""
- return self._sha1
+ return self._md5
- @sha1.setter
- def sha1(self, sha1):
- """Sets the sha1 of this FileEntity.
+ @md5.setter
+ def md5(self, md5):
+ """Sets the md5 of this FileEntity.
- :param sha1: The sha1 of this FileEntity. # noqa: E501
+ :param md5: The md5 of this FileEntity. # noqa: E501
:type: str
"""
- self._sha1 = sha1
+ self._md5 = md5
@property
def size(self):
diff --git a/python/fatcat_client/models/release_entity.py b/python/fatcat_client/models/release_entity.py
index a35ced5e..a63d74a5 100644
--- a/python/fatcat_client/models/release_entity.py
+++ b/python/fatcat_client/models/release_entity.py
@@ -45,11 +45,11 @@ class ReleaseEntity(object):
'pages': 'str',
'issue': 'str',
'volume': 'str',
- 'wikidata_qid': 'str',
+ 'core_id': 'str',
'pmcid': 'str',
'pmid': 'str',
- 'core_id': 'str',
'isbn13': 'str',
+ 'wikidata_qid': 'str',
'doi': 'str',
'release_date': 'date',
'release_status': 'str',
@@ -76,11 +76,11 @@ class ReleaseEntity(object):
'pages': 'pages',
'issue': 'issue',
'volume': 'volume',
- 'wikidata_qid': 'wikidata_qid',
+ 'core_id': 'core_id',
'pmcid': 'pmcid',
'pmid': 'pmid',
- 'core_id': 'core_id',
'isbn13': 'isbn13',
+ 'wikidata_qid': 'wikidata_qid',
'doi': 'doi',
'release_date': 'release_date',
'release_status': 'release_status',
@@ -98,7 +98,7 @@ class ReleaseEntity(object):
'edit_extra': 'edit_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, core_id=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, extra=None, edit_extra=None): # noqa: E501
+ def __init__(self, abstracts=None, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=None, core_id=None, pmcid=None, pmid=None, isbn13=None, wikidata_qid=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, extra=None, edit_extra=None): # noqa: E501
"""ReleaseEntity - a model defined in Swagger""" # noqa: E501
self._abstracts = None
@@ -109,11 +109,11 @@ class ReleaseEntity(object):
self._pages = None
self._issue = None
self._volume = None
- self._wikidata_qid = None
+ self._core_id = None
self._pmcid = None
self._pmid = None
- self._core_id = None
self._isbn13 = None
+ self._wikidata_qid = None
self._doi = None
self._release_date = None
self._release_status = None
@@ -147,16 +147,16 @@ class ReleaseEntity(object):
self.issue = issue
if volume is not None:
self.volume = volume
- if wikidata_qid is not None:
- self.wikidata_qid = wikidata_qid
+ if core_id is not None:
+ self.core_id = core_id
if pmcid is not None:
self.pmcid = pmcid
if pmid is not None:
self.pmid = pmid
- if core_id is not None:
- self.core_id = core_id
if isbn13 is not None:
self.isbn13 = isbn13
+ if wikidata_qid is not None:
+ self.wikidata_qid = wikidata_qid
if doi is not None:
self.doi = doi
if release_date is not None:
@@ -173,7 +173,8 @@ class ReleaseEntity(object):
self.container = container
if work_id is not None:
self.work_id = work_id
- self.title = title
+ if title is not None:
+ self.title = title
if state is not None:
self.state = state
if ident is not None:
@@ -358,25 +359,25 @@ class ReleaseEntity(object):
self._volume = volume
@property
- def wikidata_qid(self):
- """Gets the wikidata_qid of this ReleaseEntity. # noqa: E501
+ def core_id(self):
+ """Gets the core_id of this ReleaseEntity. # noqa: E501
- :return: The wikidata_qid of this ReleaseEntity. # noqa: E501
+ :return: The core_id of this ReleaseEntity. # noqa: E501
:rtype: str
"""
- return self._wikidata_qid
+ return self._core_id
- @wikidata_qid.setter
- def wikidata_qid(self, wikidata_qid):
- """Sets the wikidata_qid of this ReleaseEntity.
+ @core_id.setter
+ def core_id(self, core_id):
+ """Sets the core_id of this ReleaseEntity.
- :param wikidata_qid: The wikidata_qid of this ReleaseEntity. # noqa: E501
+ :param core_id: The core_id of this ReleaseEntity. # noqa: E501
:type: str
"""
- self._wikidata_qid = wikidata_qid
+ self._core_id = core_id
@property
def pmcid(self):
@@ -421,46 +422,46 @@ class ReleaseEntity(object):
self._pmid = pmid
@property
- def core_id(self):
- """Gets the core_id of this ReleaseEntity. # noqa: E501
+ def isbn13(self):
+ """Gets the isbn13 of this ReleaseEntity. # noqa: E501
- :return: The core_id of this ReleaseEntity. # noqa: E501
+ :return: The isbn13 of this ReleaseEntity. # noqa: E501
:rtype: str
"""
- return self._core_id
+ return self._isbn13
- @core_id.setter
- def core_id(self, core_id):
- """Sets the core_id of this ReleaseEntity.
+ @isbn13.setter
+ def isbn13(self, isbn13):
+ """Sets the isbn13 of this ReleaseEntity.
- :param core_id: The core_id of this ReleaseEntity. # noqa: E501
+ :param isbn13: The isbn13 of this ReleaseEntity. # noqa: E501
:type: str
"""
- self._core_id = core_id
+ self._isbn13 = isbn13
@property
- def isbn13(self):
- """Gets the isbn13 of this ReleaseEntity. # noqa: E501
+ def wikidata_qid(self):
+ """Gets the wikidata_qid of this ReleaseEntity. # noqa: E501
- :return: The isbn13 of this ReleaseEntity. # noqa: E501
+ :return: The wikidata_qid of this ReleaseEntity. # noqa: E501
:rtype: str
"""
- return self._isbn13
+ return self._wikidata_qid
- @isbn13.setter
- def isbn13(self, isbn13):
- """Sets the isbn13 of this ReleaseEntity.
+ @wikidata_qid.setter
+ def wikidata_qid(self, wikidata_qid):
+ """Sets the wikidata_qid of this ReleaseEntity.
- :param isbn13: The isbn13 of this ReleaseEntity. # noqa: E501
+ :param wikidata_qid: The wikidata_qid of this ReleaseEntity. # noqa: E501
:type: str
"""
- self._isbn13 = isbn13
+ self._wikidata_qid = wikidata_qid
@property
def doi(self):
@@ -638,6 +639,7 @@ class ReleaseEntity(object):
def title(self):
"""Gets the title of this ReleaseEntity. # noqa: E501
+ Required for valid entities # noqa: E501
:return: The title of this ReleaseEntity. # noqa: E501
:rtype: str
@@ -648,12 +650,11 @@ class ReleaseEntity(object):
def title(self, title):
"""Sets the title of this ReleaseEntity.
+ Required for valid entities # noqa: E501
:param title: The title of this ReleaseEntity. # noqa: E501
:type: str
"""
- if title is None:
- raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501
self._title = title