// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConditionalEvaluation {
    /// Artifact operation that determines the backing record type
    ///
    /// Defaults to `conditional_evaluation`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub operation: Option<String>,
    pub id: String,
    pub workflow_run_id: String,
    pub step_id: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub evaluations: Option<Vec<ConditionEvaluationResult>>,
    #[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>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub matched_condition_ids: Option<Vec<String>>,
    /// When this artifact was written by the orchestrator.
    pub created_at: String,
}
impl ConditionalEvaluation {
    /// Construct a new `ConditionalEvaluation` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        workflow_run_id: impl Into<String>,
        step_id: impl Into<String>,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            operation: Default::default(),
            id: id.into(),
            workflow_run_id: workflow_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(),
            created_at: created_at.into(),
        }
    }
}
