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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel


class EditRunConfigAdvancedOptions(UncheckedBaseModel):
    """
    Advanced options for the edit operation.
    """

    flatten_pdf: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="flattenPdf")] = pydantic.Field(
        alias="flattenPdf", default=None
    )
    """
    Whether to flatten PDF forms before editing.
    """

    table_parsing_enabled: typing_extensions.Annotated[
        typing.Optional[bool], FieldMetadata(alias="tableParsingEnabled")
    ] = pydantic.Field(alias="tableParsingEnabled", default=None)
    """
    Whether to parse tables as arrays.
    """

    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
