openehr-lang 0.0.76

openEHR LANG BMM/P_BMM object model, generated from BMM: generations v1_0 (LANG 1.0.0) and v1_1 (LANG 1.1.0, current; the stable BMM v2.x unit beside the paused BMM3 unit), plus hand-written ODIN/BEL/EL readers
Documentation
// @generated by openehr-codegen from BMM (`P_BMM_ENUMERATION_INTEGER`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Vernum Projecten B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

#![expect(
    clippy::disallowed_types,
    reason = "adjudicated free-form JSON slots: serde_json::Value is workspace-banned (#1694); a generated carrier exists only where the spec leaves the slot open, and each adjudicated field's NOTE names its citation"
)]
use crate::v1_0::bmm::core::entity::range_constrained::bmm_enumeration_integer::BmmEnumerationInteger;
use crate::v1_0::bmm_persistence::p_bmm_generic_parameter::PBmmGenericParameter;
use crate::v1_0::bmm_persistence::p_bmm_generic_type::PBmmGenericType;
use crate::v1_0::bmm_persistence::p_bmm_property::PBmmProperty;

/// Persistent form of an instance of `BMM_ENUMERATION_INTEGER`.
#[doc(alias = "P_BMM_ENUMERATION_INTEGER")]
#[derive(Debug, Clone, PartialEq)]
pub struct PBmmEnumerationInteger {
    // inherited: P_BMM_MODEL_ELEMENT
    /// Optional documentation of this element.
    pub documentation: Option<String>,

    // inherited: P_BMM_CLASS
    /// Name of the class. Persisted attribute.
    pub name: String,
    /// List of immediate inheritance parents. If there are generic ancestors, use `_ancestor_defs_` instead. Persisted attribute.
    pub ancestors: Option<Vec<String>>,
    /// List of attributes defined in this class. Persistent attribute.
    pub properties: Option<std::collections::BTreeMap<String, PBmmProperty>>,
    /// True if this is an abstract type. Persisted attribute.
    pub is_abstract: Option<bool>,
    /// True if this class definition overrides one found in an included schema.
    pub is_override: Option<bool>,
    /// List of generic parameter definitions. Persisted attribute.
    pub generic_parameter_defs: Option<std::collections::BTreeMap<String, PBmmGenericParameter>>,
    /// Reference to original source schema defining this class.
    ///
    /// Set during `BMM_SCHEMA` materialise. Useful for GUI tools to enable user to edit the schema file containing a given class (i.e. taking into account that a class may be in any of the schemas in a schema inclusion hierarchy).
    pub source_schema_id: String,
    /// `BMM_CLASS` object build by `_create_bmm_class_definition_` and `_populate_bmm_class_definition_`.
    pub bmm_class: Option<BmmEnumerationInteger>,

    // inherited: P_BMM_CLASS
    /// Unique id generated for later comparison during merging, in order to detect if two classes are the same. Assigned in post-load processing.
    pub uid: i32,
    /// List of structured inheritance ancestors, used only in the case of generic inheritance. Persisted attribute.
    pub ancestor_defs: Option<Vec<PBmmGenericType>>,

    // inherited: P_BMM_ENUMERATION
    /// The `item_names` attribute of openEHR `P_BMM_ENUMERATION` (the vendored BMM carries no documentation for it).
    pub item_names: Option<Vec<String>>,
    /// The `item_values` attribute of openEHR `P_BMM_ENUMERATION` (the vendored BMM carries no documentation for it).
    pub item_values: Option<Vec<serde_json::Value>>,
}