# coding: utf-8

"""
    Gmail API

    The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class FilterCriteria(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'exclude_chats': 'bool',
        '_from': 'str',
        'has_attachment': 'bool',
        'negated_query': 'str',
        'query': 'str',
        'size': 'int',
        'size_comparison': 'str',
        'subject': 'str',
        'to': 'str'
    }

    attribute_map = {
        'exclude_chats': 'excludeChats',
        '_from': 'from',
        'has_attachment': 'hasAttachment',
        'negated_query': 'negatedQuery',
        'query': 'query',
        'size': 'size',
        'size_comparison': 'sizeComparison',
        'subject': 'subject',
        'to': 'to'
    }

    def __init__(self, exclude_chats=None, _from=None, has_attachment=None, negated_query=None, query=None, size=None, size_comparison=None, subject=None, to=None):  # noqa: E501
        """FilterCriteria - a model defined in Swagger"""  # noqa: E501
        self._exclude_chats = None
        self.__from = None
        self._has_attachment = None
        self._negated_query = None
        self._query = None
        self._size = None
        self._size_comparison = None
        self._subject = None
        self._to = None
        self.discriminator = None
        if exclude_chats is not None:
            self.exclude_chats = exclude_chats
        if _from is not None:
            self._from = _from
        if has_attachment is not None:
            self.has_attachment = has_attachment
        if negated_query is not None:
            self.negated_query = negated_query
        if query is not None:
            self.query = query
        if size is not None:
            self.size = size
        if size_comparison is not None:
            self.size_comparison = size_comparison
        if subject is not None:
            self.subject = subject
        if to is not None:
            self.to = to

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

        Whether the response should exclude chats.  # noqa: E501

        :return: The exclude_chats of this FilterCriteria.  # noqa: E501
        :rtype: bool
        """
        return self._exclude_chats

    @exclude_chats.setter
    def exclude_chats(self, exclude_chats):
        """Sets the exclude_chats of this FilterCriteria.

        Whether the response should exclude chats.  # noqa: E501

        :param exclude_chats: The exclude_chats of this FilterCriteria.  # noqa: E501
        :type: bool
        """

        self._exclude_chats = exclude_chats

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

        The sender's display name or email address.  # noqa: E501

        :return: The _from of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this FilterCriteria.

        The sender's display name or email address.  # noqa: E501

        :param _from: The _from of this FilterCriteria.  # noqa: E501
        :type: str
        """

        self.__from = _from

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

        Whether the message has any attachment.  # noqa: E501

        :return: The has_attachment of this FilterCriteria.  # noqa: E501
        :rtype: bool
        """
        return self._has_attachment

    @has_attachment.setter
    def has_attachment(self, has_attachment):
        """Sets the has_attachment of this FilterCriteria.

        Whether the message has any attachment.  # noqa: E501

        :param has_attachment: The has_attachment of this FilterCriteria.  # noqa: E501
        :type: bool
        """

        self._has_attachment = has_attachment

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

        Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.  # noqa: E501

        :return: The negated_query of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self._negated_query

    @negated_query.setter
    def negated_query(self, negated_query):
        """Sets the negated_query of this FilterCriteria.

        Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.  # noqa: E501

        :param negated_query: The negated_query of this FilterCriteria.  # noqa: E501
        :type: str
        """

        self._negated_query = negated_query

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

        Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.  # noqa: E501

        :return: The query of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self._query

    @query.setter
    def query(self, query):
        """Sets the query of this FilterCriteria.

        Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.  # noqa: E501

        :param query: The query of this FilterCriteria.  # noqa: E501
        :type: str
        """

        self._query = query

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

        The size of the entire RFC822 message in bytes, including all headers and attachments.  # noqa: E501

        :return: The size of this FilterCriteria.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this FilterCriteria.

        The size of the entire RFC822 message in bytes, including all headers and attachments.  # noqa: E501

        :param size: The size of this FilterCriteria.  # noqa: E501
        :type: int
        """

        self._size = size

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

        How the message size in bytes should be in relation to the size field.  # noqa: E501

        :return: The size_comparison of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self._size_comparison

    @size_comparison.setter
    def size_comparison(self, size_comparison):
        """Sets the size_comparison of this FilterCriteria.

        How the message size in bytes should be in relation to the size field.  # noqa: E501

        :param size_comparison: The size_comparison of this FilterCriteria.  # noqa: E501
        :type: str
        """
        allowed_values = ["unspecified", "smaller", "larger"]  # noqa: E501
        if size_comparison not in allowed_values:
            raise ValueError(
                "Invalid value for `size_comparison` ({0}), must be one of {1}"  # noqa: E501
                .format(size_comparison, allowed_values)
            )

        self._size_comparison = size_comparison

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

        Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed.  # noqa: E501

        :return: The subject of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self._subject

    @subject.setter
    def subject(self, subject):
        """Sets the subject of this FilterCriteria.

        Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed.  # noqa: E501

        :param subject: The subject of this FilterCriteria.  # noqa: E501
        :type: str
        """

        self._subject = subject

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

        The recipient's display name or email address. Includes recipients in the \"to\", \"cc\", and \"bcc\" header fields. You can use simply the local part of the email address. For example, \"example\" and \"example@\" both match \"example@gmail.com\". This field is case-insensitive.  # noqa: E501

        :return: The to of this FilterCriteria.  # noqa: E501
        :rtype: str
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this FilterCriteria.

        The recipient's display name or email address. Includes recipients in the \"to\", \"cc\", and \"bcc\" header fields. You can use simply the local part of the email address. For example, \"example\" and \"example@\" both match \"example@gmail.com\". This field is case-insensitive.  # noqa: E501

        :param to: The to of this FilterCriteria.  # noqa: E501
        :type: str
        """

        self._to = to

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(FilterCriteria, dict):
            for key, value in self.items():
                result[key] = 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, FilterCriteria):
            return False

        return self.__dict__ == other.__dict__

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