pub fn ser_create_capacity_reservation_fleet_input_input_input(
input: &crate::operation::create_capacity_reservation_fleet::CreateCapacityReservationFleetInput,
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "CreateCapacityReservationFleet", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("AllocationStrategy");
if let Some(var_2) = &input.allocation_strategy {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("ClientToken");
if let Some(var_4) = &input.client_token {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("InstanceTypeSpecification");
if let Some(var_6) = &input.instance_type_specifications {
if !var_6.is_empty() {
let mut list_8 = scope_5.start_list(true, None);
for item_7 in var_6 {
#[allow(unused_mut)]
let mut entry_9 = list_8.entry();
crate::protocol_serde::shape_reservation_fleet_instance_specification::ser_reservation_fleet_instance_specification(entry_9, item_7)?;
}
list_8.finish();
}
}
#[allow(unused_mut)]
let mut scope_10 = writer.prefix("Tenancy");
if let Some(var_11) = &input.tenancy {
scope_10.string(var_11.as_str());
}
#[allow(unused_mut)]
let mut scope_12 = writer.prefix("TotalTargetCapacity");
if let Some(var_13) = &input.total_target_capacity {
scope_12.number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*var_13).into()),
);
}
#[allow(unused_mut)]
let mut scope_14 = writer.prefix("EndDate");
if let Some(var_15) = &input.end_date {
scope_14.date_time(var_15, ::aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_16 = writer.prefix("InstanceMatchCriteria");
if let Some(var_17) = &input.instance_match_criteria {
scope_16.string(var_17.as_str());
}
#[allow(unused_mut)]
let mut scope_18 = writer.prefix("TagSpecification");
if let Some(var_19) = &input.tag_specifications {
if !var_19.is_empty() {
let mut list_21 = scope_18.start_list(true, Some("item"));
for item_20 in var_19 {
#[allow(unused_mut)]
let mut entry_22 = list_21.entry();
crate::protocol_serde::shape_tag_specification::ser_tag_specification(entry_22, item_20)?;
}
list_21.finish();
}
}
#[allow(unused_mut)]
let mut scope_23 = writer.prefix("DryRun");
if let Some(var_24) = &input.dry_run {
scope_23.boolean(*var_24);
}
writer.finish();
Ok(::aws_smithy_types::body::SdkBody::from(out))
}