aws_sdk_gamelift/protocol_serde/
shape_update_fleet_capacity_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn ser_update_fleet_capacity_input_input(
3    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4    input: &crate::operation::update_fleet_capacity::UpdateFleetCapacityInput,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6    if let Some(var_1) = &input.fleet_id {
7        object.key("FleetId").string(var_1.as_str());
8    }
9    if let Some(var_2) = &input.desired_instances {
10        object.key("DesiredInstances").number(
11            #[allow(clippy::useless_conversion)]
12            ::aws_smithy_types::Number::NegInt((*var_2).into()),
13        );
14    }
15    if let Some(var_3) = &input.min_size {
16        object.key("MinSize").number(
17            #[allow(clippy::useless_conversion)]
18            ::aws_smithy_types::Number::NegInt((*var_3).into()),
19        );
20    }
21    if let Some(var_4) = &input.max_size {
22        object.key("MaxSize").number(
23            #[allow(clippy::useless_conversion)]
24            ::aws_smithy_types::Number::NegInt((*var_4).into()),
25        );
26    }
27    if let Some(var_5) = &input.location {
28        object.key("Location").string(var_5.as_str());
29    }
30    Ok(())
31}