"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
# @generated-id: 054688d20a3b

from __future__ import annotations
from .vespasearchindexinforesponse import (
    VespaSearchIndexInfoResponse,
    VespaSearchIndexInfoResponseTypedDict,
)
from datetime import datetime
from mistralai.client.types import BaseModel, UnrecognizedStr
from pydantic import ConfigDict
from typing import Any, Literal, Union
from typing_extensions import TypedDict


SearchIndexResponseStatus = Union[
    Literal[
        "online",
        "offline",
    ],
    UnrecognizedStr,
]


SearchIndexResponseIndexTypedDict = VespaSearchIndexInfoResponseTypedDict


class UnknownSearchIndexResponseIndex(BaseModel):
    r"""A SearchIndexResponseIndex variant the SDK doesn't recognize. Preserves the raw payload."""

    type: Literal["UNKNOWN"] = "UNKNOWN"
    raw: Any
    is_unknown: Literal[True] = True

    model_config = ConfigDict(frozen=True)


_SEARCH_INDEX_RESPONSE_INDEX_VARIANTS: dict[str, Any] = {
    "vespa": VespaSearchIndexInfoResponse,
}


SearchIndexResponseIndex = VespaSearchIndexInfoResponse


class SearchIndexResponseTypedDict(TypedDict):
    id: str
    name: str
    creator_id: str
    document_count: int
    status: SearchIndexResponseStatus
    created_at: datetime
    modified_at: datetime
    index: SearchIndexResponseIndexTypedDict


class SearchIndexResponse(BaseModel):
    id: str

    name: str

    creator_id: str

    document_count: int

    status: SearchIndexResponseStatus

    created_at: datetime

    modified_at: datetime

    index: SearchIndexResponseIndex
