openehr-lang 0.0.2

openEHR LANG 1.0.0: BMM/P_BMM object model (generated from BMM) plus a hand-written ODIN instance parser (the `odin` module — deliberately off the codegen path).
Documentation
// @generated by openehr-codegen from BMM (`BMM_SELF`) — DO NOT EDIT.

//! The openEHR `BMM_SELF` 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::bmm3::core::entity::bmm_type::BmmType;

/// Meta-type for an automatically created variable referencing the current instance. Typically called 'self' or 'this' in programming languages. Read-only.
#[doc(alias = "BMM_SELF")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmSelf {
    /// Name of this model element.
    pub name: String,

    // inherited: BMM_MODEL_ELEMENT
    /// Optional documentation of this element, as a keyed list.
    ///
    /// It is strongly recommended to use the following key /type combinations for the relevant purposes:
    ///
    /// * `"purpose": String`
    /// * `"keywords": List<String>`
    /// * `"use": String`
    /// * `"misuse": String`
    /// * `"references": String`
    ///
    /// Other keys and value types may be freely added.
    pub documentation: Option<std::collections::BTreeMap<String, serde_json::Value>>,
    // NOTE: `scope` (BMM-mandatory back-reference) omitted — LANG BMM3 bmm_variable (scope: BMM_ROUTINE — redefinition of BMM_MODEL_ELEMENT.scope). A back-reference is not forward-owned data and never appears on the canonical wire; emitting it as an owning field would make this type non-constructible.
    /// Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
    pub extensions: Option<std::collections::BTreeMap<String, serde_json::Value>>,

    // inherited: BMM_FORMAL_ELEMENT
    /// Declared or inferred static type of the entity.
    pub r#type: BmmType,
    /// True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes..
    pub is_nullable: Option<bool>,
}