nominal-api-conjure 0.1452.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Uses the start timestamp of the range at the configured zero-based index from `ranges` evaluated over each
/// interval, considering only ranges whose start lies in the anchor window [start, end), or [start, +infinity)
/// when the end is absent. The window is the run bounds for a run anchor. A range already in progress when the
/// window opens anchors at the window start. Series in `ranges` that select no explicit dataset resolve
/// against the aligned input dataset, and the computed range groups must carry the aligned runs' `runRid`
/// grouping tags.
#[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 RangesAnchor {
    #[builder(custom(type = super::RangeSeries, convert = Box::new))]
    #[serde(rename = "ranges")]
    ranges: Box<super::RangeSeries>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::IntegerConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "index", skip_serializing_if = "Option::is_none", default)]
    index: Option<Box<super::IntegerConstant>>,
    #[builder(default, into)]
    #[serde(rename = "sortOrder", skip_serializing_if = "Option::is_none", default)]
    sort_order: Option<super::RangeSortOrder>,
}
impl RangesAnchor {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(ranges: super::RangeSeries) -> Self {
        Self::builder().ranges(ranges).build()
    }
    /// The range series evaluated per interval to locate the anchor range.
    #[inline]
    pub fn ranges(&self) -> &super::RangeSeries {
        &*self.ranges
    }
    /// Zero-based range index after sorting. Defaults to zero and must be non-negative.
    #[inline]
    pub fn index(&self) -> Option<&super::IntegerConstant> {
        self.index.as_ref().map(|o| &**o)
    }
    /// Ordering by range start timestamp before selecting the index. Defaults to ASC.
    #[inline]
    pub fn sort_order(&self) -> Option<&super::RangeSortOrder> {
        self.sort_order.as_ref().map(|o| &*o)
    }
}