# coding: utf-8

"""
    \"Data Governance Center: REST API v2\"

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.models.json_asset_assignment_rule_impl import JsonAssetAssignmentRuleImpl  # noqa: F401,E501
from swagger_client.models.json_domain_assignment_rule_impl import JsonDomainAssignmentRuleImpl  # noqa: F401,E501
from swagger_client.models.json_named_resource_impl import JsonNamedResourceImpl  # noqa: F401,E501
from swagger_client.models.json_role_impl import JsonRoleImpl  # noqa: F401,E501
from swagger_client.models.json_workflow_business_item_type import JsonWorkflowBusinessItemType  # noqa: F401,E501
from swagger_client.models.json_workflow_exclusivity import JsonWorkflowExclusivity  # noqa: F401,E501
from swagger_client.models.json_workflow_start_event_type import JsonWorkflowStartEventType  # noqa: F401,E501


class JsonWorkflowDefinitionImpl(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 = {
        'id': 'str',
        'created_by': 'str',
        'created_on': 'float',
        'last_modified_by': 'str',
        'last_modified_on': 'float',
        'system': 'bool',
        'resource_type': 'str',
        'name': 'str',
        'process_id': 'str',
        'start_label': 'str',
        'form_required': 'bool',
        'enabled': 'bool',
        'domain_assignment_rules': 'list[JsonDomainAssignmentRuleImpl]',
        'asset_assignment_rules': 'list[JsonAssetAssignmentRuleImpl]',
        'business_item_resource_type': 'JsonWorkflowBusinessItemType',
        'exclusivity': 'JsonWorkflowExclusivity',
        'guest_user_accessible': 'bool',
        'registered_user_accessible': 'bool',
        'candidate_user_check_enabled': 'bool',
        'start_events': 'list[JsonWorkflowStartEventType]',
        'configuration_variables': 'dict(str, str)',
        'start_roles': 'list[JsonRoleImpl]',
        'stop_roles': 'list[JsonRoleImpl]',
        'reassign_roles': 'list[JsonRoleImpl]'
    }

    attribute_map = {
        'id': 'id',
        'created_by': 'createdBy',
        'created_on': 'createdOn',
        'last_modified_by': 'lastModifiedBy',
        'last_modified_on': 'lastModifiedOn',
        'system': 'system',
        'resource_type': 'resourceType',
        'name': 'name',
        'process_id': 'processId',
        'start_label': 'startLabel',
        'form_required': 'formRequired',
        'enabled': 'enabled',
        'domain_assignment_rules': 'domainAssignmentRules',
        'asset_assignment_rules': 'assetAssignmentRules',
        'business_item_resource_type': 'businessItemResourceType',
        'exclusivity': 'exclusivity',
        'guest_user_accessible': 'guestUserAccessible',
        'registered_user_accessible': 'registeredUserAccessible',
        'candidate_user_check_enabled': 'candidateUserCheckEnabled',
        'start_events': 'startEvents',
        'configuration_variables': 'configurationVariables',
        'start_roles': 'startRoles',
        'stop_roles': 'stopRoles',
        'reassign_roles': 'reassignRoles'
    }

    def __init__(self, id=None, created_by=None, created_on=None, last_modified_by=None, last_modified_on=None, system=None, resource_type=None, name=None, process_id=None, start_label=None, form_required=None, enabled=None, domain_assignment_rules=None, asset_assignment_rules=None, business_item_resource_type=None, exclusivity=None, guest_user_accessible=None, registered_user_accessible=None, candidate_user_check_enabled=None, start_events=None, configuration_variables=None, start_roles=None, stop_roles=None, reassign_roles=None):  # noqa: E501
        """JsonWorkflowDefinitionImpl - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._created_by = None
        self._created_on = None
        self._last_modified_by = None
        self._last_modified_on = None
        self._system = None
        self._resource_type = None
        self._name = None
        self._process_id = None
        self._start_label = None
        self._form_required = None
        self._enabled = None
        self._domain_assignment_rules = None
        self._asset_assignment_rules = None
        self._business_item_resource_type = None
        self._exclusivity = None
        self._guest_user_accessible = None
        self._registered_user_accessible = None
        self._candidate_user_check_enabled = None
        self._start_events = None
        self._configuration_variables = None
        self._start_roles = None
        self._stop_roles = None
        self._reassign_roles = None
        self.discriminator = None

        self.id = id
        if created_by is not None:
            self.created_by = created_by
        if created_on is not None:
            self.created_on = created_on
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if last_modified_on is not None:
            self.last_modified_on = last_modified_on
        if system is not None:
            self.system = system
        if resource_type is not None:
            self.resource_type = resource_type
        if name is not None:
            self.name = name
        if process_id is not None:
            self.process_id = process_id
        if start_label is not None:
            self.start_label = start_label
        if form_required is not None:
            self.form_required = form_required
        if enabled is not None:
            self.enabled = enabled
        if domain_assignment_rules is not None:
            self.domain_assignment_rules = domain_assignment_rules
        if asset_assignment_rules is not None:
            self.asset_assignment_rules = asset_assignment_rules
        if business_item_resource_type is not None:
            self.business_item_resource_type = business_item_resource_type
        if exclusivity is not None:
            self.exclusivity = exclusivity
        if guest_user_accessible is not None:
            self.guest_user_accessible = guest_user_accessible
        if registered_user_accessible is not None:
            self.registered_user_accessible = registered_user_accessible
        if candidate_user_check_enabled is not None:
            self.candidate_user_check_enabled = candidate_user_check_enabled
        if start_events is not None:
            self.start_events = start_events
        if configuration_variables is not None:
            self.configuration_variables = configuration_variables
        if start_roles is not None:
            self.start_roles = start_roles
        if stop_roles is not None:
            self.stop_roles = stop_roles
        if reassign_roles is not None:
            self.reassign_roles = reassign_roles

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

        The <code>id</code> of the represented object (entity)  # noqa: E501

        :return: The id of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this JsonWorkflowDefinitionImpl.

        The <code>id</code> of the represented object (entity)  # noqa: E501

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

        self._id = id

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

        The id of the user that created this resource  # noqa: E501

        :return: The created_by of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this JsonWorkflowDefinitionImpl.

        The id of the user that created this resource  # noqa: E501

        :param created_by: The created_by of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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

        The timestamp (in UTC time standard) of the creation of this resource  # noqa: E501

        :return: The created_on of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: float
        """
        return self._created_on

    @created_on.setter
    def created_on(self, created_on):
        """Sets the created_on of this JsonWorkflowDefinitionImpl.

        The timestamp (in UTC time standard) of the creation of this resource  # noqa: E501

        :param created_on: The created_on of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: float
        """

        self._created_on = created_on

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

        The id of the user who modified this resource the last time  # noqa: E501

        :return: The last_modified_by of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by

    @last_modified_by.setter
    def last_modified_by(self, last_modified_by):
        """Sets the last_modified_by of this JsonWorkflowDefinitionImpl.

        The id of the user who modified this resource the last time  # noqa: E501

        :param last_modified_by: The last_modified_by of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._last_modified_by = last_modified_by

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

        The timestamp (in UTC time standard) of the last modification of this resource  # noqa: E501

        :return: The last_modified_on of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: float
        """
        return self._last_modified_on

    @last_modified_on.setter
    def last_modified_on(self, last_modified_on):
        """Sets the last_modified_on of this JsonWorkflowDefinitionImpl.

        The timestamp (in UTC time standard) of the last modification of this resource  # noqa: E501

        :param last_modified_on: The last_modified_on of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: float
        """

        self._last_modified_on = last_modified_on

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

        Whether this is a system resource or not  # noqa: E501

        :return: The system of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._system

    @system.setter
    def system(self, system):
        """Sets the system of this JsonWorkflowDefinitionImpl.

        Whether this is a system resource or not  # noqa: E501

        :param system: The system of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._system = system

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

        The type of this resource, i.e. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance]  # noqa: E501

        :return: The resource_type of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this JsonWorkflowDefinitionImpl.

        The type of this resource, i.e. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance]  # noqa: E501

        :param resource_type: The resource_type of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._resource_type = resource_type

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

        The name of the resource  # noqa: E501

        :return: The name of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this JsonWorkflowDefinitionImpl.

        The name of the resource  # noqa: E501

        :param name: The name of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The <code>id</code> that uniquely identifies a workflow definition in the application. It is present in the BPMN notation in the ID property of the '<process..' tag. Deploying a BPMN in DGC creates a new version if a process with the same ID already exists.  # noqa: E501

        :return: The process_id of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._process_id

    @process_id.setter
    def process_id(self, process_id):
        """Sets the process_id of this JsonWorkflowDefinitionImpl.

        The <code>id</code> that uniquely identifies a workflow definition in the application. It is present in the BPMN notation in the ID property of the '<process..' tag. Deploying a BPMN in DGC creates a new version if a process with the same ID already exists.  # noqa: E501

        :param process_id: The process_id of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._process_id = process_id

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

        The label used for starting this workflow  # noqa: E501

        :return: The start_label of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: str
        """
        return self._start_label

    @start_label.setter
    def start_label(self, start_label):
        """Sets the start_label of this JsonWorkflowDefinitionImpl.

        The label used for starting this workflow  # noqa: E501

        :param start_label: The start_label of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: str
        """

        self._start_label = start_label

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

        Whether the start form for this workflow requires user interaction through a form or not  # noqa: E501

        :return: The form_required of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._form_required

    @form_required.setter
    def form_required(self, form_required):
        """Sets the form_required of this JsonWorkflowDefinitionImpl.

        Whether the start form for this workflow requires user interaction through a form or not  # noqa: E501

        :param form_required: The form_required of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._form_required = form_required

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

        Whether workflow is enabled or not. A workflow has to be enabled for a user to be able to start a workflow. A workflow is enabled if it's status is put on the status 'enabled'  # noqa: E501

        :return: The enabled of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this JsonWorkflowDefinitionImpl.

        Whether workflow is enabled or not. A workflow has to be enabled for a user to be able to start a workflow. A workflow is enabled if it's status is put on the status 'enabled'  # noqa: E501

        :param enabled: The enabled of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        The list of domain assignment rules  # noqa: E501

        :return: The domain_assignment_rules of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonDomainAssignmentRuleImpl]
        """
        return self._domain_assignment_rules

    @domain_assignment_rules.setter
    def domain_assignment_rules(self, domain_assignment_rules):
        """Sets the domain_assignment_rules of this JsonWorkflowDefinitionImpl.

        The list of domain assignment rules  # noqa: E501

        :param domain_assignment_rules: The domain_assignment_rules of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonDomainAssignmentRuleImpl]
        """

        self._domain_assignment_rules = domain_assignment_rules

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

        The list of asset assignment rules  # noqa: E501

        :return: The asset_assignment_rules of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonAssetAssignmentRuleImpl]
        """
        return self._asset_assignment_rules

    @asset_assignment_rules.setter
    def asset_assignment_rules(self, asset_assignment_rules):
        """Sets the asset_assignment_rules of this JsonWorkflowDefinitionImpl.

        The list of asset assignment rules  # noqa: E501

        :param asset_assignment_rules: The asset_assignment_rules of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonAssetAssignmentRuleImpl]
        """

        self._asset_assignment_rules = asset_assignment_rules

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

        The type of business item that the workflow can refer to. This could be either Community, Domain, Asset, or global  # noqa: E501

        :return: The business_item_resource_type of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: JsonWorkflowBusinessItemType
        """
        return self._business_item_resource_type

    @business_item_resource_type.setter
    def business_item_resource_type(self, business_item_resource_type):
        """Sets the business_item_resource_type of this JsonWorkflowDefinitionImpl.

        The type of business item that the workflow can refer to. This could be either Community, Domain, Asset, or global  # noqa: E501

        :param business_item_resource_type: The business_item_resource_type of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: JsonWorkflowBusinessItemType
        """

        self._business_item_resource_type = business_item_resource_type

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

        The exclusivity of this workflow. This determines how many times a workflow can be started for a specific resource  # noqa: E501

        :return: The exclusivity of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: JsonWorkflowExclusivity
        """
        return self._exclusivity

    @exclusivity.setter
    def exclusivity(self, exclusivity):
        """Sets the exclusivity of this JsonWorkflowDefinitionImpl.

        The exclusivity of this workflow. This determines how many times a workflow can be started for a specific resource  # noqa: E501

        :param exclusivity: The exclusivity of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: JsonWorkflowExclusivity
        """

        self._exclusivity = exclusivity

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

        Whether this workflow definition is guest user accessible  # noqa: E501

        :return: The guest_user_accessible of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._guest_user_accessible

    @guest_user_accessible.setter
    def guest_user_accessible(self, guest_user_accessible):
        """Sets the guest_user_accessible of this JsonWorkflowDefinitionImpl.

        Whether this workflow definition is guest user accessible  # noqa: E501

        :param guest_user_accessible: The guest_user_accessible of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._guest_user_accessible = guest_user_accessible

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

        Whether the workflow definition is accessible by any registered user  # noqa: E501

        :return: The registered_user_accessible of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._registered_user_accessible

    @registered_user_accessible.setter
    def registered_user_accessible(self, registered_user_accessible):
        """Sets the registered_user_accessible of this JsonWorkflowDefinitionImpl.

        Whether the workflow definition is accessible by any registered user  # noqa: E501

        :param registered_user_accessible: The registered_user_accessible of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._registered_user_accessible = registered_user_accessible

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

        Whether the candidate user check for this workflow is enabled  # noqa: E501

        :return: The candidate_user_check_enabled of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: bool
        """
        return self._candidate_user_check_enabled

    @candidate_user_check_enabled.setter
    def candidate_user_check_enabled(self, candidate_user_check_enabled):
        """Sets the candidate_user_check_enabled of this JsonWorkflowDefinitionImpl.

        Whether the candidate user check for this workflow is enabled  # noqa: E501

        :param candidate_user_check_enabled: The candidate_user_check_enabled of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: bool
        """

        self._candidate_user_check_enabled = candidate_user_check_enabled

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

        The start events in a list of WorkflowStartEventType enums  # noqa: E501

        :return: The start_events of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonWorkflowStartEventType]
        """
        return self._start_events

    @start_events.setter
    def start_events(self, start_events):
        """Sets the start_events of this JsonWorkflowDefinitionImpl.

        The start events in a list of WorkflowStartEventType enums  # noqa: E501

        :param start_events: The start_events of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonWorkflowStartEventType]
        """

        self._start_events = start_events

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

        The map of configuration variable key-value pairs  # noqa: E501

        :return: The configuration_variables of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._configuration_variables

    @configuration_variables.setter
    def configuration_variables(self, configuration_variables):
        """Sets the configuration_variables of this JsonWorkflowDefinitionImpl.

        The map of configuration variable key-value pairs  # noqa: E501

        :param configuration_variables: The configuration_variables of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: dict(str, str)
        """

        self._configuration_variables = configuration_variables

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

        The roles allowed to start the process  # noqa: E501

        :return: The start_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonRoleImpl]
        """
        return self._start_roles

    @start_roles.setter
    def start_roles(self, start_roles):
        """Sets the start_roles of this JsonWorkflowDefinitionImpl.

        The roles allowed to start the process  # noqa: E501

        :param start_roles: The start_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonRoleImpl]
        """

        self._start_roles = start_roles

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

        The roles allowed to stop processes/tasks  # noqa: E501

        :return: The stop_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonRoleImpl]
        """
        return self._stop_roles

    @stop_roles.setter
    def stop_roles(self, stop_roles):
        """Sets the stop_roles of this JsonWorkflowDefinitionImpl.

        The roles allowed to stop processes/tasks  # noqa: E501

        :param stop_roles: The stop_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonRoleImpl]
        """

        self._stop_roles = stop_roles

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

        The roles allowed to reassign tasks  # noqa: E501

        :return: The reassign_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :rtype: list[JsonRoleImpl]
        """
        return self._reassign_roles

    @reassign_roles.setter
    def reassign_roles(self, reassign_roles):
        """Sets the reassign_roles of this JsonWorkflowDefinitionImpl.

        The roles allowed to reassign tasks  # noqa: E501

        :param reassign_roles: The reassign_roles of this JsonWorkflowDefinitionImpl.  # noqa: E501
        :type: list[JsonRoleImpl]
        """

        self._reassign_roles = reassign_roles

    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

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

        return self.__dict__ == other.__dict__

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