"""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

from .imagedata import ImageData, ImageDataTypedDict


class ImageContentTypedDict(TypedDict):
    image_url: ImageDataTypedDict
    type: Literal["image_url"]
    r"""The type of the message content."""


class ImageContent(BaseModel):
    image_url: ImageData

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