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.base_model import Model
from timestep.api.ap.v1.models.pagination import Pagination  # noqa: E501
from timestep.api.ap.v1.models.task import Task  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, tasks=None, pagination=None):  # noqa: E501
        """TaskListResponse - a model defined in OpenAPI

        :param tasks: The tasks of this TaskListResponse.  # noqa: E501
        :type tasks: List[Task]
        :param pagination: The pagination of this TaskListResponse.  # noqa: E501
        :type pagination: Pagination
        """
        self.openapi_types = {"tasks": List[Task], "pagination": Pagination}

        self.attribute_map = {"tasks": "tasks", "pagination": "pagination"}

        self._tasks = tasks
        self._pagination = pagination

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

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

    @property
    def tasks(self) -> List[Task]:
        """Gets the tasks of this TaskListResponse.


        :return: The tasks of this TaskListResponse.
        :rtype: List[Task]
        """
        return self._tasks

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


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

        self._tasks = tasks

    @property
    def pagination(self) -> Pagination:
        """Gets the pagination of this TaskListResponse.


        :return: The pagination of this TaskListResponse.
        :rtype: Pagination
        """
        return self._pagination

    @pagination.setter
    def pagination(self, pagination: Pagination):
        """Sets the pagination of this TaskListResponse.


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

        self._pagination = pagination
