1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Defines the basic information about a patch baseline override.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct BaselineOverride {
|
7 + | /// <p>The operating system rule used by the patch baseline override.</p>
|
8 + | pub operating_system: ::std::option::Option<crate::types::OperatingSystem>,
|
9 + | /// <p>A set of patch filters, typically used for approval rules.</p>
|
10 + | pub global_filters: ::std::option::Option<crate::types::PatchFilterGroup>,
|
11 + | /// <p>A set of rules defining the approval rules for a patch baseline.</p>
|
12 + | pub approval_rules: ::std::option::Option<crate::types::PatchRuleGroup>,
|
13 + | /// <p>A list of explicitly approved patches for the baseline.</p>
|
14 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
15 + | pub approved_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
16 + | /// <p>Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.</p>
|
17 + | pub approved_patches_compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
|
18 + | /// <p>A list of explicitly rejected patches for the baseline.</p>
|
19 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
20 + | pub rejected_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
21 + | /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.</p>
|
22 + | pub rejected_patches_action: ::std::option::Option<crate::types::PatchAction>,
|
23 + | /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
|
24 + | pub approved_patches_enable_non_security: bool,
|
25 + | /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
|
26 + | pub sources: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>,
|
27 + | /// <p>Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as <code>COMPLIANT</code> or <code>NON_COMPLIANT</code>. This option is specified when the <code>CreatePatchBaseline</code> or <code>UpdatePatchBaseline</code> commands are run.</p>
|
28 + | /// <p>Applies to Windows Server managed nodes only.</p>
|
29 + | pub available_security_updates_compliance_status: ::std::option::Option<crate::types::PatchComplianceStatus>,
|
30 + | }
|
31 + | impl BaselineOverride {
|
32 + | /// <p>The operating system rule used by the patch baseline override.</p>
|
33 + | pub fn operating_system(&self) -> ::std::option::Option<&crate::types::OperatingSystem> {
|
34 + | self.operating_system.as_ref()
|
35 + | }
|
36 + | /// <p>A set of patch filters, typically used for approval rules.</p>
|
37 + | pub fn global_filters(&self) -> ::std::option::Option<&crate::types::PatchFilterGroup> {
|
38 + | self.global_filters.as_ref()
|
39 + | }
|
40 + | /// <p>A set of rules defining the approval rules for a patch baseline.</p>
|
41 + | pub fn approval_rules(&self) -> ::std::option::Option<&crate::types::PatchRuleGroup> {
|
42 + | self.approval_rules.as_ref()
|
43 + | }
|
44 + | /// <p>A list of explicitly approved patches for the baseline.</p>
|
45 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
46 + | ///
|
47 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.approved_patches.is_none()`.
|
48 + | pub fn approved_patches(&self) -> &[::std::string::String] {
|
49 + | self.approved_patches.as_deref().unwrap_or_default()
|
50 + | }
|
51 + | /// <p>Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.</p>
|
52 + | pub fn approved_patches_compliance_level(&self) -> ::std::option::Option<&crate::types::PatchComplianceLevel> {
|
53 + | self.approved_patches_compliance_level.as_ref()
|
54 + | }
|
55 + | /// <p>A list of explicitly rejected patches for the baseline.</p>
|
56 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
57 + | ///
|
58 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.rejected_patches.is_none()`.
|
59 + | pub fn rejected_patches(&self) -> &[::std::string::String] {
|
60 + | self.rejected_patches.as_deref().unwrap_or_default()
|
61 + | }
|
62 + | /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.</p>
|
63 + | pub fn rejected_patches_action(&self) -> ::std::option::Option<&crate::types::PatchAction> {
|
64 + | self.rejected_patches_action.as_ref()
|
65 + | }
|
66 + | /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
|
67 + | pub fn approved_patches_enable_non_security(&self) -> bool {
|
68 + | self.approved_patches_enable_non_security
|
69 + | }
|
70 + | /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
|
71 + | ///
|
72 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sources.is_none()`.
|
73 + | pub fn sources(&self) -> &[crate::types::PatchSource] {
|
74 + | self.sources.as_deref().unwrap_or_default()
|
75 + | }
|
76 + | /// <p>Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as <code>COMPLIANT</code> or <code>NON_COMPLIANT</code>. This option is specified when the <code>CreatePatchBaseline</code> or <code>UpdatePatchBaseline</code> commands are run.</p>
|
77 + | /// <p>Applies to Windows Server managed nodes only.</p>
|
78 + | pub fn available_security_updates_compliance_status(&self) -> ::std::option::Option<&crate::types::PatchComplianceStatus> {
|
79 + | self.available_security_updates_compliance_status.as_ref()
|
80 + | }
|
81 + | }
|
82 + | static BASELINEOVERRIDE_MEMBER_OPERATING_SYSTEM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
83 + | ::aws_smithy_schema::ShapeId::from_parts(
|
84 + | "com.amazonaws.ssm#BaselineOverride$OperatingSystem",
|
85 + | "com.amazonaws.ssm",
|
86 + | "BaselineOverride",
|
87 + | ),
|
88 + | ::aws_smithy_schema::ShapeType::String,
|
89 + | "OperatingSystem",
|
90 + | 0,
|
91 + | );
|
92 + | static BASELINEOVERRIDE_MEMBER_GLOBAL_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
93 + | ::aws_smithy_schema::ShapeId::from_parts(
|
94 + | "com.amazonaws.ssm#BaselineOverride$GlobalFilters",
|
95 + | "com.amazonaws.ssm",
|
96 + | "BaselineOverride",
|
97 + | ),
|
98 + | ::aws_smithy_schema::ShapeType::Structure,
|
99 + | "GlobalFilters",
|
100 + | 1,
|
101 + | );
|
102 + | static BASELINEOVERRIDE_MEMBER_APPROVAL_RULES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
103 + | ::aws_smithy_schema::ShapeId::from_parts(
|
104 + | "com.amazonaws.ssm#BaselineOverride$ApprovalRules",
|
105 + | "com.amazonaws.ssm",
|
106 + | "BaselineOverride",
|
107 + | ),
|
108 + | ::aws_smithy_schema::ShapeType::Structure,
|
109 + | "ApprovalRules",
|
110 + | 2,
|
111 + | );
|
112 + | static BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchIdList$member", "com.amazonaws.ssm", "PatchIdList"),
|
114 + | ::aws_smithy_schema::ShapeType::String,
|
115 + | "member",
|
116 + | 0,
|
117 + | );
|
118 + | static BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
119 + | ::aws_smithy_schema::ShapeId::from_parts(
|
120 + | "com.amazonaws.ssm#BaselineOverride$ApprovedPatches",
|
121 + | "com.amazonaws.ssm",
|
122 + | "BaselineOverride",
|
123 + | ),
|
124 + | ::aws_smithy_schema::ShapeType::List,
|
125 + | "ApprovedPatches",
|
126 + | 3,
|
127 + | )
|
128 + | .with_list_member(&BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_MEMBER);
|
129 + | static BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_COMPLIANCE_LEVEL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
130 + | ::aws_smithy_schema::ShapeId::from_parts(
|
131 + | "com.amazonaws.ssm#BaselineOverride$ApprovedPatchesComplianceLevel",
|
132 + | "com.amazonaws.ssm",
|
133 + | "BaselineOverride",
|
134 + | ),
|
135 + | ::aws_smithy_schema::ShapeType::String,
|
136 + | "ApprovedPatchesComplianceLevel",
|
137 + | 4,
|
138 + | );
|
139 + | static BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
140 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchIdList$member", "com.amazonaws.ssm", "PatchIdList"),
|
141 + | ::aws_smithy_schema::ShapeType::String,
|
142 + | "member",
|
143 + | 0,
|
144 + | );
|
145 + | static BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
146 + | ::aws_smithy_schema::ShapeId::from_parts(
|
147 + | "com.amazonaws.ssm#BaselineOverride$RejectedPatches",
|
148 + | "com.amazonaws.ssm",
|
149 + | "BaselineOverride",
|
150 + | ),
|
151 + | ::aws_smithy_schema::ShapeType::List,
|
152 + | "RejectedPatches",
|
153 + | 5,
|
154 + | )
|
155 + | .with_list_member(&BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES_MEMBER);
|
156 + | static BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES_ACTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
157 + | ::aws_smithy_schema::ShapeId::from_parts(
|
158 + | "com.amazonaws.ssm#BaselineOverride$RejectedPatchesAction",
|
159 + | "com.amazonaws.ssm",
|
160 + | "BaselineOverride",
|
161 + | ),
|
162 + | ::aws_smithy_schema::ShapeType::String,
|
163 + | "RejectedPatchesAction",
|
164 + | 6,
|
165 + | );
|
166 + | static BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_ENABLE_NON_SECURITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
167 + | ::aws_smithy_schema::ShapeId::from_parts(
|
168 + | "com.amazonaws.ssm#BaselineOverride$ApprovedPatchesEnableNonSecurity",
|
169 + | "com.amazonaws.ssm",
|
170 + | "BaselineOverride",
|
171 + | ),
|
172 + | ::aws_smithy_schema::ShapeType::Boolean,
|
173 + | "ApprovedPatchesEnableNonSecurity",
|
174 + | 7,
|
175 + | );
|
176 + | static BASELINEOVERRIDE_MEMBER_SOURCES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
177 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchSourceList$member", "com.amazonaws.ssm", "PatchSourceList"),
|
178 + | ::aws_smithy_schema::ShapeType::Structure,
|
179 + | "member",
|
180 + | 0,
|
181 + | );
|
182 + | static BASELINEOVERRIDE_MEMBER_SOURCES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
183 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#BaselineOverride$Sources", "com.amazonaws.ssm", "BaselineOverride"),
|
184 + | ::aws_smithy_schema::ShapeType::List,
|
185 + | "Sources",
|
186 + | 8,
|
187 + | )
|
188 + | .with_list_member(&BASELINEOVERRIDE_MEMBER_SOURCES_MEMBER);
|
189 + | static BASELINEOVERRIDE_MEMBER_AVAILABLE_SECURITY_UPDATES_COMPLIANCE_STATUS: ::aws_smithy_schema::Schema<'static> =
|
190 + | ::aws_smithy_schema::Schema::new_member(
|
191 + | ::aws_smithy_schema::ShapeId::from_parts(
|
192 + | "com.amazonaws.ssm#BaselineOverride$AvailableSecurityUpdatesComplianceStatus",
|
193 + | "com.amazonaws.ssm",
|
194 + | "BaselineOverride",
|
195 + | ),
|
196 + | ::aws_smithy_schema::ShapeType::String,
|
197 + | "AvailableSecurityUpdatesComplianceStatus",
|
198 + | 9,
|
199 + | );
|
200 + | static BASELINEOVERRIDE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
201 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#BaselineOverride", "com.amazonaws.ssm", "BaselineOverride"),
|
202 + | ::aws_smithy_schema::ShapeType::Structure,
|
203 + | &[
|
204 + | &BASELINEOVERRIDE_MEMBER_OPERATING_SYSTEM,
|
205 + | &BASELINEOVERRIDE_MEMBER_GLOBAL_FILTERS,
|
206 + | &BASELINEOVERRIDE_MEMBER_APPROVAL_RULES,
|
207 + | &BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES,
|
208 + | &BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_COMPLIANCE_LEVEL,
|
209 + | &BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES,
|
210 + | &BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES_ACTION,
|
211 + | &BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_ENABLE_NON_SECURITY,
|
212 + | &BASELINEOVERRIDE_MEMBER_SOURCES,
|
213 + | &BASELINEOVERRIDE_MEMBER_AVAILABLE_SECURITY_UPDATES_COMPLIANCE_STATUS,
|
214 + | ],
|
215 + | );
|
216 + | impl BaselineOverride {
|
217 + | /// The schema for this shape.
|
218 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &BASELINEOVERRIDE_SCHEMA;
|
219 + | }
|
220 + | impl ::aws_smithy_schema::serde::SerializableStruct for BaselineOverride {
|
221 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
222 + | fn serialize_members(
|
223 + | &self,
|
224 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
225 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
226 + | if let Some(ref val) = self.operating_system {
|
227 + | ser.write_string(&BASELINEOVERRIDE_MEMBER_OPERATING_SYSTEM, val.as_str())?;
|
228 + | }
|
229 + | if let Some(ref val) = self.global_filters {
|
230 + | ser.write_struct(&BASELINEOVERRIDE_MEMBER_GLOBAL_FILTERS, val)?;
|
231 + | }
|
232 + | if let Some(ref val) = self.approval_rules {
|
233 + | ser.write_struct(&BASELINEOVERRIDE_MEMBER_APPROVAL_RULES, val)?;
|
234 + | }
|
235 + | if let Some(ref val) = self.approved_patches {
|
236 + | ser.write_list(
|
237 + | &BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES,
|
238 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
239 + | for item in val {
|
240 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
241 + | }
|
242 + | Ok(())
|
243 + | },
|
244 + | )?;
|
245 + | }
|
246 + | if let Some(ref val) = self.approved_patches_compliance_level {
|
247 + | ser.write_string(&BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_COMPLIANCE_LEVEL, val.as_str())?;
|
248 + | }
|
249 + | if let Some(ref val) = self.rejected_patches {
|
250 + | ser.write_list(
|
251 + | &BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES,
|
252 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
253 + | for item in val {
|
254 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
255 + | }
|
256 + | Ok(())
|
257 + | },
|
258 + | )?;
|
259 + | }
|
260 + | if let Some(ref val) = self.rejected_patches_action {
|
261 + | ser.write_string(&BASELINEOVERRIDE_MEMBER_REJECTED_PATCHES_ACTION, val.as_str())?;
|
262 + | }
|
263 + | {
|
264 + | let val = &self.approved_patches_enable_non_security;
|
265 + | ser.write_boolean(&BASELINEOVERRIDE_MEMBER_APPROVED_PATCHES_ENABLE_NON_SECURITY, *val)?;
|
266 + | }
|
267 + | if let Some(ref val) = self.sources {
|
268 + | ser.write_list(
|
269 + | &BASELINEOVERRIDE_MEMBER_SOURCES,
|
270 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
271 + | for item in val {
|
272 + | ser.write_struct(crate::types::PatchSource::SCHEMA, item)?;
|
273 + | }
|
274 + | Ok(())
|
275 + | },
|
276 + | )?;
|
277 + | }
|
278 + | if let Some(ref val) = self.available_security_updates_compliance_status {
|
279 + | ser.write_string(&BASELINEOVERRIDE_MEMBER_AVAILABLE_SECURITY_UPDATES_COMPLIANCE_STATUS, val.as_str())?;
|
280 + | }
|
281 + | Ok(())
|
282 + | }
|
283 + | }
|
284 + | impl BaselineOverride {
|
285 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
286 + | pub fn deserialize(
|
287 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
288 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
289 + | #[allow(unused_variables, unused_mut)]
|
290 + | let mut builder = Self::builder();
|
291 + | #[allow(
|
292 + | unused_variables,
|
293 + | unreachable_code,
|
294 + | clippy::single_match,
|
295 + | clippy::match_single_binding,
|
296 + | clippy::diverging_sub_expression
|
297 + | )]
|
298 + | deserializer.read_struct(&BASELINEOVERRIDE_SCHEMA, &mut |member, deser| {
|
299 + | match member.member_index() {
|
300 + | Some(0) => {
|
301 + | if deser.is_null() {
|
302 + | deser.read_null()?;
|
303 + | } else {
|
304 + | builder.operating_system = Some(crate::types::OperatingSystem::from(deser.read_string(member)?.as_str()));
|
305 + | }
|
306 + | }
|
307 + | Some(1) => {
|
308 + | if deser.is_null() {
|
309 + | deser.read_null()?;
|
310 + | } else {
|
311 + | builder.global_filters = Some(crate::types::PatchFilterGroup::deserialize(deser)?);
|
312 + | }
|
313 + | }
|
314 + | Some(2) => {
|
315 + | if deser.is_null() {
|
316 + | deser.read_null()?;
|
317 + | } else {
|
318 + | builder.approval_rules = Some(crate::types::PatchRuleGroup::deserialize(deser)?);
|
319 + | }
|
320 + | }
|
321 + | Some(3) => {
|
322 + | if deser.is_null() {
|
323 + | deser.read_null()?;
|
324 + | } else {
|
325 + | builder.approved_patches = Some(deser.read_string_list(member)?);
|
326 + | }
|
327 + | }
|
328 + | Some(4) => {
|
329 + | if deser.is_null() {
|
330 + | deser.read_null()?;
|
331 + | } else {
|
332 + | builder.approved_patches_compliance_level =
|
333 + | Some(crate::types::PatchComplianceLevel::from(deser.read_string(member)?.as_str()));
|
334 + | }
|
335 + | }
|
336 + | Some(5) => {
|
337 + | if deser.is_null() {
|
338 + | deser.read_null()?;
|
339 + | } else {
|
340 + | builder.rejected_patches = Some(deser.read_string_list(member)?);
|
341 + | }
|
342 + | }
|
343 + | Some(6) => {
|
344 + | if deser.is_null() {
|
345 + | deser.read_null()?;
|
346 + | } else {
|
347 + | builder.rejected_patches_action = Some(crate::types::PatchAction::from(deser.read_string(member)?.as_str()));
|
348 + | }
|
349 + | }
|
350 + | Some(7) => {
|
351 + | builder.approved_patches_enable_non_security = Some(deser.read_boolean(member)?);
|
352 + | }
|
353 + | Some(8) => {
|
354 + | if deser.is_null() {
|
355 + | deser.read_null()?;
|
356 + | } else {
|
357 + | builder.sources = Some({
|
358 + | let mut container = Vec::new();
|
359 + | deser.read_list(member, &mut |deser| {
|
360 + | container.push(crate::types::PatchSource::deserialize(deser)?);
|
361 + | Ok(())
|
362 + | })?;
|
363 + | container
|
364 + | });
|
365 + | }
|
366 + | }
|
367 + | Some(9) => {
|
368 + | if deser.is_null() {
|
369 + | deser.read_null()?;
|
370 + | } else {
|
371 + | builder.available_security_updates_compliance_status =
|
372 + | Some(crate::types::PatchComplianceStatus::from(deser.read_string(member)?.as_str()));
|
373 + | }
|
374 + | }
|
375 + | _ => {}
|
376 + | }
|
377 + | Ok(())
|
378 + | })?;
|
379 + | Ok(builder.build())
|
380 + | }
|
381 + | }
|
382 + | impl BaselineOverride {
|
383 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
384 + | pub fn deserialize_with_response(
|
385 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
386 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
387 + | _status: u16,
|
388 + | _body: &[u8],
|
389 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
390 + | Self::deserialize(deserializer)
|
391 + | }
|
392 + | }
|
393 + | impl BaselineOverride {
|
394 + | /// Creates a new builder-style object to manufacture [`BaselineOverride`](crate::types::BaselineOverride).
|
395 + | pub fn builder() -> crate::types::builders::BaselineOverrideBuilder {
|
396 + | crate::types::builders::BaselineOverrideBuilder::default()
|
397 + | }
|
398 + | }
|
399 + |
|
400 + | /// A builder for [`BaselineOverride`](crate::types::BaselineOverride).
|
401 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
402 + | #[non_exhaustive]
|
403 + | pub struct BaselineOverrideBuilder {
|
404 + | pub(crate) operating_system: ::std::option::Option<crate::types::OperatingSystem>,
|
405 + | pub(crate) global_filters: ::std::option::Option<crate::types::PatchFilterGroup>,
|
406 + | pub(crate) approval_rules: ::std::option::Option<crate::types::PatchRuleGroup>,
|
407 + | pub(crate) approved_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
408 + | pub(crate) approved_patches_compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
|
409 + | pub(crate) rejected_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
410 + | pub(crate) rejected_patches_action: ::std::option::Option<crate::types::PatchAction>,
|
411 + | pub(crate) approved_patches_enable_non_security: ::std::option::Option<bool>,
|
412 + | pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>,
|
413 + | pub(crate) available_security_updates_compliance_status: ::std::option::Option<crate::types::PatchComplianceStatus>,
|
414 + | }
|
415 + | impl BaselineOverrideBuilder {
|
416 + | /// <p>The operating system rule used by the patch baseline override.</p>
|
417 + | pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
|
418 + | self.operating_system = ::std::option::Option::Some(input);
|
419 + | self
|
420 + | }
|
421 + | /// <p>The operating system rule used by the patch baseline override.</p>
|
422 + | pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
|
423 + | self.operating_system = input;
|
424 + | self
|
425 + | }
|
426 + | /// <p>The operating system rule used by the patch baseline override.</p>
|
427 + | pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
|
428 + | &self.operating_system
|
429 + | }
|
430 + | /// <p>A set of patch filters, typically used for approval rules.</p>
|
431 + | pub fn global_filters(mut self, input: crate::types::PatchFilterGroup) -> Self {
|
432 + | self.global_filters = ::std::option::Option::Some(input);
|
433 + | self
|
434 + | }
|
435 + | /// <p>A set of patch filters, typically used for approval rules.</p>
|
436 + | pub fn set_global_filters(mut self, input: ::std::option::Option<crate::types::PatchFilterGroup>) -> Self {
|
437 + | self.global_filters = input;
|
438 + | self
|
439 + | }
|
440 + | /// <p>A set of patch filters, typically used for approval rules.</p>
|
441 + | pub fn get_global_filters(&self) -> &::std::option::Option<crate::types::PatchFilterGroup> {
|
442 + | &self.global_filters
|
443 + | }
|
444 + | /// <p>A set of rules defining the approval rules for a patch baseline.</p>
|
445 + | pub fn approval_rules(mut self, input: crate::types::PatchRuleGroup) -> Self {
|
446 + | self.approval_rules = ::std::option::Option::Some(input);
|
447 + | self
|
448 + | }
|
449 + | /// <p>A set of rules defining the approval rules for a patch baseline.</p>
|
450 + | pub fn set_approval_rules(mut self, input: ::std::option::Option<crate::types::PatchRuleGroup>) -> Self {
|
451 + | self.approval_rules = input;
|
452 + | self
|
453 + | }
|
454 + | /// <p>A set of rules defining the approval rules for a patch baseline.</p>
|
455 + | pub fn get_approval_rules(&self) -> &::std::option::Option<crate::types::PatchRuleGroup> {
|
456 + | &self.approval_rules
|
457 + | }
|
458 + | /// Appends an item to `approved_patches`.
|
459 + | ///
|
460 + | /// To override the contents of this collection use [`set_approved_patches`](Self::set_approved_patches).
|
461 + | ///
|
462 + | /// <p>A list of explicitly approved patches for the baseline.</p>
|
463 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
464 + | pub fn approved_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
465 + | let mut v = self.approved_patches.unwrap_or_default();
|
466 + | v.push(input.into());
|
467 + | self.approved_patches = ::std::option::Option::Some(v);
|
468 + | self
|
469 + | }
|
470 + | /// <p>A list of explicitly approved patches for the baseline.</p>
|
471 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
472 + | pub fn set_approved_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
473 + | self.approved_patches = input;
|
474 + | self
|
475 + | }
|
476 + | /// <p>A list of explicitly approved patches for the baseline.</p>
|
477 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
478 + | pub fn get_approved_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
479 + | &self.approved_patches
|
480 + | }
|
481 + | /// <p>Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.</p>
|
482 + | pub fn approved_patches_compliance_level(mut self, input: crate::types::PatchComplianceLevel) -> Self {
|
483 + | self.approved_patches_compliance_level = ::std::option::Option::Some(input);
|
484 + | self
|
485 + | }
|
486 + | /// <p>Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.</p>
|
487 + | pub fn set_approved_patches_compliance_level(mut self, input: ::std::option::Option<crate::types::PatchComplianceLevel>) -> Self {
|
488 + | self.approved_patches_compliance_level = input;
|
489 + | self
|
490 + | }
|
491 + | /// <p>Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.</p>
|
492 + | pub fn get_approved_patches_compliance_level(&self) -> &::std::option::Option<crate::types::PatchComplianceLevel> {
|
493 + | &self.approved_patches_compliance_level
|
494 + | }
|
495 + | /// Appends an item to `rejected_patches`.
|
496 + | ///
|
497 + | /// To override the contents of this collection use [`set_rejected_patches`](Self::set_rejected_patches).
|
498 + | ///
|
499 + | /// <p>A list of explicitly rejected patches for the baseline.</p>
|
500 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
501 + | pub fn rejected_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
502 + | let mut v = self.rejected_patches.unwrap_or_default();
|
503 + | v.push(input.into());
|
504 + | self.rejected_patches = ::std::option::Option::Some(v);
|
505 + | self
|
506 + | }
|
507 + | /// <p>A list of explicitly rejected patches for the baseline.</p>
|
508 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
509 + | pub fn set_rejected_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
510 + | self.rejected_patches = input;
|
511 + | self
|
512 + | }
|
513 + | /// <p>A list of explicitly rejected patches for the baseline.</p>
|
514 + | /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
515 + | pub fn get_rejected_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
516 + | &self.rejected_patches
|
517 + | }
|
518 + | /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.</p>
|
519 + | pub fn rejected_patches_action(mut self, input: crate::types::PatchAction) -> Self {
|
520 + | self.rejected_patches_action = ::std::option::Option::Some(input);
|
521 + | self
|
522 + | }
|
523 + | /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.</p>
|
524 + | pub fn set_rejected_patches_action(mut self, input: ::std::option::Option<crate::types::PatchAction>) -> Self {
|
525 + | self.rejected_patches_action = input;
|
526 + | self
|
527 + | }
|
528 + | /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.</p>
|
529 + | pub fn get_rejected_patches_action(&self) -> &::std::option::Option<crate::types::PatchAction> {
|
530 + | &self.rejected_patches_action
|
531 + | }
|
532 + | /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
|
533 + | pub fn approved_patches_enable_non_security(mut self, input: bool) -> Self {
|
534 + | self.approved_patches_enable_non_security = ::std::option::Option::Some(input);
|
535 + | self
|
536 + | }
|
537 + | /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
|
538 + | pub fn set_approved_patches_enable_non_security(mut self, input: ::std::option::Option<bool>) -> Self {
|
539 + | self.approved_patches_enable_non_security = input;
|
540 + | self
|
541 + | }
|
542 + | /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
|
543 + | pub fn get_approved_patches_enable_non_security(&self) -> &::std::option::Option<bool> {
|
544 + | &self.approved_patches_enable_non_security
|
545 + | }
|
546 + | /// Appends an item to `sources`.
|
547 + | ///
|
548 + | /// To override the contents of this collection use [`set_sources`](Self::set_sources).
|
549 + | ///
|
550 + | /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
|
551 + | pub fn sources(mut self, input: crate::types::PatchSource) -> Self {
|
552 + | let mut v = self.sources.unwrap_or_default();
|
553 + | v.push(input);
|
554 + | self.sources = ::std::option::Option::Some(v);
|
555 + | self
|
556 + | }
|
557 + | /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
|
558 + | pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>) -> Self {
|
559 + | self.sources = input;
|
560 + | self
|
561 + | }
|
562 + | /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
|
563 + | pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchSource>> {
|
564 + | &self.sources
|
565 + | }
|
566 + | /// <p>Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as <code>COMPLIANT</code> or <code>NON_COMPLIANT</code>. This option is specified when the <code>CreatePatchBaseline</code> or <code>UpdatePatchBaseline</code> commands are run.</p>
|
567 + | /// <p>Applies to Windows Server managed nodes only.</p>
|
568 + | pub fn available_security_updates_compliance_status(mut self, input: crate::types::PatchComplianceStatus) -> Self {
|
569 + | self.available_security_updates_compliance_status = ::std::option::Option::Some(input);
|
570 + | self
|
571 + | }
|
572 + | /// <p>Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as <code>COMPLIANT</code> or <code>NON_COMPLIANT</code>. This option is specified when the <code>CreatePatchBaseline</code> or <code>UpdatePatchBaseline</code> commands are run.</p>
|
573 + | /// <p>Applies to Windows Server managed nodes only.</p>
|
574 + | pub fn set_available_security_updates_compliance_status(mut self, input: ::std::option::Option<crate::types::PatchComplianceStatus>) -> Self {
|
575 + | self.available_security_updates_compliance_status = input;
|
576 + | self
|
577 + | }
|
578 + | /// <p>Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as <code>COMPLIANT</code> or <code>NON_COMPLIANT</code>. This option is specified when the <code>CreatePatchBaseline</code> or <code>UpdatePatchBaseline</code> commands are run.</p>
|
579 + | /// <p>Applies to Windows Server managed nodes only.</p>
|
580 + | pub fn get_available_security_updates_compliance_status(&self) -> &::std::option::Option<crate::types::PatchComplianceStatus> {
|
581 + | &self.available_security_updates_compliance_status
|
582 + | }
|
583 + | /// Consumes the builder and constructs a [`BaselineOverride`](crate::types::BaselineOverride).
|
584 + | pub fn build(self) -> crate::types::BaselineOverride {
|
585 + | crate::types::BaselineOverride {
|
586 + | operating_system: self.operating_system,
|
587 + | global_filters: self.global_filters,
|
588 + | approval_rules: self.approval_rules,
|
589 + | approved_patches: self.approved_patches,
|
590 + | approved_patches_compliance_level: self.approved_patches_compliance_level,
|
591 + | rejected_patches: self.rejected_patches,
|
592 + | rejected_patches_action: self.rejected_patches_action,
|
593 + | approved_patches_enable_non_security: self.approved_patches_enable_non_security.unwrap_or_default(),
|
594 + | sources: self.sources,
|
595 + | available_security_updates_compliance_status: self.available_security_updates_compliance_status,
|
596 + | }
|
597 + | }
|
598 + | }
|