nominal-api-conjure 0.1378.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Aligns each anchored portion of the input dataset onto a common anchor timestamp while preserving grouping
/// tags. Without a `reference` the selected anchor becomes timestamp zero, so the output is in a relative time
/// domain; with a `reference` the anchors are aligned onto the referenced portion's anchor and the output stays
/// in the input's absolute time domain. Currently run boundary and event anchors are supported, and every
/// storage-backed leaf of the input must resolve to run-backed branches.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct AnchorAlignedDataset {
    #[builder(custom(type = super::Dataset, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::Dataset>,
    #[builder(custom(type = super::DatasetAnchor, convert = Box::new))]
    #[serde(rename = "anchor")]
    anchor: Box<super::DatasetAnchor>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::AnchorReference>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "reference", skip_serializing_if = "Option::is_none", default)]
    reference: Option<Box<super::AnchorReference>>,
}
impl AnchorAlignedDataset {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::Dataset, anchor: super::DatasetAnchor) -> Self {
        Self::builder().input(input).anchor(anchor).build()
    }
    /// The dataset to align.
    #[inline]
    pub fn input(&self) -> &super::Dataset {
        &*self.input
    }
    /// Selects the timestamp each anchored portion of the input is aligned by.
    #[inline]
    pub fn anchor(&self) -> &super::DatasetAnchor {
        &*self.anchor
    }
    /// When present, each anchor is aligned onto the referenced anchor timestamp instead of onto timestamp
    /// zero, so output remains in the input's absolute time domain and the referenced portion is unshifted.
    /// When absent, the selected anchor becomes timestamp zero.
    #[inline]
    pub fn reference(&self) -> Option<&super::AnchorReference> {
        self.reference.as_ref().map(|o| &**o)
    }
}