# 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 History(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 = {
        'id': 'str',
        'labels_added': 'list[HistoryLabelAdded]',
        'labels_removed': 'list[HistoryLabelRemoved]',
        'messages': 'list[Message]',
        'messages_added': 'list[HistoryMessageAdded]',
        'messages_deleted': 'list[HistoryMessageDeleted]'
    }

    attribute_map = {
        'id': 'id',
        'labels_added': 'labelsAdded',
        'labels_removed': 'labelsRemoved',
        'messages': 'messages',
        'messages_added': 'messagesAdded',
        'messages_deleted': 'messagesDeleted'
    }

    def __init__(self, id=None, labels_added=None, labels_removed=None, messages=None, messages_added=None, messages_deleted=None):  # noqa: E501
        """History - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._labels_added = None
        self._labels_removed = None
        self._messages = None
        self._messages_added = None
        self._messages_deleted = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if labels_added is not None:
            self.labels_added = labels_added
        if labels_removed is not None:
            self.labels_removed = labels_removed
        if messages is not None:
            self.messages = messages
        if messages_added is not None:
            self.messages_added = messages_added
        if messages_deleted is not None:
            self.messages_deleted = messages_deleted

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

        The mailbox sequence ID.  # noqa: E501

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

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

        The mailbox sequence ID.  # noqa: E501

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

        self._id = id

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

        Labels added to messages in this history record.  # noqa: E501

        :return: The labels_added of this History.  # noqa: E501
        :rtype: list[HistoryLabelAdded]
        """
        return self._labels_added

    @labels_added.setter
    def labels_added(self, labels_added):
        """Sets the labels_added of this History.

        Labels added to messages in this history record.  # noqa: E501

        :param labels_added: The labels_added of this History.  # noqa: E501
        :type: list[HistoryLabelAdded]
        """

        self._labels_added = labels_added

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

        Labels removed from messages in this history record.  # noqa: E501

        :return: The labels_removed of this History.  # noqa: E501
        :rtype: list[HistoryLabelRemoved]
        """
        return self._labels_removed

    @labels_removed.setter
    def labels_removed(self, labels_removed):
        """Sets the labels_removed of this History.

        Labels removed from messages in this history record.  # noqa: E501

        :param labels_removed: The labels_removed of this History.  # noqa: E501
        :type: list[HistoryLabelRemoved]
        """

        self._labels_removed = labels_removed

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

        List of messages changed in this history record. The fields for specific change types, such as `messagesAdded` may duplicate messages in this field. We recommend using the specific change-type fields instead of this.  # noqa: E501

        :return: The messages of this History.  # noqa: E501
        :rtype: list[Message]
        """
        return self._messages

    @messages.setter
    def messages(self, messages):
        """Sets the messages of this History.

        List of messages changed in this history record. The fields for specific change types, such as `messagesAdded` may duplicate messages in this field. We recommend using the specific change-type fields instead of this.  # noqa: E501

        :param messages: The messages of this History.  # noqa: E501
        :type: list[Message]
        """

        self._messages = messages

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

        Messages added to the mailbox in this history record.  # noqa: E501

        :return: The messages_added of this History.  # noqa: E501
        :rtype: list[HistoryMessageAdded]
        """
        return self._messages_added

    @messages_added.setter
    def messages_added(self, messages_added):
        """Sets the messages_added of this History.

        Messages added to the mailbox in this history record.  # noqa: E501

        :param messages_added: The messages_added of this History.  # noqa: E501
        :type: list[HistoryMessageAdded]
        """

        self._messages_added = messages_added

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

        Messages deleted (not Trashed) from the mailbox in this history record.  # noqa: E501

        :return: The messages_deleted of this History.  # noqa: E501
        :rtype: list[HistoryMessageDeleted]
        """
        return self._messages_deleted

    @messages_deleted.setter
    def messages_deleted(self, messages_deleted):
        """Sets the messages_deleted of this History.

        Messages deleted (not Trashed) from the mailbox in this history record.  # noqa: E501

        :param messages_deleted: The messages_deleted of this History.  # noqa: E501
        :type: list[HistoryMessageDeleted]
        """

        self._messages_deleted = messages_deleted

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

        return self.__dict__ == other.__dict__

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