/// Rewrites each point's timestamp to the start of the epoch-aligned bucket of size `window`.
/// For a point at timestamp `t` (nanoseconds) and window `w` (nanoseconds), the new timestamp is
/// `floor(t / w) * w`. Values are unchanged. Multiple input points may end up sharing a timestamp;
/// downstream operators are responsible for handling duplicates (e.g., `aggregate` dedups via
/// the aggregation function).
#[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 ToStartOfIntervalSeriesNode {
    #[builder(custom(type = super::SeriesNode, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::SeriesNode>,
    #[builder(custom(type = super::Window, convert = Box::new))]
    #[serde(rename = "window")]
    window: Box<super::Window>,
}
impl ToStartOfIntervalSeriesNode {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::SeriesNode, window: super::Window) -> Self {
        Self::builder().input(input).window(window).build()
    }
    #[inline]
    pub fn input(&self) -> &super::SeriesNode {
        &*self.input
    }
    #[inline]
    pub fn window(&self) -> &super::Window {
        &*self.window
    }
}
