Skip to main content

aws_sdk_connect/types/
_evaluation_score.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about scores of a contact evaluation item (section or question).</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EvaluationScore {
7    /// <p>The score percentage for an item in a contact evaluation.</p>
8    pub percentage: f64,
9    /// <p>The flag to mark the item as not applicable for scoring.</p>
10    pub not_applicable: bool,
11    /// <p>The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag will be true.</p>
12    pub automatic_fail: bool,
13    /// <p>Weight applied to this evaluation score.</p>
14    pub applied_weight: ::std::option::Option<f64>,
15}
16impl EvaluationScore {
17    /// <p>The score percentage for an item in a contact evaluation.</p>
18    pub fn percentage(&self) -> f64 {
19        self.percentage
20    }
21    /// <p>The flag to mark the item as not applicable for scoring.</p>
22    pub fn not_applicable(&self) -> bool {
23        self.not_applicable
24    }
25    /// <p>The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag will be true.</p>
26    pub fn automatic_fail(&self) -> bool {
27        self.automatic_fail
28    }
29    /// <p>Weight applied to this evaluation score.</p>
30    pub fn applied_weight(&self) -> ::std::option::Option<f64> {
31        self.applied_weight
32    }
33}
34impl EvaluationScore {
35    /// Creates a new builder-style object to manufacture [`EvaluationScore`](crate::types::EvaluationScore).
36    pub fn builder() -> crate::types::builders::EvaluationScoreBuilder {
37        crate::types::builders::EvaluationScoreBuilder::default()
38    }
39}
40
41/// A builder for [`EvaluationScore`](crate::types::EvaluationScore).
42#[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    /// <p>The score percentage for an item in a contact evaluation.</p>
52    pub fn percentage(mut self, input: f64) -> Self {
53        self.percentage = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The score percentage for an item in a contact evaluation.</p>
57    pub fn set_percentage(mut self, input: ::std::option::Option<f64>) -> Self {
58        self.percentage = input;
59        self
60    }
61    /// <p>The score percentage for an item in a contact evaluation.</p>
62    pub fn get_percentage(&self) -> &::std::option::Option<f64> {
63        &self.percentage
64    }
65    /// <p>The flag to mark the item as not applicable for scoring.</p>
66    pub fn not_applicable(mut self, input: bool) -> Self {
67        self.not_applicable = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>The flag to mark the item as not applicable for scoring.</p>
71    pub fn set_not_applicable(mut self, input: ::std::option::Option<bool>) -> Self {
72        self.not_applicable = input;
73        self
74    }
75    /// <p>The flag to mark the item as not applicable for scoring.</p>
76    pub fn get_not_applicable(&self) -> &::std::option::Option<bool> {
77        &self.not_applicable
78    }
79    /// <p>The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag will be true.</p>
80    pub fn automatic_fail(mut self, input: bool) -> Self {
81        self.automatic_fail = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag will be true.</p>
85    pub fn set_automatic_fail(mut self, input: ::std::option::Option<bool>) -> Self {
86        self.automatic_fail = input;
87        self
88    }
89    /// <p>The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag will be true.</p>
90    pub fn get_automatic_fail(&self) -> &::std::option::Option<bool> {
91        &self.automatic_fail
92    }
93    /// <p>Weight applied to this evaluation score.</p>
94    pub fn applied_weight(mut self, input: f64) -> Self {
95        self.applied_weight = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>Weight applied to this evaluation score.</p>
99    pub fn set_applied_weight(mut self, input: ::std::option::Option<f64>) -> Self {
100        self.applied_weight = input;
101        self
102    }
103    /// <p>Weight applied to this evaluation score.</p>
104    pub fn get_applied_weight(&self) -> &::std::option::Option<f64> {
105        &self.applied_weight
106    }
107    /// Consumes the builder and constructs a [`EvaluationScore`](crate::types::EvaluationScore).
108    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}