#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct RangeCellConfig {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::RangeValueVisualisation>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "visualisation", skip_serializing_if = "Option::is_none", default)]
    visualisation: Option<Box<super::RangeValueVisualisation>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::RangeGroupBySort>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "groupBySort", skip_serializing_if = "Option::is_none", default)]
    group_by_sort: Option<Box<super::RangeGroupBySort>>,
}
impl RangeCellConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn visualisation(&self) -> Option<&super::RangeValueVisualisation> {
        self.visualisation.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::RangeGroupBySort> {
        self.group_by_sort.as_ref().map(|o| &**o)
    }
}
