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

from __future__ import annotations
from duckyai.types import BaseModel
from duckyai.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GetDocumentRequestTypedDict(TypedDict):
    doc_id: str
    r"""The unique ID of the document to retrieve"""
    index_name: str
    r"""The name of the index containing the document"""
    limit: NotRequired[int]
    r"""The maximum number of chunks to return in the response"""
    cursor: NotRequired[str]
    r"""A cursor to fetch the next set of chunks if the document is paginated"""


class GetDocumentRequest(BaseModel):
    doc_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The unique ID of the document to retrieve"""

    index_name: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""The name of the index containing the document"""

    limit: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""The maximum number of chunks to return in the response"""

    cursor: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""A cursor to fetch the next set of chunks if the document is paginated"""
