/// Configurations for each type of cell in a grouping of heterogenous cells, such as
/// for a row, for a column, or for the entire grid.
#[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 ValueTableMultiCellConfig {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::RangeCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "range", skip_serializing_if = "Option::is_none", default)]
    range: Option<Box<super::RangeCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::EnumCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "enum", skip_serializing_if = "Option::is_none", default)]
    enum_: Option<Box<super::EnumCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumericCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "numeric", skip_serializing_if = "Option::is_none", default)]
    numeric: Option<Box<super::NumericCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::StalenessCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "staleness", skip_serializing_if = "Option::is_none", default)]
    staleness: Option<Box<super::StalenessCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumericArrayCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "numericArray", skip_serializing_if = "Option::is_none", default)]
    numeric_array: Option<Box<super::NumericArrayCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::EnumArrayCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "enumArray", skip_serializing_if = "Option::is_none", default)]
    enum_array: Option<Box<super::EnumArrayCellConfig>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::StructCellConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "struct", skip_serializing_if = "Option::is_none", default)]
    struct_: Option<Box<super::StructCellConfig>>,
}
impl ValueTableMultiCellConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn range(&self) -> Option<&super::RangeCellConfig> {
        self.range.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn enum_(&self) -> Option<&super::EnumCellConfig> {
        self.enum_.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn numeric(&self) -> Option<&super::NumericCellConfig> {
        self.numeric.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn staleness(&self) -> Option<&super::StalenessCellConfig> {
        self.staleness.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn numeric_array(&self) -> Option<&super::NumericArrayCellConfig> {
        self.numeric_array.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn enum_array(&self) -> Option<&super::EnumArrayCellConfig> {
        self.enum_array.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn struct_(&self) -> Option<&super::StructCellConfig> {
        self.struct_.as_ref().map(|o| &**o)
    }
}
