1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn de_topic_attributes_map(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
    std::collections::HashMap<std::string::String, std::string::String>,
    aws_smithy_xml::decode::XmlDecodeError,
> {
    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_topic_attributes_map::de_topic_attributes_map_entry(
                    &mut tag, &mut out,
                )?;
            }
            _ => {}
        }
    }
    Ok(out)
}

pub fn de_topic_attributes_map_entry(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
    out: &mut std::collections::HashMap<std::string::String, std::string::String>,
) -> Result<(), aws_smithy_xml::decode::XmlDecodeError> {
    let mut k: Option<std::string::String> = None;
    let mut v: Option<std::string::String> = None;
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("key") /* key com.amazonaws.sns#TopicAttributesMap$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") /* value com.amazonaws.sns#TopicAttributesMap$value */ =>  {
                v = Some(
                    Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                        aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                        .into()
                    )
                    ?
                )
            }
            ,
            _ => {}
        }
    }
    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(())
}