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

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


class PageFigureMetadata(UniversalBaseModel):
    figure_name: str = pydantic.Field()
    """
    The name of the figure
    """

    file_id: str = pydantic.Field()
    """
    The ID of the file that the figure was taken from
    """

    page_index: int = pydantic.Field()
    """
    The index of the page for which the figure is taken (0-indexed)
    """

    figure_size: int = pydantic.Field()
    """
    The size of the figure in bytes
    """

    is_likely_noise: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the figure is likely to be noise
    """

    confidence: float = pydantic.Field()
    """
    The confidence of the figure
    """

    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
