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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the schedule settings for a campaign.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Schedule {
/// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
pub end_time: ::std::option::Option<::std::string::String>,
/// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
pub event_filter: ::std::option::Option<crate::types::CampaignEventFilter>,
/// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
pub frequency: ::std::option::Option<crate::types::Frequency>,
/// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
pub is_local_time: ::std::option::Option<bool>,
/// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
/// <ul>
/// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
/// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
/// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
/// </ul>
/// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
pub quiet_time: ::std::option::Option<crate::types::QuietTime>,
/// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
pub start_time: ::std::option::Option<::std::string::String>,
/// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
pub timezone: ::std::option::Option<::std::string::String>,
}
impl Schedule {
/// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
pub fn end_time(&self) -> ::std::option::Option<&str> {
self.end_time.as_deref()
}
/// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
pub fn event_filter(&self) -> ::std::option::Option<&crate::types::CampaignEventFilter> {
self.event_filter.as_ref()
}
/// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
pub fn frequency(&self) -> ::std::option::Option<&crate::types::Frequency> {
self.frequency.as_ref()
}
/// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
pub fn is_local_time(&self) -> ::std::option::Option<bool> {
self.is_local_time
}
/// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
/// <ul>
/// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
/// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
/// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
/// </ul>
/// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
pub fn quiet_time(&self) -> ::std::option::Option<&crate::types::QuietTime> {
self.quiet_time.as_ref()
}
/// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
pub fn start_time(&self) -> ::std::option::Option<&str> {
self.start_time.as_deref()
}
/// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
pub fn timezone(&self) -> ::std::option::Option<&str> {
self.timezone.as_deref()
}
}
impl Schedule {
/// Creates a new builder-style object to manufacture [`Schedule`](crate::types::Schedule).
pub fn builder() -> crate::types::builders::ScheduleBuilder {
crate::types::builders::ScheduleBuilder::default()
}
}
/// A builder for [`Schedule`](crate::types::Schedule).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ScheduleBuilder {
pub(crate) end_time: ::std::option::Option<::std::string::String>,
pub(crate) event_filter: ::std::option::Option<crate::types::CampaignEventFilter>,
pub(crate) frequency: ::std::option::Option<crate::types::Frequency>,
pub(crate) is_local_time: ::std::option::Option<bool>,
pub(crate) quiet_time: ::std::option::Option<crate::types::QuietTime>,
pub(crate) start_time: ::std::option::Option<::std::string::String>,
pub(crate) timezone: ::std::option::Option<::std::string::String>,
}
impl ScheduleBuilder {
/// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
pub fn end_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.end_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
pub fn set_end_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.end_time = input;
self
}
/// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::std::string::String> {
&self.end_time
}
/// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
pub fn event_filter(mut self, input: crate::types::CampaignEventFilter) -> Self {
self.event_filter = ::std::option::Option::Some(input);
self
}
/// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
pub fn set_event_filter(mut self, input: ::std::option::Option<crate::types::CampaignEventFilter>) -> Self {
self.event_filter = input;
self
}
/// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
pub fn get_event_filter(&self) -> &::std::option::Option<crate::types::CampaignEventFilter> {
&self.event_filter
}
/// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
pub fn frequency(mut self, input: crate::types::Frequency) -> Self {
self.frequency = ::std::option::Option::Some(input);
self
}
/// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
pub fn set_frequency(mut self, input: ::std::option::Option<crate::types::Frequency>) -> Self {
self.frequency = input;
self
}
/// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
pub fn get_frequency(&self) -> &::std::option::Option<crate::types::Frequency> {
&self.frequency
}
/// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
pub fn is_local_time(mut self, input: bool) -> Self {
self.is_local_time = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
pub fn set_is_local_time(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_local_time = input;
self
}
/// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
pub fn get_is_local_time(&self) -> &::std::option::Option<bool> {
&self.is_local_time
}
/// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
/// <ul>
/// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
/// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
/// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
/// </ul>
/// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
pub fn quiet_time(mut self, input: crate::types::QuietTime) -> Self {
self.quiet_time = ::std::option::Option::Some(input);
self
}
/// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
/// <ul>
/// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
/// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
/// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
/// </ul>
/// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
pub fn set_quiet_time(mut self, input: ::std::option::Option<crate::types::QuietTime>) -> Self {
self.quiet_time = input;
self
}
/// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
/// <ul>
/// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
/// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
/// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
/// </ul>
/// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
pub fn get_quiet_time(&self) -> &::std::option::Option<crate::types::QuietTime> {
&self.quiet_time
}
/// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
pub fn start_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.start_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
pub fn set_start_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.start_time = input;
self
}
/// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
pub fn get_start_time(&self) -> &::std::option::Option<::std::string::String> {
&self.start_time
}
/// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
pub fn timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.timezone = ::std::option::Option::Some(input.into());
self
}
/// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
pub fn set_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.timezone = input;
self
}
/// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
pub fn get_timezone(&self) -> &::std::option::Option<::std::string::String> {
&self.timezone
}
/// Consumes the builder and constructs a [`Schedule`](crate::types::Schedule).
pub fn build(self) -> crate::types::Schedule {
crate::types::Schedule {
end_time: self.end_time,
event_filter: self.event_filter,
frequency: self.frequency,
is_local_time: self.is_local_time,
quiet_time: self.quiet_time,
start_time: self.start_time,
timezone: self.timezone,
}
}
}