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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The severity of the finding.</p>
/// <p>The finding provider can provide the initial severity. The finding provider can only update the severity if it hasn't been updated using <code>BatchUpdateFindings</code>.</p>
/// <p>The finding must have either <code>Label</code> or <code>Normalized</code> populated. If only one of these attributes is populated, then Security Hub CSPM automatically populates the other one. If neither attribute is populated, then the finding is invalid. <code>Label</code> is the preferred attribute.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Severity {
/// <p>Deprecated. This attribute isn't included in findings. Instead of providing <code>Product</code>, provide <code>Original</code>.</p>
/// <p>The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding.</p>
pub product: ::std::option::Option<f64>,
/// <p>The severity value of the finding. The allowed values are the following.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - No issue was found.</p></li>
/// <li>
/// <p><code>LOW</code> - The issue does not require action on its own.</p></li>
/// <li>
/// <p><code>MEDIUM</code> - The issue must be addressed but not urgently.</p></li>
/// <li>
/// <p><code>HIGH</code> - The issue must be addressed as a priority.</p></li>
/// <li>
/// <p><code>CRITICAL</code> - The issue must be remediated immediately to avoid it escalating.</p></li>
/// </ul>
/// <p>If you provide <code>Normalized</code> and don't provide <code>Label</code>, then <code>Label</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p>0 - <code>INFORMATIONAL</code></p></li>
/// <li>
/// <p>1–39 - <code>LOW</code></p></li>
/// <li>
/// <p>40–69 - <code>MEDIUM</code></p></li>
/// <li>
/// <p>70–89 - <code>HIGH</code></p></li>
/// <li>
/// <p>90–100 - <code>CRITICAL</code></p></li>
/// </ul>
pub label: ::std::option::Option<crate::types::SeverityLabel>,
/// <p>Deprecated. The normalized severity of a finding. Instead of providing <code>Normalized</code>, provide <code>Label</code>.</p>
/// <p>The value of <code>Normalized</code> can be an integer between <code>0</code> and <code>100</code>.</p>
/// <p>If you provide <code>Label</code> and don't provide <code>Normalized</code>, then <code>Normalized</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - 0</p></li>
/// <li>
/// <p><code>LOW</code> - 1</p></li>
/// <li>
/// <p><code>MEDIUM</code> - 40</p></li>
/// <li>
/// <p><code>HIGH</code> - 70</p></li>
/// <li>
/// <p><code>CRITICAL</code> - 90</p></li>
/// </ul>
pub normalized: ::std::option::Option<i32>,
/// <p>The native severity from the finding product that generated the finding.</p>
/// <p>Length Constraints: Minimum length of 1. Maximum length of 64.</p>
pub original: ::std::option::Option<::std::string::String>,
}
impl Severity {
/// <p>Deprecated. This attribute isn't included in findings. Instead of providing <code>Product</code>, provide <code>Original</code>.</p>
/// <p>The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding.</p>
pub fn product(&self) -> ::std::option::Option<f64> {
self.product
}
/// <p>The severity value of the finding. The allowed values are the following.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - No issue was found.</p></li>
/// <li>
/// <p><code>LOW</code> - The issue does not require action on its own.</p></li>
/// <li>
/// <p><code>MEDIUM</code> - The issue must be addressed but not urgently.</p></li>
/// <li>
/// <p><code>HIGH</code> - The issue must be addressed as a priority.</p></li>
/// <li>
/// <p><code>CRITICAL</code> - The issue must be remediated immediately to avoid it escalating.</p></li>
/// </ul>
/// <p>If you provide <code>Normalized</code> and don't provide <code>Label</code>, then <code>Label</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p>0 - <code>INFORMATIONAL</code></p></li>
/// <li>
/// <p>1–39 - <code>LOW</code></p></li>
/// <li>
/// <p>40–69 - <code>MEDIUM</code></p></li>
/// <li>
/// <p>70–89 - <code>HIGH</code></p></li>
/// <li>
/// <p>90–100 - <code>CRITICAL</code></p></li>
/// </ul>
pub fn label(&self) -> ::std::option::Option<&crate::types::SeverityLabel> {
self.label.as_ref()
}
/// <p>Deprecated. The normalized severity of a finding. Instead of providing <code>Normalized</code>, provide <code>Label</code>.</p>
/// <p>The value of <code>Normalized</code> can be an integer between <code>0</code> and <code>100</code>.</p>
/// <p>If you provide <code>Label</code> and don't provide <code>Normalized</code>, then <code>Normalized</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - 0</p></li>
/// <li>
/// <p><code>LOW</code> - 1</p></li>
/// <li>
/// <p><code>MEDIUM</code> - 40</p></li>
/// <li>
/// <p><code>HIGH</code> - 70</p></li>
/// <li>
/// <p><code>CRITICAL</code> - 90</p></li>
/// </ul>
pub fn normalized(&self) -> ::std::option::Option<i32> {
self.normalized
}
/// <p>The native severity from the finding product that generated the finding.</p>
/// <p>Length Constraints: Minimum length of 1. Maximum length of 64.</p>
pub fn original(&self) -> ::std::option::Option<&str> {
self.original.as_deref()
}
}
impl Severity {
/// Creates a new builder-style object to manufacture [`Severity`](crate::types::Severity).
pub fn builder() -> crate::types::builders::SeverityBuilder {
crate::types::builders::SeverityBuilder::default()
}
}
/// A builder for [`Severity`](crate::types::Severity).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SeverityBuilder {
pub(crate) product: ::std::option::Option<f64>,
pub(crate) label: ::std::option::Option<crate::types::SeverityLabel>,
pub(crate) normalized: ::std::option::Option<i32>,
pub(crate) original: ::std::option::Option<::std::string::String>,
}
impl SeverityBuilder {
/// <p>Deprecated. This attribute isn't included in findings. Instead of providing <code>Product</code>, provide <code>Original</code>.</p>
/// <p>The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding.</p>
pub fn product(mut self, input: f64) -> Self {
self.product = ::std::option::Option::Some(input);
self
}
/// <p>Deprecated. This attribute isn't included in findings. Instead of providing <code>Product</code>, provide <code>Original</code>.</p>
/// <p>The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding.</p>
pub fn set_product(mut self, input: ::std::option::Option<f64>) -> Self {
self.product = input;
self
}
/// <p>Deprecated. This attribute isn't included in findings. Instead of providing <code>Product</code>, provide <code>Original</code>.</p>
/// <p>The native severity as defined by the Amazon Web Services service or integrated partner product that generated the finding.</p>
pub fn get_product(&self) -> &::std::option::Option<f64> {
&self.product
}
/// <p>The severity value of the finding. The allowed values are the following.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - No issue was found.</p></li>
/// <li>
/// <p><code>LOW</code> - The issue does not require action on its own.</p></li>
/// <li>
/// <p><code>MEDIUM</code> - The issue must be addressed but not urgently.</p></li>
/// <li>
/// <p><code>HIGH</code> - The issue must be addressed as a priority.</p></li>
/// <li>
/// <p><code>CRITICAL</code> - The issue must be remediated immediately to avoid it escalating.</p></li>
/// </ul>
/// <p>If you provide <code>Normalized</code> and don't provide <code>Label</code>, then <code>Label</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p>0 - <code>INFORMATIONAL</code></p></li>
/// <li>
/// <p>1–39 - <code>LOW</code></p></li>
/// <li>
/// <p>40–69 - <code>MEDIUM</code></p></li>
/// <li>
/// <p>70–89 - <code>HIGH</code></p></li>
/// <li>
/// <p>90–100 - <code>CRITICAL</code></p></li>
/// </ul>
pub fn label(mut self, input: crate::types::SeverityLabel) -> Self {
self.label = ::std::option::Option::Some(input);
self
}
/// <p>The severity value of the finding. The allowed values are the following.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - No issue was found.</p></li>
/// <li>
/// <p><code>LOW</code> - The issue does not require action on its own.</p></li>
/// <li>
/// <p><code>MEDIUM</code> - The issue must be addressed but not urgently.</p></li>
/// <li>
/// <p><code>HIGH</code> - The issue must be addressed as a priority.</p></li>
/// <li>
/// <p><code>CRITICAL</code> - The issue must be remediated immediately to avoid it escalating.</p></li>
/// </ul>
/// <p>If you provide <code>Normalized</code> and don't provide <code>Label</code>, then <code>Label</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p>0 - <code>INFORMATIONAL</code></p></li>
/// <li>
/// <p>1–39 - <code>LOW</code></p></li>
/// <li>
/// <p>40–69 - <code>MEDIUM</code></p></li>
/// <li>
/// <p>70–89 - <code>HIGH</code></p></li>
/// <li>
/// <p>90–100 - <code>CRITICAL</code></p></li>
/// </ul>
pub fn set_label(mut self, input: ::std::option::Option<crate::types::SeverityLabel>) -> Self {
self.label = input;
self
}
/// <p>The severity value of the finding. The allowed values are the following.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - No issue was found.</p></li>
/// <li>
/// <p><code>LOW</code> - The issue does not require action on its own.</p></li>
/// <li>
/// <p><code>MEDIUM</code> - The issue must be addressed but not urgently.</p></li>
/// <li>
/// <p><code>HIGH</code> - The issue must be addressed as a priority.</p></li>
/// <li>
/// <p><code>CRITICAL</code> - The issue must be remediated immediately to avoid it escalating.</p></li>
/// </ul>
/// <p>If you provide <code>Normalized</code> and don't provide <code>Label</code>, then <code>Label</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p>0 - <code>INFORMATIONAL</code></p></li>
/// <li>
/// <p>1–39 - <code>LOW</code></p></li>
/// <li>
/// <p>40–69 - <code>MEDIUM</code></p></li>
/// <li>
/// <p>70–89 - <code>HIGH</code></p></li>
/// <li>
/// <p>90–100 - <code>CRITICAL</code></p></li>
/// </ul>
pub fn get_label(&self) -> &::std::option::Option<crate::types::SeverityLabel> {
&self.label
}
/// <p>Deprecated. The normalized severity of a finding. Instead of providing <code>Normalized</code>, provide <code>Label</code>.</p>
/// <p>The value of <code>Normalized</code> can be an integer between <code>0</code> and <code>100</code>.</p>
/// <p>If you provide <code>Label</code> and don't provide <code>Normalized</code>, then <code>Normalized</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - 0</p></li>
/// <li>
/// <p><code>LOW</code> - 1</p></li>
/// <li>
/// <p><code>MEDIUM</code> - 40</p></li>
/// <li>
/// <p><code>HIGH</code> - 70</p></li>
/// <li>
/// <p><code>CRITICAL</code> - 90</p></li>
/// </ul>
pub fn normalized(mut self, input: i32) -> Self {
self.normalized = ::std::option::Option::Some(input);
self
}
/// <p>Deprecated. The normalized severity of a finding. Instead of providing <code>Normalized</code>, provide <code>Label</code>.</p>
/// <p>The value of <code>Normalized</code> can be an integer between <code>0</code> and <code>100</code>.</p>
/// <p>If you provide <code>Label</code> and don't provide <code>Normalized</code>, then <code>Normalized</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - 0</p></li>
/// <li>
/// <p><code>LOW</code> - 1</p></li>
/// <li>
/// <p><code>MEDIUM</code> - 40</p></li>
/// <li>
/// <p><code>HIGH</code> - 70</p></li>
/// <li>
/// <p><code>CRITICAL</code> - 90</p></li>
/// </ul>
pub fn set_normalized(mut self, input: ::std::option::Option<i32>) -> Self {
self.normalized = input;
self
}
/// <p>Deprecated. The normalized severity of a finding. Instead of providing <code>Normalized</code>, provide <code>Label</code>.</p>
/// <p>The value of <code>Normalized</code> can be an integer between <code>0</code> and <code>100</code>.</p>
/// <p>If you provide <code>Label</code> and don't provide <code>Normalized</code>, then <code>Normalized</code> is set automatically as follows.</p>
/// <ul>
/// <li>
/// <p><code>INFORMATIONAL</code> - 0</p></li>
/// <li>
/// <p><code>LOW</code> - 1</p></li>
/// <li>
/// <p><code>MEDIUM</code> - 40</p></li>
/// <li>
/// <p><code>HIGH</code> - 70</p></li>
/// <li>
/// <p><code>CRITICAL</code> - 90</p></li>
/// </ul>
pub fn get_normalized(&self) -> &::std::option::Option<i32> {
&self.normalized
}
/// <p>The native severity from the finding product that generated the finding.</p>
/// <p>Length Constraints: Minimum length of 1. Maximum length of 64.</p>
pub fn original(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.original = ::std::option::Option::Some(input.into());
self
}
/// <p>The native severity from the finding product that generated the finding.</p>
/// <p>Length Constraints: Minimum length of 1. Maximum length of 64.</p>
pub fn set_original(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.original = input;
self
}
/// <p>The native severity from the finding product that generated the finding.</p>
/// <p>Length Constraints: Minimum length of 1. Maximum length of 64.</p>
pub fn get_original(&self) -> &::std::option::Option<::std::string::String> {
&self.original
}
/// Consumes the builder and constructs a [`Severity`](crate::types::Severity).
pub fn build(self) -> crate::types::Severity {
crate::types::Severity {
product: self.product,
label: self.label,
normalized: self.normalized,
original: self.original,
}
}
}