#[allow(unused_mut)]
pub fn ser_spot_maintenance_strategies(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::SpotMaintenanceStrategies,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("CapacityRebalance");
if let Some(var_2) = &input.capacity_rebalance {
crate::protocol_serde::shape_spot_capacity_rebalance::ser_spot_capacity_rebalance(scope_1, var_2)?;
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_spot_maintenance_strategies(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::SpotMaintenanceStrategies, ::aws_smithy_xml::decode::XmlDecodeError> {
if depth >= 128u32 {
return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
}
#[allow(unused_mut)]
let mut builder = crate::types::SpotMaintenanceStrategies::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityRebalance") => {
let var_3 =
Some(
crate::protocol_serde::shape_spot_capacity_rebalance::de_spot_capacity_rebalance(&mut tag, depth + 1)
?
)
;
builder = builder.set_capacity_rebalance(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}