aws-sdk-ec2 1.224.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_create_instance_export_task_input_input_input(
    input: &crate::operation::create_instance_export_task::CreateInstanceExportTaskInput,
) -> ::std::result::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, "CreateInstanceExportTask", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("TagSpecification");
    if let Some(var_2) = &input.tag_specifications {
        if !var_2.is_empty() {
            let mut list_4 = scope_1.start_list(true, Some("item"));
            for item_3 in var_2 {
                #[allow(unused_mut)]
                let mut entry_5 = list_4.entry();
                crate::protocol_serde::shape_tag_specification::ser_tag_specification(entry_5, item_3)?;
            }
            list_4.finish();
        }
    }
    #[allow(unused_mut)]
    let mut scope_6 = writer.prefix("Description");
    if let Some(var_7) = &input.description {
        scope_6.string(var_7);
    }
    #[allow(unused_mut)]
    let mut scope_8 = writer.prefix("InstanceId");
    if let Some(var_9) = &input.instance_id {
        scope_8.string(var_9);
    }
    #[allow(unused_mut)]
    let mut scope_10 = writer.prefix("TargetEnvironment");
    if let Some(var_11) = &input.target_environment {
        scope_10.string(var_11.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_12 = writer.prefix("ExportToS3");
    if let Some(var_13) = &input.export_to_s3_task {
        crate::protocol_serde::shape_export_to_s3_task_specification::ser_export_to_s3_task_specification(scope_12, var_13)?;
    }
    writer.finish();
    Ok(::aws_smithy_types::body::SdkBody::from(out))
}