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

from __future__ import annotations
from .collectionresponse import CollectionResponse, CollectionResponseTypedDict
from .indexconfigs_union import IndexConfigsUnion, IndexConfigsUnionTypedDict
from lambdadb.types import BaseModel
from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
import pydantic
from typing import Dict
from typing_extensions import Annotated, TypedDict


class UpdateCollectionRequestBodyTypedDict(TypedDict):
    index_configs: Dict[str, IndexConfigsUnionTypedDict]


class UpdateCollectionRequestBody(BaseModel):
    index_configs: Annotated[
        Dict[str, IndexConfigsUnion], pydantic.Field(alias="indexConfigs")
    ]


class UpdateCollectionRequestTypedDict(TypedDict):
    collection_name: str
    r"""Collection name."""
    request_body: UpdateCollectionRequestBodyTypedDict


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

    request_body: Annotated[
        UpdateCollectionRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class UpdateCollectionResponseTypedDict(TypedDict):
    r"""Updated collection"""

    collection: CollectionResponseTypedDict


class UpdateCollectionResponse(BaseModel):
    r"""Updated collection"""

    collection: CollectionResponse
