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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_enable_fast_launch_input_input_input(
    input: &crate::operation::enable_fast_launch::EnableFastLaunchInput,
) -> 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, "EnableFastLaunch", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("ImageId");
    if let Some(var_2) = &input.image_id {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("ResourceType");
    if let Some(var_4) = &input.resource_type {
        scope_3.string(var_4);
    }
    #[allow(unused_mut)]
    let mut scope_5 = writer.prefix("SnapshotConfiguration");
    if let Some(var_6) = &input.snapshot_configuration {
        crate::protocol_serde::shape_fast_launch_snapshot_configuration_request::ser_fast_launch_snapshot_configuration_request(scope_5, var_6)?;
    }
    #[allow(unused_mut)]
    let mut scope_7 = writer.prefix("LaunchTemplate");
    if let Some(var_8) = &input.launch_template {
        crate::protocol_serde::shape_fast_launch_launch_template_specification_request::ser_fast_launch_launch_template_specification_request(
            scope_7, var_8,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_9 = writer.prefix("MaxParallelLaunches");
    if let Some(var_10) = &input.max_parallel_launches {
        scope_9.number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_10).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_11 = writer.prefix("DryRun");
    if let Some(var_12) = &input.dry_run {
        scope_11.boolean(*var_12);
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}