# 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 CloudDocumentCreate(UniversalBaseModel):
    """
    Create a new cloud document.
    """

    text: str
    metadata: typing.Dict[str, typing.Optional[typing.Any]]
    excluded_embed_metadata_keys: typing.Optional[typing.List[str]] = None
    excluded_llm_metadata_keys: typing.Optional[typing.List[str]] = None
    page_positions: typing.Optional[typing.List[int]] = pydantic.Field(default=None)
    """
    indices in the CloudDocument.text where a new page begins. e.g. Second page starts at index specified by page_positions[1].
    """

    id: typing.Optional[str] = None

    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
