# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .invoice_creation_response_batch import InvoiceCreationResponseBatch
from .invoice_creation_response_container import InvoiceCreationResponseContainer
from .invoice_creation_response_invoice import InvoiceCreationResponseInvoice
from .invoice_creation_response_processing import InvoiceCreationResponseProcessing
from .invoice_creation_response_upload import InvoiceCreationResponseUpload


class InvoiceCreationResponse(UniversalBaseModel):
    version: str = pydantic.Field()
    """
    API version
    """

    invoice: InvoiceCreationResponseInvoice = pydantic.Field()
    """
    Created invoice details
    """

    batch: InvoiceCreationResponseBatch = pydantic.Field()
    """
    Processing batch information
    """

    container: InvoiceCreationResponseContainer = pydantic.Field()
    """
    File container information
    """

    upload: InvoiceCreationResponseUpload = pydantic.Field()
    """
    Upload details and storage information
    """

    processing: InvoiceCreationResponseProcessing = pydantic.Field()
    """
    Asynchronous processing information
    """

    metadata: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    Custom metadata provided during upload
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
