# 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 VoiceAgentStatusResponse(UniversalBaseModel):
    """
    Response schema for voice agent status.
    """

    enabled: bool
    state: str = pydantic.Field()
    """
    listening | thinking | speaking | muted | stopped
    """

    current_emotion: typing.Optional[str] = None
    total_responses: typing.Optional[int] = None
    total_interruptions: typing.Optional[int] = None
    last_response_at: typing.Optional[dt.datetime] = None
    avg_response_latency_ms: typing.Optional[float] = None
    total_speaking_duration_seconds: typing.Optional[float] = None
    trigger_stats: typing.Optional[typing.Dict[str, int]] = 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
