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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about how to remediate a finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Remediation {
/// <p>An object that contains information about the recommended course of action to remediate a finding.</p>
pub recommendation: ::std::option::Option<crate::types::Recommendation>,
/// <p>A list of <code>SuggestedFix</code> objects. Each object contains information about a suggested code fix to remediate the finding.</p>
pub suggested_fixes: ::std::option::Option<::std::vec::Vec<crate::types::SuggestedFix>>,
}
impl Remediation {
/// <p>An object that contains information about the recommended course of action to remediate a finding.</p>
pub fn recommendation(&self) -> ::std::option::Option<&crate::types::Recommendation> {
self.recommendation.as_ref()
}
/// <p>A list of <code>SuggestedFix</code> objects. Each object contains information about a suggested code fix to remediate the finding.</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 `.suggested_fixes.is_none()`.
pub fn suggested_fixes(&self) -> &[crate::types::SuggestedFix] {
self.suggested_fixes.as_deref().unwrap_or_default()
}
}
impl Remediation {
/// Creates a new builder-style object to manufacture [`Remediation`](crate::types::Remediation).
pub fn builder() -> crate::types::builders::RemediationBuilder {
crate::types::builders::RemediationBuilder::default()
}
}
/// A builder for [`Remediation`](crate::types::Remediation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RemediationBuilder {
pub(crate) recommendation: ::std::option::Option<crate::types::Recommendation>,
pub(crate) suggested_fixes: ::std::option::Option<::std::vec::Vec<crate::types::SuggestedFix>>,
}
impl RemediationBuilder {
/// <p>An object that contains information about the recommended course of action to remediate a finding.</p>
pub fn recommendation(mut self, input: crate::types::Recommendation) -> Self {
self.recommendation = ::std::option::Option::Some(input);
self
}
/// <p>An object that contains information about the recommended course of action to remediate a finding.</p>
pub fn set_recommendation(mut self, input: ::std::option::Option<crate::types::Recommendation>) -> Self {
self.recommendation = input;
self
}
/// <p>An object that contains information about the recommended course of action to remediate a finding.</p>
pub fn get_recommendation(&self) -> &::std::option::Option<crate::types::Recommendation> {
&self.recommendation
}
/// Appends an item to `suggested_fixes`.
///
/// To override the contents of this collection use [`set_suggested_fixes`](Self::set_suggested_fixes).
///
/// <p>A list of <code>SuggestedFix</code> objects. Each object contains information about a suggested code fix to remediate the finding.</p>
pub fn suggested_fixes(mut self, input: crate::types::SuggestedFix) -> Self {
let mut v = self.suggested_fixes.unwrap_or_default();
v.push(input);
self.suggested_fixes = ::std::option::Option::Some(v);
self
}
/// <p>A list of <code>SuggestedFix</code> objects. Each object contains information about a suggested code fix to remediate the finding.</p>
pub fn set_suggested_fixes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SuggestedFix>>) -> Self {
self.suggested_fixes = input;
self
}
/// <p>A list of <code>SuggestedFix</code> objects. Each object contains information about a suggested code fix to remediate the finding.</p>
pub fn get_suggested_fixes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SuggestedFix>> {
&self.suggested_fixes
}
/// Consumes the builder and constructs a [`Remediation`](crate::types::Remediation).
pub fn build(self) -> crate::types::Remediation {
crate::types::Remediation {
recommendation: self.recommendation,
suggested_fixes: self.suggested_fixes,
}
}
}