# 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 CorpusLimits(UniversalBaseModel):
    used_docs: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of documents contained in the corpus.
    """

    used_parts: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of document parts contained in the corpus.
    """

    used_bytes: typing.Optional[int] = pydantic.Field(default=None)
    """
    NOTE: This field is currently not populated by the system.
    The number of bytes contained in the corpus. This includes the document metadata,
    document part metadata, and document contents.
    """

    used_characters: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of characters contained in the corpus. This includes the document metadata,
    document part metadata, and document contents.
    """

    max_bytes: typing.Optional[int] = pydantic.Field(default=None)
    """
    NOTE: This field is currently not populated by the system.
    The maximum number of bytes the corpus can be.
    """

    max_metadata_bytes: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum size that metadata can be on documents.
    """

    index_rate: typing.Optional[int] = pydantic.Field(default=None)
    """
    NOTE: This field is currently not populated by the system.
    The maximum per-second addition of new documents to corpus.
    """

    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
