aws_sdk_wellarchitected/types/
_pillar_review_summary.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PillarReviewSummary {
7 pub pillar_id: ::std::option::Option<::std::string::String>,
10 pub pillar_name: ::std::option::Option<::std::string::String>,
12 pub notes: ::std::option::Option<::std::string::String>,
15 pub risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
17 pub prioritized_risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
19}
20impl PillarReviewSummary {
21 pub fn pillar_id(&self) -> ::std::option::Option<&str> {
24 self.pillar_id.as_deref()
25 }
26 pub fn pillar_name(&self) -> ::std::option::Option<&str> {
28 self.pillar_name.as_deref()
29 }
30 pub fn notes(&self) -> ::std::option::Option<&str> {
33 self.notes.as_deref()
34 }
35 pub fn risk_counts(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::Risk, i32>> {
37 self.risk_counts.as_ref()
38 }
39 pub fn prioritized_risk_counts(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::Risk, i32>> {
41 self.prioritized_risk_counts.as_ref()
42 }
43}
44impl PillarReviewSummary {
45 pub fn builder() -> crate::types::builders::PillarReviewSummaryBuilder {
47 crate::types::builders::PillarReviewSummaryBuilder::default()
48 }
49}
50
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
53#[non_exhaustive]
54pub struct PillarReviewSummaryBuilder {
55 pub(crate) pillar_id: ::std::option::Option<::std::string::String>,
56 pub(crate) pillar_name: ::std::option::Option<::std::string::String>,
57 pub(crate) notes: ::std::option::Option<::std::string::String>,
58 pub(crate) risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
59 pub(crate) prioritized_risk_counts: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>,
60}
61impl PillarReviewSummaryBuilder {
62 pub fn pillar_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.pillar_id = ::std::option::Option::Some(input.into());
66 self
67 }
68 pub fn set_pillar_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.pillar_id = input;
72 self
73 }
74 pub fn get_pillar_id(&self) -> &::std::option::Option<::std::string::String> {
77 &self.pillar_id
78 }
79 pub fn pillar_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.pillar_name = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_pillar_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.pillar_name = input;
87 self
88 }
89 pub fn get_pillar_name(&self) -> &::std::option::Option<::std::string::String> {
91 &self.pillar_name
92 }
93 pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.notes = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.notes = input;
103 self
104 }
105 pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
108 &self.notes
109 }
110 pub fn risk_counts(mut self, k: crate::types::Risk, v: i32) -> Self {
116 let mut hash_map = self.risk_counts.unwrap_or_default();
117 hash_map.insert(k, v);
118 self.risk_counts = ::std::option::Option::Some(hash_map);
119 self
120 }
121 pub fn set_risk_counts(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>) -> Self {
123 self.risk_counts = input;
124 self
125 }
126 pub fn get_risk_counts(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>> {
128 &self.risk_counts
129 }
130 pub fn prioritized_risk_counts(mut self, k: crate::types::Risk, v: i32) -> Self {
136 let mut hash_map = self.prioritized_risk_counts.unwrap_or_default();
137 hash_map.insert(k, v);
138 self.prioritized_risk_counts = ::std::option::Option::Some(hash_map);
139 self
140 }
141 pub fn set_prioritized_risk_counts(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>>) -> Self {
143 self.prioritized_risk_counts = input;
144 self
145 }
146 pub fn get_prioritized_risk_counts(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::Risk, i32>> {
148 &self.prioritized_risk_counts
149 }
150 pub fn build(self) -> crate::types::PillarReviewSummary {
152 crate::types::PillarReviewSummary {
153 pillar_id: self.pillar_id,
154 pillar_name: self.pillar_name,
155 notes: self.notes,
156 risk_counts: self.risk_counts,
157 prioritized_risk_counts: self.prioritized_risk_counts,
158 }
159 }
160}