# coding: utf-8 """ Pulp 3 API Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501 The version of the OpenAPI document: v3 Contact: pulp-list@redhat.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from pulpcore.client.pulp_python.configuration import Configuration class PackageMetadataResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_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. """ openapi_types = { 'last_serial': 'int', 'info': 'object', 'releases': 'object', 'urls': 'object' } attribute_map = { 'last_serial': 'last_serial', 'info': 'info', 'releases': 'releases', 'urls': 'urls' } def __init__(self, last_serial=None, info=None, releases=None, urls=None, local_vars_configuration=None): # noqa: E501 """PackageMetadataResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._last_serial = None self._info = None self._releases = None self._urls = None self.discriminator = None self.last_serial = last_serial self.info = info self.releases = releases self.urls = urls @property def last_serial(self): """Gets the last_serial of this PackageMetadataResponse. # noqa: E501 Cache value from last PyPI sync # noqa: E501 :return: The last_serial of this PackageMetadataResponse. # noqa: E501 :rtype: int """ return self._last_serial @last_serial.setter def last_serial(self, last_serial): """Sets the last_serial of this PackageMetadataResponse. Cache value from last PyPI sync # noqa: E501 :param last_serial: The last_serial of this PackageMetadataResponse. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and last_serial is None: # noqa: E501 raise ValueError("Invalid value for `last_serial`, must not be `None`") # noqa: E501 self._last_serial = last_serial @property def info(self): """Gets the info of this PackageMetadataResponse. # noqa: E501 Core metadata of the package # noqa: E501 :return: The info of this PackageMetadataResponse. # noqa: E501 :rtype: object """ return self._info @info.setter def info(self, info): """Sets the info of this PackageMetadataResponse. Core metadata of the package # noqa: E501 :param info: The info of this PackageMetadataResponse. # noqa: E501 :type: object """ if self.local_vars_configuration.client_side_validation and info is None: # noqa: E501 raise ValueError("Invalid value for `info`, must not be `None`") # noqa: E501 self._info = info @property def releases(self): """Gets the releases of this PackageMetadataResponse. # noqa: E501 List of all the releases of the package # noqa: E501 :return: The releases of this PackageMetadataResponse. # noqa: E501 :rtype: object """ return self._releases @releases.setter def releases(self, releases): """Sets the releases of this PackageMetadataResponse. List of all the releases of the package # noqa: E501 :param releases: The releases of this PackageMetadataResponse. # noqa: E501 :type: object """ if self.local_vars_configuration.client_side_validation and releases is None: # noqa: E501 raise ValueError("Invalid value for `releases`, must not be `None`") # noqa: E501 self._releases = releases @property def urls(self): """Gets the urls of this PackageMetadataResponse. # noqa: E501 :return: The urls of this PackageMetadataResponse. # noqa: E501 :rtype: object """ return self._urls @urls.setter def urls(self, urls): """Sets the urls of this PackageMetadataResponse. :param urls: The urls of this PackageMetadataResponse. # noqa: E501 :type: object """ if self.local_vars_configuration.client_side_validation and urls is None: # noqa: E501 raise ValueError("Invalid value for `urls`, must not be `None`") # noqa: E501 self._urls = urls def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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, PackageMetadataResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PackageMetadataResponse): return True return self.to_dict() != other.to_dict()