nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 CartesianPlot {
    #[serde(rename = "xVariableName")]
    x_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
    #[serde(rename = "yVariableName")]
    y_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
    #[builder(default, into)]
    #[serde(
        rename = "secondaryVariables",
        skip_serializing_if = "Option::is_none",
        default
    )]
    secondary_variables: Option<Vec<super::SecondaryVariable>>,
    #[builder(default, into)]
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
    enabled: Option<bool>,
    #[serde(rename = "xAxisId")]
    x_axis_id: super::AxisId,
    #[serde(rename = "yAxisId")]
    y_axis_id: super::AxisId,
    #[serde(rename = "color")]
    color: super::super::super::api::HexColor,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ColorBy>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "colorBy", skip_serializing_if = "Option::is_none", default)]
    color_by: Option<Box<super::ColorBy>>,
}
impl CartesianPlot {
    #[inline]
    pub fn x_variable_name(
        &self,
    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
        &self.x_variable_name
    }
    #[inline]
    pub fn y_variable_name(
        &self,
    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
        &self.y_variable_name
    }
    #[inline]
    pub fn secondary_variables(&self) -> Option<&[super::SecondaryVariable]> {
        self.secondary_variables.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn enabled(&self) -> Option<bool> {
        self.enabled.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn x_axis_id(&self) -> &super::AxisId {
        &self.x_axis_id
    }
    #[inline]
    pub fn y_axis_id(&self) -> &super::AxisId {
        &self.y_axis_id
    }
    /// Default color for points
    #[inline]
    pub fn color(&self) -> &super::super::super::api::HexColor {
        &self.color
    }
    /// Configuration for dynamic coloring. Overrides color if specified.
    #[inline]
    pub fn color_by(&self) -> Option<&super::ColorBy> {
        self.color_by.as_ref().map(|o| &**o)
    }
}