/// Applies Largest-Triangle-Three-Buckets to a numeric time series for visualization-oriented downsampling. The
/// algorithm preserves the first and last points, partitions the remaining input points based on the requested
/// output count, and selects points that preserve the visual shape of the series. Results are selected input
/// timestamp/value points, not fixed-width bucket aggregate rows.
#[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 NumericLargestTriangleThreeBucketsSeries {
    #[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 = "maxPointsToReturn")]
    max_points_to_return: Box<super::IntegerConstant>,
}
impl NumericLargestTriangleThreeBucketsSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::NumericSeries,
        max_points_to_return: super::IntegerConstant,
    ) -> Self {
        Self::builder().input(input).max_points_to_return(max_points_to_return).build()
    }
    #[inline]
    pub fn input(&self) -> &super::NumericSeries {
        &*self.input
    }
    /// Maximum number of selected points to return. Must be positive and no greater than 10,000.
    #[inline]
    pub fn max_points_to_return(&self) -> &super::IntegerConstant {
        &*self.max_points_to_return
    }
}
