openehr-rm 0.0.2

openEHR RM 1.2.0 Reference Model, generated from BMM
Documentation
// @generated by openehr-codegen from BMM (`MESSAGE`) — DO NOT EDIT.

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

use crate::common::generic::audit_details::AuditDetails;
use crate::common::generic::party_proxy::PartyProxy;
use crate::ehr_extract::message::message_content::MessageContent;

/// A “message” is an authored, possibly signed, piece of content intended for one or more recipients.
///
/// Since the recipient may or may not be known directly, recipients are specified in the `ADDRESSED_MESSAGE` class.
#[doc(alias = "MESSAGE")]
#[derive(Debug, Clone, PartialEq)]
pub struct Message {
    /// Details of who actually created the message and when. This is the person who entered the data or otherwise caused the message to be created, or might be a piece of software.
    pub audit: AuditDetails,
    /// Party responsible for the message content, who may or may not be technically responsible for its creation (e.g. by data entry etc).
    pub author: PartyProxy,
    /// Content of the message.
    pub content: MessageContent,
    /// Optional signature by the author of message content in openPGP format.
    ///
    /// The signature is created as a Hash and optional signing of the serialisation of this message object with this signature field Void.
    pub signature: Option<String>,
}