nominal_api/conjure/objects/scout/chartdefinition/api/
staleness_configuration.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct StalenessConfiguration {
16 #[builder(
17 custom(type = super::super::super::run::api::Duration, convert = Box::new)
18 )]
19 #[serde(rename = "threshold")]
20 threshold: Box<super::super::super::run::api::Duration>,
21 #[serde(rename = "connectStalePoints")]
22 connect_stale_points: bool,
23}
24impl StalenessConfiguration {
25 #[inline]
27 pub fn new(
28 threshold: super::super::super::run::api::Duration,
29 connect_stale_points: bool,
30 ) -> Self {
31 Self::builder()
32 .threshold(threshold)
33 .connect_stale_points(connect_stale_points)
34 .build()
35 }
36 #[inline]
38 pub fn threshold(&self) -> &super::super::super::run::api::Duration {
39 &*self.threshold
40 }
41 #[inline]
43 pub fn connect_stale_points(&self) -> bool {
44 self.connect_stale_points
45 }
46}