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

from __future__ import annotations
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
from abbyy_document_ai.types import BaseModel
from abbyy_document_ai.utils import FieldMetadata, PathParamMetadata
from enum import Enum
import httpx
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


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

    HTML = "html"
    PDF = "pdf"


class DownloadDocumentConversionConvertedDocumentRequestTypedDict(TypedDict):
    document_id: str
    r"""The id of the document"""
    format_: PathParamDocumentConversionOutputFormat
    r"""The format of the results."""


class DownloadDocumentConversionConvertedDocumentRequest(BaseModel):
    document_id: Annotated[
        str,
        pydantic.Field(alias="documentId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The id of the document"""

    format_: Annotated[
        PathParamDocumentConversionOutputFormat,
        pydantic.Field(alias="format"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The format of the results."""


class DownloadDocumentConversionConvertedDocumentResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    response_stream: NotRequired[httpx.Response]
    r"""The file containing the OCR results"""


class DownloadDocumentConversionConvertedDocumentResponse(BaseModel):
    http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None

    response_stream: Optional[httpx.Response] = None
    r"""The file containing the OCR results"""
