1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Information about the compliance as defined by the resource type. For example, for a patch resource type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct ComplianceItem {
|
7 + | /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
|
8 + | pub compliance_type: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
|
10 + | pub resource_type: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
|
12 + | pub resource_id: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
|
14 + | pub id: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
|
16 + | pub title: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
|
18 + | pub status: ::std::option::Option<crate::types::ComplianceStatus>,
|
19 + | /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
|
20 + | pub severity: ::std::option::Option<crate::types::ComplianceSeverity>,
|
21 + | /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
|
22 + | /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
|
23 + | /// </important>
|
24 + | pub execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
|
25 + | /// <p>A "Key": "Value" tag combination for the compliance item.</p>
|
26 + | pub details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
27 + | }
|
28 + | impl ComplianceItem {
|
29 + | /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
|
30 + | pub fn compliance_type(&self) -> ::std::option::Option<&str> {
|
31 + | self.compliance_type.as_deref()
|
32 + | }
|
33 + | /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
|
34 + | pub fn resource_type(&self) -> ::std::option::Option<&str> {
|
35 + | self.resource_type.as_deref()
|
36 + | }
|
37 + | /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
|
38 + | pub fn resource_id(&self) -> ::std::option::Option<&str> {
|
39 + | self.resource_id.as_deref()
|
40 + | }
|
41 + | /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
|
42 + | pub fn id(&self) -> ::std::option::Option<&str> {
|
43 + | self.id.as_deref()
|
44 + | }
|
45 + | /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
|
46 + | pub fn title(&self) -> ::std::option::Option<&str> {
|
47 + | self.title.as_deref()
|
48 + | }
|
49 + | /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
|
50 + | pub fn status(&self) -> ::std::option::Option<&crate::types::ComplianceStatus> {
|
51 + | self.status.as_ref()
|
52 + | }
|
53 + | /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
|
54 + | pub fn severity(&self) -> ::std::option::Option<&crate::types::ComplianceSeverity> {
|
55 + | self.severity.as_ref()
|
56 + | }
|
57 + | /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
|
58 + | /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
|
59 + | /// </important>
|
60 + | pub fn execution_summary(&self) -> ::std::option::Option<&crate::types::ComplianceExecutionSummary> {
|
61 + | self.execution_summary.as_ref()
|
62 + | }
|
63 + | /// <p>A "Key": "Value" tag combination for the compliance item.</p>
|
64 + | pub fn details(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
65 + | self.details.as_ref()
|
66 + | }
|
67 + | }
|
68 + | static COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
69 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ComplianceType", "com.amazonaws.ssm", "ComplianceItem"),
|
70 + | ::aws_smithy_schema::ShapeType::String,
|
71 + | "ComplianceType",
|
72 + | 0,
|
73 + | );
|
74 + | static COMPLIANCEITEM_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
75 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ResourceType", "com.amazonaws.ssm", "ComplianceItem"),
|
76 + | ::aws_smithy_schema::ShapeType::String,
|
77 + | "ResourceType",
|
78 + | 1,
|
79 + | );
|
80 + | static COMPLIANCEITEM_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
81 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ResourceId", "com.amazonaws.ssm", "ComplianceItem"),
|
82 + | ::aws_smithy_schema::ShapeType::String,
|
83 + | "ResourceId",
|
84 + | 2,
|
85 + | );
|
86 + | static COMPLIANCEITEM_MEMBER_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
87 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Id", "com.amazonaws.ssm", "ComplianceItem"),
|
88 + | ::aws_smithy_schema::ShapeType::String,
|
89 + | "Id",
|
90 + | 3,
|
91 + | );
|
92 + | static COMPLIANCEITEM_MEMBER_TITLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
93 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Title", "com.amazonaws.ssm", "ComplianceItem"),
|
94 + | ::aws_smithy_schema::ShapeType::String,
|
95 + | "Title",
|
96 + | 4,
|
97 + | );
|
98 + | static COMPLIANCEITEM_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
99 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Status", "com.amazonaws.ssm", "ComplianceItem"),
|
100 + | ::aws_smithy_schema::ShapeType::String,
|
101 + | "Status",
|
102 + | 5,
|
103 + | );
|
104 + | static COMPLIANCEITEM_MEMBER_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
105 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Severity", "com.amazonaws.ssm", "ComplianceItem"),
|
106 + | ::aws_smithy_schema::ShapeType::String,
|
107 + | "Severity",
|
108 + | 6,
|
109 + | );
|
110 + | static COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
111 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ExecutionSummary", "com.amazonaws.ssm", "ComplianceItem"),
|
112 + | ::aws_smithy_schema::ShapeType::Structure,
|
113 + | "ExecutionSummary",
|
114 + | 7,
|
115 + | );
|
116 + | static COMPLIANCEITEM_MEMBER_DETAILS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
117 + | ::aws_smithy_schema::ShapeId::from_parts(
|
118 + | "com.amazonaws.ssm#ComplianceItemDetails$key",
|
119 + | "com.amazonaws.ssm",
|
120 + | "ComplianceItemDetails",
|
121 + | ),
|
122 + | ::aws_smithy_schema::ShapeType::String,
|
123 + | "key",
|
124 + | 0,
|
125 + | );
|
126 + | static COMPLIANCEITEM_MEMBER_DETAILS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
127 + | ::aws_smithy_schema::ShapeId::from_parts(
|
128 + | "com.amazonaws.ssm#ComplianceItemDetails$value",
|
129 + | "com.amazonaws.ssm",
|
130 + | "ComplianceItemDetails",
|
131 + | ),
|
132 + | ::aws_smithy_schema::ShapeType::String,
|
133 + | "value",
|
134 + | 1,
|
135 + | );
|
136 + | static COMPLIANCEITEM_MEMBER_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
137 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Details", "com.amazonaws.ssm", "ComplianceItem"),
|
138 + | ::aws_smithy_schema::ShapeType::Map,
|
139 + | "Details",
|
140 + | 8,
|
141 + | )
|
142 + | .with_map_members(&COMPLIANCEITEM_MEMBER_DETAILS_KEY, &COMPLIANCEITEM_MEMBER_DETAILS_VALUE);
|
143 + | static COMPLIANCEITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
144 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem", "com.amazonaws.ssm", "ComplianceItem"),
|
145 + | ::aws_smithy_schema::ShapeType::Structure,
|
146 + | &[
|
147 + | &COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE,
|
148 + | &COMPLIANCEITEM_MEMBER_RESOURCE_TYPE,
|
149 + | &COMPLIANCEITEM_MEMBER_RESOURCE_ID,
|
150 + | &COMPLIANCEITEM_MEMBER_ID,
|
151 + | &COMPLIANCEITEM_MEMBER_TITLE,
|
152 + | &COMPLIANCEITEM_MEMBER_STATUS,
|
153 + | &COMPLIANCEITEM_MEMBER_SEVERITY,
|
154 + | &COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY,
|
155 + | &COMPLIANCEITEM_MEMBER_DETAILS,
|
156 + | ],
|
157 + | );
|
158 + | impl ComplianceItem {
|
159 + | /// The schema for this shape.
|
160 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMPLIANCEITEM_SCHEMA;
|
161 + | }
|
162 + | impl ::aws_smithy_schema::serde::SerializableStruct for ComplianceItem {
|
163 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
164 + | fn serialize_members(
|
165 + | &self,
|
166 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
167 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
168 + | if let Some(ref val) = self.compliance_type {
|
169 + | ser.write_string(&COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE, val)?;
|
170 + | }
|
171 + | if let Some(ref val) = self.resource_type {
|
172 + | ser.write_string(&COMPLIANCEITEM_MEMBER_RESOURCE_TYPE, val)?;
|
173 + | }
|
174 + | if let Some(ref val) = self.resource_id {
|
175 + | ser.write_string(&COMPLIANCEITEM_MEMBER_RESOURCE_ID, val)?;
|
176 + | }
|
177 + | if let Some(ref val) = self.id {
|
178 + | ser.write_string(&COMPLIANCEITEM_MEMBER_ID, val)?;
|
179 + | }
|
180 + | if let Some(ref val) = self.title {
|
181 + | ser.write_string(&COMPLIANCEITEM_MEMBER_TITLE, val)?;
|
182 + | }
|
183 + | if let Some(ref val) = self.status {
|
184 + | ser.write_string(&COMPLIANCEITEM_MEMBER_STATUS, val.as_str())?;
|
185 + | }
|
186 + | if let Some(ref val) = self.severity {
|
187 + | ser.write_string(&COMPLIANCEITEM_MEMBER_SEVERITY, val.as_str())?;
|
188 + | }
|
189 + | if let Some(ref val) = self.execution_summary {
|
190 + | ser.write_struct(&COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY, val)?;
|
191 + | }
|
192 + | if let Some(ref val) = self.details {
|
193 + | ser.write_map(
|
194 + | &COMPLIANCEITEM_MEMBER_DETAILS,
|
195 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
196 + | for (key, value) in val {
|
197 + | ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
|
198 + | ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
|
199 + | }
|
200 + | Ok(())
|
201 + | },
|
202 + | )?;
|
203 + | }
|
204 + | Ok(())
|
205 + | }
|
206 + | }
|
207 + | impl ComplianceItem {
|
208 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
209 + | pub fn deserialize(
|
210 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
211 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
212 + | #[allow(unused_variables, unused_mut)]
|
213 + | let mut builder = Self::builder();
|
214 + | #[allow(
|
215 + | unused_variables,
|
216 + | unreachable_code,
|
217 + | clippy::single_match,
|
218 + | clippy::match_single_binding,
|
219 + | clippy::diverging_sub_expression
|
220 + | )]
|
221 + | deserializer.read_struct(&COMPLIANCEITEM_SCHEMA, &mut |member, deser| {
|
222 + | match member.member_index() {
|
223 + | Some(0) => {
|
224 + | if deser.is_null() {
|
225 + | deser.read_null()?;
|
226 + | } else {
|
227 + | builder.compliance_type = Some(deser.read_string(member)?);
|
228 + | }
|
229 + | }
|
230 + | Some(1) => {
|
231 + | if deser.is_null() {
|
232 + | deser.read_null()?;
|
233 + | } else {
|
234 + | builder.resource_type = Some(deser.read_string(member)?);
|
235 + | }
|
236 + | }
|
237 + | Some(2) => {
|
238 + | if deser.is_null() {
|
239 + | deser.read_null()?;
|
240 + | } else {
|
241 + | builder.resource_id = Some(deser.read_string(member)?);
|
242 + | }
|
243 + | }
|
244 + | Some(3) => {
|
245 + | if deser.is_null() {
|
246 + | deser.read_null()?;
|
247 + | } else {
|
248 + | builder.id = Some(deser.read_string(member)?);
|
249 + | }
|
250 + | }
|
251 + | Some(4) => {
|
252 + | if deser.is_null() {
|
253 + | deser.read_null()?;
|
254 + | } else {
|
255 + | builder.title = Some(deser.read_string(member)?);
|
256 + | }
|
257 + | }
|
258 + | Some(5) => {
|
259 + | if deser.is_null() {
|
260 + | deser.read_null()?;
|
261 + | } else {
|
262 + | builder.status = Some(crate::types::ComplianceStatus::from(deser.read_string(member)?.as_str()));
|
263 + | }
|
264 + | }
|
265 + | Some(6) => {
|
266 + | if deser.is_null() {
|
267 + | deser.read_null()?;
|
268 + | } else {
|
269 + | builder.severity = Some(crate::types::ComplianceSeverity::from(deser.read_string(member)?.as_str()));
|
270 + | }
|
271 + | }
|
272 + | Some(7) => {
|
273 + | if deser.is_null() {
|
274 + | deser.read_null()?;
|
275 + | } else {
|
276 + | builder.execution_summary = Some(crate::types::ComplianceExecutionSummary::deserialize(deser)?);
|
277 + | }
|
278 + | }
|
279 + | Some(8) => {
|
280 + | if deser.is_null() {
|
281 + | deser.read_null()?;
|
282 + | } else {
|
283 + | builder.details = Some(deser.read_string_string_map(member)?);
|
284 + | }
|
285 + | }
|
286 + | _ => {}
|
287 + | }
|
288 + | Ok(())
|
289 + | })?;
|
290 + | Ok(builder.build())
|
291 + | }
|
292 + | }
|
293 + | impl ComplianceItem {
|
294 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
295 + | pub fn deserialize_with_response(
|
296 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
297 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
298 + | _status: u16,
|
299 + | _body: &[u8],
|
300 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
301 + | Self::deserialize(deserializer)
|
302 + | }
|
303 + | }
|
304 + | impl ComplianceItem {
|
305 + | /// Creates a new builder-style object to manufacture [`ComplianceItem`](crate::types::ComplianceItem).
|
306 + | pub fn builder() -> crate::types::builders::ComplianceItemBuilder {
|
307 + | crate::types::builders::ComplianceItemBuilder::default()
|
308 + | }
|
309 + | }
|
310 + |
|
311 + | /// A builder for [`ComplianceItem`](crate::types::ComplianceItem).
|
312 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
313 + | #[non_exhaustive]
|
314 + | pub struct ComplianceItemBuilder {
|
315 + | pub(crate) compliance_type: ::std::option::Option<::std::string::String>,
|
316 + | pub(crate) resource_type: ::std::option::Option<::std::string::String>,
|
317 + | pub(crate) resource_id: ::std::option::Option<::std::string::String>,
|
318 + | pub(crate) id: ::std::option::Option<::std::string::String>,
|
319 + | pub(crate) title: ::std::option::Option<::std::string::String>,
|
320 + | pub(crate) status: ::std::option::Option<crate::types::ComplianceStatus>,
|
321 + | pub(crate) severity: ::std::option::Option<crate::types::ComplianceSeverity>,
|
322 + | pub(crate) execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
|
323 + | pub(crate) details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
324 + | }
|
325 + | impl ComplianceItemBuilder {
|
326 + | /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
|
327 + | pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
328 + | self.compliance_type = ::std::option::Option::Some(input.into());
|
329 + | self
|
330 + | }
|
331 + | /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
|
332 + | pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
333 + | self.compliance_type = input;
|
334 + | self
|
335 + | }
|
336 + | /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
|
337 + | pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
|
338 + | &self.compliance_type
|
339 + | }
|
340 + | /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
|
341 + | pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
342 + | self.resource_type = ::std::option::Option::Some(input.into());
|
343 + | self
|
344 + | }
|
345 + | /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
|
346 + | pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
347 + | self.resource_type = input;
|
348 + | self
|
349 + | }
|
350 + | /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
|
351 + | pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
|
352 + | &self.resource_type
|
353 + | }
|
354 + | /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
|
355 + | pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
356 + | self.resource_id = ::std::option::Option::Some(input.into());
|
357 + | self
|
358 + | }
|
359 + | /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
|
360 + | pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
361 + | self.resource_id = input;
|
362 + | self
|
363 + | }
|
364 + | /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
|
365 + | pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
|
366 + | &self.resource_id
|
367 + | }
|
368 + | /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
|
369 + | pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
370 + | self.id = ::std::option::Option::Some(input.into());
|
371 + | self
|
372 + | }
|
373 + | /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
|
374 + | pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
375 + | self.id = input;
|
376 + | self
|
377 + | }
|
378 + | /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
|
379 + | pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
|
380 + | &self.id
|
381 + | }
|
382 + | /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
|
383 + | pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
384 + | self.title = ::std::option::Option::Some(input.into());
|
385 + | self
|
386 + | }
|
387 + | /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
|
388 + | pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
389 + | self.title = input;
|
390 + | self
|
391 + | }
|
392 + | /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
|
393 + | pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
|
394 + | &self.title
|
395 + | }
|
396 + | /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
|
397 + | pub fn status(mut self, input: crate::types::ComplianceStatus) -> Self {
|
398 + | self.status = ::std::option::Option::Some(input);
|
399 + | self
|
400 + | }
|
401 + | /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
|
402 + | pub fn set_status(mut self, input: ::std::option::Option<crate::types::ComplianceStatus>) -> Self {
|
403 + | self.status = input;
|
404 + | self
|
405 + | }
|
406 + | /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
|
407 + | pub fn get_status(&self) -> &::std::option::Option<crate::types::ComplianceStatus> {
|
408 + | &self.status
|
409 + | }
|
410 + | /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
|
411 + | pub fn severity(mut self, input: crate::types::ComplianceSeverity) -> Self {
|
412 + | self.severity = ::std::option::Option::Some(input);
|
413 + | self
|
414 + | }
|
415 + | /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
|
416 + | pub fn set_severity(mut self, input: ::std::option::Option<crate::types::ComplianceSeverity>) -> Self {
|
417 + | self.severity = input;
|
418 + | self
|
419 + | }
|
420 + | /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
|
421 + | pub fn get_severity(&self) -> &::std::option::Option<crate::types::ComplianceSeverity> {
|
422 + | &self.severity
|
423 + | }
|
424 + | /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
|
425 + | /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
|
426 + | /// </important>
|
427 + | pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
|
428 + | self.execution_summary = ::std::option::Option::Some(input);
|
429 + | self
|
430 + | }
|
431 + | /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
|
432 + | /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
|
433 + | /// </important>
|
434 + | pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
|
435 + | self.execution_summary = input;
|
436 + | self
|
437 + | }
|
438 + | /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
|
439 + | /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
|
440 + | /// </important>
|
441 + | pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
|
442 + | &self.execution_summary
|
443 + | }
|
444 + | /// Adds a key-value pair to `details`.
|
445 + | ///
|
446 + | /// To override the contents of this collection use [`set_details`](Self::set_details).
|
447 + | ///
|
448 + | /// <p>A "Key": "Value" tag combination for the compliance item.</p>
|
449 + | pub fn details(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
|
450 + | let mut hash_map = self.details.unwrap_or_default();
|
451 + | hash_map.insert(k.into(), v.into());
|
452 + | self.details = ::std::option::Option::Some(hash_map);
|
453 + | self
|
454 + | }
|
455 + | /// <p>A "Key": "Value" tag combination for the compliance item.</p>
|
456 + | pub fn set_details(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
|
457 + | self.details = input;
|
458 + | self
|
459 + | }
|
460 + | /// <p>A "Key": "Value" tag combination for the compliance item.</p>
|
461 + | pub fn get_details(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
462 + | &self.details
|
463 + | }
|
464 + | /// Consumes the builder and constructs a [`ComplianceItem`](crate::types::ComplianceItem).
|
465 + | pub fn build(self) -> crate::types::ComplianceItem {
|
466 + | crate::types::ComplianceItem {
|
467 + | compliance_type: self.compliance_type,
|
468 + | resource_type: self.resource_type,
|
469 + | resource_id: self.resource_id,
|
470 + | id: self.id,
|
471 + | title: self.title,
|
472 + | status: self.status,
|
473 + | severity: self.severity,
|
474 + | execution_summary: self.execution_summary,
|
475 + | details: self.details,
|
476 + | }
|
477 + | }
|
478 + | }
|