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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about a specific security standard.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Standard {
/// <p>The ARN of the standard.</p>
pub standards_arn: ::std::option::Option<::std::string::String>,
/// <p>The name of the standard.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>A description of the standard.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
/// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
pub enabled_by_default: ::std::option::Option<bool>,
/// <p>Provides details about the management of a standard.</p>
pub standards_managed_by: ::std::option::Option<crate::types::StandardsManagedBy>,
}
impl Standard {
/// <p>The ARN of the standard.</p>
pub fn standards_arn(&self) -> ::std::option::Option<&str> {
self.standards_arn.as_deref()
}
/// <p>The name of the standard.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A description of the standard.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
/// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
pub fn enabled_by_default(&self) -> ::std::option::Option<bool> {
self.enabled_by_default
}
/// <p>Provides details about the management of a standard.</p>
pub fn standards_managed_by(&self) -> ::std::option::Option<&crate::types::StandardsManagedBy> {
self.standards_managed_by.as_ref()
}
}
impl Standard {
/// Creates a new builder-style object to manufacture [`Standard`](crate::types::Standard).
pub fn builder() -> crate::types::builders::StandardBuilder {
crate::types::builders::StandardBuilder::default()
}
}
/// A builder for [`Standard`](crate::types::Standard).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StandardBuilder {
pub(crate) standards_arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) enabled_by_default: ::std::option::Option<bool>,
pub(crate) standards_managed_by: ::std::option::Option<crate::types::StandardsManagedBy>,
}
impl StandardBuilder {
/// <p>The ARN of the standard.</p>
pub fn standards_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.standards_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the standard.</p>
pub fn set_standards_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.standards_arn = input;
self
}
/// <p>The ARN of the standard.</p>
pub fn get_standards_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.standards_arn
}
/// <p>The name of the standard.</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 standard.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the standard.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>A description of the standard.</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 standard.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A description of the standard.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
/// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
pub fn enabled_by_default(mut self, input: bool) -> Self {
self.enabled_by_default = ::std::option::Option::Some(input);
self
}
/// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
/// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
pub fn set_enabled_by_default(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled_by_default = input;
self
}
/// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
/// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
pub fn get_enabled_by_default(&self) -> &::std::option::Option<bool> {
&self.enabled_by_default
}
/// <p>Provides details about the management of a standard.</p>
pub fn standards_managed_by(mut self, input: crate::types::StandardsManagedBy) -> Self {
self.standards_managed_by = ::std::option::Option::Some(input);
self
}
/// <p>Provides details about the management of a standard.</p>
pub fn set_standards_managed_by(mut self, input: ::std::option::Option<crate::types::StandardsManagedBy>) -> Self {
self.standards_managed_by = input;
self
}
/// <p>Provides details about the management of a standard.</p>
pub fn get_standards_managed_by(&self) -> &::std::option::Option<crate::types::StandardsManagedBy> {
&self.standards_managed_by
}
/// Consumes the builder and constructs a [`Standard`](crate::types::Standard).
pub fn build(self) -> crate::types::Standard {
crate::types::Standard {
standards_arn: self.standards_arn,
name: self.name,
description: self.description,
enabled_by_default: self.enabled_by_default,
standards_managed_by: self.standards_managed_by,
}
}
}