// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Record of a review-gate evaluation during a workflow run.
/// Captures the conditions evaluated against the block's output
/// (`evaluations`), whether the gate required human review
/// (`requires_human_review`), and, once a reviewer acts, the verdict
/// (`review_decision`), any notes, whether a revision was requested, and the
/// reviewer and timestamp.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReviewEvaluation {
    /// The operation that produced this artifact
    ///
    /// Defaults to `review_trigger_evaluation`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub operation: Option<String>,
    pub id: String,
    pub run_id: String,
    pub step_id: String,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub evaluations: Option<Vec<ConditionEvaluationResult>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub selected_handles: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub matched_branch_id: Option<String>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub matched_condition_ids: Option<Vec<String>>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub requires_human_review: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub reviewer_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub review_decision: Option<ReviewEvaluationReviewDecision>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub review_notes: Option<String>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub requested_revision: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub reviewed_at: Option<String>,
    /// Timestamp when this artifact was created.
    pub created_at: String,
}
impl ReviewEvaluation {
    /// Construct a new `ReviewEvaluation` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        run_id: impl Into<String>,
        step_id: impl Into<String>,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            operation: Default::default(),
            id: id.into(),
            run_id: run_id.into(),
            step_id: step_id.into(),
            evaluations: Default::default(),
            selected_handles: Default::default(),
            matched_branch_id: Default::default(),
            matched_condition_ids: Default::default(),
            requires_human_review: Default::default(),
            reviewer_id: Default::default(),
            review_decision: Default::default(),
            review_notes: Default::default(),
            requested_revision: Default::default(),
            reviewed_at: Default::default(),
            created_at: created_at.into(),
        }
    }
}
