/// Adds a derived numeric series to the base dataset. If a series with the same name already exists,
/// then it will be replaced.
#[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 WithNumericSeriesDataset {
    #[builder(custom(type = super::Dataset, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::Dataset>,
    #[builder(custom(type = super::StringConstant, convert = Box::new))]
    #[serde(rename = "name")]
    name: Box<super::StringConstant>,
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "definition")]
    definition: Box<super::NumericSeries>,
}
impl WithNumericSeriesDataset {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::Dataset,
        name: super::StringConstant,
        definition: super::NumericSeries,
    ) -> Self {
        Self::builder().input(input).name(name).definition(definition).build()
    }
    /// The base dataset to which the new series will be added.
    #[inline]
    pub fn input(&self) -> &super::Dataset {
        &*self.input
    }
    /// Name of the new derived series.
    #[inline]
    pub fn name(&self) -> &super::StringConstant {
        &*self.name
    }
    /// Compute expression defining the series values.
    #[inline]
    pub fn definition(&self) -> &super::NumericSeries {
        &*self.definition
    }
}
