1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the result of the evaluation of a data quality rule.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DataQualityRuleResult {
    /// <p>The name of the data quality rule.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the data quality rule.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>An evaluation message.</p>
    pub evaluation_message: ::std::option::Option<::std::string::String>,
    /// <p>A pass or fail status for the rule.</p>
    pub result: ::std::option::Option<crate::types::DataQualityRuleResultStatus>,
    /// <p>A map of metrics associated with the evaluation of the rule.</p>
    pub evaluated_metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>,
}
impl DataQualityRuleResult {
    /// <p>The name of the data quality rule.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the data quality rule.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>An evaluation message.</p>
    pub fn evaluation_message(&self) -> ::std::option::Option<&str> {
        self.evaluation_message.as_deref()
    }
    /// <p>A pass or fail status for the rule.</p>
    pub fn result(&self) -> ::std::option::Option<&crate::types::DataQualityRuleResultStatus> {
        self.result.as_ref()
    }
    /// <p>A map of metrics associated with the evaluation of the rule.</p>
    pub fn evaluated_metrics(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, f64>> {
        self.evaluated_metrics.as_ref()
    }
}
impl DataQualityRuleResult {
    /// Creates a new builder-style object to manufacture [`DataQualityRuleResult`](crate::types::DataQualityRuleResult).
    pub fn builder() -> crate::types::builders::DataQualityRuleResultBuilder {
        crate::types::builders::DataQualityRuleResultBuilder::default()
    }
}

/// A builder for [`DataQualityRuleResult`](crate::types::DataQualityRuleResult).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DataQualityRuleResultBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) evaluation_message: ::std::option::Option<::std::string::String>,
    pub(crate) result: ::std::option::Option<crate::types::DataQualityRuleResultStatus>,
    pub(crate) evaluated_metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>,
}
impl DataQualityRuleResultBuilder {
    /// <p>The name of the data quality rule.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the data quality rule.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the data quality rule.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the data quality rule.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the data quality rule.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the data quality rule.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>An evaluation message.</p>
    pub fn evaluation_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evaluation_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An evaluation message.</p>
    pub fn set_evaluation_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evaluation_message = input;
        self
    }
    /// <p>An evaluation message.</p>
    pub fn get_evaluation_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.evaluation_message
    }
    /// <p>A pass or fail status for the rule.</p>
    pub fn result(mut self, input: crate::types::DataQualityRuleResultStatus) -> Self {
        self.result = ::std::option::Option::Some(input);
        self
    }
    /// <p>A pass or fail status for the rule.</p>
    pub fn set_result(mut self, input: ::std::option::Option<crate::types::DataQualityRuleResultStatus>) -> Self {
        self.result = input;
        self
    }
    /// <p>A pass or fail status for the rule.</p>
    pub fn get_result(&self) -> &::std::option::Option<crate::types::DataQualityRuleResultStatus> {
        &self.result
    }
    /// Adds a key-value pair to `evaluated_metrics`.
    ///
    /// To override the contents of this collection use [`set_evaluated_metrics`](Self::set_evaluated_metrics).
    ///
    /// <p>A map of metrics associated with the evaluation of the rule.</p>
    pub fn evaluated_metrics(mut self, k: impl ::std::convert::Into<::std::string::String>, v: f64) -> Self {
        let mut hash_map = self.evaluated_metrics.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.evaluated_metrics = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of metrics associated with the evaluation of the rule.</p>
    pub fn set_evaluated_metrics(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>) -> Self {
        self.evaluated_metrics = input;
        self
    }
    /// <p>A map of metrics associated with the evaluation of the rule.</p>
    pub fn get_evaluated_metrics(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, f64>> {
        &self.evaluated_metrics
    }
    /// Consumes the builder and constructs a [`DataQualityRuleResult`](crate::types::DataQualityRuleResult).
    pub fn build(self) -> crate::types::DataQualityRuleResult {
        crate::types::DataQualityRuleResult {
            name: self.name,
            description: self.description,
            evaluation_message: self.evaluation_message,
            result: self.result,
            evaluated_metrics: self.evaluated_metrics,
        }
    }
}