nominal-api-conjure 0.1346.1

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Shift by the start timestamp of the event at the configured zero-based index from this query whose event
/// time lies in the anchor window [start, end), or [start, +infinity) when the end is absent. The window is the
/// tagging interval for tagByIntervals and the run bounds for a run anchor. The query may differ from the query
/// that produced a tagging interval.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct EventTimeShift {
    #[builder(
        custom(
            type = super::super::super::rids::api::ComputeEventQuery,
            convert = Box::new
        )
    )]
    #[serde(rename = "query")]
    query: Box<super::super::super::rids::api::ComputeEventQuery>,
    #[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::EventSortOrder>,
}
impl EventTimeShift {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(query: super::super::super::rids::api::ComputeEventQuery) -> Self {
        Self::builder().query(query).build()
    }
    #[inline]
    pub fn query(&self) -> &super::super::super::rids::api::ComputeEventQuery {
        &*self.query
    }
    /// Zero-based event 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 event start timestamp before selecting the index. Defaults to ASC.
    #[inline]
    pub fn sort_order(&self) -> Option<&super::EventSortOrder> {
        self.sort_order.as_ref().map(|o| &*o)
    }
}