1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// @generated by openehr-codegen from BMM (`BMM_PROPERTY`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
// Hand-written spec functions/invariants live in the sibling `*_impl.rs`.
//! The openEHR `BMM_PROPERTY` spec class, generated from the vendored BMM
//! meta-model.
use crate::v1_1::bmm::core::bmm_container_property::BmmContainerProperty;
/// Model of a property definition within a class definition of an object model. Generic parameter takes care of variants.
#[doc(alias = "BMM_PROPERTY")]
#[derive(Debug, Clone, PartialEq)]
pub struct BmmPropertyData<T> {
// inherited: BMM_MODEL_ELEMENT
/// Optional documentation of this element.
pub documentation: Option<String>,
/// Name of this property in the model.
pub name: String,
/// True if this property is mandatory in its class.
pub is_mandatory: Option<bool>,
/// True if this property is computed rather than stored in objects of this class.
pub is_computed: Option<bool>,
/// Formal type of this property.
pub r#type: T,
/// True if this property is marked with info model `_im_runtime_` property.
pub is_im_runtime: Option<bool>,
/// True if this property was marked with info model `_im_infrastructure_` flag.
pub is_im_infrastructure: Option<bool>,
}
/// Polymorphic slot of `BMM_PROPERTY`, dispatched on each payload's `_type`.
///
/// Model of a property definition within a class definition of an object model. Generic parameter takes care of variants.
#[doc(alias = "BMM_PROPERTY")]
#[derive(Debug, Clone, PartialEq)]
pub enum BmmProperty<T> {
/// The `BMM_CONTAINER_PROPERTY` subtype of `BMM_PROPERTY`.
BmmContainerProperty(BmmContainerProperty),
/// An instance of `BMM_PROPERTY` itself (its own, least-rich form).
BmmProperty(BmmPropertyData<T>),
}