# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from .reducto_chunking_request import ReductoChunkingRequest
from .sentence_chunking_request import SentenceChunkingRequest
from .token_overlapping_window_chunking_request import TokenOverlappingWindowChunkingRequest


class DocumentIndexChunkingRequest_ReductoChunker(ReductoChunkingRequest):
    chunker_name: typing.Literal["reducto-chunker"] = "reducto-chunker"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class DocumentIndexChunkingRequest_SentenceChunker(SentenceChunkingRequest):
    chunker_name: typing.Literal["sentence-chunker"] = "sentence-chunker"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class DocumentIndexChunkingRequest_TokenOverlappingWindowChunker(TokenOverlappingWindowChunkingRequest):
    chunker_name: typing.Literal["token-overlapping-window-chunker"] = "token-overlapping-window-chunker"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


DocumentIndexChunkingRequest = typing.Union[
    DocumentIndexChunkingRequest_ReductoChunker,
    DocumentIndexChunkingRequest_SentenceChunker,
    DocumentIndexChunkingRequest_TokenOverlappingWindowChunker,
]
