# coding: utf-8

"""
    MailSlurp API

    MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository  # noqa: E501

    The version of the OpenAPI document: 6.5.2
    Contact: contact@mailslurp.dev
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from mailslurp_client.configuration import Configuration


class PhoneMessageThreadProjection(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'phone_number': 'str',
        'phone_number_id': 'str',
        'other_phone_number': 'str',
        'last_message_direction': 'str',
        'last_body': 'str',
        'last_created': 'datetime'
    }

    attribute_map = {
        'phone_number': 'phoneNumber',
        'phone_number_id': 'phoneNumberId',
        'other_phone_number': 'otherPhoneNumber',
        'last_message_direction': 'lastMessageDirection',
        'last_body': 'lastBody',
        'last_created': 'lastCreated'
    }

    def __init__(self, phone_number=None, phone_number_id=None, other_phone_number=None, last_message_direction=None, last_body=None, last_created=None, local_vars_configuration=None):  # noqa: E501
        """PhoneMessageThreadProjection - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._phone_number = None
        self._phone_number_id = None
        self._other_phone_number = None
        self._last_message_direction = None
        self._last_body = None
        self._last_created = None
        self.discriminator = None

        if phone_number is not None:
            self.phone_number = phone_number
        self.phone_number_id = phone_number_id
        if other_phone_number is not None:
            self.other_phone_number = other_phone_number
        self.last_message_direction = last_message_direction
        self.last_body = last_body
        self.last_created = last_created

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


        :return: The phone_number of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: str
        """
        return self._phone_number

    @phone_number.setter
    def phone_number(self, phone_number):
        """Sets the phone_number of this PhoneMessageThreadProjection.


        :param phone_number: The phone_number of this PhoneMessageThreadProjection.  # noqa: E501
        :type: str
        """

        self._phone_number = phone_number

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


        :return: The phone_number_id of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: str
        """
        return self._phone_number_id

    @phone_number_id.setter
    def phone_number_id(self, phone_number_id):
        """Sets the phone_number_id of this PhoneMessageThreadProjection.


        :param phone_number_id: The phone_number_id of this PhoneMessageThreadProjection.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and phone_number_id is None:  # noqa: E501
            raise ValueError("Invalid value for `phone_number_id`, must not be `None`")  # noqa: E501

        self._phone_number_id = phone_number_id

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


        :return: The other_phone_number of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: str
        """
        return self._other_phone_number

    @other_phone_number.setter
    def other_phone_number(self, other_phone_number):
        """Sets the other_phone_number of this PhoneMessageThreadProjection.


        :param other_phone_number: The other_phone_number of this PhoneMessageThreadProjection.  # noqa: E501
        :type: str
        """

        self._other_phone_number = other_phone_number

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


        :return: The last_message_direction of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: str
        """
        return self._last_message_direction

    @last_message_direction.setter
    def last_message_direction(self, last_message_direction):
        """Sets the last_message_direction of this PhoneMessageThreadProjection.


        :param last_message_direction: The last_message_direction of this PhoneMessageThreadProjection.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and last_message_direction is None:  # noqa: E501
            raise ValueError("Invalid value for `last_message_direction`, must not be `None`")  # noqa: E501
        allowed_values = ["OUTBOUND", "INBOUND"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and last_message_direction not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `last_message_direction` ({0}), must be one of {1}"  # noqa: E501
                .format(last_message_direction, allowed_values)
            )

        self._last_message_direction = last_message_direction

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


        :return: The last_body of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: str
        """
        return self._last_body

    @last_body.setter
    def last_body(self, last_body):
        """Sets the last_body of this PhoneMessageThreadProjection.


        :param last_body: The last_body of this PhoneMessageThreadProjection.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and last_body is None:  # noqa: E501
            raise ValueError("Invalid value for `last_body`, must not be `None`")  # noqa: E501

        self._last_body = last_body

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


        :return: The last_created of this PhoneMessageThreadProjection.  # noqa: E501
        :rtype: datetime
        """
        return self._last_created

    @last_created.setter
    def last_created(self, last_created):
        """Sets the last_created of this PhoneMessageThreadProjection.


        :param last_created: The last_created of this PhoneMessageThreadProjection.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and last_created is None:  # noqa: E501
            raise ValueError("Invalid value for `last_created`, must not be `None`")  # noqa: E501

        self._last_created = last_created

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
