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

from __future__ import annotations
from fermisdk.types import BaseModel
from fermisdk.utils import FieldMetadata, MultipartFormMetadata
import io
import pydantic
from typing import IO, List, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class FileTypedDict(TypedDict):
    file_name: str
    content: Union[bytes, IO[bytes], io.BufferedReader]
    content_type: NotRequired[str]


class File(BaseModel):
    file_name: Annotated[
        str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
    ]

    content: Annotated[
        Union[bytes, IO[bytes], io.BufferedReader],
        pydantic.Field(alias=""),
        FieldMetadata(multipart=MultipartFormMetadata(content=True)),
    ]

    content_type: Annotated[
        Optional[str],
        pydantic.Field(alias="Content-Type"),
        FieldMetadata(multipart=True),
    ] = None


class UploadDocumentsRequestTypedDict(TypedDict):
    files: List[FileTypedDict]
    r"""Multiple files allowed"""
    description: NotRequired[str]
    r"""Description for upload job"""


class UploadDocumentsRequest(BaseModel):
    files: Annotated[
        List[File], FieldMetadata(multipart=MultipartFormMetadata(file=True))
    ]
    r"""Multiple files allowed"""

    description: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
    r"""Description for upload job"""
