# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


class ResponsePipelineStep(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'created_dt': 'datetime',
        'description': 'str',
        'emit_variables': 'list[str]',
        'external_service_spec': 'ResponsePipelineStepExternalService',
        'fail_spec': 'object',
        'id': 'int',
        'if_spec': 'ResponsePipelineStepIf',
        'input_variables': 'list[V1VariableReference]',
        'manual_input_spec': 'ResponsePipelineStepManualInput',
        'manual_judgment_spec': 'ResponsePipelineStepManualJudgment',
        'notification_spec': 'ResponsePipelineStepNotification',
        'run_spec': 'ResponsePipelineStepRun',
        'step_key': 'str',
        'title': 'str',
        'trigger_dispatch_spec': 'ResponsePipelineStepTriggerDispatch',
        'type': 'str'
    }

    attribute_map = {
        'created_dt': 'created_dt',
        'description': 'description',
        'emit_variables': 'emit_variables',
        'external_service_spec': 'external_service_spec',
        'fail_spec': 'fail_spec',
        'id': 'id',
        'if_spec': 'if_spec',
        'input_variables': 'input_variables',
        'manual_input_spec': 'manual_input_spec',
        'manual_judgment_spec': 'manual_judgment_spec',
        'notification_spec': 'notification_spec',
        'run_spec': 'run_spec',
        'step_key': 'step_key',
        'title': 'title',
        'trigger_dispatch_spec': 'trigger_dispatch_spec',
        'type': 'type'
    }

    def __init__(self, created_dt=None, description=None, emit_variables=None, external_service_spec=None, fail_spec=None, id=None, if_spec=None, input_variables=None, manual_input_spec=None, manual_judgment_spec=None, notification_spec=None, run_spec=None, step_key=None, title=None, trigger_dispatch_spec=None, type=None, local_vars_configuration=None):  # noqa: E501
        """ResponsePipelineStep - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._created_dt = None
        self._description = None
        self._emit_variables = None
        self._external_service_spec = None
        self._fail_spec = None
        self._id = None
        self._if_spec = None
        self._input_variables = None
        self._manual_input_spec = None
        self._manual_judgment_spec = None
        self._notification_spec = None
        self._run_spec = None
        self._step_key = None
        self._title = None
        self._trigger_dispatch_spec = None
        self._type = None
        self.discriminator = None

        self.created_dt = created_dt
        if description is not None:
            self.description = description
        self.emit_variables = emit_variables
        if external_service_spec is not None:
            self.external_service_spec = external_service_spec
        if fail_spec is not None:
            self.fail_spec = fail_spec
        self.id = id
        if if_spec is not None:
            self.if_spec = if_spec
        self.input_variables = input_variables
        if manual_input_spec is not None:
            self.manual_input_spec = manual_input_spec
        if manual_judgment_spec is not None:
            self.manual_judgment_spec = manual_judgment_spec
        if notification_spec is not None:
            self.notification_spec = notification_spec
        if run_spec is not None:
            self.run_spec = run_spec
        self.step_key = step_key
        self.title = title
        if trigger_dispatch_spec is not None:
            self.trigger_dispatch_spec = trigger_dispatch_spec
        if type is not None:
            self.type = type

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


        :return: The created_dt of this ResponsePipelineStep.  # noqa: E501
        :rtype: datetime
        """
        return self._created_dt

    @created_dt.setter
    def created_dt(self, created_dt):
        """Sets the created_dt of this ResponsePipelineStep.


        :param created_dt: The created_dt of this ResponsePipelineStep.  # noqa: E501
        :type created_dt: datetime
        """
        if self.local_vars_configuration.client_side_validation and created_dt is None:  # noqa: E501
            raise ValueError("Invalid value for `created_dt`, must not be `None`")  # noqa: E501

        self._created_dt = created_dt

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


        :return: The description of this ResponsePipelineStep.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ResponsePipelineStep.


        :param description: The description of this ResponsePipelineStep.  # noqa: E501
        :type description: str
        """

        self._description = description

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


        :return: The emit_variables of this ResponsePipelineStep.  # noqa: E501
        :rtype: list[str]
        """
        return self._emit_variables

    @emit_variables.setter
    def emit_variables(self, emit_variables):
        """Sets the emit_variables of this ResponsePipelineStep.


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

        self._emit_variables = emit_variables

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


        :return: The external_service_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepExternalService
        """
        return self._external_service_spec

    @external_service_spec.setter
    def external_service_spec(self, external_service_spec):
        """Sets the external_service_spec of this ResponsePipelineStep.


        :param external_service_spec: The external_service_spec of this ResponsePipelineStep.  # noqa: E501
        :type external_service_spec: ResponsePipelineStepExternalService
        """

        self._external_service_spec = external_service_spec

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


        :return: The fail_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: object
        """
        return self._fail_spec

    @fail_spec.setter
    def fail_spec(self, fail_spec):
        """Sets the fail_spec of this ResponsePipelineStep.


        :param fail_spec: The fail_spec of this ResponsePipelineStep.  # noqa: E501
        :type fail_spec: object
        """

        self._fail_spec = fail_spec

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


        :return: The id of this ResponsePipelineStep.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this ResponsePipelineStep.  # noqa: E501
        :type id: int
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


        :return: The if_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepIf
        """
        return self._if_spec

    @if_spec.setter
    def if_spec(self, if_spec):
        """Sets the if_spec of this ResponsePipelineStep.


        :param if_spec: The if_spec of this ResponsePipelineStep.  # noqa: E501
        :type if_spec: ResponsePipelineStepIf
        """

        self._if_spec = if_spec

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


        :return: The input_variables of this ResponsePipelineStep.  # noqa: E501
        :rtype: list[V1VariableReference]
        """
        return self._input_variables

    @input_variables.setter
    def input_variables(self, input_variables):
        """Sets the input_variables of this ResponsePipelineStep.


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

        self._input_variables = input_variables

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


        :return: The manual_input_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepManualInput
        """
        return self._manual_input_spec

    @manual_input_spec.setter
    def manual_input_spec(self, manual_input_spec):
        """Sets the manual_input_spec of this ResponsePipelineStep.


        :param manual_input_spec: The manual_input_spec of this ResponsePipelineStep.  # noqa: E501
        :type manual_input_spec: ResponsePipelineStepManualInput
        """

        self._manual_input_spec = manual_input_spec

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


        :return: The manual_judgment_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepManualJudgment
        """
        return self._manual_judgment_spec

    @manual_judgment_spec.setter
    def manual_judgment_spec(self, manual_judgment_spec):
        """Sets the manual_judgment_spec of this ResponsePipelineStep.


        :param manual_judgment_spec: The manual_judgment_spec of this ResponsePipelineStep.  # noqa: E501
        :type manual_judgment_spec: ResponsePipelineStepManualJudgment
        """

        self._manual_judgment_spec = manual_judgment_spec

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


        :return: The notification_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepNotification
        """
        return self._notification_spec

    @notification_spec.setter
    def notification_spec(self, notification_spec):
        """Sets the notification_spec of this ResponsePipelineStep.


        :param notification_spec: The notification_spec of this ResponsePipelineStep.  # noqa: E501
        :type notification_spec: ResponsePipelineStepNotification
        """

        self._notification_spec = notification_spec

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


        :return: The run_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepRun
        """
        return self._run_spec

    @run_spec.setter
    def run_spec(self, run_spec):
        """Sets the run_spec of this ResponsePipelineStep.


        :param run_spec: The run_spec of this ResponsePipelineStep.  # noqa: E501
        :type run_spec: ResponsePipelineStepRun
        """

        self._run_spec = run_spec

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


        :return: The step_key of this ResponsePipelineStep.  # noqa: E501
        :rtype: str
        """
        return self._step_key

    @step_key.setter
    def step_key(self, step_key):
        """Sets the step_key of this ResponsePipelineStep.


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

        self._step_key = step_key

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


        :return: The title of this ResponsePipelineStep.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this ResponsePipelineStep.


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

        self._title = title

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


        :return: The trigger_dispatch_spec of this ResponsePipelineStep.  # noqa: E501
        :rtype: ResponsePipelineStepTriggerDispatch
        """
        return self._trigger_dispatch_spec

    @trigger_dispatch_spec.setter
    def trigger_dispatch_spec(self, trigger_dispatch_spec):
        """Sets the trigger_dispatch_spec of this ResponsePipelineStep.


        :param trigger_dispatch_spec: The trigger_dispatch_spec of this ResponsePipelineStep.  # noqa: E501
        :type trigger_dispatch_spec: ResponsePipelineStepTriggerDispatch
        """

        self._trigger_dispatch_spec = trigger_dispatch_spec

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


        :return: The type of this ResponsePipelineStep.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ResponsePipelineStep.


        :param type: The type of this ResponsePipelineStep.  # noqa: E501
        :type type: str
        """
        allowed_values = ["v1/run", "v1/manual_input", "v1/manual_judgment", "v1/if", "v1/fail", "v1/notification", "v1/external_service", "v1/trigger_dispatch"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ResponsePipelineStep):
            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, ResponsePipelineStep):
            return True

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