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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .open_ai_session_config import OpenAiSessionConfig
from .realtime_config_snapshot_parents import RealtimeConfigSnapshotParents
from .safety_common_model_output import SafetyCommonModelOutput


class RealtimeConfigSnapshot(UncheckedBaseModel):
    id: typing_extensions.Annotated[str, FieldMetadata(alias="_id"), pydantic.Field(alias="_id")]
    workspace_id: str
    conversation_id: str
    seq_no: int
    time_in_call_secs: int
    time_committed_secs: int
    source_event_id: typing.Optional[int] = None
    parents: RealtimeConfigSnapshotParents
    session_config: OpenAiSessionConfig
    safety: SafetyCommonModelOutput
    changed_paths: typing.Optional[typing.List[str]] = 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
