# 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 SendMessageRequest(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',
        'email_copy_to_sender': 'bool',
        'message_media': 'list[MessageMedia]',
        'message_text': 'str',
        'other_party_username': 'str',
        'reference': 'Reference'
    }

    attribute_map = {
        'conversation_id': 'conversationId',
        'email_copy_to_sender': 'emailCopyToSender',
        'message_media': 'messageMedia',
        'message_text': 'messageText',
        'other_party_username': 'otherPartyUsername',
        'reference': 'reference'
    }

    def __init__(self, conversation_id=None, email_copy_to_sender=None, message_media=None, message_text=None, other_party_username=None, reference=None):  # noqa: E501
        """SendMessageRequest - a model defined in Swagger"""  # noqa: E501
        self._conversation_id = None
        self._email_copy_to_sender = None
        self._message_media = None
        self._message_text = None
        self._other_party_username = None
        self._reference = None
        self.discriminator = None
        if conversation_id is not None:
            self.conversation_id = conversation_id
        if email_copy_to_sender is not None:
            self.email_copy_to_sender = email_copy_to_sender
        if message_media is not None:
            self.message_media = message_media
        if message_text is not None:
            self.message_text = message_text
        if other_party_username is not None:
            self.other_party_username = other_party_username
        if reference is not None:
            self.reference = reference

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

        This field specifies the unique identifier of the conversation in which to send the message.<br><br>Use the <a href=\"/api-docs/commerce/message/resources/conversation/methods/getConversations\" target=\"_blank\">getConversations</a> method to retrieve conversation ID values.<br><br>This field is required if sending a message in an existing conversation.  # noqa: E501

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

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

        This field specifies the unique identifier of the conversation in which to send the message.<br><br>Use the <a href=\"/api-docs/commerce/message/resources/conversation/methods/getConversations\" target=\"_blank\">getConversations</a> method to retrieve conversation ID values.<br><br>This field is required if sending a message in an existing conversation.  # noqa: E501

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

        self._conversation_id = conversation_id

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

        This boolean indicates whether a copy of the message should be emailed to the sender.<br><br>If this boolean is input as <code>true</code>, a copy of the message will be emailed to the sender.  # noqa: E501

        :return: The email_copy_to_sender of this SendMessageRequest.  # noqa: E501
        :rtype: bool
        """
        return self._email_copy_to_sender

    @email_copy_to_sender.setter
    def email_copy_to_sender(self, email_copy_to_sender):
        """Sets the email_copy_to_sender of this SendMessageRequest.

        This boolean indicates whether a copy of the message should be emailed to the sender.<br><br>If this boolean is input as <code>true</code>, a copy of the message will be emailed to the sender.  # noqa: E501

        :param email_copy_to_sender: The email_copy_to_sender of this SendMessageRequest.  # noqa: E501
        :type: bool
        """

        self._email_copy_to_sender = email_copy_to_sender

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

        This array lists the individual forms of media, if any, to be attached to the message.<br><br>Up to five individual forms of media may be be sent per message. If more than five are specified in this array, an error will occur and the call will fail.  # noqa: E501

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

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

        This array lists the individual forms of media, if any, to be attached to the message.<br><br>Up to five individual forms of media may be be sent per message. If more than five are specified in this array, an error will occur and the call will fail.  # noqa: E501

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

        self._message_media = message_media

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

        The text of the message.<br><br><b>Max length:</b> 2000 characters  # noqa: E501

        :return: The message_text of this SendMessageRequest.  # noqa: E501
        :rtype: str
        """
        return self._message_text

    @message_text.setter
    def message_text(self, message_text):
        """Sets the message_text of this SendMessageRequest.

        The text of the message.<br><br><b>Max length:</b> 2000 characters  # noqa: E501

        :param message_text: The message_text of this SendMessageRequest.  # noqa: E501
        :type: str
        """

        self._message_text = message_text

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

        This field specifies the eBay username of the entity for which to send the message.<br><br>This field is required if starting a new conversation with another eBay user.  # noqa: E501

        :return: The other_party_username of this SendMessageRequest.  # noqa: E501
        :rtype: str
        """
        return self._other_party_username

    @other_party_username.setter
    def other_party_username(self, other_party_username):
        """Sets the other_party_username of this SendMessageRequest.

        This field specifies the eBay username of the entity for which to send the message.<br><br>This field is required if starting a new conversation with another eBay user.  # noqa: E501

        :param other_party_username: The other_party_username of this SendMessageRequest.  # noqa: E501
        :type: str
        """

        self._other_party_username = other_party_username

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


        :return: The reference of this SendMessageRequest.  # noqa: E501
        :rtype: Reference
        """
        return self._reference

    @reference.setter
    def reference(self, reference):
        """Sets the reference of this SendMessageRequest.


        :param reference: The reference of this SendMessageRequest.  # noqa: E501
        :type: Reference
        """

        self._reference = reference

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

        return self.__dict__ == other.__dict__

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