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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .conversation_history_analysis_common_model import ConversationHistoryAnalysisCommonModel
from .conversation_history_metadata_common_model import ConversationHistoryMetadataCommonModel
from .conversation_history_transcript_response_model import ConversationHistoryTranscriptResponseModel
from .conversation_initiation_client_data_request_output import ConversationInitiationClientDataRequestOutput
from .get_conversation_response_model_status import GetConversationResponseModelStatus
from .visited_agent_ref import VisitedAgentRef


class GetConversationResponseModel(UncheckedBaseModel):
    agent_id: str
    agent_name: typing.Optional[str] = None
    conversation_product: typing.Optional[str] = None
    status: GetConversationResponseModelStatus
    user_id: typing.Optional[str] = None
    branch_id: typing.Optional[str] = None
    version_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the agent version used for this conversation
    """

    metadata: ConversationHistoryMetadataCommonModel
    analysis: typing.Optional[ConversationHistoryAnalysisCommonModel] = None
    visited_agents: typing.Optional[typing.List[VisitedAgentRef]] = None
    conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestOutput] = None
    environment: typing.Optional[str] = None
    conversation_id: str
    has_audio: bool
    has_user_audio: bool
    has_response_audio: bool
    has_auxiliary_audio: bool
    transcript: typing.List[ConversationHistoryTranscriptResponseModel]
    tag_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Conversation tag ids assigned to this conversation.
    """

    otlp_traces: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    OpenTelemetry trace payload when the request uses format=opentelemetry; otherwise omitted.
    """

    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


update_forward_refs(GetConversationResponseModel)
