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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_copy_cluster_snapshot_input_input_input(
    input: &crate::operation::copy_cluster_snapshot::CopyClusterSnapshotInput,
) -> 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, "CopyClusterSnapshot", "2012-12-01");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("SourceSnapshotIdentifier");
    if let Some(var_2) = &input.source_snapshot_identifier {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("SourceSnapshotClusterIdentifier");
    if let Some(var_4) = &input.source_snapshot_cluster_identifier {
        scope_3.string(var_4);
    }
    #[allow(unused_mut)]
    let mut scope_5 = writer.prefix("TargetSnapshotIdentifier");
    if let Some(var_6) = &input.target_snapshot_identifier {
        scope_5.string(var_6);
    }
    #[allow(unused_mut)]
    let mut scope_7 = writer.prefix("ManualSnapshotRetentionPeriod");
    if let Some(var_8) = &input.manual_snapshot_retention_period {
        scope_7.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_8).into()),
        );
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}