aws_sdk_ec2/protocol_serde/
shape_modify_fleet_input.rs1pub fn ser_modify_fleet_input_input_input(
3 input: &crate::operation::modify_fleet::ModifyFleetInput,
4) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
5 let mut out = String::new();
6 #[allow(unused_mut)]
7 let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "ModifyFleet", "2016-11-15");
8 #[allow(unused_mut)]
9 let mut scope_1 = writer.prefix("DryRun");
10 if let Some(var_2) = &input.dry_run {
11 scope_1.boolean(*var_2);
12 }
13 #[allow(unused_mut)]
14 let mut scope_3 = writer.prefix("ExcessCapacityTerminationPolicy");
15 if let Some(var_4) = &input.excess_capacity_termination_policy {
16 scope_3.string(var_4.as_str());
17 }
18 #[allow(unused_mut)]
19 let mut scope_5 = writer.prefix("LaunchTemplateConfig");
20 if let Some(var_6) = &input.launch_template_configs {
21 if !var_6.is_empty() {
22 let mut list_8 = scope_5.start_list(true, Some("item"));
23 for item_7 in var_6 {
24 #[allow(unused_mut)]
25 let mut entry_9 = list_8.entry();
26 crate::protocol_serde::shape_fleet_launch_template_config_request::ser_fleet_launch_template_config_request(entry_9, item_7)?;
27 }
28 list_8.finish();
29 }
30 }
31 #[allow(unused_mut)]
32 let mut scope_10 = writer.prefix("FleetId");
33 if let Some(var_11) = &input.fleet_id {
34 scope_10.string(var_11);
35 }
36 #[allow(unused_mut)]
37 let mut scope_12 = writer.prefix("TargetCapacitySpecification");
38 if let Some(var_13) = &input.target_capacity_specification {
39 crate::protocol_serde::shape_target_capacity_specification_request::ser_target_capacity_specification_request(scope_12, var_13)?;
40 }
41 #[allow(unused_mut)]
42 let mut scope_14 = writer.prefix("Context");
43 if let Some(var_15) = &input.context {
44 scope_14.string(var_15);
45 }
46 writer.finish();
47 Ok(::aws_smithy_types::body::SdkBody::from(out))
48}