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

//! The openEHR `P_BMM_CONTAINER_PROPERTY` 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::feature::bmm_container_property::BmmContainerProperty;
use crate::v1_0::bmm_persistence::p_bmm_container_type::PBmmContainerType;
use crate::v1_0::bmm_persistence::p_bmm_indexed_container_property::PBmmIndexedContainerProperty;

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

    // inherited: P_BMM_PROPERTY
    /// Name of this property within its class. Persisted attribute.
    pub name: String,
    /// True if this property is mandatory in its class. Persisted attribute.
    pub is_mandatory: Option<bool>,
    /// True if this property is computed rather than stored in objects of this class. Persisted Attribute.
    pub is_computed: Option<bool>,
    /// True if this property is info model 'infrastructure' rather than 'data'. Persisted attribute.
    pub is_im_infrastructure: Option<bool>,
    /// True if this property is info model 'runtime' settable property. Persisted attribute.
    pub is_im_runtime: Option<bool>,
    /// Type definition of this property, if not a simple String type reference. Persistent attribute.
    pub type_def: Option<PBmmContainerType>,
    /// `BMM_PROPERTY` created by `_create_bmm_property_`.
    pub bmm_property: Option<BmmContainerProperty>,
    /// Cardinality of this property in its class. Persistent attribute.
    pub cardinality: Option<serde_json::Value>,
}

/// Polymorphic slot of `P_BMM_CONTAINER_PROPERTY`, dispatched on each payload's `_type`.
///
/// Persistent form of `BMM_CONTAINER_PROPERTY`.
#[doc(alias = "P_BMM_CONTAINER_PROPERTY")]
#[derive(Debug, Clone, PartialEq)]
pub enum PBmmContainerProperty {
    /// The `P_BMM_INDEXED_CONTAINER_PROPERTY` subtype of `P_BMM_CONTAINER_PROPERTY`.
    PBmmIndexedContainerProperty(PBmmIndexedContainerProperty),
    /// An instance of `P_BMM_CONTAINER_PROPERTY` itself (its own, least-rich form).
    PBmmContainerProperty(PBmmContainerPropertyData),
}