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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
//! Types for the `AppIntegrations` service.
/// The [`AWS::AppIntegrations::EventIntegration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html) resource type.
#[derive(Debug, Default)]
pub struct EventIntegration {
properties: EventIntegrationProperties
}
/// Properties for the `EventIntegration` resource.
#[derive(Debug, Default)]
pub struct EventIntegrationProperties {
/// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-description).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub description: Option<::Value<String>>,
/// Property [`EventBridgeBus`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-eventbridgebus).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub event_bridge_bus: ::Value<String>,
/// Property [`EventFilter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-eventfilter).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub event_filter: ::Value<self::event_integration::EventFilter>,
/// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-name).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub name: ::Value<String>,
/// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-tags).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub tags: Option<::ValueList<::Tag>>,
}
impl ::serde::Serialize for EventIntegrationProperties {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref description) = self.description {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Description", description)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "EventBridgeBus", &self.event_bridge_bus)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "EventFilter", &self.event_filter)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
if let Some(ref tags) = self.tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl<'de> ::serde::Deserialize<'de> for EventIntegrationProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<EventIntegrationProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = EventIntegrationProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type EventIntegrationProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut description: Option<::Value<String>> = None;
let mut event_bridge_bus: Option<::Value<String>> = None;
let mut event_filter: Option<::Value<self::event_integration::EventFilter>> = None;
let mut name: Option<::Value<String>> = None;
let mut tags: Option<::ValueList<::Tag>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"Description" => {
description = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EventBridgeBus" => {
event_bridge_bus = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EventFilter" => {
event_filter = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Name" => {
name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Tags" => {
tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(EventIntegrationProperties {
description: description,
event_bridge_bus: event_bridge_bus.ok_or(::serde::de::Error::missing_field("EventBridgeBus"))?,
event_filter: event_filter.ok_or(::serde::de::Error::missing_field("EventFilter"))?,
name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
tags: tags,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for EventIntegration {
type Properties = EventIntegrationProperties;
const TYPE: &'static str = "AWS::AppIntegrations::EventIntegration";
fn properties(&self) -> &EventIntegrationProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut EventIntegrationProperties {
&mut self.properties
}
}
impl ::private::Sealed for EventIntegration {}
impl From<EventIntegrationProperties> for EventIntegration {
fn from(properties: EventIntegrationProperties) -> EventIntegration {
EventIntegration { properties }
}
}
pub mod event_integration {
//! Property types for the `EventIntegration` resource.
/// The [`AWS::AppIntegrations::EventIntegration.EventFilter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventfilter.html) property type.
#[derive(Debug, Default)]
pub struct EventFilter {
/// Property [`Source`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventfilter.html#cfn-appintegrations-eventintegration-eventfilter-source).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub source: ::Value<String>,
}
impl ::codec::SerializeValue for EventFilter {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Source", &self.source)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for EventFilter {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EventFilter, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = EventFilter;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type EventFilter")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut source: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"Source" => {
source = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(EventFilter {
source: source.ok_or(::serde::de::Error::missing_field("Source"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::AppIntegrations::EventIntegration.EventIntegrationAssociation`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html) property type.
#[derive(Debug, Default)]
pub struct EventIntegrationAssociation {
/// Property [`ClientAssociationMetadata`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html#cfn-appintegrations-eventintegration-eventintegrationassociation-clientassociationmetadata).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub client_association_metadata: Option<::ValueList<Metadata>>,
/// Property [`ClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html#cfn-appintegrations-eventintegration-eventintegrationassociation-clientid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub client_id: Option<::Value<String>>,
/// Property [`EventBridgeRuleName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html#cfn-appintegrations-eventintegration-eventintegrationassociation-eventbridgerulename).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub event_bridge_rule_name: Option<::Value<String>>,
/// Property [`EventIntegrationAssociationArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html#cfn-appintegrations-eventintegration-eventintegrationassociation-eventintegrationassociationarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub event_integration_association_arn: Option<::Value<String>>,
/// Property [`EventIntegrationAssociationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-eventintegrationassociation.html#cfn-appintegrations-eventintegration-eventintegrationassociation-eventintegrationassociationid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub event_integration_association_id: Option<::Value<String>>,
}
impl ::codec::SerializeValue for EventIntegrationAssociation {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref client_association_metadata) = self.client_association_metadata {
::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientAssociationMetadata", client_association_metadata)?;
}
if let Some(ref client_id) = self.client_id {
::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientId", client_id)?;
}
if let Some(ref event_bridge_rule_name) = self.event_bridge_rule_name {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EventBridgeRuleName", event_bridge_rule_name)?;
}
if let Some(ref event_integration_association_arn) = self.event_integration_association_arn {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EventIntegrationAssociationArn", event_integration_association_arn)?;
}
if let Some(ref event_integration_association_id) = self.event_integration_association_id {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EventIntegrationAssociationId", event_integration_association_id)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for EventIntegrationAssociation {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EventIntegrationAssociation, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = EventIntegrationAssociation;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type EventIntegrationAssociation")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut client_association_metadata: Option<::ValueList<Metadata>> = None;
let mut client_id: Option<::Value<String>> = None;
let mut event_bridge_rule_name: Option<::Value<String>> = None;
let mut event_integration_association_arn: Option<::Value<String>> = None;
let mut event_integration_association_id: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"ClientAssociationMetadata" => {
client_association_metadata = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ClientId" => {
client_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EventBridgeRuleName" => {
event_bridge_rule_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EventIntegrationAssociationArn" => {
event_integration_association_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EventIntegrationAssociationId" => {
event_integration_association_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(EventIntegrationAssociation {
client_association_metadata: client_association_metadata,
client_id: client_id,
event_bridge_rule_name: event_bridge_rule_name,
event_integration_association_arn: event_integration_association_arn,
event_integration_association_id: event_integration_association_id,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::AppIntegrations::EventIntegration.Metadata`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-metadata.html) property type.
#[derive(Debug, Default)]
pub struct Metadata {
/// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-metadata.html#cfn-appintegrations-eventintegration-metadata-key).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub key: ::Value<String>,
/// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-eventintegration-metadata.html#cfn-appintegrations-eventintegration-metadata-value).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub value: ::Value<String>,
}
impl ::codec::SerializeValue for Metadata {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", &self.key)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", &self.value)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for Metadata {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Metadata, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = Metadata;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type Metadata")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut key: Option<::Value<String>> = None;
let mut value: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"Key" => {
key = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Value" => {
value = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(Metadata {
key: key.ok_or(::serde::de::Error::missing_field("Key"))?,
value: value.ok_or(::serde::de::Error::missing_field("Value"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
}