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

from __future__ import annotations
from .multivectorindex import MultiVectorIndex, MultiVectorIndexTypedDict
from .vectorindex import VectorIndex, VectorIndexTypedDict
from enum import Enum
from mixpeek.types import BaseModel
from typing import Union
from typing_extensions import TypeAliasType, TypedDict


class Type(str, Enum):
    SINGLE = "single"
    MULTI = "multi"


IndexTypedDict = TypeAliasType(
    "IndexTypedDict", Union[MultiVectorIndexTypedDict, VectorIndexTypedDict]
)


Index = TypeAliasType("Index", Union[MultiVectorIndex, VectorIndex])


class VectorIndexDefinitionTypedDict(TypedDict):
    r"""Complete vector index definition that can be either single or multi-vector"""

    name: str
    description: str
    type: Type
    index: IndexTypedDict


class VectorIndexDefinition(BaseModel):
    r"""Complete vector index definition that can be either single or multi-vector"""

    name: str

    description: str

    type: Type

    index: Index
