#[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 NumericCellConfig {
    #[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::NumberFormat>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "numberFormat", skip_serializing_if = "Option::is_none", default)]
    number_format: Option<Box<super::NumberFormat>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumericGroupBySort>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "groupBySort", skip_serializing_if = "Option::is_none", default)]
    group_by_sort: Option<Box<super::NumericGroupBySort>>,
}
impl NumericCellConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn visualisation(&self) -> Option<&super::NumericValueVisualisationV2> {
        self.visualisation.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn number_format(&self) -> Option<&super::NumberFormat> {
        self.number_format.as_ref().map(|o| &**o)
    }
    /// Sorting configuration for grouped data rendering in a cell.
    /// If undefined, will sort alphabetically by grouping.
    #[inline]
    pub fn group_by_sort(&self) -> Option<&super::NumericGroupBySort> {
        self.group_by_sort.as_ref().map(|o| &**o)
    }
}
