aws_sdk_appstream/protocol_serde/
shape_compute_capacity.rs1pub fn ser_compute_capacity(
3 object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4 input: &crate::types::ComputeCapacity,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6 if let Some(var_1) = &input.desired_instances {
7 object.key("DesiredInstances").number(
8 #[allow(clippy::useless_conversion)]
9 ::aws_smithy_types::Number::NegInt((*var_1).into()),
10 );
11 }
12 if let Some(var_2) = &input.desired_sessions {
13 object.key("DesiredSessions").number(
14 #[allow(clippy::useless_conversion)]
15 ::aws_smithy_types::Number::NegInt((*var_2).into()),
16 );
17 }
18 Ok(())
19}