nominal-api-conjure 0.1445.0

Conjure HTTP 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 ValueTableColumnChannel {
    #[builder(into)]
    #[serde(rename = "variableName")]
    variable_name: String,
    #[builder(default, into)]
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none", default)]
    display_name: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumericValueVisualisationV2>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "visualisation", skip_serializing_if = "Option::is_none", default)]
    visualisation: Option<Box<super::NumericValueVisualisationV2>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ValueTableCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "cellConfig", skip_serializing_if = "Option::is_none", default)]
    cell_config: Option<Box<super::ValueTableCellConfig>>,
}
impl ValueTableColumnChannel {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(variable_name: impl Into<String>) -> Self {
        Self::builder().variable_name(variable_name).build()
    }
    #[inline]
    pub fn variable_name(&self) -> &str {
        &*self.variable_name
    }
    /// The column header. Falls back to the variable's own display name.
    #[inline]
    pub fn display_name(&self) -> Option<&str> {
        self.display_name.as_ref().map(|o| &**o)
    }
    /// Per-column numeric visualisation, such as thresholds. Superseded by
    /// `cellConfig`, which readers prefer when both are set; writers keep
    /// writing the numeric arm's visualisation here so older readers still
    /// see thresholds.
    #[inline]
    pub fn visualisation(&self) -> Option<&super::NumericValueVisualisationV2> {
        self.visualisation.as_ref().map(|o| &**o)
    }
    /// Per-column typed cell settings, shared by every row of the column —
    /// the same union a grid cell persists, so the column view reaches
    /// settings parity with the grid (number format, enum color map, range,
    /// staleness, bit flags). The populated arm doubles as the channel's
    /// cell type; absent means a numeric channel configured only by
    /// `visualisation`.
    #[inline]
    pub fn cell_config(&self) -> Option<&super::ValueTableCellConfig> {
        self.cell_config.as_ref().map(|o| &**o)
    }
}