"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations

from typing import Literal

import pydantic
from pydantic.functional_validators import AfterValidator
from typing_extensions import Annotated, TypedDict

from friendli.types import BaseModel
from friendli.utils import validate_const


class TextContentTypedDict(TypedDict):
    text: str
    r"""The text content of the message."""
    type: Literal["text"]
    r"""The type of the message content."""


class TextContent(BaseModel):
    text: str
    r"""The text content of the message."""

    TYPE: Annotated[
        Annotated[Literal["text"], AfterValidator(validate_const("text"))],
        pydantic.Field(alias="type"),
    ] = "text"
    r"""The type of the message content."""
