nominal-api-conjure 0.1354.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Selects series from a dataset (might contain multiple tag groupings). When `name` is provided, selects
/// that single channel. When `name` is omitted, selection starts from all channels in the dataset scope;
/// callers narrow the selection with a `filterByTag` predicate on the reserved `NOMINAL_CHANNEL` tag key
/// and preserve per-channel identity in the response with `selectTags`. Providing both `name` and a
/// `NOMINAL_CHANNEL` filter is rejected as an invalid request. Raw and derived channels can both be selected
/// through the reserved tag filter.
#[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(
        default,
        custom(
            type = impl
            Into<Option<super::StringConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
    name: Option<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::Sampling>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "sampling", skip_serializing_if = "Option::is_none", default)]
    sampling: Option<Box<super::Sampling>>,
}
impl SelectSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// The identifying series name to query
    #[inline]
    pub fn name(&self) -> Option<&super::StringConstant> {
        self.name.as_ref().map(|o| &**o)
    }
    /// The dataset providing the data to query. May be omitted inside a `WithSeriesDataset` series definition,
    /// in which case it defaults to that node's wrapping `input`; required everywhere else.
    #[inline]
    pub fn dataset(&self) -> Option<&super::Dataset> {
        self.dataset.as_ref().map(|o| &**o)
    }
    /// Raw-series sampling options. Supported for numeric and enum raw series.
    #[inline]
    pub fn sampling(&self) -> Option<&super::Sampling> {
        self.sampling.as_ref().map(|o| &**o)
    }
}