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_fleet_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::create_fleet::CreateFleetInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.name {
        encoder.str("Name").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.build_id {
        encoder.str("BuildId").str(var_3.as_str());
    }
    if let Some(var_4) = &input.script_id {
        encoder.str("ScriptId").str(var_4.as_str());
    }
    if let Some(var_5) = &input.server_launch_path {
        encoder.str("ServerLaunchPath").str(var_5.as_str());
    }
    if let Some(var_6) = &input.server_launch_parameters {
        encoder.str("ServerLaunchParameters").str(var_6.as_str());
    }
    if let Some(var_7) = &input.log_paths {
        encoder.str("LogPaths");
        encoder.array((*var_7).len());
        for item_8 in var_7 {
            {
                encoder.str(item_8.as_str());
            }
        }
    }
    if let Some(var_9) = &input.ec2_instance_type {
        encoder.str("EC2InstanceType").str(var_9.as_str());
    }
    if let Some(var_10) = &input.ec2_inbound_permissions {
        encoder.str("EC2InboundPermissions");
        encoder.array((*var_10).len());
        for item_11 in var_10 {
            {
                crate::protocol_serde::shape_ip_permission::ser_ip_permission(encoder, item_11)?;
            }
        }
    }
    if let Some(var_12) = &input.new_game_session_protection_policy {
        encoder.str("NewGameSessionProtectionPolicy").str(var_12.as_str());
    }
    if let Some(var_13) = &input.runtime_configuration {
        encoder.str("RuntimeConfiguration");
        crate::protocol_serde::shape_runtime_configuration::ser_runtime_configuration(encoder, var_13)?;
    }
    if let Some(var_14) = &input.resource_creation_limit_policy {
        encoder.str("ResourceCreationLimitPolicy");
        crate::protocol_serde::shape_resource_creation_limit_policy::ser_resource_creation_limit_policy(encoder, var_14)?;
    }
    if let Some(var_15) = &input.metric_groups {
        encoder.str("MetricGroups");
        encoder.array((*var_15).len());
        for item_16 in var_15 {
            {
                encoder.str(item_16.as_str());
            }
        }
    }
    if let Some(var_17) = &input.peer_vpc_aws_account_id {
        encoder.str("PeerVpcAwsAccountId").str(var_17.as_str());
    }
    if let Some(var_18) = &input.peer_vpc_id {
        encoder.str("PeerVpcId").str(var_18.as_str());
    }
    if let Some(var_19) = &input.fleet_type {
        encoder.str("FleetType").str(var_19.as_str());
    }
    if let Some(var_20) = &input.instance_role_arn {
        encoder.str("InstanceRoleArn").str(var_20.as_str());
    }
    if let Some(var_21) = &input.certificate_configuration {
        encoder.str("CertificateConfiguration");
        crate::protocol_serde::shape_certificate_configuration::ser_certificate_configuration(encoder, var_21)?;
    }
    if let Some(var_22) = &input.locations {
        encoder.str("Locations");
        encoder.array((*var_22).len());
        for item_23 in var_22 {
            {
                crate::protocol_serde::shape_location_configuration::ser_location_configuration(encoder, item_23)?;
            }
        }
    }
    if let Some(var_24) = &input.tags {
        encoder.str("Tags");
        encoder.array((*var_24).len());
        for item_25 in var_24 {
            {
                crate::protocol_serde::shape_tag::ser_tag(encoder, item_25)?;
            }
        }
    }
    if let Some(var_26) = &input.compute_type {
        encoder.str("ComputeType").str(var_26.as_str());
    }
    if let Some(var_27) = &input.anywhere_configuration {
        encoder.str("AnywhereConfiguration");
        crate::protocol_serde::shape_anywhere_configuration::ser_anywhere_configuration(encoder, var_27)?;
    }
    if let Some(var_28) = &input.instance_role_credentials_provider {
        encoder.str("InstanceRoleCredentialsProvider").str(var_28.as_str());
    }
    if let Some(var_29) = &input.player_gateway_mode {
        encoder.str("PlayerGatewayMode").str(var_29.as_str());
    }
    if let Some(var_30) = &input.player_gateway_configuration {
        encoder.str("PlayerGatewayConfiguration");
        crate::protocol_serde::shape_player_gateway_configuration::ser_player_gateway_configuration(encoder, var_30)?;
    }
    encoder.end();
    Ok(())
}