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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .text_content_part_text import TextContentPartText


class TextContentPart(UniversalBaseModel):
    """
    Text content for the message
    """

    type: typing.Literal["text"] = pydantic.Field(default="text")
    """
    Type of the content part
    """

    text: TextContentPartText = pydantic.Field()
    """
    Text content for the message
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
