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

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

use crate::v1_1::bmm_persistence::p_bmm_package::PBmmPackage;
use crate::v1_1::bmm_persistence::p_bmm_schema::PBmmSchema;

/// Persisted form of a model component that contains packages.
#[doc(alias = "P_BMM_PACKAGE_CONTAINER")]
#[derive(Debug, Clone, PartialEq)]
pub struct PBmmPackageContainerData {
    /// Package structure as a hierarchy of packages each potentially containing names of classes in that package in the original model.
    pub packages: std::collections::BTreeMap<String, PBmmPackage>,
}

/// Polymorphic slot of `P_BMM_PACKAGE_CONTAINER`, dispatched on each payload's `_type`.
///
/// Persisted form of a model component that contains packages.
#[doc(alias = "P_BMM_PACKAGE_CONTAINER")]
#[derive(Debug, Clone, PartialEq)]
pub enum PBmmPackageContainer {
    /// The `P_BMM_PACKAGE` subtype of `P_BMM_PACKAGE_CONTAINER`.
    PBmmPackage(PBmmPackage),
    /// The `P_BMM_SCHEMA` subtype of `P_BMM_PACKAGE_CONTAINER`.
    PBmmSchema(PBmmSchema),
    /// An instance of `P_BMM_PACKAGE_CONTAINER` itself (its own, least-rich form).
    PBmmPackageContainer(PBmmPackageContainerData),
}