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

from __future__ import annotations
from duckyai.types import BaseModel
from typing import Any, Dict, Optional
from typing_extensions import NotRequired, TypedDict


class IndexTextRequestTypedDict(TypedDict):
    index_name: str
    r"""The name of the index to add the document to"""
    content: str
    r"""The text content of the document to be indexed"""
    doc_id: NotRequired[str]
    r"""The ID of the document. If not provided, a unique document ID will be automatically generated by the server.

    """
    title: NotRequired[str]
    r"""Title of the document to be indexed"""
    url: NotRequired[str]
    r"""URL associated with the document to be indexed"""
    metadata: NotRequired[Dict[str, Any]]
    r"""Metadata associated with the document. Accepts key value pairs where the value can be a string, number, boolean, or list of strings."""


class IndexTextRequest(BaseModel):
    index_name: str
    r"""The name of the index to add the document to"""

    content: str
    r"""The text content of the document to be indexed"""

    doc_id: Optional[str] = None
    r"""The ID of the document. If not provided, a unique document ID will be automatically generated by the server.

    """

    title: Optional[str] = None
    r"""Title of the document to be indexed"""

    url: Optional[str] = None
    r"""URL associated with the document to be indexed"""

    metadata: Optional[Dict[str, Any]] = None
    r"""Metadata associated with the document. Accepts key value pairs where the value can be a string, number, boolean, or list of strings."""
