aws_sdk_costexplorer/types/
_anomaly_score.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AnomalyScore {
7 pub max_score: f64,
9 pub current_score: f64,
11}
12impl AnomalyScore {
13 pub fn max_score(&self) -> f64 {
15 self.max_score
16 }
17 pub fn current_score(&self) -> f64 {
19 self.current_score
20 }
21}
22impl AnomalyScore {
23 pub fn builder() -> crate::types::builders::AnomalyScoreBuilder {
25 crate::types::builders::AnomalyScoreBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct AnomalyScoreBuilder {
33 pub(crate) max_score: ::std::option::Option<f64>,
34 pub(crate) current_score: ::std::option::Option<f64>,
35}
36impl AnomalyScoreBuilder {
37 pub fn max_score(mut self, input: f64) -> Self {
40 self.max_score = ::std::option::Option::Some(input);
41 self
42 }
43 pub fn set_max_score(mut self, input: ::std::option::Option<f64>) -> Self {
45 self.max_score = input;
46 self
47 }
48 pub fn get_max_score(&self) -> &::std::option::Option<f64> {
50 &self.max_score
51 }
52 pub fn current_score(mut self, input: f64) -> Self {
55 self.current_score = ::std::option::Option::Some(input);
56 self
57 }
58 pub fn set_current_score(mut self, input: ::std::option::Option<f64>) -> Self {
60 self.current_score = input;
61 self
62 }
63 pub fn get_current_score(&self) -> &::std::option::Option<f64> {
65 &self.current_score
66 }
67 pub fn build(self) -> crate::types::AnomalyScore {
69 crate::types::AnomalyScore {
70 max_score: self.max_score.unwrap_or_default(),
71 current_score: self.current_score.unwrap_or_default(),
72 }
73 }
74}