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

import typing

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


class ImageData(UniversalBaseModel):
    """
    An object containing an image's binary data and format information. The image data is provided as a Base64-encoded string along with its MIME type.
    """

    data: str = pydantic.Field()
    """
    Base64-encoded representation of the image data.
    """

    mime_type: str = pydantic.Field()
    """
    The MIME type of the image, indicating the format of the binary data (e.g., image/jpeg for JPEG images).
    """

    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
