#[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 ValueTableGridRowColumnConfig {
    #[serde(rename = "position")]
    position: i32,
    #[builder(default, into)]
    #[serde(rename = "header", skip_serializing_if = "Option::is_none", default)]
    header: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ValueTableMultiCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "cellConfig", skip_serializing_if = "Option::is_none", default)]
    cell_config: Option<Box<super::ValueTableMultiCellConfig>>,
}
impl ValueTableGridRowColumnConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(position: i32) -> Self {
        Self::builder().position(position).build()
    }
    /// The index of the row or column to apply this configuration to.
    #[inline]
    pub fn position(&self) -> i32 {
        self.position
    }
    #[inline]
    pub fn header(&self) -> Option<&str> {
        self.header.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn cell_config(&self) -> Option<&super::ValueTableMultiCellConfig> {
        self.cell_config.as_ref().map(|o| &**o)
    }
}
