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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class TaskProposal(UniversalBaseModel):
    """
    A task proposal produced by the AI agent (langgraph-agent propose_tasks tool). Subset of Task fields plus agent-specific metadata.
    """

    text: str
    start_date: typing_extensions.Annotated[
        dt.datetime, FieldMetadata(alias="startDate"), pydantic.Field(alias="startDate")
    ]
    end_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="endDate"), pydantic.Field(alias="endDate")]
    assigned_to: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="assignedTo"), pydantic.Field(alias="assignedTo")
    ] = None
    attached_files: typing_extensions.Annotated[
        typing.Optional[typing.List[str]], FieldMetadata(alias="attachedFiles"), pydantic.Field(alias="attachedFiles")
    ] = None
    details: typing.Optional[str] = None
    location: typing.Optional[str] = None
    trade: typing.Optional[str] = None
    priority: typing.Optional[str] = None
    task_type: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="taskType"), pydantic.Field(alias="taskType")
    ] = None

    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
