# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from swagger_server.models.base_model_ import Model
from swagger_server import util


class Task(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, task_id: str=None, status: str=None, deadline: datetime=None, description: str=None, users: List[str]=None):  # noqa: E501
        """Task - a model defined in Swagger

        :param task_id: The task_id of this Task.  # noqa: E501
        :type task_id: str
        :param status: The status of this Task.  # noqa: E501
        :type status: str
        :param deadline: The deadline of this Task.  # noqa: E501
        :type deadline: datetime
        :param description: The description of this Task.  # noqa: E501
        :type description: str
        :param users: The users of this Task.  # noqa: E501
        :type users: List[str]
        """
        self.swagger_types = {
            'task_id': str,
            'status': str,
            'deadline': datetime,
            'description': str,
            'users': List[str]
        }

        self.attribute_map = {
            'task_id': 'task_id',
            'status': 'status',
            'deadline': 'deadline',
            'description': 'description',
            'users': 'users'
        }

        self._task_id = task_id
        self._status = status
        self._deadline = deadline
        self._description = description
        self._users = users

    @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 task_id(self) -> str:
        """Gets the task_id of this Task.


        :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.


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

        self._task_id = task_id

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


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

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


        :param status: The status of this Task.
        :type status: str
        """
        allowed_values = ["pending", "ongoing", "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 deadline(self) -> datetime:
        """Gets the deadline of this Task.


        :return: The deadline of this Task.
        :rtype: datetime
        """
        return self._deadline

    @deadline.setter
    def deadline(self, deadline: datetime):
        """Sets the deadline of this Task.


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

        self._deadline = deadline

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


        :return: The description of this Task.
        :rtype: str
        """
        return self._description

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


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

        self._description = description

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


        :return: The users of this Task.
        :rtype: List[str]
        """
        return self._users

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


        :param users: The users of this Task.
        :type users: List[str]
        """

        self._users = users
