1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ProtocolParserGenerator.kt:99 */
|
3 5 | pub fn de_ignores_wrapping_xml_name_http_error(
|
4 6 | _response_status: u16,
|
5 7 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
6 8 | _response_body: &[u8],
|
7 9 | ) -> std::result::Result<
|
8 10 | crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
|
9 11 | crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
|
10 12 | > {
|
13 + | /* RustType.kt:516 */
|
11 14 | #[allow(unused_mut)]
|
15 + | /* ProtocolParserGenerator.kt:106 */
|
12 16 | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
|
13 17 | .map_err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::unhandled)?;
|
18 + | /* ProtocolParserGenerator.kt:120 */
|
14 19 | let generic = generic_builder.build();
|
20 + | /* ProtocolParserGenerator.kt:185 */
|
15 21 | Err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::generic(generic))
|
22 + | /* ProtocolParserGenerator.kt:99 */
|
16 23 | }
|
17 24 |
|
25 + | /* RustType.kt:516 */
|
18 26 | #[allow(clippy::unnecessary_wraps)]
|
27 + | /* ProtocolParserGenerator.kt:71 */
|
19 28 | pub fn de_ignores_wrapping_xml_name_http_response(
|
20 29 | _response_status: u16,
|
21 30 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
22 31 | _response_body: &[u8],
|
23 32 | ) -> std::result::Result<
|
24 33 | crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
|
25 34 | crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
|
26 35 | > {
|
36 + | /* ProtocolParserGenerator.kt:77 */
|
27 37 | Ok({
|
38 + | /* RustType.kt:516 */
|
28 39 | #[allow(unused_mut)]
|
40 + | /* ProtocolParserGenerator.kt:240 */
|
29 41 | let mut output = crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder::default();
|
42 + | /* ProtocolParserGenerator.kt:247 */
|
30 43 | output = crate::protocol_serde::shape_ignores_wrapping_xml_name::de_ignores_wrapping_xml_name(_response_body, output)
|
31 44 | .map_err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::unhandled)?;
|
45 + | /* ClientBuilderInstantiator.kt:56 */
|
32 46 | output.build()
|
47 + | /* ProtocolParserGenerator.kt:77 */
|
33 48 | })
|
49 + | /* ProtocolParserGenerator.kt:71 */
|
34 50 | }
|
35 51 |
|
52 + | /* RustType.kt:516 */
|
36 53 | #[allow(unused_mut)]
|
54 + | /* XmlBindingTraitParserGenerator.kt:189 */
|
37 55 | pub fn de_ignores_wrapping_xml_name(
|
38 56 | inp: &[u8],
|
39 57 | mut builder: crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder,
|
40 58 | ) -> std::result::Result<
|
41 59 | crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder,
|
42 60 | ::aws_smithy_xml::decode::XmlDecodeError,
|
43 61 | > {
|
62 + | /* XmlBindingTraitParserGenerator.kt:194 */
|
44 63 | let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
|
45 64 |
|
46 65 | #[allow(unused_mut)]
|
47 66 | let mut decoder = doc.root_element()?;
|
48 67 | #[allow(unused_variables)]
|
49 68 | let start_el = decoder.start_el();
|
69 + | /* AwsQueryParserGenerator.kt:38 */
|
50 70 | if !(start_el.matches("IgnoresWrappingXmlNameResponse")) {
|
51 71 | return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
|
52 72 | "invalid root, expected IgnoresWrappingXmlNameResponse got {:?}",
|
53 73 | start_el
|
54 74 | )));
|
55 75 | }
|
56 76 | if let Some(mut result_tag) = decoder.next_tag() {
|
57 77 | let start_el = result_tag.start_el();
|
58 78 | if !(start_el.matches("IgnoresWrappingXmlNameResult")) {
|
59 79 | return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
|
60 80 | "invalid result, expected IgnoresWrappingXmlNameResult got {:?}",
|
61 81 | start_el
|
62 82 | )));
|
63 83 | }
|
84 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
64 85 | while let Some(mut tag) = result_tag.next_tag() {
|
86 + | /* XmlBindingTraitParserGenerator.kt:353 */
|
65 87 | match tag.start_el() {
|
66 - | s if s.matches("foo") /* foo aws.protocoltests.query.synthetic#IgnoresWrappingXmlNameOutput$foo */ => {
|
67 - | let var_1 =
|
68 - | Some(
|
69 - | Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
|
70 - | ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
71 - | .into()
|
72 - | )
|
73 - | ?
|
74 - | )
|
75 - | ;
|
76 - | builder = builder.set_foo(var_1);
|
77 - | }
|
88 + | /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("foo") /* foo aws.protocoltests.query.synthetic#IgnoresWrappingXmlNameOutput$foo */ => {
|
89 + | /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
|
90 + | /* XmlBindingTraitParserGenerator.kt:372 */Some(
|
91 + | /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
|
92 + | /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
|
93 + | /* XmlBindingTraitParserGenerator.kt:748 */.into()
|
94 + | /* XmlBindingTraitParserGenerator.kt:729 */)
|
95 + | /* XmlBindingTraitParserGenerator.kt:402 */?
|
96 + | /* XmlBindingTraitParserGenerator.kt:372 */)
|
97 + | /* XmlBindingTraitParserGenerator.kt:329 */;
|
98 + | /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_foo(var_1);
|
99 + | /* XmlBindingTraitParserGenerator.kt:492 */}
|
78 100 | ,
|
79 - | _ => {}
|
80 - | }
|
101 + | /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
|
102 + | /* XmlBindingTraitParserGenerator.kt:353 */}
|
103 + | /* XmlBindingTraitParserGenerator.kt:352 */
|
81 104 | }
|
105 + | /* AwsQueryParserGenerator.kt:52 */
|
82 106 | } else {
|
83 107 | return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(
|
84 108 | "expected IgnoresWrappingXmlNameResult tag",
|
85 109 | ));
|
86 110 | };
|
111 + | /* XmlBindingTraitParserGenerator.kt:213 */
|
87 112 | Ok(builder)
|
113 + | /* XmlBindingTraitParserGenerator.kt:189 */
|
88 114 | }
|