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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
//! Types for the `Connect` service.
/// The [`AWS::Connect::QuickConnect`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html) resource type.
#[derive(Debug, Default)]
pub struct QuickConnect {
properties: QuickConnectProperties
}
/// Properties for the `QuickConnect` resource.
#[derive(Debug, Default)]
pub struct QuickConnectProperties {
/// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html#cfn-connect-quickconnect-description).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub description: Option<::Value<String>>,
/// Property [`InstanceArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html#cfn-connect-quickconnect-instancearn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub instance_arn: ::Value<String>,
/// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html#cfn-connect-quickconnect-name).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub name: ::Value<String>,
/// Property [`QuickConnectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html#cfn-connect-quickconnect-quickconnectconfig).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub quick_connect_config: ::Value<self::quick_connect::QuickConnectConfig>,
/// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-quickconnect.html#cfn-connect-quickconnect-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 QuickConnectProperties {
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, "InstanceArn", &self.instance_arn)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "QuickConnectConfig", &self.quick_connect_config)?;
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 QuickConnectProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<QuickConnectProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = QuickConnectProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type QuickConnectProperties")
}
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 instance_arn: Option<::Value<String>> = None;
let mut name: Option<::Value<String>> = None;
let mut quick_connect_config: Option<::Value<self::quick_connect::QuickConnectConfig>> = 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)?;
}
"InstanceArn" => {
instance_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Name" => {
name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"QuickConnectConfig" => {
quick_connect_config = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Tags" => {
tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(QuickConnectProperties {
description: description,
instance_arn: instance_arn.ok_or(::serde::de::Error::missing_field("InstanceArn"))?,
name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
quick_connect_config: quick_connect_config.ok_or(::serde::de::Error::missing_field("QuickConnectConfig"))?,
tags: tags,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for QuickConnect {
type Properties = QuickConnectProperties;
const TYPE: &'static str = "AWS::Connect::QuickConnect";
fn properties(&self) -> &QuickConnectProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut QuickConnectProperties {
&mut self.properties
}
}
impl ::private::Sealed for QuickConnect {}
impl From<QuickConnectProperties> for QuickConnect {
fn from(properties: QuickConnectProperties) -> QuickConnect {
QuickConnect { properties }
}
}
pub mod quick_connect {
//! Property types for the `QuickConnect` resource.
/// The [`AWS::Connect::QuickConnect.PhoneNumberQuickConnectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-phonenumberquickconnectconfig.html) property type.
#[derive(Debug, Default)]
pub struct PhoneNumberQuickConnectConfig {
/// Property [`PhoneNumber`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-phonenumberquickconnectconfig.html#cfn-connect-quickconnect-phonenumberquickconnectconfig-phonenumber).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub phone_number: ::Value<String>,
}
impl ::codec::SerializeValue for PhoneNumberQuickConnectConfig {
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, "PhoneNumber", &self.phone_number)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for PhoneNumberQuickConnectConfig {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<PhoneNumberQuickConnectConfig, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = PhoneNumberQuickConnectConfig;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type PhoneNumberQuickConnectConfig")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut phone_number: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"PhoneNumber" => {
phone_number = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(PhoneNumberQuickConnectConfig {
phone_number: phone_number.ok_or(::serde::de::Error::missing_field("PhoneNumber"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Connect::QuickConnect.QueueQuickConnectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-queuequickconnectconfig.html) property type.
#[derive(Debug, Default)]
pub struct QueueQuickConnectConfig {
/// Property [`ContactFlowArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-queuequickconnectconfig.html#cfn-connect-quickconnect-queuequickconnectconfig-contactflowarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub contact_flow_arn: ::Value<String>,
/// Property [`QueueArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-queuequickconnectconfig.html#cfn-connect-quickconnect-queuequickconnectconfig-queuearn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub queue_arn: ::Value<String>,
}
impl ::codec::SerializeValue for QueueQuickConnectConfig {
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, "ContactFlowArn", &self.contact_flow_arn)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "QueueArn", &self.queue_arn)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for QueueQuickConnectConfig {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QueueQuickConnectConfig, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = QueueQuickConnectConfig;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type QueueQuickConnectConfig")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut contact_flow_arn: Option<::Value<String>> = None;
let mut queue_arn: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"ContactFlowArn" => {
contact_flow_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"QueueArn" => {
queue_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(QueueQuickConnectConfig {
contact_flow_arn: contact_flow_arn.ok_or(::serde::de::Error::missing_field("ContactFlowArn"))?,
queue_arn: queue_arn.ok_or(::serde::de::Error::missing_field("QueueArn"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Connect::QuickConnect.QuickConnectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-quickconnectconfig.html) property type.
#[derive(Debug, Default)]
pub struct QuickConnectConfig {
/// Property [`PhoneConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-quickconnectconfig.html#cfn-connect-quickconnect-quickconnectconfig-phoneconfig).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub phone_config: Option<::Value<PhoneNumberQuickConnectConfig>>,
/// Property [`QueueConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-quickconnectconfig.html#cfn-connect-quickconnect-quickconnectconfig-queueconfig).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub queue_config: Option<::Value<QueueQuickConnectConfig>>,
/// Property [`QuickConnectType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-quickconnectconfig.html#cfn-connect-quickconnect-quickconnectconfig-quickconnecttype).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub quick_connect_type: ::Value<String>,
/// Property [`UserConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-quickconnectconfig.html#cfn-connect-quickconnect-quickconnectconfig-userconfig).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub user_config: Option<::Value<UserQuickConnectConfig>>,
}
impl ::codec::SerializeValue for QuickConnectConfig {
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 phone_config) = self.phone_config {
::serde::ser::SerializeMap::serialize_entry(&mut map, "PhoneConfig", phone_config)?;
}
if let Some(ref queue_config) = self.queue_config {
::serde::ser::SerializeMap::serialize_entry(&mut map, "QueueConfig", queue_config)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "QuickConnectType", &self.quick_connect_type)?;
if let Some(ref user_config) = self.user_config {
::serde::ser::SerializeMap::serialize_entry(&mut map, "UserConfig", user_config)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for QuickConnectConfig {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QuickConnectConfig, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = QuickConnectConfig;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type QuickConnectConfig")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut phone_config: Option<::Value<PhoneNumberQuickConnectConfig>> = None;
let mut queue_config: Option<::Value<QueueQuickConnectConfig>> = None;
let mut quick_connect_type: Option<::Value<String>> = None;
let mut user_config: Option<::Value<UserQuickConnectConfig>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"PhoneConfig" => {
phone_config = ::serde::de::MapAccess::next_value(&mut map)?;
}
"QueueConfig" => {
queue_config = ::serde::de::MapAccess::next_value(&mut map)?;
}
"QuickConnectType" => {
quick_connect_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
"UserConfig" => {
user_config = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(QuickConnectConfig {
phone_config: phone_config,
queue_config: queue_config,
quick_connect_type: quick_connect_type.ok_or(::serde::de::Error::missing_field("QuickConnectType"))?,
user_config: user_config,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Connect::QuickConnect.UserQuickConnectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-userquickconnectconfig.html) property type.
#[derive(Debug, Default)]
pub struct UserQuickConnectConfig {
/// Property [`ContactFlowArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-userquickconnectconfig.html#cfn-connect-quickconnect-userquickconnectconfig-contactflowarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub contact_flow_arn: ::Value<String>,
/// Property [`UserArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-quickconnect-userquickconnectconfig.html#cfn-connect-quickconnect-userquickconnectconfig-userarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub user_arn: ::Value<String>,
}
impl ::codec::SerializeValue for UserQuickConnectConfig {
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, "ContactFlowArn", &self.contact_flow_arn)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "UserArn", &self.user_arn)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for UserQuickConnectConfig {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<UserQuickConnectConfig, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = UserQuickConnectConfig;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type UserQuickConnectConfig")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut contact_flow_arn: Option<::Value<String>> = None;
let mut user_arn: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"ContactFlowArn" => {
contact_flow_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"UserArn" => {
user_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(UserQuickConnectConfig {
contact_flow_arn: contact_flow_arn.ok_or(::serde::de::Error::missing_field("ContactFlowArn"))?,
user_arn: user_arn.ok_or(::serde::de::Error::missing_field("UserArn"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
}