aws_sdk_connect/types/
_evaluation_score.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EvaluationScore {
7 pub percentage: f64,
9 pub not_applicable: bool,
11 pub automatic_fail: bool,
13 pub applied_weight: ::std::option::Option<f64>,
15}
16impl EvaluationScore {
17 pub fn percentage(&self) -> f64 {
19 self.percentage
20 }
21 pub fn not_applicable(&self) -> bool {
23 self.not_applicable
24 }
25 pub fn automatic_fail(&self) -> bool {
27 self.automatic_fail
28 }
29 pub fn applied_weight(&self) -> ::std::option::Option<f64> {
31 self.applied_weight
32 }
33}
34impl EvaluationScore {
35 pub fn builder() -> crate::types::builders::EvaluationScoreBuilder {
37 crate::types::builders::EvaluationScoreBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct EvaluationScoreBuilder {
45 pub(crate) percentage: ::std::option::Option<f64>,
46 pub(crate) not_applicable: ::std::option::Option<bool>,
47 pub(crate) automatic_fail: ::std::option::Option<bool>,
48 pub(crate) applied_weight: ::std::option::Option<f64>,
49}
50impl EvaluationScoreBuilder {
51 pub fn percentage(mut self, input: f64) -> Self {
53 self.percentage = ::std::option::Option::Some(input);
54 self
55 }
56 pub fn set_percentage(mut self, input: ::std::option::Option<f64>) -> Self {
58 self.percentage = input;
59 self
60 }
61 pub fn get_percentage(&self) -> &::std::option::Option<f64> {
63 &self.percentage
64 }
65 pub fn not_applicable(mut self, input: bool) -> Self {
67 self.not_applicable = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_not_applicable(mut self, input: ::std::option::Option<bool>) -> Self {
72 self.not_applicable = input;
73 self
74 }
75 pub fn get_not_applicable(&self) -> &::std::option::Option<bool> {
77 &self.not_applicable
78 }
79 pub fn automatic_fail(mut self, input: bool) -> Self {
81 self.automatic_fail = ::std::option::Option::Some(input);
82 self
83 }
84 pub fn set_automatic_fail(mut self, input: ::std::option::Option<bool>) -> Self {
86 self.automatic_fail = input;
87 self
88 }
89 pub fn get_automatic_fail(&self) -> &::std::option::Option<bool> {
91 &self.automatic_fail
92 }
93 pub fn applied_weight(mut self, input: f64) -> Self {
95 self.applied_weight = ::std::option::Option::Some(input);
96 self
97 }
98 pub fn set_applied_weight(mut self, input: ::std::option::Option<f64>) -> Self {
100 self.applied_weight = input;
101 self
102 }
103 pub fn get_applied_weight(&self) -> &::std::option::Option<f64> {
105 &self.applied_weight
106 }
107 pub fn build(self) -> crate::types::EvaluationScore {
109 crate::types::EvaluationScore {
110 percentage: self.percentage.unwrap_or_default(),
111 not_applicable: self.not_applicable.unwrap_or_default(),
112 automatic_fail: self.automatic_fail.unwrap_or_default(),
113 applied_weight: self.applied_weight,
114 }
115 }
116}