"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from datetime import datetime
from mistralai.types import BaseModel
from mistralai.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class AgentHandoffDoneEventTypedDict(TypedDict):
    id: str
    next_agent_id: str
    next_agent_name: str
    type: Literal["agent.handoff.done"]
    created_at: NotRequired[datetime]
    output_index: NotRequired[int]


class AgentHandoffDoneEvent(BaseModel):
    id: str

    next_agent_id: str

    next_agent_name: str

    type: Annotated[
        Annotated[
            Optional[Literal["agent.handoff.done"]],
            AfterValidator(validate_const("agent.handoff.done")),
        ],
        pydantic.Field(alias="type"),
    ] = "agent.handoff.done"

    created_at: Optional[datetime] = None

    output_index: Optional[int] = 0
