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

from __future__ import annotations
from .certificateoforigin import CertificateOfOrigin, CertificateOfOriginTypedDict
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
from abbyy_document_ai.types import BaseModel
from abbyy_document_ai.utils import FieldMetadata, PathParamMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GetExtractedCertificateOfOriginFieldsRequestTypedDict(TypedDict):
    document_id: str
    r"""The id of the document"""


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


class GetExtractedCertificateOfOriginFieldsResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    certificate_of_origin: NotRequired[CertificateOfOriginTypedDict]
    r"""Extracted Certificate Of Origin Data Response"""


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

    certificate_of_origin: Optional[CertificateOfOrigin] = None
    r"""Extracted Certificate Of Origin Data Response"""
