# 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 .dataset_item import DatasetItem


class DatasetItemBatch(UniversalBaseModel):
    dataset_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    If null, dataset_id must be provided
    """

    dataset_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    If null, dataset_name must be provided
    """

    items: typing.List[DatasetItem]
    batch_group_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional batch group ID to group multiple batches into a single dataset version. If null, mutates the latest version instead of creating a new one.
    """

    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
