nominal-api 0.1257.0

API bindings for the Nominal platform
Documentation
/// Selects a specific series from a dataset (might contain multiple tag groupings).
#[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 SelectSeries {
    #[builder(custom(type = super::StringConstant, convert = Box::new))]
    #[serde(rename = "name")]
    name: Box<super::StringConstant>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Dataset>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "dataset", skip_serializing_if = "Option::is_none", default)]
    dataset: Option<Box<super::Dataset>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Dataset>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "dataFrame", skip_serializing_if = "Option::is_none", default)]
    data_frame: Option<Box<super::Dataset>>,
}
impl SelectSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(name: super::StringConstant) -> Self {
        Self::builder().name(name).build()
    }
    /// The identifying series name to query
    #[inline]
    pub fn name(&self) -> &super::StringConstant {
        &*self.name
    }
    /// The dataset providing the data to query
    #[inline]
    pub fn dataset(&self) -> Option<&super::Dataset> {
        self.dataset.as_ref().map(|o| &**o)
    }
    /// The data frame providing the data to query
    #[deprecated(note = "use dataset instead.")]
    #[inline]
    pub fn data_frame(&self) -> Option<&super::Dataset> {
        self.data_frame.as_ref().map(|o| &**o)
    }
}