aws_sdk_sagemaker/protocol_serde/
shape_throughput_config.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn ser_throughput_config(
3    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4    input: &crate::types::ThroughputConfig,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6    if let Some(var_1) = &input.throughput_mode {
7        object.key("ThroughputMode").string(var_1.as_str());
8    }
9    if let Some(var_2) = &input.provisioned_read_capacity_units {
10        object.key("ProvisionedReadCapacityUnits").number(
11            #[allow(clippy::useless_conversion)]
12            ::aws_smithy_types::Number::NegInt((*var_2).into()),
13        );
14    }
15    if let Some(var_3) = &input.provisioned_write_capacity_units {
16        object.key("ProvisionedWriteCapacityUnits").number(
17            #[allow(clippy::useless_conversion)]
18            ::aws_smithy_types::Number::NegInt((*var_3).into()),
19        );
20    }
21    Ok(())
22}