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

import datetime as dt
import typing

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


class AppApiV1SchemasVectorStoreFileProcessingStatusResponse(UniversalBaseModel):
    """
    Response schema for file processing status.
    """

    vector_store_file_id: str = pydantic.Field()
    """
    VectorStoreFile ID (vsf_ prefix)
    """

    file_id: str = pydantic.Field()
    """
    File ID (file_ prefix)
    """

    vector_store_id: str = pydantic.Field()
    """
    Vector store ID
    """

    status: str = pydantic.Field()
    """
    Processing status: pending, processing, completed, failed
    """

    chunk_count: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of chunks created
    """

    embedding_model: typing.Optional[str] = pydantic.Field(default=None)
    """
    Embedding model used
    """

    error_message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Error details if failed
    """

    processing_started_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    When processing started
    """

    processing_completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    When processing completed
    """

    added_at: dt.datetime = pydantic.Field()
    """
    When file was added to vector store
    """

    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
