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

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

use crate::v1_1::bmm::core::bmm_class::BmmClass;
use crate::v1_1::bmm::core::bmm_container_type::BmmContainerType;
use crate::v1_1::bmm::core::bmm_generic_parameter::BmmGenericParameter;
use crate::v1_1::bmm::core::bmm_generic_type::BmmGenericType;
use crate::v1_1::bmm::core::bmm_open_type::BmmOpenType;
use crate::v1_1::bmm::core::bmm_package_container::BmmPackageContainer;
use crate::v1_1::bmm::core::bmm_property::BmmProperty;
use crate::v1_1::bmm::core::bmm_simple_type::BmmSimpleType;
use crate::v1_1::bmm::core::bmm_type::BmmType;
use crate::v1_1::bmm::rm_access::reference_model_access::ReferenceModelAccess;
use crate::v1_1::bmm::rm_access::schema_descriptor::SchemaDescriptor;

/// Definitions used by all BMM packages.
#[doc(alias = "BMM_DEFINITIONS")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmDefinitionsData {}

impl BmmDefinitionsData {
    /// Current internal version of BMM meta-model, used to determine if a given schema can be processed by a given implementation of the model.
    /// BMM constant `Bmm_internal_version`.
    pub const BMM_INTERNAL_VERSION: &str = "";

    /// Delimiter used to separate schema id from package path in a fully qualified path.
    /// BMM constant `Schema_name_delimiter`.
    pub const SCHEMA_NAME_DELIMITER: &str = "::";

    /// Delimiter used to separate package names in a package path.
    /// BMM constant `Package_name_delimiter`.
    pub const PACKAGE_NAME_DELIMITER: &str = ".";

    /// Extension used for BMM files.
    /// BMM constant `Bmm_schema_file_extension`.
    pub const BMM_SCHEMA_FILE_EXTENSION: &str = ".bmm";
}

/// Polymorphic slot of `BMM_DEFINITIONS`, dispatched on each payload's `_type`.
///
/// Definitions used by all BMM packages.
#[doc(alias = "BMM_DEFINITIONS")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmDefinitions {
    /// The `BMM_CLASS` subtype of `BMM_DEFINITIONS`.
    BmmClass(BmmClass),
    /// The `BMM_CONTAINER_TYPE` subtype of `BMM_DEFINITIONS`.
    BmmContainerType(BmmContainerType),
    /// The `BMM_GENERIC_PARAMETER` subtype of `BMM_DEFINITIONS`.
    BmmGenericParameter(BmmGenericParameter),
    /// The `BMM_GENERIC_TYPE` subtype of `BMM_DEFINITIONS`.
    BmmGenericType(BmmGenericType),
    /// The `BMM_OPEN_TYPE` subtype of `BMM_DEFINITIONS`.
    BmmOpenType(BmmOpenType),
    /// The `BMM_PACKAGE_CONTAINER` subtype of `BMM_DEFINITIONS`.
    BmmPackageContainer(BmmPackageContainer),
    /// The `BMM_PROPERTY` subtype of `BMM_DEFINITIONS`.
    BmmProperty(BmmProperty<BmmType>),
    /// The `BMM_SIMPLE_TYPE` subtype of `BMM_DEFINITIONS`.
    BmmSimpleType(BmmSimpleType),
    /// The `REFERENCE_MODEL_ACCESS` subtype of `BMM_DEFINITIONS`.
    ReferenceModelAccess(ReferenceModelAccess),
    /// The `SCHEMA_DESCRIPTOR` subtype of `BMM_DEFINITIONS`.
    SchemaDescriptor(SchemaDescriptor),
    /// An instance of `BMM_DEFINITIONS` itself (its own, least-rich form).
    BmmDefinitions(BmmDefinitionsData),
}