From c06079af0949ac44472c9fdc2fc81766316cb88d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 May 2019 19:15:41 -0700 Subject: schema: allow releases expansion on file/fileset/webcapture And codegen rust and python --- python_client/fatcat_client/api/default_api.py | 12 ++++----- python_client/fatcat_client/models/file_entity.py | 31 +++++++++++++++++++++- .../fatcat_client/models/fileset_entity.py | 31 +++++++++++++++++++++- .../fatcat_client/models/webcapture_entity.py | 31 +++++++++++++++++++++- 4 files changed, 96 insertions(+), 9 deletions(-) (limited to 'python_client/fatcat_client') diff --git a/python_client/fatcat_client/api/default_api.py b/python_client/fatcat_client/api/default_api.py index 0a2329e8..8edf15ed 100644 --- a/python_client/fatcat_client/api/default_api.py +++ b/python_client/fatcat_client/api/default_api.py @@ -5463,7 +5463,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For files, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For files, `releases` is accepted. :param str hide: List of entity fields to elide in response. For files, none accepted (yet). :return: FileEntity If the method is called asynchronously, @@ -5486,7 +5486,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For files, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For files, `releases` is accepted. :param str hide: List of entity fields to elide in response. For files, none accepted (yet). :return: FileEntity If the method is called asynchronously, @@ -5984,7 +5984,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For filesets, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For filesets, `releases` is accepted. :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted. :return: FilesetEntity If the method is called asynchronously, @@ -6007,7 +6007,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For filesets, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For filesets, `releases` is accepted. :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted. :return: FilesetEntity If the method is called asynchronously, @@ -7329,7 +7329,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For webcaptures, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For webcaptures, `releases` is accepted. :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted. :return: WebcaptureEntity If the method is called asynchronously, @@ -7352,7 +7352,7 @@ class DefaultApi(object): :param async bool :param str ident: (required) - :param str expand: List of sub-entities to expand in response. For webcaptures, none accepted (yet). + :param str expand: List of sub-entities to expand in response. For webcaptures, `releases` is accepted. :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted. :return: WebcaptureEntity If the method is called asynchronously, diff --git a/python_client/fatcat_client/models/file_entity.py b/python_client/fatcat_client/models/file_entity.py index c876c345..424cd55b 100644 --- a/python_client/fatcat_client/models/file_entity.py +++ b/python_client/fatcat_client/models/file_entity.py @@ -17,6 +17,7 @@ import re # noqa: F401 import six from fatcat_client.models.file_url import FileUrl # noqa: F401,E501 +from fatcat_client.models.release_entity import ReleaseEntity # noqa: F401,E501 class FileEntity(object): @@ -33,6 +34,7 @@ class FileEntity(object): and the value is json key in definition. """ swagger_types = { + 'releases': 'list[ReleaseEntity]', 'release_ids': 'list[str]', 'mimetype': 'str', 'urls': 'list[FileUrl]', @@ -49,6 +51,7 @@ class FileEntity(object): } attribute_map = { + 'releases': 'releases', 'release_ids': 'release_ids', 'mimetype': 'mimetype', 'urls': 'urls', @@ -64,9 +67,10 @@ class FileEntity(object): 'state': 'state' } - def __init__(self, release_ids=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 + def __init__(self, releases=None, release_ids=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._release_ids = None self._mimetype = None self._urls = None @@ -82,6 +86,8 @@ class FileEntity(object): self._state = None self.discriminator = None + if releases is not None: + self.releases = releases if release_ids is not None: self.release_ids = release_ids if mimetype is not None: @@ -109,6 +115,29 @@ class FileEntity(object): if state is not None: self.state = state + @property + def releases(self): + """Gets the releases of this FileEntity. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The releases of this FileEntity. # noqa: E501 + :rtype: list[ReleaseEntity] + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this FileEntity. + + Optional; GET-only # noqa: E501 + + :param releases: The releases of this FileEntity. # noqa: E501 + :type: list[ReleaseEntity] + """ + + self._releases = releases + @property def release_ids(self): """Gets the release_ids of this FileEntity. # noqa: E501 diff --git a/python_client/fatcat_client/models/fileset_entity.py b/python_client/fatcat_client/models/fileset_entity.py index d4a46a81..5619edb4 100644 --- a/python_client/fatcat_client/models/fileset_entity.py +++ b/python_client/fatcat_client/models/fileset_entity.py @@ -18,6 +18,7 @@ import six from fatcat_client.models.fileset_file import FilesetFile # noqa: F401,E501 from fatcat_client.models.fileset_url import FilesetUrl # noqa: F401,E501 +from fatcat_client.models.release_entity import ReleaseEntity # noqa: F401,E501 class FilesetEntity(object): @@ -34,6 +35,7 @@ class FilesetEntity(object): and the value is json key in definition. """ swagger_types = { + 'releases': 'list[ReleaseEntity]', 'release_ids': 'list[str]', 'urls': 'list[FilesetUrl]', 'manifest': 'list[FilesetFile]', @@ -46,6 +48,7 @@ class FilesetEntity(object): } attribute_map = { + 'releases': 'releases', 'release_ids': 'release_ids', 'urls': 'urls', 'manifest': 'manifest', @@ -57,9 +60,10 @@ class FilesetEntity(object): 'edit_extra': 'edit_extra' } - def __init__(self, release_ids=None, urls=None, manifest=None, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 + def __init__(self, releases=None, release_ids=None, urls=None, manifest=None, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 """FilesetEntity - a model defined in Swagger""" # noqa: E501 + self._releases = None self._release_ids = None self._urls = None self._manifest = None @@ -71,6 +75,8 @@ class FilesetEntity(object): self._edit_extra = None self.discriminator = None + if releases is not None: + self.releases = releases if release_ids is not None: self.release_ids = release_ids if urls is not None: @@ -90,6 +96,29 @@ class FilesetEntity(object): if edit_extra is not None: self.edit_extra = edit_extra + @property + def releases(self): + """Gets the releases of this FilesetEntity. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The releases of this FilesetEntity. # noqa: E501 + :rtype: list[ReleaseEntity] + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this FilesetEntity. + + Optional; GET-only # noqa: E501 + + :param releases: The releases of this FilesetEntity. # noqa: E501 + :type: list[ReleaseEntity] + """ + + self._releases = releases + @property def release_ids(self): """Gets the release_ids of this FilesetEntity. # noqa: E501 diff --git a/python_client/fatcat_client/models/webcapture_entity.py b/python_client/fatcat_client/models/webcapture_entity.py index 03c0e595..9ff8fd28 100644 --- a/python_client/fatcat_client/models/webcapture_entity.py +++ b/python_client/fatcat_client/models/webcapture_entity.py @@ -16,6 +16,7 @@ import re # noqa: F401 import six +from fatcat_client.models.release_entity import ReleaseEntity # noqa: F401,E501 from fatcat_client.models.webcapture_cdx_line import WebcaptureCdxLine # noqa: F401,E501 from fatcat_client.models.webcapture_url import WebcaptureUrl # noqa: F401,E501 @@ -34,6 +35,7 @@ class WebcaptureEntity(object): and the value is json key in definition. """ swagger_types = { + 'releases': 'list[ReleaseEntity]', 'release_ids': 'list[str]', 'timestamp': 'datetime', 'original_url': 'str', @@ -48,6 +50,7 @@ class WebcaptureEntity(object): } attribute_map = { + 'releases': 'releases', 'release_ids': 'release_ids', 'timestamp': 'timestamp', 'original_url': 'original_url', @@ -61,9 +64,10 @@ class WebcaptureEntity(object): 'state': 'state' } - def __init__(self, release_ids=None, timestamp=None, original_url=None, archive_urls=None, cdx=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 + def __init__(self, releases=None, release_ids=None, timestamp=None, original_url=None, archive_urls=None, cdx=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 """WebcaptureEntity - a model defined in Swagger""" # noqa: E501 + self._releases = None self._release_ids = None self._timestamp = None self._original_url = None @@ -77,6 +81,8 @@ class WebcaptureEntity(object): self._state = None self.discriminator = None + if releases is not None: + self.releases = releases if release_ids is not None: self.release_ids = release_ids if timestamp is not None: @@ -100,6 +106,29 @@ class WebcaptureEntity(object): if state is not None: self.state = state + @property + def releases(self): + """Gets the releases of this WebcaptureEntity. # noqa: E501 + + Optional; GET-only # noqa: E501 + + :return: The releases of this WebcaptureEntity. # noqa: E501 + :rtype: list[ReleaseEntity] + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this WebcaptureEntity. + + Optional; GET-only # noqa: E501 + + :param releases: The releases of this WebcaptureEntity. # noqa: E501 + :type: list[ReleaseEntity] + """ + + self._releases = releases + @property def release_ids(self): """Gets the release_ids of this WebcaptureEntity. # noqa: E501 -- cgit v1.2.3