# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class RawEmailResource(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 = {
        'body': 'str',
        '_from': 'str',
        'html': 'bool',
        'recipients': 'list[int]',
        'subject': 'str'
    }

    attribute_map = {
        'body': 'body',
        '_from': 'from',
        'html': 'html',
        'recipients': 'recipients',
        'subject': 'subject'
    }

    def __init__(self, body=None, _from=None, html=None, recipients=None, subject=None):
        """
        RawEmailResource - a model defined in Swagger
        """

        self._body = None
        self.__from = None
        self._html = None
        self._recipients = None
        self._subject = None
        self.discriminator = None

        self.body = body
        if _from is not None:
          self._from = _from
        if html is not None:
          self.html = html
        self.recipients = recipients
        self.subject = subject

    @property
    def body(self):
        """
        Gets the body of this RawEmailResource.
        The body of the outgoing message.

        :return: The body of this RawEmailResource.
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """
        Sets the body of this RawEmailResource.
        The body of the outgoing message.

        :param body: The body of this RawEmailResource.
        :type: str
        """
        if body is None:
            raise ValueError("Invalid value for `body`, must not be `None`")

        self._body = body

    @property
    def _from(self):
        """
        Gets the _from of this RawEmailResource.
        Address to attribute the outgoing message to. Optional if the config email.out_address is set.

        :return: The _from of this RawEmailResource.
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """
        Sets the _from of this RawEmailResource.
        Address to attribute the outgoing message to. Optional if the config email.out_address is set.

        :param _from: The _from of this RawEmailResource.
        :type: str
        """

        self.__from = _from

    @property
    def html(self):
        """
        Gets the html of this RawEmailResource.
        Whether the body is to be treated as html. Default false.

        :return: The html of this RawEmailResource.
        :rtype: bool
        """
        return self._html

    @html.setter
    def html(self, html):
        """
        Sets the html of this RawEmailResource.
        Whether the body is to be treated as html. Default false.

        :param html: The html of this RawEmailResource.
        :type: bool
        """

        self._html = html

    @property
    def recipients(self):
        """
        Gets the recipients of this RawEmailResource.
        A list of user ids to send the message to.

        :return: The recipients of this RawEmailResource.
        :rtype: list[int]
        """
        return self._recipients

    @recipients.setter
    def recipients(self, recipients):
        """
        Sets the recipients of this RawEmailResource.
        A list of user ids to send the message to.

        :param recipients: The recipients of this RawEmailResource.
        :type: list[int]
        """
        if recipients is None:
            raise ValueError("Invalid value for `recipients`, must not be `None`")

        self._recipients = recipients

    @property
    def subject(self):
        """
        Gets the subject of this RawEmailResource.
        The subject of the outgoing message.

        :return: The subject of this RawEmailResource.
        :rtype: str
        """
        return self._subject

    @subject.setter
    def subject(self, subject):
        """
        Sets the subject of this RawEmailResource.
        The subject of the outgoing message.

        :param subject: The subject of this RawEmailResource.
        :type: str
        """
        if subject is None:
            raise ValueError("Invalid value for `subject`, must not be `None`")

        self._subject = subject

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, RawEmailResource):
            return False

        return self.__dict__ == other.__dict__

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