"""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
import pydantic
from typing import Dict, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class CreateCollectionRequestTypedDict(TypedDict):
    collection_name: str
    r"""Collection name must be unique within a project and the supported maximum length is 52."""
    index_configs: NotRequired[Dict[str, IndexConfigsUnionTypedDict]]
    source_project_name: NotRequired[str]
    source_collection_name: NotRequired[str]
    source_datetime: NotRequired[str]
    source_project_api_key: NotRequired[str]


class CreateCollectionRequest(BaseModel):
    collection_name: Annotated[str, pydantic.Field(alias="collectionName")]
    r"""Collection name must be unique within a project and the supported maximum length is 52."""

    index_configs: Annotated[
        Optional[Dict[str, IndexConfigsUnion]], pydantic.Field(alias="indexConfigs")
    ] = None

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

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

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

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


class CreateCollectionResponseTypedDict(TypedDict):
    r"""Created collection"""

    collection: CollectionResponseTypedDict


class CreateCollectionResponse(BaseModel):
    r"""Created collection"""

    collection: CollectionResponse
