# coding: utf-8

"""
    Gmail API

    The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class SmtpMsa(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 = {
        'host': 'str',
        'password': 'str',
        'port': 'int',
        'security_mode': 'str',
        'username': 'str'
    }

    attribute_map = {
        'host': 'host',
        'password': 'password',
        'port': 'port',
        'security_mode': 'securityMode',
        'username': 'username'
    }

    def __init__(self, host=None, password=None, port=None, security_mode=None, username=None):  # noqa: E501
        """SmtpMsa - a model defined in Swagger"""  # noqa: E501
        self._host = None
        self._password = None
        self._port = None
        self._security_mode = None
        self._username = None
        self.discriminator = None
        if host is not None:
            self.host = host
        if password is not None:
            self.password = password
        if port is not None:
            self.port = port
        if security_mode is not None:
            self.security_mode = security_mode
        if username is not None:
            self.username = username

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

        The hostname of the SMTP service. Required.  # noqa: E501

        :return: The host of this SmtpMsa.  # noqa: E501
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this SmtpMsa.

        The hostname of the SMTP service. Required.  # noqa: E501

        :param host: The host of this SmtpMsa.  # noqa: E501
        :type: str
        """

        self._host = host

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

        The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.  # noqa: E501

        :return: The password of this SmtpMsa.  # noqa: E501
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this SmtpMsa.

        The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.  # noqa: E501

        :param password: The password of this SmtpMsa.  # noqa: E501
        :type: str
        """

        self._password = password

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

        The port of the SMTP service. Required.  # noqa: E501

        :return: The port of this SmtpMsa.  # noqa: E501
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """Sets the port of this SmtpMsa.

        The port of the SMTP service. Required.  # noqa: E501

        :param port: The port of this SmtpMsa.  # noqa: E501
        :type: int
        """

        self._port = port

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

        The protocol that will be used to secure communication with the SMTP service. Required.  # noqa: E501

        :return: The security_mode of this SmtpMsa.  # noqa: E501
        :rtype: str
        """
        return self._security_mode

    @security_mode.setter
    def security_mode(self, security_mode):
        """Sets the security_mode of this SmtpMsa.

        The protocol that will be used to secure communication with the SMTP service. Required.  # noqa: E501

        :param security_mode: The security_mode of this SmtpMsa.  # noqa: E501
        :type: str
        """
        allowed_values = ["securityModeUnspecified", "none", "ssl", "starttls"]  # noqa: E501
        if security_mode not in allowed_values:
            raise ValueError(
                "Invalid value for `security_mode` ({0}), must be one of {1}"  # noqa: E501
                .format(security_mode, allowed_values)
            )

        self._security_mode = security_mode

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

        The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.  # noqa: E501

        :return: The username of this SmtpMsa.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this SmtpMsa.

        The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.  # noqa: E501

        :param username: The username of this SmtpMsa.  # noqa: E501
        :type: str
        """

        self._username = username

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

        return self.__dict__ == other.__dict__

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