nominal-api-conjure 0.1449.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// A value table with three explicit layout modes: static, flow, and column.
/// Display settings live here rather than on the layout so a mode switch
/// preserves them; `column` has no home for them at all. The `grid` arm is
/// reused verbatim from V2, making a static V3 payload byte-identical to the
/// equivalent V2 one — the `v3` union tag is all that distinguishes them.
#[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 ValueTableDefinitionV3 {
    #[builder(default, into)]
    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
    title: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "showUnits", skip_serializing_if = "Option::is_none", default)]
    show_units: Option<bool>,
    #[builder(default, into)]
    #[serde(
        rename = "showStalenessIndicator",
        skip_serializing_if = "Option::is_none",
        default
    )]
    show_staleness_indicator: Option<bool>,
    #[builder(default, into)]
    #[serde(rename = "showCellLabels", skip_serializing_if = "Option::is_none", default)]
    show_cell_labels: Option<bool>,
    #[builder(default, into)]
    #[serde(
        rename = "showColumnHeaders",
        skip_serializing_if = "Option::is_none",
        default
    )]
    show_column_headers: Option<bool>,
    #[builder(default, into)]
    #[serde(rename = "showRowHeaders", skip_serializing_if = "Option::is_none", default)]
    show_row_headers: Option<bool>,
    #[builder(default, into)]
    #[serde(rename = "rowHeaderWidth", skip_serializing_if = "Option::is_none", default)]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    row_header_width: Option<f64>,
    #[builder(custom(type = super::ValueTableMultiCellConfig, convert = Box::new))]
    #[serde(rename = "gridDefaultCellConfigs")]
    grid_default_cell_configs: Box<super::ValueTableMultiCellConfig>,
    #[builder(custom(type = super::ValueTableLayoutV2, convert = Box::new))]
    #[serde(rename = "layout")]
    layout: Box<super::ValueTableLayoutV2>,
}
impl ValueTableDefinitionV3 {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        grid_default_cell_configs: super::ValueTableMultiCellConfig,
        layout: super::ValueTableLayoutV2,
    ) -> Self {
        Self::builder()
            .grid_default_cell_configs(grid_default_cell_configs)
            .layout(layout)
            .build()
    }
    /// The display title of the panel.
    #[inline]
    pub fn title(&self) -> Option<&str> {
        self.title.as_ref().map(|o| &**o)
    }
    /// If true, display units in the cells when available.
    #[inline]
    pub fn show_units(&self) -> Option<bool> {
        self.show_units.as_ref().map(|o| *o)
    }
    /// If true, display staleness indicator in the cells when available.
    #[inline]
    pub fn show_staleness_indicator(&self) -> Option<bool> {
        self.show_staleness_indicator.as_ref().map(|o| *o)
    }
    /// If true, display channel names in the cells.
    #[inline]
    pub fn show_cell_labels(&self) -> Option<bool> {
        self.show_cell_labels.as_ref().map(|o| *o)
    }
    /// If true, display column headers.
    #[inline]
    pub fn show_column_headers(&self) -> Option<bool> {
        self.show_column_headers.as_ref().map(|o| *o)
    }
    /// If true, display row headers.
    #[inline]
    pub fn show_row_headers(&self) -> Option<bool> {
        self.show_row_headers.as_ref().map(|o| *o)
    }
    /// The width of the row headers in pixels.
    #[inline]
    pub fn row_header_width(&self) -> Option<f64> {
        self.row_header_width.as_ref().map(|o| *o)
    }
    /// Panel-level defaults for cell visualisations, applying to every layout mode.
    #[inline]
    pub fn grid_default_cell_configs(&self) -> &super::ValueTableMultiCellConfig {
        &*self.grid_default_cell_configs
    }
    #[inline]
    pub fn layout(&self) -> &super::ValueTableLayoutV2 {
        &*self.layout
    }
}