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_traits_with_media_type.rs

@@ -1,1 +60,85 @@
    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_traits_with_media_type_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_traits_with_media_type::HttpPayloadTraitsWithMediaTypeOutput,
    9     11   
    crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError,
   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_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError::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_traits_with_media_type_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_traits_with_media_type::HttpPayloadTraitsWithMediaTypeOutput,
   25     34   
    crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError,
   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_payload_traits_with_media_type::builders::HttpPayloadTraitsWithMediaTypeOutputBuilder::default();
   30         -
        output = output.set_blob(crate::protocol_serde::shape_http_payload_traits_with_media_type_output::de_blob_payload(
   31         -
            _response_body,
   32         -
        )?);
          42  +
        /* ProtocolParserGenerator.kt:267 */
          43  +
        output = output.set_blob(
          44  +
            /* ProtocolParserGenerator.kt:327 */crate::protocol_serde::shape_http_payload_traits_with_media_type_output::de_blob_payload(_response_body)?
          45  +
        /* ProtocolParserGenerator.kt:267 */);
          46  +
        /* ProtocolParserGenerator.kt:267 */
   33     47   
        output = output.set_foo(
          48  +
            /* ProtocolParserGenerator.kt:302 */
   34     49   
            crate::protocol_serde::shape_http_payload_traits_with_media_type_output::de_foo_header(_response_headers).map_err(|_| {
   35     50   
                crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError::unhandled(
   36     51   
                    "Failed to parse foo from header `X-Foo",
   37     52   
                )
   38         -
            })?,
          53  +
            })?, /* ProtocolParserGenerator.kt:267 */
   39     54   
        );
          55  +
        /* ClientBuilderInstantiator.kt:56 */
   40     56   
        output.build()
          57  +
        /* ProtocolParserGenerator.kt:77 */
   41     58   
    })
          59  +
    /* ProtocolParserGenerator.kt:71 */
   42     60   
}
   43     61   
          62  +
/* HttpBindingGenerator.kt:542 */
   44     63   
pub fn ser_http_payload_traits_with_media_type_headers(
   45     64   
    input: &crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeInput,
   46     65   
    mut builder: ::http::request::Builder,
   47     66   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
          67  +
    /* HttpBindingGenerator.kt:592 */
   48     68   
    if let ::std::option::Option::Some(inner_1) = &input.foo {
          69  +
        /* HttpBindingGenerator.kt:704 */
   49     70   
        let formatted_2 = inner_1.as_str();
          71  +
        /* HttpBindingGenerator.kt:706 */
   50     72   
        let header_value = formatted_2;
   51     73   
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   52     74   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   53     75   
                "foo",
   54     76   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   55     77   
            )
   56     78   
        })?;
   57     79   
        builder = builder.header("X-Foo", header_value);
          80  +
        /* HttpBindingGenerator.kt:592 */
   58     81   
    }
          82  +
    /* HttpBindingGenerator.kt:555 */
   59     83   
    Ok(builder)
          84  +
    /* HttpBindingGenerator.kt:542 */
   60     85   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_traits_with_media_type_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_blob_http_payload(
    3      4   
    payload: ::std::option::Option<::aws_smithy_types::Blob>,
    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_inner())
          15  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          16  +
    Ok(
          17  +
        /* HttpBoundProtocolPayloadGenerator.kt:377 */ payload.into_inner(), /* 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_payload_traits_with_media_type_output.rs

@@ -1,1 +16,29 @@
    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_blob_payload(
    3      4   
    body: &[u8],
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<::aws_smithy_types::Blob>,
    6      7   
    crate::operation::http_payload_traits_with_media_type::HttpPayloadTraitsWithMediaTypeError,
    7      8   
> {
    8         -
    (!body.is_empty()).then(|| Ok(::aws_smithy_types::Blob::new(body))).transpose()
           9  +
    /* HttpBindingGenerator.kt:319 */
          10  +
    (!body.is_empty())
          11  +
        .then(|| {
          12  +
            /* HttpBindingGenerator.kt:349 */
          13  +
            Ok(::aws_smithy_types::Blob::new(body))
          14  +
            /* HttpBindingGenerator.kt:319 */
          15  +
        })
          16  +
        .transpose()
          17  +
    /* HttpBindingGenerator.kt:248 */
    9     18   
}
   10     19   
          20  +
/* HttpBindingGenerator.kt:153 */
   11     21   
pub(crate) fn de_foo_header(
   12     22   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   13     23   
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
          24  +
    /* HttpBindingGenerator.kt:160 */
   14     25   
    let headers = header_map.get_all("X-Foo");
          26  +
    /* HttpBindingGenerator.kt:375 */
   15     27   
    ::aws_smithy_http::header::one_or_none(headers)
          28  +
    /* HttpBindingGenerator.kt:153 */
   16     29   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_member_xml_name_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::PayloadWithXmlName>,
    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_member_xml_name_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_member_xml_name_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::PayloadWithXmlName,
   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("Hola");
          36  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   22     37   
        crate::protocol_serde::shape_payload_with_xml_name::ser_payload_with_xml_name(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_member_xml_name_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::PayloadWithXmlName>,
    6      7   
    crate::operation::http_payload_with_member_xml_name::HttpPayloadWithMemberXmlNameError,
    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_member_xml_name_output::de_nested(body)
   11     14   
                .map_err(crate::operation::http_payload_with_member_xml_name::HttpPayloadWithMemberXmlNameError::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::PayloadWithXmlName, ::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("Hola")) {
   22     29   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   23     30   
            "invalid root, expected Hola got {:?}",
   24     31   
            start_el
   25     32   
        )));
   26     33   
    }
          34  +
    /* XmlBindingTraitParserGenerator.kt:536 */
   27     35   
    crate::protocol_serde::shape_payload_with_xml_name::de_payload_with_xml_name(&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_structure.rs

@@ -1,1 +37,54 @@
    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_structure_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_structure::HttpPayloadWithStructureOutput,
    9     11   
    crate::operation::http_payload_with_structure::HttpPayloadWithStructureError,
   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_structure::HttpPayloadWithStructureError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_payload_with_structure::HttpPayloadWithStructureError::generic(
   16     22   
        generic,
   17     23   
    ))
          24  +
    /* ProtocolParserGenerator.kt:99 */
   18     25   
}
   19     26   
          27  +
/* RustType.kt:516 */
   20     28   
#[allow(clippy::unnecessary_wraps)]
          29  +
/* ProtocolParserGenerator.kt:71 */
   21     30   
pub fn de_http_payload_with_structure_http_response(
   22     31   
    _response_status: u16,
   23     32   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   24     33   
    _response_body: &[u8],
   25     34   
) -> std::result::Result<
   26     35   
    crate::operation::http_payload_with_structure::HttpPayloadWithStructureOutput,
   27     36   
    crate::operation::http_payload_with_structure::HttpPayloadWithStructureError,
   28     37   
> {
          38  +
    /* ProtocolParserGenerator.kt:77 */
   29     39   
    Ok({
          40  +
        /* RustType.kt:516 */
   30     41   
        #[allow(unused_mut)]
          42  +
        /* ProtocolParserGenerator.kt:240 */
   31     43   
        let mut output = crate::operation::http_payload_with_structure::builders::HttpPayloadWithStructureOutputBuilder::default();
   32         -
        output = output.set_nested(crate::protocol_serde::shape_http_payload_with_structure_output::de_nested_payload(
   33         -
            _response_body,
   34         -
        )?);
          44  +
        /* ProtocolParserGenerator.kt:267 */
          45  +
        output = output.set_nested(
          46  +
            /* ProtocolParserGenerator.kt:327 */
          47  +
            crate::protocol_serde::shape_http_payload_with_structure_output::de_nested_payload(_response_body)?, /* ProtocolParserGenerator.kt:267 */
          48  +
        );
          49  +
        /* ClientBuilderInstantiator.kt:56 */
   35     50   
        output.build()
          51  +
        /* ProtocolParserGenerator.kt:77 */
   36     52   
    })
          53  +
    /* ProtocolParserGenerator.kt:71 */
   37     54   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_structure_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::NestedPayload>,
    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_structure_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_structure_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::NestedPayload,
   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("NestedPayload");
          36  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   22     37   
        crate::protocol_serde::shape_nested_payload::ser_nested_payload(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_structure_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::NestedPayload>,
    6      7   
    crate::operation::http_payload_with_structure::HttpPayloadWithStructureError,
    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_structure_output::de_nested(body)
   11     14   
                .map_err(crate::operation::http_payload_with_structure::HttpPayloadWithStructureError::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::NestedPayload, ::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("NestedPayload")) {
   22     29   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   23     30   
            "invalid root, expected NestedPayload got {:?}",
   24     31   
            start_el
   25     32   
        )));
   26     33   
    }
          34  +
    /* XmlBindingTraitParserGenerator.kt:536 */
   27     35   
    crate::protocol_serde::shape_nested_payload::de_nested_payload(&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_union.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_union_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_union::HttpPayloadWithUnionOutput,
    9     11   
    crate::operation::http_payload_with_union::HttpPayloadWithUnionError,
   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_union::HttpPayloadWithUnionError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::http_payload_with_union::HttpPayloadWithUnionError::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_union_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_union::HttpPayloadWithUnionOutput,
   25     34   
    crate::operation::http_payload_with_union::HttpPayloadWithUnionError,
   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_payload_with_union::builders::HttpPayloadWithUnionOutputBuilder::default();
   30         -
        output = output.set_nested(crate::protocol_serde::shape_http_payload_with_union_output::de_nested_payload(
   31         -
            _response_body,
   32         -
        )?);
          42  +
        /* ProtocolParserGenerator.kt:267 */
          43  +
        output = output.set_nested(
          44  +
            /* ProtocolParserGenerator.kt:327 */
          45  +
            crate::protocol_serde::shape_http_payload_with_union_output::de_nested_payload(_response_body)?, /* ProtocolParserGenerator.kt:267 */
          46  +
        );
          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_union_input.rs

@@ -1,1 +23,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::UnionPayload>,
    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_union_payload()),
           9  +
        None => {
          10  +
            return Ok(
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:339 */
          12  +
                crate::protocol_serde::rest_xml_unset_union_payload(), /* HttpBoundProtocolPayloadGenerator.kt:320 */
          13  +
            )
          14  +
        }
    8     15   
    };
    9         -
    Ok(crate::protocol_serde::shape_http_payload_with_union_input::ser_nested_payload(payload)?)
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          17  +
    Ok(
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:386 */
          19  +
        crate::protocol_serde::shape_http_payload_with_union_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::UnionPayload,
   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.start_el("UnionPayload");
          36  +
        /* XmlBindingTraitSerializerGenerator.kt:481 */
   20     37   
        crate::protocol_serde::shape_union_payload::ser_union_payload(input, root)?
          38  +
        /* XmlBindingTraitSerializerGenerator.kt:158 */
   21     39   
    }
          40  +
    /* XmlBindingTraitSerializerGenerator.kt:181 */
   22     41   
    Ok(out.into_bytes())
          42  +
    /* XmlBindingTraitSerializerGenerator.kt:150 */
   23     43   
}

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

@@ -1,1 +25,34 @@
    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<::std::option::Option<crate::types::UnionPayload>, crate::operation::http_payload_with_union::HttpPayloadWithUnionError> {
           6  +
    /* HttpBindingGenerator.kt:319 */
    5      7   
    (!body.is_empty())
    6      8   
        .then(|| {
           9  +
            /* ProtocolParserGenerator.kt:316 */
    7     10   
            crate::protocol_serde::shape_http_payload_with_union_output::de_nested(body)
    8     11   
                .map_err(crate::operation::http_payload_with_union::HttpPayloadWithUnionError::unhandled)
          12  +
            /* HttpBindingGenerator.kt:319 */
    9     13   
        })
   10     14   
        .transpose()
          15  +
    /* HttpBindingGenerator.kt:248 */
   11     16   
}
   12     17   
          18  +
/* XmlBindingTraitParserGenerator.kt:137 */
   13     19   
pub fn de_nested(inp: &[u8]) -> std::result::Result<crate::types::UnionPayload, ::aws_smithy_xml::decode::XmlDecodeError> {
          20  +
    /* XmlBindingTraitParserGenerator.kt:146 */
   14     21   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   15     22   
    #[allow(unused_mut)]
   16     23   
    let mut decoder = doc.root_element()?;
   17     24   
    let start_el = decoder.start_el();
   18     25   
    if !(start_el.matches("UnionPayload")) {
   19     26   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   20     27   
            "invalid root, expected UnionPayload got {:?}",
   21     28   
            start_el
   22     29   
        )));
   23     30   
    }
          31  +
    /* XmlBindingTraitParserGenerator.kt:482 */
   24     32   
    crate::protocol_serde::shape_union_payload::de_union_payload(&mut decoder)
          33  +
    /* XmlBindingTraitParserGenerator.kt:137 */
   25     34   
}

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

@@ -1,1 +37,54 @@
    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_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::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
    9     11   
    crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   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_name::HttpPayloadWithXmlNameError::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_name::HttpPayloadWithXmlNameError::generic(
   16     22   
        generic,
   17     23   
    ))
          24  +
    /* ProtocolParserGenerator.kt:99 */
   18     25   
}
   19     26   
          27  +
/* RustType.kt:516 */
   20     28   
#[allow(clippy::unnecessary_wraps)]
          29  +
/* ProtocolParserGenerator.kt:71 */
   21     30   
pub fn de_http_payload_with_xml_name_http_response(
   22     31   
    _response_status: u16,
   23     32   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   24     33   
    _response_body: &[u8],
   25     34   
) -> std::result::Result<
   26     35   
    crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   27     36   
    crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   28     37   
> {
          38  +
    /* ProtocolParserGenerator.kt:77 */
   29     39   
    Ok({
          40  +
        /* RustType.kt:516 */
   30     41   
        #[allow(unused_mut)]
          42  +
        /* ProtocolParserGenerator.kt:240 */
   31     43   
        let mut output = crate::operation::http_payload_with_xml_name::builders::HttpPayloadWithXmlNameOutputBuilder::default();
   32         -
        output = output.set_nested(crate::protocol_serde::shape_http_payload_with_xml_name_output::de_nested_payload(
   33         -
            _response_body,
   34         -
        )?);
          44  +
        /* ProtocolParserGenerator.kt:267 */
          45  +
        output = output.set_nested(
          46  +
            /* ProtocolParserGenerator.kt:327 */
          47  +
            crate::protocol_serde::shape_http_payload_with_xml_name_output::de_nested_payload(_response_body)?, /* ProtocolParserGenerator.kt:267 */
          48  +
        );
          49  +
        /* ClientBuilderInstantiator.kt:56 */
   35     50   
        output.build()
          51  +
        /* ProtocolParserGenerator.kt:77 */
   36     52   
    })
          53  +
    /* ProtocolParserGenerator.kt:71 */
   37     54   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_http_payload_with_xml_name_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::PayloadWithXmlName>,
    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_name_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_name_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::PayloadWithXmlName,
   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("Hello");
          36  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   22     37   
        crate::protocol_serde::shape_payload_with_xml_name::ser_payload_with_xml_name(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_name_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::PayloadWithXmlName>,
    6      7   
    crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
    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_name_output::de_nested(body)
   11     14   
                .map_err(crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError::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::PayloadWithXmlName, ::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("Hello")) {
   22     29   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   23     30   
            "invalid root, expected Hello got {:?}",
   24     31   
            start_el
   25     32   
        )));
   26     33   
    }
          34  +
    /* XmlBindingTraitParserGenerator.kt:536 */
   27     35   
    crate::protocol_serde::shape_payload_with_xml_name::de_payload_with_xml_name(&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.rs

@@ -1,1 +35,51 @@
    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_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::HttpPayloadWithXmlNamespaceOutput,
    9     11   
    crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   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::HttpPayloadWithXmlNamespaceError::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::HttpPayloadWithXmlNamespaceError::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_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::HttpPayloadWithXmlNamespaceOutput,
   25     34   
    crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   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_payload_with_xml_namespace::builders::HttpPayloadWithXmlNamespaceOutputBuilder::default();
   30         -
        output = output.set_nested(crate::protocol_serde::shape_http_payload_with_xml_namespace_output::de_nested_payload(
   31         -
            _response_body,
   32         -
        )?);
          42  +
        /* ProtocolParserGenerator.kt:267 */
          43  +
        output = output.set_nested(
          44  +
            /* ProtocolParserGenerator.kt:327 */crate::protocol_serde::shape_http_payload_with_xml_namespace_output::de_nested_payload(_response_body)?
          45  +
        /* ProtocolParserGenerator.kt:267 */);
          46  +
        /* ClientBuilderInstantiator.kt:56 */
   33     47   
        output.build()
          48  +
        /* ProtocolParserGenerator.kt:77 */
   34     49   
    })
          50  +
    /* ProtocolParserGenerator.kt:71 */
   35     51   
}