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

from __future__ import annotations
from ..core.pydantic_utilities import UniversalBaseModel
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class AdvancedModeTransformConfigSegmentationConfig_None(UniversalBaseModel):
    """
    Configuration for the segmentation.
    """

    mode: typing.Literal["none"] = "none"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class AdvancedModeTransformConfigSegmentationConfig_Page(UniversalBaseModel):
    """
    Configuration for the segmentation.
    """

    mode: typing.Literal["page"] = "page"
    page_separator: typing.Optional[str] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class AdvancedModeTransformConfigSegmentationConfig_Element(UniversalBaseModel):
    """
    Configuration for the segmentation.
    """

    mode: typing.Literal["element"] = "element"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


AdvancedModeTransformConfigSegmentationConfig = typing.Union[
    AdvancedModeTransformConfigSegmentationConfig_None,
    AdvancedModeTransformConfigSegmentationConfig_Page,
    AdvancedModeTransformConfigSegmentationConfig_Element,
]
