# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class ItemSearchTypeFacet(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 = {
        'count': 'bool',
        'name': 'str',
        'max_results': 'int',
        'field': 'str',
        'range': 'list[FacetRangeType]',
        'exclude': 'list[str]',
        'min_count': 'int'
    }

    attribute_map = {
        'count': 'count',
        'name': 'name',
        'max_results': 'maxResults',
        'field': 'field',
        'range': 'range',
        'exclude': 'exclude',
        'min_count': 'minCount'
    }

    def __init__(self, count=None, name=None, max_results=None, field=None, range=None, exclude=None, min_count=None):  # noqa: E501
        """ItemSearchTypeFacet - a model defined in OpenAPI"""  # noqa: E501

        self._count = None
        self._name = None
        self._max_results = None
        self._field = None
        self._range = None
        self._exclude = None
        self._min_count = None
        self.discriminator = None

        if count is not None:
            self.count = count
        if name is not None:
            self.name = name
        if max_results is not None:
            self.max_results = max_results
        self.field = field
        if range is not None:
            self.range = range
        if exclude is not None:
            self.exclude = exclude
        if min_count is not None:
            self.min_count = min_count

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


        :return: The count of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: bool
        """
        return self._count

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


        :param count: The count of this ItemSearchTypeFacet.  # noqa: E501
        :type: bool
        """

        self._count = count

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


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

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


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

        self._name = name

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


        :return: The max_results of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: int
        """
        return self._max_results

    @max_results.setter
    def max_results(self, max_results):
        """Sets the max_results of this ItemSearchTypeFacet.


        :param max_results: The max_results of this ItemSearchTypeFacet.  # noqa: E501
        :type: int
        """

        self._max_results = max_results

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


        :return: The field of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: str
        """
        return self._field

    @field.setter
    def field(self, field):
        """Sets the field of this ItemSearchTypeFacet.


        :param field: The field of this ItemSearchTypeFacet.  # noqa: E501
        :type: str
        """
        if field is None:
            raise ValueError("Invalid value for `field`, must not be `None`")  # noqa: E501

        self._field = field

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


        :return: The range of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: list[FacetRangeType]
        """
        return self._range

    @range.setter
    def range(self, range):
        """Sets the range of this ItemSearchTypeFacet.


        :param range: The range of this ItemSearchTypeFacet.  # noqa: E501
        :type: list[FacetRangeType]
        """

        self._range = range

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


        :return: The exclude of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: list[str]
        """
        return self._exclude

    @exclude.setter
    def exclude(self, exclude):
        """Sets the exclude of this ItemSearchTypeFacet.


        :param exclude: The exclude of this ItemSearchTypeFacet.  # noqa: E501
        :type: list[str]
        """

        self._exclude = exclude

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


        :return: The min_count of this ItemSearchTypeFacet.  # noqa: E501
        :rtype: int
        """
        return self._min_count

    @min_count.setter
    def min_count(self, min_count):
        """Sets the min_count of this ItemSearchTypeFacet.


        :param min_count: The min_count of this ItemSearchTypeFacet.  # noqa: E501
        :type: int
        """

        self._min_count = min_count

    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, ItemSearchTypeFacet):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
