openehr-rm 0.0.128

openEHR RM Reference Model, generated from BMM: generations v1_1 (RM 1.1.0) and v1_2 (RM 1.2.0, current)
Documentation
// @generated by openehr-codegen from BMM (`AUTHORED_RESOURCE`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0

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

use crate::v1_1::common::generic::revision_history::RevisionHistory;
use crate::v1_1::common::resource::resource_description::ResourceDescription;
use crate::v1_1::common::resource::translation_details::TranslationDetails;
use crate::v1_1::data_types::text::code_phrase::CodePhrase;

/// Abstract idea of an online resource created by a human author.
#[doc(alias = "AUTHORED_RESOURCE")]
#[derive(Debug, Clone, PartialEq)]
pub struct AuthoredResource {
    /// Language in which this resource was initially authored.
    ///
    /// Although there is no language primacy of resources overall, the language of original authoring is required to ensure natural language translations can preserve quality. Language is relevant in both the description and ontology sections.
    pub original_language: CodePhrase,
    /// True if this resource is under any kind of change control (even file copying), in which case revision history is created.
    pub is_controlled: Option<bool>,
    /// List of details for each natural-language translation made of this resource, keyed by language.
    ///
    /// For each translation listed here, there must be corresponding sections in all language-dependent parts of the resource. The `_original_language_` does not appear in this list.
    pub translations: Option<std::collections::BTreeMap<String, TranslationDetails>>,
    /// Description and lifecycle information of the resource.
    pub description: Option<Box<ResourceDescription>>,
    /// The revision history of the resource. Only required if `_is_controlled_ = True` (avoids large revision histories for informal or private editing situations).
    pub revision_history: Option<RevisionHistory>,
}