// @generated by openehr-codegen from BMM (`EL_CASE_TABLE`) — DO NOT EDIT.
//! The openEHR `EL_CASE_TABLE` spec class, generated from the vendored BMM
//! meta-model.
use crate::bmm3::expression::el_case::ElCase;
use crate::bmm3::expression::el_value_generator::ElValueGenerator;
/// Compound expression consisting of a list of value-range / expression pairs, and an `_else_` member that as a whole, represents a case statement flavour of decision table.
///
/// Evaluated by iterating through `_items_` and for each one, comparing `_input_` to the item `_value_range_`. If the `_input_` is in the range, the evaluation result of the table is 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_CASE_TABLE")]
#[derive(Debug, Clone, PartialEq)]
pub struct ElCaseTable<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<ElCase<T>>,
// inherited: EL_DECISION_TABLE
/// Result expression of conditional, if its `_condition_` evaluates to True.
pub r#else: T,
/// Expressing generating the input value for the case table.
pub test_value: ElValueGenerator,
}