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

from __future__ import annotations
from enum import Enum
from lambdadb.types import BaseModel
from lambdadb.utils import FieldMetadata, PathParamMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GetBulkUpsertDocsRequestTypedDict(TypedDict):
    project_name: str
    r"""Project name."""
    collection_name: str
    r"""Collection name."""


class GetBulkUpsertDocsRequest(BaseModel):
    project_name: Annotated[
        str,
        pydantic.Field(alias="projectName"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Project name."""

    collection_name: Annotated[
        str,
        pydantic.Field(alias="collectionName"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Collection name."""


class GetBulkUpsertDocsType(str, Enum):
    r"""Content type that must be specified when uploading documents."""

    APPLICATION_JSON = "application/json"


class HTTPMethod(str, Enum):
    r"""HTTP method that must be specified when uploading documents."""

    PUT = "PUT"


class GetBulkUpsertDocsResponseTypedDict(TypedDict):
    r"""Required info to upload documents."""

    url: str
    r"""Presigned URL."""
    object_key: str
    r"""Object key that must be specified when uploading documents."""
    type: NotRequired[GetBulkUpsertDocsType]
    r"""Content type that must be specified when uploading documents."""
    http_method: NotRequired[HTTPMethod]
    r"""HTTP method that must be specified when uploading documents."""
    size_limit_bytes: NotRequired[int]
    r"""Object size limit in bytes."""


class GetBulkUpsertDocsResponse(BaseModel):
    r"""Required info to upload documents."""

    url: str
    r"""Presigned URL."""

    object_key: Annotated[str, pydantic.Field(alias="objectKey")]
    r"""Object key that must be specified when uploading documents."""

    type: Optional[GetBulkUpsertDocsType] = GetBulkUpsertDocsType.APPLICATION_JSON
    r"""Content type that must be specified when uploading documents."""

    http_method: Annotated[Optional[HTTPMethod], pydantic.Field(alias="httpMethod")] = (
        HTTPMethod.PUT
    )
    r"""HTTP method that must be specified when uploading documents."""

    size_limit_bytes: Annotated[
        Optional[int], pydantic.Field(alias="sizeLimitBytes")
    ] = 209715200
    r"""Object size limit in bytes."""
