# 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 BatchResultsResponseResultsItem(UniversalBaseModel):
    task: int = pydantic.Field()
    """
    Internal task ID
    """

    result: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    The outcome of the task (e.g. the created/updated resource). Null if the task failed.
    """

    message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Error message if the task failed. Null on success.
    """

    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
