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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
//! Types for the `Transfer` service.
/// The [`AWS::Transfer::Server`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html) resource type.
#[derive(Debug, Default)]
pub struct Server {
properties: ServerProperties
}
/// Properties for the `Server` resource.
#[derive(Debug, Default)]
pub struct ServerProperties {
/// Property [`Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-certificate).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub certificate: Option<::Value<String>>,
/// Property [`Domain`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-domain).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub domain: Option<::Value<String>>,
/// Property [`EndpointDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-endpointdetails).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub endpoint_details: Option<::Value<self::server::EndpointDetails>>,
/// Property [`EndpointType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-endpointtype).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub endpoint_type: Option<::Value<String>>,
/// Property [`IdentityProviderDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-identityproviderdetails).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub identity_provider_details: Option<::Value<self::server::IdentityProviderDetails>>,
/// Property [`IdentityProviderType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-identityprovidertype).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub identity_provider_type: Option<::Value<String>>,
/// Property [`LoggingRole`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-loggingrole).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub logging_role: Option<::Value<String>>,
/// Property [`ProtocolDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-protocoldetails).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub protocol_details: Option<::Value<self::server::ProtocolDetails>>,
/// Property [`Protocols`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-protocols).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub protocols: Option<::ValueList<self::server::Protocol>>,
/// Property [`SecurityPolicyName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-securitypolicyname).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub security_policy_name: Option<::Value<String>>,
/// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html#cfn-transfer-server-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 ServerProperties {
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 certificate) = self.certificate {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificate", certificate)?;
}
if let Some(ref domain) = self.domain {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Domain", domain)?;
}
if let Some(ref endpoint_details) = self.endpoint_details {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EndpointDetails", endpoint_details)?;
}
if let Some(ref endpoint_type) = self.endpoint_type {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EndpointType", endpoint_type)?;
}
if let Some(ref identity_provider_details) = self.identity_provider_details {
::serde::ser::SerializeMap::serialize_entry(&mut map, "IdentityProviderDetails", identity_provider_details)?;
}
if let Some(ref identity_provider_type) = self.identity_provider_type {
::serde::ser::SerializeMap::serialize_entry(&mut map, "IdentityProviderType", identity_provider_type)?;
}
if let Some(ref logging_role) = self.logging_role {
::serde::ser::SerializeMap::serialize_entry(&mut map, "LoggingRole", logging_role)?;
}
if let Some(ref protocol_details) = self.protocol_details {
::serde::ser::SerializeMap::serialize_entry(&mut map, "ProtocolDetails", protocol_details)?;
}
if let Some(ref protocols) = self.protocols {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Protocols", protocols)?;
}
if let Some(ref security_policy_name) = self.security_policy_name {
::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityPolicyName", security_policy_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 ServerProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ServerProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = ServerProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type ServerProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut certificate: Option<::Value<String>> = None;
let mut domain: Option<::Value<String>> = None;
let mut endpoint_details: Option<::Value<self::server::EndpointDetails>> = None;
let mut endpoint_type: Option<::Value<String>> = None;
let mut identity_provider_details: Option<::Value<self::server::IdentityProviderDetails>> = None;
let mut identity_provider_type: Option<::Value<String>> = None;
let mut logging_role: Option<::Value<String>> = None;
let mut protocol_details: Option<::Value<self::server::ProtocolDetails>> = None;
let mut protocols: Option<::ValueList<self::server::Protocol>> = None;
let mut security_policy_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() {
"Certificate" => {
certificate = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Domain" => {
domain = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EndpointDetails" => {
endpoint_details = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EndpointType" => {
endpoint_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
"IdentityProviderDetails" => {
identity_provider_details = ::serde::de::MapAccess::next_value(&mut map)?;
}
"IdentityProviderType" => {
identity_provider_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
"LoggingRole" => {
logging_role = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ProtocolDetails" => {
protocol_details = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Protocols" => {
protocols = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SecurityPolicyName" => {
security_policy_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Tags" => {
tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(ServerProperties {
certificate: certificate,
domain: domain,
endpoint_details: endpoint_details,
endpoint_type: endpoint_type,
identity_provider_details: identity_provider_details,
identity_provider_type: identity_provider_type,
logging_role: logging_role,
protocol_details: protocol_details,
protocols: protocols,
security_policy_name: security_policy_name,
tags: tags,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for Server {
type Properties = ServerProperties;
const TYPE: &'static str = "AWS::Transfer::Server";
fn properties(&self) -> &ServerProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut ServerProperties {
&mut self.properties
}
}
impl ::private::Sealed for Server {}
impl From<ServerProperties> for Server {
fn from(properties: ServerProperties) -> Server {
Server { properties }
}
}
/// The [`AWS::Transfer::User`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html) resource type.
#[derive(Debug, Default)]
pub struct User {
properties: UserProperties
}
/// Properties for the `User` resource.
#[derive(Debug, Default)]
pub struct UserProperties {
/// Property [`HomeDirectory`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-homedirectory).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub home_directory: Option<::Value<String>>,
/// Property [`HomeDirectoryMappings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-homedirectorymappings).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub home_directory_mappings: Option<::ValueList<self::user::HomeDirectoryMapEntry>>,
/// Property [`HomeDirectoryType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-homedirectorytype).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub home_directory_type: Option<::Value<String>>,
/// Property [`Policy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-policy).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub policy: Option<::Value<String>>,
/// Property [`PosixProfile`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-posixprofile).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub posix_profile: Option<::Value<self::user::PosixProfile>>,
/// Property [`Role`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-role).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub role: ::Value<String>,
/// Property [`ServerId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-serverid).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub server_id: ::Value<String>,
/// Property [`SshPublicKeys`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-sshpublickeys).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub ssh_public_keys: Option<::ValueList<self::user::SshPublicKey>>,
/// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-tags).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub tags: Option<::ValueList<::Tag>>,
/// Property [`UserName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-user.html#cfn-transfer-user-username).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub user_name: ::Value<String>,
}
impl ::serde::Serialize for UserProperties {
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 home_directory) = self.home_directory {
::serde::ser::SerializeMap::serialize_entry(&mut map, "HomeDirectory", home_directory)?;
}
if let Some(ref home_directory_mappings) = self.home_directory_mappings {
::serde::ser::SerializeMap::serialize_entry(&mut map, "HomeDirectoryMappings", home_directory_mappings)?;
}
if let Some(ref home_directory_type) = self.home_directory_type {
::serde::ser::SerializeMap::serialize_entry(&mut map, "HomeDirectoryType", home_directory_type)?;
}
if let Some(ref policy) = self.policy {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Policy", policy)?;
}
if let Some(ref posix_profile) = self.posix_profile {
::serde::ser::SerializeMap::serialize_entry(&mut map, "PosixProfile", posix_profile)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "Role", &self.role)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "ServerId", &self.server_id)?;
if let Some(ref ssh_public_keys) = self.ssh_public_keys {
::serde::ser::SerializeMap::serialize_entry(&mut map, "SshPublicKeys", ssh_public_keys)?;
}
if let Some(ref tags) = self.tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "UserName", &self.user_name)?;
::serde::ser::SerializeMap::end(map)
}
}
impl<'de> ::serde::Deserialize<'de> for UserProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<UserProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = UserProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type UserProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut home_directory: Option<::Value<String>> = None;
let mut home_directory_mappings: Option<::ValueList<self::user::HomeDirectoryMapEntry>> = None;
let mut home_directory_type: Option<::Value<String>> = None;
let mut policy: Option<::Value<String>> = None;
let mut posix_profile: Option<::Value<self::user::PosixProfile>> = None;
let mut role: Option<::Value<String>> = None;
let mut server_id: Option<::Value<String>> = None;
let mut ssh_public_keys: Option<::ValueList<self::user::SshPublicKey>> = None;
let mut tags: Option<::ValueList<::Tag>> = None;
let mut user_name: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"HomeDirectory" => {
home_directory = ::serde::de::MapAccess::next_value(&mut map)?;
}
"HomeDirectoryMappings" => {
home_directory_mappings = ::serde::de::MapAccess::next_value(&mut map)?;
}
"HomeDirectoryType" => {
home_directory_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Policy" => {
policy = ::serde::de::MapAccess::next_value(&mut map)?;
}
"PosixProfile" => {
posix_profile = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Role" => {
role = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ServerId" => {
server_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SshPublicKeys" => {
ssh_public_keys = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Tags" => {
tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
"UserName" => {
user_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(UserProperties {
home_directory: home_directory,
home_directory_mappings: home_directory_mappings,
home_directory_type: home_directory_type,
policy: policy,
posix_profile: posix_profile,
role: role.ok_or(::serde::de::Error::missing_field("Role"))?,
server_id: server_id.ok_or(::serde::de::Error::missing_field("ServerId"))?,
ssh_public_keys: ssh_public_keys,
tags: tags,
user_name: user_name.ok_or(::serde::de::Error::missing_field("UserName"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for User {
type Properties = UserProperties;
const TYPE: &'static str = "AWS::Transfer::User";
fn properties(&self) -> &UserProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut UserProperties {
&mut self.properties
}
}
impl ::private::Sealed for User {}
impl From<UserProperties> for User {
fn from(properties: UserProperties) -> User {
User { properties }
}
}
pub mod server {
//! Property types for the `Server` resource.
/// The [`AWS::Transfer::Server.EndpointDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html) property type.
#[derive(Debug, Default)]
pub struct EndpointDetails {
/// Property [`AddressAllocationIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-addressallocationids).
///
/// Update type: _Conditional_.
/// Conditional updates can be mutable or immutable, depending on, for example, which other properties you updated.
/// For more information, see the relevant resource type documentation.
pub address_allocation_ids: Option<::ValueList<String>>,
/// Property [`SecurityGroupIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-securitygroupids).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub security_group_ids: Option<::ValueList<String>>,
/// Property [`SubnetIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-subnetids).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub subnet_ids: Option<::ValueList<String>>,
/// Property [`VpcEndpointId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-vpcendpointid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub vpc_endpoint_id: Option<::Value<String>>,
/// Property [`VpcId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html#cfn-transfer-server-endpointdetails-vpcid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub vpc_id: Option<::Value<String>>,
}
impl ::codec::SerializeValue for EndpointDetails {
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 address_allocation_ids) = self.address_allocation_ids {
::serde::ser::SerializeMap::serialize_entry(&mut map, "AddressAllocationIds", address_allocation_ids)?;
}
if let Some(ref security_group_ids) = self.security_group_ids {
::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityGroupIds", security_group_ids)?;
}
if let Some(ref subnet_ids) = self.subnet_ids {
::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetIds", subnet_ids)?;
}
if let Some(ref vpc_endpoint_id) = self.vpc_endpoint_id {
::serde::ser::SerializeMap::serialize_entry(&mut map, "VpcEndpointId", vpc_endpoint_id)?;
}
if let Some(ref vpc_id) = self.vpc_id {
::serde::ser::SerializeMap::serialize_entry(&mut map, "VpcId", vpc_id)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for EndpointDetails {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EndpointDetails, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = EndpointDetails;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type EndpointDetails")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut address_allocation_ids: Option<::ValueList<String>> = None;
let mut security_group_ids: Option<::ValueList<String>> = None;
let mut subnet_ids: Option<::ValueList<String>> = None;
let mut vpc_endpoint_id: Option<::Value<String>> = None;
let mut vpc_id: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"AddressAllocationIds" => {
address_allocation_ids = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SecurityGroupIds" => {
security_group_ids = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SubnetIds" => {
subnet_ids = ::serde::de::MapAccess::next_value(&mut map)?;
}
"VpcEndpointId" => {
vpc_endpoint_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
"VpcId" => {
vpc_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(EndpointDetails {
address_allocation_ids: address_allocation_ids,
security_group_ids: security_group_ids,
subnet_ids: subnet_ids,
vpc_endpoint_id: vpc_endpoint_id,
vpc_id: vpc_id,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Transfer::Server.IdentityProviderDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-identityproviderdetails.html) property type.
#[derive(Debug, Default)]
pub struct IdentityProviderDetails {
/// Property [`DirectoryId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-identityproviderdetails.html#cfn-transfer-server-identityproviderdetails-directoryid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub directory_id: Option<::Value<String>>,
/// Property [`InvocationRole`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-identityproviderdetails.html#cfn-transfer-server-identityproviderdetails-invocationrole).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub invocation_role: Option<::Value<String>>,
/// Property [`Url`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-identityproviderdetails.html#cfn-transfer-server-identityproviderdetails-url).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub url: Option<::Value<String>>,
}
impl ::codec::SerializeValue for IdentityProviderDetails {
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 directory_id) = self.directory_id {
::serde::ser::SerializeMap::serialize_entry(&mut map, "DirectoryId", directory_id)?;
}
if let Some(ref invocation_role) = self.invocation_role {
::serde::ser::SerializeMap::serialize_entry(&mut map, "InvocationRole", invocation_role)?;
}
if let Some(ref url) = self.url {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Url", url)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for IdentityProviderDetails {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<IdentityProviderDetails, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = IdentityProviderDetails;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type IdentityProviderDetails")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut directory_id: Option<::Value<String>> = None;
let mut invocation_role: Option<::Value<String>> = None;
let mut url: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"DirectoryId" => {
directory_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
"InvocationRole" => {
invocation_role = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Url" => {
url = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(IdentityProviderDetails {
directory_id: directory_id,
invocation_role: invocation_role,
url: url,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Transfer::Server.Protocol`]() property type.
#[derive(Debug, Default)]
pub struct Protocol {
}
impl ::codec::SerializeValue for Protocol {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for Protocol {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Protocol, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = Protocol;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type Protocol")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, _map: A) -> Result<Self::Value, A::Error> {
Ok(Protocol {})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Transfer::Server.ProtocolDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-protocoldetails.html) property type.
#[derive(Debug, Default)]
pub struct ProtocolDetails {
/// Property [`PassiveIp`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-protocoldetails.html#cfn-transfer-server-protocoldetails-passiveip).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub passive_ip: Option<::Value<String>>,
}
impl ::codec::SerializeValue for ProtocolDetails {
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 passive_ip) = self.passive_ip {
::serde::ser::SerializeMap::serialize_entry(&mut map, "PassiveIp", passive_ip)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for ProtocolDetails {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ProtocolDetails, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = ProtocolDetails;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type ProtocolDetails")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut passive_ip: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"PassiveIp" => {
passive_ip = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(ProtocolDetails {
passive_ip: passive_ip,
})
}
}
d.deserialize_map(Visitor)
}
}
}
pub mod user {
//! Property types for the `User` resource.
/// The [`AWS::Transfer::User.HomeDirectoryMapEntry`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html) property type.
#[derive(Debug, Default)]
pub struct HomeDirectoryMapEntry {
/// Property [`Entry`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html#cfn-transfer-user-homedirectorymapentry-entry).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub entry: ::Value<String>,
/// Property [`Target`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-homedirectorymapentry.html#cfn-transfer-user-homedirectorymapentry-target).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub target: ::Value<String>,
}
impl ::codec::SerializeValue for HomeDirectoryMapEntry {
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, "Entry", &self.entry)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "Target", &self.target)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for HomeDirectoryMapEntry {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<HomeDirectoryMapEntry, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = HomeDirectoryMapEntry;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type HomeDirectoryMapEntry")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut entry: Option<::Value<String>> = None;
let mut target: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"Entry" => {
entry = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Target" => {
target = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(HomeDirectoryMapEntry {
entry: entry.ok_or(::serde::de::Error::missing_field("Entry"))?,
target: target.ok_or(::serde::de::Error::missing_field("Target"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Transfer::User.PosixProfile`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html) property type.
#[derive(Debug, Default)]
pub struct PosixProfile {
/// Property [`Gid`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-gid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub gid: ::Value<f64>,
/// Property [`SecondaryGids`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-secondarygids).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub secondary_gids: Option<::ValueList<f64>>,
/// Property [`Uid`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-user-posixprofile.html#cfn-transfer-user-posixprofile-uid).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub uid: ::Value<f64>,
}
impl ::codec::SerializeValue for PosixProfile {
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, "Gid", &self.gid)?;
if let Some(ref secondary_gids) = self.secondary_gids {
::serde::ser::SerializeMap::serialize_entry(&mut map, "SecondaryGids", secondary_gids)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "Uid", &self.uid)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for PosixProfile {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<PosixProfile, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = PosixProfile;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type PosixProfile")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut gid: Option<::Value<f64>> = None;
let mut secondary_gids: Option<::ValueList<f64>> = None;
let mut uid: Option<::Value<f64>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"Gid" => {
gid = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SecondaryGids" => {
secondary_gids = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Uid" => {
uid = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(PosixProfile {
gid: gid.ok_or(::serde::de::Error::missing_field("Gid"))?,
secondary_gids: secondary_gids,
uid: uid.ok_or(::serde::de::Error::missing_field("Uid"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Transfer::User.SshPublicKey`]() property type.
#[derive(Debug, Default)]
pub struct SshPublicKey {
}
impl ::codec::SerializeValue for SshPublicKey {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for SshPublicKey {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SshPublicKey, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = SshPublicKey;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type SshPublicKey")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, _map: A) -> Result<Self::Value, A::Error> {
Ok(SshPublicKey {})
}
}
d.deserialize_map(Visitor)
}
}
}