/// Select the earliest N points from the input series by timestamp.
#[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 SelectOldestPointsSeries {
    #[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 = "numPoints")]
    num_points: Box<super::IntegerConstant>,
}
impl SelectOldestPointsSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::NumericSeries, num_points: super::IntegerConstant) -> Self {
        Self::builder().input(input).num_points(num_points).build()
    }
    /// The input series to select the oldest points from.
    #[inline]
    pub fn input(&self) -> &super::NumericSeries {
        &*self.input
    }
    /// The number of points to select.
    #[inline]
    pub fn num_points(&self) -> &super::IntegerConstant {
        &*self.num_points
    }
}
