1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* XmlBindingTraitParserGenerator.kt:586 */
|
2 3 | pub fn de_integer_enum_map(
|
3 4 | decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
|
4 5 | ) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, i32>, ::aws_smithy_xml::decode::XmlDecodeError> {
|
6 + | /* XmlBindingTraitParserGenerator.kt:591 */
|
5 7 | let mut out = ::std::collections::HashMap::new();
|
8 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
6 9 | while let Some(mut tag) = decoder.next_tag() {
|
10 + | /* XmlBindingTraitParserGenerator.kt:353 */
|
7 11 | match tag.start_el() {
|
12 + | /* XmlBindingTraitParserGenerator.kt:593 */
|
8 13 | s if s.matches("entry") => {
|
14 + | /* XmlBindingTraitParserGenerator.kt:594 */
|
9 15 | crate::protocol_serde::shape_integer_enum_map::de_integer_enum_map_entry(&mut tag, &mut out)?;
|
16 + | /* XmlBindingTraitParserGenerator.kt:593 */
|
10 17 | }
|
11 - | _ => {}
|
18 + | /* XmlBindingTraitParserGenerator.kt:356 */ _ => {} /* XmlBindingTraitParserGenerator.kt:353 */
|
12 19 | }
|
20 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
13 21 | }
|
22 + | /* XmlBindingTraitParserGenerator.kt:597 */
|
14 23 | Ok(out)
|
24 + | /* XmlBindingTraitParserGenerator.kt:586 */
|
15 25 | }
|
16 26 |
|
27 + | /* XmlBindingTraitParserGenerator.kt:628 */
|
17 28 | pub fn de_integer_enum_map_entry(
|
18 29 | decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
|
19 30 | out: &mut ::std::collections::HashMap<::std::string::String, i32>,
|
20 31 | ) -> ::std::result::Result<(), ::aws_smithy_xml::decode::XmlDecodeError> {
|
32 + | /* XmlBindingTraitParserGenerator.kt:634 */
|
21 33 | let mut k: Option<::std::string::String> = None;
|
34 + | /* XmlBindingTraitParserGenerator.kt:635 */
|
22 35 | let mut v: Option<i32> = None;
|
36 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
23 37 | while let Some(mut tag) = decoder.next_tag() {
|
38 + | /* XmlBindingTraitParserGenerator.kt:353 */
|
24 39 | match tag.start_el() {
|
25 - | s if s.matches("key") /* key aws.protocoltests.shared#IntegerEnumMap$key */ => {
|
26 - | k = Some(
|
27 - | Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
|
28 - | ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
29 - | .into()
|
30 - | )
|
31 - | ?
|
32 - | )
|
33 - | }
|
40 + | /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("key") /* key aws.protocoltests.shared#IntegerEnumMap$key */ => {
|
41 + | /* XmlBindingTraitParserGenerator.kt:641 */k = Some(
|
42 + | /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
|
43 + | /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
44 + | /* XmlBindingTraitParserGenerator.kt:748 */.into()
|
45 + | /* XmlBindingTraitParserGenerator.kt:729 */)
|
46 + | /* XmlBindingTraitParserGenerator.kt:402 */?
|
47 + | /* XmlBindingTraitParserGenerator.kt:641 */)
|
48 + | /* XmlBindingTraitParserGenerator.kt:492 */}
|
34 49 | ,
|
35 - | s if s.matches("value") /* value aws.protocoltests.shared#IntegerEnumMap$value */ => {
|
36 - | v = Some(
|
37 - | {
|
38 - | <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
|
39 - | ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
40 - | )
|
41 - | .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (intEnum: `aws.protocoltests.shared#IntegerEnum`)"))
|
42 - | }
|
43 - | ?
|
44 - | )
|
45 - | }
|
50 + | /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("value") /* value aws.protocoltests.shared#IntegerEnumMap$value */ => {
|
51 + | /* XmlBindingTraitParserGenerator.kt:646 */v = Some(
|
52 + | /* XmlBindingTraitParserGenerator.kt:676 */ {
|
53 + | /* XmlBindingTraitParserGenerator.kt:677 */<i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
|
54 + | /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
55 + | /* XmlBindingTraitParserGenerator.kt:677 */)
|
56 + | /* XmlBindingTraitParserGenerator.kt:685 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (intEnum: `aws.protocoltests.shared#IntegerEnum`)"))
|
57 + | /* XmlBindingTraitParserGenerator.kt:676 */}
|
58 + | /* XmlBindingTraitParserGenerator.kt:402 */?
|
59 + | /* XmlBindingTraitParserGenerator.kt:646 */)
|
60 + | /* XmlBindingTraitParserGenerator.kt:492 */}
|
46 61 | ,
|
47 - | _ => {}
|
48 - | }
|
62 + | /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
|
63 + | /* XmlBindingTraitParserGenerator.kt:353 */}
|
64 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
49 65 | }
|
66 + | /* XmlBindingTraitParserGenerator.kt:652 */
|
50 67 | let k = k.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing key map entry"))?;
|
51 68 | let v = v.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing value map entry"))?;
|
52 69 | out.insert(k, v);
|
53 70 | Ok(())
|
71 + | /* XmlBindingTraitParserGenerator.kt:628 */
|
54 72 | }
|