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

import datetime as dt
import typing

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


class AgentTaskTracker(UniversalBaseModel):
    agent_id: str = pydantic.Field()
    """
    The UUID of the agent
    """

    created_at: dt.datetime = pydantic.Field()
    """
    When the agent task tracker was created
    """

    id: str = pydantic.Field()
    """
    The UUID of the agent task tracker
    """

    last_processed_event_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The last processed event ID
    """

    status: typing.Optional[str] = pydantic.Field(default=None)
    """
    Processing status
    """

    status_reason: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional status reason
    """

    task_id: str = pydantic.Field()
    """
    The UUID of the task
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    When the agent task tracker was last updated
    """

    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
