openehr-am 0.0.78

openEHR AM Archetype Model, generated from BMM: generations v1_4 (AM 1.4.0, ADL 1.4) and v2_4 (AM 2.4.0, ADL 2; current)
Documentation
// @generated by openehr-codegen from BMM (`C_PRIMITIVE_OBJECT`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Vernum Projecten 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 `C_PRIMITIVE_OBJECT` spec class, generated from the vendored BMM
//! meta-model.

use crate::v2_4::aom2::constraint_model::primitive::c_boolean::CBoolean;
use crate::v2_4::aom2::constraint_model::primitive::c_date::CDate;
use crate::v2_4::aom2::constraint_model::primitive::c_date_time::CDateTime;
use crate::v2_4::aom2::constraint_model::primitive::c_duration::CDuration;
use crate::v2_4::aom2::constraint_model::primitive::c_integer::CInteger;
use crate::v2_4::aom2::constraint_model::primitive::c_real::CReal;
use crate::v2_4::aom2::constraint_model::primitive::c_string::CString;
use crate::v2_4::aom2::constraint_model::primitive::c_terminology_code::CTerminologyCode;
use crate::v2_4::aom2::constraint_model::primitive::c_time::CTime;

/// Closed subtype set of `C_PRIMITIVE_OBJECT`, dispatched on each payload's `_type`.
///
/// Parent of types representing constraints on primitive types.
///
/// Instances of this type represented in ADL inline form, the `_node_id_` attribute will have the special value `Primitive_node_id`; otherwise it will have the node id read during parsing.
#[doc(alias = "C_PRIMITIVE_OBJECT")]
#[derive(Debug, Clone, PartialEq)]
pub enum CPrimitiveObject {
    /// The `C_BOOLEAN` subtype of `C_PRIMITIVE_OBJECT`.
    CBoolean(CBoolean),
    /// The `C_DATE` subtype of `C_PRIMITIVE_OBJECT`.
    CDate(CDate),
    /// The `C_DATE_TIME` subtype of `C_PRIMITIVE_OBJECT`.
    CDateTime(CDateTime),
    /// The `C_DURATION` subtype of `C_PRIMITIVE_OBJECT`.
    CDuration(CDuration),
    /// The `C_INTEGER` subtype of `C_PRIMITIVE_OBJECT`.
    CInteger(CInteger),
    /// The `C_REAL` subtype of `C_PRIMITIVE_OBJECT`.
    CReal(CReal),
    /// The `C_STRING` subtype of `C_PRIMITIVE_OBJECT`.
    CString(CString),
    /// The `C_TERMINOLOGY_CODE` subtype of `C_PRIMITIVE_OBJECT`.
    CTerminologyCode(CTerminologyCode),
    /// The `C_TIME` subtype of `C_PRIMITIVE_OBJECT`.
    CTime(CTime),
}