# coding: utf-8

"""
    Allegro REST API

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

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


import pprint
import re  # noqa: F401

import six

from allegro_api.configuration import Configuration


class ListingResponseFilters(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 = {
        'id': 'str',
        'type': 'str',
        'name': 'str',
        'values': 'list[ListingResponseFiltersValues]',
        'min_value': 'float',
        'max_value': 'float',
        'unit': 'str'
    }

    attribute_map = {
        'id': 'id',
        'type': 'type',
        'name': 'name',
        'values': 'values',
        'min_value': 'minValue',
        'max_value': 'maxValue',
        'unit': 'unit'
    }

    def __init__(self, id=None, type=None, name=None, values=None, min_value=None, max_value=None, unit=None, local_vars_configuration=None):  # noqa: E501
        """ListingResponseFilters - 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._id = None
        self._type = None
        self._name = None
        self._values = None
        self._min_value = None
        self._max_value = None
        self._unit = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if type is not None:
            self.type = type
        if name is not None:
            self.name = name
        if values is not None:
            self.values = values
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if unit is not None:
            self.unit = unit

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

        Identifier of the filter. Should be used as query parameter key, optionally followed by idSuffix from parameter value (only for NUMERIC filters).  # noqa: E501

        :return: The id of this ListingResponseFilters.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ListingResponseFilters.

        Identifier of the filter. Should be used as query parameter key, optionally followed by idSuffix from parameter value (only for NUMERIC filters).  # noqa: E501

        :param id: The id of this ListingResponseFilters.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The type of the filter:   - *MULTI* - multiple choice filter,  - *SINGLE* - single select (dropdown) filter,  - *NUMERIC* - range of numeric values (search offers with value matching this range),  - *NUMERIC_SINGLE* - single numeric value (search offers with given value matching the range defined in offer),  - *TEXT* - filter allowing user to input any text.  # noqa: E501

        :return: The type of this ListingResponseFilters.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ListingResponseFilters.

        The type of the filter:   - *MULTI* - multiple choice filter,  - *SINGLE* - single select (dropdown) filter,  - *NUMERIC* - range of numeric values (search offers with value matching this range),  - *NUMERIC_SINGLE* - single numeric value (search offers with given value matching the range defined in offer),  - *TEXT* - filter allowing user to input any text.  # noqa: E501

        :param type: The type of this ListingResponseFilters.  # noqa: E501
        :type: str
        """
        allowed_values = ["MULTI", "SINGLE", "NUMERIC", "NUMERIC_SINGLE", "TEXT"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        Name of the filter.  # noqa: E501

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

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

        Name of the filter.  # noqa: E501

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

        self._name = name

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

        Available filter values.  # noqa: E501

        :return: The values of this ListingResponseFilters.  # noqa: E501
        :rtype: list[ListingResponseFiltersValues]
        """
        return self._values

    @values.setter
    def values(self, values):
        """Sets the values of this ListingResponseFilters.

        Available filter values.  # noqa: E501

        :param values: The values of this ListingResponseFilters.  # noqa: E501
        :type: list[ListingResponseFiltersValues]
        """

        self._values = values

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

        Minimum valid value for filters of type NUMERIC.  # noqa: E501

        :return: The min_value of this ListingResponseFilters.  # noqa: E501
        :rtype: float
        """
        return self._min_value

    @min_value.setter
    def min_value(self, min_value):
        """Sets the min_value of this ListingResponseFilters.

        Minimum valid value for filters of type NUMERIC.  # noqa: E501

        :param min_value: The min_value of this ListingResponseFilters.  # noqa: E501
        :type: float
        """

        self._min_value = min_value

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

        Maximum valid value for filters of type NUMERIC.  # noqa: E501

        :return: The max_value of this ListingResponseFilters.  # noqa: E501
        :rtype: float
        """
        return self._max_value

    @max_value.setter
    def max_value(self, max_value):
        """Sets the max_value of this ListingResponseFilters.

        Maximum valid value for filters of type NUMERIC.  # noqa: E501

        :param max_value: The max_value of this ListingResponseFilters.  # noqa: E501
        :type: float
        """

        self._max_value = max_value

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

        Unit of the NUMERIC/NUMERIC_SINGLE filter.  # noqa: E501

        :return: The unit of this ListingResponseFilters.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this ListingResponseFilters.

        Unit of the NUMERIC/NUMERIC_SINGLE filter.  # noqa: E501

        :param unit: The unit of this ListingResponseFilters.  # noqa: E501
        :type: str
        """

        self._unit = unit

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

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