Server Test

Server Test

rev. c67de0508e9d33923e47fd7281531eeca95f7996

Files changed:

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/src/protocol_serde/shape_constrained_union.rs

@@ -93,93 +180,180 @@
  113    113   
        );
  114    114   
    }
  115    115   
    Ok(variant)
  116    116   
}
  117    117   
  118    118   
pub fn ser_constrained_union(
  119    119   
    object_71: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  120    120   
    input: &crate::model::ConstrainedUnion,
  121    121   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  122    122   
    match input {
  123         -
        crate::model::ConstrainedUnion::EnumString(inner) => {
         123  +
        crate::model::ConstrainedUnion::EnumString(_inner) => {
  124    124   
            object_71.key("enumString").string(inner.as_str());
  125    125   
        }
  126         -
        crate::model::ConstrainedUnion::LengthString(inner) => {
         126  +
        crate::model::ConstrainedUnion::LengthString(_inner) => {
  127    127   
            object_71.key("lengthString").string(inner.as_str());
  128    128   
        }
  129         -
        crate::model::ConstrainedUnion::ConstrainedStructure(inner) => {
         129  +
        crate::model::ConstrainedUnion::ConstrainedStructure(_inner) => {
  130    130   
            #[allow(unused_mut)]
  131    131   
            let mut object_1 = object_71.key("constrainedStructure").start_object();
  132    132   
            crate::protocol_serde::shape_con_b::ser_con_b(&mut object_1, inner)?;
  133    133   
            object_1.finish();
  134    134   
        }
  135         -
        crate::model::ConstrainedUnion::ConBList(inner) => {
         135  +
        crate::model::ConstrainedUnion::ConBList(_inner) => {
  136    136   
            let mut array_2 = object_71.key("conBList").start_array();
  137    137   
            for item_3 in inner {
  138    138   
                {
  139    139   
                    let mut array_4 = array_2.value().start_array();
  140    140   
                    for item_5 in item_3 {
  141    141   
                        {
  142    142   
                            #[allow(unused_mut)]
  143    143   
                            let mut object_6 = array_4.value().start_object();
  144    144   
                            crate::protocol_serde::shape_con_b::ser_con_b(&mut object_6, item_5)?;
  145    145   
                            object_6.finish();
  146    146   
                        }
  147    147   
                    }
  148    148   
                    array_4.finish();
  149    149   
                }
  150    150   
            }
  151    151   
            array_2.finish();
  152    152   
        }
  153         -
        crate::model::ConstrainedUnion::ConBSet(inner) => {
         153  +
        crate::model::ConstrainedUnion::ConBSet(_inner) => {
  154    154   
            let mut array_7 = object_71.key("conBSet").start_array();
  155    155   
            for item_8 in &inner.0 {
  156    156   
                {
  157    157   
                    let mut array_9 = array_7.value().start_array();
  158    158   
                    for item_10 in &item_8.0 {
  159    159   
                        {
  160    160   
                            array_9.value().string(item_10.as_str());
  161    161   
                        }
  162    162   
                    }
  163    163   
                    array_9.finish();
  164    164   
                }
  165    165   
            }
  166    166   
            array_7.finish();
  167    167   
        }
  168         -
        crate::model::ConstrainedUnion::ConBMap(inner) => {
         168  +
        crate::model::ConstrainedUnion::ConBMap(_inner) => {
  169    169   
            #[allow(unused_mut)]
  170    170   
            let mut object_11 = object_71.key("conBMap").start_object();
  171    171   
            for (key_12, value_13) in &inner.0 {
  172    172   
                {
  173    173   
                    object_11.key(key_12.as_str()).string(value_13.as_str());
  174    174   
                }
  175    175   
            }
  176    176   
            object_11.finish();
  177    177   
        }
  178    178   
    }

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/src/protocol_serde/shape_constrained_union_in_output.rs

@@ -1,1 +15,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_constrained_union_in_output(
    3      3   
    object_4: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::model::ConstrainedUnionInOutput,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::model::ConstrainedUnionInOutput::Structure(inner) => {
           7  +
        crate::model::ConstrainedUnionInOutput::Structure(_inner) => {
    8      8   
            #[allow(unused_mut)]
    9      9   
            let mut object_1 = object_4.key("structure").start_object();
   10     10   
            crate::protocol_serde::shape_transitively_constrained_structure_in_output::ser_transitively_constrained_structure_in_output(&mut object_1, inner)?;
   11     11   
            object_1.finish();
   12     12   
        }
   13     13   
    }
   14     14   
    Ok(())
   15     15   
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_constrained_union.rs

@@ -93,93 +180,180 @@
  113    113   
        );
  114    114   
    }
  115    115   
    Ok(variant)
  116    116   
}
  117    117   
  118    118   
pub fn ser_constrained_union(
  119    119   
    object_71: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  120    120   
    input: &crate::model::ConstrainedUnion,
  121    121   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  122    122   
    match input {
  123         -
        crate::model::ConstrainedUnion::EnumString(inner) => {
         123  +
        crate::model::ConstrainedUnion::EnumString(_inner) => {
  124    124   
            object_71.key("enumString").string(inner.as_str());
  125    125   
        }
  126         -
        crate::model::ConstrainedUnion::LengthString(inner) => {
         126  +
        crate::model::ConstrainedUnion::LengthString(_inner) => {
  127    127   
            object_71.key("lengthString").string(inner.as_str());
  128    128   
        }
  129         -
        crate::model::ConstrainedUnion::ConstrainedStructure(inner) => {
         129  +
        crate::model::ConstrainedUnion::ConstrainedStructure(_inner) => {
  130    130   
            #[allow(unused_mut)]
  131    131   
            let mut object_1 = object_71.key("constrainedStructure").start_object();
  132    132   
            crate::protocol_serde::shape_con_b::ser_con_b(&mut object_1, inner)?;
  133    133   
            object_1.finish();
  134    134   
        }
  135         -
        crate::model::ConstrainedUnion::ConBList(inner) => {
         135  +
        crate::model::ConstrainedUnion::ConBList(_inner) => {
  136    136   
            let mut array_2 = object_71.key("conBList").start_array();
  137    137   
            for item_3 in inner {
  138    138   
                {
  139    139   
                    let mut array_4 = array_2.value().start_array();
  140    140   
                    for item_5 in item_3 {
  141    141   
                        {
  142    142   
                            #[allow(unused_mut)]
  143    143   
                            let mut object_6 = array_4.value().start_object();
  144    144   
                            crate::protocol_serde::shape_con_b::ser_con_b(&mut object_6, item_5)?;
  145    145   
                            object_6.finish();
  146    146   
                        }
  147    147   
                    }
  148    148   
                    array_4.finish();
  149    149   
                }
  150    150   
            }
  151    151   
            array_2.finish();
  152    152   
        }
  153         -
        crate::model::ConstrainedUnion::ConBSet(inner) => {
         153  +
        crate::model::ConstrainedUnion::ConBSet(_inner) => {
  154    154   
            let mut array_7 = object_71.key("conBSet").start_array();
  155    155   
            for item_8 in inner {
  156    156   
                {
  157    157   
                    let mut array_9 = array_7.value().start_array();
  158    158   
                    for item_10 in item_8 {
  159    159   
                        {
  160    160   
                            array_9.value().string(item_10.as_str());
  161    161   
                        }
  162    162   
                    }
  163    163   
                    array_9.finish();
  164    164   
                }
  165    165   
            }
  166    166   
            array_7.finish();
  167    167   
        }
  168         -
        crate::model::ConstrainedUnion::ConBMap(inner) => {
         168  +
        crate::model::ConstrainedUnion::ConBMap(_inner) => {
  169    169   
            #[allow(unused_mut)]
  170    170   
            let mut object_11 = object_71.key("conBMap").start_object();
  171    171   
            for (key_12, value_13) in inner {
  172    172   
                {
  173    173   
                    object_11.key(key_12.as_str()).string(value_13.as_str());
  174    174   
                }
  175    175   
            }
  176    176   
            object_11.finish();
  177    177   
        }
  178    178   
    }

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_constrained_union_in_output.rs

@@ -1,1 +15,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_constrained_union_in_output(
    3      3   
    object_4: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::model::ConstrainedUnionInOutput,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::model::ConstrainedUnionInOutput::Structure(inner) => {
           7  +
        crate::model::ConstrainedUnionInOutput::Structure(_inner) => {
    8      8   
            #[allow(unused_mut)]
    9      9   
            let mut object_1 = object_4.key("structure").start_object();
   10     10   
            crate::protocol_serde::shape_transitively_constrained_structure_in_output::ser_transitively_constrained_structure_in_output(&mut object_1, inner)?;
   11     11   
            object_1.finish();
   12     12   
        }
   13     13   
    }
   14     14   
    Ok(())
   15     15   
}

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

@@ -121,121 +212,212 @@
  141    141   
        );
  142    142   
    }
  143    143   
    Ok(variant)
  144    144   
}
  145    145   
  146    146   
pub fn ser_my_union(
  147    147   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  148    148   
    input: &crate::model::MyUnion,
  149    149   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  150    150   
    match input {
  151         -
        crate::model::MyUnion::StringValue(inner) => {
         151  +
        crate::model::MyUnion::StringValue(_inner) => {
  152    152   
            object_2.key("stringValue").string(inner.as_str());
  153    153   
        }
  154         -
        crate::model::MyUnion::BooleanValue(inner) => {
         154  +
        crate::model::MyUnion::BooleanValue(_inner) => {
  155    155   
            object_2.key("booleanValue").boolean(*inner);
  156    156   
        }
  157         -
        crate::model::MyUnion::NumberValue(inner) => {
         157  +
        crate::model::MyUnion::NumberValue(_inner) => {
  158    158   
            object_2.key("numberValue").number(
  159    159   
                #[allow(clippy::useless_conversion)]
  160    160   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  161    161   
            );
  162    162   
        }
  163         -
        crate::model::MyUnion::BlobValue(inner) => {
         163  +
        crate::model::MyUnion::BlobValue(_inner) => {
  164    164   
            object_2
  165    165   
                .key("blobValue")
  166    166   
                .string_unchecked(&::aws_smithy_types::base64::encode(inner));
  167    167   
        }
  168         -
        crate::model::MyUnion::TimestampValue(inner) => {
         168  +
        crate::model::MyUnion::TimestampValue(_inner) => {
  169    169   
            object_2
  170    170   
                .key("timestampValue")
  171    171   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  172    172   
        }
  173         -
        crate::model::MyUnion::EnumValue(inner) => {
         173  +
        crate::model::MyUnion::EnumValue(_inner) => {
  174    174   
            object_2.key("enumValue").string(inner.as_str());
  175    175   
        }
  176         -
        crate::model::MyUnion::IntEnumValue(inner) => {
         176  +
        crate::model::MyUnion::IntEnumValue(_inner) => {
  177    177   
            object_2.key("intEnumValue").number(
  178    178   
                #[allow(clippy::useless_conversion)]
  179    179   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  180    180   
            );
  181    181   
        }
  182         -
        crate::model::MyUnion::ListValue(inner) => {
         182  +
        crate::model::MyUnion::ListValue(_inner) => {
  183    183   
            let mut array_1 = object_2.key("listValue").start_array();
  184    184   
            for item_2 in inner {
  185    185   
                {
  186    186   
                    array_1.value().string(item_2.as_str());
  187    187   
                }
  188    188   
            }
  189    189   
            array_1.finish();
  190    190   
        }
  191         -
        crate::model::MyUnion::MapValue(inner) => {
         191  +
        crate::model::MyUnion::MapValue(_inner) => {
  192    192   
            #[allow(unused_mut)]
  193    193   
            let mut object_3 = object_2.key("mapValue").start_object();
  194    194   
            for (key_4, value_5) in inner {
  195    195   
                {
  196    196   
                    object_3.key(key_4.as_str()).string(value_5.as_str());
  197    197   
                }
  198    198   
            }
  199    199   
            object_3.finish();
  200    200   
        }
  201         -
        crate::model::MyUnion::StructureValue(inner) => {
         201  +
        crate::model::MyUnion::StructureValue(_inner) => {
  202    202   
            #[allow(unused_mut)]
  203    203   
            let mut object_6 = object_2.key("structureValue").start_object();
  204    204   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(
  205    205   
                &mut object_6,
  206    206   
                inner,
  207    207   
            )?;
  208    208   
            object_6.finish();
  209    209   
        }
  210    210   
    }
  211    211   
    Ok(())

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

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

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

@@ -90,90 +136,136 @@
  110    110   
        );
  111    111   
    }
  112    112   
    Ok(variant)
  113    113   
}
  114    114   
  115    115   
pub fn ser_a_union(
  116    116   
    object_8: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  117    117   
    input: &crate::model::AUnion,
  118    118   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  119    119   
    match input {
  120         -
        crate::model::AUnion::I32(inner) => {
         120  +
        crate::model::AUnion::I32(_inner) => {
  121    121   
            object_8.key("i32").number(
  122    122   
                #[allow(clippy::useless_conversion)]
  123    123   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  124    124   
            );
  125    125   
        }
  126         -
        crate::model::AUnion::String(inner) => {
         126  +
        crate::model::AUnion::String(_inner) => {
  127    127   
            object_8.key("string").string(inner.as_str());
  128    128   
        }
  129         -
        crate::model::AUnion::Time(inner) => {
         129  +
        crate::model::AUnion::Time(_inner) => {
  130    130   
            object_8
  131    131   
                .key("time")
  132    132   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  133    133   
        }
  134    134   
    }
  135    135   
    Ok(())
  136    136   
}

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

@@ -62,62 +106,106 @@
   82     82   
        );
   83     83   
    }
   84     84   
    Ok(variant)
   85     85   
}
   86     86   
   87     87   
pub fn ser_some_union(
   88     88   
    object_14: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   89     89   
    input: &crate::model::SomeUnion,
   90     90   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   91     91   
    match input {
   92         -
        crate::model::SomeUnion::Result(inner) => {
          92  +
        crate::model::SomeUnion::Result(_inner) => {
   93     93   
            #[allow(unused_mut)]
   94     94   
            let mut object_1 = object_14.key("Result").start_object();
   95     95   
            crate::protocol_serde::shape_result::ser_result(&mut object_1, inner)?;
   96     96   
            object_1.finish();
   97     97   
        }
   98         -
        crate::model::SomeUnion::Option(inner) => {
          98  +
        crate::model::SomeUnion::Option(_inner) => {
   99     99   
            #[allow(unused_mut)]
  100    100   
            let mut object_2 = object_14.key("Option").start_object();
  101    101   
            crate::protocol_serde::shape_option::ser_option(&mut object_2, inner)?;
  102    102   
            object_2.finish();
  103    103   
        }
  104    104   
    }
  105    105   
    Ok(())
  106    106   
}

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

@@ -119,119 +213,213 @@
  139    139   
        );
  140    140   
    }
  141    141   
    Ok(variant)
  142    142   
}
  143    143   
  144    144   
pub fn ser_my_union(
  145    145   
    object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  146    146   
    input: &crate::model::MyUnion,
  147    147   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  148    148   
    match input {
  149         -
        crate::model::MyUnion::StringValue(inner) => {
         149  +
        crate::model::MyUnion::StringValue(_inner) => {
  150    150   
            object_2.key("stringValue").string(inner.as_str());
  151    151   
        }
  152         -
        crate::model::MyUnion::BooleanValue(inner) => {
         152  +
        crate::model::MyUnion::BooleanValue(_inner) => {
  153    153   
            object_2.key("booleanValue").boolean(*inner);
  154    154   
        }
  155         -
        crate::model::MyUnion::NumberValue(inner) => {
         155  +
        crate::model::MyUnion::NumberValue(_inner) => {
  156    156   
            object_2.key("numberValue").number(
  157    157   
                #[allow(clippy::useless_conversion)]
  158    158   
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  159    159   
            );
  160    160   
        }
  161         -
        crate::model::MyUnion::BlobValue(inner) => {
         161  +
        crate::model::MyUnion::BlobValue(_inner) => {
  162    162   
            object_2
  163    163   
                .key("blobValue")
  164    164   
                .string_unchecked(&::aws_smithy_types::base64::encode(inner));
  165    165   
        }
  166         -
        crate::model::MyUnion::TimestampValue(inner) => {
         166  +
        crate::model::MyUnion::TimestampValue(_inner) => {
  167    167   
            object_2
  168    168   
                .key("timestampValue")
  169    169   
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
  170    170   
        }
  171         -
        crate::model::MyUnion::EnumValue(inner) => {
         171  +
        crate::model::MyUnion::EnumValue(_inner) => {
  172    172   
            object_2.key("enumValue").string(inner.as_str());
  173    173   
        }
  174         -
        crate::model::MyUnion::ListValue(inner) => {
         174  +
        crate::model::MyUnion::ListValue(_inner) => {
  175    175   
            let mut array_1 = object_2.key("listValue").start_array();
  176    176   
            for item_2 in inner {
  177    177   
                {
  178    178   
                    array_1.value().string(item_2.as_str());
  179    179   
                }
  180    180   
            }
  181    181   
            array_1.finish();
  182    182   
        }
  183         -
        crate::model::MyUnion::MapValue(inner) => {
         183  +
        crate::model::MyUnion::MapValue(_inner) => {
  184    184   
            #[allow(unused_mut)]
  185    185   
            let mut object_3 = object_2.key("mapValue").start_object();
  186    186   
            for (key_4, value_5) in inner {
  187    187   
                {
  188    188   
                    object_3.key(key_4.as_str()).string(value_5.as_str());
  189    189   
                }
  190    190   
            }
  191    191   
            object_3.finish();
  192    192   
        }
  193         -
        crate::model::MyUnion::StructureValue(inner) => {
         193  +
        crate::model::MyUnion::StructureValue(_inner) => {
  194    194   
            #[allow(unused_mut)]
  195    195   
            let mut object_6 = object_2.key("structureValue").start_object();
  196    196   
            crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(
  197    197   
                &mut object_6,
  198    198   
                inner,
  199    199   
            )?;
  200    200   
            object_6.finish();
  201    201   
        }
  202         -
        crate::model::MyUnion::RenamedStructureValue(inner) => {
         202  +
        crate::model::MyUnion::RenamedStructureValue(_inner) => {
  203    203   
            #[allow(unused_mut)]
  204    204   
            let mut object_7 = object_2.key("renamedStructureValue").start_object();
  205    205   
            crate::protocol_serde::shape_renamed_greeting::ser_renamed_greeting(
  206    206   
                &mut object_7,
  207    207   
                inner,
  208    208   
            )?;
  209    209   
            object_7.finish();
  210    210   
        }
  211    211   
    }
  212    212   
    Ok(())

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

@@ -3,3 +63,63 @@
   23     23   
        );
   24     24   
    }
   25     25   
    result
   26     26   
}
   27     27   
   28     28   
pub fn ser_union_payload(
   29     29   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   30     30   
    input: &crate::model::UnionPayload,
   31     31   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   32     32   
    match input {
   33         -
        crate::model::UnionPayload::Greeting(inner) => {
          33  +
        crate::model::UnionPayload::Greeting(_inner) => {
   34     34   
            object.key("greeting").string(inner.as_str());
   35     35   
        }
   36     36   
    }
   37     37   
    Ok(())
   38     38   
}
   39     39   
   40     40   
pub(crate) fn de_union_payload<'a, I>(
   41     41   
    tokens: &mut ::std::iter::Peekable<I>,
   42     42   
) -> ::std::result::Result<
   43     43   
    Option<crate::model::UnionPayload>,

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

@@ -91,91 +132,132 @@
  111    111   
        );
  112    112   
    }
  113    113   
    Ok(variant)
  114    114   
}
  115    115   
  116    116   
pub fn ser_union_with_json_name(
  117    117   
    object_1: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  118    118   
    input: &crate::model::UnionWithJsonName,
  119    119   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
  120    120   
    match input {
  121         -
        crate::model::UnionWithJsonName::Foo(inner) => {
         121  +
        crate::model::UnionWithJsonName::Foo(_inner) => {
  122    122   
            object_1.key("FOO").string(inner.as_str());
  123    123   
        }
  124         -
        crate::model::UnionWithJsonName::Bar(inner) => {
         124  +
        crate::model::UnionWithJsonName::Bar(_inner) => {
  125    125   
            object_1.key("bar").string(inner.as_str());
  126    126   
        }
  127         -
        crate::model::UnionWithJsonName::Baz(inner) => {
         127  +
        crate::model::UnionWithJsonName::Baz(_inner) => {
  128    128   
            object_1.key("_baz").string(inner.as_str());
  129    129   
        }
  130    130   
    }
  131    131   
    Ok(())
  132    132   
}

tmp-codegen-diff/codegen-server-test/rest_json_extras/rust-server-codegen/src/protocol_serde/shape_single_element_union.rs

@@ -1,1 +12,12 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn ser_single_element_union(
    3      3   
    object_9: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      4   
    input: &crate::model::SingleElementUnion,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    match input {
    7         -
        crate::model::SingleElementUnion::A(inner) => {
           7  +
        crate::model::SingleElementUnion::A(_inner) => {
    8      8   
            object_9.key("a").string(inner.as_str());
    9      9   
        }
   10     10   
    }
   11     11   
    Ok(())
   12     12   
}

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

@@ -33,33 +95,95 @@
   53     53   
        ),
   54     54   
    }
   55     55   
}
   56     56   
   57     57   
pub fn ser_complex_union(
   58     58   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   59     59   
    input: &crate::model::ComplexUnion,
   60     60   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   61     61   
    encoder.map(1);
   62     62   
    match input {
   63         -
        crate::model::ComplexUnion::ComplexStruct(inner) => {
          63  +
        crate::model::ComplexUnion::ComplexStruct(_inner) => {
   64     64   
            encoder.str("complexStruct");
   65     65   
            crate::protocol_serde::shape_complex_struct::ser_complex_struct(encoder, inner)?;
   66     66   
        }
   67         -
        crate::model::ComplexUnion::Structure(inner) => {
          67  +
        crate::model::ComplexUnion::Structure(_inner) => {
   68     68   
            encoder.str("structure");
   69     69   
            crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, inner)?;
   70     70   
        }
   71         -
        crate::model::ComplexUnion::List(inner) => {
          71  +
        crate::model::ComplexUnion::List(_inner) => {
   72     72   
            encoder.str("list");
   73     73   
            encoder.array((*inner).len());
   74     74   
            for item_1 in inner {
   75     75   
                {
   76     76   
                    encoder.str(item_1.as_str());
   77     77   
                }
   78     78   
            }
   79     79   
        }
   80         -
        crate::model::ComplexUnion::Map(inner) => {
          80  +
        crate::model::ComplexUnion::Map(_inner) => {
   81     81   
            encoder.str("map");
   82     82   
            encoder.map((*inner).len());
   83     83   
            for (key_2, value_3) in inner {
   84     84   
                {
   85     85   
                    encoder.str(key_2.as_str()).integer(*value_3);
   86     86   
                }
   87     87   
            }
   88     88   
        }
   89         -
        crate::model::ComplexUnion::Union(inner) => {
          89  +
        crate::model::ComplexUnion::Union(_inner) => {
   90     90   
            encoder.str("union");
   91     91   
            crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, inner)?;
   92     92   
        }
   93     93   
    }
   94     94   
    ::std::result::Result::Ok(())
   95     95   
}

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

@@ -20,20 +59,59 @@
   40     40   
        ),
   41     41   
    }
   42     42   
}
   43     43   
   44     44   
pub fn ser_foo_choice(
   45     45   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   46     46   
    input: &crate::model::FooChoice,
   47     47   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   48     48   
    encoder.map(1);
   49     49   
    match input {
   50         -
        crate::model::FooChoice::Choice1(inner) => {
          50  +
        crate::model::FooChoice::Choice1(_inner) => {
   51     51   
            encoder.str("choice1").str(inner.as_str());
   52     52   
        }
   53         -
        crate::model::FooChoice::Choice2(inner) => {
          53  +
        crate::model::FooChoice::Choice2(_inner) => {
   54     54   
            encoder.str("choice2");
   55     55   
            crate::protocol_serde::shape_recursive_operation_input_output_nested1::ser_recursive_operation_input_output_nested1(encoder, inner )?;
   56     56   
        }
   57     57   
    }
   58     58   
    ::std::result::Result::Ok(())
   59     59   
}

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

@@ -27,27 +73,73 @@
   47     47   
        ),
   48     48   
    }
   49     49   
}
   50     50   
   51     51   
pub fn ser_simple_union(
   52     52   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   53     53   
    input: &crate::model::SimpleUnion,
   54     54   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   55     55   
    encoder.map(1);
   56     56   
    match input {
   57         -
        crate::model::SimpleUnion::Blob(inner) => {
          57  +
        crate::model::SimpleUnion::Blob(_inner) => {
   58     58   
            encoder.str("blob").blob(inner);
   59     59   
        }
   60         -
        crate::model::SimpleUnion::Boolean(inner) => {
          60  +
        crate::model::SimpleUnion::Boolean(_inner) => {
   61     61   
            encoder.str("boolean").boolean(*inner);
   62     62   
        }
   63         -
        crate::model::SimpleUnion::String(inner) => {
          63  +
        crate::model::SimpleUnion::String(_inner) => {
   64     64   
            encoder.str("string").str(inner.as_str());
   65     65   
        }
   66     66   
        crate::model::SimpleUnion::Unit => {
   67     67   
            encoder.str("unit");
   68     68   
            encoder.begin_map();
   69     69   
            encoder.end();
   70     70   
        }
   71     71   
    }
   72     72   
    ::std::result::Result::Ok(())
   73     73   
}