"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from datetime import datetime
from fermisdk.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class DocumentTypedDict(TypedDict):
    id: NotRequired[str]
    file_name: NotRequired[str]
    file_size: NotRequired[int]
    mime_type: NotRequired[str]
    s3_key: NotRequired[str]
    s3_path: NotRequired[str]
    uploaded_at: NotRequired[datetime]


class Document(BaseModel):
    id: Optional[str] = None

    file_name: Annotated[Optional[str], pydantic.Field(alias="fileName")] = None

    file_size: Annotated[Optional[int], pydantic.Field(alias="fileSize")] = None

    mime_type: Annotated[Optional[str], pydantic.Field(alias="mimeType")] = None

    s3_key: Annotated[Optional[str], pydantic.Field(alias="s3Key")] = None

    s3_path: Annotated[Optional[str], pydantic.Field(alias="s3Path")] = None

    uploaded_at: Annotated[Optional[datetime], pydantic.Field(alias="uploadedAt")] = (
        None
    )


class DocumentUploadResponseTypedDict(TypedDict):
    success: NotRequired[bool]
    connection_id: NotRequired[str]
    uploaded_count: NotRequired[int]
    total_documents: NotRequired[int]
    total_size: NotRequired[int]
    documents: NotRequired[List[DocumentTypedDict]]


class DocumentUploadResponse(BaseModel):
    success: Optional[bool] = None

    connection_id: Annotated[Optional[str], pydantic.Field(alias="connectionId")] = None

    uploaded_count: Annotated[Optional[int], pydantic.Field(alias="uploadedCount")] = (
        None
    )

    total_documents: Annotated[
        Optional[int], pydantic.Field(alias="totalDocuments")
    ] = None

    total_size: Annotated[Optional[int], pydantic.Field(alias="totalSize")] = None

    documents: Optional[List[Document]] = None
