# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .motion_comment import MotionComment


class MotionTask(UniversalBaseModel):
    """
    Motion Task object - supports DELETE operation
    """

    name: str = pydantic.Field()
    """
    Task name/title
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Task description (supports Markdown)
    """

    status: typing.Optional[str] = pydantic.Field(default=None)
    """
    Task status (e.g., 'TODO', 'IN_PROGRESS', 'COMPLETED')
    """

    priority: typing.Optional[str] = pydantic.Field(default=None)
    """
    Task priority: ASAP, HIGH, MEDIUM, or LOW
    """

    due_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    Due date in ISO 8601 format
    """

    duration: typing.Optional[int] = pydantic.Field(default=None)
    """
    Estimated duration in minutes
    """

    labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Task labels for categorization
    """

    comments: typing.Optional[typing.List[MotionComment]] = pydantic.Field(default=None)
    """
    Comments on this task
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
