// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Body for POST /v1/workflows/experiments.
/// Two modes:
/// - **Create from scratch** — provide ``block_id``, ``name``, optional
/// ``document_captures``/``documents``/``n_consensus``. ``source_experiment_id``
/// is omitted.
/// - **Duplicate an existing experiment** — provide only
/// ``source_experiment_id``. The handler copies the source's block, name
/// (with ``(Copy)`` suffix), n_consensus, and documents. All other fields
/// must be omitted.
/// The discriminator is whether ``source_experiment_id`` is set. This is
/// validated server-side: combining a source with any other field is
/// rejected so the two modes stay structurally distinct.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateExperimentRequest {
    pub workflow_id: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub block_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub document_captures: Option<Vec<ExperimentDocumentCaptureRequest>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub documents: Option<Vec<ExplicitExperimentDocumentRequest>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub n_consensus: Option<CreateExperimentRequestNConsensus>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub name: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub source_experiment_id: Option<String>,
}
