# 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 MessageDetail(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 = {
        'created_date': 'str',
        'message_body': 'str',
        'message_id': 'str',
        'message_media': 'list[MessageMedia]',
        'read_status': 'bool',
        'recipient_username': 'str',
        'sender_username': 'str',
        'subject': 'str'
    }

    attribute_map = {
        'created_date': 'createdDate',
        'message_body': 'messageBody',
        'message_id': 'messageId',
        'message_media': 'messageMedia',
        'read_status': 'readStatus',
        'recipient_username': 'recipientUsername',
        'sender_username': 'senderUsername',
        'subject': 'subject'
    }

    def __init__(self, created_date=None, message_body=None, message_id=None, message_media=None, read_status=None, recipient_username=None, sender_username=None, subject=None):  # noqa: E501
        """MessageDetail - a model defined in Swagger"""  # noqa: E501
        self._created_date = None
        self._message_body = None
        self._message_id = None
        self._message_media = None
        self._read_status = None
        self._recipient_username = None
        self._sender_username = None
        self._subject = None
        self.discriminator = None
        if created_date is not None:
            self.created_date = created_date
        if message_body is not None:
            self.message_body = message_body
        if message_id is not None:
            self.message_id = message_id
        if message_media is not None:
            self.message_media = message_media
        if read_status is not None:
            self.read_status = read_status
        if recipient_username is not None:
            self.recipient_username = recipient_username
        if sender_username is not None:
            self.sender_username = sender_username
        if subject is not None:
            self.subject = subject

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

        The date,  in ISO 8601 format, the message was received.  # noqa: E501

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

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

        The date,  in ISO 8601 format, the message was received.  # noqa: E501

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

        self._created_date = created_date

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

        The message text.  # noqa: E501

        :return: The message_body of this MessageDetail.  # noqa: E501
        :rtype: str
        """
        return self._message_body

    @message_body.setter
    def message_body(self, message_body):
        """Sets the message_body of this MessageDetail.

        The message text.  # noqa: E501

        :param message_body: The message_body of this MessageDetail.  # noqa: E501
        :type: str
        """

        self._message_body = message_body

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

        The unique identifier of the message.  # noqa: E501

        :return: The message_id of this MessageDetail.  # noqa: E501
        :rtype: str
        """
        return self._message_id

    @message_id.setter
    def message_id(self, message_id):
        """Sets the message_id of this MessageDetail.

        The unique identifier of the message.  # noqa: E501

        :param message_id: The message_id of this MessageDetail.  # noqa: E501
        :type: str
        """

        self._message_id = message_id

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

        This array returns a list, if applicable, of media attached to the message.  # noqa: E501

        :return: The message_media of this MessageDetail.  # noqa: E501
        :rtype: list[MessageMedia]
        """
        return self._message_media

    @message_media.setter
    def message_media(self, message_media):
        """Sets the message_media of this MessageDetail.

        This array returns a list, if applicable, of media attached to the message.  # noqa: E501

        :param message_media: The message_media of this MessageDetail.  # noqa: E501
        :type: list[MessageMedia]
        """

        self._message_media = message_media

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

        This boolean indicates if the message has been viewed by the recipient.<br><br>If this boolean is returned as <code>true</code>, the message has been read. If this boolean is returned as <code>false</code>, the message has not been read.  # noqa: E501

        :return: The read_status of this MessageDetail.  # noqa: E501
        :rtype: bool
        """
        return self._read_status

    @read_status.setter
    def read_status(self, read_status):
        """Sets the read_status of this MessageDetail.

        This boolean indicates if the message has been viewed by the recipient.<br><br>If this boolean is returned as <code>true</code>, the message has been read. If this boolean is returned as <code>false</code>, the message has not been read.  # noqa: E501

        :param read_status: The read_status of this MessageDetail.  # noqa: E501
        :type: bool
        """

        self._read_status = read_status

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

        The eBay username of the message recipient.  # noqa: E501

        :return: The recipient_username of this MessageDetail.  # noqa: E501
        :rtype: str
        """
        return self._recipient_username

    @recipient_username.setter
    def recipient_username(self, recipient_username):
        """Sets the recipient_username of this MessageDetail.

        The eBay username of the message recipient.  # noqa: E501

        :param recipient_username: The recipient_username of this MessageDetail.  # noqa: E501
        :type: str
        """

        self._recipient_username = recipient_username

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

        The eBay username of the message sender.  # noqa: E501

        :return: The sender_username of this MessageDetail.  # noqa: E501
        :rtype: str
        """
        return self._sender_username

    @sender_username.setter
    def sender_username(self, sender_username):
        """Sets the sender_username of this MessageDetail.

        The eBay username of the message sender.  # noqa: E501

        :param sender_username: The sender_username of this MessageDetail.  # noqa: E501
        :type: str
        """

        self._sender_username = sender_username

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

        The subject line of the message.  # noqa: E501

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

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

        The subject line of the message.  # noqa: E501

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

        self._subject = subject

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

        return self.__dict__ == other.__dict__

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