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

from .conversation_base import ConversationBase
import typing_extensions
from ...commons.types.entity_id import EntityId
from ...core.serialization import FieldMetadata
import pydantic
import typing
from .conversation_message_response import ConversationMessageResponse
from .conversation_analysis import ConversationAnalysis
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ConversationResponse(ConversationBase):
    conversation_id: typing_extensions.Annotated[EntityId, FieldMetadata(alias="conversationId")] = pydantic.Field()
    """
    The ID that uniquely identifies this conversation
    """

    messages: typing.List[ConversationMessageResponse] = pydantic.Field()
    """
    The messages in the conversation
    """

    analysis: ConversationAnalysis = pydantic.Field()
    """
    An analysis of the conversation.
    """

    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
