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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class PostInvoicesRootResponseItems(UniversalBaseModel):
    """
    The status of the line item ingestion process.
    """

    success: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    An object mapping original item indexes to newly created item IDs for successful items.
    """

    failure: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    An object mapping original item indexes to error messages for failed items.
    """

    status: typing.Optional[str] = pydantic.Field(default=None)
    """
    The overall status of the item ingestion ('success', 'partial_success', 'failure').
    """

    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
