nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Fits a curve to a series vs its timestamps.
#[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 TimeSeriesCurveFit {
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "series")]
    series: Box<super::NumericSeries>,
    #[builder(custom(type = super::TimeSeriesFitOptions, convert = Box::new))]
    #[serde(rename = "options")]
    options: Box<super::TimeSeriesFitOptions>,
}
impl TimeSeriesCurveFit {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        series: super::NumericSeries,
        options: super::TimeSeriesFitOptions,
    ) -> Self {
        Self::builder().series(series).options(options).build()
    }
    /// The series to fit. Timestamps will be used as x values and data as y values. The leftmost (earliest)
    /// timestamp will be used as the value of 0, and all other timestamps will be relative to that.
    #[inline]
    pub fn series(&self) -> &super::NumericSeries {
        &*self.series
    }
    #[inline]
    pub fn options(&self) -> &super::TimeSeriesFitOptions {
        &*self.options
    }
}