openehr-am 0.0.78

openEHR AM Archetype Model, generated from BMM: generations v1_4 (AM 1.4.0, ADL 1.4) and v2_4 (AM 2.4.0, ADL 2; current)
Documentation
// @generated by openehr-codegen from BMM (`C_BOOLEAN`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Vernum Projecten B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
// Hand-written spec functions/invariants live in the sibling `*_impl.rs`.

//! The openEHR `C_BOOLEAN` spec class, generated from the vendored BMM
//! meta-model.

use crate::v2_4::aom2::constraint_model::archetype_constraint::ArchetypeConstraint;
use crate::v2_4::aom2::constraint_model::c_second_order::CSecondOrder;
use crate::v2_4::aom2::constraint_model::sibling_order::SiblingOrder;
use openehr_base::v1_3::foundation_types::interval::multiplicity_interval::MultiplicityInterval;

/// Constraint on instances of `Boolean`. Both attributes cannot be set to False, since this would mean that the Boolean value being constrained cannot be `True` or `False`.
#[doc(alias = "C_BOOLEAN")]
#[derive(Debug, Clone, PartialEq)]
pub struct CBoolean {
    // inherited: ARCHETYPE_CONSTRAINT
    /// Parent node, except in the case of the top of a tree, i.e. root `C_COMPLEX_OBJECT` of an archetype definition.
    pub parent: Option<Box<ArchetypeConstraint>>,
    /// The `soc_parent` attribute of openEHR `ARCHETYPE_CONSTRAINT` (the vendored BMM carries no documentation for it).
    pub soc_parent: Option<CSecondOrder>,

    // inherited: C_OBJECT
    /// Reference model type that this node corresponds to.
    pub rm_type_name: String,
    /// Occurrences of this object node in the data, under the owning attribute.
    ///
    /// Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1.
    /// Only set if it overrides the parent archetype in the case of specialised archetypes, or else the occurrences inferred from the underlying reference model existence and/or cardinality of the containing attribute.
    pub occurrences: Option<MultiplicityInterval>,
    /// Semantic identifier of this node, used to distinguish sibling nodes.
    ///
    /// All nodes must have a `_node_id_`; for nodes under a container `C_ATTRIBUTE`. For at-coded archetypes `_node_id_` must be an at-code defined in the archetype terminology and for valid structures all node ids are at-codes. For id-coded archetypes  `_node_id_` must be an id-code defined in the archetype terminology and for valid structures all node ids are id-codes.
    ///
    /// For `C_PRIMITIVE_OBJECTs` represented in ADL inline form, this attribute will have the special value `Primitive_node_id`; otherwise it will have the node id read during parsing.
    ///
    pub node_id: String,
    /// Additional identifiers of this node.
    ///
    /// openEHR archetypes can carry original ALD2 id-codes in this attribute and it can also carry human readable codes for future use. Alternative ids must be unique within the archetype.
    pub alternative_ids: Option<Vec<String>>,
    /// True if this node and by implication all sub-nodes are deprecated for use.
    pub is_deprecated: Option<bool>,
    /// Optional indicator of order of this node with respect to another sibling. Only meaningful in a specialised archetype for a `C_OBJECT` within a `C_ATTRIBUTE` with `_is_multiple_ = True`.
    pub sibling_order: Option<SiblingOrder>,
    /// Default Boolean value.
    pub default_value: Option<bool>,
    /// Assumed Boolean value.
    pub assumed_value: Option<bool>,

    // inherited: C_PRIMITIVE_OBJECT
    /// True if this object represents a constraint on an enumerated type from the reference model, where the latter is assumed to be based on a primitive type, generally Integer or String.
    pub is_enumerated_type_constraint: Option<bool>,
    /// Boolean constraint - a list of Boolean values.
    pub constraint: Option<Vec<bool>>,
}