# 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 SessionResponse(UniversalBaseModel):
    """
    Response schema for bot session.
    """

    session_id: str
    organization_id: str
    user_id: str
    meeting_link: str
    platform: str
    bot_name: str
    status: str
    transcription_enabled: bool
    transcription_language: str
    debug_mode: bool
    created_at: dt.datetime
    updated_at: dt.datetime
    join_timestamp: typing.Optional[dt.datetime] = None
    leave_timestamp: typing.Optional[dt.datetime] = None
    total_duration_seconds: typing.Optional[float] = None
    segment_count: typing.Optional[int] = None
    audio_file_count: typing.Optional[int] = None
    video_file_count: typing.Optional[int] = None
    total_size_bytes: typing.Optional[int] = None
    output_directory: typing.Optional[str] = None
    error_message: typing.Optional[str] = None
    error_code: typing.Optional[str] = None
    metadata: typing.Dict[str, typing.Any]
    current_participants: typing.Optional[typing.Dict[str, typing.Any]] = None
    participant_history: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
    audio_status: typing.Optional[str] = None
    transcription_status: typing.Optional[str] = None
    recording_status: typing.Optional[str] = None
    bot_id: typing.Optional[str] = None
    external_meeting_id: typing.Optional[int] = None
    transcription_source: typing.Optional[str] = None
    speaker_labels: typing.Optional[typing.Dict[str, str]] = None
    voice_agent_enabled: typing.Optional[bool] = None
    voice_profile_id: typing.Optional[str] = None
    visibility: typing.Optional[str] = None
    shared_department_ids: typing.Optional[typing.List[str]] = None
    has_recording: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether a recording file is available for download.
    """

    is_post_fixed: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether transcripts were recovered from a recording (not live).
    """

    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
