# 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 Label(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 = {
        'color': 'LabelColor',
        'id': 'str',
        'label_list_visibility': 'str',
        'message_list_visibility': 'str',
        'messages_total': 'int',
        'messages_unread': 'int',
        'name': 'str',
        'threads_total': 'int',
        'threads_unread': 'int',
        'type': 'str'
    }

    attribute_map = {
        'color': 'color',
        'id': 'id',
        'label_list_visibility': 'labelListVisibility',
        'message_list_visibility': 'messageListVisibility',
        'messages_total': 'messagesTotal',
        'messages_unread': 'messagesUnread',
        'name': 'name',
        'threads_total': 'threadsTotal',
        'threads_unread': 'threadsUnread',
        'type': 'type'
    }

    def __init__(self, color=None, id=None, label_list_visibility=None, message_list_visibility=None, messages_total=None, messages_unread=None, name=None, threads_total=None, threads_unread=None, type=None):  # noqa: E501
        """Label - a model defined in Swagger"""  # noqa: E501
        self._color = None
        self._id = None
        self._label_list_visibility = None
        self._message_list_visibility = None
        self._messages_total = None
        self._messages_unread = None
        self._name = None
        self._threads_total = None
        self._threads_unread = None
        self._type = None
        self.discriminator = None
        if color is not None:
            self.color = color
        if id is not None:
            self.id = id
        if label_list_visibility is not None:
            self.label_list_visibility = label_list_visibility
        if message_list_visibility is not None:
            self.message_list_visibility = message_list_visibility
        if messages_total is not None:
            self.messages_total = messages_total
        if messages_unread is not None:
            self.messages_unread = messages_unread
        if name is not None:
            self.name = name
        if threads_total is not None:
            self.threads_total = threads_total
        if threads_unread is not None:
            self.threads_unread = threads_unread
        if type is not None:
            self.type = type

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


        :return: The color of this Label.  # noqa: E501
        :rtype: LabelColor
        """
        return self._color

    @color.setter
    def color(self, color):
        """Sets the color of this Label.


        :param color: The color of this Label.  # noqa: E501
        :type: LabelColor
        """

        self._color = color

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

        The immutable ID of the label.  # noqa: E501

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

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

        The immutable ID of the label.  # noqa: E501

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

        self._id = id

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

        The visibility of the label in the label list in the Gmail web interface.  # noqa: E501

        :return: The label_list_visibility of this Label.  # noqa: E501
        :rtype: str
        """
        return self._label_list_visibility

    @label_list_visibility.setter
    def label_list_visibility(self, label_list_visibility):
        """Sets the label_list_visibility of this Label.

        The visibility of the label in the label list in the Gmail web interface.  # noqa: E501

        :param label_list_visibility: The label_list_visibility of this Label.  # noqa: E501
        :type: str
        """
        allowed_values = ["labelShow", "labelShowIfUnread", "labelHide"]  # noqa: E501
        if label_list_visibility not in allowed_values:
            raise ValueError(
                "Invalid value for `label_list_visibility` ({0}), must be one of {1}"  # noqa: E501
                .format(label_list_visibility, allowed_values)
            )

        self._label_list_visibility = label_list_visibility

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

        The visibility of messages with this label in the message list in the Gmail web interface.  # noqa: E501

        :return: The message_list_visibility of this Label.  # noqa: E501
        :rtype: str
        """
        return self._message_list_visibility

    @message_list_visibility.setter
    def message_list_visibility(self, message_list_visibility):
        """Sets the message_list_visibility of this Label.

        The visibility of messages with this label in the message list in the Gmail web interface.  # noqa: E501

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

        self._message_list_visibility = message_list_visibility

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

        The total number of messages with the label.  # noqa: E501

        :return: The messages_total of this Label.  # noqa: E501
        :rtype: int
        """
        return self._messages_total

    @messages_total.setter
    def messages_total(self, messages_total):
        """Sets the messages_total of this Label.

        The total number of messages with the label.  # noqa: E501

        :param messages_total: The messages_total of this Label.  # noqa: E501
        :type: int
        """

        self._messages_total = messages_total

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

        The number of unread messages with the label.  # noqa: E501

        :return: The messages_unread of this Label.  # noqa: E501
        :rtype: int
        """
        return self._messages_unread

    @messages_unread.setter
    def messages_unread(self, messages_unread):
        """Sets the messages_unread of this Label.

        The number of unread messages with the label.  # noqa: E501

        :param messages_unread: The messages_unread of this Label.  # noqa: E501
        :type: int
        """

        self._messages_unread = messages_unread

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

        The display name of the label.  # noqa: E501

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

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

        The display name of the label.  # noqa: E501

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

        self._name = name

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

        The total number of threads with the label.  # noqa: E501

        :return: The threads_total of this Label.  # noqa: E501
        :rtype: int
        """
        return self._threads_total

    @threads_total.setter
    def threads_total(self, threads_total):
        """Sets the threads_total of this Label.

        The total number of threads with the label.  # noqa: E501

        :param threads_total: The threads_total of this Label.  # noqa: E501
        :type: int
        """

        self._threads_total = threads_total

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

        The number of unread threads with the label.  # noqa: E501

        :return: The threads_unread of this Label.  # noqa: E501
        :rtype: int
        """
        return self._threads_unread

    @threads_unread.setter
    def threads_unread(self, threads_unread):
        """Sets the threads_unread of this Label.

        The number of unread threads with the label.  # noqa: E501

        :param threads_unread: The threads_unread of this Label.  # noqa: E501
        :type: int
        """

        self._threads_unread = threads_unread

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

        The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the `INBOX` and `UNREAD` labels from messages and threads, but cannot apply or remove the `DRAFTS` or `SENT` labels from messages or threads.  # noqa: E501

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

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

        The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the `INBOX` and `UNREAD` labels from messages and threads, but cannot apply or remove the `DRAFTS` or `SENT` labels from messages or threads.  # noqa: E501

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

        self._type = type

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

        return self.__dict__ == other.__dict__

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