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

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


class DocumentStorageUsage(UniversalBaseModel):
    """
    How much storage the document used. This information is currently not returned when
    retrieving the document, and only returned when indexing a document.
    """

    bytes_used: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of bytes used by document counting towards maximum corpus size, and
    towards any billing plans.
    """

    metadata_bytes_used: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of metadata bytes used by a document.
    """

    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
