nominal_api/conjure/objects/scout/chartdefinition/api/
numeric_bar_gauge_visualisation.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 conjure_object::private::DeriveWith,
8 Copy
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct NumericBarGaugeVisualisation {
15 #[serde(rename = "lowThreshold")]
16 #[derive_with(with = conjure_object::private::DoubleWrapper)]
17 low_threshold: f64,
18 #[serde(rename = "highThreshold")]
19 #[derive_with(with = conjure_object::private::DoubleWrapper)]
20 high_threshold: f64,
21}
22impl NumericBarGaugeVisualisation {
23 #[inline]
25 pub fn new(low_threshold: f64, high_threshold: f64) -> Self {
26 Self::builder()
27 .low_threshold(low_threshold)
28 .high_threshold(high_threshold)
29 .build()
30 }
31 #[inline]
32 pub fn low_threshold(&self) -> f64 {
33 self.low_threshold
34 }
35 #[inline]
36 pub fn high_threshold(&self) -> f64 {
37 self.high_threshold
38 }
39}