/// Snaps each point's timestamp to the start of its enclosing fixed-size time bucket. Buckets are
/// epoch-aligned: a point at timestamp `t` (nanoseconds) is rewritten to `floor(t / window) * window`.
/// Values and tag groupings are preserved; aggregation of points that collide on the snapped timestamp
/// is the responsibility of downstream nodes.
#[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 BooleanToStartOfIntervalSeries {
    #[builder(custom(type = super::BooleanSeries, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::BooleanSeries>,
    #[builder(custom(type = super::Duration, convert = Box::new))]
    #[serde(rename = "window")]
    window: Box<super::Duration>,
}
impl BooleanToStartOfIntervalSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::BooleanSeries, window: super::Duration) -> Self {
        Self::builder().input(input).window(window).build()
    }
    #[inline]
    pub fn input(&self) -> &super::BooleanSeries {
        &*self.input
    }
    #[inline]
    pub fn window(&self) -> &super::Duration {
        &*self.window
    }
}
