#[allow(unused_mut)]
pub fn ser_private_ip_address_specification(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::PrivateIpAddressSpecification,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("Primary");
if let Some(var_2) = &input.primary {
scope_1.boolean(*var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("PrivateIpAddress");
if let Some(var_4) = &input.private_ip_address {
scope_3.string(var_4);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_private_ip_address_specification(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::PrivateIpAddressSpecification, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::PrivateIpAddressSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("primary") => {
let var_5 =
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_primary(var_5);
}
,
s if s.matches("privateIpAddress") => {
let var_6 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_6);
}
,
_ => {}
}
}
Ok(builder.build())
}