Client Test

Client Test

rev. c67de0508e9d33923e47fd7281531eeca95f7996 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_attribute_value.rs

@@ -1,1 +101,101 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_attribute_value(
    3      3   
    object_6: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::types::AttributeValue,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::types::AttributeValue::S(inner) => {
           7  +
        crate::types::AttributeValue::S(_inner) => {
    8      8   
            object_6.key("S").string(inner.as_str());
    9      9   
        }
   10         -
        crate::types::AttributeValue::N(inner) => {
          10  +
        crate::types::AttributeValue::N(_inner) => {
   11     11   
            object_6.key("N").string(inner.as_str());
   12     12   
        }
   13         -
        crate::types::AttributeValue::B(inner) => {
          13  +
        crate::types::AttributeValue::B(_inner) => {
   14     14   
            object_6.key("B").string_unchecked(&::aws_smithy_types::base64::encode(inner));
   15     15   
        }
   16         -
        crate::types::AttributeValue::Ss(inner) => {
          16  +
        crate::types::AttributeValue::Ss(_inner) => {
   17     17   
            let mut array_1 = object_6.key("SS").start_array();
   18     18   
            for item_2 in inner {
   19     19   
                {
   20     20   
                    array_1.value().string(item_2.as_str());
   21     21   
                }
   22     22   
            }
   23     23   
            array_1.finish();
   24     24   
        }
   25         -
        crate::types::AttributeValue::Ns(inner) => {
          25  +
        crate::types::AttributeValue::Ns(_inner) => {
   26     26   
            let mut array_3 = object_6.key("NS").start_array();
   27     27   
            for item_4 in inner {
   28     28   
                {
   29     29   
                    array_3.value().string(item_4.as_str());
   30     30   
                }
   31     31   
            }
   32     32   
            array_3.finish();
   33     33   
        }
   34         -
        crate::types::AttributeValue::Bs(inner) => {
          34  +
        crate::types::AttributeValue::Bs(_inner) => {
   35     35   
            let mut array_5 = object_6.key("BS").start_array();
   36     36   
            for item_6 in inner {
   37     37   
                {
   38     38   
                    array_5.value().string_unchecked(&::aws_smithy_types::base64::encode(item_6));
   39     39   
                }
   40     40   
            }
   41     41   
            array_5.finish();
   42     42   
        }
   43         -
        crate::types::AttributeValue::M(inner) => {
          43  +
        crate::types::AttributeValue::M(_inner) => {
   44     44   
            #[allow(unused_mut)]
   45     45   
            let mut object_7 = object_6.key("M").start_object();
   46     46   
            for (key_8, value_9) in inner {
   47     47   
                {
   48     48   
                    #[allow(unused_mut)]
   49     49   
                    let mut object_10 = object_7.key(key_8.as_str()).start_object();
   50     50   
                    crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_10, value_9)?;
   51     51   
                    object_10.finish();
   52     52   
                }
   53     53   
            }
   54     54   
            object_7.finish();
   55     55   
        }
   56         -
        crate::types::AttributeValue::L(inner) => {
          56  +
        crate::types::AttributeValue::L(_inner) => {
   57     57   
            let mut array_11 = object_6.key("L").start_array();
   58     58   
            for item_12 in inner {
   59     59   
                {
   60     60   
                    #[allow(unused_mut)]
   61     61   
                    let mut object_13 = array_11.value().start_object();
   62     62   
                    crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_13, item_12)?;
   63     63   
                    object_13.finish();
   64     64   
                }
   65     65   
            }
   66     66   
            array_11.finish();
   67     67   
        }
   68         -
        crate::types::AttributeValue::Null(inner) => {
          68  +
        crate::types::AttributeValue::Null(_inner) => {
   69     69   
            object_6.key("NULL").boolean(*inner);
   70     70   
        }
   71         -
        crate::types::AttributeValue::Bool(inner) => {
          71  +
        crate::types::AttributeValue::Bool(_inner) => {
   72     72   
            object_6.key("BOOL").boolean(*inner);
   73     73   
        }
   74     74   
        crate::types::AttributeValue::Unknown => {
   75     75   
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   76     76   
                "AttributeValue",
   77     77   
            ))
   78     78   
        }
   79     79   
    }
   80     80   
    Ok(())
   81     81   
}

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/protocol_serde/shape_my_union.rs

@@ -101,101 +188,188 @@
  121    121   
        ));
  122    122   
    }
  123    123   
    Ok(variant)
  124    124   
}
  125    125   
  126    126   
pub fn ser_my_union(
  127    127   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  128    128   
    input: &crate::types::MyUnion,
  129    129   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  130    130   
    match input {
  131         -
        crate::types::MyUnion::StringValue(inner) => {
         131  +
        crate::types::MyUnion::StringValue(_inner) => {
  132    132   
            object_2.key("stringValue").string(inner.as_str());
  133    133   
        }
  134         -
        crate::types::MyUnion::BooleanValue(inner) => {
         134  +
        crate::types::MyUnion::BooleanValue(_inner) => {
  135    135   
            object_2.key("booleanValue").boolean(*inner);
  136    136   
        }
  137         -
        crate::types::MyUnion::NumberValue(inner) => {
         137  +
        crate::types::MyUnion::NumberValue(_inner) => {
  138    138   
            object_2.key("numberValue").number(
  139    139   
                #[allow(clippy::useless_conversion)]
  140    140   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  141    141   
            );
  142    142   
        }
  143         -
        crate::types::MyUnion::BlobValue(inner) => {
         143  +
        crate::types::MyUnion::BlobValue(_inner) => {
  144    144   
            object_2.key("blobValue").string_unchecked(&::aws_smithy_types::base64::encode(inner));
  145    145   
        }
  146         -
        crate::types::MyUnion::TimestampValue(inner) => {
         146  +
        crate::types::MyUnion::TimestampValue(_inner) => {
  147    147   
            object_2
  148    148   
                .key("timestampValue")
  149    149   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  150    150   
        }
  151         -
        crate::types::MyUnion::EnumValue(inner) => {
         151  +
        crate::types::MyUnion::EnumValue(_inner) => {
  152    152   
            object_2.key("enumValue").string(inner.as_str());
  153    153   
        }
  154         -
        crate::types::MyUnion::IntEnumValue(inner) => {
         154  +
        crate::types::MyUnion::IntEnumValue(_inner) => {
  155    155   
            object_2.key("intEnumValue").number(
  156    156   
                #[allow(clippy::useless_conversion)]
  157    157   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  158    158   
            );
  159    159   
        }
  160         -
        crate::types::MyUnion::ListValue(inner) => {
         160  +
        crate::types::MyUnion::ListValue(_inner) => {
  161    161   
            let mut array_1 = object_2.key("listValue").start_array();
  162    162   
            for item_2 in inner {
  163    163   
                {
  164    164   
                    array_1.value().string(item_2.as_str());
  165    165   
                }
  166    166   
            }
  167    167   
            array_1.finish();
  168    168   
        }
  169         -
        crate::types::MyUnion::MapValue(inner) => {
         169  +
        crate::types::MyUnion::MapValue(_inner) => {
  170    170   
            #[allow(unused_mut)]
  171    171   
            let mut object_3 = object_2.key("mapValue").start_object();
  172    172   
            for (key_4, value_5) in inner {
  173    173   
                {
  174    174   
                    object_3.key(key_4.as_str()).string(value_5.as_str());
  175    175   
                }
  176    176   
            }
  177    177   
            object_3.finish();
  178    178   
        }
  179         -
        crate::types::MyUnion::StructureValue(inner) => {
         179  +
        crate::types::MyUnion::StructureValue(_inner) => {
  180    180   
            #[allow(unused_mut)]
  181    181   
            let mut object_6 = object_2.key("structureValue").start_object();
  182    182   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(&mut object_6, inner)?;
  183    183   
            object_6.finish();
  184    184   
        }
  185    185   
        crate::types::MyUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("MyUnion")),
  186    186   
    }
  187    187   
    Ok(())
  188    188   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_my_union.rs

@@ -93,93 +174,174 @@
  113    113   
        ));
  114    114   
    }
  115    115   
    Ok(variant)
  116    116   
}
  117    117   
  118    118   
pub fn ser_my_union(
  119    119   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  120    120   
    input: &crate::types::MyUnion,
  121    121   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  122    122   
    match input {
  123         -
        crate::types::MyUnion::StringValue(inner) => {
         123  +
        crate::types::MyUnion::StringValue(_inner) => {
  124    124   
            object_2.key("stringValue").string(inner.as_str());
  125    125   
        }
  126         -
        crate::types::MyUnion::BooleanValue(inner) => {
         126  +
        crate::types::MyUnion::BooleanValue(_inner) => {
  127    127   
            object_2.key("booleanValue").boolean(*inner);
  128    128   
        }
  129         -
        crate::types::MyUnion::NumberValue(inner) => {
         129  +
        crate::types::MyUnion::NumberValue(_inner) => {
  130    130   
            object_2.key("numberValue").number(
  131    131   
                #[allow(clippy::useless_conversion)]
  132    132   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  133    133   
            );
  134    134   
        }
  135         -
        crate::types::MyUnion::BlobValue(inner) => {
         135  +
        crate::types::MyUnion::BlobValue(_inner) => {
  136    136   
            object_2.key("blobValue").string_unchecked(&::aws_smithy_types::base64::encode(inner));
  137    137   
        }
  138         -
        crate::types::MyUnion::TimestampValue(inner) => {
         138  +
        crate::types::MyUnion::TimestampValue(_inner) => {
  139    139   
            object_2
  140    140   
                .key("timestampValue")
  141    141   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  142    142   
        }
  143         -
        crate::types::MyUnion::EnumValue(inner) => {
         143  +
        crate::types::MyUnion::EnumValue(_inner) => {
  144    144   
            object_2.key("enumValue").string(inner.as_str());
  145    145   
        }
  146         -
        crate::types::MyUnion::ListValue(inner) => {
         146  +
        crate::types::MyUnion::ListValue(_inner) => {
  147    147   
            let mut array_1 = object_2.key("listValue").start_array();
  148    148   
            for item_2 in inner {
  149    149   
                {
  150    150   
                    array_1.value().string(item_2.as_str());
  151    151   
                }
  152    152   
            }
  153    153   
            array_1.finish();
  154    154   
        }
  155         -
        crate::types::MyUnion::MapValue(inner) => {
         155  +
        crate::types::MyUnion::MapValue(_inner) => {
  156    156   
            #[allow(unused_mut)]
  157    157   
            let mut object_3 = object_2.key("mapValue").start_object();
  158    158   
            for (key_4, value_5) in inner {
  159    159   
                {
  160    160   
                    object_3.key(key_4.as_str()).string(value_5.as_str());
  161    161   
                }
  162    162   
            }
  163    163   
            object_3.finish();
  164    164   
        }
  165         -
        crate::types::MyUnion::StructureValue(inner) => {
         165  +
        crate::types::MyUnion::StructureValue(_inner) => {
  166    166   
            #[allow(unused_mut)]
  167    167   
            let mut object_6 = object_2.key("structureValue").start_object();
  168    168   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(&mut object_6, inner)?;
  169    169   
            object_6.finish();
  170    170   
        }
  171    171   
        crate::types::MyUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("MyUnion")),
  172    172   
    }
  173    173   
    Ok(())
  174    174   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/protocol_serde/shape_a_union.rs

@@ -56,56 +103,103 @@
   76     76   
        ));
   77     77   
    }
   78     78   
    Ok(variant)
   79     79   
}
   80     80   
   81     81   
pub fn ser_a_union(
   82     82   
    object_8: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   83     83   
    input: &crate::types::AUnion,
   84     84   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   85     85   
    match input {
   86         -
        crate::types::AUnion::I32(inner) => {
          86  +
        crate::types::AUnion::I32(_inner) => {
   87     87   
            object_8.key("i32").number(
   88     88   
                #[allow(clippy::useless_conversion)]
   89     89   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
   90     90   
            );
   91     91   
        }
   92         -
        crate::types::AUnion::String(inner) => {
          92  +
        crate::types::AUnion::String(_inner) => {
   93     93   
            object_8.key("string").string(inner.as_str());
   94     94   
        }
   95         -
        crate::types::AUnion::Time(inner) => {
          95  +
        crate::types::AUnion::Time(_inner) => {
   96     96   
            object_8
   97     97   
                .key("time")
   98     98   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
   99     99   
        }
  100    100   
        crate::types::AUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("AUnion")),
  101    101   
    }
  102    102   
    Ok(())
  103    103   
}

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/src/protocol_serde/shape_some_union.rs

@@ -45,45 +90,90 @@
   65     65   
        ));
   66     66   
    }
   67     67   
    Ok(variant)
   68     68   
}
   69     69   
   70     70   
pub fn ser_some_union(
   71     71   
    object_14: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   72     72   
    input: &crate::types::SomeUnion,
   73     73   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   74     74   
    match input {
   75         -
        crate::types::SomeUnion::Result(inner) => {
          75  +
        crate::types::SomeUnion::Result(_inner) => {
   76     76   
            #[allow(unused_mut)]
   77     77   
            let mut object_1 = object_14.key("Result").start_object();
   78     78   
            crate::protocol_serde::shape_result::ser_result(&mut object_1, inner)?;
   79     79   
            object_1.finish();
   80     80   
        }
   81         -
        crate::types::SomeUnion::Option(inner) => {
          81  +
        crate::types::SomeUnion::Option(_inner) => {
   82     82   
            #[allow(unused_mut)]
   83     83   
            let mut object_2 = object_14.key("Option").start_object();
   84     84   
            crate::protocol_serde::shape_option::ser_option(&mut object_2, inner)?;
   85     85   
            object_2.finish();
   86     86   
        }
   87     87   
        crate::types::SomeUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("SomeUnion")),
   88     88   
    }
   89     89   
    Ok(())
   90     90   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_my_union.rs

@@ -98,98 +185,185 @@
  118    118   
        ));
  119    119   
    }
  120    120   
    Ok(variant)
  121    121   
}
  122    122   
  123    123   
pub fn ser_my_union(
  124    124   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  125    125   
    input: &crate::types::MyUnion,
  126    126   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  127    127   
    match input {
  128         -
        crate::types::MyUnion::StringValue(inner) => {
         128  +
        crate::types::MyUnion::StringValue(_inner) => {
  129    129   
            object_2.key("stringValue").string(inner.as_str());
  130    130   
        }
  131         -
        crate::types::MyUnion::BooleanValue(inner) => {
         131  +
        crate::types::MyUnion::BooleanValue(_inner) => {
  132    132   
            object_2.key("booleanValue").boolean(*inner);
  133    133   
        }
  134         -
        crate::types::MyUnion::NumberValue(inner) => {
         134  +
        crate::types::MyUnion::NumberValue(_inner) => {
  135    135   
            object_2.key("numberValue").number(
  136    136   
                #[allow(clippy::useless_conversion)]
  137    137   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  138    138   
            );
  139    139   
        }
  140         -
        crate::types::MyUnion::BlobValue(inner) => {
         140  +
        crate::types::MyUnion::BlobValue(_inner) => {
  141    141   
            object_2.key("blobValue").string_unchecked(&::aws_smithy_types::base64::encode(inner));
  142    142   
        }
  143         -
        crate::types::MyUnion::TimestampValue(inner) => {
         143  +
        crate::types::MyUnion::TimestampValue(_inner) => {
  144    144   
            object_2
  145    145   
                .key("timestampValue")
  146    146   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  147    147   
        }
  148         -
        crate::types::MyUnion::EnumValue(inner) => {
         148  +
        crate::types::MyUnion::EnumValue(_inner) => {
  149    149   
            object_2.key("enumValue").string(inner.as_str());
  150    150   
        }
  151         -
        crate::types::MyUnion::ListValue(inner) => {
         151  +
        crate::types::MyUnion::ListValue(_inner) => {
  152    152   
            let mut array_1 = object_2.key("listValue").start_array();
  153    153   
            for item_2 in inner {
  154    154   
                {
  155    155   
                    array_1.value().string(item_2.as_str());
  156    156   
                }
  157    157   
            }
  158    158   
            array_1.finish();
  159    159   
        }
  160         -
        crate::types::MyUnion::MapValue(inner) => {
         160  +
        crate::types::MyUnion::MapValue(_inner) => {
  161    161   
            #[allow(unused_mut)]
  162    162   
            let mut object_3 = object_2.key("mapValue").start_object();
  163    163   
            for (key_4, value_5) in inner {
  164    164   
                {
  165    165   
                    object_3.key(key_4.as_str()).string(value_5.as_str());
  166    166   
                }
  167    167   
            }
  168    168   
            object_3.finish();
  169    169   
        }
  170         -
        crate::types::MyUnion::StructureValue(inner) => {
         170  +
        crate::types::MyUnion::StructureValue(_inner) => {
  171    171   
            #[allow(unused_mut)]
  172    172   
            let mut object_6 = object_2.key("structureValue").start_object();
  173    173   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(&mut object_6, inner)?;
  174    174   
            object_6.finish();
  175    175   
        }
  176         -
        crate::types::MyUnion::RenamedStructureValue(inner) => {
         176  +
        crate::types::MyUnion::RenamedStructureValue(_inner) => {
  177    177   
            #[allow(unused_mut)]
  178    178   
            let mut object_7 = object_2.key("renamedStructureValue").start_object();
  179    179   
            crate::protocol_serde::shape_renamed_greeting::ser_renamed_greeting(&mut object_7, inner)?;
  180    180   
            object_7.finish();
  181    181   
        }
  182    182   
        crate::types::MyUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("MyUnion")),
  183    183   
    }
  184    184   
    Ok(())
  185    185   
}

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

@@ -1,1 +19,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_simple_union(
    3      3   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::types::SimpleUnion,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::types::SimpleUnion::Int(inner) => {
           7  +
        crate::types::SimpleUnion::Int(_inner) => {
    8      8   
            object_2.key("int").number(
    9      9   
                #[allow(clippy::useless_conversion)]
   10     10   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
   11     11   
            );
   12     12   
        }
   13         -
        crate::types::SimpleUnion::String(inner) => {
          13  +
        crate::types::SimpleUnion::String(_inner) => {
   14     14   
            object_2.key("string").string(inner.as_str());
   15     15   
        }
   16     16   
        crate::types::SimpleUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("SimpleUnion")),
   17     17   
    }
   18     18   
    Ok(())
   19     19   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_union_payload.rs

@@ -1,1 +37,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_union_payload(
    3      3   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::types::UnionPayload,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::types::UnionPayload::Greeting(inner) => {
           7  +
        crate::types::UnionPayload::Greeting(_inner) => {
    8      8   
            object.key("greeting").string(inner.as_str());
    9      9   
        }
   10     10   
        crate::types::UnionPayload::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("UnionPayload")),
   11     11   
    }
   12     12   
    Ok(())
   13     13   
}
   14     14   
   15     15   
pub(crate) fn de_union_payload_payload(
   16     16   
    input: &[u8],
   17     17   
) -> ::std::result::Result<crate::types::UnionPayload, ::aws_smithy_json::deserialize::error::DeserializeError> {

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_union_with_json_name.rs

@@ -53,53 +99,99 @@
   73     73   
        ));
   74     74   
    }
   75     75   
    Ok(variant)
   76     76   
}
   77     77   
   78     78   
pub fn ser_union_with_json_name(
   79     79   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   80     80   
    input: &crate::types::UnionWithJsonName,
   81     81   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   82     82   
    match input {
   83         -
        crate::types::UnionWithJsonName::Foo(inner) => {
          83  +
        crate::types::UnionWithJsonName::Foo(_inner) => {
   84     84   
            object_2.key("FOO").string(inner.as_str());
   85     85   
        }
   86         -
        crate::types::UnionWithJsonName::Bar(inner) => {
          86  +
        crate::types::UnionWithJsonName::Bar(_inner) => {
   87     87   
            object_2.key("bar").string(inner.as_str());
   88     88   
        }
   89         -
        crate::types::UnionWithJsonName::Baz(inner) => {
          89  +
        crate::types::UnionWithJsonName::Baz(_inner) => {
   90     90   
            object_2.key("_baz").string(inner.as_str());
   91     91   
        }
   92     92   
        crate::types::UnionWithJsonName::Unknown => {
   93     93   
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   94     94   
                "UnionWithJsonName",
   95     95   
            ))
   96     96   
        }
   97     97   
    }
   98     98   
    Ok(())
   99     99   
}

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

@@ -16,16 +81,81 @@
   36     36   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   37     37   
    }
   38     38   
}
   39     39   
   40     40   
pub fn ser_complex_union(
   41     41   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   42     42   
    input: &crate::types::ComplexUnion,
   43     43   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   44     44   
    encoder.map(1);
   45     45   
    match input {
   46         -
        crate::types::ComplexUnion::ComplexStruct(inner) => {
          46  +
        crate::types::ComplexUnion::ComplexStruct(_inner) => {
   47     47   
            encoder.str("complexStruct");
   48     48   
            crate::protocol_serde::shape_complex_struct::ser_complex_struct(encoder, inner)?;
   49     49   
        }
   50         -
        crate::types::ComplexUnion::Structure(inner) => {
          50  +
        crate::types::ComplexUnion::Structure(_inner) => {
   51     51   
            encoder.str("structure");
   52     52   
            crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, inner)?;
   53     53   
        }
   54         -
        crate::types::ComplexUnion::List(inner) => {
          54  +
        crate::types::ComplexUnion::List(_inner) => {
   55     55   
            encoder.str("list");
   56     56   
            encoder.array((*inner).len());
   57     57   
            for item_1 in inner {
   58     58   
                {
   59     59   
                    encoder.str(item_1.as_str());
   60     60   
                }
   61     61   
            }
   62     62   
        }
   63         -
        crate::types::ComplexUnion::Map(inner) => {
          63  +
        crate::types::ComplexUnion::Map(_inner) => {
   64     64   
            encoder.str("map");
   65     65   
            encoder.map((*inner).len());
   66     66   
            for (key_2, value_3) in inner {
   67     67   
                {
   68     68   
                    encoder.str(key_2.as_str()).integer(*value_3);
   69     69   
                }
   70     70   
            }
   71     71   
        }
   72         -
        crate::types::ComplexUnion::Union(inner) => {
          72  +
        crate::types::ComplexUnion::Union(_inner) => {
   73     73   
            encoder.str("union");
   74     74   
            crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, inner)?;
   75     75   
        }
   76     76   
        crate::types::ComplexUnion::Unknown => {
   77     77   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ComplexUnion"))
   78     78   
        }
   79     79   
    }
   80     80   
    ::std::result::Result::Ok(())
   81     81   
}

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

@@ -14,14 +56,56 @@
   34     34   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   35     35   
    }
   36     36   
}
   37     37   
   38     38   
pub fn ser_foo_choice(
   39     39   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   40     40   
    input: &crate::types::FooChoice,
   41     41   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   42     42   
    encoder.map(1);
   43     43   
    match input {
   44         -
        crate::types::FooChoice::Choice1(inner) => {
          44  +
        crate::types::FooChoice::Choice1(_inner) => {
   45     45   
            encoder.str("choice1").str(inner.as_str());
   46     46   
        }
   47         -
        crate::types::FooChoice::Choice2(inner) => {
          47  +
        crate::types::FooChoice::Choice2(_inner) => {
   48     48   
            encoder.str("choice2");
   49     49   
            crate::protocol_serde::shape_recursive_operation_input_output_nested1::ser_recursive_operation_input_output_nested1(encoder, inner)?;
   50     50   
        }
   51     51   
        crate::types::FooChoice::Unknown => {
   52     52   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("FooChoice"))
   53     53   
        }
   54     54   
    }
   55     55   
    ::std::result::Result::Ok(())
   56     56   
}

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

@@ -18,18 +67,67 @@
   38     38   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   39     39   
    }
   40     40   
}
   41     41   
   42     42   
pub fn ser_simple_union(
   43     43   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   44     44   
    input: &crate::types::SimpleUnion,
   45     45   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   46     46   
    encoder.map(1);
   47     47   
    match input {
   48         -
        crate::types::SimpleUnion::Blob(inner) => {
          48  +
        crate::types::SimpleUnion::Blob(_inner) => {
   49     49   
            encoder.str("blob").blob(inner);
   50     50   
        }
   51         -
        crate::types::SimpleUnion::Boolean(inner) => {
          51  +
        crate::types::SimpleUnion::Boolean(_inner) => {
   52     52   
            encoder.str("boolean").boolean(*inner);
   53     53   
        }
   54         -
        crate::types::SimpleUnion::String(inner) => {
          54  +
        crate::types::SimpleUnion::String(_inner) => {
   55     55   
            encoder.str("string").str(inner.as_str());
   56     56   
        }
   57     57   
        crate::types::SimpleUnion::Unit => {
   58     58   
            encoder.str("unit");
   59     59   
            encoder.begin_map();
   60     60   
            encoder.end();
   61     61   
        }
   62     62   
        crate::types::SimpleUnion::Unknown => {
   63     63   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("SimpleUnion"))
   64     64   
        }