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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel


class FileContentsPagesItem(UncheckedBaseModel):
    page_number: typing_extensions.Annotated[int, FieldMetadata(alias="pageNumber")] = pydantic.Field(
        alias="pageNumber"
    )
    """
    The page number of this page in the document.
    """

    page_height: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="pageHeight")] = (
        pydantic.Field(alias="pageHeight", default=None)
    )
    """
    The height of the page in points. Available for PDF and IMG file types.
    """

    page_width: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="pageWidth")] = pydantic.Field(
        alias="pageWidth", default=None
    )
    """
    The width of the page in points. Available for PDF and IMG file types.
    """

    markdown: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cleaned and structured markdown content of this page. Available for PDF and IMG file types when the `markdown` query parameter is set to true.
    """

    html: typing.Optional[str] = pydantic.Field(default=None)
    """
    HTML content of the page. Available for DOCX file types when the `html` query parameter is set to true.
    """

    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
