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
// 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 CreateEventDestinationInput {
/// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
pub configuration_set_name: ::std::option::Option<::std::string::String>,
/// <p>The name that identifies the event destination.</p>
pub event_destination_name: ::std::option::Option<::std::string::String>,
/// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</p><note>
/// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
/// </note>
pub matching_event_types: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>,
/// <p>An object that contains information about an event destination for logging to Amazon CloudWatch Logs.</p>
pub cloud_watch_logs_destination: ::std::option::Option<crate::types::CloudWatchLogsDestination>,
/// <p>An object that contains information about an event destination for logging to Amazon Data Firehose.</p>
pub kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
/// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
pub sns_destination: ::std::option::Option<crate::types::SnsDestination>,
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateEventDestinationInput {
/// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
/// <p>The name that identifies the event destination.</p>
pub fn event_destination_name(&self) -> ::std::option::Option<&str> {
self.event_destination_name.as_deref()
}
/// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</p><note>
/// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
/// </note>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.matching_event_types.is_none()`.
pub fn matching_event_types(&self) -> &[crate::types::EventType] {
self.matching_event_types.as_deref().unwrap_or_default()
}
/// <p>An object that contains information about an event destination for logging to Amazon CloudWatch Logs.</p>
pub fn cloud_watch_logs_destination(&self) -> ::std::option::Option<&crate::types::CloudWatchLogsDestination> {
self.cloud_watch_logs_destination.as_ref()
}
/// <p>An object that contains information about an event destination for logging to Amazon Data Firehose.</p>
pub fn kinesis_firehose_destination(&self) -> ::std::option::Option<&crate::types::KinesisFirehoseDestination> {
self.kinesis_firehose_destination.as_ref()
}
/// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
pub fn sns_destination(&self) -> ::std::option::Option<&crate::types::SnsDestination> {
self.sns_destination.as_ref()
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl CreateEventDestinationInput {
/// Creates a new builder-style object to manufacture [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
pub fn builder() -> crate::operation::create_event_destination::builders::CreateEventDestinationInputBuilder {
crate::operation::create_event_destination::builders::CreateEventDestinationInputBuilder::default()
}
}
/// A builder for [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateEventDestinationInputBuilder {
pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
pub(crate) event_destination_name: ::std::option::Option<::std::string::String>,
pub(crate) matching_event_types: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>,
pub(crate) cloud_watch_logs_destination: ::std::option::Option<crate::types::CloudWatchLogsDestination>,
pub(crate) kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
pub(crate) sns_destination: ::std::option::Option<crate::types::SnsDestination>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateEventDestinationInputBuilder {
/// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
/// This field is required.
pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.configuration_set_name = ::std::option::Option::Some(input.into());
self
}
/// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.configuration_set_name = input;
self
}
/// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
&self.configuration_set_name
}
/// <p>The name that identifies the event destination.</p>
/// This field is required.
pub fn event_destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.event_destination_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name that identifies the event destination.</p>
pub fn set_event_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.event_destination_name = input;
self
}
/// <p>The name that identifies the event destination.</p>
pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
&self.event_destination_name
}
/// Appends an item to `matching_event_types`.
///
/// To override the contents of this collection use [`set_matching_event_types`](Self::set_matching_event_types).
///
/// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</p><note>
/// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
/// </note>
pub fn matching_event_types(mut self, input: crate::types::EventType) -> Self {
let mut v = self.matching_event_types.unwrap_or_default();
v.push(input);
self.matching_event_types = ::std::option::Option::Some(v);
self
}
/// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</p><note>
/// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
/// </note>
pub fn set_matching_event_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>) -> Self {
self.matching_event_types = input;
self
}
/// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</p><note>
/// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
/// </note>
pub fn get_matching_event_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EventType>> {
&self.matching_event_types
}
/// <p>An object that contains information about an event destination for logging to Amazon CloudWatch Logs.</p>
pub fn cloud_watch_logs_destination(mut self, input: crate::types::CloudWatchLogsDestination) -> Self {
self.cloud_watch_logs_destination = ::std::option::Option::Some(input);
self
}
/// <p>An object that contains information about an event destination for logging to Amazon CloudWatch Logs.</p>
pub fn set_cloud_watch_logs_destination(mut self, input: ::std::option::Option<crate::types::CloudWatchLogsDestination>) -> Self {
self.cloud_watch_logs_destination = input;
self
}
/// <p>An object that contains information about an event destination for logging to Amazon CloudWatch Logs.</p>
pub fn get_cloud_watch_logs_destination(&self) -> &::std::option::Option<crate::types::CloudWatchLogsDestination> {
&self.cloud_watch_logs_destination
}
/// <p>An object that contains information about an event destination for logging to Amazon Data Firehose.</p>
pub fn kinesis_firehose_destination(mut self, input: crate::types::KinesisFirehoseDestination) -> Self {
self.kinesis_firehose_destination = ::std::option::Option::Some(input);
self
}
/// <p>An object that contains information about an event destination for logging to Amazon Data Firehose.</p>
pub fn set_kinesis_firehose_destination(mut self, input: ::std::option::Option<crate::types::KinesisFirehoseDestination>) -> Self {
self.kinesis_firehose_destination = input;
self
}
/// <p>An object that contains information about an event destination for logging to Amazon Data Firehose.</p>
pub fn get_kinesis_firehose_destination(&self) -> &::std::option::Option<crate::types::KinesisFirehoseDestination> {
&self.kinesis_firehose_destination
}
/// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
pub fn sns_destination(mut self, input: crate::types::SnsDestination) -> Self {
self.sns_destination = ::std::option::Option::Some(input);
self
}
/// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
pub fn set_sns_destination(mut self, input: ::std::option::Option<crate::types::SnsDestination>) -> Self {
self.sns_destination = input;
self
}
/// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
pub fn get_sns_destination(&self) -> &::std::option::Option<crate::types::SnsDestination> {
&self.sns_destination
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// Consumes the builder and constructs a [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_event_destination::CreateEventDestinationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_event_destination::CreateEventDestinationInput {
configuration_set_name: self.configuration_set_name,
event_destination_name: self.event_destination_name,
matching_event_types: self.matching_event_types,
cloud_watch_logs_destination: self.cloud_watch_logs_destination,
kinesis_firehose_destination: self.kinesis_firehose_destination,
sns_destination: self.sns_destination,
client_token: self.client_token,
})
}
}