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_create_container_fleet_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::create_container_fleet::CreateContainerFleetInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.fleet_role_arn {
        encoder.str("FleetRoleArn").str(var_1.as_str());
    }
    if let Some(var_2) = &input.description {
        encoder.str("Description").str(var_2.as_str());
    }
    if let Some(var_3) = &input.game_server_container_group_definition_name {
        encoder.str("GameServerContainerGroupDefinitionName").str(var_3.as_str());
    }
    if let Some(var_4) = &input.per_instance_container_group_definition_name {
        encoder.str("PerInstanceContainerGroupDefinitionName").str(var_4.as_str());
    }
    if let Some(var_5) = &input.instance_connection_port_range {
        encoder.str("InstanceConnectionPortRange");
        crate::protocol_serde::shape_connection_port_range::ser_connection_port_range(encoder, var_5)?;
    }
    if let Some(var_6) = &input.instance_inbound_permissions {
        encoder.str("InstanceInboundPermissions");
        encoder.array((*var_6).len());
        for item_7 in var_6 {
            {
                crate::protocol_serde::shape_ip_permission::ser_ip_permission(encoder, item_7)?;
            }
        }
    }
    if let Some(var_8) = &input.game_server_container_groups_per_instance {
        encoder.str("GameServerContainerGroupsPerInstance").integer(*var_8);
    }
    if let Some(var_9) = &input.instance_type {
        encoder.str("InstanceType").str(var_9.as_str());
    }
    if let Some(var_10) = &input.billing_type {
        encoder.str("BillingType").str(var_10.as_str());
    }
    if let Some(var_11) = &input.locations {
        encoder.str("Locations");
        encoder.array((*var_11).len());
        for item_12 in var_11 {
            {
                crate::protocol_serde::shape_location_configuration::ser_location_configuration(encoder, item_12)?;
            }
        }
    }
    if let Some(var_13) = &input.metric_groups {
        encoder.str("MetricGroups");
        encoder.array((*var_13).len());
        for item_14 in var_13 {
            {
                encoder.str(item_14.as_str());
            }
        }
    }
    if let Some(var_15) = &input.new_game_session_protection_policy {
        encoder.str("NewGameSessionProtectionPolicy").str(var_15.as_str());
    }
    if let Some(var_16) = &input.game_session_creation_limit_policy {
        encoder.str("GameSessionCreationLimitPolicy");
        crate::protocol_serde::shape_game_session_creation_limit_policy::ser_game_session_creation_limit_policy(encoder, var_16)?;
    }
    if let Some(var_17) = &input.log_configuration {
        encoder.str("LogConfiguration");
        crate::protocol_serde::shape_log_configuration::ser_log_configuration(encoder, var_17)?;
    }
    if let Some(var_18) = &input.tags {
        encoder.str("Tags");
        encoder.array((*var_18).len());
        for item_19 in var_18 {
            {
                crate::protocol_serde::shape_tag::ser_tag(encoder, item_19)?;
            }
        }
    }
    if let Some(var_20) = &input.player_gateway_mode {
        encoder.str("PlayerGatewayMode").str(var_20.as_str());
    }
    encoder.end();
    Ok(())
}