#[allow(unused_mut)]
pub fn ser_ena_srd_udp_specification_request(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::EnaSrdUdpSpecificationRequest,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("EnaSrdUdpEnabled");
if let Some(var_2) = &input.ena_srd_udp_enabled {
scope_1.boolean(*var_2);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_ena_srd_udp_specification_request(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::EnaSrdUdpSpecificationRequest, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::EnaSrdUdpSpecificationRequest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("EnaSrdUdpEnabled") => {
let var_3 =
Some(
{
<bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ena_srd_udp_enabled(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}