# coding: utf-8

"""
    Pdf4me

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # 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 MailingAction(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 = {
        'doc_templates': 'list[DocTemplate]',
        'mailing_config': 'MailingConfig',
        'excel_data': 'str',
        'start_immediate': 'bool',
        'generate_single_pdf': 'bool',
        'action_id': 'str'
    }

    attribute_map = {
        'doc_templates': 'docTemplates',
        'mailing_config': 'mailingConfig',
        'excel_data': 'excelData',
        'start_immediate': 'startImmediate',
        'generate_single_pdf': 'generateSinglePDF',
        'action_id': 'actionId'
    }

    def __init__(self, doc_templates=None, mailing_config=None, excel_data=None, start_immediate=None, generate_single_pdf=None, action_id=None):  # noqa: E501
        """MailingAction - a model defined in Swagger"""  # noqa: E501

        self._doc_templates = None
        self._mailing_config = None
        self._excel_data = None
        self._start_immediate = None
        self._generate_single_pdf = None
        self._action_id = None
        self.discriminator = None

        if doc_templates is not None:
            self.doc_templates = doc_templates
        if mailing_config is not None:
            self.mailing_config = mailing_config
        if excel_data is not None:
            self.excel_data = excel_data
        if start_immediate is not None:
            self.start_immediate = start_immediate
        if generate_single_pdf is not None:
            self.generate_single_pdf = generate_single_pdf
        if action_id is not None:
            self.action_id = action_id

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


        :return: The doc_templates of this MailingAction.  # noqa: E501
        :rtype: list[DocTemplate]
        """
        return self._doc_templates

    @doc_templates.setter
    def doc_templates(self, doc_templates):
        """Sets the doc_templates of this MailingAction.


        :param doc_templates: The doc_templates of this MailingAction.  # noqa: E501
        :type: list[DocTemplate]
        """

        self._doc_templates = doc_templates

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


        :return: The mailing_config of this MailingAction.  # noqa: E501
        :rtype: MailingConfig
        """
        return self._mailing_config

    @mailing_config.setter
    def mailing_config(self, mailing_config):
        """Sets the mailing_config of this MailingAction.


        :param mailing_config: The mailing_config of this MailingAction.  # noqa: E501
        :type: MailingConfig
        """

        self._mailing_config = mailing_config

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


        :return: The excel_data of this MailingAction.  # noqa: E501
        :rtype: str
        """
        return self._excel_data

    @excel_data.setter
    def excel_data(self, excel_data):
        """Sets the excel_data of this MailingAction.


        :param excel_data: The excel_data of this MailingAction.  # noqa: E501
        :type: str
        """
        if excel_data is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', excel_data):  # noqa: E501
            raise ValueError(r"Invalid value for `excel_data`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`")  # noqa: E501

        self._excel_data = excel_data

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


        :return: The start_immediate of this MailingAction.  # noqa: E501
        :rtype: bool
        """
        return self._start_immediate

    @start_immediate.setter
    def start_immediate(self, start_immediate):
        """Sets the start_immediate of this MailingAction.


        :param start_immediate: The start_immediate of this MailingAction.  # noqa: E501
        :type: bool
        """

        self._start_immediate = start_immediate

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


        :return: The generate_single_pdf of this MailingAction.  # noqa: E501
        :rtype: bool
        """
        return self._generate_single_pdf

    @generate_single_pdf.setter
    def generate_single_pdf(self, generate_single_pdf):
        """Sets the generate_single_pdf of this MailingAction.


        :param generate_single_pdf: The generate_single_pdf of this MailingAction.  # noqa: E501
        :type: bool
        """

        self._generate_single_pdf = generate_single_pdf

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


        :return: The action_id of this MailingAction.  # noqa: E501
        :rtype: str
        """
        return self._action_id

    @action_id.setter
    def action_id(self, action_id):
        """Sets the action_id of this MailingAction.


        :param action_id: The action_id of this MailingAction.  # noqa: E501
        :type: str
        """

        self._action_id = action_id

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

        return self.__dict__ == other.__dict__

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