pub fn ser_put_recommendation_preferences_input_input(
encoder: &mut ::aws_smithy_cbor::Encoder,
#[allow(unused)] input: &crate::operation::put_recommendation_preferences::PutRecommendationPreferencesInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
encoder.begin_map();
if let Some(var_1) = &input.resource_type {
encoder.str("resourceType").str(var_1.as_str());
}
if let Some(var_2) = &input.scope {
encoder.str("scope");
crate::protocol_serde::shape_scope::ser_scope(encoder, var_2)?;
}
if let Some(var_3) = &input.enhanced_infrastructure_metrics {
encoder.str("enhancedInfrastructureMetrics").str(var_3.as_str());
}
if let Some(var_4) = &input.inferred_workload_types {
encoder.str("inferredWorkloadTypes").str(var_4.as_str());
}
if let Some(var_5) = &input.external_metrics_preference {
encoder.str("externalMetricsPreference");
crate::protocol_serde::shape_external_metrics_preference::ser_external_metrics_preference(encoder, var_5)?;
}
if let Some(var_6) = &input.look_back_period {
encoder.str("lookBackPeriod").str(var_6.as_str());
}
if let Some(var_7) = &input.utilization_preferences {
encoder.str("utilizationPreferences");
encoder.array((*var_7).len());
for item_8 in var_7 {
{
crate::protocol_serde::shape_utilization_preference::ser_utilization_preference(encoder, item_8)?;
}
}
}
if let Some(var_9) = &input.preferred_resources {
encoder.str("preferredResources");
encoder.array((*var_9).len());
for item_10 in var_9 {
{
crate::protocol_serde::shape_preferred_resource::ser_preferred_resource(encoder, item_10)?;
}
}
}
if let Some(var_11) = &input.savings_estimation_mode {
encoder.str("savingsEstimationMode").str(var_11.as_str());
}
encoder.end();
Ok(())
}