Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +49,62 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(unused_mut)]
           4  +
/* XmlBindingTraitParserGenerator.kt:221 */
    3      5   
pub fn de_complex_error_xml_err(
    4      6   
    inp: &[u8],
    5      7   
    mut builder: crate::types::error::builders::ComplexErrorBuilder,
    6      8   
) -> std::result::Result<crate::types::error::builders::ComplexErrorBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
           9  +
    /* XmlBindingTraitParserGenerator.kt:227 */
    7     10   
    if inp.is_empty() {
    8     11   
        return Ok(builder);
    9     12   
    }
          13  +
    /* XmlBindingTraitParserGenerator.kt:229 */
   10     14   
    let mut document = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   11     15   
    #[allow(unused_mut)]
   12     16   
    let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
          17  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   13     18   
    while let Some(mut tag) = error_decoder.next_tag() {
          19  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   14     20   
        match tag.start_el() {
   15         -
            s if s.matches("Nested") /* Nested aws.protocoltests.restxml#ComplexError$Nested */ =>  {
   16         -
                let var_1 =
   17         -
                    Some(
   18         -
                        crate::protocol_serde::shape_complex_nested_error_data::de_complex_nested_error_data(&mut tag)
   19         -
                        ?
   20         -
                    )
   21         -
                ;
   22         -
                builder = builder.set_nested(var_1);
   23         -
            }
          21  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("Nested") /* Nested aws.protocoltests.restxml#ComplexError$Nested */ =>  {
          22  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          23  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          24  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_complex_nested_error_data::de_complex_nested_error_data(&mut tag)
          25  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          26  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          27  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          28  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_1);
          29  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   24     30   
            ,
   25         -
            s if s.matches("TopLevel") /* TopLevel aws.protocoltests.restxml#ComplexError$TopLevel */ =>  {
   26         -
                let var_2 =
   27         -
                    Some(
   28         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   29         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   30         -
                            .into()
   31         -
                        )
   32         -
                        ?
   33         -
                    )
   34         -
                ;
   35         -
                builder = builder.set_top_level(var_2);
   36         -
            }
          31  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("TopLevel") /* TopLevel aws.protocoltests.restxml#ComplexError$TopLevel */ =>  {
          32  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          33  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          34  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          35  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          36  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          37  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          38  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          39  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          40  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          41  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_top_level(var_2);
          42  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   37     43   
            ,
   38         -
            _ => {}
   39         -
        }
          44  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          45  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          46  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   40     47   
    }
          48  +
    /* XmlBindingTraitParserGenerator.kt:240 */
   41     49   
    Ok(builder)
          50  +
    /* XmlBindingTraitParserGenerator.kt:221 */
   42     51   
}
   43     52   
          53  +
/* HttpBindingGenerator.kt:153 */
   44     54   
pub(crate) fn de_header_header(
   45     55   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   46     56   
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
          57  +
    /* HttpBindingGenerator.kt:160 */
   47     58   
    let headers = header_map.get_all("X-Header");
          59  +
    /* HttpBindingGenerator.kt:375 */
   48     60   
    ::aws_smithy_http::header::one_or_none(headers)
          61  +
    /* HttpBindingGenerator.kt:153 */
   49     62   
}

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

@@ -1,1 +27,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::needless_question_mark)]
           4  +
/* XmlBindingTraitParserGenerator.kt:510 */
    3      5   
pub fn de_complex_nested_error_data(
    4      6   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    5      7   
) -> ::std::result::Result<crate::types::ComplexNestedErrorData, ::aws_smithy_xml::decode::XmlDecodeError> {
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* XmlBindingTraitParserGenerator.kt:515 */
    7     11   
    let mut builder = crate::types::ComplexNestedErrorData::builder();
          12  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    8     13   
    while let Some(mut tag) = decoder.next_tag() {
          14  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    9     15   
        match tag.start_el() {
   10         -
            s if s.matches("Foo") /* Foo aws.protocoltests.restxml#ComplexNestedErrorData$Foo */ =>  {
   11         -
                let var_1 =
   12         -
                    Some(
   13         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   14         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   15         -
                            .into()
   16         -
                        )
   17         -
                        ?
   18         -
                    )
   19         -
                ;
   20         -
                builder = builder.set_foo(var_1);
   21         -
            }
          16  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("Foo") /* Foo aws.protocoltests.restxml#ComplexNestedErrorData$Foo */ =>  {
          17  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          18  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          19  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          20  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          21  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          22  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          23  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          24  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          25  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          26  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_foo(var_1);
          27  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   22     28   
            ,
   23         -
            _ => {}
   24         -
        }
          29  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          30  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          31  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   25     32   
    }
          33  +
    /* XmlBindingTraitParserGenerator.kt:533 */
   26     34   
    Ok(builder.build())
          35  +
    /* XmlBindingTraitParserGenerator.kt:510 */
   27     36   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_constant_and_variable_query_string.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_constant_and_variable_query_string_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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
    9     11   
    crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError::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_constant_and_variable_query_string_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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   25     34   
    crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder::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_constant_query_string.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_constant_query_string_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::constant_query_string::ConstantQueryStringOutput,
    9     11   
    crate::operation::constant_query_string::ConstantQueryStringError,
   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::constant_query_string::ConstantQueryStringError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::constant_query_string::ConstantQueryStringError::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_constant_query_string_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::constant_query_string::ConstantQueryStringOutput,
   25     34   
    crate::operation::constant_query_string::ConstantQueryStringError,
   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::constant_query_string::builders::ConstantQueryStringOutputBuilder::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_content_type_parameters.rs

@@ -1,1 +45,68 @@
    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_content_type_parameters_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::content_type_parameters::ContentTypeParametersOutput,
    9     11   
    crate::operation::content_type_parameters::ContentTypeParametersError,
   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::content_type_parameters::ContentTypeParametersError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::content_type_parameters::ContentTypeParametersError::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_content_type_parameters_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::content_type_parameters::ContentTypeParametersOutput,
   25     34   
    crate::operation::content_type_parameters::ContentTypeParametersError,
   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::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}
   33     48   
          49  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   34     50   
pub fn ser_content_type_parameters_op_input(
   35     51   
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
   36     52   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          53  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   37     54   
    let mut out = String::new();
          55  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   38     56   
    {
          57  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   39     58   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   40     59   
        #[allow(unused_mut)]
   41     60   
        let mut root = writer.start_el("ContentTypeParametersInput");
          61  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   42     62   
        crate::protocol_serde::shape_content_type_parameters_input::ser_content_type_parameters_input_input_input(input, root)?
          63  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   43     64   
    }
          65  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   44     66   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          67  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   45     68   
}

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

@@ -1,1 +14,27 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_content_type_parameters_input_input_input(
    3      4   
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.value {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:359 */
    9     14   
        let mut inner_writer = scope.start_el("value").finish();
   10         -
        inner_writer.data(::aws_smithy_types::primitive::Encoder::from(*var_1).encode());
          15  +
        /* XmlBindingTraitSerializerGenerator.kt:360 */
          16  +
        inner_writer.data(
          17  +
            /* XmlBindingTraitSerializerGenerator.kt:325 */
          18  +
            ::aws_smithy_types::primitive::Encoder::from(*var_1).encode(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          19  +
        );
          20  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   11     21   
    }
          22  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   12     23   
    scope.finish();
          24  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   13     25   
    Ok(())
          26  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   14     27   
}

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

@@ -1,1 +67,92 @@
    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_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
          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::datetime_offsets::DatetimeOffsetsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::datetime_offsets::DatetimeOffsetsError::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_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
          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::datetime_offsets::builders::DatetimeOffsetsOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets(_response_body, output)
   25     38   
            .map_err(crate::operation::datetime_offsets::DatetimeOffsetsError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* RustType.kt:516 */
   30     47   
#[allow(unused_mut)]
          48  +
/* XmlBindingTraitParserGenerator.kt:189 */
   31     49   
pub fn de_datetime_offsets(
   32     50   
    inp: &[u8],
   33     51   
    mut builder: crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder,
   34     52   
) -> std::result::Result<crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          53  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   35     54   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   36     55   
   37     56   
    #[allow(unused_mut)]
   38     57   
    let mut decoder = doc.root_element()?;
   39     58   
    #[allow(unused_variables)]
   40     59   
    let start_el = decoder.start_el();
          60  +
    /* RestXmlParserGenerator.kt:36 */
   41     61   
    if !start_el.matches("DatetimeOffsetsOutput") {
   42     62   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   43     63   
            "encountered invalid XML root: expected DatetimeOffsetsOutput but got {:?}. This is likely a bug in the SDK.",
   44     64   
            start_el
   45     65   
        )));
   46     66   
    }
          67  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   47     68   
    while let Some(mut tag) = decoder.next_tag() {
          69  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   48     70   
        match tag.start_el() {
   49         -
            s if s.matches("datetime") /* datetime aws.protocoltests.restxml.synthetic#DatetimeOffsetsOutput$datetime */ =>  {
   50         -
                let var_1 =
   51         -
                    Some(
   52         -
                        ::aws_smithy_types::DateTime::from_str(
   53         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   54         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   55         -
                        )
   56         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
   57         -
                        ?
   58         -
                    )
   59         -
                ;
   60         -
                builder = builder.set_datetime(var_1);
   61         -
            }
          71  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("datetime") /* datetime aws.protocoltests.restxml.synthetic#DatetimeOffsetsOutput$datetime */ =>  {
          72  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          73  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          74  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
          75  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          76  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
          77  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
          78  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
          79  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          80  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          81  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          82  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_datetime(var_1);
          83  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   62     84   
            ,
   63         -
            _ => {}
   64         -
        }
          85  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          86  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          87  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   65     88   
    }
          89  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   66     90   
    Ok(builder)
          91  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   67     92   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_empty_input_and_empty_output.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_empty_input_and_empty_output_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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
    9     11   
    crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::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_empty_input_and_empty_output_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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   27     36   
    crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputOutputBuilder::default();
          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_endpoint_operation.rs

@@ -1,1 +28,43 @@
    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_endpoint_operation_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::endpoint_operation::EndpointOperationOutput, crate::operation::endpoint_operation::EndpointOperationError>
    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::endpoint_operation::EndpointOperationError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::endpoint_operation::EndpointOperationError::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_endpoint_operation_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::endpoint_operation::EndpointOperationOutput, crate::operation::endpoint_operation::EndpointOperationError>
   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::endpoint_operation::builders::EndpointOperationOutputBuilder::default();
          38  +
        /* ClientBuilderInstantiator.kt:56 */
   26     39   
        output.build()
          40  +
        /* ProtocolParserGenerator.kt:77 */
   27     41   
    })
          42  +
    /* ProtocolParserGenerator.kt:71 */
   28     43   
}

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

@@ -1,1 +51,73 @@
    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_endpoint_with_host_label_header_operation_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::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationOutput,
    9     11   
    crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError,
   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::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError::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_endpoint_with_host_label_header_operation_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::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationOutput,
   25     34   
    crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError,
   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::endpoint_with_host_label_header_operation::builders::EndpointWithHostLabelHeaderOperationOutputBuilder::default();
          43  +
        /* ClientBuilderInstantiator.kt:56 */
   31     44   
        output.build()
          45  +
        /* ProtocolParserGenerator.kt:77 */
   32     46   
    })
          47  +
    /* ProtocolParserGenerator.kt:71 */
   33     48   
}
   34     49   
          50  +
/* HttpBindingGenerator.kt:542 */
   35     51   
pub fn ser_endpoint_with_host_label_header_operation_headers(
   36     52   
    input: &crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationInput,
   37     53   
    mut builder: ::http::request::Builder,
   38     54   
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
          55  +
    /* HttpBindingGenerator.kt:592 */
   39     56   
    if let ::std::option::Option::Some(inner_1) = &input.account_id {
          57  +
        /* HttpBindingGenerator.kt:704 */
   40     58   
        let formatted_2 = inner_1.as_str();
          59  +
        /* HttpBindingGenerator.kt:706 */
   41     60   
        let header_value = formatted_2;
   42     61   
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   43     62   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   44     63   
                "account_id",
   45     64   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   46     65   
            )
   47     66   
        })?;
   48     67   
        builder = builder.header("X-Amz-Account-Id", header_value);
          68  +
        /* HttpBindingGenerator.kt:592 */
   49     69   
    }
          70  +
    /* HttpBindingGenerator.kt:555 */
   50     71   
    Ok(builder)
          72  +
    /* HttpBindingGenerator.kt:542 */
   51     73   
}

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

@@ -1,1 +45,68 @@
    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_endpoint_with_host_label_operation_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::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
    9     11   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   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::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::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_endpoint_with_host_label_operation_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::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   25     34   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   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::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}
   33     48   
          49  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   34     50   
pub fn ser_endpoint_with_host_label_operation_op_input(
   35     51   
    input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
   36     52   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          53  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   37     54   
    let mut out = String::new();
          55  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   38     56   
    {
          57  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   39     58   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   40     59   
        #[allow(unused_mut)]
   41     60   
        let mut root = writer.start_el("EndpointWithHostLabelOperationRequest");
          61  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   42     62   
        crate::protocol_serde::shape_endpoint_with_host_label_operation_input::ser_endpoint_with_host_label_operation_input_input_input(input, root)?
          63  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   43     64   
    }
          65  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   44     66   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          67  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   45     68   
}

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

@@ -1,1 +14,26 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_endpoint_with_host_label_operation_input_input_input(
    3      4   
    input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.label {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:359 */
    9     14   
        let mut inner_writer = scope.start_el("label").finish();
   10         -
        inner_writer.data(var_1.as_str());
          15  +
        /* XmlBindingTraitSerializerGenerator.kt:360 */
          16  +
        inner_writer.data(
          17  +
            /* XmlBindingTraitSerializerGenerator.kt:321 */ var_1.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          18  +
        );
          19  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   11     20   
    }
          21  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   12     22   
    scope.finish();
          23  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   13     24   
    Ok(())
          25  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   14     26   
}

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

@@ -1,1 +80,113 @@
    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_flattened_xml_map_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::flattened_xml_map::FlattenedXmlMapOutput, crate::operation::flattened_xml_map::FlattenedXmlMapError> {
          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::flattened_xml_map::FlattenedXmlMapError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::flattened_xml_map::FlattenedXmlMapError::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_flattened_xml_map_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::flattened_xml_map::FlattenedXmlMapOutput, crate::operation::flattened_xml_map::FlattenedXmlMapError> {
          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::flattened_xml_map::builders::FlattenedXmlMapOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_flattened_xml_map::de_flattened_xml_map(_response_body, output)
   25     38   
            .map_err(crate::operation::flattened_xml_map::FlattenedXmlMapError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   30     47   
pub fn ser_flattened_xml_map_op_input(
   31     48   
    input: &crate::operation::flattened_xml_map::FlattenedXmlMapInput,
   32     49   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          50  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   33     51   
    let mut out = String::new();
          52  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   34     53   
    {
          54  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   35     55   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   36     56   
        #[allow(unused_mut)]
   37     57   
        let mut root = writer.start_el("FlattenedXmlMapRequest");
          58  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   38     59   
        crate::protocol_serde::shape_flattened_xml_map_input::ser_flattened_xml_map_input_input_input(input, root)?
          60  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   39     61   
    }
          62  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   40     63   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          64  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   41     65   
}
   42     66   
          67  +
/* RustType.kt:516 */
   43     68   
#[allow(unused_mut)]
          69  +
/* XmlBindingTraitParserGenerator.kt:189 */
   44     70   
pub fn de_flattened_xml_map(
   45     71   
    inp: &[u8],
   46     72   
    mut builder: crate::operation::flattened_xml_map::builders::FlattenedXmlMapOutputBuilder,
   47     73   
) -> std::result::Result<crate::operation::flattened_xml_map::builders::FlattenedXmlMapOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          74  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   48     75   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   49     76   
   50     77   
    #[allow(unused_mut)]
   51     78   
    let mut decoder = doc.root_element()?;
   52     79   
    #[allow(unused_variables)]
   53     80   
    let start_el = decoder.start_el();
          81  +
    /* RestXmlParserGenerator.kt:36 */
   54     82   
    if !start_el.matches("FlattenedXmlMapResponse") {
   55     83   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   56     84   
            "encountered invalid XML root: expected FlattenedXmlMapResponse but got {:?}. This is likely a bug in the SDK.",
   57     85   
            start_el
   58     86   
        )));
   59     87   
    }
          88  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   60     89   
    while let Some(mut tag) = decoder.next_tag() {
          90  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   61     91   
        match tag.start_el() {
   62         -
            s if s.matches("myMap") /* myMap aws.protocoltests.restxml.synthetic#FlattenedXmlMapOutput$myMap */ =>  {
   63         -
                let var_1 =
   64         -
                    Some(
   65         -
                        Result::<::std::collections::HashMap::<::std::string::String, crate::types::FooEnum>, ::aws_smithy_xml::decode::XmlDecodeError>::Ok({
   66         -
                            let mut map_2 = builder.my_map.take().unwrap_or_default();
          92  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("myMap") /* myMap aws.protocoltests.restxml.synthetic#FlattenedXmlMapOutput$myMap */ =>  {
          93  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          94  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          95  +
                        /* XmlBindingTraitParserGenerator.kt:609 */Result::<::std::collections::HashMap::<::std::string::String, crate::types::FooEnum>, ::aws_smithy_xml::decode::XmlDecodeError>::Ok({
          96  +
                            /* XmlBindingTraitParserGenerator.kt:611 */let mut map_2 = builder.my_map.take().unwrap_or_default();
   67     97   
                                            crate::protocol_serde::shape_foo_enum_map::de_foo_enum_map_entry(&mut tag, &mut map_2)?;
   68     98   
                                            map_2
   69         -
                        })
   70         -
                        ?
   71         -
                    )
   72         -
                ;
   73         -
                builder = builder.set_my_map(var_1);
   74         -
            }
          99  +
                        /* XmlBindingTraitParserGenerator.kt:609 */})
         100  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         101  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         102  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         103  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_my_map(var_1);
         104  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   75    105   
            ,
   76         -
            _ => {}
   77         -
        }
         106  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
         107  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
         108  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   78    109   
    }
         110  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   79    111   
    Ok(builder)
         112  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   80    113   
}

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

@@ -1,1 +23,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_flattened_xml_map_input_input_input(
    3      4   
    input: &crate::operation::flattened_xml_map::FlattenedXmlMapInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.my_map {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:512 */
    9     14   
        for (key_2, value_3) in var_1 {
          15  +
            /* XmlBindingTraitSerializerGenerator.kt:513 */
   10     16   
            let mut entry = scope.start_el("myMap").finish();
          17  +
            /* SerializerUtil.kt:42 */
   11     18   
            {
          19  +
                /* XmlBindingTraitSerializerGenerator.kt:359 */
   12     20   
                let mut inner_writer = entry.start_el("key").finish();
   13         -
                inner_writer.data(key_2.as_str());
          21  +
                /* XmlBindingTraitSerializerGenerator.kt:360 */
          22  +
                inner_writer.data(
          23  +
                    /* XmlBindingTraitSerializerGenerator.kt:321 */ key_2.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          24  +
                );
          25  +
                /* SerializerUtil.kt:42 */
   14     26   
            }
          27  +
            /* SerializerUtil.kt:42 */
   15     28   
            {
          29  +
                /* XmlBindingTraitSerializerGenerator.kt:359 */
   16     30   
                let mut inner_writer = entry.start_el("value").finish();
   17         -
                inner_writer.data(value_3.as_str());
          31  +
                /* XmlBindingTraitSerializerGenerator.kt:360 */
          32  +
                inner_writer.data(
          33  +
                    /* XmlBindingTraitSerializerGenerator.kt:321 */ value_3.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          34  +
                );
          35  +
                /* SerializerUtil.kt:42 */
   18     36   
            }
          37  +
            /* XmlBindingTraitSerializerGenerator.kt:512 */
   19     38   
        }
          39  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   20     40   
    }
          41  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   21     42   
    scope.finish();
          43  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   22     44   
    Ok(())
          45  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   23     46   
}

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

@@ -1,1 +89,122 @@
    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_flattened_xml_map_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::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
    9     11   
    crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   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::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError::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_flattened_xml_map_with_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::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   25     34   
    crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   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::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_flattened_xml_map_with_xml_name::de_flattened_xml_map_with_xml_name(_response_body, output)
   31     44   
            .map_err(crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError::unhandled)?;
          45  +
        /* ClientBuilderInstantiator.kt:56 */
   32     46   
        output.build()
          47  +
        /* ProtocolParserGenerator.kt:77 */
   33     48   
    })
          49  +
    /* ProtocolParserGenerator.kt:71 */
   34     50   
}
   35     51   
          52  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   36     53   
pub fn ser_flattened_xml_map_with_xml_name_op_input(
   37     54   
    input: &crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
   38     55   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          56  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   39     57   
    let mut out = String::new();
          58  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   40     59   
    {
          60  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   41     61   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   42     62   
        #[allow(unused_mut)]
   43     63   
        let mut root = writer.start_el("FlattenedXmlMapWithXmlNameRequest");
          64  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   44     65   
        crate::protocol_serde::shape_flattened_xml_map_with_xml_name_input::ser_flattened_xml_map_with_xml_name_input_input_input(input, root)?
          66  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   45     67   
    }
          68  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   46     69   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          70  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   47     71   
}
   48     72   
          73  +
/* RustType.kt:516 */
   49     74   
#[allow(unused_mut)]
          75  +
/* XmlBindingTraitParserGenerator.kt:189 */
   50     76   
pub fn de_flattened_xml_map_with_xml_name(
   51     77   
    inp: &[u8],
   52     78   
    mut builder: crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameOutputBuilder,
   53     79   
) -> std::result::Result<
   54     80   
    crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameOutputBuilder,
   55     81   
    ::aws_smithy_xml::decode::XmlDecodeError,
   56     82   
> {
          83  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   57     84   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   58     85   
   59     86   
    #[allow(unused_mut)]
   60     87   
    let mut decoder = doc.root_element()?;
   61     88   
    #[allow(unused_variables)]
   62     89   
    let start_el = decoder.start_el();
          90  +
    /* RestXmlParserGenerator.kt:36 */
   63     91   
    if !start_el.matches("FlattenedXmlMapWithXmlNameResponse") {
   64     92   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   65     93   
            "encountered invalid XML root: expected FlattenedXmlMapWithXmlNameResponse but got {:?}. This is likely a bug in the SDK.",
   66     94   
            start_el
   67     95   
        )));
   68     96   
    }
          97  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   69     98   
    while let Some(mut tag) = decoder.next_tag() {
          99  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   70    100   
        match tag.start_el() {
   71         -
            s if s.matches("KVP") /* myMap aws.protocoltests.restxml.synthetic#FlattenedXmlMapWithXmlNameOutput$myMap */ =>  {
   72         -
                let var_1 =
   73         -
                    Some(
   74         -
                        Result::<::std::collections::HashMap::<::std::string::String, ::std::string::String>, ::aws_smithy_xml::decode::XmlDecodeError>::Ok({
   75         -
                            let mut map_2 = builder.my_map.take().unwrap_or_default();
         101  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("KVP") /* myMap aws.protocoltests.restxml.synthetic#FlattenedXmlMapWithXmlNameOutput$myMap */ =>  {
         102  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
         103  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         104  +
                        /* XmlBindingTraitParserGenerator.kt:609 */Result::<::std::collections::HashMap::<::std::string::String, ::std::string::String>, ::aws_smithy_xml::decode::XmlDecodeError>::Ok({
         105  +
                            /* XmlBindingTraitParserGenerator.kt:611 */let mut map_2 = builder.my_map.take().unwrap_or_default();
   76    106   
                                            crate::protocol_serde::shape_flattened_xml_map_with_xml_name_input_output_map::de_flattened_xml_map_with_xml_name_input_output_map_entry(&mut tag, &mut map_2)?;
   77    107   
                                            map_2
   78         -
                        })
   79         -
                        ?
   80         -
                    )
   81         -
                ;
   82         -
                builder = builder.set_my_map(var_1);
   83         -
            }
         108  +
                        /* XmlBindingTraitParserGenerator.kt:609 */})
         109  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         110  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         111  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         112  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_my_map(var_1);
         113  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   84    114   
            ,
   85         -
            _ => {}
   86         -
        }
         115  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
         116  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
         117  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   87    118   
    }
         119  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   88    120   
    Ok(builder)
         121  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   89    122   
}

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

@@ -1,1 +23,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_flattened_xml_map_with_xml_name_input_input_input(
    3      4   
    input: &crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.my_map {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:512 */
    9     14   
        for (key_2, value_3) in var_1 {
          15  +
            /* XmlBindingTraitSerializerGenerator.kt:513 */
   10     16   
            let mut entry = scope.start_el("KVP").finish();
          17  +
            /* SerializerUtil.kt:42 */
   11     18   
            {
          19  +
                /* XmlBindingTraitSerializerGenerator.kt:359 */
   12     20   
                let mut inner_writer = entry.start_el("K").finish();
   13         -
                inner_writer.data(key_2.as_str());
          21  +
                /* XmlBindingTraitSerializerGenerator.kt:360 */
          22  +
                inner_writer.data(
          23  +
                    /* XmlBindingTraitSerializerGenerator.kt:321 */ key_2.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          24  +
                );
          25  +
                /* SerializerUtil.kt:42 */
   14     26   
            }
          27  +
            /* SerializerUtil.kt:42 */
   15     28   
            {
          29  +
                /* XmlBindingTraitSerializerGenerator.kt:359 */
   16     30   
                let mut inner_writer = entry.start_el("V").finish();
   17         -
                inner_writer.data(value_3.as_str());
          31  +
                /* XmlBindingTraitSerializerGenerator.kt:360 */
          32  +
                inner_writer.data(
          33  +
                    /* XmlBindingTraitSerializerGenerator.kt:321 */ value_3.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          34  +
                );
          35  +
                /* SerializerUtil.kt:42 */
   18     36   
            }
          37  +
            /* XmlBindingTraitSerializerGenerator.kt:512 */
   19     38   
        }
          39  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   20     40   
    }
          41  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   21     42   
    scope.finish();
          43  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   22     44   
    Ok(())
          45  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   23     46   
}