aws-sdk-gamelift 1.118.0

AWS SDK for Amazon GameLift
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_support_container_definition_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::types::SupportContainerDefinitionInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.container_name {
        encoder.str("ContainerName").str(var_1.as_str());
    }
    if let Some(var_2) = &input.depends_on {
        encoder.str("DependsOn");
        encoder.array((*var_2).len());
        for item_3 in var_2 {
            {
                crate::protocol_serde::shape_container_dependency::ser_container_dependency(encoder, item_3)?;
            }
        }
    }
    if let Some(var_4) = &input.mount_points {
        encoder.str("MountPoints");
        encoder.array((*var_4).len());
        for item_5 in var_4 {
            {
                crate::protocol_serde::shape_container_mount_point::ser_container_mount_point(encoder, item_5)?;
            }
        }
    }
    if let Some(var_6) = &input.environment_override {
        encoder.str("EnvironmentOverride");
        encoder.array((*var_6).len());
        for item_7 in var_6 {
            {
                crate::protocol_serde::shape_container_environment::ser_container_environment(encoder, item_7)?;
            }
        }
    }
    if let Some(var_8) = &input.essential {
        encoder.str("Essential").boolean(*var_8);
    }
    if let Some(var_9) = &input.health_check {
        encoder.str("HealthCheck");
        crate::protocol_serde::shape_container_health_check::ser_container_health_check(encoder, var_9)?;
    }
    if let Some(var_10) = &input.image_uri {
        encoder.str("ImageUri").str(var_10.as_str());
    }
    if let Some(var_11) = &input.memory_hard_limit_mebibytes {
        encoder.str("MemoryHardLimitMebibytes").integer(*var_11);
    }
    if let Some(var_12) = &input.port_configuration {
        encoder.str("PortConfiguration");
        crate::protocol_serde::shape_container_port_configuration::ser_container_port_configuration(encoder, var_12)?;
    }
    if let Some(var_13) = &input.vcpu {
        encoder.str("Vcpu").double(*var_13);
    }
    if let Some(var_14) = &input.linux_capabilities {
        encoder.str("LinuxCapabilities");
        crate::protocol_serde::shape_linux_capabilities::ser_linux_capabilities(encoder, var_14)?;
    }
    encoder.end();
    Ok(())
}