# 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 FileResponse(UniversalBaseModel):
    """
    Response schema for file metadata.
    """

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

    original_filename: str
    file_size: int
    mime_type: str
    storage_path: str
    organization_id: str
    uploaded_by: typing.Optional[str] = None
    uploaded_by_api_key_id: typing.Optional[str] = None
    uploaded_at: dt.datetime

    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
