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
// 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 UpdateScheduledAuditInput {
/// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
pub frequency: ::std::option::Option<crate::types::AuditFrequency>,
/// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
pub day_of_month: ::std::option::Option<::std::string::String>,
/// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
pub day_of_week: ::std::option::Option<crate::types::DayOfWeek>,
/// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
pub target_check_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The name of the scheduled audit. (Max. 128 chars)</p>
pub scheduled_audit_name: ::std::option::Option<::std::string::String>,
}
impl UpdateScheduledAuditInput {
/// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
pub fn frequency(&self) -> ::std::option::Option<&crate::types::AuditFrequency> {
self.frequency.as_ref()
}
/// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
pub fn day_of_month(&self) -> ::std::option::Option<&str> {
self.day_of_month.as_deref()
}
/// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
pub fn day_of_week(&self) -> ::std::option::Option<&crate::types::DayOfWeek> {
self.day_of_week.as_ref()
}
/// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</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 `.target_check_names.is_none()`.
pub fn target_check_names(&self) -> &[::std::string::String] {
self.target_check_names.as_deref().unwrap_or_default()
}
/// <p>The name of the scheduled audit. (Max. 128 chars)</p>
pub fn scheduled_audit_name(&self) -> ::std::option::Option<&str> {
self.scheduled_audit_name.as_deref()
}
}
impl UpdateScheduledAuditInput {
/// Creates a new builder-style object to manufacture [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
pub fn builder() -> crate::operation::update_scheduled_audit::builders::UpdateScheduledAuditInputBuilder {
crate::operation::update_scheduled_audit::builders::UpdateScheduledAuditInputBuilder::default()
}
}
/// A builder for [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateScheduledAuditInputBuilder {
pub(crate) frequency: ::std::option::Option<crate::types::AuditFrequency>,
pub(crate) day_of_month: ::std::option::Option<::std::string::String>,
pub(crate) day_of_week: ::std::option::Option<crate::types::DayOfWeek>,
pub(crate) target_check_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) scheduled_audit_name: ::std::option::Option<::std::string::String>,
}
impl UpdateScheduledAuditInputBuilder {
/// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
pub fn frequency(mut self, input: crate::types::AuditFrequency) -> Self {
self.frequency = ::std::option::Option::Some(input);
self
}
/// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
pub fn set_frequency(mut self, input: ::std::option::Option<crate::types::AuditFrequency>) -> Self {
self.frequency = input;
self
}
/// <p>How often the scheduled audit takes place, either <code>DAILY</code>, <code>WEEKLY</code>, <code>BIWEEKLY</code>, or <code>MONTHLY</code>. The start time of each audit is determined by the system.</p>
pub fn get_frequency(&self) -> &::std::option::Option<crate::types::AuditFrequency> {
&self.frequency
}
/// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
pub fn day_of_month(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.day_of_month = ::std::option::Option::Some(input.into());
self
}
/// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
pub fn set_day_of_month(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.day_of_month = input;
self
}
/// <p>The day of the month on which the scheduled audit takes place. This can be <code>1</code> through <code>31</code> or <code>LAST</code>. This field is required if the <code>frequency</code> parameter is set to <code>MONTHLY</code>. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.</p>
pub fn get_day_of_month(&self) -> &::std::option::Option<::std::string::String> {
&self.day_of_month
}
/// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
pub fn day_of_week(mut self, input: crate::types::DayOfWeek) -> Self {
self.day_of_week = ::std::option::Option::Some(input);
self
}
/// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
pub fn set_day_of_week(mut self, input: ::std::option::Option<crate::types::DayOfWeek>) -> Self {
self.day_of_week = input;
self
}
/// <p>The day of the week on which the scheduled audit takes place. This can be one of <code>SUN</code>, <code>MON</code>, <code>TUE</code>, <code>WED</code>, <code>THU</code>, <code>FRI</code>, or <code>SAT</code>. This field is required if the "frequency" parameter is set to <code>WEEKLY</code> or <code>BIWEEKLY</code>.</p>
pub fn get_day_of_week(&self) -> &::std::option::Option<crate::types::DayOfWeek> {
&self.day_of_week
}
/// Appends an item to `target_check_names`.
///
/// To override the contents of this collection use [`set_target_check_names`](Self::set_target_check_names).
///
/// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
pub fn target_check_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.target_check_names.unwrap_or_default();
v.push(input.into());
self.target_check_names = ::std::option::Option::Some(v);
self
}
/// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
pub fn set_target_check_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.target_check_names = input;
self
}
/// <p>Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use <code>DescribeAccountAuditConfiguration</code> to see the list of all checks, including those that are enabled or use <code>UpdateAccountAuditConfiguration</code> to select which checks are enabled.)</p>
pub fn get_target_check_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.target_check_names
}
/// <p>The name of the scheduled audit. (Max. 128 chars)</p>
/// This field is required.
pub fn scheduled_audit_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.scheduled_audit_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the scheduled audit. (Max. 128 chars)</p>
pub fn set_scheduled_audit_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.scheduled_audit_name = input;
self
}
/// <p>The name of the scheduled audit. (Max. 128 chars)</p>
pub fn get_scheduled_audit_name(&self) -> &::std::option::Option<::std::string::String> {
&self.scheduled_audit_name
}
/// Consumes the builder and constructs a [`UpdateScheduledAuditInput`](crate::operation::update_scheduled_audit::UpdateScheduledAuditInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_scheduled_audit::UpdateScheduledAuditInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_scheduled_audit::UpdateScheduledAuditInput {
frequency: self.frequency,
day_of_month: self.day_of_month,
day_of_week: self.day_of_week,
target_check_names: self.target_check_names,
scheduled_audit_name: self.scheduled_audit_name,
})
}
}