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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Details for an individual security standard control.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StandardsControl {
    /// <p>The ARN of the security standard control.</p>
    pub standards_control_arn: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the security standard control. Indicates whether the control is enabled or disabled. Security Hub does not check against disabled controls.</p>
    pub control_status: ::std::option::Option<crate::types::ControlStatus>,
    /// <p>The reason provided for the most recent change in status for the control.</p>
    pub disabled_reason: ::std::option::Option<::std::string::String>,
    /// <p>The date and time that the status of the security standard control was most recently updated.</p>
    pub control_status_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The identifier of the security standard control.</p>
    pub control_id: ::std::option::Option<::std::string::String>,
    /// <p>The title of the security standard control.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The longer description of the security standard control. Provides information about what the control is checking for.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>A link to remediation information for the control in the Security Hub user documentation.</p>
    pub remediation_url: ::std::option::Option<::std::string::String>,
    /// <p>The severity of findings generated from this security standard control.</p>
    /// <p>The finding severity is based on an assessment of how easy it would be to compromise Amazon Web Services resources if the issue is detected.</p>
    pub severity_rating: ::std::option::Option<crate::types::SeverityRating>,
    /// <p>The list of requirements that are related to this control.</p>
    pub related_requirements: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StandardsControl {
    /// <p>The ARN of the security standard control.</p>
    pub fn standards_control_arn(&self) -> ::std::option::Option<&str> {
        self.standards_control_arn.as_deref()
    }
    /// <p>The current status of the security standard control. Indicates whether the control is enabled or disabled. Security Hub does not check against disabled controls.</p>
    pub fn control_status(&self) -> ::std::option::Option<&crate::types::ControlStatus> {
        self.control_status.as_ref()
    }
    /// <p>The reason provided for the most recent change in status for the control.</p>
    pub fn disabled_reason(&self) -> ::std::option::Option<&str> {
        self.disabled_reason.as_deref()
    }
    /// <p>The date and time that the status of the security standard control was most recently updated.</p>
    pub fn control_status_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.control_status_updated_at.as_ref()
    }
    /// <p>The identifier of the security standard control.</p>
    pub fn control_id(&self) -> ::std::option::Option<&str> {
        self.control_id.as_deref()
    }
    /// <p>The title of the security standard control.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The longer description of the security standard control. Provides information about what the control is checking for.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A link to remediation information for the control in the Security Hub user documentation.</p>
    pub fn remediation_url(&self) -> ::std::option::Option<&str> {
        self.remediation_url.as_deref()
    }
    /// <p>The severity of findings generated from this security standard control.</p>
    /// <p>The finding severity is based on an assessment of how easy it would be to compromise Amazon Web Services resources if the issue is detected.</p>
    pub fn severity_rating(&self) -> ::std::option::Option<&crate::types::SeverityRating> {
        self.severity_rating.as_ref()
    }
    /// <p>The list of requirements that are related to this control.</p>
    pub fn related_requirements(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.related_requirements.as_deref()
    }
}
impl StandardsControl {
    /// Creates a new builder-style object to manufacture [`StandardsControl`](crate::types::StandardsControl).
    pub fn builder() -> crate::types::builders::StandardsControlBuilder {
        crate::types::builders::StandardsControlBuilder::default()
    }
}

/// A builder for [`StandardsControl`](crate::types::StandardsControl).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StandardsControlBuilder {
    pub(crate) standards_control_arn: ::std::option::Option<::std::string::String>,
    pub(crate) control_status: ::std::option::Option<crate::types::ControlStatus>,
    pub(crate) disabled_reason: ::std::option::Option<::std::string::String>,
    pub(crate) control_status_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) control_id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) remediation_url: ::std::option::Option<::std::string::String>,
    pub(crate) severity_rating: ::std::option::Option<crate::types::SeverityRating>,
    pub(crate) related_requirements: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StandardsControlBuilder {
    /// <p>The ARN of the security standard control.</p>
    pub fn standards_control_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.standards_control_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the security standard control.</p>
    pub fn set_standards_control_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.standards_control_arn = input;
        self
    }
    /// <p>The ARN of the security standard control.</p>
    pub fn get_standards_control_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.standards_control_arn
    }
    /// <p>The current status of the security standard control. Indicates whether the control is enabled or disabled. Security Hub does not check against disabled controls.</p>
    pub fn control_status(mut self, input: crate::types::ControlStatus) -> Self {
        self.control_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the security standard control. Indicates whether the control is enabled or disabled. Security Hub does not check against disabled controls.</p>
    pub fn set_control_status(mut self, input: ::std::option::Option<crate::types::ControlStatus>) -> Self {
        self.control_status = input;
        self
    }
    /// <p>The current status of the security standard control. Indicates whether the control is enabled or disabled. Security Hub does not check against disabled controls.</p>
    pub fn get_control_status(&self) -> &::std::option::Option<crate::types::ControlStatus> {
        &self.control_status
    }
    /// <p>The reason provided for the most recent change in status for the control.</p>
    pub fn disabled_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disabled_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason provided for the most recent change in status for the control.</p>
    pub fn set_disabled_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disabled_reason = input;
        self
    }
    /// <p>The reason provided for the most recent change in status for the control.</p>
    pub fn get_disabled_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.disabled_reason
    }
    /// <p>The date and time that the status of the security standard control was most recently updated.</p>
    pub fn control_status_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.control_status_updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the status of the security standard control was most recently updated.</p>
    pub fn set_control_status_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.control_status_updated_at = input;
        self
    }
    /// <p>The date and time that the status of the security standard control was most recently updated.</p>
    pub fn get_control_status_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.control_status_updated_at
    }
    /// <p>The identifier of the security standard control.</p>
    pub fn control_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.control_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the security standard control.</p>
    pub fn set_control_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.control_id = input;
        self
    }
    /// <p>The identifier of the security standard control.</p>
    pub fn get_control_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.control_id
    }
    /// <p>The title of the security standard control.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the security standard control.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the security standard control.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The longer description of the security standard control. Provides information about what the control is checking for.</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>The longer description of the security standard control. Provides information about what the control is checking for.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The longer description of the security standard control. Provides information about what the control is checking for.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>A link to remediation information for the control in the Security Hub user documentation.</p>
    pub fn remediation_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.remediation_url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A link to remediation information for the control in the Security Hub user documentation.</p>
    pub fn set_remediation_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.remediation_url = input;
        self
    }
    /// <p>A link to remediation information for the control in the Security Hub user documentation.</p>
    pub fn get_remediation_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.remediation_url
    }
    /// <p>The severity of findings generated from this security standard control.</p>
    /// <p>The finding severity is based on an assessment of how easy it would be to compromise Amazon Web Services resources if the issue is detected.</p>
    pub fn severity_rating(mut self, input: crate::types::SeverityRating) -> Self {
        self.severity_rating = ::std::option::Option::Some(input);
        self
    }
    /// <p>The severity of findings generated from this security standard control.</p>
    /// <p>The finding severity is based on an assessment of how easy it would be to compromise Amazon Web Services resources if the issue is detected.</p>
    pub fn set_severity_rating(mut self, input: ::std::option::Option<crate::types::SeverityRating>) -> Self {
        self.severity_rating = input;
        self
    }
    /// <p>The severity of findings generated from this security standard control.</p>
    /// <p>The finding severity is based on an assessment of how easy it would be to compromise Amazon Web Services resources if the issue is detected.</p>
    pub fn get_severity_rating(&self) -> &::std::option::Option<crate::types::SeverityRating> {
        &self.severity_rating
    }
    /// Appends an item to `related_requirements`.
    ///
    /// To override the contents of this collection use [`set_related_requirements`](Self::set_related_requirements).
    ///
    /// <p>The list of requirements that are related to this control.</p>
    pub fn related_requirements(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.related_requirements.unwrap_or_default();
        v.push(input.into());
        self.related_requirements = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of requirements that are related to this control.</p>
    pub fn set_related_requirements(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.related_requirements = input;
        self
    }
    /// <p>The list of requirements that are related to this control.</p>
    pub fn get_related_requirements(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.related_requirements
    }
    /// Consumes the builder and constructs a [`StandardsControl`](crate::types::StandardsControl).
    pub fn build(self) -> crate::types::StandardsControl {
        crate::types::StandardsControl {
            standards_control_arn: self.standards_control_arn,
            control_status: self.control_status,
            disabled_reason: self.disabled_reason,
            control_status_updated_at: self.control_status_updated_at,
            control_id: self.control_id,
            title: self.title,
            description: self.description,
            remediation_url: self.remediation_url,
            severity_rating: self.severity_rating,
            related_requirements: self.related_requirements,
        }
    }
}