-
Notifications
You must be signed in to change notification settings - Fork 242
/
shape_create_db_cluster_input.rs
180 lines (180 loc) · 6.66 KB
/
shape_create_db_cluster_input.rs
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_db_cluster_input_input_input(
input: &crate::operation::create_db_cluster::CreateDbClusterInput,
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "CreateDBCluster", "2014-10-31");
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("AvailabilityZones");
if let Some(var_2) = &input.availability_zones {
let mut list_4 = scope_1.start_list(false, Some("AvailabilityZone"));
for item_3 in var_2 {
#[allow(unused_mut)]
let mut entry_5 = list_4.entry();
entry_5.string(item_3);
}
list_4.finish();
}
#[allow(unused_mut)]
let mut scope_6 = writer.prefix("BackupRetentionPeriod");
if let Some(var_7) = &input.backup_retention_period {
scope_6.number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*var_7).into()),
);
}
#[allow(unused_mut)]
let mut scope_8 = writer.prefix("CharacterSetName");
if let Some(var_9) = &input.character_set_name {
scope_8.string(var_9);
}
#[allow(unused_mut)]
let mut scope_10 = writer.prefix("CopyTagsToSnapshot");
if let Some(var_11) = &input.copy_tags_to_snapshot {
scope_10.boolean(*var_11);
}
#[allow(unused_mut)]
let mut scope_12 = writer.prefix("DatabaseName");
if let Some(var_13) = &input.database_name {
scope_12.string(var_13);
}
#[allow(unused_mut)]
let mut scope_14 = writer.prefix("DBClusterIdentifier");
if let Some(var_15) = &input.db_cluster_identifier {
scope_14.string(var_15);
}
#[allow(unused_mut)]
let mut scope_16 = writer.prefix("DBClusterParameterGroupName");
if let Some(var_17) = &input.db_cluster_parameter_group_name {
scope_16.string(var_17);
}
#[allow(unused_mut)]
let mut scope_18 = writer.prefix("VpcSecurityGroupIds");
if let Some(var_19) = &input.vpc_security_group_ids {
let mut list_21 = scope_18.start_list(false, Some("VpcSecurityGroupId"));
for item_20 in var_19 {
#[allow(unused_mut)]
let mut entry_22 = list_21.entry();
entry_22.string(item_20);
}
list_21.finish();
}
#[allow(unused_mut)]
let mut scope_23 = writer.prefix("DBSubnetGroupName");
if let Some(var_24) = &input.db_subnet_group_name {
scope_23.string(var_24);
}
#[allow(unused_mut)]
let mut scope_25 = writer.prefix("Engine");
if let Some(var_26) = &input.engine {
scope_25.string(var_26);
}
#[allow(unused_mut)]
let mut scope_27 = writer.prefix("EngineVersion");
if let Some(var_28) = &input.engine_version {
scope_27.string(var_28);
}
#[allow(unused_mut)]
let mut scope_29 = writer.prefix("Port");
if let Some(var_30) = &input.port {
scope_29.number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*var_30).into()),
);
}
#[allow(unused_mut)]
let mut scope_31 = writer.prefix("MasterUsername");
if let Some(var_32) = &input.master_username {
scope_31.string(var_32);
}
#[allow(unused_mut)]
let mut scope_33 = writer.prefix("MasterUserPassword");
if let Some(var_34) = &input.master_user_password {
scope_33.string(var_34);
}
#[allow(unused_mut)]
let mut scope_35 = writer.prefix("OptionGroupName");
if let Some(var_36) = &input.option_group_name {
scope_35.string(var_36);
}
#[allow(unused_mut)]
let mut scope_37 = writer.prefix("PreferredBackupWindow");
if let Some(var_38) = &input.preferred_backup_window {
scope_37.string(var_38);
}
#[allow(unused_mut)]
let mut scope_39 = writer.prefix("PreferredMaintenanceWindow");
if let Some(var_40) = &input.preferred_maintenance_window {
scope_39.string(var_40);
}
#[allow(unused_mut)]
let mut scope_41 = writer.prefix("ReplicationSourceIdentifier");
if let Some(var_42) = &input.replication_source_identifier {
scope_41.string(var_42);
}
#[allow(unused_mut)]
let mut scope_43 = writer.prefix("Tags");
if let Some(var_44) = &input.tags {
let mut list_46 = scope_43.start_list(false, Some("Tag"));
for item_45 in var_44 {
#[allow(unused_mut)]
let mut entry_47 = list_46.entry();
crate::protocol_serde::shape_tag::ser_tag(entry_47, item_45)?;
}
list_46.finish();
}
#[allow(unused_mut)]
let mut scope_48 = writer.prefix("StorageEncrypted");
if let Some(var_49) = &input.storage_encrypted {
scope_48.boolean(*var_49);
}
#[allow(unused_mut)]
let mut scope_50 = writer.prefix("KmsKeyId");
if let Some(var_51) = &input.kms_key_id {
scope_50.string(var_51);
}
#[allow(unused_mut)]
let mut scope_52 = writer.prefix("PreSignedUrl");
if let Some(var_53) = &input.pre_signed_url {
scope_52.string(var_53);
}
#[allow(unused_mut)]
let mut scope_54 = writer.prefix("EnableIAMDatabaseAuthentication");
if let Some(var_55) = &input.enable_iam_database_authentication {
scope_54.boolean(*var_55);
}
#[allow(unused_mut)]
let mut scope_56 = writer.prefix("EnableCloudwatchLogsExports");
if let Some(var_57) = &input.enable_cloudwatch_logs_exports {
let mut list_59 = scope_56.start_list(false, None);
for item_58 in var_57 {
#[allow(unused_mut)]
let mut entry_60 = list_59.entry();
entry_60.string(item_58);
}
list_59.finish();
}
#[allow(unused_mut)]
let mut scope_61 = writer.prefix("DeletionProtection");
if let Some(var_62) = &input.deletion_protection {
scope_61.boolean(*var_62);
}
#[allow(unused_mut)]
let mut scope_63 = writer.prefix("ServerlessV2ScalingConfiguration");
if let Some(var_64) = &input.serverless_v2_scaling_configuration {
crate::protocol_serde::shape_serverless_v2_scaling_configuration::ser_serverless_v2_scaling_configuration(scope_63, var_64)?;
}
#[allow(unused_mut)]
let mut scope_65 = writer.prefix("GlobalClusterIdentifier");
if let Some(var_66) = &input.global_cluster_identifier {
scope_65.string(var_66);
}
#[allow(unused_mut)]
let mut scope_67 = writer.prefix("StorageType");
if let Some(var_68) = &input.storage_type {
scope_67.string(var_68);
}
writer.finish();
Ok(::aws_smithy_types::body::SdkBody::from(out))
}