// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Result of evaluating ONE assertion against a block's output.
/// ``outcome`` is a verdict only — pass / fail / blocked. An execution
/// error (the assertion couldn't be evaluated because of a type error,
/// invalid regex, schema validation crash, block execution crash, etc.) is
/// expressed by ``outcome="blocked"`` with a populated ``failure`` whose
/// ``code`` identifies the specific failure mode (``execution_error``,
/// ``type_error``, ``invalid_regex``, ``schema_invalid``,
/// ``block_execution_failed``, ...).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AssertionResult {
    pub assertion_id: String,
    pub condition_kind: String,
    pub outcome: AssertionOutcome,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub actual_value: Option<serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub expected_value: Option<serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub score: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub threshold: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub metric_kind: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub assertion_label: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub failure: Option<AssertionFailure>,
}
