from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.ap.v1 import util
from timestep.api.ap.v1.models.artifact import Artifact  # noqa: E501
from timestep.api.ap.v1.models.base_model import Model


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

    Do not edit the class manually.
    """

    def __init__(
        self,
        input=None,
        additional_input=None,
        task_id=None,
        step_id=None,
        name=None,
        status=None,
        output=None,
        additional_output=None,
        artifacts=[],
        is_last=False,
    ):  # noqa: E501
        """Step - a model defined in OpenAPI

        :param input: The input of this Step.  # noqa: E501
        :type input: str
        :param additional_input: The additional_input of this Step.  # noqa: E501
        :type additional_input: object
        :param task_id: The task_id of this Step.  # noqa: E501
        :type task_id: str
        :param step_id: The step_id of this Step.  # noqa: E501
        :type step_id: str
        :param name: The name of this Step.  # noqa: E501
        :type name: str
        :param status: The status of this Step.  # noqa: E501
        :type status: str
        :param output: The output of this Step.  # noqa: E501
        :type output: str
        :param additional_output: The additional_output of this Step.  # noqa: E501
        :type additional_output: object
        :param artifacts: The artifacts of this Step.  # noqa: E501
        :type artifacts: List[Artifact]
        :param is_last: The is_last of this Step.  # noqa: E501
        :type is_last: bool
        """
        self.openapi_types = {
            "input": str,
            "additional_input": object,
            "task_id": str,
            "step_id": str,
            "name": str,
            "status": str,
            "output": str,
            "additional_output": object,
            "artifacts": List[Artifact],
            "is_last": bool,
        }

        self.attribute_map = {
            "input": "input",
            "additional_input": "additional_input",
            "task_id": "task_id",
            "step_id": "step_id",
            "name": "name",
            "status": "status",
            "output": "output",
            "additional_output": "additional_output",
            "artifacts": "artifacts",
            "is_last": "is_last",
        }

        self._input = input
        self._additional_input = additional_input
        self._task_id = task_id
        self._step_id = step_id
        self._name = name
        self._status = status
        self._output = output
        self._additional_output = additional_output
        self._artifacts = artifacts
        self._is_last = is_last

    @classmethod
    def from_dict(cls, dikt) -> "Step":
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Step of this Step.  # noqa: E501
        :rtype: Step
        """
        return util.deserialize_model(dikt, cls)

    @property
    def input(self) -> str:
        """Gets the input of this Step.

        Input prompt for the step.  # noqa: E501

        :return: The input of this Step.
        :rtype: str
        """
        return self._input

    @input.setter
    def input(self, input: str):
        """Sets the input of this Step.

        Input prompt for the step.  # noqa: E501

        :param input: The input of this Step.
        :type input: str
        """

        self._input = input

    @property
    def additional_input(self) -> object:
        """Gets the additional_input of this Step.

        Input parameters for the task step. Any value is allowed.  # noqa: E501

        :return: The additional_input of this Step.
        :rtype: object
        """
        return self._additional_input

    @additional_input.setter
    def additional_input(self, additional_input: object):
        """Sets the additional_input of this Step.

        Input parameters for the task step. Any value is allowed.  # noqa: E501

        :param additional_input: The additional_input of this Step.
        :type additional_input: object
        """

        self._additional_input = additional_input

    @property
    def task_id(self) -> str:
        """Gets the task_id of this Step.

        The ID of the task this step belongs to.  # noqa: E501

        :return: The task_id of this Step.
        :rtype: str
        """
        return self._task_id

    @task_id.setter
    def task_id(self, task_id: str):
        """Sets the task_id of this Step.

        The ID of the task this step belongs to.  # noqa: E501

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

        self._task_id = task_id

    @property
    def step_id(self) -> str:
        """Gets the step_id of this Step.

        The ID of the task step.  # noqa: E501

        :return: The step_id of this Step.
        :rtype: str
        """
        return self._step_id

    @step_id.setter
    def step_id(self, step_id: str):
        """Sets the step_id of this Step.

        The ID of the task step.  # noqa: E501

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

        self._step_id = step_id

    @property
    def name(self) -> str:
        """Gets the name of this Step.

        The name of the task step.  # noqa: E501

        :return: The name of this Step.
        :rtype: str
        """
        return self._name

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

        The name of the task step.  # noqa: E501

        :param name: The name of this Step.
        :type name: str
        """

        self._name = name

    @property
    def status(self) -> str:
        """Gets the status of this Step.

        The status of the task step.  # noqa: E501

        :return: The status of this Step.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status: str):
        """Sets the status of this Step.

        The status of the task step.  # noqa: E501

        :param status: The status of this Step.
        :type status: str
        """
        allowed_values = ["created", "running", "completed"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}".format(
                    status, allowed_values
                )
            )

        self._status = status

    @property
    def output(self) -> str:
        """Gets the output of this Step.

        Output of the task step.  # noqa: E501

        :return: The output of this Step.
        :rtype: str
        """
        return self._output

    @output.setter
    def output(self, output: str):
        """Sets the output of this Step.

        Output of the task step.  # noqa: E501

        :param output: The output of this Step.
        :type output: str
        """

        self._output = output

    @property
    def additional_output(self) -> object:
        """Gets the additional_output of this Step.

        Output that the task step has produced. Any value is allowed.  # noqa: E501

        :return: The additional_output of this Step.
        :rtype: object
        """
        return self._additional_output

    @additional_output.setter
    def additional_output(self, additional_output: object):
        """Sets the additional_output of this Step.

        Output that the task step has produced. Any value is allowed.  # noqa: E501

        :param additional_output: The additional_output of this Step.
        :type additional_output: object
        """

        self._additional_output = additional_output

    @property
    def artifacts(self) -> List[Artifact]:
        """Gets the artifacts of this Step.

        A list of artifacts that the step has produced.  # noqa: E501

        :return: The artifacts of this Step.
        :rtype: List[Artifact]
        """
        return self._artifacts

    @artifacts.setter
    def artifacts(self, artifacts: List[Artifact]):
        """Sets the artifacts of this Step.

        A list of artifacts that the step has produced.  # noqa: E501

        :param artifacts: The artifacts of this Step.
        :type artifacts: List[Artifact]
        """
        if artifacts is None:
            raise ValueError(
                "Invalid value for `artifacts`, must not be `None`"
            )  # noqa: E501

        self._artifacts = artifacts

    @property
    def is_last(self) -> bool:
        """Gets the is_last of this Step.

        Whether this is the last step in the task.  # noqa: E501

        :return: The is_last of this Step.
        :rtype: bool
        """
        return self._is_last

    @is_last.setter
    def is_last(self, is_last: bool):
        """Sets the is_last of this Step.

        Whether this is the last step in the task.  # noqa: E501

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

        self._is_last = is_last
