Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_dense_string_map.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:659 */
    2      3   
pub(crate) fn de_dense_string_map(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, ::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(
    6      7   
        mut map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, ::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError>
    9     10   
    {
   10     11   
        let key = decoder.string()?;
   11     12   
        let value = match decoder.datatype()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_dense_struct_map.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:659 */
    2      3   
pub(crate) fn de_dense_struct_map(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>,
    6      7   
    ::aws_smithy_cbor::decode::DeserializeError,
    7      8   
> {
    8      9   
    fn pair(
    9     10   
        mut map: ::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>,
   10     11   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   11     12   
    ) -> ::std::result::Result<

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_empty_input_output.rs

@@ -1,1 +37,60 @@
    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_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::empty_input_output::EmptyInputOutputOutput, crate::operation::empty_input_output::EmptyInputOutputError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::empty_input_output::EmptyInputOutputError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::empty_input_output::EmptyInputOutputError::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_empty_input_output_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::empty_input_output::EmptyInputOutputOutput, crate::operation::empty_input_output::EmptyInputOutputError> {
          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::empty_input_output::builders::EmptyInputOutputOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}
   27     42   
          43  +
/* CborSerializerGenerator.kt:285 */
   28     44   
pub fn ser_empty_input_output_input(
   29     45   
    input: &crate::operation::empty_input_output::EmptyInputOutputInput,
   30     46   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* CborSerializerGenerator.kt:289 */
   31     48   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          49  +
    /* CborSerializerGenerator.kt:292 */
   32     50   
    {
          51  +
        /* CborSerializerGenerator.kt:293 */
   33     52   
        let encoder = &mut encoder;
          53  +
        /* CborSerializerGenerator.kt:403 */
   34     54   
        crate::protocol_serde::shape_empty_input_output_input::ser_empty_input_output_input_input(encoder, input)?;
          55  +
        /* CborSerializerGenerator.kt:292 */
   35     56   
    }
          57  +
    /* CborSerializerGenerator.kt:296 */
   36     58   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
          59  +
    /* CborSerializerGenerator.kt:285 */
   37     60   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_empty_input_output_input.rs

@@ -1,1 +9,14 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_empty_input_output_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::empty_input_output::EmptyInputOutputInput,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* CborSerializerGenerator.kt:377 */
    6      8   
    encoder.begin_map();
           9  +
    /* CborSerializerGenerator.kt:393 */
    7     10   
    encoder.end();
          11  +
    /* CborSerializerGenerator.kt:394 */
    8     12   
    Ok(())
          13  +
    /* CborSerializerGenerator.kt:369 */
    9     14   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_float16.rs

@@ -1,1 +59,76 @@
    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_float16_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::float16::Float16Output, crate::operation::float16::Float16Error> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::float16::Float16Error::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::float16::Float16Error::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_float16_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::float16::Float16Output, crate::operation::float16::Float16Error> {
          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::float16::builders::Float16OutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output =
   25     38   
            crate::protocol_serde::shape_float16::de_float16(_response_body, output).map_err(crate::operation::float16::Float16Error::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* CborParserGenerator.kt:482 */
   30     47   
pub(crate) fn de_float16(
   31     48   
    value: &[u8],
   32     49   
    mut builder: crate::operation::float16::builders::Float16OutputBuilder,
   33     50   
) -> ::std::result::Result<crate::operation::float16::builders::Float16OutputBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   34     51   
    #[allow(clippy::match_single_binding)]
   35     52   
    fn pair(
   36     53   
        mut builder: crate::operation::float16::builders::Float16OutputBuilder,
   37     54   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   38     55   
    ) -> ::std::result::Result<crate::operation::float16::builders::Float16OutputBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   39     56   
        builder = match decoder.str()?.as_ref() {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_foo_enum_list.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:616 */
    2      3   
pub(crate) fn de_foo_enum_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<crate::types::FooEnum>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<crate::types::FooEnum>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::FooEnum>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let value = match decoder.datatype()? {
   10     11   
            ::aws_smithy_cbor::data::Type::Null => {
   11     12   
                decoder.null()?;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_fractional_seconds.rs

@@ -1,1 +61,78 @@
    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_fractional_seconds_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::fractional_seconds::FractionalSecondsOutput, crate::operation::fractional_seconds::FractionalSecondsError>
    8     10   
{
          11  +
    /* RustType.kt:516 */
    9     12   
    #[allow(unused_mut)]
          13  +
    /* ProtocolParserGenerator.kt:106 */
   10     14   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   11     15   
        .map_err(crate::operation::fractional_seconds::FractionalSecondsError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::fractional_seconds::FractionalSecondsError::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_fractional_seconds_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::fractional_seconds::FractionalSecondsOutput, crate::operation::fractional_seconds::FractionalSecondsError>
   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::fractional_seconds::builders::FractionalSecondsOutputBuilder::default();
          38  +
        /* ProtocolParserGenerator.kt:247 */
   26     39   
        output = crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds(_response_body, output)
   27     40   
            .map_err(crate::operation::fractional_seconds::FractionalSecondsError::unhandled)?;
          41  +
        /* ClientBuilderInstantiator.kt:56 */
   28     42   
        output.build()
          43  +
        /* ProtocolParserGenerator.kt:77 */
   29     44   
    })
          45  +
    /* ProtocolParserGenerator.kt:71 */
   30     46   
}
   31     47   
          48  +
/* CborParserGenerator.kt:482 */
   32     49   
pub(crate) fn de_fractional_seconds(
   33     50   
    value: &[u8],
   34     51   
    mut builder: crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder,
   35     52   
) -> ::std::result::Result<crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder, ::aws_smithy_cbor::decode::DeserializeError>
   36     53   
{
   37     54   
    #[allow(clippy::match_single_binding)]
   38     55   
    fn pair(
   39     56   
        mut builder: crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder,
   40     57   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   41     58   
    ) -> ::std::result::Result<

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_greeting_struct.rs

@@ -1,1 +56,71 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_greeting_struct(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::types::GreetingStruct,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* CborSerializerGenerator.kt:377 */
    6      8   
    encoder.begin_map();
           9  +
    /* CborSerializerGenerator.kt:414 */
    7     10   
    if let Some(var_1) = &input.hi {
          11  +
        /* CborSerializerGenerator.kt:462 */
    8     12   
        encoder.str("hi").str(var_1.as_str());
          13  +
        /* CborSerializerGenerator.kt:414 */
    9     14   
    }
          15  +
    /* CborSerializerGenerator.kt:393 */
   10     16   
    encoder.end();
          17  +
    /* CborSerializerGenerator.kt:394 */
   11     18   
    Ok(())
          19  +
    /* CborSerializerGenerator.kt:369 */
   12     20   
}
   13     21   
          22  +
/* CborParserGenerator.kt:692 */
   14     23   
pub(crate) fn de_greeting_struct(
   15     24   
    decoder: &mut ::aws_smithy_cbor::Decoder,
   16     25   
) -> ::std::result::Result<crate::types::GreetingStruct, ::aws_smithy_cbor::decode::DeserializeError> {
          26  +
    /* CborParserGenerator.kt:700 */
   17     27   
    #[allow(clippy::match_single_binding)]
   18     28   
    fn pair(
   19     29   
        mut builder: crate::types::builders::GreetingStructBuilder,
   20     30   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   21     31   
    ) -> ::std::result::Result<crate::types::builders::GreetingStructBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   22     32   
        builder = match decoder.str()?.as_ref() {
   23     33   
            "hi" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| Ok(builder.set_hi(Some(decoder.string()?))))?,
   24     34   
            _ => {
   25     35   
                decoder.skip()?;
   26     36   
                builder
   27     37   
            }
   28     38   
        };
   29     39   
        Ok(builder)
   30     40   
    }
   31     41   
   32     42   
    let mut builder = crate::types::builders::GreetingStructBuilder::default();
   33     43   
   34     44   
    match decoder.map()? {
   35     45   
        None => loop {
   36     46   
            match decoder.datatype()? {
   37     47   
                ::aws_smithy_cbor::data::Type::Break => {
   38     48   
                    decoder.skip()?;
   39     49   
                    break;
   40     50   
                }
   41     51   
                _ => {
   42     52   
                    builder = pair(builder, decoder)?;
   43     53   
                }
   44     54   
            };
   45     55   
        },
   46     56   
        Some(n) => {
   47     57   
            for _ in 0..n {
   48     58   
                builder = pair(builder, decoder)?;
   49     59   
            }
   50     60   
        }
   51     61   
    };
          62  +
    /* CborParserGenerator.kt:726 */
   52     63   
    #[allow(clippy::needless_question_mark)]
          64  +
    /* CborParserGenerator.kt:727 */
   53     65   
    {
          66  +
        /* CborParserGenerator.kt:728 */
   54     67   
        return Ok(builder.build());
          68  +
        /* CborParserGenerator.kt:727 */
   55     69   
    }
          70  +
    /* CborParserGenerator.kt:692 */
   56     71   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_greeting_with_errors.rs

@@ -1,1 +103,134 @@
    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_greeting_with_errors_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::greeting_with_errors::GreetingWithErrorsOutput,
    9     11   
    crate::operation::greeting_with_errors::GreetingWithErrorsError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:122 */
   15     21   
    let error_code = match generic.code() {
   16     22   
        Some(code) => code,
   17     23   
        None => return Err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled(generic)),
   18     24   
    };
   19     25   
   20     26   
    let _error_message = generic.message().map(|msg| msg.to_owned());
          27  +
    /* ProtocolParserGenerator.kt:133 */
   21     28   
    Err(match error_code {
          29  +
        /* ProtocolParserGenerator.kt:139 */
   22     30   
        "InvalidGreeting" => crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting({
          31  +
            /* RustType.kt:516 */
   23     32   
            #[allow(unused_mut)]
   24         -
            let mut tmp = {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut output = crate::types::error::builders::InvalidGreetingBuilder::default();
   27         -
                output = crate::protocol_serde::shape_invalid_greeting::de_invalid_greeting_cbor_err(_response_body, output)
   28         -
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                output.build()
   31         -
            };
          33  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          34  +
                /* ProtocolParserGenerator.kt:146 */ {
          35  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          36  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::InvalidGreetingBuilder::default();
          37  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_invalid_greeting::de_invalid_greeting_cbor_err(_response_body, output).map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          38  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          39  +
                    /* ClientBuilderInstantiator.kt:56 */output.build()
          40  +
                /* ProtocolParserGenerator.kt:146 */}
          41  +
            /* ProtocolParserGenerator.kt:145 */;
          42  +
            /* ProtocolParserGenerator.kt:170 */
   32     43   
            if tmp.message.is_none() {
   33     44   
                tmp.message = _error_message;
   34     45   
            }
          46  +
            /* ProtocolParserGenerator.kt:179 */
   35     47   
            tmp
          48  +
            /* ProtocolParserGenerator.kt:139 */
   36     49   
        }),
          50  +
        /* ProtocolParserGenerator.kt:139 */
   37     51   
        "ComplexError" => crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError({
          52  +
            /* RustType.kt:516 */
   38     53   
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::ComplexErrorBuilder::default();
   42         -
                output = crate::protocol_serde::shape_complex_error::de_complex_error_cbor_err(_response_body, output)
   43         -
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                output.build()
   46         -
            };
          54  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          55  +
                /* ProtocolParserGenerator.kt:146 */ {
          56  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          57  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ComplexErrorBuilder::default();
          58  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_complex_error::de_complex_error_cbor_err(_response_body, output).map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          59  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          60  +
                    /* ClientBuilderInstantiator.kt:56 */output.build()
          61  +
                /* ProtocolParserGenerator.kt:146 */}
          62  +
            /* ProtocolParserGenerator.kt:145 */;
          63  +
            /* ProtocolParserGenerator.kt:170 */
   47     64   
            if tmp.message.is_none() {
   48     65   
                tmp.message = _error_message;
   49     66   
            }
          67  +
            /* ProtocolParserGenerator.kt:179 */
   50     68   
            tmp
          69  +
            /* ProtocolParserGenerator.kt:139 */
   51     70   
        }),
   52         -
        _ => crate::operation::greeting_with_errors::GreetingWithErrorsError::generic(generic),
          71  +
        /* ProtocolParserGenerator.kt:182 */
          72  +
        _ => crate::operation::greeting_with_errors::GreetingWithErrorsError::generic(generic), /* ProtocolParserGenerator.kt:133 */
   53     73   
    })
          74  +
    /* ProtocolParserGenerator.kt:99 */
   54     75   
}
   55     76   
          77  +
/* RustType.kt:516 */
   56     78   
#[allow(clippy::unnecessary_wraps)]
          79  +
/* ProtocolParserGenerator.kt:71 */
   57     80   
pub fn de_greeting_with_errors_http_response(
   58     81   
    _response_status: u16,
   59     82   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   60     83   
    _response_body: &[u8],
   61     84   
) -> std::result::Result<
   62     85   
    crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
   63     86   
    crate::operation::greeting_with_errors::GreetingWithErrorsError,
   64     87   
> {
          88  +
    /* ProtocolParserGenerator.kt:77 */
   65     89   
    Ok({
          90  +
        /* RustType.kt:516 */
   66     91   
        #[allow(unused_mut)]
          92  +
        /* ProtocolParserGenerator.kt:240 */
   67     93   
        let mut output = crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder::default();
          94  +
        /* ProtocolParserGenerator.kt:247 */
   68     95   
        output = crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors(_response_body, output)
   69     96   
            .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          97  +
        /* ClientBuilderInstantiator.kt:56 */
   70     98   
        output.build()
          99  +
        /* ProtocolParserGenerator.kt:77 */
   71    100   
    })
         101  +
    /* ProtocolParserGenerator.kt:71 */
   72    102   
}
   73    103   
         104  +
/* CborParserGenerator.kt:482 */
   74    105   
pub(crate) fn de_greeting_with_errors(
   75    106   
    value: &[u8],
   76    107   
    mut builder: crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder,
   77    108   
) -> ::std::result::Result<
   78    109   
    crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder,
   79    110   
    ::aws_smithy_cbor::decode::DeserializeError,
   80    111   
> {
   81    112   
    #[allow(clippy::match_single_binding)]
   82    113   
    fn pair(
   83    114   
        mut builder: crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_integer_enum_list.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:616 */
    2      3   
pub(crate) fn de_integer_enum_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<i32>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let value = match decoder.datatype()? {
   10     11   
            ::aws_smithy_cbor::data::Type::Null => {
   11     12   
                decoder.null()?;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_integer_list.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:616 */
    2      3   
pub(crate) fn de_integer_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<i32>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let value = match decoder.datatype()? {
   10     11   
            ::aws_smithy_cbor::data::Type::Null => {
   11     12   
                decoder.null()?;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_invalid_greeting.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:482 */
    2      3   
pub(crate) fn de_invalid_greeting_cbor_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::InvalidGreetingBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::InvalidGreetingBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
    6      7   
    #[allow(clippy::match_single_binding)]
    7      8   
    fn pair(
    8      9   
        mut builder: crate::types::error::builders::InvalidGreetingBuilder,
    9     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   10     11   
    ) -> ::std::result::Result<crate::types::error::builders::InvalidGreetingBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   11     12   
        builder = match decoder.str()?.as_ref() {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_nested_string_list.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:616 */
    2      3   
pub(crate) fn de_nested_string_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<::std::vec::Vec<::std::string::String>>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<::std::vec::Vec<::std::string::String>>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<::std::vec::Vec<::std::string::String>>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let value = match decoder.datatype()? {
   10     11   
            ::aws_smithy_cbor::data::Type::Null => {
   11     12   
                decoder.null()?;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_no_input_output.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_no_input_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_output::NoInputOutputOutput, crate::operation::no_input_output::NoInputOutputError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::no_input_output::NoInputOutputError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::no_input_output::NoInputOutputError::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_no_input_output_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::no_input_output::NoInputOutputOutput, crate::operation::no_input_output::NoInputOutputError> {
          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::no_input_output::builders::NoInputOutputOutputBuilder::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/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_operation_with_defaults.rs

@@ -1,1 +98,128 @@
    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_operation_with_defaults_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::operation_with_defaults::OperationWithDefaultsOutput,
    9     11   
    crate::operation::operation_with_defaults::OperationWithDefaultsError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:122 */
   15     21   
    let error_code = match generic.code() {
   16     22   
        Some(code) => code,
   17     23   
        None => return Err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled(generic)),
   18     24   
    };
   19     25   
   20     26   
    let _error_message = generic.message().map(|msg| msg.to_owned());
          27  +
    /* ProtocolParserGenerator.kt:133 */
   21     28   
    Err(match error_code {
          29  +
        /* ProtocolParserGenerator.kt:139 */
   22     30   
        "ValidationException" => crate::operation::operation_with_defaults::OperationWithDefaultsError::ValidationError({
          31  +
            /* RustType.kt:516 */
   23     32   
            #[allow(unused_mut)]
   24         -
            let mut tmp = {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
   27         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_cbor_err(_response_body, output)
   28         -
                    .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                crate::serde_util::validation_exception_correct_errors(output)
   31         -
                    .build()
   32         -
                    .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?
   33         -
            };
          33  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          34  +
                /* ProtocolParserGenerator.kt:146 */ {
          35  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          36  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
          37  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_validation_exception::de_validation_exception_cbor_err(_response_body, output).map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
          38  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          39  +
                    /* ClientBuilderInstantiator.kt:46 */crate::serde_util::validation_exception_correct_errors(output).build().map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?
          40  +
                /* ProtocolParserGenerator.kt:146 */}
          41  +
            /* ProtocolParserGenerator.kt:145 */;
          42  +
            /* ProtocolParserGenerator.kt:179 */
   34     43   
            tmp
          44  +
            /* ProtocolParserGenerator.kt:139 */
   35     45   
        }),
   36         -
        _ => crate::operation::operation_with_defaults::OperationWithDefaultsError::generic(generic),
          46  +
        /* ProtocolParserGenerator.kt:182 */
          47  +
        _ => crate::operation::operation_with_defaults::OperationWithDefaultsError::generic(generic), /* ProtocolParserGenerator.kt:133 */
   37     48   
    })
          49  +
    /* ProtocolParserGenerator.kt:99 */
   38     50   
}
   39     51   
          52  +
/* RustType.kt:516 */
   40     53   
#[allow(clippy::unnecessary_wraps)]
          54  +
/* ProtocolParserGenerator.kt:71 */
   41     55   
pub fn de_operation_with_defaults_http_response(
   42     56   
    _response_status: u16,
   43     57   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   44     58   
    _response_body: &[u8],
   45     59   
) -> std::result::Result<
   46     60   
    crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   47     61   
    crate::operation::operation_with_defaults::OperationWithDefaultsError,
   48     62   
> {
          63  +
    /* ProtocolParserGenerator.kt:77 */
   49     64   
    Ok({
          65  +
        /* RustType.kt:516 */
   50     66   
        #[allow(unused_mut)]
          67  +
        /* ProtocolParserGenerator.kt:240 */
   51     68   
        let mut output = crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder::default();
          69  +
        /* ProtocolParserGenerator.kt:247 */
   52     70   
        output = crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults(_response_body, output)
   53     71   
            .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
          72  +
        /* ClientBuilderInstantiator.kt:56 */
   54     73   
        output.build()
          74  +
        /* ProtocolParserGenerator.kt:77 */
   55     75   
    })
          76  +
    /* ProtocolParserGenerator.kt:71 */
   56     77   
}
   57     78   
          79  +
/* CborSerializerGenerator.kt:285 */
   58     80   
pub fn ser_operation_with_defaults_input(
   59     81   
    input: &crate::operation::operation_with_defaults::OperationWithDefaultsInput,
   60     82   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          83  +
    /* CborSerializerGenerator.kt:289 */
   61     84   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          85  +
    /* CborSerializerGenerator.kt:292 */
   62     86   
    {
          87  +
        /* CborSerializerGenerator.kt:293 */
   63     88   
        let encoder = &mut encoder;
          89  +
        /* CborSerializerGenerator.kt:403 */
   64     90   
        crate::protocol_serde::shape_operation_with_defaults_input::ser_operation_with_defaults_input_input(encoder, input)?;
          91  +
        /* CborSerializerGenerator.kt:292 */
   65     92   
    }
          93  +
    /* CborSerializerGenerator.kt:296 */
   66     94   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
          95  +
    /* CborSerializerGenerator.kt:285 */
   67     96   
}
   68     97   
          98  +
/* CborParserGenerator.kt:482 */
   69     99   
pub(crate) fn de_operation_with_defaults(
   70    100   
    value: &[u8],
   71    101   
    mut builder: crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder,
   72    102   
) -> ::std::result::Result<
   73    103   
    crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder,
   74    104   
    ::aws_smithy_cbor::decode::DeserializeError,
   75    105   
> {
   76    106   
    #[allow(clippy::match_single_binding)]
   77    107   
    fn pair(
   78    108   
        mut builder: crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_operation_with_defaults_input.rs

@@ -1,1 +23,42 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_operation_with_defaults_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::operation_with_defaults::OperationWithDefaultsInput,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* CborSerializerGenerator.kt:377 */
    6      8   
    encoder.begin_map();
           9  +
    /* CborSerializerGenerator.kt:414 */
    7     10   
    if let Some(var_1) = &input.defaults {
          11  +
        /* CborSerializerGenerator.kt:486 */
    8     12   
        encoder.str("defaults");
          13  +
        /* CborSerializerGenerator.kt:403 */
    9     14   
        crate::protocol_serde::shape_defaults::ser_defaults(encoder, var_1)?;
          15  +
        /* CborSerializerGenerator.kt:414 */
   10     16   
    }
          17  +
    /* CborSerializerGenerator.kt:414 */
   11     18   
    if let Some(var_2) = &input.client_optional_defaults {
          19  +
        /* CborSerializerGenerator.kt:486 */
   12     20   
        encoder.str("clientOptionalDefaults");
          21  +
        /* CborSerializerGenerator.kt:403 */
   13     22   
        crate::protocol_serde::shape_client_optional_defaults::ser_client_optional_defaults(encoder, var_2)?;
          23  +
        /* CborSerializerGenerator.kt:414 */
   14     24   
    }
          25  +
    /* CborSerializerGenerator.kt:414 */
   15     26   
    if let Some(var_3) = &input.top_level_default {
          27  +
        /* CborSerializerGenerator.kt:462 */
   16     28   
        encoder.str("topLevelDefault").str(var_3.as_str());
          29  +
        /* CborSerializerGenerator.kt:414 */
   17     30   
    }
          31  +
    /* CborSerializerGenerator.kt:414 */
   18     32   
    if let Some(var_4) = &input.other_top_level_default {
          33  +
        /* CborSerializerGenerator.kt:466 */
   19     34   
        encoder.str("otherTopLevelDefault").integer(*var_4);
          35  +
        /* CborSerializerGenerator.kt:414 */
   20     36   
    }
          37  +
    /* CborSerializerGenerator.kt:393 */
   21     38   
    encoder.end();
          39  +
    /* CborSerializerGenerator.kt:394 */
   22     40   
    Ok(())
          41  +
    /* CborSerializerGenerator.kt:369 */
   23     42   
}