aws_sdk_ecs/protocol_serde/
shape_put_cluster_capacity_providers_input.rs1pub fn ser_put_cluster_capacity_providers_input_input(
3 object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4 input: &crate::operation::put_cluster_capacity_providers::PutClusterCapacityProvidersInput,
5) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6 if let Some(var_1) = &input.cluster {
7 object.key("cluster").string(var_1.as_str());
8 }
9 if let Some(var_2) = &input.capacity_providers {
10 let mut array_3 = object.key("capacityProviders").start_array();
11 for item_4 in var_2 {
12 {
13 array_3.value().string(item_4.as_str());
14 }
15 }
16 array_3.finish();
17 }
18 if let Some(var_5) = &input.default_capacity_provider_strategy {
19 let mut array_6 = object.key("defaultCapacityProviderStrategy").start_array();
20 for item_7 in var_5 {
21 {
22 #[allow(unused_mut)]
23 let mut object_8 = array_6.value().start_object();
24 crate::protocol_serde::shape_capacity_provider_strategy_item::ser_capacity_provider_strategy_item(&mut object_8, item_7)?;
25 object_8.finish();
26 }
27 }
28 array_6.finish();
29 }
30 Ok(())
31}