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 Task(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, artifacts=[]
    ):  # noqa: E501
        """Task - a model defined in OpenAPI

        :param input: The input of this Task.  # noqa: E501
        :type input: str
        :param additional_input: The additional_input of this Task.  # noqa: E501
        :type additional_input: object
        :param task_id: The task_id of this Task.  # noqa: E501
        :type task_id: str
        :param artifacts: The artifacts of this Task.  # noqa: E501
        :type artifacts: List[Artifact]
        """
        self.openapi_types = {
            "input": str,
            "additional_input": object,
            "task_id": str,
            "artifacts": List[Artifact],
        }

        self.attribute_map = {
            "input": "input",
            "additional_input": "additional_input",
            "task_id": "task_id",
            "artifacts": "artifacts",
        }

        self._input = input
        self._additional_input = additional_input
        self._task_id = task_id
        self._artifacts = artifacts

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

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

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

        Input prompt for the task.  # noqa: E501

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

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

        Input prompt for the task.  # noqa: E501

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

        self._input = input

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

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

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

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

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

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

        self._additional_input = additional_input

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

        The ID of the task.  # noqa: E501

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

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

        The ID of the task.  # noqa: E501

        :param task_id: The task_id of this Task.
        :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 artifacts(self) -> List[Artifact]:
        """Gets the artifacts of this Task.

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

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

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

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

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

        self._artifacts = artifacts
