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

from __future__ import annotations
from .document import Document, DocumentTypedDict
from .hotelinvoicefields import HotelInvoiceFields, HotelInvoiceFieldsTypedDict
from abbyy_document_ai.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class HotelInvoiceValidationErrorsTypedDict(TypedDict):
    message: str


class HotelInvoiceValidationErrors(BaseModel):
    message: str


class HotelInvoiceTypedDict(TypedDict):
    r"""Extracted Hotel Invoice Data Response"""

    meta: DocumentTypedDict
    r"""Represents a document that has been submitted for processing."""
    fields: NotRequired[HotelInvoiceFieldsTypedDict]
    r"""Fields extracted from a hotel invoice"""
    validation_errors: NotRequired[List[HotelInvoiceValidationErrorsTypedDict]]
    r"""An array of validation errors that occurred while processing the document. These typically do not prevent field extraction, but rather indicate issues extracting key fields."""


class HotelInvoice(BaseModel):
    r"""Extracted Hotel Invoice Data Response"""

    meta: Document
    r"""Represents a document that has been submitted for processing."""

    fields: Optional[HotelInvoiceFields] = None
    r"""Fields extracted from a hotel invoice"""

    validation_errors: Annotated[
        Optional[List[HotelInvoiceValidationErrors]],
        pydantic.Field(alias="validationErrors"),
    ] = None
    r"""An array of validation errors that occurred while processing the document. These typically do not prevent field extraction, but rather indicate issues extracting key fields."""
