pub fn de_notification_attributes(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<
::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>,
::aws_smithy_xml::decode::XmlDecodeError,
> {
if depth >= 128u32 {
return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
}
let mut out = ::std::collections::HashMap::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("entry") => {
crate::protocol_serde::shape_notification_attributes::de_notification_attributes_entry(&mut tag, &mut out, depth)?;
}
_ => {}
}
}
Ok(out)
}
pub fn de_notification_attributes_entry(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
out: &mut ::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>,
depth: u32,
) -> ::std::result::Result<(), ::aws_smithy_xml::decode::XmlDecodeError> {
if depth >= 128u32 {
return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
}
let mut k: Option<::std::string::String> = None;
let mut v: Option<crate::types::IdentityNotificationAttributes> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") => {
k = Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
}
,
s if s.matches("value") => {
v = Some(
crate::protocol_serde::shape_identity_notification_attributes::de_identity_notification_attributes(&mut tag, depth + 1)
?
)
}
,
_ => {}
}
}
let k = k.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing key map entry"))?;
let v = v.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing value map entry"))?;
out.insert(k, v);
Ok(())
}