openehr-am 0.0.129

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

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

use crate::v2_4::aom2::persistence::constraint_model::p_c_object::PCObject;

/// Abstract model of constraint on any kind of attribute node.
#[doc(alias = "P_C_ATTRIBUTE")]
#[derive(Debug, Clone, PartialEq)]
pub struct PCAttribute {
    /// Reference model attribute within the enclosing type represented by a C_OBJECT.
    pub rm_attribute_name: String,
    /// Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not).
    pub existence: Option<String>,
    /// Child C_OBJECT nodes.
    ///
    /// Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes.
    pub children: Option<Vec<PCObject>>,
    /// Within a differential specialised archetype, may be set to represent a deep path within the structure to which this constraint and its child constraints apply.
    pub differential_path: Option<String>,
    /// Cardinality constraint of attribute, if a container attribute.
    pub cardinality: Option<String>,
    /// Flag indicating whether this attribute constraint is on a container (i.e. multiply-valued) attribute.
    pub is_multiple: bool,
}