#[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 ValueTableLayoutGrid {
#[builder(default, into)]
#[serde(rename = "showRowHeaders", skip_serializing_if = "Option::is_none", default)]
show_row_headers: 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 = "showCellLabels", skip_serializing_if = "Option::is_none", default)]
show_cell_labels: Option<bool>,
#[builder(custom(type = super::ValueTableMultiCellConfig, convert = Box::new))]
#[serde(rename = "gridDefaultCellConfigs")]
grid_default_cell_configs: Box<super::ValueTableMultiCellConfig>,
#[builder(default, list(item(type = super::ValueTableGridRowColumnConfig)))]
#[serde(rename = "columnConfigs", skip_serializing_if = "Vec::is_empty", default)]
column_configs: Vec<super::ValueTableGridRowColumnConfig>,
#[builder(default, list(item(type = super::ValueTableGridRowColumnConfig)))]
#[serde(rename = "rowConfigs", skip_serializing_if = "Vec::is_empty", default)]
row_configs: Vec<super::ValueTableGridRowColumnConfig>,
#[serde(rename = "rowCount")]
row_count: i32,
#[serde(rename = "columnCount")]
column_count: i32,
#[builder(default, list(item(type = super::ValueTableGridValueTableCell)))]
#[serde(rename = "cells", skip_serializing_if = "Vec::is_empty", default)]
cells: Vec<super::ValueTableGridValueTableCell>,
}
impl ValueTableLayoutGrid {
#[inline]
pub fn new(
grid_default_cell_configs: super::ValueTableMultiCellConfig,
row_count: i32,
column_count: i32,
) -> Self {
Self::builder()
.grid_default_cell_configs(grid_default_cell_configs)
.row_count(row_count)
.column_count(column_count)
.build()
}
#[inline]
pub fn show_row_headers(&self) -> Option<bool> {
self.show_row_headers.as_ref().map(|o| *o)
}
#[inline]
pub fn show_column_headers(&self) -> Option<bool> {
self.show_column_headers.as_ref().map(|o| *o)
}
#[inline]
pub fn show_cell_labels(&self) -> Option<bool> {
self.show_cell_labels.as_ref().map(|o| *o)
}
#[inline]
pub fn grid_default_cell_configs(&self) -> &super::ValueTableMultiCellConfig {
&*self.grid_default_cell_configs
}
#[inline]
pub fn column_configs(&self) -> &[super::ValueTableGridRowColumnConfig] {
&*self.column_configs
}
#[inline]
pub fn row_configs(&self) -> &[super::ValueTableGridRowColumnConfig] {
&*self.row_configs
}
#[inline]
pub fn row_count(&self) -> i32 {
self.row_count
}
#[inline]
pub fn column_count(&self) -> i32 {
self.column_count
}
#[inline]
pub fn cells(&self) -> &[super::ValueTableGridValueTableCell] {
&*self.cells
}
}