Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_no_input_and_output.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_no_input_and_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<crate::operation::no_input_and_output::NoInputAndOutputOutput, crate::operation::no_input_and_output::NoInputAndOutputError>
    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::no_input_and_output::NoInputAndOutputError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::no_input_and_output::NoInputAndOutputError::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_no_input_and_output_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::no_input_and_output::NoInputAndOutputOutput, crate::operation::no_input_and_output::NoInputAndOutputError>
   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::no_input_and_output::builders::NoInputAndOutputOutputBuilder::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/aws_query/rust-client-codegen/src/protocol_serde/shape_no_input_and_output_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_no_input_and_output_input_input_input(
    3      4   
    input: &crate::operation::no_input_and_output::NoInputAndOutputInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "NoInputAndOutput", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_put_with_content_encoding.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_put_with_content_encoding_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::put_with_content_encoding::PutWithContentEncodingOutput,
    9     11   
    crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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::put_with_content_encoding::PutWithContentEncodingError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::put_with_content_encoding::PutWithContentEncodingError::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_put_with_content_encoding_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::put_with_content_encoding::PutWithContentEncodingOutput,
   25     34   
    crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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::put_with_content_encoding::builders::PutWithContentEncodingOutputBuilder::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/aws_query/rust-client-codegen/src/protocol_serde/shape_put_with_content_encoding_input.rs

@@ -1,1 +20,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_put_with_content_encoding_input_input_input(
    3      4   
    input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "PutWithContentEncoding", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("encoding");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.encoding {
          18  +
        /* QuerySerializerGenerator.kt:230 */
   11     19   
        scope_1.string(var_2);
          20  +
        /* QuerySerializerGenerator.kt:206 */
   12     21   
    }
          22  +
    /* RustType.kt:516 */
   13     23   
    #[allow(unused_mut)]
          24  +
    /* QuerySerializerGenerator.kt:279 */
   14     25   
    let mut scope_3 = writer.prefix("data");
          26  +
    /* QuerySerializerGenerator.kt:206 */
   15     27   
    if let Some(var_4) = &input.data {
          28  +
        /* QuerySerializerGenerator.kt:230 */
   16     29   
        scope_3.string(var_4);
          30  +
        /* QuerySerializerGenerator.kt:206 */
   17     31   
    }
          32  +
    /* QuerySerializerGenerator.kt:151 */
   18     33   
    writer.finish();
          34  +
    /* QuerySerializerGenerator.kt:152 */
   19     35   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          36  +
    /* QuerySerializerGenerator.kt:134 */
   20     37   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_idempotency_token_auto_fill.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_query_idempotency_token_auto_fill_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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
    9     11   
    crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError::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_query_idempotency_token_auto_fill_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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   25     34   
    crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   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::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillOutputBuilder::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/aws_query/rust-client-codegen/src/protocol_serde/shape_query_idempotency_token_auto_fill_input.rs

@@ -1,1 +15,27 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_query_idempotency_token_auto_fill_input_input_input(
    3      4   
    input: &crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "QueryIdempotencyTokenAutoFill", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("token");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.token {
          18  +
        /* QuerySerializerGenerator.kt:230 */
   11     19   
        scope_1.string(var_2);
          20  +
        /* QuerySerializerGenerator.kt:206 */
   12     21   
    }
          22  +
    /* QuerySerializerGenerator.kt:151 */
   13     23   
    writer.finish();
          24  +
    /* QuerySerializerGenerator.kt:152 */
   14     25   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          26  +
    /* QuerySerializerGenerator.kt:134 */
   15     27   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_lists.rs

@@ -1,1 +26,41 @@
    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_query_lists_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::query_lists::QueryListsOutput, crate::operation::query_lists::QueryListsError> {
          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::query_lists::QueryListsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::query_lists::QueryListsError::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_query_lists_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::query_lists::QueryListsOutput, crate::operation::query_lists::QueryListsError> {
          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::query_lists::builders::QueryListsOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_lists_input.rs

@@ -1,1 +70,137 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_query_lists_input_input_input(
    3      4   
    input: &crate::operation::query_lists::QueryListsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "QueryLists", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("ListArg");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.list_arg {
          18  +
        /* QuerySerializerGenerator.kt:305 */
   11     19   
        let mut list_4 = scope_1.start_list(false, None);
          20  +
        /* QuerySerializerGenerator.kt:306 */
   12     21   
        for item_3 in var_2 {
          22  +
            /* RustType.kt:516 */
   13     23   
            #[allow(unused_mut)]
          24  +
            /* QuerySerializerGenerator.kt:309 */
   14     25   
            let mut entry_5 = list_4.entry();
          26  +
            /* QuerySerializerGenerator.kt:230 */
   15     27   
            entry_5.string(item_3);
          28  +
            /* QuerySerializerGenerator.kt:306 */
   16     29   
        }
          30  +
        /* QuerySerializerGenerator.kt:316 */
   17     31   
        list_4.finish();
          32  +
        /* QuerySerializerGenerator.kt:206 */
   18     33   
    }
          34  +
    /* RustType.kt:516 */
   19     35   
    #[allow(unused_mut)]
          36  +
    /* QuerySerializerGenerator.kt:279 */
   20     37   
    let mut scope_6 = writer.prefix("ComplexListArg");
          38  +
    /* QuerySerializerGenerator.kt:206 */
   21     39   
    if let Some(var_7) = &input.complex_list_arg {
          40  +
        /* QuerySerializerGenerator.kt:305 */
   22     41   
        let mut list_9 = scope_6.start_list(false, None);
          42  +
        /* QuerySerializerGenerator.kt:306 */
   23     43   
        for item_8 in var_7 {
          44  +
            /* RustType.kt:516 */
   24     45   
            #[allow(unused_mut)]
          46  +
            /* QuerySerializerGenerator.kt:309 */
   25     47   
            let mut entry_10 = list_9.entry();
          48  +
            /* QuerySerializerGenerator.kt:187 */
   26     49   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(entry_10, item_8)?;
          50  +
            /* QuerySerializerGenerator.kt:306 */
   27     51   
        }
          52  +
        /* QuerySerializerGenerator.kt:316 */
   28     53   
        list_9.finish();
          54  +
        /* QuerySerializerGenerator.kt:206 */
   29     55   
    }
          56  +
    /* RustType.kt:516 */
   30     57   
    #[allow(unused_mut)]
          58  +
    /* QuerySerializerGenerator.kt:279 */
   31     59   
    let mut scope_11 = writer.prefix("FlattenedListArg");
          60  +
    /* QuerySerializerGenerator.kt:206 */
   32     61   
    if let Some(var_12) = &input.flattened_list_arg {
          62  +
        /* QuerySerializerGenerator.kt:305 */
   33     63   
        let mut list_14 = scope_11.start_list(true, None);
          64  +
        /* QuerySerializerGenerator.kt:306 */
   34     65   
        for item_13 in var_12 {
          66  +
            /* RustType.kt:516 */
   35     67   
            #[allow(unused_mut)]
          68  +
            /* QuerySerializerGenerator.kt:309 */
   36     69   
            let mut entry_15 = list_14.entry();
          70  +
            /* QuerySerializerGenerator.kt:230 */
   37     71   
            entry_15.string(item_13);
          72  +
            /* QuerySerializerGenerator.kt:306 */
   38     73   
        }
          74  +
        /* QuerySerializerGenerator.kt:316 */
   39     75   
        list_14.finish();
          76  +
        /* QuerySerializerGenerator.kt:206 */
   40     77   
    }
          78  +
    /* RustType.kt:516 */
   41     79   
    #[allow(unused_mut)]
          80  +
    /* QuerySerializerGenerator.kt:279 */
   42     81   
    let mut scope_16 = writer.prefix("ListArgWithXmlNameMember");
          82  +
    /* QuerySerializerGenerator.kt:206 */
   43     83   
    if let Some(var_17) = &input.list_arg_with_xml_name_member {
          84  +
        /* QuerySerializerGenerator.kt:305 */
   44     85   
        let mut list_19 = scope_16.start_list(false, Some("item"));
          86  +
        /* QuerySerializerGenerator.kt:306 */
   45     87   
        for item_18 in var_17 {
          88  +
            /* RustType.kt:516 */
   46     89   
            #[allow(unused_mut)]
          90  +
            /* QuerySerializerGenerator.kt:309 */
   47     91   
            let mut entry_20 = list_19.entry();
          92  +
            /* QuerySerializerGenerator.kt:230 */
   48     93   
            entry_20.string(item_18);
          94  +
            /* QuerySerializerGenerator.kt:306 */
   49     95   
        }
          96  +
        /* QuerySerializerGenerator.kt:316 */
   50     97   
        list_19.finish();
          98  +
        /* QuerySerializerGenerator.kt:206 */
   51     99   
    }
         100  +
    /* RustType.kt:516 */
   52    101   
    #[allow(unused_mut)]
         102  +
    /* QuerySerializerGenerator.kt:279 */
   53    103   
    let mut scope_21 = writer.prefix("Hi");
         104  +
    /* QuerySerializerGenerator.kt:206 */
   54    105   
    if let Some(var_22) = &input.flattened_list_arg_with_xml_name {
         106  +
        /* QuerySerializerGenerator.kt:305 */
   55    107   
        let mut list_24 = scope_21.start_list(true, Some("item"));
         108  +
        /* QuerySerializerGenerator.kt:306 */
   56    109   
        for item_23 in var_22 {
         110  +
            /* RustType.kt:516 */
   57    111   
            #[allow(unused_mut)]
         112  +
            /* QuerySerializerGenerator.kt:309 */
   58    113   
            let mut entry_25 = list_24.entry();
         114  +
            /* QuerySerializerGenerator.kt:230 */
   59    115   
            entry_25.string(item_23);
         116  +
            /* QuerySerializerGenerator.kt:306 */
   60    117   
        }
         118  +
        /* QuerySerializerGenerator.kt:316 */
   61    119   
        list_24.finish();
         120  +
        /* QuerySerializerGenerator.kt:206 */
   62    121   
    }
         122  +
    /* RustType.kt:516 */
   63    123   
    #[allow(unused_mut)]
         124  +
    /* QuerySerializerGenerator.kt:279 */
   64    125   
    let mut scope_26 = writer.prefix("NestedWithList");
         126  +
    /* QuerySerializerGenerator.kt:206 */
   65    127   
    if let Some(var_27) = &input.nested_with_list {
         128  +
        /* QuerySerializerGenerator.kt:187 */
   66    129   
        crate::protocol_serde::shape_nested_struct_with_list::ser_nested_struct_with_list(scope_26, var_27)?;
         130  +
        /* QuerySerializerGenerator.kt:206 */
   67    131   
    }
         132  +
    /* QuerySerializerGenerator.kt:151 */
   68    133   
    writer.finish();
         134  +
    /* QuerySerializerGenerator.kt:152 */
   69    135   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
         136  +
    /* QuerySerializerGenerator.kt:134 */
   70    137   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_maps.rs

@@ -1,1 +26,41 @@
    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_query_maps_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::query_maps::QueryMapsOutput, crate::operation::query_maps::QueryMapsError> {
          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::query_maps::QueryMapsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::query_maps::QueryMapsError::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_query_maps_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::query_maps::QueryMapsOutput, crate::operation::query_maps::QueryMapsError> {
          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::query_maps::builders::QueryMapsOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_maps_input.rs

@@ -1,1 +112,221 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_query_maps_input_input_input(
    3      4   
    input: &crate::operation::query_maps::QueryMapsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "QueryMaps", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("MapArg");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.map_arg {
          18  +
        /* QuerySerializerGenerator.kt:331 */
   11     19   
        let mut map_3 = scope_1.start_map(false, "key", "value");
          20  +
        /* QuerySerializerGenerator.kt:332 */
   12     21   
        for (key_4, value_5) in var_2 {
          22  +
            /* RustType.kt:516 */
   13     23   
            #[allow(unused_mut)]
          24  +
            /* QuerySerializerGenerator.kt:341 */
   14     25   
            let mut entry_6 = map_3.entry(key_4);
          26  +
            /* SerializerUtil.kt:42 */
   15     27   
            {
          28  +
                /* QuerySerializerGenerator.kt:230 */
   16     29   
                entry_6.string(value_5);
          30  +
                /* SerializerUtil.kt:42 */
   17     31   
            }
          32  +
            /* QuerySerializerGenerator.kt:332 */
   18     33   
        }
          34  +
        /* QuerySerializerGenerator.kt:344 */
   19     35   
        map_3.finish();
          36  +
        /* QuerySerializerGenerator.kt:206 */
   20     37   
    }
          38  +
    /* RustType.kt:516 */
   21     39   
    #[allow(unused_mut)]
          40  +
    /* QuerySerializerGenerator.kt:279 */
   22     41   
    let mut scope_7 = writer.prefix("Foo");
          42  +
    /* QuerySerializerGenerator.kt:206 */
   23     43   
    if let Some(var_8) = &input.renamed_map_arg {
          44  +
        /* QuerySerializerGenerator.kt:331 */
   24     45   
        let mut map_9 = scope_7.start_map(false, "key", "value");
          46  +
        /* QuerySerializerGenerator.kt:332 */
   25     47   
        for (key_10, value_11) in var_8 {
          48  +
            /* RustType.kt:516 */
   26     49   
            #[allow(unused_mut)]
          50  +
            /* QuerySerializerGenerator.kt:341 */
   27     51   
            let mut entry_12 = map_9.entry(key_10);
          52  +
            /* SerializerUtil.kt:42 */
   28     53   
            {
          54  +
                /* QuerySerializerGenerator.kt:230 */
   29     55   
                entry_12.string(value_11);
          56  +
                /* SerializerUtil.kt:42 */
   30     57   
            }
          58  +
            /* QuerySerializerGenerator.kt:332 */
   31     59   
        }
          60  +
        /* QuerySerializerGenerator.kt:344 */
   32     61   
        map_9.finish();
          62  +
        /* QuerySerializerGenerator.kt:206 */
   33     63   
    }
          64  +
    /* RustType.kt:516 */
   34     65   
    #[allow(unused_mut)]
          66  +
    /* QuerySerializerGenerator.kt:279 */
   35     67   
    let mut scope_13 = writer.prefix("ComplexMapArg");
          68  +
    /* QuerySerializerGenerator.kt:206 */
   36     69   
    if let Some(var_14) = &input.complex_map_arg {
          70  +
        /* QuerySerializerGenerator.kt:331 */
   37     71   
        let mut map_15 = scope_13.start_map(false, "key", "value");
          72  +
        /* QuerySerializerGenerator.kt:332 */
   38     73   
        for (key_16, value_17) in var_14 {
          74  +
            /* RustType.kt:516 */
   39     75   
            #[allow(unused_mut)]
          76  +
            /* QuerySerializerGenerator.kt:341 */
   40     77   
            let mut entry_18 = map_15.entry(key_16);
          78  +
            /* SerializerUtil.kt:42 */
   41     79   
            {
          80  +
                /* QuerySerializerGenerator.kt:187 */
   42     81   
                crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(entry_18, value_17)?;
          82  +
                /* SerializerUtil.kt:42 */
   43     83   
            }
          84  +
            /* QuerySerializerGenerator.kt:332 */
   44     85   
        }
          86  +
        /* QuerySerializerGenerator.kt:344 */
   45     87   
        map_15.finish();
          88  +
        /* QuerySerializerGenerator.kt:206 */
   46     89   
    }
          90  +
    /* RustType.kt:516 */
   47     91   
    #[allow(unused_mut)]
          92  +
    /* QuerySerializerGenerator.kt:279 */
   48     93   
    let mut scope_19 = writer.prefix("MapWithXmlMemberName");
          94  +
    /* QuerySerializerGenerator.kt:206 */
   49     95   
    if let Some(var_20) = &input.map_with_xml_member_name {
          96  +
        /* QuerySerializerGenerator.kt:331 */
   50     97   
        let mut map_21 = scope_19.start_map(false, "K", "V");
          98  +
        /* QuerySerializerGenerator.kt:332 */
   51     99   
        for (key_22, value_23) in var_20 {
         100  +
            /* RustType.kt:516 */
   52    101   
            #[allow(unused_mut)]
         102  +
            /* QuerySerializerGenerator.kt:341 */
   53    103   
            let mut entry_24 = map_21.entry(key_22);
         104  +
            /* SerializerUtil.kt:42 */
   54    105   
            {
         106  +
                /* QuerySerializerGenerator.kt:230 */
   55    107   
                entry_24.string(value_23);
         108  +
                /* SerializerUtil.kt:42 */
   56    109   
            }
         110  +
            /* QuerySerializerGenerator.kt:332 */
   57    111   
        }
         112  +
        /* QuerySerializerGenerator.kt:344 */
   58    113   
        map_21.finish();
         114  +
        /* QuerySerializerGenerator.kt:206 */
   59    115   
    }
         116  +
    /* RustType.kt:516 */
   60    117   
    #[allow(unused_mut)]
         118  +
    /* QuerySerializerGenerator.kt:279 */
   61    119   
    let mut scope_25 = writer.prefix("FlattenedMap");
         120  +
    /* QuerySerializerGenerator.kt:206 */
   62    121   
    if let Some(var_26) = &input.flattened_map {
         122  +
        /* QuerySerializerGenerator.kt:331 */
   63    123   
        let mut map_27 = scope_25.start_map(true, "key", "value");
         124  +
        /* QuerySerializerGenerator.kt:332 */
   64    125   
        for (key_28, value_29) in var_26 {
         126  +
            /* RustType.kt:516 */
   65    127   
            #[allow(unused_mut)]
         128  +
            /* QuerySerializerGenerator.kt:341 */
   66    129   
            let mut entry_30 = map_27.entry(key_28);
         130  +
            /* SerializerUtil.kt:42 */
   67    131   
            {
         132  +
                /* QuerySerializerGenerator.kt:230 */
   68    133   
                entry_30.string(value_29);
         134  +
                /* SerializerUtil.kt:42 */
   69    135   
            }
         136  +
            /* QuerySerializerGenerator.kt:332 */
   70    137   
        }
         138  +
        /* QuerySerializerGenerator.kt:344 */
   71    139   
        map_27.finish();
         140  +
        /* QuerySerializerGenerator.kt:206 */
   72    141   
    }
         142  +
    /* RustType.kt:516 */
   73    143   
    #[allow(unused_mut)]
         144  +
    /* QuerySerializerGenerator.kt:279 */
   74    145   
    let mut scope_31 = writer.prefix("Hi");
         146  +
    /* QuerySerializerGenerator.kt:206 */
   75    147   
    if let Some(var_32) = &input.flattened_map_with_xml_name {
         148  +
        /* QuerySerializerGenerator.kt:331 */
   76    149   
        let mut map_33 = scope_31.start_map(true, "K", "V");
         150  +
        /* QuerySerializerGenerator.kt:332 */
   77    151   
        for (key_34, value_35) in var_32 {
         152  +
            /* RustType.kt:516 */
   78    153   
            #[allow(unused_mut)]
         154  +
            /* QuerySerializerGenerator.kt:341 */
   79    155   
            let mut entry_36 = map_33.entry(key_34);
         156  +
            /* SerializerUtil.kt:42 */
   80    157   
            {
         158  +
                /* QuerySerializerGenerator.kt:230 */
   81    159   
                entry_36.string(value_35);
         160  +
                /* SerializerUtil.kt:42 */
   82    161   
            }
         162  +
            /* QuerySerializerGenerator.kt:332 */
   83    163   
        }
         164  +
        /* QuerySerializerGenerator.kt:344 */
   84    165   
        map_33.finish();
         166  +
        /* QuerySerializerGenerator.kt:206 */
   85    167   
    }
         168  +
    /* RustType.kt:516 */
   86    169   
    #[allow(unused_mut)]
         170  +
    /* QuerySerializerGenerator.kt:279 */
   87    171   
    let mut scope_37 = writer.prefix("MapOfLists");
         172  +
    /* QuerySerializerGenerator.kt:206 */
   88    173   
    if let Some(var_38) = &input.map_of_lists {
         174  +
        /* QuerySerializerGenerator.kt:331 */
   89    175   
        let mut map_39 = scope_37.start_map(false, "key", "value");
         176  +
        /* QuerySerializerGenerator.kt:332 */
   90    177   
        for (key_40, value_41) in var_38 {
         178  +
            /* RustType.kt:516 */
   91    179   
            #[allow(unused_mut)]
         180  +
            /* QuerySerializerGenerator.kt:341 */
   92    181   
            let mut entry_42 = map_39.entry(key_40);
         182  +
            /* SerializerUtil.kt:42 */
   93    183   
            {
         184  +
                /* QuerySerializerGenerator.kt:305 */
   94    185   
                let mut list_44 = entry_42.start_list(false, None);
         186  +
                /* QuerySerializerGenerator.kt:306 */
   95    187   
                for item_43 in value_41 {
         188  +
                    /* RustType.kt:516 */
   96    189   
                    #[allow(unused_mut)]
         190  +
                    /* QuerySerializerGenerator.kt:309 */
   97    191   
                    let mut entry_45 = list_44.entry();
         192  +
                    /* QuerySerializerGenerator.kt:230 */
   98    193   
                    entry_45.string(item_43);
         194  +
                    /* QuerySerializerGenerator.kt:306 */
   99    195   
                }
         196  +
                /* QuerySerializerGenerator.kt:316 */
  100    197   
                list_44.finish();
         198  +
                /* SerializerUtil.kt:42 */
  101    199   
            }
         200  +
            /* QuerySerializerGenerator.kt:332 */
  102    201   
        }
         202  +
        /* QuerySerializerGenerator.kt:344 */
  103    203   
        map_39.finish();
         204  +
        /* QuerySerializerGenerator.kt:206 */
  104    205   
    }
         206  +
    /* RustType.kt:516 */
  105    207   
    #[allow(unused_mut)]
         208  +
    /* QuerySerializerGenerator.kt:279 */
  106    209   
    let mut scope_46 = writer.prefix("NestedStructWithMap");
         210  +
    /* QuerySerializerGenerator.kt:206 */
  107    211   
    if let Some(var_47) = &input.nested_struct_with_map {
         212  +
        /* QuerySerializerGenerator.kt:187 */
  108    213   
        crate::protocol_serde::shape_nested_struct_with_map::ser_nested_struct_with_map(scope_46, var_47)?;
         214  +
        /* QuerySerializerGenerator.kt:206 */
  109    215   
    }
         216  +
    /* QuerySerializerGenerator.kt:151 */
  110    217   
    writer.finish();
         218  +
    /* QuerySerializerGenerator.kt:152 */
  111    219   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
         220  +
    /* QuerySerializerGenerator.kt:134 */
  112    221   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_timestamps.rs

@@ -1,1 +26,41 @@
    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_query_timestamps_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::query_timestamps::QueryTimestampsOutput, crate::operation::query_timestamps::QueryTimestampsError> {
          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::query_timestamps::QueryTimestampsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::query_timestamps::QueryTimestampsError::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_query_timestamps_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::query_timestamps::QueryTimestampsOutput, crate::operation::query_timestamps::QueryTimestampsError> {
          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::query_timestamps::builders::QueryTimestampsOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_query_timestamps_input.rs

@@ -1,1 +25,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_query_timestamps_input_input_input(
    3      4   
    input: &crate::operation::query_timestamps::QueryTimestampsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "QueryTimestamps", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("normalFormat");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.normal_format {
          18  +
        /* QuerySerializerGenerator.kt:255 */
   11     19   
        scope_1.date_time(var_2, ::aws_smithy_types::date_time::Format::DateTime)?;
          20  +
        /* QuerySerializerGenerator.kt:206 */
   12     21   
    }
          22  +
    /* RustType.kt:516 */
   13     23   
    #[allow(unused_mut)]
          24  +
    /* QuerySerializerGenerator.kt:279 */
   14     25   
    let mut scope_3 = writer.prefix("epochMember");
          26  +
    /* QuerySerializerGenerator.kt:206 */
   15     27   
    if let Some(var_4) = &input.epoch_member {
          28  +
        /* QuerySerializerGenerator.kt:255 */
   16     29   
        scope_3.date_time(var_4, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
          30  +
        /* QuerySerializerGenerator.kt:206 */
   17     31   
    }
          32  +
    /* RustType.kt:516 */
   18     33   
    #[allow(unused_mut)]
          34  +
    /* QuerySerializerGenerator.kt:279 */
   19     35   
    let mut scope_5 = writer.prefix("epochTarget");
          36  +
    /* QuerySerializerGenerator.kt:206 */
   20     37   
    if let Some(var_6) = &input.epoch_target {
          38  +
        /* QuerySerializerGenerator.kt:255 */
   21     39   
        scope_5.date_time(var_6, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
          40  +
        /* QuerySerializerGenerator.kt:206 */
   22     41   
    }
          42  +
    /* QuerySerializerGenerator.kt:151 */
   23     43   
    writer.finish();
          44  +
    /* QuerySerializerGenerator.kt:152 */
   24     45   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          46  +
    /* QuerySerializerGenerator.kt:134 */
   25     47   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_recursive_xml_shapes.rs

@@ -1,1 +81,107 @@
    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_recursive_xml_shapes_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::recursive_xml_shapes::RecursiveXmlShapesOutput,
    9     11   
    crate::operation::recursive_xml_shapes::RecursiveXmlShapesError,
   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::recursive_xml_shapes::RecursiveXmlShapesError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::recursive_xml_shapes::RecursiveXmlShapesError::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_recursive_xml_shapes_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::recursive_xml_shapes::RecursiveXmlShapesOutput,
   25     34   
    crate::operation::recursive_xml_shapes::RecursiveXmlShapesError,
   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::recursive_xml_shapes::builders::RecursiveXmlShapesOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_recursive_xml_shapes::de_recursive_xml_shapes(_response_body, output)
   31     44   
            .map_err(crate::operation::recursive_xml_shapes::RecursiveXmlShapesError::unhandled)?;
          45  +
        /* ClientBuilderInstantiator.kt:56 */
   32     46   
        output.build()
          47  +
        /* ProtocolParserGenerator.kt:77 */
   33     48   
    })
          49  +
    /* ProtocolParserGenerator.kt:71 */
   34     50   
}
   35     51   
          52  +
/* RustType.kt:516 */
   36     53   
#[allow(unused_mut)]
          54  +
/* XmlBindingTraitParserGenerator.kt:189 */
   37     55   
pub fn de_recursive_xml_shapes(
   38     56   
    inp: &[u8],
   39     57   
    mut builder: crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesOutputBuilder,
   40     58   
) -> std::result::Result<crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError>
   41     59   
{
          60  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   42     61   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   43     62   
   44     63   
    #[allow(unused_mut)]
   45     64   
    let mut decoder = doc.root_element()?;
   46     65   
    #[allow(unused_variables)]
   47     66   
    let start_el = decoder.start_el();
          67  +
    /* AwsQueryParserGenerator.kt:38 */
   48     68   
    if !(start_el.matches("RecursiveXmlShapesResponse")) {
   49     69   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   50     70   
            "invalid root, expected RecursiveXmlShapesResponse got {:?}",
   51     71   
            start_el
   52     72   
        )));
   53     73   
    }
   54     74   
    if let Some(mut result_tag) = decoder.next_tag() {
   55     75   
        let start_el = result_tag.start_el();
   56     76   
        if !(start_el.matches("RecursiveXmlShapesResult")) {
   57     77   
            return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   58     78   
                "invalid result, expected RecursiveXmlShapesResult got {:?}",
   59     79   
                start_el
   60     80   
            )));
   61     81   
        }
          82  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   62     83   
        while let Some(mut tag) = result_tag.next_tag() {
          84  +
            /* XmlBindingTraitParserGenerator.kt:353 */
   63     85   
            match tag.start_el() {
   64         -
            s if s.matches("nested") /* nested aws.protocoltests.query.synthetic#RecursiveXmlShapesOutput$nested */ =>  {
   65         -
                let var_1 =
   66         -
                    Some(
   67         -
                        crate::protocol_serde::shape_recursive_xml_shapes_output_nested1::de_recursive_xml_shapes_output_nested1(&mut tag)
   68         -
                        ?
   69         -
                    )
   70         -
                ;
   71         -
                builder = builder.set_nested(var_1);
   72         -
            }
          86  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("nested") /* nested aws.protocoltests.query.synthetic#RecursiveXmlShapesOutput$nested */ =>  {
          87  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          88  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          89  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_recursive_xml_shapes_output_nested1::de_recursive_xml_shapes_output_nested1(&mut tag)
          90  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          91  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          92  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          93  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_1);
          94  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   73     95   
            ,
   74         -
            _ => {}
   75         -
        }
          96  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          97  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          98  +
            /* XmlBindingTraitParserGenerator.kt:352 */
   76     99   
        }
         100  +
    /* AwsQueryParserGenerator.kt:52 */
   77    101   
    } else {
   78    102   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("expected RecursiveXmlShapesResult tag"));
   79    103   
    };
         104  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   80    105   
    Ok(builder)
         106  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   81    107   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_recursive_xml_shapes_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_recursive_xml_shapes_input_input_input(
    3      4   
    input: &crate::operation::recursive_xml_shapes::RecursiveXmlShapesInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "RecursiveXmlShapes", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_recursive_xml_shapes_output_nested1.rs

@@ -1,1 +39,48 @@
    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_recursive_xml_shapes_output_nested1(
    4      6   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    5      7   
) -> ::std::result::Result<crate::types::RecursiveXmlShapesOutputNested1, ::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::RecursiveXmlShapesOutputNested1::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.query#RecursiveXmlShapesOutputNested1$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.query#RecursiveXmlShapesOutputNested1$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         -
            s if s.matches("nested") /* nested aws.protocoltests.query#RecursiveXmlShapesOutputNested1$nested */ =>  {
   24         -
                let var_2 =
   25         -
                    Some(
   26         -
                        Box::new(
   27         -
                            crate::protocol_serde::shape_recursive_xml_shapes_output_nested2::de_recursive_xml_shapes_output_nested2(&mut tag)
   28         -
                            ?
   29         -
                        )
   30         -
                    )
   31         -
                ;
   32         -
                builder = builder.set_nested(var_2);
   33         -
            }
          29  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("nested") /* nested aws.protocoltests.query#RecursiveXmlShapesOutputNested1$nested */ =>  {
          30  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          31  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          32  +
                        /* XmlBindingTraitParserGenerator.kt:373 */Box::new(
          33  +
                            /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_recursive_xml_shapes_output_nested2::de_recursive_xml_shapes_output_nested2(&mut tag)
          34  +
                            /* XmlBindingTraitParserGenerator.kt:402 */?
          35  +
                        /* XmlBindingTraitParserGenerator.kt:373 */)
          36  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          37  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          38  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_2);
          39  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   34     40   
            ,
   35         -
            _ => {}
   36         -
        }
          41  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          42  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          43  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   37     44   
    }
          45  +
    /* XmlBindingTraitParserGenerator.kt:533 */
   38     46   
    Ok(builder.build())
          47  +
    /* XmlBindingTraitParserGenerator.kt:510 */
   39     48   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_recursive_xml_shapes_output_nested2.rs

@@ -1,1 +37,46 @@
    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_recursive_xml_shapes_output_nested2(
    4      6   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    5      7   
) -> ::std::result::Result<crate::types::RecursiveXmlShapesOutputNested2, ::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::RecursiveXmlShapesOutputNested2::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("bar") /* bar aws.protocoltests.query#RecursiveXmlShapesOutputNested2$bar */ =>  {
   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_bar(var_1);
   21         -
            }
          16  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("bar") /* bar aws.protocoltests.query#RecursiveXmlShapesOutputNested2$bar */ =>  {
          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_bar(var_1);
          27  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   22     28   
            ,
   23         -
            s if s.matches("recursiveMember") /* recursiveMember aws.protocoltests.query#RecursiveXmlShapesOutputNested2$recursiveMember */ =>  {
   24         -
                let var_2 =
   25         -
                    Some(
   26         -
                        crate::protocol_serde::shape_recursive_xml_shapes_output_nested1::de_recursive_xml_shapes_output_nested1(&mut tag)
   27         -
                        ?
   28         -
                    )
   29         -
                ;
   30         -
                builder = builder.set_recursive_member(var_2);
   31         -
            }
          29  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("recursiveMember") /* recursiveMember aws.protocoltests.query#RecursiveXmlShapesOutputNested2$recursiveMember */ =>  {
          30  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          31  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          32  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_recursive_xml_shapes_output_nested1::de_recursive_xml_shapes_output_nested1(&mut tag)
          33  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          34  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          35  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          36  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_recursive_member(var_2);
          37  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   32     38   
            ,
   33         -
            _ => {}
   34         -
        }
          39  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          40  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          41  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   35     42   
    }
          43  +
    /* XmlBindingTraitParserGenerator.kt:533 */
   36     44   
    Ok(builder.build())
          45  +
    /* XmlBindingTraitParserGenerator.kt:510 */
   37     46   
}