# coding: utf-8

"""
    Gmail

    Access Gmail mailboxes including sending user email.

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


from pprint import pformat
from six import iteritems
import re


class SendAs(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, display_name=None, is_default=None, is_primary=None, reply_to_address=None, send_as_email=None, signature=None, smtp_msa=None, treat_as_alias=None, verification_status=None):
        """
        SendAs - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'display_name': 'str',
            'is_default': 'bool',
            'is_primary': 'bool',
            'reply_to_address': 'str',
            'send_as_email': 'str',
            'signature': 'str',
            'smtp_msa': 'SmtpMsa',
            'treat_as_alias': 'bool',
            'verification_status': 'str'
        }

        self.attribute_map = {
            'display_name': 'displayName',
            'is_default': 'isDefault',
            'is_primary': 'isPrimary',
            'reply_to_address': 'replyToAddress',
            'send_as_email': 'sendAsEmail',
            'signature': 'signature',
            'smtp_msa': 'smtpMsa',
            'treat_as_alias': 'treatAsAlias',
            'verification_status': 'verificationStatus'
        }

        self._display_name = display_name
        self._is_default = is_default
        self._is_primary = is_primary
        self._reply_to_address = reply_to_address
        self._send_as_email = send_as_email
        self._signature = signature
        self._smtp_msa = smtp_msa
        self._treat_as_alias = treat_as_alias
        self._verification_status = verification_status

    @property
    def display_name(self):
        """
        Gets the display_name of this SendAs.
        A name that appears in the \"From:\" header for mail sent using this alias. For custom \"from\" addresses, when this is empty, Gmail will populate the \"From:\" header with the name that is used for the primary address associated with the account.

        :return: The display_name of this SendAs.
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """
        Sets the display_name of this SendAs.
        A name that appears in the \"From:\" header for mail sent using this alias. For custom \"from\" addresses, when this is empty, Gmail will populate the \"From:\" header with the name that is used for the primary address associated with the account.

        :param display_name: The display_name of this SendAs.
        :type: str
        """

        self._display_name = display_name

    @property
    def is_default(self):
        """
        Gets the is_default of this SendAs.
        Whether this address is selected as the default \"From:\" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.

        :return: The is_default of this SendAs.
        :rtype: bool
        """
        return self._is_default

    @is_default.setter
    def is_default(self, is_default):
        """
        Sets the is_default of this SendAs.
        Whether this address is selected as the default \"From:\" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.

        :param is_default: The is_default of this SendAs.
        :type: bool
        """

        self._is_default = is_default

    @property
    def is_primary(self):
        """
        Gets the is_primary of this SendAs.
        Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.

        :return: The is_primary of this SendAs.
        :rtype: bool
        """
        return self._is_primary

    @is_primary.setter
    def is_primary(self, is_primary):
        """
        Sets the is_primary of this SendAs.
        Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.

        :param is_primary: The is_primary of this SendAs.
        :type: bool
        """

        self._is_primary = is_primary

    @property
    def reply_to_address(self):
        """
        Gets the reply_to_address of this SendAs.
        An optional email address that is included in a \"Reply-To:\" header for mail sent using this alias. If this is empty, Gmail will not generate a \"Reply-To:\" header.

        :return: The reply_to_address of this SendAs.
        :rtype: str
        """
        return self._reply_to_address

    @reply_to_address.setter
    def reply_to_address(self, reply_to_address):
        """
        Sets the reply_to_address of this SendAs.
        An optional email address that is included in a \"Reply-To:\" header for mail sent using this alias. If this is empty, Gmail will not generate a \"Reply-To:\" header.

        :param reply_to_address: The reply_to_address of this SendAs.
        :type: str
        """

        self._reply_to_address = reply_to_address

    @property
    def send_as_email(self):
        """
        Gets the send_as_email of this SendAs.
        The email address that appears in the \"From:\" header for mail sent using this alias. This is read-only for all operations except create.

        :return: The send_as_email of this SendAs.
        :rtype: str
        """
        return self._send_as_email

    @send_as_email.setter
    def send_as_email(self, send_as_email):
        """
        Sets the send_as_email of this SendAs.
        The email address that appears in the \"From:\" header for mail sent using this alias. This is read-only for all operations except create.

        :param send_as_email: The send_as_email of this SendAs.
        :type: str
        """

        self._send_as_email = send_as_email

    @property
    def signature(self):
        """
        Gets the signature of this SendAs.
        An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.

        :return: The signature of this SendAs.
        :rtype: str
        """
        return self._signature

    @signature.setter
    def signature(self, signature):
        """
        Sets the signature of this SendAs.
        An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.

        :param signature: The signature of this SendAs.
        :type: str
        """

        self._signature = signature

    @property
    def smtp_msa(self):
        """
        Gets the smtp_msa of this SendAs.
        An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom \"from\" aliases.

        :return: The smtp_msa of this SendAs.
        :rtype: SmtpMsa
        """
        return self._smtp_msa

    @smtp_msa.setter
    def smtp_msa(self, smtp_msa):
        """
        Sets the smtp_msa of this SendAs.
        An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom \"from\" aliases.

        :param smtp_msa: The smtp_msa of this SendAs.
        :type: SmtpMsa
        """

        self._smtp_msa = smtp_msa

    @property
    def treat_as_alias(self):
        """
        Gets the treat_as_alias of this SendAs.
        Whether Gmail should  treat this address as an alias for the user's primary email address. This setting only applies to custom \"from\" aliases.

        :return: The treat_as_alias of this SendAs.
        :rtype: bool
        """
        return self._treat_as_alias

    @treat_as_alias.setter
    def treat_as_alias(self, treat_as_alias):
        """
        Sets the treat_as_alias of this SendAs.
        Whether Gmail should  treat this address as an alias for the user's primary email address. This setting only applies to custom \"from\" aliases.

        :param treat_as_alias: The treat_as_alias of this SendAs.
        :type: bool
        """

        self._treat_as_alias = treat_as_alias

    @property
    def verification_status(self):
        """
        Gets the verification_status of this SendAs.
        Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom \"from\" aliases.

        :return: The verification_status of this SendAs.
        :rtype: str
        """
        return self._verification_status

    @verification_status.setter
    def verification_status(self, verification_status):
        """
        Sets the verification_status of this SendAs.
        Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom \"from\" aliases.

        :param verification_status: The verification_status of this SendAs.
        :type: str
        """
        allowed_values = ["accepted", "pending", "verificationStatusUnspecified"]
        if verification_status not in allowed_values:
            raise ValueError(
                "Invalid value for `verification_status` ({0}), must be one of {1}"
                .format(verification_status, allowed_values)
            )

        self._verification_status = verification_status

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

        return self.__dict__ == other.__dict__

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