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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A pillar review summary of a lens review.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PillarReviewSummary {
    /// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
    /// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
    pub pillar_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the pillar.</p>
    pub pillar_name: ::std::option::Option<::std::string::String>,
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub notes: ::std::option::Option<::std::string::String>,
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub prioritized_risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
}
impl PillarReviewSummary {
    /// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
    /// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
    pub fn pillar_id(&self) -> ::std::option::Option<&str> {
        self.pillar_id.as_deref()
    }
    /// <p>The name of the pillar.</p>
    pub fn pillar_name(&self) -> ::std::option::Option<&str> {
        self.pillar_name.as_deref()
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn notes(&self) -> ::std::option::Option<&str> {
        self.notes.as_deref()
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn risk_counts(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::Risk, i32>> {
        self.risk_counts.as_ref()
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn prioritized_risk_counts(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::Risk, i32>> {
        self.prioritized_risk_counts.as_ref()
    }
}
impl PillarReviewSummary {
    /// Creates a new builder-style object to manufacture [`PillarReviewSummary`](crate::types::PillarReviewSummary).
    pub fn builder() -> crate::types::builders::PillarReviewSummaryBuilder {
        crate::types::builders::PillarReviewSummaryBuilder::default()
    }
}

/// A builder for [`PillarReviewSummary`](crate::types::PillarReviewSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PillarReviewSummaryBuilder {
    pub(crate) pillar_id: ::std::option::Option<::std::string::String>,
    pub(crate) pillar_name: ::std::option::Option<::std::string::String>,
    pub(crate) notes: ::std::option::Option<::std::string::String>,
    pub(crate) risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
    pub(crate) prioritized_risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
}
impl PillarReviewSummaryBuilder {
    /// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
    /// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
    pub fn pillar_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pillar_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
    /// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
    pub fn set_pillar_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pillar_id = input;
        self
    }
    /// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
    /// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
    pub fn get_pillar_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pillar_id
    }
    /// <p>The name of the pillar.</p>
    pub fn pillar_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pillar_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the pillar.</p>
    pub fn set_pillar_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pillar_name = input;
        self
    }
    /// <p>The name of the pillar.</p>
    pub fn get_pillar_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.pillar_name
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notes = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notes = input;
        self
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
        &self.notes
    }
    /// Adds a key-value pair to `risk_counts`.
    ///
    /// To override the contents of this collection use [`set_risk_counts`](Self::set_risk_counts).
    ///
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn risk_counts(mut self, k: crate::types::Risk, v: i32) -> Self {
        let mut hash_map = self.risk_counts.unwrap_or_default();
        hash_map.insert(k, v);
        self.risk_counts = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn set_risk_counts(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>) -> Self {
        self.risk_counts = input;
        self
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn get_risk_counts(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>> {
        &self.risk_counts
    }
    /// Adds a key-value pair to `prioritized_risk_counts`.
    ///
    /// To override the contents of this collection use [`set_prioritized_risk_counts`](Self::set_prioritized_risk_counts).
    ///
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn prioritized_risk_counts(mut self, k: crate::types::Risk, v: i32) -> Self {
        let mut hash_map = self.prioritized_risk_counts.unwrap_or_default();
        hash_map.insert(k, v);
        self.prioritized_risk_counts = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn set_prioritized_risk_counts(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>) -> Self {
        self.prioritized_risk_counts = input;
        self
    }
    /// <p>A map from risk names to the count of how many questions have that rating.</p>
    pub fn get_prioritized_risk_counts(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>> {
        &self.prioritized_risk_counts
    }
    /// Consumes the builder and constructs a [`PillarReviewSummary`](crate::types::PillarReviewSummary).
    pub fn build(self) -> crate::types::PillarReviewSummary {
        crate::types::PillarReviewSummary {
            pillar_id: self.pillar_id,
            pillar_name: self.pillar_name,
            notes: self.notes,
            risk_counts: self.risk_counts,
            prioritized_risk_counts: self.prioritized_risk_counts,
        }
    }
}