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

from ...core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
from .response_config import ResponseConfig
from ...core.serialization import FieldMetadata
import pydantic
import datetime as dt
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ConversationBase(UniversalBaseModel):
    response_config: typing_extensions.Annotated[
        typing.Optional[ResponseConfig], FieldMetadata(alias="responseConfig")
    ] = pydantic.Field(default=None)
    """
    Optional configurations for responses to this conversation
    """

    subject: typing.Optional[str] = pydantic.Field(default=None)
    """
    The subject of the conversation
    """

    url: typing.Optional[str] = pydantic.Field(default=None)
    """
    The url of the conversation
    """

    created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = (
        pydantic.Field(default=None)
    )
    """
    The date and time the conversation was created
    """

    updated_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt")] = (
        pydantic.Field(default=None)
    )
    """
    The date and time the conversation was last updated
    """

    tags: typing.Optional[typing.Set[str]] = pydantic.Field(default=None)
    """
    The tags of the conversation. Used for filtering in Agent Designer.
    """

    metadata: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    The metadata 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
