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_SCHEMA_CORE`) — DO NOT EDIT.

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

use crate::bmm::core::bmm_model::BmmModel;
use crate::bmm_persistence::p_bmm_schema::PBmmSchema;

/// Core properties of BMM_SCHEMA.
#[doc(alias = "BMM_SCHEMA_CORE")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmSchemaCoreData {
    /// Publisher of model expressed in the schema. Persisted attribute.
    pub rm_publisher: String,
    /// Release of model expressed in the schema as a 3-part numeric, e.g. "3.1.0". Persisted attribute.
    pub rm_release: String,
    /// Name of model expressed in schema; a 'schema' usually contains all of the packages of one 'model' of a publisher. A publisher with more than one model can have multiple schemas. Persisted attribute.
    pub schema_name: String,
    /// Revision of schema. Persisted attribute.
    pub schema_revision: String,
    /// Persisted attribute.
    pub schema_lifecycle_state: String,
    /// Primary author of schema. Persisted attribute.
    pub schema_author: String,
    /// Description of schema. Persisted attribute.
    pub schema_description: String,
    /// Contributing authors of schema. Persisted attribute.
    pub schema_contributors: Option<Vec<String>>,
    /// Name of a parent class used within the schema to provide archetype capability, enabling filtering of classes in RM visualisation. If empty, 'Any' is assumed. Persisted attribute.
    pub archetype_parent_class: Option<String>,
    /// Name of a parent class of logical 'data types' used within the schema to provide archetype capability, enabling filtering of classes in RM visualisation.
    ///
    /// If empty, 'Any' is assumed. Persisted attribute.
    pub archetype_data_value_parent_class: Option<String>,
    /// List of top-level package paths that provide the RM 'model' part in archetype identifiers, e.g. the path "org.openehr.ehr" gives "EHR" in "openEHR-EHR".
    ///
    /// Within this namespace, archetypes can be based on any class reachable from classes defined directly in these packages. Persisted attribute.
    pub archetype_rm_closure_packages: Option<Vec<String>>,
    /// If archetype_parent_class is not set, designate a class whose descendants should be made visible in tree and grid renderings of the archetype definition. Persisted attribute.
    pub archetype_visualise_descendants_of: Option<String>,
}

/// Polymorphic slot of `BMM_SCHEMA_CORE`, dispatched on each payload's `_type`.
///
/// Core properties of BMM_SCHEMA.
#[doc(alias = "BMM_SCHEMA_CORE")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmSchemaCore {
    /// The `BMM_MODEL` subtype of `BMM_SCHEMA_CORE`.
    BmmModel(BmmModel),
    /// The `P_BMM_SCHEMA` subtype of `BMM_SCHEMA_CORE`.
    PBmmSchema(PBmmSchema),
    /// An instance of `BMM_SCHEMA_CORE` itself (its own, least-rich form).
    BmmSchemaCore(BmmSchemaCoreData),
}