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

from __future__ import annotations
from .inputsource import InputSource, InputSourceTypedDict
from abbyy_document_ai.types import BaseModel
from enum import Enum
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class DocumentConversionOutputFormat(str, Enum):
    r"""The format of the results."""

    HTML = "html"
    PDF = "pdf"


class Languages(str, Enum):
    r"""The ISO 639-1 codes for the languages contained within the input source(s). If not provided, the default is English, French, German, and Spanish (en|fr|de|es)."""

    EN_FR_DE_ES = "en|fr|de|es"
    EN = "en"
    EN_ES = "en|es"
    EN_FR = "en|fr"
    EN_FR_NL = "en|fr|nl"
    EN_DE = "en|de"
    EN_JA = "en|ja"
    EN_ZH = "en|zh"


class OptionsTypedDict(TypedDict):
    format_: DocumentConversionOutputFormat
    r"""The format of the results."""
    languages: NotRequired[Languages]
    r"""The ISO 639-1 codes for the languages contained within the input source(s). If not provided, the default is English, French, German, and Spanish (en|fr|de|es)."""
    handwriting: NotRequired[bool]
    r"""Whether the input source(s) contain handwriting. Defaults to false."""


class Options(BaseModel):
    format_: Annotated[DocumentConversionOutputFormat, pydantic.Field(alias="format")]
    r"""The format of the results."""

    languages: Optional[Languages] = None
    r"""The ISO 639-1 codes for the languages contained within the input source(s). If not provided, the default is English, French, German, and Spanish (en|fr|de|es)."""

    handwriting: Optional[bool] = None
    r"""Whether the input source(s) contain handwriting. Defaults to false."""


class BeginDocumentConversionDocumentConversionRequestBodyTypedDict(TypedDict):
    r"""Request to process a document using the document-conversion model"""

    input_source: InputSourceTypedDict
    r"""The source of the document(s) to be processed"""
    options: OptionsTypedDict


class BeginDocumentConversionDocumentConversionRequestBody(BaseModel):
    r"""Request to process a document using the document-conversion model"""

    input_source: Annotated[InputSource, pydantic.Field(alias="inputSource")]
    r"""The source of the document(s) to be processed"""

    options: Options
