aws-sdk-gamelift 1.119.0

AWS SDK for Amazon GameLift
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_put_scaling_policy_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::put_scaling_policy::PutScalingPolicyInput,
) -> ::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.fleet_id {
        encoder.str("FleetId").str(var_2.as_str());
    }
    if let Some(var_3) = &input.scaling_adjustment {
        encoder.str("ScalingAdjustment").integer(*var_3);
    }
    if let Some(var_4) = &input.scaling_adjustment_type {
        encoder.str("ScalingAdjustmentType").str(var_4.as_str());
    }
    if let Some(var_5) = &input.threshold {
        encoder.str("Threshold").double(*var_5);
    }
    if let Some(var_6) = &input.comparison_operator {
        encoder.str("ComparisonOperator").str(var_6.as_str());
    }
    if let Some(var_7) = &input.evaluation_periods {
        encoder.str("EvaluationPeriods").integer(*var_7);
    }
    if let Some(var_8) = &input.metric_name {
        encoder.str("MetricName").str(var_8.as_str());
    }
    if let Some(var_9) = &input.policy_type {
        encoder.str("PolicyType").str(var_9.as_str());
    }
    if let Some(var_10) = &input.target_configuration {
        encoder.str("TargetConfiguration");
        crate::protocol_serde::shape_target_configuration::ser_target_configuration(encoder, var_10)?;
    }
    encoder.end();
    Ok(())
}