#[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 StalenessCellConfig {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::StalenessVisualisation>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "visualisation", skip_serializing_if = "Option::is_none", default)]
    visualisation: Option<Box<super::StalenessVisualisation>>,
    #[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 StalenessCellConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn visualisation(&self) -> Option<&super::StalenessVisualisation> {
        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::NumericGroupBySort> {
        self.group_by_sort.as_ref().map(|o| &**o)
    }
}
