# 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_ansible.configuration import Configuration


class CollectionVersionSearchList(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 = {
        'repository': 'Repository',
        'collection_version': 'object',
        'namespace_metadata': 'AnsibleAnsibleNamespaceMetadata',
        'is_highest': 'bool',
        'is_deprecated': 'bool',
        'is_signed': 'bool'
    }

    attribute_map = {
        'repository': 'repository',
        'collection_version': 'collection_version',
        'namespace_metadata': 'namespace_metadata',
        'is_highest': 'is_highest',
        'is_deprecated': 'is_deprecated',
        'is_signed': 'is_signed'
    }

    def __init__(self, repository=None, collection_version=None, namespace_metadata=None, is_highest=None, is_deprecated=None, is_signed=None, local_vars_configuration=None):  # noqa: E501
        """CollectionVersionSearchList - 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._repository = None
        self._collection_version = None
        self._namespace_metadata = None
        self._is_highest = None
        self._is_deprecated = None
        self._is_signed = None
        self.discriminator = None

        self.repository = repository
        self.collection_version = collection_version
        self.namespace_metadata = namespace_metadata
        self.is_highest = is_highest
        self.is_deprecated = is_deprecated
        self.is_signed = is_signed

    @property
    def repository(self):
        """Gets the repository of this CollectionVersionSearchList.  # noqa: E501


        :return: The repository of this CollectionVersionSearchList.  # noqa: E501
        :rtype: Repository
        """
        return self._repository

    @repository.setter
    def repository(self, repository):
        """Sets the repository of this CollectionVersionSearchList.


        :param repository: The repository of this CollectionVersionSearchList.  # noqa: E501
        :type: Repository
        """
        if self.local_vars_configuration.client_side_validation and repository is None:  # noqa: E501
            raise ValueError("Invalid value for `repository`, must not be `None`")  # noqa: E501

        self._repository = repository

    @property
    def collection_version(self):
        """Gets the collection_version of this CollectionVersionSearchList.  # noqa: E501

        Collection Version serializer without docs blob.  # noqa: E501

        :return: The collection_version of this CollectionVersionSearchList.  # noqa: E501
        :rtype: object
        """
        return self._collection_version

    @collection_version.setter
    def collection_version(self, collection_version):
        """Sets the collection_version of this CollectionVersionSearchList.

        Collection Version serializer without docs blob.  # noqa: E501

        :param collection_version: The collection_version of this CollectionVersionSearchList.  # noqa: E501
        :type: object
        """
        if self.local_vars_configuration.client_side_validation and collection_version is None:  # noqa: E501
            raise ValueError("Invalid value for `collection_version`, must not be `None`")  # noqa: E501

        self._collection_version = collection_version

    @property
    def namespace_metadata(self):
        """Gets the namespace_metadata of this CollectionVersionSearchList.  # noqa: E501


        :return: The namespace_metadata of this CollectionVersionSearchList.  # noqa: E501
        :rtype: AnsibleAnsibleNamespaceMetadata
        """
        return self._namespace_metadata

    @namespace_metadata.setter
    def namespace_metadata(self, namespace_metadata):
        """Sets the namespace_metadata of this CollectionVersionSearchList.


        :param namespace_metadata: The namespace_metadata of this CollectionVersionSearchList.  # noqa: E501
        :type: AnsibleAnsibleNamespaceMetadata
        """

        self._namespace_metadata = namespace_metadata

    @property
    def is_highest(self):
        """Gets the is_highest of this CollectionVersionSearchList.  # noqa: E501


        :return: The is_highest of this CollectionVersionSearchList.  # noqa: E501
        :rtype: bool
        """
        return self._is_highest

    @is_highest.setter
    def is_highest(self, is_highest):
        """Sets the is_highest of this CollectionVersionSearchList.


        :param is_highest: The is_highest of this CollectionVersionSearchList.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_highest is None:  # noqa: E501
            raise ValueError("Invalid value for `is_highest`, must not be `None`")  # noqa: E501

        self._is_highest = is_highest

    @property
    def is_deprecated(self):
        """Gets the is_deprecated of this CollectionVersionSearchList.  # noqa: E501


        :return: The is_deprecated of this CollectionVersionSearchList.  # noqa: E501
        :rtype: bool
        """
        return self._is_deprecated

    @is_deprecated.setter
    def is_deprecated(self, is_deprecated):
        """Sets the is_deprecated of this CollectionVersionSearchList.


        :param is_deprecated: The is_deprecated of this CollectionVersionSearchList.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_deprecated is None:  # noqa: E501
            raise ValueError("Invalid value for `is_deprecated`, must not be `None`")  # noqa: E501

        self._is_deprecated = is_deprecated

    @property
    def is_signed(self):
        """Gets the is_signed of this CollectionVersionSearchList.  # noqa: E501


        :return: The is_signed of this CollectionVersionSearchList.  # noqa: E501
        :rtype: bool
        """
        return self._is_signed

    @is_signed.setter
    def is_signed(self, is_signed):
        """Sets the is_signed of this CollectionVersionSearchList.


        :param is_signed: The is_signed of this CollectionVersionSearchList.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_signed is None:  # noqa: E501
            raise ValueError("Invalid value for `is_signed`, must not be `None`")  # noqa: E501

        self._is_signed = is_signed

    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, CollectionVersionSearchList):
            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, CollectionVersionSearchList):
            return True

        return self.to_dict() != other.to_dict()
