aws-sdk-applicationdiscovery 1.102.0

AWS SDK for AWS Application Discovery Service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_usage_metric_basis(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::UsageMetricBasis,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.name {
        object.key("name").string(var_1.as_str());
    }
    if let Some(var_2) = &input.percentage_adjust {
        object.key("percentageAdjust").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::Float((*var_2).into()),
        );
    }
    Ok(())
}