# 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
from .task_message_content import TaskMessageContent


class Event(UniversalBaseModel):
    agent_id: str = pydantic.Field()
    """
    The UUID of the agent that the event belongs to
    """

    content: typing.Optional[TaskMessageContent] = pydantic.Field(default=None)
    """
    The content of the event
    """

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    The timestamp of the event
    """

    id: str = pydantic.Field()
    """
    The UUID of the event
    """

    sequence_id: int = pydantic.Field()
    """
    The sequence ID of the event
    """

    task_id: str = pydantic.Field()
    """
    The UUID of the task that the event belongs to
    """

    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
