# coding: utf-8

"""
    campaigns-email

    These APIs ensures an easy integration process of Email management for developers to send, read, and track Email campaigns within applications.  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: phenom
"""

import pprint
import re  # noqa: F401

import six

class EmailCampaignOptInHistoryDetailsContent(object):
    """
    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 = {
        'action_type': 'str',
        'reason': 'str',
        'created_date': 'int',
        'email': 'str'
    }

    attribute_map = {
        'action_type': 'actionType',
        'reason': 'reason',
        'created_date': 'createdDate',
        'email': 'email'
    }

    def __init__(self, action_type=None, reason=None, created_date=None, email=None):  # noqa: E501
        """EmailCampaignOptInHistoryDetailsContent - a model defined in Swagger"""  # noqa: E501
        self._action_type = None
        self._reason = None
        self._created_date = None
        self._email = None
        self.discriminator = None
        self.action_type = action_type
        self.reason = reason
        self.created_date = created_date
        self.email = email

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

        The type of action associated with the email campaign OptIn History.  # noqa: E501

        :return: The action_type of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :rtype: str
        """
        return self._action_type

    @action_type.setter
    def action_type(self, action_type):
        """Sets the action_type of this EmailCampaignOptInHistoryDetailsContent.

        The type of action associated with the email campaign OptIn History.  # noqa: E501

        :param action_type: The action_type of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :type: str
        """
        if action_type is None:
            raise ValueError("Invalid value for `action_type`, must not be `None`")  # noqa: E501

        self._action_type = action_type

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

        The reason for the action in the email campaign OptIn History.  # noqa: E501

        :return: The reason of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """Sets the reason of this EmailCampaignOptInHistoryDetailsContent.

        The reason for the action in the email campaign OptIn History.  # noqa: E501

        :param reason: The reason of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :type: str
        """
        if reason is None:
            raise ValueError("Invalid value for `reason`, must not be `None`")  # noqa: E501

        self._reason = reason

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

        Timestamp representing the creation date of the email campaign OptIn History entry.  # noqa: E501

        :return: The created_date of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :rtype: int
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """Sets the created_date of this EmailCampaignOptInHistoryDetailsContent.

        Timestamp representing the creation date of the email campaign OptIn History entry.  # noqa: E501

        :param created_date: The created_date of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :type: int
        """
        if created_date is None:
            raise ValueError("Invalid value for `created_date`, must not be `None`")  # noqa: E501

        self._created_date = created_date

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

        Email associated with the email campaign OptIn History.  # noqa: E501

        :return: The email of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this EmailCampaignOptInHistoryDetailsContent.

        Email associated with the email campaign OptIn History.  # noqa: E501

        :param email: The email of this EmailCampaignOptInHistoryDetailsContent.  # noqa: E501
        :type: str
        """
        if email is None:
            raise ValueError("Invalid value for `email`, must not be `None`")  # noqa: E501

        self._email = email

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

        return self.__dict__ == other.__dict__

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