/// Adds one or more derived series to the base dataset. Each entry's definition must reference only the
/// wrapping `input`. Series names must be unique within the request; a derived name replaces a same-named
/// series from `input`.
#[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 WithSeriesDataset {
    #[builder(custom(type = super::Dataset, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::Dataset>,
    #[builder(default, list(item(type = super::NamedSeries)))]
    #[serde(rename = "series", skip_serializing_if = "Vec::is_empty", default)]
    series: Vec<super::NamedSeries>,
}
impl WithSeriesDataset {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::Dataset) -> Self {
        Self::builder().input(input).build()
    }
    /// The base dataset to which the new series will be added.
    #[inline]
    pub fn input(&self) -> &super::Dataset {
        &*self.input
    }
    /// The named derived series to add.
    #[inline]
    pub fn series(&self) -> &[super::NamedSeries] {
        &*self.series
    }
}
