// @generated by openehr-codegen from BMM (`BMM_PACKAGE_CONTAINER`) — DO NOT EDIT.
//! The openEHR `BMM_PACKAGE_CONTAINER` spec class, generated from the vendored BMM
//! meta-model.
use crate::bmm::core::bmm_model::BmmModel;
use crate::bmm::core::bmm_package::BmmPackage;
/// Abstraction of a BMM model component that contains packages and classes.
#[doc(alias = "BMM_PACKAGE_CONTAINER")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmPackageContainerData {
// inherited: BMM_MODEL_ELEMENT
/// Optional documentation of this element.
pub documentation: Option<String>,
/// Child packages; keys all in upper case for guaranteed matching.
pub packages: Option<std::collections::BTreeMap<String, BmmPackage>>,
}
/// Polymorphic slot of `BMM_PACKAGE_CONTAINER`, dispatched on each payload's `_type`.
///
/// Abstraction of a BMM model component that contains packages and classes.
#[doc(alias = "BMM_PACKAGE_CONTAINER")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmPackageContainer {
/// The `BMM_MODEL` subtype of `BMM_PACKAGE_CONTAINER`.
BmmModel(BmmModel),
/// The `BMM_PACKAGE` subtype of `BMM_PACKAGE_CONTAINER`.
BmmPackage(BmmPackage),
/// An instance of `BMM_PACKAGE_CONTAINER` itself (its own, least-rich form).
BmmPackageContainer(BmmPackageContainerData),
}