1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>The number of managed nodes found for each patch severity level defined in the request filter.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct SeveritySummary {
|
7 + | /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
|
8 + | pub critical_count: i32,
|
9 + | /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
|
10 + | pub high_count: i32,
|
11 + | /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
|
12 + | pub medium_count: i32,
|
13 + | /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
|
14 + | pub low_count: i32,
|
15 + | /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
|
16 + | pub informational_count: i32,
|
17 + | /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
|
18 + | pub unspecified_count: i32,
|
19 + | }
|
20 + | impl SeveritySummary {
|
21 + | /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
|
22 + | pub fn critical_count(&self) -> i32 {
|
23 + | self.critical_count
|
24 + | }
|
25 + | /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
|
26 + | pub fn high_count(&self) -> i32 {
|
27 + | self.high_count
|
28 + | }
|
29 + | /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
|
30 + | pub fn medium_count(&self) -> i32 {
|
31 + | self.medium_count
|
32 + | }
|
33 + | /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
|
34 + | pub fn low_count(&self) -> i32 {
|
35 + | self.low_count
|
36 + | }
|
37 + | /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
|
38 + | pub fn informational_count(&self) -> i32 {
|
39 + | self.informational_count
|
40 + | }
|
41 + | /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
|
42 + | pub fn unspecified_count(&self) -> i32 {
|
43 + | self.unspecified_count
|
44 + | }
|
45 + | }
|
46 + | static SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
47 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$CriticalCount", "com.amazonaws.ssm", "SeveritySummary"),
|
48 + | ::aws_smithy_schema::ShapeType::Integer,
|
49 + | "CriticalCount",
|
50 + | 0,
|
51 + | );
|
52 + | static SEVERITYSUMMARY_MEMBER_HIGH_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
53 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$HighCount", "com.amazonaws.ssm", "SeveritySummary"),
|
54 + | ::aws_smithy_schema::ShapeType::Integer,
|
55 + | "HighCount",
|
56 + | 1,
|
57 + | );
|
58 + | static SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
59 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$MediumCount", "com.amazonaws.ssm", "SeveritySummary"),
|
60 + | ::aws_smithy_schema::ShapeType::Integer,
|
61 + | "MediumCount",
|
62 + | 2,
|
63 + | );
|
64 + | static SEVERITYSUMMARY_MEMBER_LOW_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
65 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$LowCount", "com.amazonaws.ssm", "SeveritySummary"),
|
66 + | ::aws_smithy_schema::ShapeType::Integer,
|
67 + | "LowCount",
|
68 + | 3,
|
69 + | );
|
70 + | static SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
71 + | ::aws_smithy_schema::ShapeId::from_parts(
|
72 + | "com.amazonaws.ssm#SeveritySummary$InformationalCount",
|
73 + | "com.amazonaws.ssm",
|
74 + | "SeveritySummary",
|
75 + | ),
|
76 + | ::aws_smithy_schema::ShapeType::Integer,
|
77 + | "InformationalCount",
|
78 + | 4,
|
79 + | );
|
80 + | static SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
81 + | ::aws_smithy_schema::ShapeId::from_parts(
|
82 + | "com.amazonaws.ssm#SeveritySummary$UnspecifiedCount",
|
83 + | "com.amazonaws.ssm",
|
84 + | "SeveritySummary",
|
85 + | ),
|
86 + | ::aws_smithy_schema::ShapeType::Integer,
|
87 + | "UnspecifiedCount",
|
88 + | 5,
|
89 + | );
|
90 + | static SEVERITYSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
91 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary", "com.amazonaws.ssm", "SeveritySummary"),
|
92 + | ::aws_smithy_schema::ShapeType::Structure,
|
93 + | &[
|
94 + | &SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT,
|
95 + | &SEVERITYSUMMARY_MEMBER_HIGH_COUNT,
|
96 + | &SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT,
|
97 + | &SEVERITYSUMMARY_MEMBER_LOW_COUNT,
|
98 + | &SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT,
|
99 + | &SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT,
|
100 + | ],
|
101 + | );
|
102 + | impl SeveritySummary {
|
103 + | /// The schema for this shape.
|
104 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SEVERITYSUMMARY_SCHEMA;
|
105 + | }
|
106 + | impl ::aws_smithy_schema::serde::SerializableStruct for SeveritySummary {
|
107 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
108 + | fn serialize_members(
|
109 + | &self,
|
110 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
111 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
112 + | {
|
113 + | let val = &self.critical_count;
|
114 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT, *val)?;
|
115 + | }
|
116 + | {
|
117 + | let val = &self.high_count;
|
118 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_HIGH_COUNT, *val)?;
|
119 + | }
|
120 + | {
|
121 + | let val = &self.medium_count;
|
122 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT, *val)?;
|
123 + | }
|
124 + | {
|
125 + | let val = &self.low_count;
|
126 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_LOW_COUNT, *val)?;
|
127 + | }
|
128 + | {
|
129 + | let val = &self.informational_count;
|
130 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT, *val)?;
|
131 + | }
|
132 + | {
|
133 + | let val = &self.unspecified_count;
|
134 + | ser.write_integer(&SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT, *val)?;
|
135 + | }
|
136 + | Ok(())
|
137 + | }
|
138 + | }
|
139 + | impl SeveritySummary {
|
140 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
141 + | pub fn deserialize(
|
142 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
143 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
144 + | #[allow(unused_variables, unused_mut)]
|
145 + | let mut builder = Self::builder();
|
146 + | #[allow(
|
147 + | unused_variables,
|
148 + | unreachable_code,
|
149 + | clippy::single_match,
|
150 + | clippy::match_single_binding,
|
151 + | clippy::diverging_sub_expression
|
152 + | )]
|
153 + | deserializer.read_struct(&SEVERITYSUMMARY_SCHEMA, &mut |member, deser| {
|
154 + | match member.member_index() {
|
155 + | Some(0) => {
|
156 + | builder.critical_count = Some(deser.read_integer(member)?);
|
157 + | }
|
158 + | Some(1) => {
|
159 + | builder.high_count = Some(deser.read_integer(member)?);
|
160 + | }
|
161 + | Some(2) => {
|
162 + | builder.medium_count = Some(deser.read_integer(member)?);
|
163 + | }
|
164 + | Some(3) => {
|
165 + | builder.low_count = Some(deser.read_integer(member)?);
|
166 + | }
|
167 + | Some(4) => {
|
168 + | builder.informational_count = Some(deser.read_integer(member)?);
|
169 + | }
|
170 + | Some(5) => {
|
171 + | builder.unspecified_count = Some(deser.read_integer(member)?);
|
172 + | }
|
173 + | _ => {}
|
174 + | }
|
175 + | Ok(())
|
176 + | })?;
|
177 + | Ok(builder.build())
|
178 + | }
|
179 + | }
|
180 + | impl SeveritySummary {
|
181 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
182 + | pub fn deserialize_with_response(
|
183 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
184 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
185 + | _status: u16,
|
186 + | _body: &[u8],
|
187 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
188 + | Self::deserialize(deserializer)
|
189 + | }
|
190 + | }
|
191 + | impl SeveritySummary {
|
192 + | /// Creates a new builder-style object to manufacture [`SeveritySummary`](crate::types::SeveritySummary).
|
193 + | pub fn builder() -> crate::types::builders::SeveritySummaryBuilder {
|
194 + | crate::types::builders::SeveritySummaryBuilder::default()
|
195 + | }
|
196 + | }
|
197 + |
|
198 + | /// A builder for [`SeveritySummary`](crate::types::SeveritySummary).
|
199 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
200 + | #[non_exhaustive]
|
201 + | pub struct SeveritySummaryBuilder {
|
202 + | pub(crate) critical_count: ::std::option::Option<i32>,
|
203 + | pub(crate) high_count: ::std::option::Option<i32>,
|
204 + | pub(crate) medium_count: ::std::option::Option<i32>,
|
205 + | pub(crate) low_count: ::std::option::Option<i32>,
|
206 + | pub(crate) informational_count: ::std::option::Option<i32>,
|
207 + | pub(crate) unspecified_count: ::std::option::Option<i32>,
|
208 + | }
|
209 + | impl SeveritySummaryBuilder {
|
210 + | /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
|
211 + | pub fn critical_count(mut self, input: i32) -> Self {
|
212 + | self.critical_count = ::std::option::Option::Some(input);
|
213 + | self
|
214 + | }
|
215 + | /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
|
216 + | pub fn set_critical_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
217 + | self.critical_count = input;
|
218 + | self
|
219 + | }
|
220 + | /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
|
221 + | pub fn get_critical_count(&self) -> &::std::option::Option<i32> {
|
222 + | &self.critical_count
|
223 + | }
|
224 + | /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
|
225 + | pub fn high_count(mut self, input: i32) -> Self {
|
226 + | self.high_count = ::std::option::Option::Some(input);
|
227 + | self
|
228 + | }
|
229 + | /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
|
230 + | pub fn set_high_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
231 + | self.high_count = input;
|
232 + | self
|
233 + | }
|
234 + | /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
|
235 + | pub fn get_high_count(&self) -> &::std::option::Option<i32> {
|
236 + | &self.high_count
|
237 + | }
|
238 + | /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
|
239 + | pub fn medium_count(mut self, input: i32) -> Self {
|
240 + | self.medium_count = ::std::option::Option::Some(input);
|
241 + | self
|
242 + | }
|
243 + | /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
|
244 + | pub fn set_medium_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
245 + | self.medium_count = input;
|
246 + | self
|
247 + | }
|
248 + | /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
|
249 + | pub fn get_medium_count(&self) -> &::std::option::Option<i32> {
|
250 + | &self.medium_count
|
251 + | }
|
252 + | /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
|
253 + | pub fn low_count(mut self, input: i32) -> Self {
|
254 + | self.low_count = ::std::option::Option::Some(input);
|
255 + | self
|
256 + | }
|
257 + | /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
|
258 + | pub fn set_low_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
259 + | self.low_count = input;
|
260 + | self
|
261 + | }
|
262 + | /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
|
263 + | pub fn get_low_count(&self) -> &::std::option::Option<i32> {
|
264 + | &self.low_count
|
265 + | }
|
266 + | /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
|
267 + | pub fn informational_count(mut self, input: i32) -> Self {
|
268 + | self.informational_count = ::std::option::Option::Some(input);
|
269 + | self
|
270 + | }
|
271 + | /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
|
272 + | pub fn set_informational_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
273 + | self.informational_count = input;
|
274 + | self
|
275 + | }
|
276 + | /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
|
277 + | pub fn get_informational_count(&self) -> &::std::option::Option<i32> {
|
278 + | &self.informational_count
|
279 + | }
|
280 + | /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
|
281 + | pub fn unspecified_count(mut self, input: i32) -> Self {
|
282 + | self.unspecified_count = ::std::option::Option::Some(input);
|
283 + | self
|
284 + | }
|
285 + | /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
|
286 + | pub fn set_unspecified_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
287 + | self.unspecified_count = input;
|
288 + | self
|
289 + | }
|
290 + | /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
|
291 + | pub fn get_unspecified_count(&self) -> &::std::option::Option<i32> {
|
292 + | &self.unspecified_count
|
293 + | }
|
294 + | /// Consumes the builder and constructs a [`SeveritySummary`](crate::types::SeveritySummary).
|
295 + | pub fn build(self) -> crate::types::SeveritySummary {
|
296 + | crate::types::SeveritySummary {
|
297 + | critical_count: self.critical_count.unwrap_or_default(),
|
298 + | high_count: self.high_count.unwrap_or_default(),
|
299 + | medium_count: self.medium_count.unwrap_or_default(),
|
300 + | low_count: self.low_count.unwrap_or_default(),
|
301 + | informational_count: self.informational_count.unwrap_or_default(),
|
302 + | unspecified_count: self.unspecified_count.unwrap_or_default(),
|
303 + | }
|
304 + | }
|
305 + | }
|