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
260
261
262
263
264
265
266
267
268
269
270
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the configuration and other settings for an activity in a journey.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Activity {
/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
pub custom: ::std::option::Option<crate::types::CustomMessageActivity>,
/// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
pub conditional_split: ::std::option::Option<crate::types::ConditionalSplitActivity>,
/// <p>The custom description of the activity.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
pub email: ::std::option::Option<crate::types::EmailMessageActivity>,
/// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
pub holdout: ::std::option::Option<crate::types::HoldoutActivity>,
/// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
pub multi_condition: ::std::option::Option<crate::types::MultiConditionalSplitActivity>,
/// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
pub push: ::std::option::Option<crate::types::PushMessageActivity>,
/// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
pub random_split: ::std::option::Option<crate::types::RandomSplitActivity>,
/// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
pub sms: ::std::option::Option<crate::types::SmsMessageActivity>,
/// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
pub wait: ::std::option::Option<crate::types::WaitActivity>,
/// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
pub contact_center: ::std::option::Option<crate::types::ContactCenterActivity>,
}
impl Activity {
/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
pub fn custom(&self) -> ::std::option::Option<&crate::types::CustomMessageActivity> {
self.custom.as_ref()
}
/// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
pub fn conditional_split(&self) -> ::std::option::Option<&crate::types::ConditionalSplitActivity> {
self.conditional_split.as_ref()
}
/// <p>The custom description of the activity.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
pub fn email(&self) -> ::std::option::Option<&crate::types::EmailMessageActivity> {
self.email.as_ref()
}
/// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
pub fn holdout(&self) -> ::std::option::Option<&crate::types::HoldoutActivity> {
self.holdout.as_ref()
}
/// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
pub fn multi_condition(&self) -> ::std::option::Option<&crate::types::MultiConditionalSplitActivity> {
self.multi_condition.as_ref()
}
/// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
pub fn push(&self) -> ::std::option::Option<&crate::types::PushMessageActivity> {
self.push.as_ref()
}
/// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
pub fn random_split(&self) -> ::std::option::Option<&crate::types::RandomSplitActivity> {
self.random_split.as_ref()
}
/// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
pub fn sms(&self) -> ::std::option::Option<&crate::types::SmsMessageActivity> {
self.sms.as_ref()
}
/// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
pub fn wait(&self) -> ::std::option::Option<&crate::types::WaitActivity> {
self.wait.as_ref()
}
/// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
pub fn contact_center(&self) -> ::std::option::Option<&crate::types::ContactCenterActivity> {
self.contact_center.as_ref()
}
}
impl Activity {
/// Creates a new builder-style object to manufacture [`Activity`](crate::types::Activity).
pub fn builder() -> crate::types::builders::ActivityBuilder {
crate::types::builders::ActivityBuilder::default()
}
}
/// A builder for [`Activity`](crate::types::Activity).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActivityBuilder {
pub(crate) custom: ::std::option::Option<crate::types::CustomMessageActivity>,
pub(crate) conditional_split: ::std::option::Option<crate::types::ConditionalSplitActivity>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) email: ::std::option::Option<crate::types::EmailMessageActivity>,
pub(crate) holdout: ::std::option::Option<crate::types::HoldoutActivity>,
pub(crate) multi_condition: ::std::option::Option<crate::types::MultiConditionalSplitActivity>,
pub(crate) push: ::std::option::Option<crate::types::PushMessageActivity>,
pub(crate) random_split: ::std::option::Option<crate::types::RandomSplitActivity>,
pub(crate) sms: ::std::option::Option<crate::types::SmsMessageActivity>,
pub(crate) wait: ::std::option::Option<crate::types::WaitActivity>,
pub(crate) contact_center: ::std::option::Option<crate::types::ContactCenterActivity>,
}
impl ActivityBuilder {
/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
pub fn custom(mut self, input: crate::types::CustomMessageActivity) -> Self {
self.custom = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
pub fn set_custom(mut self, input: ::std::option::Option<crate::types::CustomMessageActivity>) -> Self {
self.custom = input;
self
}
/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
pub fn get_custom(&self) -> &::std::option::Option<crate::types::CustomMessageActivity> {
&self.custom
}
/// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
pub fn conditional_split(mut self, input: crate::types::ConditionalSplitActivity) -> Self {
self.conditional_split = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
pub fn set_conditional_split(mut self, input: ::std::option::Option<crate::types::ConditionalSplitActivity>) -> Self {
self.conditional_split = input;
self
}
/// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
pub fn get_conditional_split(&self) -> &::std::option::Option<crate::types::ConditionalSplitActivity> {
&self.conditional_split
}
/// <p>The custom description of the activity.</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 custom description of the activity.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The custom description of the activity.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
pub fn email(mut self, input: crate::types::EmailMessageActivity) -> Self {
self.email = ::std::option::Option::Some(input);
self
}
/// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
pub fn set_email(mut self, input: ::std::option::Option<crate::types::EmailMessageActivity>) -> Self {
self.email = input;
self
}
/// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
pub fn get_email(&self) -> &::std::option::Option<crate::types::EmailMessageActivity> {
&self.email
}
/// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
pub fn holdout(mut self, input: crate::types::HoldoutActivity) -> Self {
self.holdout = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
pub fn set_holdout(mut self, input: ::std::option::Option<crate::types::HoldoutActivity>) -> Self {
self.holdout = input;
self
}
/// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
pub fn get_holdout(&self) -> &::std::option::Option<crate::types::HoldoutActivity> {
&self.holdout
}
/// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
pub fn multi_condition(mut self, input: crate::types::MultiConditionalSplitActivity) -> Self {
self.multi_condition = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
pub fn set_multi_condition(mut self, input: ::std::option::Option<crate::types::MultiConditionalSplitActivity>) -> Self {
self.multi_condition = input;
self
}
/// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
pub fn get_multi_condition(&self) -> &::std::option::Option<crate::types::MultiConditionalSplitActivity> {
&self.multi_condition
}
/// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
pub fn push(mut self, input: crate::types::PushMessageActivity) -> Self {
self.push = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
pub fn set_push(mut self, input: ::std::option::Option<crate::types::PushMessageActivity>) -> Self {
self.push = input;
self
}
/// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
pub fn get_push(&self) -> &::std::option::Option<crate::types::PushMessageActivity> {
&self.push
}
/// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
pub fn random_split(mut self, input: crate::types::RandomSplitActivity) -> Self {
self.random_split = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
pub fn set_random_split(mut self, input: ::std::option::Option<crate::types::RandomSplitActivity>) -> Self {
self.random_split = input;
self
}
/// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
pub fn get_random_split(&self) -> &::std::option::Option<crate::types::RandomSplitActivity> {
&self.random_split
}
/// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
pub fn sms(mut self, input: crate::types::SmsMessageActivity) -> Self {
self.sms = ::std::option::Option::Some(input);
self
}
/// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
pub fn set_sms(mut self, input: ::std::option::Option<crate::types::SmsMessageActivity>) -> Self {
self.sms = input;
self
}
/// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
pub fn get_sms(&self) -> &::std::option::Option<crate::types::SmsMessageActivity> {
&self.sms
}
/// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
pub fn wait(mut self, input: crate::types::WaitActivity) -> Self {
self.wait = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
pub fn set_wait(mut self, input: ::std::option::Option<crate::types::WaitActivity>) -> Self {
self.wait = input;
self
}
/// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
pub fn get_wait(&self) -> &::std::option::Option<crate::types::WaitActivity> {
&self.wait
}
/// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
pub fn contact_center(mut self, input: crate::types::ContactCenterActivity) -> Self {
self.contact_center = ::std::option::Option::Some(input);
self
}
/// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
pub fn set_contact_center(mut self, input: ::std::option::Option<crate::types::ContactCenterActivity>) -> Self {
self.contact_center = input;
self
}
/// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
pub fn get_contact_center(&self) -> &::std::option::Option<crate::types::ContactCenterActivity> {
&self.contact_center
}
/// Consumes the builder and constructs a [`Activity`](crate::types::Activity).
pub fn build(self) -> crate::types::Activity {
crate::types::Activity {
custom: self.custom,
conditional_split: self.conditional_split,
description: self.description,
email: self.email,
holdout: self.holdout,
multi_condition: self.multi_condition,
push: self.push,
random_split: self.random_split,
sms: self.sms,
wait: self.wait,
contact_center: self.contact_center,
}
}
}