openehr-lang 0.0.128

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_STRING`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

//! The openEHR `P_BMM_ENUMERATION_STRING` 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_1::bmm::core::bmm_enumeration_string::BmmEnumerationString;
use crate::v1_1::bmm_persistence::p_bmm_base_type::PBmmBaseType;
use crate::v1_1::bmm_persistence::p_bmm_constant::PBmmConstant;
use crate::v1_1::bmm_persistence::p_bmm_function::PBmmFunction;
use crate::v1_1::bmm_persistence::p_bmm_generic_parameter::PBmmGenericParameter;
use crate::v1_1::bmm_persistence::p_bmm_property::PBmmProperty;

/// Persistent form of `BMM_ENUMERATION_STRING`.
#[doc(alias = "P_BMM_ENUMERATION_STRING")]
#[derive(Debug, Clone, PartialEq)]
pub struct PBmmEnumerationString {
    // 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>>,
    /// Constants defined in this class, keyed by name. Persistent attribute.
    pub constants: Option<std::collections::BTreeMap<String, PBmmConstant>>,
    /// Properties defined in this class, keyed by name. Persisted attribute.
    pub properties: Option<std::collections::BTreeMap<String, PBmmProperty>>,
    /// Functions (routines) defined in this class, keyed by name. Persisted attribute.
    pub functions: Option<std::collections::BTreeMap<String, PBmmFunction>>,
    /// Invariants defined on this class, as a Hash of assertion expressions keyed by tag. Persisted attribute.
    pub invariants: Option<std::collections::BTreeMap<String, String>>,
    /// 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>,
    /// Generic parameter definitions, keyed by parameter name. Persisted attribute.
    pub generic_parameter_defs: Option<indexmap::IndexMap<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<BmmEnumerationString>,

    // 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,
    /// Structured inheritance ancestors, keyed by type signature, e.g. `GENERIC_PARENT<T,SUPPLIER_B>`.
    ///
    /// Used instead of `_ancestors_` when the class has a generic ancestor; any non-generic ancestor of the same class is then also listed here, as a `P_BMM_SIMPLE_TYPE`. Persisted attribute.
    pub ancestor_defs: Option<std::collections::BTreeMap<String, PBmmBaseType>>,

    // 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>>,
    /// Optional documentation strings for the enumeration items, in the same order as `_item_names_`. Persisted attribute.
    pub item_documentations: Option<Vec<String>>,
}