# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    The version of the OpenAPI document: 2020.01.25
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from allegro_api.configuration import Configuration


class ListingResponseFiltersValues(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 = {
        'name': 'str',
        'value': 'str',
        'id_suffix': 'str',
        'count': 'int',
        'selected': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'value': 'value',
        'id_suffix': 'idSuffix',
        'count': 'count',
        'selected': 'selected'
    }

    def __init__(self, name=None, value=None, id_suffix=None, count=None, selected=None, local_vars_configuration=None):  # noqa: E501
        """ListingResponseFiltersValues - 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._name = None
        self._value = None
        self._id_suffix = None
        self._count = None
        self._selected = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if value is not None:
            self.value = value
        if id_suffix is not None:
            self.id_suffix = id_suffix
        if count is not None:
            self.count = count
        if selected is not None:
            self.selected = selected

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

        Name of the option; for NUMERIC parameters - word indicating start or end of range (i.e. *from*, *to*).  # noqa: E501

        :return: The name of this ListingResponseFiltersValues.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ListingResponseFiltersValues.

        Name of the option; for NUMERIC parameters - word indicating start or end of range (i.e. *from*, *to*).  # noqa: E501

        :param name: The name of this ListingResponseFiltersValues.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Filter value. Should be used as query parameter value in the request. This can be:   - for MULTI and SINGLE parameters - a value identifier (e.g. KUJAWSKO_POMORSKIE option in location.province  filter),  - for other types - a value entered by user.  # noqa: E501

        :return: The value of this ListingResponseFiltersValues.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this ListingResponseFiltersValues.

        Filter value. Should be used as query parameter value in the request. This can be:   - for MULTI and SINGLE parameters - a value identifier (e.g. KUJAWSKO_POMORSKIE option in location.province  filter),  - for other types - a value entered by user.  # noqa: E501

        :param value: The value of this ListingResponseFiltersValues.  # noqa: E501
        :type: str
        """

        self._value = value

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

        Suffix used as a second part of query parameter name to be used in the request (the first part is the filter ID). Applicable for NUMERIC values only.  # noqa: E501

        :return: The id_suffix of this ListingResponseFiltersValues.  # noqa: E501
        :rtype: str
        """
        return self._id_suffix

    @id_suffix.setter
    def id_suffix(self, id_suffix):
        """Sets the id_suffix of this ListingResponseFiltersValues.

        Suffix used as a second part of query parameter name to be used in the request (the first part is the filter ID). Applicable for NUMERIC values only.  # noqa: E501

        :param id_suffix: The id_suffix of this ListingResponseFiltersValues.  # noqa: E501
        :type: str
        """

        self._id_suffix = id_suffix

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

        Number of search results matching this filter value.  # noqa: E501

        :return: The count of this ListingResponseFiltersValues.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this ListingResponseFiltersValues.

        Number of search results matching this filter value.  # noqa: E501

        :param count: The count of this ListingResponseFiltersValues.  # noqa: E501
        :type: int
        """

        self._count = count

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

        Indicates whether this filter value was used in the current request.  # noqa: E501

        :return: The selected of this ListingResponseFiltersValues.  # noqa: E501
        :rtype: bool
        """
        return self._selected

    @selected.setter
    def selected(self, selected):
        """Sets the selected of this ListingResponseFiltersValues.

        Indicates whether this filter value was used in the current request.  # noqa: E501

        :param selected: The selected of this ListingResponseFiltersValues.  # noqa: E501
        :type: bool
        """

        self._selected = selected

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

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