# coding: utf-8

"""
    M2M Public API Service

    This API allows eBay sellers to send, retrieve, and manage messages.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ConversationDetail(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 = {
        'conversation_id': 'str',
        'conversation_status': 'str',
        'conversation_title': 'str',
        'conversation_type': 'str',
        'created_date': 'str',
        'latest_message': 'MessageDetail',
        'reference_id': 'str',
        'reference_type': 'str',
        'unread_count': 'int'
    }

    attribute_map = {
        'conversation_id': 'conversationId',
        'conversation_status': 'conversationStatus',
        'conversation_title': 'conversationTitle',
        'conversation_type': 'conversationType',
        'created_date': 'createdDate',
        'latest_message': 'latestMessage',
        'reference_id': 'referenceId',
        'reference_type': 'referenceType',
        'unread_count': 'unreadCount'
    }

    def __init__(self, conversation_id=None, conversation_status=None, conversation_title=None, conversation_type=None, created_date=None, latest_message=None, reference_id=None, reference_type=None, unread_count=None):  # noqa: E501
        """ConversationDetail - a model defined in Swagger"""  # noqa: E501
        self._conversation_id = None
        self._conversation_status = None
        self._conversation_title = None
        self._conversation_type = None
        self._created_date = None
        self._latest_message = None
        self._reference_id = None
        self._reference_type = None
        self._unread_count = None
        self.discriminator = None
        if conversation_id is not None:
            self.conversation_id = conversation_id
        if conversation_status is not None:
            self.conversation_status = conversation_status
        if conversation_title is not None:
            self.conversation_title = conversation_title
        if conversation_type is not None:
            self.conversation_type = conversation_type
        if created_date is not None:
            self.created_date = created_date
        if latest_message is not None:
            self.latest_message = latest_message
        if reference_id is not None:
            self.reference_id = reference_id
        if reference_type is not None:
            self.reference_type = reference_type
        if unread_count is not None:
            self.unread_count = unread_count

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

        The unique identifier of the conversation.  # noqa: E501

        :return: The conversation_id of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._conversation_id

    @conversation_id.setter
    def conversation_id(self, conversation_id):
        """Sets the conversation_id of this ConversationDetail.

        The unique identifier of the conversation.  # noqa: E501

        :param conversation_id: The conversation_id of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._conversation_id = conversation_id

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

        This value indicates the current status of the conversation, such as <code>ACTIVE</code> or <code>ARCHIVE</code>.  # noqa: E501

        :return: The conversation_status of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._conversation_status

    @conversation_status.setter
    def conversation_status(self, conversation_status):
        """Sets the conversation_status of this ConversationDetail.

        This value indicates the current status of the conversation, such as <code>ACTIVE</code> or <code>ARCHIVE</code>.  # noqa: E501

        :param conversation_status: The conversation_status of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._conversation_status = conversation_status

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

        The title of the conversation.  # noqa: E501

        :return: The conversation_title of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._conversation_title

    @conversation_title.setter
    def conversation_title(self, conversation_title):
        """Sets the conversation_title of this ConversationDetail.

        The title of the conversation.  # noqa: E501

        :param conversation_title: The conversation_title of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._conversation_title = conversation_title

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

        This value indicates the type of the conversation, such as <code>FROM_EBAY</code> or <code>FROM_MEMBERS</code>.  # noqa: E501

        :return: The conversation_type of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._conversation_type

    @conversation_type.setter
    def conversation_type(self, conversation_type):
        """Sets the conversation_type of this ConversationDetail.

        This value indicates the type of the conversation, such as <code>FROM_EBAY</code> or <code>FROM_MEMBERS</code>.  # noqa: E501

        :param conversation_type: The conversation_type of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._conversation_type = conversation_type

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

        This value indicates the date, in ISO 8601 format, the conversation was created.  # noqa: E501

        :return: The created_date of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """Sets the created_date of this ConversationDetail.

        This value indicates the date, in ISO 8601 format, the conversation was created.  # noqa: E501

        :param created_date: The created_date of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._created_date = created_date

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


        :return: The latest_message of this ConversationDetail.  # noqa: E501
        :rtype: MessageDetail
        """
        return self._latest_message

    @latest_message.setter
    def latest_message(self, latest_message):
        """Sets the latest_message of this ConversationDetail.


        :param latest_message: The latest_message of this ConversationDetail.  # noqa: E501
        :type: MessageDetail
        """

        self._latest_message = latest_message

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

        This value indicates the reference ID associated with the corresponding <b>referenceType</b> value.<br><br>In the case of a <code>LISTING</code> <b>referenceType</b>, this value will be the item ID value of the associated listing.  # noqa: E501

        :return: The reference_id of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._reference_id

    @reference_id.setter
    def reference_id(self, reference_id):
        """Sets the reference_id of this ConversationDetail.

        This value indicates the reference ID associated with the corresponding <b>referenceType</b> value.<br><br>In the case of a <code>LISTING</code> <b>referenceType</b>, this value will be the item ID value of the associated listing.  # noqa: E501

        :param reference_id: The reference_id of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._reference_id = reference_id

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

        This value indicates the reference type, if applicable, associated with the conversation.<br><br>The reference type is used to specify what the conversation is in reference to. For example, a value of <code>LISTING</code> specifies that the conversation is associated with a specific listing. The item ID associated with this listing will then be returned in the <b>referenceId</b> field.<br><br>Currently, only <code>LISTING</code> will be returned.  # noqa: E501

        :return: The reference_type of this ConversationDetail.  # noqa: E501
        :rtype: str
        """
        return self._reference_type

    @reference_type.setter
    def reference_type(self, reference_type):
        """Sets the reference_type of this ConversationDetail.

        This value indicates the reference type, if applicable, associated with the conversation.<br><br>The reference type is used to specify what the conversation is in reference to. For example, a value of <code>LISTING</code> specifies that the conversation is associated with a specific listing. The item ID associated with this listing will then be returned in the <b>referenceId</b> field.<br><br>Currently, only <code>LISTING</code> will be returned.  # noqa: E501

        :param reference_type: The reference_type of this ConversationDetail.  # noqa: E501
        :type: str
        """

        self._reference_type = reference_type

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

        This value indicates the amount of unread messages in the conversation.  # noqa: E501

        :return: The unread_count of this ConversationDetail.  # noqa: E501
        :rtype: int
        """
        return self._unread_count

    @unread_count.setter
    def unread_count(self, unread_count):
        """Sets the unread_count of this ConversationDetail.

        This value indicates the amount of unread messages in the conversation.  # noqa: E501

        :param unread_count: The unread_count of this ConversationDetail.  # noqa: E501
        :type: int
        """

        self._unread_count = unread_count

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

        return self.__dict__ == other.__dict__

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