aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePatchBaselineInput {
    /// <p>The ID of the patch baseline to update.</p>
    pub baseline_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the patch baseline.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
    /// </important>
    pub global_filters: ::std::option::Option<crate::types::PatchFilterGroup>,
    /// <p>A set of rules used to include patches in the baseline.</p>
    pub approval_rules: ::std::option::Option<crate::types::PatchRuleGroup>,
    /// <p>A list of explicitly approved patches for the baseline.</p>
    /// <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>
    pub approved_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
    pub approved_patches_compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
    /// <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>
    pub approved_patches_enable_non_security: ::std::option::Option<bool>,
    /// <p>A list of explicitly rejected patches for the baseline.</p>
    /// <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>
    pub rejected_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
    /// <dl>
    /// <dt>
    /// ALLOW_AS_DEPENDENCY
    /// </dt>
    /// <dd>
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
    /// </dd>
    /// <dt>
    /// BLOCK
    /// </dt>
    /// <dd>
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
    /// <p>State value assignment for patch compliance:</p>
    /// <ul>
    /// <li>
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
    /// <li>
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
    /// </ul>
    /// </dd>
    /// </dl>
    pub rejected_patches_action: ::std::option::Option<crate::types::PatchAction>,
    /// <p>A description of the patch baseline.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <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>
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>,
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
    /// <p>Supported for Windows Server managed nodes only.</p>
    pub available_security_updates_compliance_status: ::std::option::Option<crate::types::PatchComplianceStatus>,
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
    pub replace: ::std::option::Option<bool>,
}
impl UpdatePatchBaselineInput {
    /// <p>The ID of the patch baseline to update.</p>
    pub fn baseline_id(&self) -> ::std::option::Option<&str> {
        self.baseline_id.as_deref()
    }
    /// <p>The name of the patch baseline.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
    /// </important>
    pub fn global_filters(&self) -> ::std::option::Option<&crate::types::PatchFilterGroup> {
        self.global_filters.as_ref()
    }
    /// <p>A set of rules used to include patches in the baseline.</p>
    pub fn approval_rules(&self) -> ::std::option::Option<&crate::types::PatchRuleGroup> {
        self.approval_rules.as_ref()
    }
    /// <p>A list of explicitly approved patches for the baseline.</p>
    /// <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>
    ///
    /// 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()`.
    pub fn approved_patches(&self) -> &[::std::string::String] {
        self.approved_patches.as_deref().unwrap_or_default()
    }
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
    pub fn approved_patches_compliance_level(&self) -> ::std::option::Option<&crate::types::PatchComplianceLevel> {
        self.approved_patches_compliance_level.as_ref()
    }
    /// <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>
    pub fn approved_patches_enable_non_security(&self) -> ::std::option::Option<bool> {
        self.approved_patches_enable_non_security
    }
    /// <p>A list of explicitly rejected patches for the baseline.</p>
    /// <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>
    ///
    /// 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()`.
    pub fn rejected_patches(&self) -> &[::std::string::String] {
        self.rejected_patches.as_deref().unwrap_or_default()
    }
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
    /// <dl>
    /// <dt>
    /// ALLOW_AS_DEPENDENCY
    /// </dt>
    /// <dd>
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
    /// </dd>
    /// <dt>
    /// BLOCK
    /// </dt>
    /// <dd>
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
    /// <p>State value assignment for patch compliance:</p>
    /// <ul>
    /// <li>
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
    /// <li>
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
    /// </ul>
    /// </dd>
    /// </dl>
    pub fn rejected_patches_action(&self) -> ::std::option::Option<&crate::types::PatchAction> {
        self.rejected_patches_action.as_ref()
    }
    /// <p>A description of the patch baseline.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <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>
    ///
    /// 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()`.
    pub fn sources(&self) -> &[crate::types::PatchSource] {
        self.sources.as_deref().unwrap_or_default()
    }
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
    /// <p>Supported for Windows Server managed nodes only.</p>
    pub fn available_security_updates_compliance_status(&self) -> ::std::option::Option<&crate::types::PatchComplianceStatus> {
        self.available_security_updates_compliance_status.as_ref()
    }
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
    pub fn replace(&self) -> ::std::option::Option<bool> {
        self.replace
    }
}
impl UpdatePatchBaselineInput {
    /// Creates a new builder-style object to manufacture [`UpdatePatchBaselineInput`](crate::operation::update_patch_baseline::UpdatePatchBaselineInput).
    pub fn builder() -> crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder {
        crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder::default()
    }
}

/// A builder for [`UpdatePatchBaselineInput`](crate::operation::update_patch_baseline::UpdatePatchBaselineInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePatchBaselineInputBuilder {
    pub(crate) baseline_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) global_filters: ::std::option::Option<crate::types::PatchFilterGroup>,
    pub(crate) approval_rules: ::std::option::Option<crate::types::PatchRuleGroup>,
    pub(crate) approved_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) approved_patches_compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
    pub(crate) approved_patches_enable_non_security: ::std::option::Option<bool>,
    pub(crate) rejected_patches: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) rejected_patches_action: ::std::option::Option<crate::types::PatchAction>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>,
    pub(crate) available_security_updates_compliance_status: ::std::option::Option<crate::types::PatchComplianceStatus>,
    pub(crate) replace: ::std::option::Option<bool>,
}
impl UpdatePatchBaselineInputBuilder {
    /// <p>The ID of the patch baseline to update.</p>
    /// This field is required.
    pub fn baseline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.baseline_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the patch baseline to update.</p>
    pub fn set_baseline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.baseline_id = input;
        self
    }
    /// <p>The ID of the patch baseline to update.</p>
    pub fn get_baseline_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.baseline_id
    }
    /// <p>The name of the patch baseline.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the patch baseline.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the patch baseline.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
    /// </important>
    pub fn global_filters(mut self, input: crate::types::PatchFilterGroup) -> Self {
        self.global_filters = ::std::option::Option::Some(input);
        self
    }
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
    /// </important>
    pub fn set_global_filters(mut self, input: ::std::option::Option<crate::types::PatchFilterGroup>) -> Self {
        self.global_filters = input;
        self
    }
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
    /// </important>
    pub fn get_global_filters(&self) -> &::std::option::Option<crate::types::PatchFilterGroup> {
        &self.global_filters
    }
    /// <p>A set of rules used to include patches in the baseline.</p>
    pub fn approval_rules(mut self, input: crate::types::PatchRuleGroup) -> Self {
        self.approval_rules = ::std::option::Option::Some(input);
        self
    }
    /// <p>A set of rules used to include patches in the baseline.</p>
    pub fn set_approval_rules(mut self, input: ::std::option::Option<crate::types::PatchRuleGroup>) -> Self {
        self.approval_rules = input;
        self
    }
    /// <p>A set of rules used to include patches in the baseline.</p>
    pub fn get_approval_rules(&self) -> &::std::option::Option<crate::types::PatchRuleGroup> {
        &self.approval_rules
    }
    /// Appends an item to `approved_patches`.
    ///
    /// To override the contents of this collection use [`set_approved_patches`](Self::set_approved_patches).
    ///
    /// <p>A list of explicitly approved patches for the baseline.</p>
    /// <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>
    pub fn approved_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.approved_patches.unwrap_or_default();
        v.push(input.into());
        self.approved_patches = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of explicitly approved patches for the baseline.</p>
    /// <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>
    pub fn set_approved_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.approved_patches = input;
        self
    }
    /// <p>A list of explicitly approved patches for the baseline.</p>
    /// <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>
    pub fn get_approved_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.approved_patches
    }
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
    pub fn approved_patches_compliance_level(mut self, input: crate::types::PatchComplianceLevel) -> Self {
        self.approved_patches_compliance_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
    pub fn set_approved_patches_compliance_level(mut self, input: ::std::option::Option<crate::types::PatchComplianceLevel>) -> Self {
        self.approved_patches_compliance_level = input;
        self
    }
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
    pub fn get_approved_patches_compliance_level(&self) -> &::std::option::Option<crate::types::PatchComplianceLevel> {
        &self.approved_patches_compliance_level
    }
    /// <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>
    pub fn approved_patches_enable_non_security(mut self, input: bool) -> Self {
        self.approved_patches_enable_non_security = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_approved_patches_enable_non_security(mut self, input: ::std::option::Option<bool>) -> Self {
        self.approved_patches_enable_non_security = input;
        self
    }
    /// <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>
    pub fn get_approved_patches_enable_non_security(&self) -> &::std::option::Option<bool> {
        &self.approved_patches_enable_non_security
    }
    /// Appends an item to `rejected_patches`.
    ///
    /// To override the contents of this collection use [`set_rejected_patches`](Self::set_rejected_patches).
    ///
    /// <p>A list of explicitly rejected patches for the baseline.</p>
    /// <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>
    pub fn rejected_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.rejected_patches.unwrap_or_default();
        v.push(input.into());
        self.rejected_patches = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of explicitly rejected patches for the baseline.</p>
    /// <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>
    pub fn set_rejected_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.rejected_patches = input;
        self
    }
    /// <p>A list of explicitly rejected patches for the baseline.</p>
    /// <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>
    pub fn get_rejected_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.rejected_patches
    }
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
    /// <dl>
    /// <dt>
    /// ALLOW_AS_DEPENDENCY
    /// </dt>
    /// <dd>
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
    /// </dd>
    /// <dt>
    /// BLOCK
    /// </dt>
    /// <dd>
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
    /// <p>State value assignment for patch compliance:</p>
    /// <ul>
    /// <li>
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
    /// <li>
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
    /// </ul>
    /// </dd>
    /// </dl>
    pub fn rejected_patches_action(mut self, input: crate::types::PatchAction) -> Self {
        self.rejected_patches_action = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
    /// <dl>
    /// <dt>
    /// ALLOW_AS_DEPENDENCY
    /// </dt>
    /// <dd>
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
    /// </dd>
    /// <dt>
    /// BLOCK
    /// </dt>
    /// <dd>
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
    /// <p>State value assignment for patch compliance:</p>
    /// <ul>
    /// <li>
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
    /// <li>
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
    /// </ul>
    /// </dd>
    /// </dl>
    pub fn set_rejected_patches_action(mut self, input: ::std::option::Option<crate::types::PatchAction>) -> Self {
        self.rejected_patches_action = input;
        self
    }
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
    /// <dl>
    /// <dt>
    /// ALLOW_AS_DEPENDENCY
    /// </dt>
    /// <dd>
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
    /// </dd>
    /// <dt>
    /// BLOCK
    /// </dt>
    /// <dd>
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
    /// <p>State value assignment for patch compliance:</p>
    /// <ul>
    /// <li>
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
    /// <li>
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
    /// </ul>
    /// </dd>
    /// </dl>
    pub fn get_rejected_patches_action(&self) -> &::std::option::Option<crate::types::PatchAction> {
        &self.rejected_patches_action
    }
    /// <p>A description of the patch baseline.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the patch baseline.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the patch baseline.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `sources`.
    ///
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
    ///
    /// <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>
    pub fn sources(mut self, input: crate::types::PatchSource) -> Self {
        let mut v = self.sources.unwrap_or_default();
        v.push(input);
        self.sources = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>) -> Self {
        self.sources = input;
        self
    }
    /// <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>
    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchSource>> {
        &self.sources
    }
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
    /// <p>Supported for Windows Server managed nodes only.</p>
    pub fn available_security_updates_compliance_status(mut self, input: crate::types::PatchComplianceStatus) -> Self {
        self.available_security_updates_compliance_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
    /// <p>Supported for Windows Server managed nodes only.</p>
    pub fn set_available_security_updates_compliance_status(mut self, input: ::std::option::Option<crate::types::PatchComplianceStatus>) -> Self {
        self.available_security_updates_compliance_status = input;
        self
    }
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
    /// <p>Supported for Windows Server managed nodes only.</p>
    pub fn get_available_security_updates_compliance_status(&self) -> &::std::option::Option<crate::types::PatchComplianceStatus> {
        &self.available_security_updates_compliance_status
    }
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
    pub fn replace(mut self, input: bool) -> Self {
        self.replace = ::std::option::Option::Some(input);
        self
    }
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
    pub fn set_replace(mut self, input: ::std::option::Option<bool>) -> Self {
        self.replace = input;
        self
    }
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
    pub fn get_replace(&self) -> &::std::option::Option<bool> {
        &self.replace
    }
    /// Consumes the builder and constructs a [`UpdatePatchBaselineInput`](crate::operation::update_patch_baseline::UpdatePatchBaselineInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_patch_baseline::UpdatePatchBaselineInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_patch_baseline::UpdatePatchBaselineInput {
            baseline_id: self.baseline_id,
            name: self.name,
            global_filters: self.global_filters,
            approval_rules: self.approval_rules,
            approved_patches: self.approved_patches,
            approved_patches_compliance_level: self.approved_patches_compliance_level,
            approved_patches_enable_non_security: self.approved_patches_enable_non_security,
            rejected_patches: self.rejected_patches,
            rejected_patches_action: self.rejected_patches_action,
            description: self.description,
            sources: self.sources,
            available_security_updates_compliance_status: self.available_security_updates_compliance_status,
            replace: self.replace,
        })
    }
}