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

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

use crate::v1_1::data_types::quantity::date_time::dv_date_time::DvDateTime;
use crate::v1_1::data_types::quantity::dv_interval::DvInterval;

/// Specification of what versions should be included in an Extract.
///
/// By default, only latest versions are included in the Extract, in which case this part of the Extract specification is not needed at all. The attributes `_include_all_versions_` and `_commit_time_interval_` are used to modify this; the former forces all versions to be included; the latter limits the versions to be those latest versions committed in the time interval, or if `_include_all_versions_` is `True`, all versions committed in the time interval.
#[doc(alias = "EXTRACT_VERSION_SPEC")]
#[derive(Debug, Clone, PartialEq)]
pub struct ExtractVersionSpec {
    /// True if all versions of each item in the Extract are included.
    pub include_all_versions: bool,
    /// Specifies commit time interval of items to source repository to include in Extract.
    ///
    /// By default, only latest versions whose commit times fall in the range are included. If include_all_versions is True, then the range includes all versions committed within the interval.
    pub commit_time_interval: Option<DvInterval<DvDateTime>>,
    /// True if revision histories of the items in the Extract are included. If included, it is always the full revision history.
    pub include_revision_history: bool,
    /// `True` if the data of items matched by the content spec should be included.
    ///
    /// This is the default. If `False`, only revision history is included in serialised versions. Turning this option on in openEHR systems causes `X_VERSIONED_OBJECTs` to have `_revision_history_` set, but versions Void. Useful for interrogating a server without having to look at any content data. In other systems it may or may not have a sensible meaning.
    pub include_data: bool,
}