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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .vector_store_file_response import VectorStoreFileResponse


class VectorStoreBase64UploadResponse(UniversalBaseModel):
    """
    Schema for base64 upload response.
    """

    success: bool = pydantic.Field()
    """
    Whether all uploads succeeded
    """

    message: str = pydantic.Field()
    """
    Summary message
    """

    files: typing.List[VectorStoreFileResponse] = pydantic.Field()
    """
    List of uploaded files with processing status
    """

    total_uploaded: int = pydantic.Field()
    """
    Total number of files uploaded
    """

    total_failed: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of files that failed
    """

    errors: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None)
    """
    List of errors for failed uploads
    """

    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
