aws_sdk_redshift/protocol_serde/
shape_enable_snapshot_copy_input.rs1pub fn ser_enable_snapshot_copy_input_input_input(
3 input: &crate::operation::enable_snapshot_copy::EnableSnapshotCopyInput,
4) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
5 let mut out = String::new();
6 #[allow(unused_mut)]
7 let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "EnableSnapshotCopy", "2012-12-01");
8 #[allow(unused_mut)]
9 let mut scope_1 = writer.prefix("ClusterIdentifier");
10 if let Some(var_2) = &input.cluster_identifier {
11 scope_1.string(var_2);
12 }
13 #[allow(unused_mut)]
14 let mut scope_3 = writer.prefix("DestinationRegion");
15 if let Some(var_4) = &input.destination_region {
16 scope_3.string(var_4);
17 }
18 #[allow(unused_mut)]
19 let mut scope_5 = writer.prefix("RetentionPeriod");
20 if let Some(var_6) = &input.retention_period {
21 scope_5.number(
22 #[allow(clippy::useless_conversion)]
23 ::aws_smithy_types::Number::NegInt((*var_6).into()),
24 );
25 }
26 #[allow(unused_mut)]
27 let mut scope_7 = writer.prefix("SnapshotCopyGrantName");
28 if let Some(var_8) = &input.snapshot_copy_grant_name {
29 scope_7.string(var_8);
30 }
31 #[allow(unused_mut)]
32 let mut scope_9 = writer.prefix("ManualSnapshotRetentionPeriod");
33 if let Some(var_10) = &input.manual_snapshot_retention_period {
34 scope_9.number(
35 #[allow(clippy::useless_conversion)]
36 ::aws_smithy_types::Number::NegInt((*var_10).into()),
37 );
38 }
39 writer.finish();
40 Ok(::aws_smithy_types::body::SdkBody::from(out))
41}