# coding: utf-8

"""
    Maestro API

    Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: devcenter@docusign.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from docusign_maestro.client.configuration import Configuration


class WorkflowDefinition(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 = {
        'account_id': 'str',
        'created_by_name': 'str',
        'document_version': 'str',
        'participants': 'dict(str, Participant)',
        'schema_version': 'str',
        'steps': 'list[object]',
        'trigger': 'DSWorkflowTrigger',
        'variables': 'dict(str, object)',
        'workflow_description': 'str',
        'workflow_name': 'str'
    }

    attribute_map = {
        'account_id': 'accountId',
        'created_by_name': 'createdByName',
        'document_version': 'documentVersion',
        'participants': 'participants',
        'schema_version': 'schemaVersion',
        'steps': 'steps',
        'trigger': 'trigger',
        'variables': 'variables',
        'workflow_description': 'workflowDescription',
        'workflow_name': 'workflowName'
    }

    def __init__(self, _configuration=None, **kwargs):  # noqa: E501
        """WorkflowDefinition - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._account_id = None
        self._created_by_name = None
        self._document_version = None
        self._participants = None
        self._schema_version = None
        self._steps = None
        self._trigger = None
        self._variables = None
        self._workflow_description = None
        self._workflow_name = None
        self.discriminator = None

        setattr(self, "_{}".format('account_id'), kwargs.get('account_id', None))
        setattr(self, "_{}".format('created_by_name'), kwargs.get('created_by_name', None))
        setattr(self, "_{}".format('document_version'), kwargs.get('document_version', None))
        setattr(self, "_{}".format('participants'), kwargs.get('participants', None))
        setattr(self, "_{}".format('schema_version'), kwargs.get('schema_version', None))
        setattr(self, "_{}".format('steps'), kwargs.get('steps', None))
        setattr(self, "_{}".format('trigger'), kwargs.get('trigger', None))
        setattr(self, "_{}".format('variables'), kwargs.get('variables', None))
        setattr(self, "_{}".format('workflow_description'), kwargs.get('workflow_description', None))
        setattr(self, "_{}".format('workflow_name'), kwargs.get('workflow_name', None))

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


        :return: The account_id of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this WorkflowDefinition.


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

        self._account_id = account_id

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

        The name of the user who created this workflow definition  # noqa: E501

        :return: The created_by_name of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._created_by_name

    @created_by_name.setter
    def created_by_name(self, created_by_name):
        """Sets the created_by_name of this WorkflowDefinition.

        The name of the user who created this workflow definition  # noqa: E501

        :param created_by_name: The created_by_name of this WorkflowDefinition.  # noqa: E501
        :type: str
        """

        self._created_by_name = created_by_name

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


        :return: The document_version of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._document_version

    @document_version.setter
    def document_version(self, document_version):
        """Sets the document_version of this WorkflowDefinition.


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

        self._document_version = document_version

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

        A DS Workflow participant record  # noqa: E501

        :return: The participants of this WorkflowDefinition.  # noqa: E501
        :rtype: dict(str, Participant)
        """
        return self._participants

    @participants.setter
    def participants(self, participants):
        """Sets the participants of this WorkflowDefinition.

        A DS Workflow participant record  # noqa: E501

        :param participants: The participants of this WorkflowDefinition.  # noqa: E501
        :type: dict(str, Participant)
        """

        self._participants = participants

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


        :return: The schema_version of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._schema_version

    @schema_version.setter
    def schema_version(self, schema_version):
        """Sets the schema_version of this WorkflowDefinition.


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

        self._schema_version = schema_version

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

        A list of #/definitions/DSWorkflowStep. Each element is: A DS Workflow Step. This object should be any of the following object models: [#/definitions/DSServiceStep, #/definitions/DSTransformationStep, #/definitions/DSDocGenStep, #/definitions/DSSignStep]  # noqa: E501

        :return: The steps of this WorkflowDefinition.  # noqa: E501
        :rtype: list[object]
        """
        return self._steps

    @steps.setter
    def steps(self, steps):
        """Sets the steps of this WorkflowDefinition.

        A list of #/definitions/DSWorkflowStep. Each element is: A DS Workflow Step. This object should be any of the following object models: [#/definitions/DSServiceStep, #/definitions/DSTransformationStep, #/definitions/DSDocGenStep, #/definitions/DSSignStep]  # noqa: E501

        :param steps: The steps of this WorkflowDefinition.  # noqa: E501
        :type: list[object]
        """
        if self._configuration.client_side_validation and steps is None:
            raise ValueError("Invalid value for `steps`, must not be `None`")  # noqa: E501

        self._steps = steps

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


        :return: The trigger of this WorkflowDefinition.  # noqa: E501
        :rtype: DSWorkflowTrigger
        """
        return self._trigger

    @trigger.setter
    def trigger(self, trigger):
        """Sets the trigger of this WorkflowDefinition.


        :param trigger: The trigger of this WorkflowDefinition.  # noqa: E501
        :type: DSWorkflowTrigger
        """
        if self._configuration.client_side_validation and trigger is None:
            raise ValueError("Invalid value for `trigger`, must not be `None`")  # noqa: E501

        self._trigger = trigger

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

        A DS Workflow variable record  # noqa: E501

        :return: The variables of this WorkflowDefinition.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._variables

    @variables.setter
    def variables(self, variables):
        """Sets the variables of this WorkflowDefinition.

        A DS Workflow variable record  # noqa: E501

        :param variables: The variables of this WorkflowDefinition.  # noqa: E501
        :type: dict(str, object)
        """
        if self._configuration.client_side_validation and variables is None:
            raise ValueError("Invalid value for `variables`, must not be `None`")  # noqa: E501

        self._variables = variables

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


        :return: The workflow_description of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._workflow_description

    @workflow_description.setter
    def workflow_description(self, workflow_description):
        """Sets the workflow_description of this WorkflowDefinition.


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

        self._workflow_description = workflow_description

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


        :return: The workflow_name of this WorkflowDefinition.  # noqa: E501
        :rtype: str
        """
        return self._workflow_name

    @workflow_name.setter
    def workflow_name(self, workflow_name):
        """Sets the workflow_name of this WorkflowDefinition.


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

        self._workflow_name = workflow_name

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

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