#[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 {
#[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()
}
#[inline]
pub fn threshold(&self) -> &super::super::super::run::api::Duration {
&*self.threshold
}
#[inline]
pub fn connect_stale_points(&self) -> bool {
self.connect_stale_points
}
}