#[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 StalenessConfiguration {
    #[builder(
        custom(type = super::super::super::run::api::Duration, convert = Box::new)
    )]
    #[serde(rename = "threshold")]
    threshold: Box<super::super::super::run::api::Duration>,
    #[serde(rename = "connectStalePoints")]
    connect_stale_points: bool,
}
impl StalenessConfiguration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        threshold: super::super::super::run::api::Duration,
        connect_stale_points: bool,
    ) -> Self {
        Self::builder()
            .threshold(threshold)
            .connect_stale_points(connect_stale_points)
            .build()
    }
    /// The duration above which points are considered stale. By default this is 1 second.
    #[inline]
    pub fn threshold(&self) -> &super::super::super::run::api::Duration {
        &*self.threshold
    }
    /// Whether or not to visually connect stale points, i.e. points whose distance exceeds that of the configured threshold. By default this is true.
    #[inline]
    pub fn connect_stale_points(&self) -> bool {
        self.connect_stale_points
    }
}
