# 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 ProviderSettings(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 = {
        'mail_provider': 'str',
        'imap_host': 'str',
        'imap_port': 'int',
        'imap_ssl': 'bool',
        'imap_start_tls': 'bool',
        'smtp_host': 'str',
        'smtp_port': 'int',
        'smtp_ssl': 'bool',
        'smtp_start_tls': 'bool'
    }

    attribute_map = {
        'mail_provider': 'mailProvider',
        'imap_host': 'imapHost',
        'imap_port': 'imapPort',
        'imap_ssl': 'imapSsl',
        'imap_start_tls': 'imapStartTls',
        'smtp_host': 'smtpHost',
        'smtp_port': 'smtpPort',
        'smtp_ssl': 'smtpSsl',
        'smtp_start_tls': 'smtpStartTls'
    }

    def __init__(self, mail_provider=None, imap_host=None, imap_port=None, imap_ssl=None, imap_start_tls=None, smtp_host=None, smtp_port=None, smtp_ssl=None, smtp_start_tls=None, local_vars_configuration=None):  # noqa: E501
        """ProviderSettings - 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._mail_provider = None
        self._imap_host = None
        self._imap_port = None
        self._imap_ssl = None
        self._imap_start_tls = None
        self._smtp_host = None
        self._smtp_port = None
        self._smtp_ssl = None
        self._smtp_start_tls = None
        self.discriminator = None

        self.mail_provider = mail_provider
        self.imap_host = imap_host
        self.imap_port = imap_port
        self.imap_ssl = imap_ssl
        if imap_start_tls is not None:
            self.imap_start_tls = imap_start_tls
        self.smtp_host = smtp_host
        self.smtp_port = smtp_port
        self.smtp_ssl = smtp_ssl
        if smtp_start_tls is not None:
            self.smtp_start_tls = smtp_start_tls

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


        :return: The mail_provider of this ProviderSettings.  # noqa: E501
        :rtype: str
        """
        return self._mail_provider

    @mail_provider.setter
    def mail_provider(self, mail_provider):
        """Sets the mail_provider of this ProviderSettings.


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

        self._mail_provider = mail_provider

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


        :return: The imap_host of this ProviderSettings.  # noqa: E501
        :rtype: str
        """
        return self._imap_host

    @imap_host.setter
    def imap_host(self, imap_host):
        """Sets the imap_host of this ProviderSettings.


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

        self._imap_host = imap_host

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


        :return: The imap_port of this ProviderSettings.  # noqa: E501
        :rtype: int
        """
        return self._imap_port

    @imap_port.setter
    def imap_port(self, imap_port):
        """Sets the imap_port of this ProviderSettings.


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

        self._imap_port = imap_port

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


        :return: The imap_ssl of this ProviderSettings.  # noqa: E501
        :rtype: bool
        """
        return self._imap_ssl

    @imap_ssl.setter
    def imap_ssl(self, imap_ssl):
        """Sets the imap_ssl of this ProviderSettings.


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

        self._imap_ssl = imap_ssl

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


        :return: The imap_start_tls of this ProviderSettings.  # noqa: E501
        :rtype: bool
        """
        return self._imap_start_tls

    @imap_start_tls.setter
    def imap_start_tls(self, imap_start_tls):
        """Sets the imap_start_tls of this ProviderSettings.


        :param imap_start_tls: The imap_start_tls of this ProviderSettings.  # noqa: E501
        :type: bool
        """

        self._imap_start_tls = imap_start_tls

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


        :return: The smtp_host of this ProviderSettings.  # noqa: E501
        :rtype: str
        """
        return self._smtp_host

    @smtp_host.setter
    def smtp_host(self, smtp_host):
        """Sets the smtp_host of this ProviderSettings.


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

        self._smtp_host = smtp_host

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


        :return: The smtp_port of this ProviderSettings.  # noqa: E501
        :rtype: int
        """
        return self._smtp_port

    @smtp_port.setter
    def smtp_port(self, smtp_port):
        """Sets the smtp_port of this ProviderSettings.


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

        self._smtp_port = smtp_port

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


        :return: The smtp_ssl of this ProviderSettings.  # noqa: E501
        :rtype: bool
        """
        return self._smtp_ssl

    @smtp_ssl.setter
    def smtp_ssl(self, smtp_ssl):
        """Sets the smtp_ssl of this ProviderSettings.


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

        self._smtp_ssl = smtp_ssl

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


        :return: The smtp_start_tls of this ProviderSettings.  # noqa: E501
        :rtype: bool
        """
        return self._smtp_start_tls

    @smtp_start_tls.setter
    def smtp_start_tls(self, smtp_start_tls):
        """Sets the smtp_start_tls of this ProviderSettings.


        :param smtp_start_tls: The smtp_start_tls of this ProviderSettings.  # noqa: E501
        :type: bool
        """

        self._smtp_start_tls = smtp_start_tls

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

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