Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_empty_struct_operation_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_struct_operation_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::empty_struct_operation::EmptyStructOperationInput,
    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_extras/rust-client-codegen/src/protocol_serde/shape_error_serialization_operation.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_error_serialization_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::error_serialization_operation::ErrorSerializationOperationOutput,
    9     11   
    crate::operation::error_serialization_operation::ErrorSerializationOperationError,
   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::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                crate::serde_util::validation_exception_correct_errors(output)
   31         -
                    .build()
   32         -
                    .map_err(crate::operation::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::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::error_serialization_operation::ErrorSerializationOperationError::generic(generic),
          46  +
        /* ProtocolParserGenerator.kt:182 */
          47  +
        _ => crate::operation::error_serialization_operation::ErrorSerializationOperationError::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_error_serialization_operation_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::error_serialization_operation::ErrorSerializationOperationOutput,
   47     61   
    crate::operation::error_serialization_operation::ErrorSerializationOperationError,
   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::error_serialization_operation::builders::ErrorSerializationOperationOutputBuilder::default();
          69  +
        /* ProtocolParserGenerator.kt:247 */
   52     70   
        output = crate::protocol_serde::shape_error_serialization_operation::de_error_serialization_operation(_response_body, output)
   53     71   
            .map_err(crate::operation::error_serialization_operation::ErrorSerializationOperationError::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_error_serialization_operation_input(
   59     81   
    input: &crate::operation::error_serialization_operation::ErrorSerializationOperationInput,
   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_error_serialization_operation_input::ser_error_serialization_operation_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_error_serialization_operation(
   70    100   
    value: &[u8],
   71    101   
    mut builder: crate::operation::error_serialization_operation::builders::ErrorSerializationOperationOutputBuilder,
   72    102   
) -> ::std::result::Result<
   73    103   
    crate::operation::error_serialization_operation::builders::ErrorSerializationOperationOutputBuilder,
   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::error_serialization_operation::builders::ErrorSerializationOperationOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_error_serialization_operation_input.rs

@@ -1,1 +75,146 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_error_serialization_operation_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::error_serialization_operation::ErrorSerializationOperationInput,
    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.blob {
          11  +
        /* CborSerializerGenerator.kt:459 */
    8     12   
        encoder.str("blob").blob(var_1);
          13  +
        /* CborSerializerGenerator.kt:414 */
    9     14   
    }
          15  +
    /* CborSerializerGenerator.kt:414 */
   10     16   
    if let Some(var_2) = &input.boolean {
          17  +
        /* CborSerializerGenerator.kt:460 */
   11     18   
        encoder.str("boolean").boolean(*var_2);
          19  +
        /* CborSerializerGenerator.kt:414 */
   12     20   
    }
          21  +
    /* CborSerializerGenerator.kt:414 */
   13     22   
    if let Some(var_3) = &input.string {
          23  +
        /* CborSerializerGenerator.kt:462 */
   14     24   
        encoder.str("string").str(var_3.as_str());
          25  +
        /* CborSerializerGenerator.kt:414 */
   15     26   
    }
          27  +
    /* CborSerializerGenerator.kt:414 */
   16     28   
    if let Some(var_4) = &input.byte {
          29  +
        /* CborSerializerGenerator.kt:464 */
   17     30   
        encoder.str("byte").byte(*var_4);
          31  +
        /* CborSerializerGenerator.kt:414 */
   18     32   
    }
          33  +
    /* CborSerializerGenerator.kt:414 */
   19     34   
    if let Some(var_5) = &input.short {
          35  +
        /* CborSerializerGenerator.kt:465 */
   20     36   
        encoder.str("short").short(*var_5);
          37  +
        /* CborSerializerGenerator.kt:414 */
   21     38   
    }
          39  +
    /* CborSerializerGenerator.kt:414 */
   22     40   
    if let Some(var_6) = &input.integer {
          41  +
        /* CborSerializerGenerator.kt:466 */
   23     42   
        encoder.str("integer").integer(*var_6);
          43  +
        /* CborSerializerGenerator.kt:414 */
   24     44   
    }
          45  +
    /* CborSerializerGenerator.kt:414 */
   25     46   
    if let Some(var_7) = &input.long {
          47  +
        /* CborSerializerGenerator.kt:467 */
   26     48   
        encoder.str("long").long(*var_7);
          49  +
        /* CborSerializerGenerator.kt:414 */
   27     50   
    }
          51  +
    /* CborSerializerGenerator.kt:414 */
   28     52   
    if let Some(var_8) = &input.float {
          53  +
        /* CborSerializerGenerator.kt:469 */
   29     54   
        encoder.str("float").float(*var_8);
          55  +
        /* CborSerializerGenerator.kt:414 */
   30     56   
    }
          57  +
    /* CborSerializerGenerator.kt:414 */
   31     58   
    if let Some(var_9) = &input.double {
          59  +
        /* CborSerializerGenerator.kt:470 */
   32     60   
        encoder.str("double").double(*var_9);
          61  +
        /* CborSerializerGenerator.kt:414 */
   33     62   
    }
          63  +
    /* CborSerializerGenerator.kt:414 */
   34     64   
    if let Some(var_10) = &input.timestamp {
          65  +
        /* CborSerializerGenerator.kt:472 */
   35     66   
        encoder.str("timestamp").timestamp(var_10);
          67  +
        /* CborSerializerGenerator.kt:414 */
   36     68   
    }
          69  +
    /* CborSerializerGenerator.kt:414 */
   37     70   
    if let Some(var_11) = &input.r#enum {
          71  +
        /* CborSerializerGenerator.kt:462 */
   38     72   
        encoder.str("enum").str(var_11.as_str());
          73  +
        /* CborSerializerGenerator.kt:414 */
   39     74   
    }
          75  +
    /* CborSerializerGenerator.kt:414 */
   40     76   
    if let Some(var_12) = &input.required_blob {
          77  +
        /* CborSerializerGenerator.kt:459 */
   41     78   
        encoder.str("requiredBlob").blob(var_12);
          79  +
        /* CborSerializerGenerator.kt:414 */
   42     80   
    }
          81  +
    /* CborSerializerGenerator.kt:414 */
   43     82   
    if let Some(var_13) = &input.required_boolean {
          83  +
        /* CborSerializerGenerator.kt:460 */
   44     84   
        encoder.str("requiredBoolean").boolean(*var_13);
          85  +
        /* CborSerializerGenerator.kt:414 */
   45     86   
    }
          87  +
    /* CborSerializerGenerator.kt:414 */
   46     88   
    if let Some(var_14) = &input.required_string {
          89  +
        /* CborSerializerGenerator.kt:462 */
   47     90   
        encoder.str("requiredString").str(var_14.as_str());
          91  +
        /* CborSerializerGenerator.kt:414 */
   48     92   
    }
          93  +
    /* CborSerializerGenerator.kt:414 */
   49     94   
    if let Some(var_15) = &input.required_byte {
          95  +
        /* CborSerializerGenerator.kt:464 */
   50     96   
        encoder.str("requiredByte").byte(*var_15);
          97  +
        /* CborSerializerGenerator.kt:414 */
   51     98   
    }
          99  +
    /* CborSerializerGenerator.kt:414 */
   52    100   
    if let Some(var_16) = &input.required_short {
         101  +
        /* CborSerializerGenerator.kt:465 */
   53    102   
        encoder.str("requiredShort").short(*var_16);
         103  +
        /* CborSerializerGenerator.kt:414 */
   54    104   
    }
         105  +
    /* CborSerializerGenerator.kt:414 */
   55    106   
    if let Some(var_17) = &input.required_integer {
         107  +
        /* CborSerializerGenerator.kt:466 */
   56    108   
        encoder.str("requiredInteger").integer(*var_17);
         109  +
        /* CborSerializerGenerator.kt:414 */
   57    110   
    }
         111  +
    /* CborSerializerGenerator.kt:414 */
   58    112   
    if let Some(var_18) = &input.required_long {
         113  +
        /* CborSerializerGenerator.kt:467 */
   59    114   
        encoder.str("requiredLong").long(*var_18);
         115  +
        /* CborSerializerGenerator.kt:414 */
   60    116   
    }
         117  +
    /* CborSerializerGenerator.kt:414 */
   61    118   
    if let Some(var_19) = &input.required_float {
         119  +
        /* CborSerializerGenerator.kt:469 */
   62    120   
        encoder.str("requiredFloat").float(*var_19);
         121  +
        /* CborSerializerGenerator.kt:414 */
   63    122   
    }
         123  +
    /* CborSerializerGenerator.kt:414 */
   64    124   
    if let Some(var_20) = &input.required_double {
         125  +
        /* CborSerializerGenerator.kt:470 */
   65    126   
        encoder.str("requiredDouble").double(*var_20);
         127  +
        /* CborSerializerGenerator.kt:414 */
   66    128   
    }
         129  +
    /* CborSerializerGenerator.kt:414 */
   67    130   
    if let Some(var_21) = &input.required_timestamp {
         131  +
        /* CborSerializerGenerator.kt:472 */
   68    132   
        encoder.str("requiredTimestamp").timestamp(var_21);
         133  +
        /* CborSerializerGenerator.kt:414 */
   69    134   
    }
         135  +
    /* CborSerializerGenerator.kt:414 */
   70    136   
    if let Some(var_22) = &input.required_enum {
         137  +
        /* CborSerializerGenerator.kt:462 */
   71    138   
        encoder.str("requiredEnum").str(var_22.as_str());
         139  +
        /* CborSerializerGenerator.kt:414 */
   72    140   
    }
         141  +
    /* CborSerializerGenerator.kt:393 */
   73    142   
    encoder.end();
         143  +
    /* CborSerializerGenerator.kt:394 */
   74    144   
    Ok(())
         145  +
    /* CborSerializerGenerator.kt:369 */
   75    146   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_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_simple_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<::std::string::String>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::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_extras/rust-client-codegen/src/protocol_serde/shape_simple_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_simple_map(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(
    6      7   
        mut map: ::std::collections::HashMap<::std::string::String, i32>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let key = decoder.string()?;
   10     11   
        let value = match decoder.datatype()? {
   11     12   
            ::aws_smithy_cbor::data::Type::Null => {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_struct.rs

@@ -1,1 +34,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:692 */
    2      3   
pub(crate) fn de_simple_struct(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::SimpleStruct, ::aws_smithy_cbor::decode::DeserializeError> {
           6  +
    /* CborParserGenerator.kt:700 */
    5      7   
    #[allow(clippy::match_single_binding)]
    6      8   
    fn pair(
    7      9   
        mut builder: crate::types::builders::SimpleStructBuilder,
    8     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9     11   
    ) -> ::std::result::Result<crate::types::builders::SimpleStructBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   10     12   
        builder = match decoder.str()?.as_ref() {
   11     13   
            "blob" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| Ok(builder.set_blob(Some(decoder.blob()?))))?,
   12     14   
            "boolean" => {
   13     15   
                ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| Ok(builder.set_boolean(Some(decoder.boolean()?))))?
   14     16   
            }
@@ -43,45 +154,232 @@
   63     65   
                    builder = pair(builder, decoder)?;
   64     66   
                }
   65     67   
            };
   66     68   
        },
   67     69   
        Some(n) => {
   68     70   
            for _ in 0..n {
   69     71   
                builder = pair(builder, decoder)?;
   70     72   
            }
   71     73   
        }
   72     74   
    };
          75  +
    /* CborParserGenerator.kt:726 */
   73     76   
    #[allow(clippy::needless_question_mark)]
          77  +
    /* CborParserGenerator.kt:727 */
   74     78   
    {
          79  +
        /* CborParserGenerator.kt:728 */
   75     80   
        return Ok(crate::serde_util::simple_struct_correct_errors(builder)
   76     81   
            .build()
   77     82   
            .map_err(|err| ::aws_smithy_cbor::decode::DeserializeError::custom(err.to_string(), decoder.position()))?);
          83  +
        /* CborParserGenerator.kt:727 */
   78     84   
    }
          85  +
    /* CborParserGenerator.kt:692 */
   79     86   
}
   80     87   
          88  +
/* CborSerializerGenerator.kt:369 */
   81     89   
pub fn ser_simple_struct(
   82     90   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   83     91   
    #[allow(unused)] input: &crate::types::SimpleStruct,
   84     92   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          93  +
    /* CborSerializerGenerator.kt:377 */
   85     94   
    encoder.begin_map();
          95  +
    /* CborSerializerGenerator.kt:414 */
   86     96   
    if let Some(var_1) = &input.blob {
          97  +
        /* CborSerializerGenerator.kt:459 */
   87     98   
        encoder.str("blob").blob(var_1);
          99  +
        /* CborSerializerGenerator.kt:414 */
   88    100   
    }
         101  +
    /* CborSerializerGenerator.kt:414 */
   89    102   
    if let Some(var_2) = &input.boolean {
         103  +
        /* CborSerializerGenerator.kt:460 */
   90    104   
        encoder.str("boolean").boolean(*var_2);
         105  +
        /* CborSerializerGenerator.kt:414 */
   91    106   
    }
         107  +
    /* CborSerializerGenerator.kt:414 */
   92    108   
    if let Some(var_3) = &input.string {
         109  +
        /* CborSerializerGenerator.kt:462 */
   93    110   
        encoder.str("string").str(var_3.as_str());
         111  +
        /* CborSerializerGenerator.kt:414 */
   94    112   
    }
         113  +
    /* CborSerializerGenerator.kt:414 */
   95    114   
    if let Some(var_4) = &input.byte {
         115  +
        /* CborSerializerGenerator.kt:464 */
   96    116   
        encoder.str("byte").byte(*var_4);
         117  +
        /* CborSerializerGenerator.kt:414 */
   97    118   
    }
         119  +
    /* CborSerializerGenerator.kt:414 */
   98    120   
    if let Some(var_5) = &input.short {
         121  +
        /* CborSerializerGenerator.kt:465 */
   99    122   
        encoder.str("short").short(*var_5);
         123  +
        /* CborSerializerGenerator.kt:414 */
  100    124   
    }
         125  +
    /* CborSerializerGenerator.kt:414 */
  101    126   
    if let Some(var_6) = &input.integer {
         127  +
        /* CborSerializerGenerator.kt:466 */
  102    128   
        encoder.str("integer").integer(*var_6);
         129  +
        /* CborSerializerGenerator.kt:414 */
  103    130   
    }
         131  +
    /* CborSerializerGenerator.kt:414 */
  104    132   
    if let Some(var_7) = &input.long {
         133  +
        /* CborSerializerGenerator.kt:467 */
  105    134   
        encoder.str("long").long(*var_7);
         135  +
        /* CborSerializerGenerator.kt:414 */
  106    136   
    }
         137  +
    /* CborSerializerGenerator.kt:414 */
  107    138   
    if let Some(var_8) = &input.float {
         139  +
        /* CborSerializerGenerator.kt:469 */
  108    140   
        encoder.str("float").float(*var_8);
         141  +
        /* CborSerializerGenerator.kt:414 */
  109    142   
    }
         143  +
    /* CborSerializerGenerator.kt:414 */
  110    144   
    if let Some(var_9) = &input.double {
         145  +
        /* CborSerializerGenerator.kt:470 */
  111    146   
        encoder.str("double").double(*var_9);
         147  +
        /* CborSerializerGenerator.kt:414 */
  112    148   
    }
         149  +
    /* CborSerializerGenerator.kt:414 */
  113    150   
    if let Some(var_10) = &input.timestamp {
         151  +
        /* CborSerializerGenerator.kt:472 */
  114    152   
        encoder.str("timestamp").timestamp(var_10);
         153  +
        /* CborSerializerGenerator.kt:414 */
  115    154   
    }
         155  +
    /* CborSerializerGenerator.kt:414 */
  116    156   
    if let Some(var_11) = &input.r#enum {
         157  +
        /* CborSerializerGenerator.kt:462 */
  117    158   
        encoder.str("enum").str(var_11.as_str());
         159  +
        /* CborSerializerGenerator.kt:414 */
  118    160   
    }
         161  +
    /* SerializerUtil.kt:42 */
  119    162   
    {
         163  +
        /* CborSerializerGenerator.kt:459 */
  120    164   
        encoder.str("requiredBlob").blob(&input.required_blob);
         165  +
        /* SerializerUtil.kt:42 */
  121    166   
    }
         167  +
    /* SerializerUtil.kt:42 */
  122    168   
    {
         169  +
        /* CborSerializerGenerator.kt:460 */
  123    170   
        encoder.str("requiredBoolean").boolean(input.required_boolean);
         171  +
        /* SerializerUtil.kt:42 */
  124    172   
    }
         173  +
    /* SerializerUtil.kt:42 */
  125    174   
    {
         175  +
        /* CborSerializerGenerator.kt:462 */
  126    176   
        encoder.str("requiredString").str(input.required_string.as_str());
         177  +
        /* SerializerUtil.kt:42 */
  127    178   
    }
         179  +
    /* SerializerUtil.kt:42 */
  128    180   
    {
         181  +
        /* CborSerializerGenerator.kt:464 */
  129    182   
        encoder.str("requiredByte").byte(input.required_byte);
         183  +
        /* SerializerUtil.kt:42 */
  130    184   
    }
         185  +
    /* SerializerUtil.kt:42 */
  131    186   
    {
         187  +
        /* CborSerializerGenerator.kt:465 */
  132    188   
        encoder.str("requiredShort").short(input.required_short);
         189  +
        /* SerializerUtil.kt:42 */
  133    190   
    }
         191  +
    /* SerializerUtil.kt:42 */
  134    192   
    {
         193  +
        /* CborSerializerGenerator.kt:466 */
  135    194   
        encoder.str("requiredInteger").integer(input.required_integer);
         195  +
        /* SerializerUtil.kt:42 */
  136    196   
    }
         197  +
    /* SerializerUtil.kt:42 */
  137    198   
    {
         199  +
        /* CborSerializerGenerator.kt:467 */
  138    200   
        encoder.str("requiredLong").long(input.required_long);
         201  +
        /* SerializerUtil.kt:42 */
  139    202   
    }
         203  +
    /* SerializerUtil.kt:42 */
  140    204   
    {
         205  +
        /* CborSerializerGenerator.kt:469 */
  141    206   
        encoder.str("requiredFloat").float(input.required_float);
         207  +
        /* SerializerUtil.kt:42 */
  142    208   
    }
         209  +
    /* SerializerUtil.kt:42 */
  143    210   
    {
         211  +
        /* CborSerializerGenerator.kt:470 */
  144    212   
        encoder.str("requiredDouble").double(input.required_double);
         213  +
        /* SerializerUtil.kt:42 */
  145    214   
    }
         215  +
    /* SerializerUtil.kt:42 */
  146    216   
    {
         217  +
        /* CborSerializerGenerator.kt:472 */
  147    218   
        encoder.str("requiredTimestamp").timestamp(&input.required_timestamp);
         219  +
        /* SerializerUtil.kt:42 */
  148    220   
    }
         221  +
    /* SerializerUtil.kt:42 */
  149    222   
    {
         223  +
        /* CborSerializerGenerator.kt:462 */
  150    224   
        encoder.str("requiredEnum").str(input.required_enum.as_str());
         225  +
        /* SerializerUtil.kt:42 */
  151    226   
    }
         227  +
    /* CborSerializerGenerator.kt:393 */
  152    228   
    encoder.end();
         229  +
    /* CborSerializerGenerator.kt:394 */
  153    230   
    Ok(())
         231  +
    /* CborSerializerGenerator.kt:369 */
  154    232   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_struct_operation.rs

@@ -1,1 +100,130 @@
    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_simple_struct_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::simple_struct_operation::SimpleStructOperationOutput,
    9     11   
    crate::operation::simple_struct_operation::SimpleStructOperationError,
   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::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                crate::serde_util::validation_exception_correct_errors(output)
   31         -
                    .build()
   32         -
                    .map_err(crate::operation::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::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::simple_struct_operation::SimpleStructOperationError::generic(generic),
          46  +
        /* ProtocolParserGenerator.kt:182 */
          47  +
        _ => crate::operation::simple_struct_operation::SimpleStructOperationError::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_simple_struct_operation_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::simple_struct_operation::SimpleStructOperationOutput,
   47     61   
    crate::operation::simple_struct_operation::SimpleStructOperationError,
   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::simple_struct_operation::builders::SimpleStructOperationOutputBuilder::default();
          69  +
        /* ProtocolParserGenerator.kt:247 */
   52     70   
        output = crate::protocol_serde::shape_simple_struct_operation::de_simple_struct_operation(_response_body, output)
   53     71   
            .map_err(crate::operation::simple_struct_operation::SimpleStructOperationError::unhandled)?;
          72  +
        /* ClientBuilderInstantiator.kt:46 */
   54     73   
        crate::serde_util::simple_struct_operation_output_output_correct_errors(output)
   55     74   
            .build()
   56     75   
            .map_err(crate::operation::simple_struct_operation::SimpleStructOperationError::unhandled)?
          76  +
        /* ProtocolParserGenerator.kt:77 */
   57     77   
    })
          78  +
    /* ProtocolParserGenerator.kt:71 */
   58     79   
}
   59     80   
          81  +
/* CborSerializerGenerator.kt:285 */
   60     82   
pub fn ser_simple_struct_operation_input(
   61     83   
    input: &crate::operation::simple_struct_operation::SimpleStructOperationInput,
   62     84   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          85  +
    /* CborSerializerGenerator.kt:289 */
   63     86   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          87  +
    /* CborSerializerGenerator.kt:292 */
   64     88   
    {
          89  +
        /* CborSerializerGenerator.kt:293 */
   65     90   
        let encoder = &mut encoder;
          91  +
        /* CborSerializerGenerator.kt:403 */
   66     92   
        crate::protocol_serde::shape_simple_struct_operation_input::ser_simple_struct_operation_input_input(encoder, input)?;
          93  +
        /* CborSerializerGenerator.kt:292 */
   67     94   
    }
          95  +
    /* CborSerializerGenerator.kt:296 */
   68     96   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
          97  +
    /* CborSerializerGenerator.kt:285 */
   69     98   
}
   70     99   
         100  +
/* CborParserGenerator.kt:482 */
   71    101   
pub(crate) fn de_simple_struct_operation(
   72    102   
    value: &[u8],
   73    103   
    mut builder: crate::operation::simple_struct_operation::builders::SimpleStructOperationOutputBuilder,
   74    104   
) -> ::std::result::Result<
   75    105   
    crate::operation::simple_struct_operation::builders::SimpleStructOperationOutputBuilder,
   76    106   
    ::aws_smithy_cbor::decode::DeserializeError,
   77    107   
> {
   78    108   
    #[allow(clippy::match_single_binding)]
   79    109   
    fn pair(
   80    110   
        mut builder: crate::operation::simple_struct_operation::builders::SimpleStructOperationOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_struct_operation_input.rs

@@ -1,1 +75,146 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_simple_struct_operation_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::simple_struct_operation::SimpleStructOperationInput,
    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.blob {
          11  +
        /* CborSerializerGenerator.kt:459 */
    8     12   
        encoder.str("blob").blob(var_1);
          13  +
        /* CborSerializerGenerator.kt:414 */
    9     14   
    }
          15  +
    /* CborSerializerGenerator.kt:414 */
   10     16   
    if let Some(var_2) = &input.boolean {
          17  +
        /* CborSerializerGenerator.kt:460 */
   11     18   
        encoder.str("boolean").boolean(*var_2);
          19  +
        /* CborSerializerGenerator.kt:414 */
   12     20   
    }
          21  +
    /* CborSerializerGenerator.kt:414 */
   13     22   
    if let Some(var_3) = &input.string {
          23  +
        /* CborSerializerGenerator.kt:462 */
   14     24   
        encoder.str("string").str(var_3.as_str());
          25  +
        /* CborSerializerGenerator.kt:414 */
   15     26   
    }
          27  +
    /* CborSerializerGenerator.kt:414 */
   16     28   
    if let Some(var_4) = &input.byte {
          29  +
        /* CborSerializerGenerator.kt:464 */
   17     30   
        encoder.str("byte").byte(*var_4);
          31  +
        /* CborSerializerGenerator.kt:414 */
   18     32   
    }
          33  +
    /* CborSerializerGenerator.kt:414 */
   19     34   
    if let Some(var_5) = &input.short {
          35  +
        /* CborSerializerGenerator.kt:465 */
   20     36   
        encoder.str("short").short(*var_5);
          37  +
        /* CborSerializerGenerator.kt:414 */
   21     38   
    }
          39  +
    /* CborSerializerGenerator.kt:414 */
   22     40   
    if let Some(var_6) = &input.integer {
          41  +
        /* CborSerializerGenerator.kt:466 */
   23     42   
        encoder.str("integer").integer(*var_6);
          43  +
        /* CborSerializerGenerator.kt:414 */
   24     44   
    }
          45  +
    /* CborSerializerGenerator.kt:414 */
   25     46   
    if let Some(var_7) = &input.long {
          47  +
        /* CborSerializerGenerator.kt:467 */
   26     48   
        encoder.str("long").long(*var_7);
          49  +
        /* CborSerializerGenerator.kt:414 */
   27     50   
    }
          51  +
    /* CborSerializerGenerator.kt:414 */
   28     52   
    if let Some(var_8) = &input.float {
          53  +
        /* CborSerializerGenerator.kt:469 */
   29     54   
        encoder.str("float").float(*var_8);
          55  +
        /* CborSerializerGenerator.kt:414 */
   30     56   
    }
          57  +
    /* CborSerializerGenerator.kt:414 */
   31     58   
    if let Some(var_9) = &input.double {
          59  +
        /* CborSerializerGenerator.kt:470 */
   32     60   
        encoder.str("double").double(*var_9);
          61  +
        /* CborSerializerGenerator.kt:414 */
   33     62   
    }
          63  +
    /* CborSerializerGenerator.kt:414 */
   34     64   
    if let Some(var_10) = &input.timestamp {
          65  +
        /* CborSerializerGenerator.kt:472 */
   35     66   
        encoder.str("timestamp").timestamp(var_10);
          67  +
        /* CborSerializerGenerator.kt:414 */
   36     68   
    }
          69  +
    /* CborSerializerGenerator.kt:414 */
   37     70   
    if let Some(var_11) = &input.r#enum {
          71  +
        /* CborSerializerGenerator.kt:462 */
   38     72   
        encoder.str("enum").str(var_11.as_str());
          73  +
        /* CborSerializerGenerator.kt:414 */
   39     74   
    }
          75  +
    /* CborSerializerGenerator.kt:414 */
   40     76   
    if let Some(var_12) = &input.required_blob {
          77  +
        /* CborSerializerGenerator.kt:459 */
   41     78   
        encoder.str("requiredBlob").blob(var_12);
          79  +
        /* CborSerializerGenerator.kt:414 */
   42     80   
    }
          81  +
    /* CborSerializerGenerator.kt:414 */
   43     82   
    if let Some(var_13) = &input.required_boolean {
          83  +
        /* CborSerializerGenerator.kt:460 */
   44     84   
        encoder.str("requiredBoolean").boolean(*var_13);
          85  +
        /* CborSerializerGenerator.kt:414 */
   45     86   
    }
          87  +
    /* CborSerializerGenerator.kt:414 */
   46     88   
    if let Some(var_14) = &input.required_string {
          89  +
        /* CborSerializerGenerator.kt:462 */
   47     90   
        encoder.str("requiredString").str(var_14.as_str());
          91  +
        /* CborSerializerGenerator.kt:414 */
   48     92   
    }
          93  +
    /* CborSerializerGenerator.kt:414 */
   49     94   
    if let Some(var_15) = &input.required_byte {
          95  +
        /* CborSerializerGenerator.kt:464 */
   50     96   
        encoder.str("requiredByte").byte(*var_15);
          97  +
        /* CborSerializerGenerator.kt:414 */
   51     98   
    }
          99  +
    /* CborSerializerGenerator.kt:414 */
   52    100   
    if let Some(var_16) = &input.required_short {
         101  +
        /* CborSerializerGenerator.kt:465 */
   53    102   
        encoder.str("requiredShort").short(*var_16);
         103  +
        /* CborSerializerGenerator.kt:414 */
   54    104   
    }
         105  +
    /* CborSerializerGenerator.kt:414 */
   55    106   
    if let Some(var_17) = &input.required_integer {
         107  +
        /* CborSerializerGenerator.kt:466 */
   56    108   
        encoder.str("requiredInteger").integer(*var_17);
         109  +
        /* CborSerializerGenerator.kt:414 */
   57    110   
    }
         111  +
    /* CborSerializerGenerator.kt:414 */
   58    112   
    if let Some(var_18) = &input.required_long {
         113  +
        /* CborSerializerGenerator.kt:467 */
   59    114   
        encoder.str("requiredLong").long(*var_18);
         115  +
        /* CborSerializerGenerator.kt:414 */
   60    116   
    }
         117  +
    /* CborSerializerGenerator.kt:414 */
   61    118   
    if let Some(var_19) = &input.required_float {
         119  +
        /* CborSerializerGenerator.kt:469 */
   62    120   
        encoder.str("requiredFloat").float(*var_19);
         121  +
        /* CborSerializerGenerator.kt:414 */
   63    122   
    }
         123  +
    /* CborSerializerGenerator.kt:414 */
   64    124   
    if let Some(var_20) = &input.required_double {
         125  +
        /* CborSerializerGenerator.kt:470 */
   65    126   
        encoder.str("requiredDouble").double(*var_20);
         127  +
        /* CborSerializerGenerator.kt:414 */
   66    128   
    }
         129  +
    /* CborSerializerGenerator.kt:414 */
   67    130   
    if let Some(var_21) = &input.required_timestamp {
         131  +
        /* CborSerializerGenerator.kt:472 */
   68    132   
        encoder.str("requiredTimestamp").timestamp(var_21);
         133  +
        /* CborSerializerGenerator.kt:414 */
   69    134   
    }
         135  +
    /* CborSerializerGenerator.kt:414 */
   70    136   
    if let Some(var_22) = &input.required_enum {
         137  +
        /* CborSerializerGenerator.kt:462 */
   71    138   
        encoder.str("requiredEnum").str(var_22.as_str());
         139  +
        /* CborSerializerGenerator.kt:414 */
   72    140   
    }
         141  +
    /* CborSerializerGenerator.kt:393 */
   73    142   
    encoder.end();
         143  +
    /* CborSerializerGenerator.kt:394 */
   74    144   
    Ok(())
         145  +
    /* CborSerializerGenerator.kt:369 */
   75    146   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_union.rs

@@ -1,1 +67,104 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:749 */
    2      3   
pub(crate) fn de_simple_union(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::SimpleUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(
    6      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    7      8   
    ) -> ::std::result::Result<crate::types::SimpleUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    8      9   
        Ok(match decoder.str()?.as_ref() {
    9     10   
            "blob" => crate::types::SimpleUnion::Blob(decoder.blob()?),
   10     11   
            "boolean" => crate::types::SimpleUnion::Boolean(decoder.boolean()?),
   11     12   
            "string" => crate::types::SimpleUnion::String(decoder.string()?),
   12     13   
            "unit" => {
   13     14   
                decoder.skip()?;
   14     15   
                crate::types::SimpleUnion::Unit
   15     16   
            }
   16     17   
            _ => {
   17     18   
                decoder.skip()?;
   18     19   
                crate::types::SimpleUnion::Unknown
   19     20   
            }
   20     21   
        })
   21     22   
    }
   22     23   
   23     24   
    match decoder.map()? {
   24     25   
        None => {
   25     26   
            let variant = pair(decoder)?;
   26     27   
            match decoder.datatype()? {
   27     28   
                ::aws_smithy_cbor::data::Type::Break => {
   28     29   
                    decoder.skip()?;
   29     30   
                    Ok(variant)
   30     31   
                }
   31     32   
                ty => Err(::aws_smithy_cbor::decode::DeserializeError::unexpected_union_variant(
   32     33   
                    ty,
   33     34   
                    decoder.position(),
   34     35   
                )),
   35     36   
            }
   36     37   
        }
   37     38   
        Some(1) => pair(decoder),
   38     39   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   39     40   
    }
   40     41   
}
   41     42   
          43  +
/* CborSerializerGenerator.kt:528 */
   42     44   
pub fn ser_simple_union(
   43     45   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   44     46   
    input: &crate::types::SimpleUnion,
   45     47   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          48  +
    /* CborSerializerGenerator.kt:545 */
   46     49   
    encoder.map(1);
          50  +
    /* CborSerializerGenerator.kt:548 */
   47     51   
    match input {
          52  +
        /* CborSerializerGenerator.kt:556 */
   48     53   
        crate::types::SimpleUnion::Blob(inner) => {
          54  +
            /* SerializerUtil.kt:42 */
          55  +
            {
          56  +
                /* CborSerializerGenerator.kt:459 */
   49     57   
                encoder.str("blob").blob(inner);
          58  +
                /* SerializerUtil.kt:42 */
   50     59   
            }
          60  +
            /* CborSerializerGenerator.kt:556 */
          61  +
        }
          62  +
        /* CborSerializerGenerator.kt:556 */
   51     63   
        crate::types::SimpleUnion::Boolean(inner) => {
          64  +
            /* SerializerUtil.kt:42 */
          65  +
            {
          66  +
                /* CborSerializerGenerator.kt:460 */
   52     67   
                encoder.str("boolean").boolean(*inner);
          68  +
                /* SerializerUtil.kt:42 */
          69  +
            }
          70  +
            /* CborSerializerGenerator.kt:556 */
   53     71   
        }
          72  +
        /* CborSerializerGenerator.kt:556 */
   54     73   
        crate::types::SimpleUnion::String(inner) => {
          74  +
            /* SerializerUtil.kt:42 */
          75  +
            {
          76  +
                /* CborSerializerGenerator.kt:462 */
   55     77   
                encoder.str("string").str(inner.as_str());
          78  +
                /* SerializerUtil.kt:42 */
          79  +
            }
          80  +
            /* CborSerializerGenerator.kt:556 */
   56     81   
        }
          82  +
        /* CborSerializerGenerator.kt:556 */
   57     83   
        crate::types::SimpleUnion::Unit => {
          84  +
            /* SerializerUtil.kt:42 */
          85  +
            {
          86  +
                /* CborSerializerGenerator.kt:486 */
   58     87   
                encoder.str("unit");
          88  +
                /* CborSerializerGenerator.kt:348 */
   59     89   
                encoder.begin_map();
          90  +
                /* CborSerializerGenerator.kt:358 */
   60     91   
                encoder.end();
          92  +
                /* SerializerUtil.kt:42 */
   61     93   
            }
          94  +
            /* CborSerializerGenerator.kt:556 */
          95  +
        }
          96  +
        /* CborSerializerGenerator.kt:561 */
   62     97   
        crate::types::SimpleUnion::Unknown => {
   63     98   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("SimpleUnion"))
          99  +
        } /* CborSerializerGenerator.kt:548 */
   64    100   
    }
   65         -
    }
         101  +
    /* CborSerializerGenerator.kt:568 */
   66    102   
    ::std::result::Result::Ok(())
         103  +
    /* CborSerializerGenerator.kt:528 */
   67    104   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_single_member_struct_operation.rs

@@ -1,1 +76,101 @@
    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_single_member_struct_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput,
    9     11   
    crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   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::single_member_struct_operation::SingleMemberStructOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::single_member_struct_operation::SingleMemberStructOperationError::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_single_member_struct_operation_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput,
   25     34   
    crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   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::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_single_member_struct_operation::de_single_member_struct_operation(_response_body, output)
   31     44   
            .map_err(crate::operation::single_member_struct_operation::SingleMemberStructOperationError::unhandled)?;
          45  +
        /* ClientBuilderInstantiator.kt:56 */
   32     46   
        output.build()
          47  +
        /* ProtocolParserGenerator.kt:77 */
   33     48   
    })
          49  +
    /* ProtocolParserGenerator.kt:71 */
   34     50   
}
   35     51   
          52  +
/* CborSerializerGenerator.kt:285 */
   36     53   
pub fn ser_single_member_struct_operation_input(
   37     54   
    input: &crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
   38     55   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          56  +
    /* CborSerializerGenerator.kt:289 */
   39     57   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          58  +
    /* CborSerializerGenerator.kt:292 */
   40     59   
    {
          60  +
        /* CborSerializerGenerator.kt:293 */
   41     61   
        let encoder = &mut encoder;
          62  +
        /* CborSerializerGenerator.kt:403 */
   42     63   
        crate::protocol_serde::shape_single_member_struct_operation_input::ser_single_member_struct_operation_input_input(encoder, input)?;
          64  +
        /* CborSerializerGenerator.kt:292 */
   43     65   
    }
          66  +
    /* CborSerializerGenerator.kt:296 */
   44     67   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
          68  +
    /* CborSerializerGenerator.kt:285 */
   45     69   
}
   46     70   
          71  +
/* CborParserGenerator.kt:482 */
   47     72   
pub(crate) fn de_single_member_struct_operation(
   48     73   
    value: &[u8],
   49     74   
    mut builder: crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder,
   50     75   
) -> ::std::result::Result<
   51     76   
    crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder,
   52     77   
    ::aws_smithy_cbor::decode::DeserializeError,
   53     78   
> {
   54     79   
    #[allow(clippy::match_single_binding)]
   55     80   
    fn pair(
   56     81   
        mut builder: crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_single_member_struct_operation_input.rs

@@ -1,1 +12,20 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_single_member_struct_operation_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
    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.message {
          11  +
        /* CborSerializerGenerator.kt:462 */
    8     12   
        encoder.str("message").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   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_struct_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_struct_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<crate::types::SimpleStruct>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<crate::types::SimpleStruct>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::SimpleStruct>, ::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_extras/rust-client-codegen/src/protocol_serde/shape_unit_union.rs

@@ -1,1 +62,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:749 */
    2      3   
pub(crate) fn de_unit_union(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::UnitUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(decoder: &mut ::aws_smithy_cbor::Decoder) -> ::std::result::Result<crate::types::UnitUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    6      7   
        Ok(match decoder.str()?.as_ref() {
    7      8   
            "unitA" => {
    8      9   
                decoder.skip()?;
    9     10   
                crate::types::UnitUnion::UnitA
   10     11   
            }
   11     12   
            "unitB" => {
   12     13   
                decoder.skip()?;
   13     14   
                crate::types::UnitUnion::UnitB
   14     15   
            }
   15     16   
            _ => {
   16     17   
                decoder.skip()?;
   17     18   
                crate::types::UnitUnion::Unknown
   18     19   
            }
   19     20   
        })
   20     21   
    }
   21     22   
   22     23   
    match decoder.map()? {
   23     24   
        None => {
   24     25   
            let variant = pair(decoder)?;
   25     26   
            match decoder.datatype()? {
   26     27   
                ::aws_smithy_cbor::data::Type::Break => {
   27     28   
                    decoder.skip()?;
   28     29   
                    Ok(variant)
   29     30   
                }
   30     31   
                ty => Err(::aws_smithy_cbor::decode::DeserializeError::unexpected_union_variant(
   31     32   
                    ty,
   32     33   
                    decoder.position(),
   33     34   
                )),
   34     35   
            }
   35     36   
        }
   36     37   
        Some(1) => pair(decoder),
   37     38   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   38     39   
    }
   39     40   
}
   40     41   
          42  +
/* CborSerializerGenerator.kt:528 */
   41     43   
pub fn ser_unit_union(
   42     44   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   43     45   
    input: &crate::types::UnitUnion,
   44     46   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* CborSerializerGenerator.kt:545 */
   45     48   
    encoder.map(1);
          49  +
    /* CborSerializerGenerator.kt:548 */
   46     50   
    match input {
          51  +
        /* CborSerializerGenerator.kt:556 */
   47     52   
        crate::types::UnitUnion::UnitA => {
          53  +
            /* SerializerUtil.kt:42 */
          54  +
            {
          55  +
                /* CborSerializerGenerator.kt:486 */
   48     56   
                encoder.str("unitA");
          57  +
                /* CborSerializerGenerator.kt:348 */
   49     58   
                encoder.begin_map();
          59  +
                /* CborSerializerGenerator.kt:358 */
   50     60   
                encoder.end();
          61  +
                /* SerializerUtil.kt:42 */
   51     62   
            }
          63  +
            /* CborSerializerGenerator.kt:556 */
          64  +
        }
          65  +
        /* CborSerializerGenerator.kt:556 */
   52     66   
        crate::types::UnitUnion::UnitB => {
          67  +
            /* SerializerUtil.kt:42 */
          68  +
            {
          69  +
                /* CborSerializerGenerator.kt:486 */
   53     70   
                encoder.str("unitB");
          71  +
                /* CborSerializerGenerator.kt:348 */
   54     72   
                encoder.begin_map();
          73  +
                /* CborSerializerGenerator.kt:358 */
   55     74   
                encoder.end();
          75  +
                /* SerializerUtil.kt:42 */
          76  +
            }
          77  +
            /* CborSerializerGenerator.kt:556 */
   56     78   
        }
          79  +
        /* CborSerializerGenerator.kt:561 */
   57     80   
        crate::types::UnitUnion::Unknown => {
   58     81   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("UnitUnion"))
          82  +
        } /* CborSerializerGenerator.kt:548 */
   59     83   
    }
   60         -
    }
          84  +
    /* CborSerializerGenerator.kt:568 */
   61     85   
    ::std::result::Result::Ok(())
          86  +
    /* CborSerializerGenerator.kt:528 */
   62     87   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_validation_exception.rs

@@ -1,1 +103,111 @@
    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_validation_exception_cbor_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::ValidationErrorBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::ValidationErrorBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
    6      7   
    #[allow(clippy::match_single_binding)]
    7      8   
    fn pair(
    8      9   
        mut builder: crate::types::error::builders::ValidationErrorBuilder,
    9     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   10     11   
    ) -> ::std::result::Result<crate::types::error::builders::ValidationErrorBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   11     12   
        builder = match decoder.str()?.as_ref() {
   12     13   
            "message" => builder.set_message(Some(decoder.string()?)),
   13     14   
            "fieldList" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| {
   14     15   
                Ok(builder.set_field_list(Some(
   15     16   
                    crate::protocol_serde::shape_validation_exception_field_list::de_validation_exception_field_list(decoder)?,
   16     17   
                )))
   17     18   
            })?,
   18     19   
            _ => {
   19     20   
                decoder.skip()?;
   20     21   
                builder
   21     22   
            }
   22     23   
        };
   23     24   
        Ok(builder)
   24     25   
    }
   25     26   
   26     27   
    let decoder = &mut ::aws_smithy_cbor::Decoder::new(value);
   27     28   
   28     29   
    match decoder.map()? {
   29     30   
        None => loop {
   30     31   
            match decoder.datatype()? {
   31     32   
                ::aws_smithy_cbor::data::Type::Break => {
   32     33   
                    decoder.skip()?;
   33     34   
                    break;
   34     35   
                }
   35     36   
                _ => {
   36     37   
                    builder = pair(builder, decoder)?;
   37     38   
                }
   38     39   
            };
   39     40   
        },
   40     41   
        Some(n) => {
   41     42   
            for _ in 0..n {
   42     43   
                builder = pair(builder, decoder)?;
   43     44   
            }
   44     45   
        }
   45     46   
    };
   46     47   
   47     48   
    if decoder.position() != value.len() {
   48     49   
        return Err(::aws_smithy_cbor::decode::DeserializeError::expected_end_of_stream(decoder.position()));
   49     50   
    }
   50     51   
   51     52   
    Ok(builder)
   52     53   
}
   53     54   
          55  +
/* CborParserGenerator.kt:692 */
   54     56   
pub(crate) fn de_validation_exception(
   55     57   
    decoder: &mut ::aws_smithy_cbor::Decoder,
   56     58   
) -> ::std::result::Result<crate::types::error::ValidationError, ::aws_smithy_cbor::decode::DeserializeError> {
          59  +
    /* CborParserGenerator.kt:700 */
   57     60   
    #[allow(clippy::match_single_binding)]
   58     61   
    fn pair(
   59     62   
        mut builder: crate::types::error::builders::ValidationErrorBuilder,
   60     63   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   61     64   
    ) -> ::std::result::Result<crate::types::error::builders::ValidationErrorBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   62     65   
        builder = match decoder.str()?.as_ref() {
   63     66   
            "message" => builder.set_message(Some(decoder.string()?)),
   64     67   
            "fieldList" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| {
   65     68   
                Ok(builder.set_field_list(Some(
   66     69   
                    crate::protocol_serde::shape_validation_exception_field_list::de_validation_exception_field_list(decoder)?,
   67     70   
                )))
   68     71   
            })?,
   69     72   
            _ => {
   70     73   
                decoder.skip()?;
   71     74   
                builder
   72     75   
            }
   73     76   
        };
   74     77   
        Ok(builder)
   75     78   
    }
   76     79   
   77     80   
    let mut builder = crate::types::error::builders::ValidationErrorBuilder::default();
   78     81   
   79     82   
    match decoder.map()? {
   80     83   
        None => loop {
   81     84   
            match decoder.datatype()? {
   82     85   
                ::aws_smithy_cbor::data::Type::Break => {
   83     86   
                    decoder.skip()?;
   84     87   
                    break;
   85     88   
                }
   86     89   
                _ => {
   87     90   
                    builder = pair(builder, decoder)?;
   88     91   
                }
   89     92   
            };
   90     93   
        },
   91     94   
        Some(n) => {
   92     95   
            for _ in 0..n {
   93     96   
                builder = pair(builder, decoder)?;
   94     97   
            }
   95     98   
        }
   96     99   
    };
         100  +
    /* CborParserGenerator.kt:726 */
   97    101   
    #[allow(clippy::needless_question_mark)]
         102  +
    /* CborParserGenerator.kt:727 */
   98    103   
    {
         104  +
        /* CborParserGenerator.kt:728 */
   99    105   
        return Ok(crate::serde_util::validation_exception_correct_errors(builder)
  100    106   
            .build()
  101    107   
            .map_err(|err| ::aws_smithy_cbor::decode::DeserializeError::custom(err.to_string(), decoder.position()))?);
         108  +
        /* CborParserGenerator.kt:727 */
  102    109   
    }
         110  +
    /* CborParserGenerator.kt:692 */
  103    111   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_validation_exception_field.rs

@@ -1,1 +47,54 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:692 */
    2      3   
pub(crate) fn de_validation_exception_field(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::ValidationExceptionField, ::aws_smithy_cbor::decode::DeserializeError> {
           6  +
    /* CborParserGenerator.kt:700 */
    5      7   
    #[allow(clippy::match_single_binding)]
    6      8   
    fn pair(
    7      9   
        mut builder: crate::types::builders::ValidationExceptionFieldBuilder,
    8     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9     11   
    ) -> ::std::result::Result<crate::types::builders::ValidationExceptionFieldBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   10     12   
        builder = match decoder.str()?.as_ref() {
   11     13   
            "path" => builder.set_path(Some(decoder.string()?)),
   12     14   
            "message" => builder.set_message(Some(decoder.string()?)),
   13     15   
            _ => {
   14     16   
                decoder.skip()?;
   15     17   
                builder
   16     18   
            }
   17     19   
        };
   18     20   
        Ok(builder)
   19     21   
    }
   20     22   
   21     23   
    let mut builder = crate::types::builders::ValidationExceptionFieldBuilder::default();
   22     24   
   23     25   
    match decoder.map()? {
   24     26   
        None => loop {
   25     27   
            match decoder.datatype()? {
   26     28   
                ::aws_smithy_cbor::data::Type::Break => {
   27     29   
                    decoder.skip()?;
   28     30   
                    break;
   29     31   
                }
   30     32   
                _ => {
   31     33   
                    builder = pair(builder, decoder)?;
   32     34   
                }
   33     35   
            };
   34     36   
        },
   35     37   
        Some(n) => {
   36     38   
            for _ in 0..n {
   37     39   
                builder = pair(builder, decoder)?;
   38     40   
            }
   39     41   
        }
   40     42   
    };
          43  +
    /* CborParserGenerator.kt:726 */
   41     44   
    #[allow(clippy::needless_question_mark)]
          45  +
    /* CborParserGenerator.kt:727 */
   42     46   
    {
          47  +
        /* CborParserGenerator.kt:728 */
   43     48   
        return Ok(crate::serde_util::validation_exception_field_correct_errors(builder)
   44     49   
            .build()
   45     50   
            .map_err(|err| ::aws_smithy_cbor::decode::DeserializeError::custom(err.to_string(), decoder.position()))?);
          51  +
        /* CborParserGenerator.kt:727 */
   46     52   
    }
          53  +
    /* CborParserGenerator.kt:692 */
   47     54   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_validation_exception_field_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_validation_exception_field_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn member(
    6      7   
        mut list: ::std::vec::Vec<crate::types::ValidationExceptionField>,
    7      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      9   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    9     10   
        let value = match decoder.datatype()? {
   10     11   
            ::aws_smithy_cbor::data::Type::Null => {
   11     12   
                decoder.null()?;