// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// The outcome of one eval within an eval run: its `lifecycle`, `timing`, and `verdict`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowEvalResult {
    pub id: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub workflow_eval_run_id: Option<String>,
    pub eval_id: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub lifecycle: Option<WorkflowEvalResultLifecycleOneOf>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub timing: Option<WorkflowEvalRunTiming>,
    /// Verdict label populated only when the underlying eval reaches a terminal lifecycle state and the verdict could be determined. Execution-error details flow through `lifecycle`, not through this enum.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub verdict: Option<WorkflowEvalResultVerdict>,
    pub workflow_id: String,
    pub block_id: String,
    pub block_type: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub execution_fingerprint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub handle_inputs_fingerprint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub workflow_draft_fingerprint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub block_execution_fingerprint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub artifact: Option<StepArtifactRef>,
    /// Defaults to `{}`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub handle_inputs: Option<
        std::collections::HashMap<String, ExplicitExperimentDocumentRequestHandleInputsOneOf>,
    >,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub handle_outputs: Option<
        std::collections::HashMap<String, ExplicitExperimentDocumentRequestHandleInputsOneOf>,
    >,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub routing_decisions: Option<Vec<String>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub warnings: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub assertion_result: Option<AssertionResult>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub verdict_summary: Option<VerdictSummary>,
}
impl WorkflowEvalResult {
    /// Construct a new `WorkflowEvalResult` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        eval_id: impl Into<String>,
        workflow_id: impl Into<String>,
        block_id: impl Into<String>,
        block_type: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            workflow_eval_run_id: Default::default(),
            eval_id: eval_id.into(),
            lifecycle: Default::default(),
            timing: Default::default(),
            verdict: Default::default(),
            workflow_id: workflow_id.into(),
            block_id: block_id.into(),
            block_type: block_type.into(),
            execution_fingerprint: Default::default(),
            handle_inputs_fingerprint: Default::default(),
            workflow_draft_fingerprint: Default::default(),
            block_execution_fingerprint: Default::default(),
            artifact: Default::default(),
            handle_inputs: Default::default(),
            handle_outputs: Default::default(),
            routing_decisions: Default::default(),
            warnings: Default::default(),
            assertion_result: Default::default(),
            verdict_summary: Default::default(),
        }
    }
}
