# 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 .feedback_score_experiment_item_bulk_write_view import FeedbackScoreExperimentItemBulkWriteView
from .json_list_string_experiment_item_bulk_write_view import JsonListStringExperimentItemBulkWriteView
from .span_experiment_item_bulk_write_view import SpanExperimentItemBulkWriteView
from .trace_experiment_item_bulk_write_view import TraceExperimentItemBulkWriteView


class ExperimentItemBulkRecordExperimentItemBulkWriteView(UniversalBaseModel):
    dataset_item_id: str
    evaluate_task_result: typing.Optional[JsonListStringExperimentItemBulkWriteView] = None
    trace: typing.Optional[TraceExperimentItemBulkWriteView] = None
    spans: typing.Optional[typing.List[SpanExperimentItemBulkWriteView]] = None
    feedback_scores: typing.Optional[typing.List[FeedbackScoreExperimentItemBulkWriteView]] = None

    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
