# coding: utf-8

"""
    Sparks OpenAPI

    Generated documentation for the Logicdrop Sparks API and OpenAPI clients.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501

    The version of the OpenAPI document: v_VERSION_._BUILD_
    Contact: support@logicdrop.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from logicdrop.sparks.openapi.configuration import Configuration


class EmailMessage(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 = {
        'project': 'str',
        'template': 'str',
        'version': 'str',
        '_from': 'str',
        'reply_to': 'str',
        'to': 'list[str]',
        'cc': 'list[str]',
        'bcc': 'list[str]',
        'priority': 'int',
        'subject': 'str',
        'body': 'str',
        'properties': 'dict(str, object)',
        'attachments': 'dict(str, str)'
    }

    attribute_map = {
        'project': 'project',
        'template': 'template',
        'version': 'version',
        '_from': 'from',
        'reply_to': 'replyTo',
        'to': 'to',
        'cc': 'cc',
        'bcc': 'bcc',
        'priority': 'priority',
        'subject': 'subject',
        'body': 'body',
        'properties': 'properties',
        'attachments': 'attachments'
    }

    def __init__(self, project=None, template=None, version=None, _from=None, reply_to=None, to=None, cc=None, bcc=None, priority=None, subject=None, body=None, properties=None, attachments=None, local_vars_configuration=None):  # noqa: E501
        """EmailMessage - 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._project = None
        self._template = None
        self._version = None
        self.__from = None
        self._reply_to = None
        self._to = None
        self._cc = None
        self._bcc = None
        self._priority = None
        self._subject = None
        self._body = None
        self._properties = None
        self._attachments = None
        self.discriminator = None

        if project is not None:
            self.project = project
        if template is not None:
            self.template = template
        if version is not None:
            self.version = version
        if _from is not None:
            self._from = _from
        if reply_to is not None:
            self.reply_to = reply_to
        if to is not None:
            self.to = to
        if cc is not None:
            self.cc = cc
        if bcc is not None:
            self.bcc = bcc
        if priority is not None:
            self.priority = priority
        if subject is not None:
            self.subject = subject
        if body is not None:
            self.body = body
        if properties is not None:
            self.properties = properties
        if attachments is not None:
            self.attachments = attachments

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


        :return: The project of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this EmailMessage.


        :param project: The project of this EmailMessage.  # noqa: E501
        :type: str
        """

        self._project = project

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


        :return: The template of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self._template

    @template.setter
    def template(self, template):
        """Sets the template of this EmailMessage.


        :param template: The template of this EmailMessage.  # noqa: E501
        :type: str
        """

        self._template = template

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


        :return: The version of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this EmailMessage.


        :param version: The version of this EmailMessage.  # noqa: E501
        :type: str
        """

        self._version = version

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


        :return: The _from of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this EmailMessage.


        :param _from: The _from of this EmailMessage.  # noqa: E501
        :type: str
        """

        self.__from = _from

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


        :return: The reply_to of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self._reply_to

    @reply_to.setter
    def reply_to(self, reply_to):
        """Sets the reply_to of this EmailMessage.


        :param reply_to: The reply_to of this EmailMessage.  # noqa: E501
        :type: str
        """

        self._reply_to = reply_to

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


        :return: The to of this EmailMessage.  # noqa: E501
        :rtype: list[str]
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this EmailMessage.


        :param to: The to of this EmailMessage.  # noqa: E501
        :type: list[str]
        """

        self._to = to

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


        :return: The cc of this EmailMessage.  # noqa: E501
        :rtype: list[str]
        """
        return self._cc

    @cc.setter
    def cc(self, cc):
        """Sets the cc of this EmailMessage.


        :param cc: The cc of this EmailMessage.  # noqa: E501
        :type: list[str]
        """

        self._cc = cc

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


        :return: The bcc of this EmailMessage.  # noqa: E501
        :rtype: list[str]
        """
        return self._bcc

    @bcc.setter
    def bcc(self, bcc):
        """Sets the bcc of this EmailMessage.


        :param bcc: The bcc of this EmailMessage.  # noqa: E501
        :type: list[str]
        """

        self._bcc = bcc

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


        :return: The priority of this EmailMessage.  # noqa: E501
        :rtype: int
        """
        return self._priority

    @priority.setter
    def priority(self, priority):
        """Sets the priority of this EmailMessage.


        :param priority: The priority of this EmailMessage.  # noqa: E501
        :type: int
        """

        self._priority = priority

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


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

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


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

        self._subject = subject

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


        :return: The body of this EmailMessage.  # noqa: E501
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this EmailMessage.


        :param body: The body of this EmailMessage.  # noqa: E501
        :type: str
        """

        self._body = body

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


        :return: The properties of this EmailMessage.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this EmailMessage.


        :param properties: The properties of this EmailMessage.  # noqa: E501
        :type: dict(str, object)
        """

        self._properties = properties

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


        :return: The attachments of this EmailMessage.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._attachments

    @attachments.setter
    def attachments(self, attachments):
        """Sets the attachments of this EmailMessage.


        :param attachments: The attachments of this EmailMessage.  # noqa: E501
        :type: dict(str, str)
        """

        self._attachments = attachments

    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, EmailMessage):
            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, EmailMessage):
            return True

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