Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_namespace_and_prefix.rs

@@ -1,1 +35,52 @@
    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_http_payload_with_xml_namespace_and_prefix_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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
    9     11   
    crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError::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_http_payload_with_xml_namespace_and_prefix_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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   25     34   
    crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   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 =
   30     42   
            crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixOutputBuilder::default();
   31         -
        output =
   32         -
            output.set_nested(crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix_output::de_nested_payload(_response_body)?);
          43  +
        /* ProtocolParserGenerator.kt:267 */
          44  +
        output = output.set_nested(
          45  +
            /* ProtocolParserGenerator.kt:327 */crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix_output::de_nested_payload(_response_body)?
          46  +
        /* ProtocolParserGenerator.kt:267 */);
          47  +
        /* ClientBuilderInstantiator.kt:56 */
   33     48   
        output.build()
          49  +
        /* ProtocolParserGenerator.kt:77 */
   34     50   
    })
          51  +
    /* ProtocolParserGenerator.kt:71 */
   35     52   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_namespace_and_prefix_input.rs

@@ -1,1 +25,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:311 */
    2      3   
pub fn ser_nested_http_payload(
    3      4   
    payload: &::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:320 */
    5      7   
    let payload = match payload.as_ref() {
    6      8   
        Some(t) => t,
    7         -
        None => return Ok(crate::protocol_serde::rest_xml_unset_struct_payload()),
           9  +
        None => {
          10  +
            return Ok(
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:338 */
          12  +
                crate::protocol_serde::rest_xml_unset_struct_payload(), /* HttpBoundProtocolPayloadGenerator.kt:320 */
          13  +
            )
          14  +
        }
    8     15   
    };
    9         -
    Ok(crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix_input::ser_nested_payload(payload)?)
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          17  +
    Ok(
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:386 */
          19  +
        crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix_input::ser_nested_payload(payload)?, /* HttpBoundProtocolPayloadGenerator.kt:345 */
          20  +
    )
          21  +
    /* HttpBoundProtocolPayloadGenerator.kt:311 */
   10     22   
}
   11     23   
          24  +
/* XmlBindingTraitSerializerGenerator.kt:150 */
   12     25   
pub fn ser_nested_payload(
   13     26   
    input: &crate::types::PayloadWithXmlNamespaceAndPrefix,
   14     27   
) -> std::result::Result<std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
          28  +
    /* XmlBindingTraitSerializerGenerator.kt:154 */
   15     29   
    let mut out = String::new();
          30  +
    /* XmlBindingTraitSerializerGenerator.kt:158 */
   16     31   
    {
          32  +
        /* XmlBindingTraitSerializerGenerator.kt:159 */
   17     33   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   18     34   
        #[allow(unused_mut)]
   19     35   
        let mut root = writer
   20     36   
            .start_el("PayloadWithXmlNamespaceAndPrefix")
   21     37   
            .write_ns("http://foo.com", Some("baz"));
          38  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   22     39   
        crate::protocol_serde::shape_payload_with_xml_namespace_and_prefix::ser_payload_with_xml_namespace_and_prefix(input, root)?
          40  +
        /* XmlBindingTraitSerializerGenerator.kt:158 */
   23     41   
    }
          42  +
    /* XmlBindingTraitSerializerGenerator.kt:181 */
   24     43   
    Ok(out.into_bytes())
          44  +
    /* XmlBindingTraitSerializerGenerator.kt:150 */
   25     45   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_namespace_and_prefix_output.rs

@@ -1,1 +28,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:248 */
    2      3   
pub(crate) fn de_nested_payload(
    3      4   
    body: &[u8],
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>,
    6      7   
    crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
    7      8   
> {
           9  +
    /* HttpBindingGenerator.kt:319 */
    8     10   
    (!body.is_empty())
    9     11   
        .then(|| {
          12  +
            /* ProtocolParserGenerator.kt:316 */
   10     13   
            crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix_output::de_nested(body)
   11     14   
                .map_err(crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError::unhandled)
          15  +
            /* HttpBindingGenerator.kt:319 */
   12     16   
        })
   13     17   
        .transpose()
          18  +
    /* HttpBindingGenerator.kt:248 */
   14     19   
}
   15     20   
          21  +
/* XmlBindingTraitParserGenerator.kt:137 */
   16     22   
pub fn de_nested(inp: &[u8]) -> std::result::Result<crate::types::PayloadWithXmlNamespaceAndPrefix, ::aws_smithy_xml::decode::XmlDecodeError> {
          23  +
    /* XmlBindingTraitParserGenerator.kt:146 */
   17     24   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   18     25   
    #[allow(unused_mut)]
   19     26   
    let mut decoder = doc.root_element()?;
   20     27   
    let start_el = decoder.start_el();
   21     28   
    if !(start_el.matches("PayloadWithXmlNamespaceAndPrefix")) {
   22     29   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   23     30   
            "invalid root, expected PayloadWithXmlNamespaceAndPrefix got {:?}",
   24     31   
            start_el
   25     32   
        )));
   26     33   
    }
          34  +
    /* XmlBindingTraitParserGenerator.kt:536 */
   27     35   
    crate::protocol_serde::shape_payload_with_xml_namespace_and_prefix::de_payload_with_xml_namespace_and_prefix(&mut decoder)
          36  +
    /* XmlBindingTraitParserGenerator.kt:137 */
   28     37   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_namespace_input.rs

@@ -1,1 +25,43 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:311 */
    2      3   
pub fn ser_nested_http_payload(
    3      4   
    payload: &::std::option::Option<crate::types::PayloadWithXmlNamespace>,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:320 */
    5      7   
    let payload = match payload.as_ref() {
    6      8   
        Some(t) => t,
    7         -
        None => return Ok(crate::protocol_serde::rest_xml_unset_struct_payload()),
           9  +
        None => {
          10  +
            return Ok(
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:338 */
          12  +
                crate::protocol_serde::rest_xml_unset_struct_payload(), /* HttpBoundProtocolPayloadGenerator.kt:320 */
          13  +
            )
          14  +
        }
    8     15   
    };
    9         -
    Ok(crate::protocol_serde::shape_http_payload_with_xml_namespace_input::ser_nested_payload(
   10         -
        payload,
   11         -
    )?)
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          17  +
    Ok(
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:386 */
          19  +
        crate::protocol_serde::shape_http_payload_with_xml_namespace_input::ser_nested_payload(payload)?, /* HttpBoundProtocolPayloadGenerator.kt:345 */
          20  +
    )
          21  +
    /* HttpBoundProtocolPayloadGenerator.kt:311 */
   12     22   
}
   13     23   
          24  +
/* XmlBindingTraitSerializerGenerator.kt:150 */
   14     25   
pub fn ser_nested_payload(
   15     26   
    input: &crate::types::PayloadWithXmlNamespace,
   16     27   
) -> std::result::Result<std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
          28  +
    /* XmlBindingTraitSerializerGenerator.kt:154 */
   17     29   
    let mut out = String::new();
          30  +
    /* XmlBindingTraitSerializerGenerator.kt:158 */
   18     31   
    {
          32  +
        /* XmlBindingTraitSerializerGenerator.kt:159 */
   19     33   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   20     34   
        #[allow(unused_mut)]
   21     35   
        let mut root = writer.start_el("PayloadWithXmlNamespace").write_ns("http://foo.com", None);
          36  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   22     37   
        crate::protocol_serde::shape_payload_with_xml_namespace::ser_payload_with_xml_namespace(input, root)?
          38  +
        /* XmlBindingTraitSerializerGenerator.kt:158 */
   23     39   
    }
          40  +
    /* XmlBindingTraitSerializerGenerator.kt:181 */
   24     41   
    Ok(out.into_bytes())
          42  +
    /* XmlBindingTraitSerializerGenerator.kt:150 */
   25     43   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_namespace_output.rs

@@ -1,1 +28,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:248 */
    2      3   
pub(crate) fn de_nested_payload(
    3      4   
    body: &[u8],
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<crate::types::PayloadWithXmlNamespace>,
    6      7   
    crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
    7      8   
> {
           9  +
    /* HttpBindingGenerator.kt:319 */
    8     10   
    (!body.is_empty())
    9     11   
        .then(|| {
          12  +
            /* ProtocolParserGenerator.kt:316 */
   10     13   
            crate::protocol_serde::shape_http_payload_with_xml_namespace_output::de_nested(body)
   11     14   
                .map_err(crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError::unhandled)
          15  +
            /* HttpBindingGenerator.kt:319 */
   12     16   
        })
   13     17   
        .transpose()
          18  +
    /* HttpBindingGenerator.kt:248 */
   14     19   
}
   15     20   
          21  +
/* XmlBindingTraitParserGenerator.kt:137 */
   16     22   
pub fn de_nested(inp: &[u8]) -> std::result::Result<crate::types::PayloadWithXmlNamespace, ::aws_smithy_xml::decode::XmlDecodeError> {
          23  +
    /* XmlBindingTraitParserGenerator.kt:146 */
   17     24   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   18     25   
    #[allow(unused_mut)]
   19     26   
    let mut decoder = doc.root_element()?;
   20     27   
    let start_el = decoder.start_el();
   21     28   
    if !(start_el.matches("PayloadWithXmlNamespace")) {
   22     29   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   23     30   
            "invalid root, expected PayloadWithXmlNamespace got {:?}",
   24     31   
            start_el
   25     32   
        )));
   26     33   
    }
          34  +
    /* XmlBindingTraitParserGenerator.kt:536 */
   27     35   
    crate::protocol_serde::shape_payload_with_xml_namespace::de_payload_with_xml_namespace(&mut decoder)
          36  +
    /* XmlBindingTraitParserGenerator.kt:137 */
   28     37   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_prefix_headers.rs

@@ -1,1 +76,109 @@
    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_http_prefix_headers_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<crate::operation::http_prefix_headers::HttpPrefixHeadersOutput, crate::operation::http_prefix_headers::HttpPrefixHeadersError>
    8     10   
{
          11  +
    /* RustType.kt:516 */
    9     12   
    #[allow(unused_mut)]
          13  +
    /* ProtocolParserGenerator.kt:106 */
   10     14   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11     15   
        .map_err(crate::operation::http_prefix_headers::HttpPrefixHeadersError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::http_prefix_headers::HttpPrefixHeadersError::generic(generic))
          20  +
    /* ProtocolParserGenerator.kt:99 */
   14     21   
}
   15     22   
          23  +
/* RustType.kt:516 */
   16     24   
#[allow(clippy::unnecessary_wraps)]
          25  +
/* ProtocolParserGenerator.kt:71 */
   17     26   
pub fn de_http_prefix_headers_http_response(
   18     27   
    _response_status: u16,
   19     28   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   20     29   
    _response_body: &[u8],
   21     30   
) -> std::result::Result<crate::operation::http_prefix_headers::HttpPrefixHeadersOutput, crate::operation::http_prefix_headers::HttpPrefixHeadersError>
   22     31   
{
          32  +
    /* ProtocolParserGenerator.kt:77 */
   23     33   
    Ok({
          34  +
        /* RustType.kt:516 */
   24     35   
        #[allow(unused_mut)]
          36  +
        /* ProtocolParserGenerator.kt:240 */
   25     37   
        let mut output = crate::operation::http_prefix_headers::builders::HttpPrefixHeadersOutputBuilder::default();
   26         -
        output = output.set_foo(
   27         -
            crate::protocol_serde::shape_http_prefix_headers_output::de_foo_header(_response_headers)
   28         -
                .map_err(|_| crate::operation::http_prefix_headers::HttpPrefixHeadersError::unhandled("Failed to parse foo from header `X-Foo"))?,
          38  +
        /* ProtocolParserGenerator.kt:267 */
          39  +
        output =
          40  +
            output.set_foo(
          41  +
                /* ProtocolParserGenerator.kt:302 */
          42  +
                crate::protocol_serde::shape_http_prefix_headers_output::de_foo_header(_response_headers).map_err(|_| {
          43  +
                    crate::operation::http_prefix_headers::HttpPrefixHeadersError::unhandled("Failed to parse foo from header `X-Foo")
          44  +
                })?, /* ProtocolParserGenerator.kt:267 */
   29     45   
            );
          46  +
        /* ProtocolParserGenerator.kt:267 */
   30     47   
        output = output.set_foo_map(
          48  +
            /* ProtocolParserGenerator.kt:337 */
   31     49   
            crate::protocol_serde::shape_http_prefix_headers_output::de_foo_map_prefix_header(_response_headers).map_err(|_| {
   32     50   
                crate::operation::http_prefix_headers::HttpPrefixHeadersError::unhandled("Failed to parse fooMap from prefix header `X-Foo-")
   33         -
            })?,
          51  +
            })?, /* ProtocolParserGenerator.kt:267 */
   34     52   
        );
          53  +
        /* ClientBuilderInstantiator.kt:56 */
   35     54   
        output.build()
          55  +
        /* ProtocolParserGenerator.kt:77 */
   36     56   
    })
          57  +
    /* ProtocolParserGenerator.kt:71 */
   37     58   
}
   38     59   
          60  +
/* HttpBindingGenerator.kt:542 */
   39     61   
pub fn ser_http_prefix_headers_headers(
   40     62   
    input: &crate::operation::http_prefix_headers::HttpPrefixHeadersInput,
   41     63   
    mut builder: ::http::request::Builder,
   42     64   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
          65  +
    /* HttpBindingGenerator.kt:592 */
   43     66   
    if let ::std::option::Option::Some(inner_1) = &input.foo {
          67  +
        /* HttpBindingGenerator.kt:704 */
   44     68   
        let formatted_2 = inner_1.as_str();
          69  +
        /* HttpBindingGenerator.kt:706 */
   45     70   
        let header_value = formatted_2;
   46     71   
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   47     72   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   48     73   
                "foo",
   49     74   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   50     75   
            )
   51     76   
        })?;
   52     77   
        builder = builder.header("X-Foo", header_value);
          78  +
        /* HttpBindingGenerator.kt:592 */
   53     79   
    }
          80  +
    /* HttpBindingGenerator.kt:741 */
   54     81   
    if let ::std::option::Option::Some(inner_3) = &input.foo_map {
          82  +
        /* HttpBindingGenerator.kt:741 */
   55     83   
        {
          84  +
            /* HttpBindingGenerator.kt:747 */
   56     85   
            for (k, v) in inner_3 {
   57     86   
                use std::str::FromStr;
   58     87   
                let header_name = http::header::HeaderName::from_str(&format!("{}{}", "X-Foo-", &k)).map_err(|err| {
   59     88   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
   60     89   
                        "foo_map",
   61     90   
                        format!("`{k}` cannot be used as a header name: {err}"),
   62     91   
                    )
   63     92   
                })?;
   64     93   
                let header_value = v.as_str();
   65     94   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   66     95   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
   67     96   
                        "foo_map",
   68     97   
                        format!("`{}` cannot be used as a header value: {}", v, err),
   69     98   
                    )
   70     99   
                })?;
   71    100   
                builder = builder.header(header_name, header_value);
   72    101   
            }
         102  +
            /* HttpBindingGenerator.kt:741 */
   73    103   
        }
         104  +
        /* HttpBindingGenerator.kt:741 */
   74    105   
    }
         106  +
    /* HttpBindingGenerator.kt:555 */
   75    107   
    Ok(builder)
         108  +
    /* HttpBindingGenerator.kt:542 */
   76    109   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_prefix_headers_output.rs

@@ -1,1 +29,40 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:153 */
    2      3   
pub(crate) fn de_foo_header(
    3      4   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4      5   
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
           6  +
    /* HttpBindingGenerator.kt:160 */
    5      7   
    let headers = header_map.get_all("X-Foo");
           8  +
    /* HttpBindingGenerator.kt:375 */
    6      9   
    ::aws_smithy_http::header::one_or_none(headers)
          10  +
    /* HttpBindingGenerator.kt:153 */
    7     11   
}
    8     12   
          13  +
/* HttpBindingGenerator.kt:184 */
    9     14   
pub(crate) fn de_foo_map_prefix_header(
   10     15   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   11     16   
) -> std::result::Result<
   12     17   
    ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
   13     18   
    ::aws_smithy_http::header::ParseError,
   14     19   
> {
          20  +
    /* HttpBindingGenerator.kt:190 */
   15     21   
    let headers = ::aws_smithy_http::header::headers_for_prefix(header_map.iter().map(|(k, _)| k), "X-Foo-");
   16     22   
    let out: std::result::Result<_, _> = headers.map(|(key, header_name)| {
   17     23   
                            let values = header_map.get_all(header_name);
   18     24   
                            crate::protocol_serde::shape_http_prefix_headers_output::de_foo_map_inner(values).map(|v| (key.to_string(), v.expect(
   19     25   
                                "we have checked there is at least one value for this header name; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"
   20     26   
                            )))
   21     27   
                        }).collect();
          28  +
    /* HttpBindingGenerator.kt:211 */
   22     29   
    out.map(Some)
          30  +
    /* HttpBindingGenerator.kt:184 */
   23     31   
}
   24     32   
          33  +
/* HttpBindingGenerator.kt:173 */
   25     34   
pub fn de_foo_map_inner<'a>(
   26     35   
    headers: impl ::std::iter::Iterator<Item = &'a str>,
   27     36   
) -> std::result::Result<Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
          37  +
    /* HttpBindingGenerator.kt:375 */
   28     38   
    ::aws_smithy_http::header::one_or_none(headers)
          39  +
    /* HttpBindingGenerator.kt:173 */
   29     40   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_request_with_float_labels.rs

@@ -1,1 +32,47 @@
    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_http_request_with_float_labels_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::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput,
    9     11   
    crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError,
   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::http_request_with_float_labels::HttpRequestWithFloatLabelsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError::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_http_request_with_float_labels_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::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput,
   25     34   
    crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError,
   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::http_request_with_float_labels::builders::HttpRequestWithFloatLabelsOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_request_with_greedy_label_in_path.rs

@@ -1,1 +32,47 @@
    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_http_request_with_greedy_label_in_path_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::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput,
    9     11   
    crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError,
   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::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError::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_http_request_with_greedy_label_in_path_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::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput,
   25     34   
    crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError,
   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::http_request_with_greedy_label_in_path::builders::HttpRequestWithGreedyLabelInPathOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_request_with_labels.rs

@@ -1,1 +32,47 @@
    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_http_request_with_labels_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::http_request_with_labels::HttpRequestWithLabelsOutput,
    9     11   
    crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   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::http_request_with_labels::HttpRequestWithLabelsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_request_with_labels::HttpRequestWithLabelsError::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_http_request_with_labels_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::http_request_with_labels::HttpRequestWithLabelsOutput,
   25     34   
    crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   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::http_request_with_labels::builders::HttpRequestWithLabelsOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_request_with_labels_and_timestamp_format.rs

@@ -1,1 +34,49 @@
    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_http_request_with_labels_and_timestamp_format_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::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
    9     11   
    crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   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::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError::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_http_request_with_labels_and_timestamp_format_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::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   25     34   
    crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   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 =
   30     42   
            crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatOutputBuilder::default(
   31     43   
            );
          44  +
        /* ClientBuilderInstantiator.kt:56 */
   32     45   
        output.build()
          46  +
        /* ProtocolParserGenerator.kt:77 */
   33     47   
    })
          48  +
    /* ProtocolParserGenerator.kt:71 */
   34     49   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_response_code.rs

@@ -1,1 +27,45 @@
    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_http_response_code_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<crate::operation::http_response_code::HttpResponseCodeOutput, crate::operation::http_response_code::HttpResponseCodeError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::http_response_code::HttpResponseCodeError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::http_response_code::HttpResponseCodeError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_http_response_code_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::http_response_code::HttpResponseCodeOutput, crate::operation::http_response_code::HttpResponseCodeError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::http_response_code::builders::HttpResponseCodeOutputBuilder::default();
   24         -
        output = output.set_status(Some(_response_status as _));
          36  +
        /* ProtocolParserGenerator.kt:267 */
          37  +
        output = output.set_status(
          38  +
            /* ProtocolParserGenerator.kt:332 */ Some(_response_status as _), /* ProtocolParserGenerator.kt:267 */
          39  +
        );
          40  +
        /* ClientBuilderInstantiator.kt:56 */
   25     41   
        output.build()
          42  +
        /* ProtocolParserGenerator.kt:77 */
   26     43   
    })
          44  +
    /* ProtocolParserGenerator.kt:71 */
   27     45   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_string_payload.rs

@@ -1,1 +31,48 @@
    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_http_string_payload_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<crate::operation::http_string_payload::HttpStringPayloadOutput, crate::operation::http_string_payload::HttpStringPayloadError>
    8     10   
{
          11  +
    /* RustType.kt:516 */
    9     12   
    #[allow(unused_mut)]
          13  +
    /* ProtocolParserGenerator.kt:106 */
   10     14   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11     15   
        .map_err(crate::operation::http_string_payload::HttpStringPayloadError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::http_string_payload::HttpStringPayloadError::generic(generic))
          20  +
    /* ProtocolParserGenerator.kt:99 */
   14     21   
}
   15     22   
          23  +
/* RustType.kt:516 */
   16     24   
#[allow(clippy::unnecessary_wraps)]
          25  +
/* ProtocolParserGenerator.kt:71 */
   17     26   
pub fn de_http_string_payload_http_response(
   18     27   
    _response_status: u16,
   19     28   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   20     29   
    _response_body: &[u8],
   21     30   
) -> std::result::Result<crate::operation::http_string_payload::HttpStringPayloadOutput, crate::operation::http_string_payload::HttpStringPayloadError>
   22     31   
{
          32  +
    /* ProtocolParserGenerator.kt:77 */
   23     33   
    Ok({
          34  +
        /* RustType.kt:516 */
   24     35   
        #[allow(unused_mut)]
          36  +
        /* ProtocolParserGenerator.kt:240 */
   25     37   
        let mut output = crate::operation::http_string_payload::builders::HttpStringPayloadOutputBuilder::default();
   26         -
        output = output.set_payload(crate::protocol_serde::shape_http_string_payload_output::de_payload_payload(
   27         -
            _response_body,
   28         -
        )?);
          38  +
        /* ProtocolParserGenerator.kt:267 */
          39  +
        output = output.set_payload(
          40  +
            /* ProtocolParserGenerator.kt:327 */
          41  +
            crate::protocol_serde::shape_http_string_payload_output::de_payload_payload(_response_body)?, /* ProtocolParserGenerator.kt:267 */
          42  +
        );
          43  +
        /* ClientBuilderInstantiator.kt:56 */
   29     44   
        output.build()
          45  +
        /* ProtocolParserGenerator.kt:77 */
   30     46   
    })
          47  +
    /* ProtocolParserGenerator.kt:71 */
   31     48   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_string_payload_input.rs

@@ -1,1 +10,20 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:311 */
    2      3   
pub fn ser_payload_http_payload(
    3      4   
    payload: ::std::option::Option<::std::string::String>,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:320 */
    5      7   
    let payload = match payload {
    6      8   
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
           9  +
        None => {
          10  +
            return Ok(
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:332 */ Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:320 */
          12  +
            )
          13  +
        }
    8     14   
    };
    9         -
    Ok(payload.into_bytes())
          15  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          16  +
    Ok(
          17  +
        /* HttpBoundProtocolPayloadGenerator.kt:366 */ payload.into_bytes(), /* HttpBoundProtocolPayloadGenerator.kt:345 */
          18  +
    )
          19  +
    /* HttpBoundProtocolPayloadGenerator.kt:311 */
   10     20   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_string_payload_output.rs

@@ -1,1 +11,17 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:248 */
    2      3   
pub(crate) fn de_payload_payload(
    3      4   
    body: &[u8],
    4      5   
) -> std::result::Result<::std::option::Option<::std::string::String>, crate::operation::http_string_payload::HttpStringPayloadError> {
           6  +
    /* HttpBindingGenerator.kt:319 */
    5      7   
    (!body.is_empty())
    6      8   
        .then(|| {
           9  +
            /* HttpBindingGenerator.kt:325 */
    7     10   
            let body_str = std::str::from_utf8(body).map_err(crate::operation::http_string_payload::HttpStringPayloadError::unhandled)?;
          11  +
            /* HttpBindingGenerator.kt:344 */
    8     12   
            Ok(body_str.to_string())
          13  +
            /* HttpBindingGenerator.kt:319 */
    9     14   
        })
   10     15   
        .transpose()
          16  +
    /* HttpBindingGenerator.kt:248 */
   11     17   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_ignore_query_params_in_response.rs

@@ -1,1 +75,100 @@
    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_ignore_query_params_in_response_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::ignore_query_params_in_response::IgnoreQueryParamsInResponseOutput,
    9     11   
    crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError,
   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::ignore_query_params_in_response::IgnoreQueryParamsInResponseError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError::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_ignore_query_params_in_response_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::ignore_query_params_in_response::IgnoreQueryParamsInResponseOutput,
   25     34   
    crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError,
   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::ignore_query_params_in_response::builders::IgnoreQueryParamsInResponseOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_ignore_query_params_in_response::de_ignore_query_params_in_response(_response_body, output)
   31     44   
            .map_err(crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError::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_ignore_query_params_in_response(
   38     56   
    inp: &[u8],
   39     57   
    mut builder: crate::operation::ignore_query_params_in_response::builders::IgnoreQueryParamsInResponseOutputBuilder,
   40     58   
) -> std::result::Result<
   41     59   
    crate::operation::ignore_query_params_in_response::builders::IgnoreQueryParamsInResponseOutputBuilder,
   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  +
    /* RestXmlParserGenerator.kt:36 */
   50     70   
    if !start_el.matches("IgnoreQueryParamsInResponseOutput") {
   51     71   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   52     72   
            "encountered invalid XML root: expected IgnoreQueryParamsInResponseOutput but got {:?}. This is likely a bug in the SDK.",
   53     73   
            start_el
   54     74   
        )));
   55     75   
    }
          76  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   56     77   
    while let Some(mut tag) = decoder.next_tag() {
          78  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   57     79   
        match tag.start_el() {
   58         -
            s if s.matches("baz") /* baz aws.protocoltests.restxml.synthetic#IgnoreQueryParamsInResponseOutput$baz */ =>  {
   59         -
                let var_1 =
   60         -
                    Some(
   61         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   62         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   63         -
                            .into()
   64         -
                        )
   65         -
                        ?
   66         -
                    )
   67         -
                ;
   68         -
                builder = builder.set_baz(var_1);
   69         -
            }
          80  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("baz") /* baz aws.protocoltests.restxml.synthetic#IgnoreQueryParamsInResponseOutput$baz */ =>  {
          81  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          82  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          83  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          84  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          85  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          86  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          87  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          88  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          89  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          90  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_baz(var_1);
          91  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   70     92   
            ,
   71         -
            _ => {}
   72         -
        }
          93  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          94  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          95  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   73     96   
    }
          97  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   74     98   
    Ok(builder)
          99  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   75    100   
}