// @generated by openehr-codegen from BMM (`EL_CONDITION_CHAIN`) — DO NOT EDIT.
//! The openEHR `EL_CONDITION_CHAIN` spec class, generated from the vendored BMM
//! meta-model.
use crate::bmm3::expression::el_conditional_expression::ElConditionalExpression;
/// Compound expression consisting of a chain of condition-gated expressions, and an ungated `_else_` member that as a whole, represents an if/then/elseif/else chains.
///
/// Evaluated by iterating through `_items_` and for each one, evaluating its `_condition_`, which if True, causes the evaluation result of the chain to be that item's `_result_` evaluation result.
///
/// If no member of `_items_` has a True-returning `_condition_`, the evaluation result is the result of evaluating the `_else_` expression.
#[doc(alias = "EL_CONDITION_CHAIN")]
#[derive(Debug, Clone, PartialEq)]
pub struct ElConditionChain<T> {
/// Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.
pub items: openehr_base::containers::NonEmptyVec<ElConditionalExpression<T>>,
// inherited: EL_DECISION_TABLE
/// Result expression of conditional, if its `_condition_` evaluates to True.
pub r#else: T,
}