diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-25 10:45:44 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-25 10:45:44 -0700 |
commit | 3d53a6f8d3e42de68f0c142b2d1329a66a0b7924 (patch) | |
tree | 9896e61fa81d1d3d909efe1649f6095934137458 /python/fatcat_client/models | |
parent | c2146fe7b5d299dab2692d2346d0037a944ac799 (diff) | |
download | fatcat-3d53a6f8d3e42de68f0c142b2d1329a66a0b7924.tar.gz fatcat-3d53a6f8d3e42de68f0c142b2d1329a66a0b7924.zip |
update fatcat codegen
Diffstat (limited to 'python/fatcat_client/models')
-rw-r--r-- | python/fatcat_client/models/__init__.py | 1 | ||||
-rw-r--r-- | python/fatcat_client/models/release_entity.py | 50 | ||||
-rw-r--r-- | python/fatcat_client/models/stats_response.py | 112 |
3 files changed, 139 insertions, 24 deletions
diff --git a/python/fatcat_client/models/__init__.py b/python/fatcat_client/models/__init__.py index ba62661b..f003f51c 100644 --- a/python/fatcat_client/models/__init__.py +++ b/python/fatcat_client/models/__init__.py @@ -28,5 +28,6 @@ from fatcat_client.models.file_entity import FileEntity from fatcat_client.models.release_contrib import ReleaseContrib from fatcat_client.models.release_entity import ReleaseEntity from fatcat_client.models.release_ref import ReleaseRef +from fatcat_client.models.stats_response import StatsResponse from fatcat_client.models.success import Success from fatcat_client.models.work_entity import WorkEntity diff --git a/python/fatcat_client/models/release_entity.py b/python/fatcat_client/models/release_entity.py index 3c6f1acb..d74b9823 100644 --- a/python/fatcat_client/models/release_entity.py +++ b/python/fatcat_client/models/release_entity.py @@ -38,8 +38,8 @@ class ReleaseEntity(object): 'contribs': 'list[ReleaseContrib]', 'language': 'str', 'publisher': 'str', - 'issue': 'str', 'pages': 'str', + 'issue': 'str', 'volume': 'str', 'isbn13': 'str', 'doi': 'str', @@ -62,8 +62,8 @@ class ReleaseEntity(object): 'contribs': 'contribs', 'language': 'language', 'publisher': 'publisher', - 'issue': 'issue', 'pages': 'pages', + 'issue': 'issue', 'volume': 'volume', 'isbn13': 'isbn13', 'doi': 'doi', @@ -81,15 +81,15 @@ class ReleaseEntity(object): 'extra': 'extra' } - def __init__(self, refs=None, contribs=None, language=None, publisher=None, issue=None, pages=None, volume=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, refs=None, contribs=None, language=None, publisher=None, pages=None, issue=None, volume=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 """ReleaseEntity - a model defined in Swagger""" # noqa: E501 self._refs = None self._contribs = None self._language = None self._publisher = None - self._issue = None self._pages = None + self._issue = None self._volume = None self._isbn13 = None self._doi = None @@ -115,10 +115,10 @@ class ReleaseEntity(object): self.language = language if publisher is not None: self.publisher = publisher - if issue is not None: - self.issue = issue if pages is not None: self.pages = pages + if issue is not None: + self.issue = issue if volume is not None: self.volume = volume if isbn13 is not None: @@ -194,6 +194,7 @@ class ReleaseEntity(object): def language(self): """Gets the language of this ReleaseEntity. # noqa: E501 + Two-letter RFC1766/ISO639-1 language code, with extensions # noqa: E501 :return: The language of this ReleaseEntity. # noqa: E501 :rtype: str @@ -204,6 +205,7 @@ class ReleaseEntity(object): def language(self, language): """Sets the language of this ReleaseEntity. + Two-letter RFC1766/ISO639-1 language code, with extensions # noqa: E501 :param language: The language of this ReleaseEntity. # noqa: E501 :type: str @@ -233,46 +235,46 @@ class ReleaseEntity(object): self._publisher = publisher @property - def issue(self): - """Gets the issue of this ReleaseEntity. # noqa: E501 + def pages(self): + """Gets the pages of this ReleaseEntity. # noqa: E501 - :return: The issue of this ReleaseEntity. # noqa: E501 + :return: The pages of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._issue + return self._pages - @issue.setter - def issue(self, issue): - """Sets the issue of this ReleaseEntity. + @pages.setter + def pages(self, pages): + """Sets the pages of this ReleaseEntity. - :param issue: The issue of this ReleaseEntity. # noqa: E501 + :param pages: The pages of this ReleaseEntity. # noqa: E501 :type: str """ - self._issue = issue + self._pages = pages @property - def pages(self): - """Gets the pages of this ReleaseEntity. # noqa: E501 + def issue(self): + """Gets the issue of this ReleaseEntity. # noqa: E501 - :return: The pages of this ReleaseEntity. # noqa: E501 + :return: The issue of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._pages + return self._issue - @pages.setter - def pages(self, pages): - """Sets the pages of this ReleaseEntity. + @issue.setter + def issue(self, issue): + """Sets the issue of this ReleaseEntity. - :param pages: The pages of this ReleaseEntity. # noqa: E501 + :param issue: The issue of this ReleaseEntity. # noqa: E501 :type: str """ - self._pages = pages + self._issue = issue @property def volume(self): diff --git a/python/fatcat_client/models/stats_response.py b/python/fatcat_client/models/stats_response.py new file mode 100644 index 00000000..0a1a6513 --- /dev/null +++ b/python/fatcat_client/models/stats_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + fatcat + + A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata # noqa: E501 + + OpenAPI spec version: 0.1.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class StatsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'extra': 'object' + } + + attribute_map = { + 'extra': 'extra' + } + + def __init__(self, extra=None): # noqa: E501 + """StatsResponse - a model defined in Swagger""" # noqa: E501 + + self._extra = None + self.discriminator = None + + if extra is not None: + self.extra = extra + + @property + def extra(self): + """Gets the extra of this StatsResponse. # noqa: E501 + + + :return: The extra of this StatsResponse. # noqa: E501 + :rtype: object + """ + return self._extra + + @extra.setter + def extra(self, extra): + """Sets the extra of this StatsResponse. + + + :param extra: The extra of this StatsResponse. # noqa: E501 + :type: object + """ + + self._extra = extra + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StatsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other |