# 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 StoreFileListItem(UniversalBaseModel):
    """
    File item in list response with processing details.
    """

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

    name: str = pydantic.Field()
    """
    Original filename
    """

    size: int = pydantic.Field()
    """
    File size in bytes
    """

    mime_type: str = pydantic.Field()
    """
    File MIME type
    """

    relative_path: typing.Optional[str] = pydantic.Field(default=None)
    """
    Relative path within the store
    """

    status: str = pydantic.Field()
    """
    Current processing status
    """

    progress_percent: typing.Optional[int] = pydantic.Field(default=None)
    """
    Estimated progress percentage
    """

    current_step: typing.Optional[str] = pydantic.Field(default=None)
    """
    Current processing step
    """

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

    created_at: dt.datetime = pydantic.Field()
    """
    Upload timestamp
    """

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

    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
