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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The wrapper that contains the Amazon Web Services accounts that are in scope for the assessment.</p><note>
/// <p>You no longer need to specify which Amazon Web Services services are in scope when you create or update an assessment. Audit Manager infers the services in scope by examining your assessment controls and their data sources, and then mapping this information to the relevant Amazon Web Services services.</p>
/// <p>If an underlying data source changes for your assessment, we automatically update the services scope as needed to reflect the correct Amazon Web Services services. This ensures that your assessment collects accurate and comprehensive evidence about all of the relevant services in your AWS environment.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Scope {
/// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
pub aws_accounts: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>,
/// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
/// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
/// </important>
#[deprecated(
note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
)]
pub aws_services: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>,
}
impl Scope {
/// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</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 `.aws_accounts.is_none()`.
pub fn aws_accounts(&self) -> &[crate::types::AwsAccount] {
self.aws_accounts.as_deref().unwrap_or_default()
}
/// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
/// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
/// </important>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aws_services.is_none()`.
#[deprecated(
note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
)]
pub fn aws_services(&self) -> &[crate::types::AwsService] {
self.aws_services.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for Scope {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("Scope");
formatter.field("aws_accounts", &"*** Sensitive Data Redacted ***");
formatter.field("aws_services", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl Scope {
/// Creates a new builder-style object to manufacture [`Scope`](crate::types::Scope).
pub fn builder() -> crate::types::builders::ScopeBuilder {
crate::types::builders::ScopeBuilder::default()
}
}
/// A builder for [`Scope`](crate::types::Scope).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ScopeBuilder {
pub(crate) aws_accounts: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>,
pub(crate) aws_services: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>,
}
impl ScopeBuilder {
/// Appends an item to `aws_accounts`.
///
/// To override the contents of this collection use [`set_aws_accounts`](Self::set_aws_accounts).
///
/// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
pub fn aws_accounts(mut self, input: crate::types::AwsAccount) -> Self {
let mut v = self.aws_accounts.unwrap_or_default();
v.push(input);
self.aws_accounts = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
pub fn set_aws_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>) -> Self {
self.aws_accounts = input;
self
}
/// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
pub fn get_aws_accounts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>> {
&self.aws_accounts
}
/// Appends an item to `aws_services`.
///
/// To override the contents of this collection use [`set_aws_services`](Self::set_aws_services).
///
/// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
/// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
/// </important>
#[deprecated(
note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
)]
pub fn aws_services(mut self, input: crate::types::AwsService) -> Self {
let mut v = self.aws_services.unwrap_or_default();
v.push(input);
self.aws_services = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
/// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
/// </important>
#[deprecated(
note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
)]
pub fn set_aws_services(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>) -> Self {
self.aws_services = input;
self
}
/// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
/// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
/// </important>
#[deprecated(
note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
)]
pub fn get_aws_services(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsService>> {
&self.aws_services
}
/// Consumes the builder and constructs a [`Scope`](crate::types::Scope).
pub fn build(self) -> crate::types::Scope {
crate::types::Scope {
aws_accounts: self.aws_accounts,
aws_services: self.aws_services,
}
}
}
impl ::std::fmt::Debug for ScopeBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ScopeBuilder");
formatter.field("aws_accounts", &"*** Sensitive Data Redacted ***");
formatter.field("aws_services", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}