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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .parser_languages import ParserLanguages
import typing_extensions
from ..core.serialization import FieldMetadata
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class LlamaParseParameters(UniversalBaseModel):
    """
    Settings that can be configured for how to use LlamaParse to parse files within a LlamaCloud pipeline.
    """

    languages: typing.Optional[typing.List[ParserLanguages]] = None
    parsing_instruction: typing.Optional[str] = None
    disable_ocr: typing.Optional[bool] = None
    annotate_links: typing.Optional[bool] = None
    disable_reconstruction: typing.Optional[bool] = None
    disable_image_extraction: typing.Optional[bool] = None
    invalidate_cache: typing.Optional[bool] = None
    output_pdf_of_document: typing.Optional[bool] = None
    do_not_cache: typing.Optional[bool] = None
    fast_mode: typing.Optional[bool] = None
    skip_diagonal_text: typing.Optional[bool] = None
    gpt_4_o_mode: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="gpt4o_mode")] = None
    gpt_4_o_api_key: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="gpt4o_api_key")] = None
    do_not_unroll_columns: typing.Optional[bool] = None
    extract_layout: typing.Optional[bool] = None
    html_make_all_elements_visible: typing.Optional[bool] = None
    html_remove_navigation_elements: typing.Optional[bool] = None
    html_remove_fixed_elements: typing.Optional[bool] = None
    guess_xlsx_sheet_name: typing.Optional[bool] = None
    page_separator: typing.Optional[str] = None
    bounding_box: typing.Optional[str] = None
    bbox_top: typing.Optional[float] = None
    bbox_right: typing.Optional[float] = None
    bbox_bottom: typing.Optional[float] = None
    bbox_left: typing.Optional[float] = None
    target_pages: typing.Optional[str] = None
    use_vendor_multimodal_model: typing.Optional[bool] = None
    vendor_multimodal_model_name: typing.Optional[str] = None
    vendor_multimodal_api_key: typing.Optional[str] = None
    page_prefix: typing.Optional[str] = None
    page_suffix: typing.Optional[str] = None
    webhook_url: typing.Optional[str] = None
    take_screenshot: typing.Optional[bool] = None
    is_formatting_instruction: typing.Optional[bool] = None
    premium_mode: typing.Optional[bool] = None
    continuous_mode: typing.Optional[bool] = None
    s_3_input_path: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_input_path")] = None
    input_s_3_region: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="input_s3_region")] = None
    s_3_output_path_prefix: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="s3_output_path_prefix")
    ] = None
    output_s_3_region: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="output_s3_region")] = None
    project_id: typing.Optional[str] = None
    azure_openai_deployment_name: typing.Optional[str] = None
    azure_openai_endpoint: typing.Optional[str] = None
    azure_openai_api_version: typing.Optional[str] = None
    azure_openai_key: typing.Optional[str] = None
    input_url: typing.Optional[str] = None
    http_proxy: typing.Optional[str] = None
    auto_mode: typing.Optional[bool] = None
    auto_mode_trigger_on_regexp_in_page: typing.Optional[str] = None
    auto_mode_trigger_on_text_in_page: typing.Optional[str] = None
    auto_mode_trigger_on_table_in_page: typing.Optional[bool] = None
    auto_mode_trigger_on_image_in_page: typing.Optional[bool] = None
    structured_output: typing.Optional[bool] = None
    structured_output_json_schema: typing.Optional[str] = None
    structured_output_json_schema_name: typing.Optional[str] = None
    max_pages: typing.Optional[int] = None
    max_pages_enforced: typing.Optional[int] = None
    extract_charts: typing.Optional[bool] = None
    formatting_instruction: typing.Optional[str] = None
    complemental_formatting_instruction: typing.Optional[str] = None
    content_guideline_instruction: typing.Optional[str] = None
    spreadsheet_extract_sub_tables: typing.Optional[bool] = None
    job_timeout_in_seconds: typing.Optional[float] = None
    job_timeout_extra_time_per_page_in_seconds: typing.Optional[float] = None
    strict_mode_image_extraction: typing.Optional[bool] = None
    strict_mode_image_ocr: typing.Optional[bool] = None
    strict_mode_reconstruction: typing.Optional[bool] = None
    strict_mode_buggy_font: typing.Optional[bool] = None
    ignore_document_elements_for_layout_detection: typing.Optional[bool] = None
    output_tables_as_html: typing_extensions.Annotated[
        typing.Optional[bool], FieldMetadata(alias="output_tables_as_HTML")
    ] = None
    internal_is_screenshot_job: typing.Optional[bool] = 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
