aws-sdk-cloudwatch 1.109.1

AWS SDK for Amazon CloudWatch
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_list_metrics_input_input(
    encoder: &mut ::aws_smithy_cbor::Encoder,
    #[allow(unused)] input: &crate::operation::list_metrics::ListMetricsInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    encoder.begin_map();
    if let Some(var_1) = &input.namespace {
        encoder.str("Namespace").str(var_1.as_str());
    }
    if let Some(var_2) = &input.metric_name {
        encoder.str("MetricName").str(var_2.as_str());
    }
    if let Some(var_3) = &input.dimensions {
        encoder.str("Dimensions");
        encoder.array((*var_3).len());
        for item_4 in var_3 {
            {
                crate::protocol_serde::shape_dimension_filter::ser_dimension_filter(encoder, item_4)?;
            }
        }
    }
    if let Some(var_5) = &input.next_token {
        encoder.str("NextToken").str(var_5.as_str());
    }
    if let Some(var_6) = &input.recently_active {
        encoder.str("RecentlyActive").str(var_6.as_str());
    }
    if let Some(var_7) = &input.include_linked_accounts {
        encoder.str("IncludeLinkedAccounts").boolean(*var_7);
    }
    if let Some(var_8) = &input.owning_account {
        encoder.str("OwningAccount").str(var_8.as_str());
    }
    encoder.end();
    Ok(())
}