From 6214e9f251cfa945641d9fbd2149746e83ec8331 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 Oct 2021 17:35:20 -0700 Subject: python client: codegen for v0.4 --- .../models/container_entity.py | 100 ++++++++++++++++++++- .../fatcat_openapi_client/models/fileset_file.py | 34 ++++++- .../models/release_ext_ids.py | 36 +++++++- 3 files changed, 160 insertions(+), 10 deletions(-) (limited to 'python_openapi_client/fatcat_openapi_client/models') diff --git a/python_openapi_client/fatcat_openapi_client/models/container_entity.py b/python_openapi_client/fatcat_openapi_client/models/container_entity.py index 470f2ee0..d6b23469 100644 --- a/python_openapi_client/fatcat_openapi_client/models/container_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/container_entity.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.3.1 + The version of the OpenAPI document: 0.4.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -40,8 +40,11 @@ class ContainerEntity(object): 'edit_extra': 'dict(str, object)', 'name': 'str', 'container_type': 'str', + 'publication_status': 'str', 'publisher': 'str', 'issnl': 'str', + 'issne': 'str', + 'issnp': 'str', 'wikidata_qid': 'str' } @@ -54,12 +57,15 @@ class ContainerEntity(object): 'edit_extra': 'edit_extra', 'name': 'name', 'container_type': 'container_type', + 'publication_status': 'publication_status', 'publisher': 'publisher', 'issnl': 'issnl', + 'issne': 'issne', + 'issnp': 'issnp', 'wikidata_qid': 'wikidata_qid' } - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, name=None, container_type=None, publisher=None, issnl=None, wikidata_qid=None): # noqa: E501 + def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, name=None, container_type=None, publication_status=None, publisher=None, issnl=None, issne=None, issnp=None, wikidata_qid=None): # noqa: E501 """ContainerEntity - a model defined in OpenAPI""" # noqa: E501 self._state = None @@ -70,8 +76,11 @@ class ContainerEntity(object): self._edit_extra = None self._name = None self._container_type = None + self._publication_status = None self._publisher = None self._issnl = None + self._issne = None + self._issnp = None self._wikidata_qid = None self.discriminator = None @@ -91,10 +100,16 @@ class ContainerEntity(object): self.name = name if container_type is not None: self.container_type = container_type + if publication_status is not None: + self.publication_status = publication_status if publisher is not None: self.publisher = publisher if issnl is not None: self.issnl = issnl + if issne is not None: + self.issne = issne + if issnp is not None: + self.issnp = issnp if wikidata_qid is not None: self.wikidata_qid = wikidata_qid @@ -304,6 +319,29 @@ class ContainerEntity(object): self._container_type = container_type + @property + def publication_status(self): + """Gets the publication_status of this ContainerEntity. # noqa: E501 + + Whether the container is active, discontinued, etc # noqa: E501 + + :return: The publication_status of this ContainerEntity. # noqa: E501 + :rtype: str + """ + return self._publication_status + + @publication_status.setter + def publication_status(self, publication_status): + """Sets the publication_status of this ContainerEntity. + + Whether the container is active, discontinued, etc # noqa: E501 + + :param publication_status: The publication_status of this ContainerEntity. # noqa: E501 + :type: str + """ + + self._publication_status = publication_status + @property def publisher(self): """Gets the publisher of this ContainerEntity. # noqa: E501 @@ -356,6 +394,64 @@ class ContainerEntity(object): self._issnl = issnl + @property + def issne(self): + """Gets the issne of this ContainerEntity. # noqa: E501 + + Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501 + + :return: The issne of this ContainerEntity. # noqa: E501 + :rtype: str + """ + return self._issne + + @issne.setter + def issne(self, issne): + """Sets the issne of this ContainerEntity. + + Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501 + + :param issne: The issne of this ContainerEntity. # noqa: E501 + :type: str + """ + if issne is not None and len(issne) > 9: + raise ValueError("Invalid value for `issne`, length must be less than or equal to `9`") # noqa: E501 + if issne is not None and len(issne) < 9: + raise ValueError("Invalid value for `issne`, length must be greater than or equal to `9`") # noqa: E501 + if issne is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issne): # noqa: E501 + raise ValueError(r"Invalid value for `issne`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501 + + self._issne = issne + + @property + def issnp(self): + """Gets the issnp of this ContainerEntity. # noqa: E501 + + Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501 + + :return: The issnp of this ContainerEntity. # noqa: E501 + :rtype: str + """ + return self._issnp + + @issnp.setter + def issnp(self, issnp): + """Sets the issnp of this ContainerEntity. + + Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501 + + :param issnp: The issnp of this ContainerEntity. # noqa: E501 + :type: str + """ + if issnp is not None and len(issnp) > 9: + raise ValueError("Invalid value for `issnp`, length must be less than or equal to `9`") # noqa: E501 + if issnp is not None and len(issnp) < 9: + raise ValueError("Invalid value for `issnp`, length must be greater than or equal to `9`") # noqa: E501 + if issnp is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issnp): # noqa: E501 + raise ValueError(r"Invalid value for `issnp`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501 + + self._issnp = issnp + @property def wikidata_qid(self): """Gets the wikidata_qid of this ContainerEntity. # noqa: E501 diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py index 15afd2f1..0741f9a5 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.3.1 + The version of the OpenAPI document: 0.4.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -37,6 +37,7 @@ class FilesetFile(object): 'md5': 'str', 'sha1': 'str', 'sha256': 'str', + 'mimetype': 'str', 'extra': 'dict(str, object)' } @@ -46,10 +47,11 @@ class FilesetFile(object): 'md5': 'md5', 'sha1': 'sha1', 'sha256': 'sha256', + 'mimetype': 'mimetype', 'extra': 'extra' } - def __init__(self, path=None, size=None, md5=None, sha1=None, sha256=None, extra=None): # noqa: E501 + def __init__(self, path=None, size=None, md5=None, sha1=None, sha256=None, mimetype=None, extra=None): # noqa: E501 """FilesetFile - a model defined in OpenAPI""" # noqa: E501 self._path = None @@ -57,6 +59,7 @@ class FilesetFile(object): self._md5 = None self._sha1 = None self._sha256 = None + self._mimetype = None self._extra = None self.discriminator = None @@ -68,6 +71,8 @@ class FilesetFile(object): self.sha1 = sha1 if sha256 is not None: self.sha256 = sha256 + if mimetype is not None: + self.mimetype = mimetype if extra is not None: self.extra = extra @@ -208,11 +213,32 @@ class FilesetFile(object): self._sha256 = sha256 + @property + def mimetype(self): + """Gets the mimetype of this FilesetFile. # noqa: E501 + + + :return: The mimetype of this FilesetFile. # noqa: E501 + :rtype: str + """ + return self._mimetype + + @mimetype.setter + def mimetype(self, mimetype): + """Sets the mimetype of this FilesetFile. + + + :param mimetype: The mimetype of this FilesetFile. # noqa: E501 + :type: str + """ + + self._mimetype = mimetype + @property def extra(self): """Gets the extra of this FilesetFile. # noqa: E501 - Free-form additional metadata about this specific file in the set. Eg, `mimetype`. See guide for nomative (but unenforced) schema fields. # noqa: E501 + Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501 :return: The extra of this FilesetFile. # noqa: E501 :rtype: dict(str, object) @@ -223,7 +249,7 @@ class FilesetFile(object): def extra(self, extra): """Sets the extra of this FilesetFile. - Free-form additional metadata about this specific file in the set. Eg, `mimetype`. See guide for nomative (but unenforced) schema fields. # noqa: E501 + Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501 :param extra: The extra of this FilesetFile. # noqa: E501 :type: dict(str, object) diff --git a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py b/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py index c8ca4b06..2f46a3b8 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.3.3 + The version of the OpenAPI document: 0.4.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -44,7 +44,8 @@ class ReleaseExtIds(object): 'mag': 'str', 'doaj': 'str', 'dblp': 'str', - 'oai': 'str' + 'oai': 'str', + 'hdl': 'str' } attribute_map = { @@ -60,10 +61,11 @@ class ReleaseExtIds(object): 'mag': 'mag', 'doaj': 'doaj', 'dblp': 'dblp', - 'oai': 'oai' + 'oai': 'oai', + 'hdl': 'hdl' } - def __init__(self, doi=None, wikidata_qid=None, isbn13=None, pmid=None, pmcid=None, core=None, arxiv=None, jstor=None, ark=None, mag=None, doaj=None, dblp=None, oai=None): # noqa: E501 + def __init__(self, doi=None, wikidata_qid=None, isbn13=None, pmid=None, pmcid=None, core=None, arxiv=None, jstor=None, ark=None, mag=None, doaj=None, dblp=None, oai=None, hdl=None): # noqa: E501 """ReleaseExtIds - a model defined in OpenAPI""" # noqa: E501 self._doi = None @@ -79,6 +81,7 @@ class ReleaseExtIds(object): self._doaj = None self._dblp = None self._oai = None + self._hdl = None self.discriminator = None if doi is not None: @@ -107,6 +110,8 @@ class ReleaseExtIds(object): self.dblp = dblp if oai is not None: self.oai = oai + if hdl is not None: + self.hdl = hdl @property def doi(self): @@ -407,6 +412,29 @@ class ReleaseExtIds(object): self._oai = oai + @property + def hdl(self): + """Gets the hdl of this ReleaseExtIds. # noqa: E501 + + Handle identifier. Do not put DOIs in this field # noqa: E501 + + :return: The hdl of this ReleaseExtIds. # noqa: E501 + :rtype: str + """ + return self._hdl + + @hdl.setter + def hdl(self, hdl): + """Sets the hdl of this ReleaseExtIds. + + Handle identifier. Do not put DOIs in this field # noqa: E501 + + :param hdl: The hdl of this ReleaseExtIds. # noqa: E501 + :type: str + """ + + self._hdl = hdl + def to_dict(self): """Returns the model properties as a dict""" result = {} -- cgit v1.2.3