#[allow(unused_mut)]
pub fn ser_mutual_authentication_attributes(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::MutualAuthenticationAttributes,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("Mode");
if let Some(var_2) = &input.mode {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("TrustStoreArn");
if let Some(var_4) = &input.trust_store_arn {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("IgnoreClientCertificateExpiry");
if let Some(var_6) = &input.ignore_client_certificate_expiry {
scope_5.boolean(*var_6);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_mutual_authentication_attributes(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::MutualAuthenticationAttributes, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::MutualAuthenticationAttributes::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Mode") => {
let var_7 =
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_mode(var_7);
}
,
s if s.matches("TrustStoreArn") => {
let var_8 =
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_trust_store_arn(var_8);
}
,
s if s.matches("IgnoreClientCertificateExpiry") => {
let var_9 =
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.elasticloadbalancingv2#IgnoreClientCertificateExpiry`)"))
}
?
)
;
builder = builder.set_ignore_client_certificate_expiry(var_9);
}
,
_ => {}
}
}
Ok(builder.build())
}