/// Keeps every Nth row of the timestamp-ordered input, per series. No grid arithmetic, no
/// interpolation, no boundary handling. Output count is ceil(input_count / n) per series.
/// Caller is responsible for choosing n consistent with the input's sample rate; output spacing
/// is only uniform when the input is.
#[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 NumericNthPointDownsampleSeries {
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::NumericSeries>,
    #[builder(custom(type = super::IntegerConstant, convert = Box::new))]
    #[serde(rename = "n")]
    n: Box<super::IntegerConstant>,
}
impl NumericNthPointDownsampleSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::NumericSeries, n: super::IntegerConstant) -> Self {
        Self::builder().input(input).n(n).build()
    }
    #[inline]
    pub fn input(&self) -> &super::NumericSeries {
        &*self.input
    }
    /// Keep every Nth point starting from the earliest in each series. Must be >= 1.
    #[inline]
    pub fn n(&self) -> &super::IntegerConstant {
        &*self.n
    }
}
