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

from __future__ import annotations
from .document import Document, DocumentTypedDict
from .taxireceiptfields import TaxiReceiptFields, TaxiReceiptFieldsTypedDict
from abbyy_document_ai.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class TaxiReceiptValidationErrorsTypedDict(TypedDict):
    message: str


class TaxiReceiptValidationErrors(BaseModel):
    message: str


class TaxiReceiptTypedDict(TypedDict):
    r"""Extracted Taxi Receipt Data Response"""

    meta: DocumentTypedDict
    r"""Represents a document that has been submitted for processing."""
    fields: NotRequired[TaxiReceiptFieldsTypedDict]
    r"""Fields extracted from a taxi receipt"""
    validation_errors: NotRequired[List[TaxiReceiptValidationErrorsTypedDict]]
    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 TaxiReceipt(BaseModel):
    r"""Extracted Taxi Receipt Data Response"""

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

    fields: Optional[TaxiReceiptFields] = None
    r"""Fields extracted from a taxi receipt"""

    validation_errors: Annotated[
        Optional[List[TaxiReceiptValidationErrors]],
        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."""
