Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -182,182 +299,303 @@
  202    202   
pub(crate) mod shape_unit_input_and_output;
  203    203   
  204    204   
pub(crate) mod shape_all_query_string_types_input;
  205    205   
  206    206   
pub(crate) mod shape_complex_error;
  207    207   
  208    208   
pub(crate) mod shape_constant_and_variable_query_string_input;
  209    209   
  210    210   
pub(crate) mod shape_constant_query_string_input;
  211    211   
         212  +
/* JsonParserGenerator.kt:227 */
  212    213   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
  213    214   
    if data.is_empty() {
  214    215   
        b"{}"
  215    216   
    } else {
  216    217   
        data
  217    218   
    }
  218    219   
}
  219    220   
  220    221   
pub(crate) mod shape_content_type_parameters_output;
  221    222   
  222    223   
pub(crate) mod shape_datetime_offsets_output;
  223    224   
  224    225   
pub(crate) mod shape_document_type_as_map_value_output;
  225    226   
  226    227   
pub(crate) mod shape_document_type_as_payload_input;
  227    228   
         229  +
/* JsonSerializerGenerator.kt:303 */
  228    230   
pub fn serialize_document(input: &::aws_smithy_types::Document) -> ::std::vec::Vec<u8> {
  229    231   
    let mut out = String::new();
  230    232   
    ::aws_smithy_json::serialize::JsonValueWriter::new(&mut out).document(input);
  231    233   
    out.into_bytes()
  232    234   
}
  233    235   
  234    236   
pub(crate) mod shape_document_type_as_payload_output;
  235    237   
  236    238   
pub(crate) mod shape_document_type_output;
  237    239   
  238    240   
pub(crate) mod shape_empty_input_and_empty_output_output;
  239    241   
  240    242   
pub(crate) mod shape_foo_error;
  241    243   
  242    244   
pub(crate) mod shape_fractional_seconds_output;
  243    245   
  244    246   
pub(crate) mod shape_greeting_with_errors_output;
  245    247   
  246    248   
pub(crate) mod shape_http_checksum_required_output;
  247    249   
  248    250   
pub(crate) mod shape_http_enum_payload_input;
  249    251   
  250    252   
pub(crate) mod shape_http_enum_payload_output;
  251    253   
  252    254   
pub(crate) mod shape_http_payload_traits_input;
  253    255   
  254    256   
pub(crate) mod shape_http_payload_traits_output;
  255    257   
  256    258   
pub(crate) mod shape_http_payload_traits_with_media_type_input;
  257    259   
  258    260   
pub(crate) mod shape_http_payload_traits_with_media_type_output;
  259    261   
  260    262   
pub(crate) mod shape_http_payload_with_structure_input;
  261    263   
         264  +
/* JsonSerializerGenerator.kt:260 */
  262    265   
pub fn rest_json_unset_struct_payload() -> ::std::vec::Vec<u8> {
  263    266   
    b"{}"[..].into()
  264    267   
}
  265    268   
  266    269   
pub(crate) mod shape_http_payload_with_structure_output;
  267    270   
  268    271   
pub(crate) mod shape_http_payload_with_union_input;
  269    272   
         273  +
/* JsonSerializerGenerator.kt:272 */
  270    274   
pub fn rest_json_unset_union_payload() -> ::std::vec::Vec<u8> {
  271    275   
    ::std::vec::Vec::new()
  272    276   
}
  273    277   
  274    278   
pub(crate) mod shape_http_payload_with_union_output;
  275    279   
  276    280   
pub(crate) mod shape_http_prefix_headers_in_response_output;
  277    281   
  278    282   
pub(crate) mod shape_http_prefix_headers_input;
  279    283   

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

@@ -1,1 +263,465 @@
    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  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_all_query_string_types_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::AllQueryStringTypesInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::all_query_string_types_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:1073 */
   22     30   
        let query_string = uri.query().unwrap_or("");
   23     31   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
   24         -
        let mut query_params: ::std::collections::HashMap<
   25         -
            ::std::string::String,
   26         -
            ::std::vec::Vec<::std::string::String>,
   27         -
        > = ::std::collections::HashMap::new();
          32  +
        /* ServerHttpBoundProtocolGenerator.kt:1088 */
          33  +
        let mut query_params: ::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>> =
          34  +
            /* ServerHttpBoundProtocolGenerator.kt:1090 */::std::collections::HashMap::new()
          35  +
        /* ServerHttpBoundProtocolGenerator.kt:1088 */;
          36  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   28     37   
        let mut query_boolean_seen = false;
          38  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   29     39   
        let mut query_byte_seen = false;
          40  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   30     41   
        let mut query_double_seen = false;
          42  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   31     43   
        let mut query_enum_seen = false;
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   32     45   
        let mut query_float_seen = false;
          46  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   33     47   
        let mut query_integer_seen = false;
          48  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   34     49   
        let mut query_integer_enum_seen = false;
          50  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   35     51   
        let mut query_long_seen = false;
          52  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   36     53   
        let mut query_short_seen = false;
          54  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   37     55   
        let mut query_string_seen = false;
          56  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   38     57   
        let mut query_timestamp_seen = false;
          58  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   39     59   
        let mut query_boolean_list = Vec::new();
          60  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   40     61   
        let mut query_double_list = Vec::new();
          62  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   41     63   
        let mut query_enum_list = Vec::new();
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   42     65   
        let mut query_integer_enum_list = Vec::new();
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   43     67   
        let mut query_integer_list = Vec::new();
          68  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   44     69   
        let mut query_integer_set = Vec::new();
          70  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   45     71   
        let mut query_string_list = Vec::new();
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   46     73   
        let mut query_string_set = Vec::new();
          74  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
   47     75   
        let mut query_timestamp_list = Vec::new();
          76  +
        /* ServerHttpBoundProtocolGenerator.kt:1105 */
   48     77   
        for (k, v) in pairs {
          78  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   49     79   
            if !query_boolean_seen && k == "Boolean" {
   50     80   
                input = input.set_query_boolean(
   51     81   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_boolean(
   52     82   
                        &v,
   53     83   
                    )?,
   54     84   
                );
   55     85   
                query_boolean_seen = true;
   56     86   
            }
          87  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   57     88   
            if !query_byte_seen && k == "Byte" {
   58     89   
                input = input.set_query_byte(
   59     90   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_byte(&v)?,
   60     91   
                );
   61     92   
                query_byte_seen = true;
   62     93   
            }
          94  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   63     95   
            if !query_double_seen && k == "Double" {
   64     96   
                input = input.set_query_double(
   65     97   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_double(&v)?,
   66     98   
                );
   67     99   
                query_double_seen = true;
   68    100   
            }
         101  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   69    102   
            if !query_enum_seen && k == "Enum" {
   70    103   
                input = input.set_query_enum(
   71    104   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_enum(&v)?,
   72    105   
                );
   73    106   
                query_enum_seen = true;
   74    107   
            }
         108  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   75    109   
            if !query_float_seen && k == "Float" {
   76    110   
                input = input.set_query_float(
   77    111   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_float(&v)?,
   78    112   
                );
   79    113   
                query_float_seen = true;
   80    114   
            }
         115  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   81    116   
            if !query_integer_seen && k == "Integer" {
   82    117   
                input = input.set_query_integer(
   83    118   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_integer(
   84    119   
                        &v,
   85    120   
                    )?,
   86    121   
                );
   87    122   
                query_integer_seen = true;
   88    123   
            }
         124  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   89    125   
            if !query_integer_enum_seen && k == "IntegerEnum" {
   90    126   
                input = input.set_query_integer_enum(
   91    127   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_integer_enum(&v)?
   92    128   
                );
   93    129   
                query_integer_enum_seen = true;
   94    130   
            }
         131  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   95    132   
            if !query_long_seen && k == "Long" {
   96    133   
                input = input.set_query_long(
   97    134   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_long(&v)?,
   98    135   
                );
   99    136   
                query_long_seen = true;
  100    137   
            }
         138  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  101    139   
            if !query_short_seen && k == "Short" {
  102    140   
                input = input.set_query_short(
  103    141   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_short(&v)?,
  104    142   
                );
  105    143   
                query_short_seen = true;
  106    144   
            }
         145  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  107    146   
            if !query_string_seen && k == "String" {
  108    147   
                input = input.set_query_string(
  109    148   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_string(&v)?,
  110    149   
                );
  111    150   
                query_string_seen = true;
  112    151   
            }
         152  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  113    153   
            if !query_timestamp_seen && k == "Timestamp" {
  114    154   
                input = input.set_query_timestamp(
  115    155   
                    crate::protocol_serde::shape_all_query_string_types_input::de_query_timestamp(
  116    156   
                        &v,
  117    157   
                    )?,
  118    158   
                );
  119    159   
                query_timestamp_seen = true;
  120    160   
            }
         161  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
  121    162   
            if k == "BooleanList" {
         163  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  122    164   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         165  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  123    166   
                query_boolean_list.push(v);
  124         -
            } else if k == "DoubleList" {
         167  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         168  +
            }
         169  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         170  +
            else if k == "DoubleList" {
         171  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  125    172   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         173  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  126    174   
                query_double_list.push(v);
  127         -
            } else if k == "EnumList" {
         175  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         176  +
            }
         177  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         178  +
            else if k == "EnumList" {
         179  +
                /* ServerHttpBoundProtocolGenerator.kt:1132 */
  128    180   
                let v = v.clone().into_owned();
         181  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  129    182   
                query_enum_list.push(v);
  130         -
            } else if k == "IntegerEnumList" {
         183  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         184  +
            }
         185  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         186  +
            else if k == "IntegerEnumList" {
         187  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  131    188   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         189  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  132    190   
                query_integer_enum_list.push(v);
  133         -
            } else if k == "IntegerList" {
         191  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         192  +
            }
         193  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         194  +
            else if k == "IntegerList" {
         195  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  134    196   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         197  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  135    198   
                query_integer_list.push(v);
  136         -
            } else if k == "IntegerSet" {
         199  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         200  +
            }
         201  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         202  +
            else if k == "IntegerSet" {
         203  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  137    204   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         205  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  138    206   
                query_integer_set.push(v);
  139         -
            } else if k == "StringList" {
         207  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         208  +
            }
         209  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         210  +
            else if k == "StringList" {
         211  +
                /* ServerHttpBoundProtocolGenerator.kt:1132 */
  140    212   
                let v = v.clone().into_owned();
         213  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  141    214   
                query_string_list.push(v);
  142         -
            } else if k == "StringSet" {
         215  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         216  +
            }
         217  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         218  +
            else if k == "StringSet" {
         219  +
                /* ServerHttpBoundProtocolGenerator.kt:1132 */
  143    220   
                let v = v.clone().into_owned();
         221  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  144    222   
                query_string_set.push(v);
  145         -
            } else if k == "TimestampList" {
  146         -
                let v = ::aws_smithy_types::DateTime::from_str(
  147         -
                    &v,
  148         -
                    ::aws_smithy_types::date_time::Format::DateTime,
  149         -
                )?;
         223  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         224  +
            }
         225  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         226  +
            else if k == "TimestampList" {
         227  +
                /* ServerHttpBoundProtocolGenerator.kt:1146 */
         228  +
                let v = ::aws_smithy_types::DateTime::from_str(&v, ::aws_smithy_types::date_time::Format::DateTime)?
         229  +
                /* ServerHttpBoundProtocolGenerator.kt:1156 */;
         230  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  150    231   
                query_timestamp_list.push(v);
         232  +
                /* ServerHttpBoundProtocolGenerator.kt:1122 */
  151    233   
            }
         234  +
            /* ServerHttpBoundProtocolGenerator.kt:1197 */
  152    235   
            let entry = query_params.entry(String::from(k)).or_default();
  153    236   
            entry.push(String::from(v));
         237  +
            /* ServerHttpBoundProtocolGenerator.kt:1105 */
  154    238   
        }
  155         -
        input = input.set_query_params_map_of_string_list(Some(query_params));
         239  +
        /* ServerHttpBoundProtocolGenerator.kt:1213 */
         240  +
        input = input.set_query_params_map_of_string_list(
         241  +
            /* ServerHttpBoundProtocolGenerator.kt:1214 */
         242  +
            Some(
         243  +
                /* ServerHttpBoundProtocolGenerator.kt:1215 */
         244  +
                query_params, /* ServerHttpBoundProtocolGenerator.kt:1214 */
         245  +
            ), /* ServerHttpBoundProtocolGenerator.kt:1213 */
         246  +
        );
         247  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  156    248   
        if !query_boolean_list.is_empty() {
  157         -
            input = input.set_query_boolean_list(Some(query_boolean_list));
         249  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         250  +
            input = input.set_query_boolean_list(
         251  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         252  +
                Some(
         253  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         254  +
                    query_boolean_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         255  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         256  +
            );
         257  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  158    258   
        }
         259  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  159    260   
        if !query_double_list.is_empty() {
  160         -
            input = input.set_query_double_list(Some(query_double_list));
         261  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         262  +
            input = input.set_query_double_list(
         263  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         264  +
                Some(
         265  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         266  +
                    query_double_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         267  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         268  +
            );
         269  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  161    270   
        }
         271  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  162    272   
        if !query_enum_list.is_empty() {
  163         -
            input = input.set_query_enum_list(Some(
         273  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         274  +
            input = input.set_query_enum_list(
         275  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         276  +
                Some(
         277  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */
  164    278   
                    crate::unconstrained::foo_enum_list_unconstrained::FooEnumListUnconstrained(
  165         -
                    query_enum_list,
  166         -
                ),
  167         -
            ));
         279  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */
         280  +
                        query_enum_list, /* ServerHttpBoundProtocolGenerator.kt:1236 */
         281  +
                    ), /* ServerHttpBoundProtocolGenerator.kt:1235 */
         282  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         283  +
            );
         284  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  168    285   
        }
         286  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  169    287   
        if !query_integer_enum_list.is_empty() {
  170         -
            input = input.set_query_integer_enum_list(Some(query_integer_enum_list));
         288  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         289  +
            input = input.set_query_integer_enum_list(
         290  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         291  +
                Some(
         292  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         293  +
                    query_integer_enum_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         294  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         295  +
            );
         296  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  171    297   
        }
         298  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  172    299   
        if !query_integer_list.is_empty() {
  173         -
            input = input.set_query_integer_list(Some(query_integer_list));
         300  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         301  +
            input = input.set_query_integer_list(
         302  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         303  +
                Some(
         304  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         305  +
                    query_integer_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         306  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         307  +
            );
         308  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  174    309   
        }
         310  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  175    311   
        if !query_integer_set.is_empty() {
  176         -
            input = input.set_query_integer_set(Some(
         312  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         313  +
            input = input.set_query_integer_set(
         314  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         315  +
                Some(
         316  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */
  177    317   
                    crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained(
  178         -
                    query_integer_set,
  179         -
                ),
  180         -
            ));
         318  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */
         319  +
                        query_integer_set, /* ServerHttpBoundProtocolGenerator.kt:1236 */
         320  +
                    ), /* ServerHttpBoundProtocolGenerator.kt:1235 */
         321  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         322  +
            );
         323  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  181    324   
        }
         325  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  182    326   
        if !query_string_list.is_empty() {
  183         -
            input = input.set_query_string_list(Some(query_string_list));
         327  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         328  +
            input = input.set_query_string_list(
         329  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         330  +
                Some(
         331  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         332  +
                    query_string_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         333  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         334  +
            );
         335  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  184    336   
        }
         337  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  185    338   
        if !query_string_set.is_empty() {
  186         -
            input = input.set_query_string_set(Some(
         339  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         340  +
            input = input.set_query_string_set(
         341  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         342  +
                Some(
         343  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */
  187    344   
                    crate::unconstrained::string_set_unconstrained::StringSetUnconstrained(
  188         -
                    query_string_set,
  189         -
                ),
  190         -
            ));
         345  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */
         346  +
                        query_string_set, /* ServerHttpBoundProtocolGenerator.kt:1236 */
         347  +
                    ), /* ServerHttpBoundProtocolGenerator.kt:1235 */
         348  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         349  +
            );
         350  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  191    351   
        }
         352  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  192    353   
        if !query_timestamp_list.is_empty() {
  193         -
            input = input.set_query_timestamp_list(Some(query_timestamp_list));
         354  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         355  +
            input = input.set_query_timestamp_list(
         356  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */
         357  +
                Some(
         358  +
                    /* ServerHttpBoundProtocolGenerator.kt:1244 */
         359  +
                    query_timestamp_list, /* ServerHttpBoundProtocolGenerator.kt:1235 */
         360  +
                ), /* ServerHttpBoundProtocolGenerator.kt:1229 */
         361  +
            );
         362  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
  194    363   
        }
         364  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
  195    365   
        input.build()?
         366  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
  196    367   
    })
         368  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
  197    369   
}
  198    370   
         371  +
/* RustType.kt:516 */
  199    372   
#[allow(clippy::unnecessary_wraps)]
         373  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
  200    374   
pub fn ser_all_query_string_types_http_response(
  201    375   
    #[allow(unused_variables)] output: crate::output::AllQueryStringTypesOutput,
  202    376   
) -> std::result::Result<
  203    377   
    ::aws_smithy_http_server::response::Response,
  204    378   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  205    379   
> {
         380  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
  206    381   
    Ok({
         382  +
        /* RustType.kt:516 */
  207    383   
        #[allow(unused_mut)]
         384  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
  208    385   
        let mut builder = ::http::Response::builder();
         386  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
  209    387   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  210    388   
            builder,
  211    389   
            ::http::header::CONTENT_TYPE,
  212    390   
            "application/json",
  213    391   
        );
         392  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
  214    393   
        let http_status: u16 = 200;
  215    394   
        builder = builder.status(http_status);
  216         -
        let payload = "";
         395  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
         396  +
        let payload =
         397  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
         398  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
         399  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
  217    400   
        let content_length = payload.len();
  218    401   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  219    402   
            builder,
  220    403   
            ::http::header::CONTENT_LENGTH,
  221    404   
            content_length,
  222    405   
        );
         406  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
  223    407   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         408  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
  224    409   
        builder.body(body)?
         410  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
  225    411   
    })
         412  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
  226    413   
}
  227    414   
         415  +
/* RustType.kt:516 */
  228    416   
#[allow(clippy::unnecessary_wraps)]
         417  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
  229    418   
pub fn ser_all_query_string_types_http_error(
  230    419   
    error: &crate::error::AllQueryStringTypesError,
  231    420   
) -> std::result::Result<
  232    421   
    ::aws_smithy_http_server::response::Response,
  233    422   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  234    423   
> {
         424  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
  235    425   
    Ok({
         426  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
  236    427   
        match error {
         428  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  237    429   
            crate::error::AllQueryStringTypesError::ValidationException(output) => {
         430  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  238    431   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         432  +
                /* RustType.kt:516 */
  239    433   
                #[allow(unused_mut)]
         434  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  240    435   
                let mut builder = ::http::Response::builder();
         436  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  241    437   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  242    438   
                    builder,
  243    439   
                    ::http::header::CONTENT_TYPE,
  244    440   
                    "application/json",
  245    441   
                );
         442  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  246    443   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  247    444   
                    builder,
  248    445   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  249    446   
                    "ValidationException",
  250    447   
                );
         448  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  251    449   
                let content_length = payload.len();
  252    450   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  253    451   
                    builder,
  254    452   
                    ::http::header::CONTENT_LENGTH,
  255    453   
                    content_length,
  256    454   
                );
         455  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  257    456   
                builder
  258    457   
                    .status(400)
  259    458   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         459  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         460  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  260    461   
        }
  261         -
        }
         462  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  262    463   
    })
         464  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  263    465   
}

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

@@ -1,1 +113,155 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
    2      3   
pub fn de_query_boolean(
    3      4   
    value: &str,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<bool>,
    6      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      8   
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
    8     10   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          11  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
    9     12   
    Ok(Some(value))
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   10     14   
}
   11     15   
          16  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   12     17   
pub fn de_query_byte(
   13     18   
    value: &str,
   14     19   
) -> std::result::Result<
   15     20   
    ::std::option::Option<i8>,
   16     21   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   17     22   
> {
          23  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   18     24   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          25  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   19     26   
    Ok(Some(value))
          27  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   20     28   
}
   21     29   
          30  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   22     31   
pub fn de_query_double(
   23     32   
    value: &str,
   24     33   
) -> std::result::Result<
   25     34   
    ::std::option::Option<f64>,
   26     35   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   27     36   
> {
          37  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   28     38   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          39  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   29     40   
    Ok(Some(value))
          41  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   30     42   
}
   31     43   
          44  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   32     45   
pub fn de_query_enum(
   33     46   
    value: &str,
   34     47   
) -> std::result::Result<
   35     48   
    ::std::option::Option<::std::string::String>,
   36     49   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   37     50   
> {
          51  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
   38     52   
    let value = value.to_owned();
          53  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   39     54   
    Ok(Some(value))
          55  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   40     56   
}
   41     57   
          58  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   42     59   
pub fn de_query_float(
   43     60   
    value: &str,
   44     61   
) -> std::result::Result<
   45     62   
    ::std::option::Option<f32>,
   46     63   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   47     64   
> {
          65  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   48     66   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          67  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   49     68   
    Ok(Some(value))
          69  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   50     70   
}
   51     71   
          72  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   52     73   
pub fn de_query_integer(
   53     74   
    value: &str,
   54     75   
) -> std::result::Result<
   55     76   
    ::std::option::Option<i32>,
   56     77   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   57     78   
> {
          79  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   58     80   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          81  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   59     82   
    Ok(Some(value))
          83  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   60     84   
}
   61     85   
          86  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   62     87   
pub fn de_query_integer_enum(
   63     88   
    value: &str,
   64     89   
) -> std::result::Result<
   65     90   
    ::std::option::Option<i32>,
   66     91   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   67     92   
> {
          93  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   68     94   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          95  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   69     96   
    Ok(Some(value))
          97  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   70     98   
}
   71     99   
         100  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   72    101   
pub fn de_query_long(
   73    102   
    value: &str,
   74    103   
) -> std::result::Result<
   75    104   
    ::std::option::Option<i64>,
   76    105   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   77    106   
> {
         107  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   78    108   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         109  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   79    110   
    Ok(Some(value))
         111  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   80    112   
}
   81    113   
         114  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   82    115   
pub fn de_query_short(
   83    116   
    value: &str,
   84    117   
) -> std::result::Result<
   85    118   
    ::std::option::Option<i16>,
   86    119   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   87    120   
> {
         121  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
   88    122   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         123  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   89    124   
    Ok(Some(value))
         125  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   90    126   
}
   91    127   
         128  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   92    129   
pub fn de_query_string(
   93    130   
    value: &str,
   94    131   
) -> std::result::Result<
   95    132   
    ::std::option::Option<::std::string::String>,
   96    133   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   97    134   
> {
         135  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
   98    136   
    let value = value.to_owned();
         137  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   99    138   
    Ok(Some(value))
         139  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  100    140   
}
  101    141   
         142  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  102    143   
pub fn de_query_timestamp(
  103    144   
    value: &str,
  104    145   
) -> std::result::Result<
  105    146   
    ::std::option::Option<::aws_smithy_types::DateTime>,
  106    147   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  107    148   
> {
  108         -
    let value = ::aws_smithy_types::DateTime::from_str(
  109         -
        value,
  110         -
        ::aws_smithy_types::date_time::Format::DateTime,
  111         -
    )?;
         149  +
    /* ServerHttpBoundProtocolGenerator.kt:1332 */
         150  +
    let value = ::aws_smithy_types::DateTime::from_str(value, ::aws_smithy_types::date_time::Format::DateTime)?
         151  +
    /* ServerHttpBoundProtocolGenerator.kt:1343 */;
         152  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  112    153   
    Ok(Some(value))
         154  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  113    155   
}

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

@@ -1,1 +50,74 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_boolean_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<bool>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          22  +
            /* JsonParserGenerator.kt:407 */
   19     23   
            let mut items = Vec::new();
          24  +
            /* JsonParserGenerator.kt:408 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:409 */
   21     27   
                match tokens.peek() {
          28  +
                    /* JsonParserGenerator.kt:410 */
   22     29   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          30  +
                        /* JsonParserGenerator.kt:411 */
   23     31   
                        tokens.next().transpose().unwrap();
   24     32   
                        break;
          33  +
                        /* JsonParserGenerator.kt:410 */
   25     34   
                    }
          35  +
                    /* JsonParserGenerator.kt:413 */
   26     36   
                    _ => {
   27         -
                        let value = ::aws_smithy_json::deserialize::token::expect_bool_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
          40  +
                        /* JsonParserGenerator.kt:419 */;
          41  +
                        /* JsonParserGenerator.kt:422 */
   30     42   
                        if let Some(value) = value {
   31     43   
                            items.push(value);
   32         -
                        } else {
          44  +
                        }
          45  +
                        /* JsonParserGenerator.kt:430 */
          46  +
                        else {
   33     47   
                            return Err(
   34     48   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   35     49   
                                    "dense list cannot contain null values",
   36     50   
                                ),
   37     51   
                            );
   38     52   
                        }
          53  +
                        /* JsonParserGenerator.kt:413 */
          54  +
                    } /* JsonParserGenerator.kt:409 */
   39     55   
                }
          56  +
                /* JsonParserGenerator.kt:408 */
   40     57   
            }
   41         -
            }
          58  +
            /* JsonParserGenerator.kt:446 */
   42     59   
            Ok(Some(items))
          60  +
            /* JsonParserGenerator.kt:713 */
   43     61   
        }
   44         -
        _ => Err(
          62  +
        /* JsonParserGenerator.kt:722 */
          63  +
        _ => {
          64  +
            /* JsonParserGenerator.kt:723 */
          65  +
            Err(
   45     66   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     67   
                    "expected start array or null",
   47     68   
                ),
   48         -
        ),
          69  +
            )
          70  +
            /* JsonParserGenerator.kt:722 */
          71  +
        } /* JsonParserGenerator.kt:712 */
   49     72   
    }
          73  +
    /* JsonParserGenerator.kt:398 */
   50     74   
}

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

@@ -1,1 +57,79 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_client_optional_defaults<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::ClientOptionalDefaults>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::client_optional_defaults::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     32   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
   25     34   
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
   26     36   
                            "member" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
   27     38   
                                if let Some(v) =
   28         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
   29         -
                                        tokens.next(),
   30         -
                                    )?
          39  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   31     40   
                                                    .map(i32::try_from)
   32     41   
                                                    .transpose()?
   33         -
                                {
          42  +
                                /* JsonParserGenerator.kt:278 */{
   34     43   
                                                                            builder = builder.set_member(v);
   35     44   
                                                                        }
          45  +
                                /* JsonParserGenerator.kt:262 */
   36     46   
                            }
   37         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          47  +
                            /* JsonParserGenerator.kt:290 */
          48  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   38     49   
                        }
          50  +
                        /* JsonParserGenerator.kt:686 */
   39     51   
                    }
          52  +
                    /* JsonParserGenerator.kt:695 */
   40     53   
                    other => {
   41     54   
                        return Err(
   42     55   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43     56   
                                format!("expected object key or end object, found: {:?}", other),
   44     57   
                            ),
   45     58   
                        )
          59  +
                    } /* JsonParserGenerator.kt:685 */
   46     60   
                }
          61  +
                /* JsonParserGenerator.kt:684 */
   47     62   
            }
   48         -
            }
          63  +
            /* JsonParserGenerator.kt:540 */
   49     64   
            Ok(Some(builder.build()))
          65  +
            /* JsonParserGenerator.kt:713 */
   50     66   
        }
   51         -
        _ => Err(
          67  +
        /* JsonParserGenerator.kt:722 */
          68  +
        _ => {
          69  +
            /* JsonParserGenerator.kt:723 */
          70  +
            Err(
   52     71   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   53     72   
                    "expected start object or null",
   54     73   
                ),
   55         -
        ),
          74  +
            )
          75  +
            /* JsonParserGenerator.kt:722 */
          76  +
        } /* JsonParserGenerator.kt:712 */
   56     77   
    }
          78  +
    /* JsonParserGenerator.kt:516 */
   57     79   
}

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

@@ -1,1 +53,79 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_complex_error_error(
    3      4   
    value: &crate::error::ComplexError,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_complex_error::ser_complex_error(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* HttpBindingGenerator.kt:542 */
   12     18   
pub fn ser_complex_error_headers(
   13     19   
    input: &crate::error::ComplexError,
   14     20   
    mut builder: ::http::response::Builder,
   15     21   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
   16     22   
{
          23  +
    /* HttpBindingGenerator.kt:592 */
   17     24   
    if let ::std::option::Option::Some(inner_1) = &input.header {
          25  +
        /* HttpBindingGenerator.kt:704 */
   18     26   
        let formatted_2 = inner_1.as_str();
          27  +
        /* HttpBindingGenerator.kt:705 */
   19     28   
        if !formatted_2.is_empty() {
          29  +
            /* HttpBindingGenerator.kt:706 */
   20     30   
            let header_value = formatted_2;
   21     31   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   22     32   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   23     33   
                    "header",
   24     34   
                    format!(
   25     35   
                        "`{}` cannot be used as a header value: {}",
   26     36   
                        &header_value, err
   27     37   
                    ),
   28     38   
                )
   29     39   
            })?;
   30     40   
            builder = builder.header("X-Header", header_value);
          41  +
            /* HttpBindingGenerator.kt:705 */
   31     42   
        }
          43  +
        /* HttpBindingGenerator.kt:592 */
   32     44   
    }
          45  +
    /* HttpBindingGenerator.kt:555 */
   33     46   
    Ok(builder)
          47  +
    /* HttpBindingGenerator.kt:542 */
   34     48   
}
   35     49   
          50  +
/* JsonSerializerGenerator.kt:358 */
   36     51   
pub fn ser_complex_error(
   37     52   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   38     53   
    input: &crate::error::ComplexError,
   39     54   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          55  +
    /* JsonSerializerGenerator.kt:382 */
   40     56   
    if let Some(var_3) = &input.nested {
          57  +
        /* JsonSerializerGenerator.kt:495 */
   41     58   
        #[allow(unused_mut)]
          59  +
        /* JsonSerializerGenerator.kt:496 */
   42     60   
        let mut object_4 = object.key("Nested").start_object();
          61  +
        /* JsonSerializerGenerator.kt:375 */
   43     62   
        crate::protocol_serde::shape_complex_nested_error_data::ser_complex_nested_error_data(
   44     63   
            &mut object_4,
   45     64   
            var_3,
   46     65   
        )?;
          66  +
        /* JsonSerializerGenerator.kt:515 */
   47     67   
        object_4.finish();
          68  +
        /* JsonSerializerGenerator.kt:382 */
   48     69   
    }
          70  +
    /* JsonSerializerGenerator.kt:382 */
   49     71   
    if let Some(var_5) = &input.top_level {
          72  +
        /* JsonSerializerGenerator.kt:423 */
   50     73   
        object.key("TopLevel").string(var_5.as_str());
          74  +
        /* JsonSerializerGenerator.kt:382 */
   51     75   
    }
          76  +
    /* JsonSerializerGenerator.kt:372 */
   52     77   
    Ok(())
          78  +
    /* JsonSerializerGenerator.kt:358 */
   53     79   
}

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

@@ -1,1 +10,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_complex_nested_error_data(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::model::ComplexNestedErrorData,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.foo {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("Fooooo").string(var_1.as_str());
          11  +
        /* JsonSerializerGenerator.kt:382 */
    8     12   
    }
          13  +
    /* JsonSerializerGenerator.kt:372 */
    9     14   
    Ok(())
          15  +
    /* JsonSerializerGenerator.kt:358 */
   10     16   
}

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

@@ -1,1 +73,105 @@
    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  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_constant_and_variable_query_string_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::ConstantAndVariableQueryStringInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::constant_and_variable_query_string_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:1073 */
   22     30   
        let query_string = uri.query().unwrap_or("");
   23     31   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          32  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   24     33   
        let mut baz_seen = false;
          34  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
   25     35   
        let mut maybe_set_seen = false;
          36  +
        /* ServerHttpBoundProtocolGenerator.kt:1105 */
   26     37   
        for (k, v) in pairs {
          38  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   27     39   
            if !baz_seen && k == "baz" {
   28     40   
                input = input.set_baz(
   29     41   
                    crate::protocol_serde::shape_constant_and_variable_query_string_input::de_baz(
   30     42   
                        &v,
   31     43   
                    )?,
   32     44   
                );
   33     45   
                baz_seen = true;
   34     46   
            }
          47  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
   35     48   
            if !maybe_set_seen && k == "maybeSet" {
   36     49   
                input = input.set_maybe_set(
   37     50   
                    crate::protocol_serde::shape_constant_and_variable_query_string_input::de_maybe_set(&v)?
   38     51   
                );
   39     52   
                maybe_set_seen = true;
   40     53   
            }
          54  +
            /* ServerHttpBoundProtocolGenerator.kt:1105 */
   41     55   
        }
          56  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   42     57   
        input.build()
          58  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   43     59   
    })
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   44     61   
}
   45     62   
          63  +
/* RustType.kt:516 */
   46     64   
#[allow(clippy::unnecessary_wraps)]
          65  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   47     66   
pub fn ser_constant_and_variable_query_string_http_response(
   48     67   
    #[allow(unused_variables)] output: crate::output::ConstantAndVariableQueryStringOutput,
   49     68   
) -> std::result::Result<
   50     69   
    ::aws_smithy_http_server::response::Response,
   51     70   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   52     71   
> {
          72  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   53     73   
    Ok({
          74  +
        /* RustType.kt:516 */
   54     75   
        #[allow(unused_mut)]
          76  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   55     77   
        let mut builder = ::http::Response::builder();
          78  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   56     79   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     80   
            builder,
   58     81   
            ::http::header::CONTENT_TYPE,
   59     82   
            "application/json",
   60     83   
        );
          84  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   61     85   
        let http_status: u16 = 200;
   62     86   
        builder = builder.status(http_status);
   63         -
        let payload = "";
          87  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          88  +
        let payload =
          89  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   64     92   
        let content_length = payload.len();
   65     93   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   66     94   
            builder,
   67     95   
            ::http::header::CONTENT_LENGTH,
   68     96   
            content_length,
   69     97   
        );
          98  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   70     99   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         100  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   71    101   
        builder.body(body)?
         102  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   72    103   
    })
         104  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   73    105   
}

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

@@ -1,1 +20,28 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
    2      3   
pub fn de_baz(
    3      4   
    value: &str,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<::std::string::String>,
    6      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      8   
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
    8     10   
    let value = value.to_owned();
          11  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
    9     12   
    Ok(Some(value))
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   10     14   
}
   11     15   
          16  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
   12     17   
pub fn de_maybe_set(
   13     18   
    value: &str,
   14     19   
) -> std::result::Result<
   15     20   
    ::std::option::Option<::std::string::String>,
   16     21   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   17     22   
> {
          23  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
   18     24   
    let value = value.to_owned();
          25  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   19     26   
    Ok(Some(value))
          27  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   20     28   
}

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

@@ -1,1 +110,153 @@
    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  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_constant_query_string_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::ConstantQueryStringInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::constant_query_string_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:986 */
   22     30   
        let input_string = uri.path();
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:998 */
   23     32   
        let (input_string, (_, m1)) =
   24     33   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   25     34   
                ::nom::sequence::preceded(
   26     35   
                    ::nom::bytes::complete::tag("/"),
   27     36   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
   28     37   
                        "ConstantQueryString",
   29     38   
                    ),
   30     39   
                ),
   31     40   
                ::nom::sequence::preceded(
   32     41   
                    ::nom::bytes::complete::tag("/"),
   33     42   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   34     43   
                        ::nom::bytes::complete::take_until("/"),
   35     44   
                        ::nom::combinator::rest,
   36     45   
                    )),
   37     46   
                ),
   38     47   
            ))(input_string)?;
   39     48   
        debug_assert_eq!("", input_string);
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
   40     50   
        input = input
   41     51   
            .set_hello(crate::protocol_serde::shape_constant_query_string_input::de_hello(m1)?);
          52  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   42     53   
        input.build()?
          54  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   43     55   
    })
          56  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   44     57   
}
   45     58   
          59  +
/* RustType.kt:516 */
   46     60   
#[allow(clippy::unnecessary_wraps)]
          61  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   47     62   
pub fn ser_constant_query_string_http_response(
   48     63   
    #[allow(unused_variables)] output: crate::output::ConstantQueryStringOutput,
   49     64   
) -> std::result::Result<
   50     65   
    ::aws_smithy_http_server::response::Response,
   51     66   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   52     67   
> {
          68  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   53     69   
    Ok({
          70  +
        /* RustType.kt:516 */
   54     71   
        #[allow(unused_mut)]
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   55     73   
        let mut builder = ::http::Response::builder();
          74  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   56     75   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     76   
            builder,
   58     77   
            ::http::header::CONTENT_TYPE,
   59     78   
            "application/json",
   60     79   
        );
          80  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   61     81   
        let http_status: u16 = 200;
   62     82   
        builder = builder.status(http_status);
   63         -
        let payload = "";
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          84  +
        let payload =
          85  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          87  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   64     88   
        let content_length = payload.len();
   65     89   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   66     90   
            builder,
   67     91   
            ::http::header::CONTENT_LENGTH,
   68     92   
            content_length,
   69     93   
        );
          94  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   70     95   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          96  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   71     97   
        builder.body(body)?
          98  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   72     99   
    })
         100  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   73    101   
}
   74    102   
         103  +
/* RustType.kt:516 */
   75    104   
#[allow(clippy::unnecessary_wraps)]
         105  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   76    106   
pub fn ser_constant_query_string_http_error(
   77    107   
    error: &crate::error::ConstantQueryStringError,
   78    108   
) -> std::result::Result<
   79    109   
    ::aws_smithy_http_server::response::Response,
   80    110   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   81    111   
> {
         112  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   82    113   
    Ok({
         114  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   83    115   
        match error {
         116  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   84    117   
            crate::error::ConstantQueryStringError::ValidationException(output) => {
         118  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   85    119   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         120  +
                /* RustType.kt:516 */
   86    121   
                #[allow(unused_mut)]
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   87    123   
                let mut builder = ::http::Response::builder();
         124  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   88    125   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   89    126   
                    builder,
   90    127   
                    ::http::header::CONTENT_TYPE,
   91    128   
                    "application/json",
   92    129   
                );
         130  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   93    131   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   94    132   
                    builder,
   95    133   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   96    134   
                    "ValidationException",
   97    135   
                );
         136  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   98    137   
                let content_length = payload.len();
   99    138   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  100    139   
                    builder,
  101    140   
                    ::http::header::CONTENT_LENGTH,
  102    141   
                    content_length,
  103    142   
                );
         143  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  104    144   
                builder
  105    145   
                    .status(400)
  106    146   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         147  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         148  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  107    149   
        }
  108         -
        }
         150  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  109    151   
    })
         152  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  110    153   
}

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

@@ -1,1 +12,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
    2      3   
pub fn de_hello(
    3      4   
    value: &str,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::string::String,
    6      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      8   
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1302 */
    8     10   
    let value = ::percent_encoding::percent_decode_str(value)
    9     11   
        .decode_utf8()?
   10     12   
        .into_owned();
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   11     14   
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   12     16   
}

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

@@ -1,1 +116,162 @@
    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  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_content_type_parameters_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::ContentTypeParametersInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::content_type_parameters_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:745 */
   22     30   
        let bytes = ::hyper::body::to_bytes(body).await?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:768 */
   23     32   
        if !bytes.is_empty() {
          33  +
            /* ServerHttpBoundProtocolGenerator.kt:769 */
   24     34   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     35   
                &headers,
   26     36   
                Some("application/json"),
   27     37   
            )?;
   28     38   
            input =
   29     39   
                crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters(
   30     40   
                    bytes.as_ref(),
   31     41   
                    input,
   32     42   
                )?;
          43  +
            /* ServerHttpBoundProtocolGenerator.kt:768 */
   33     44   
        }
          45  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   34     46   
        input.build()
          47  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   35     48   
    })
          49  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   36     50   
}
   37     51   
          52  +
/* RustType.kt:516 */
   38     53   
#[allow(clippy::unnecessary_wraps)]
          54  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   39     55   
pub fn ser_content_type_parameters_http_response(
   40     56   
    #[allow(unused_variables)] output: crate::output::ContentTypeParametersOutput,
   41     57   
) -> std::result::Result<
   42     58   
    ::aws_smithy_http_server::response::Response,
   43     59   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   44     60   
> {
          61  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   45     62   
    Ok({
          63  +
        /* RustType.kt:516 */
   46     64   
        #[allow(unused_mut)]
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   47     66   
        let mut builder = ::http::Response::builder();
          67  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   48     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     69   
            builder,
   50     70   
            ::http::header::CONTENT_TYPE,
   51     71   
            "application/json",
   52     72   
        );
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   53     74   
        let http_status: u16 = 200;
   54     75   
        builder = builder.status(http_status);
          76  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   55     77   
        let payload =
   56         -
            crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
   57         -
        ;
          78  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          80  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   58     81   
        let content_length = payload.len();
   59     82   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   60     83   
            builder,
   61     84   
            ::http::header::CONTENT_LENGTH,
   62     85   
            content_length,
   63     86   
        );
          87  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   64     88   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          89  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   65     90   
        builder.body(body)?
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   66     92   
    })
          93  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   67     94   
}
   68     95   
          96  +
/* JsonParserGenerator.kt:148 */
   69     97   
pub(crate) fn de_content_type_parameters(
   70     98   
    value: &[u8],
   71     99   
    mut builder: crate::input::content_type_parameters_input::Builder,
   72    100   
) -> ::std::result::Result<
   73    101   
    crate::input::content_type_parameters_input::Builder,
   74    102   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   75    103   
> {
         104  +
    /* JsonParserGenerator.kt:153 */
   76    105   
    let mut tokens_owned =
   77    106   
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
   78    107   
            .peekable();
   79    108   
    let tokens = &mut tokens_owned;
   80    109   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         110  +
    /* JsonParserGenerator.kt:684 */
   81    111   
    loop {
         112  +
        /* JsonParserGenerator.kt:685 */
   82    113   
        match tokens.next().transpose()? {
         114  +
            /* JsonParserGenerator.kt:686 */
   83    115   
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   84    116   
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         117  +
                /* JsonParserGenerator.kt:260 */
   85    118   
                match key.to_unescaped()?.as_ref() {
         119  +
                    /* JsonParserGenerator.kt:262 */
   86    120   
                    "value" => {
         121  +
                        /* JsonParserGenerator.kt:272 */
   87    122   
                        builder = builder.set_value(
         123  +
                            /* JsonParserGenerator.kt:365 */
   88    124   
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
   89    125   
                                tokens.next(),
   90    126   
                            )?
   91    127   
                            .map(i32::try_from)
   92         -
                            .transpose()?,
         128  +
                            .transpose()?, /* JsonParserGenerator.kt:272 */
   93    129   
                        );
         130  +
                        /* JsonParserGenerator.kt:262 */
   94    131   
                    }
   95         -
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         132  +
                    /* JsonParserGenerator.kt:290 */
         133  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   96    134   
                }
         135  +
                /* JsonParserGenerator.kt:686 */
   97    136   
            }
         137  +
            /* JsonParserGenerator.kt:695 */
   98    138   
            other => {
   99    139   
                return Err(
  100    140   
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  101    141   
                        "expected object key or end object, found: {:?}",
  102    142   
                        other
  103    143   
                    )),
  104    144   
                )
         145  +
            } /* JsonParserGenerator.kt:685 */
  105    146   
        }
         147  +
        /* JsonParserGenerator.kt:684 */
  106    148   
    }
  107         -
    }
         149  +
    /* JsonParserGenerator.kt:250 */
  108    150   
    if tokens.next().is_some() {
         151  +
        /* JsonParserGenerator.kt:251 */
  109    152   
        return Err(
  110    153   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  111    154   
                "found more JSON tokens after completing parsing",
  112    155   
            ),
  113    156   
        );
         157  +
        /* JsonParserGenerator.kt:250 */
  114    158   
    }
         159  +
    /* JsonParserGenerator.kt:163 */
  115    160   
    Ok(builder)
         161  +
    /* JsonParserGenerator.kt:148 */
  116    162   
}

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

@@ -1,1 +17,25 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_content_type_parameters_output_output_output(
    3      4   
    value: &crate::output::ContentTypeParametersOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_content_type_parameters_output_output(
   13     19   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    #[allow(unused_variables)] input: &crate::output::ContentTypeParametersOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:372 */
   16     23   
    Ok(())
          24  +
    /* JsonSerializerGenerator.kt:358 */
   17     25   
}

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

@@ -1,1 +56,80 @@
    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  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_datetime_offsets_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::DatetimeOffsetsInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::datetime_offsets_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:811 */
   22     30   
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   23     32   
        input.build()
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   24     34   
    })
          35  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   25     36   
}
   26     37   
          38  +
/* RustType.kt:516 */
   27     39   
#[allow(clippy::unnecessary_wraps)]
          40  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   28     41   
pub fn ser_datetime_offsets_http_response(
   29     42   
    #[allow(unused_variables)] output: crate::output::DatetimeOffsetsOutput,
   30     43   
) -> std::result::Result<
   31     44   
    ::aws_smithy_http_server::response::Response,
   32     45   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     46   
> {
          47  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   34     48   
    Ok({
          49  +
        /* RustType.kt:516 */
   35     50   
        #[allow(unused_mut)]
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   36     52   
        let mut builder = ::http::Response::builder();
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   37     54   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   38     55   
            builder,
   39     56   
            ::http::header::CONTENT_TYPE,
   40     57   
            "application/json",
   41     58   
        );
          59  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   42     60   
        let http_status: u16 = 200;
   43     61   
        builder = builder.status(http_status);
          62  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   44     63   
        let payload =
   45         -
            crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
   46         -
        ;
          64  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   47     67   
        let content_length = payload.len();
   48     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     69   
            builder,
   50     70   
            ::http::header::CONTENT_LENGTH,
   51     71   
            content_length,
   52     72   
        );
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   53     74   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   54     76   
        builder.body(body)?
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   55     78   
    })
          79  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   56     80   
}

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

@@ -1,1 +25,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_datetime_offsets_output_output_output(
    3      4   
    value: &crate::output::DatetimeOffsetsOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_datetime_offsets_output_output(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::output::DatetimeOffsetsOutput,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* JsonSerializerGenerator.kt:382 */
   19     26   
    if let Some(var_1) = &input.datetime {
          27  +
        /* JsonSerializerGenerator.kt:448 */
   20     28   
        object
   21     29   
            .key("datetime")
   22     30   
            .date_time(var_1, ::aws_smithy_types::date_time::Format::DateTime)?;
          31  +
        /* JsonSerializerGenerator.kt:382 */
   23     32   
    }
          33  +
    /* JsonSerializerGenerator.kt:372 */
   24     34   
    Ok(())
          35  +
    /* JsonSerializerGenerator.kt:358 */
   25     36   
}

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

@@ -1,1 +311,402 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_defaults<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::defaults::Builder>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::defaults::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     32   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
   25     34   
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
   26     36   
                            "defaultString" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
   27     38   
                                if let Some(v) =
   28         -
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
   29         -
                                        tokens.next(),
   30         -
                                    )?
   31         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   32         -
                                    .transpose()?
   33         -
                                {
          39  +
                                /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                    /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                        /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                    /* JsonParserGenerator.kt:339 */)
          43  +
                                /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                                /* JsonParserGenerator.kt:278 */{
   34     45   
                                                                            builder = builder.set_default_string(v);
   35     46   
                                                                        }
          47  +
                                /* JsonParserGenerator.kt:262 */
   36     48   
                            }
          49  +
                            /* JsonParserGenerator.kt:262 */
   37     50   
                            "defaultBoolean" => {
          51  +
                                /* JsonParserGenerator.kt:276 */
   38     52   
                                if let Some(v) =
   39         -
                                    ::aws_smithy_json::deserialize::token::expect_bool_or_null(
   40         -
                                        tokens.next(),
   41         -
                                    )?
   42         -
                                {
          53  +
                                /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
          54  +
                                /* JsonParserGenerator.kt:278 */{
   43     55   
                                                                            builder = builder.set_default_boolean(v);
   44     56   
                                                                        }
          57  +
                                /* JsonParserGenerator.kt:262 */
   45     58   
                            }
          59  +
                            /* JsonParserGenerator.kt:262 */
   46     60   
                            "defaultList" => {
          61  +
                                /* JsonParserGenerator.kt:276 */
   47     62   
                                if let Some(v) =
   48         -
                                crate::protocol_serde::shape_test_string_list::de_test_string_list(tokens)?
   49         -
                                {
          63  +
                                /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_test_string_list::de_test_string_list(tokens)?
          64  +
                                /* JsonParserGenerator.kt:278 */{
   50     65   
                                                                            builder = builder.set_default_list(v);
   51     66   
                                                                        }
          67  +
                                /* JsonParserGenerator.kt:262 */
   52     68   
                            }
          69  +
                            /* JsonParserGenerator.kt:262 */
   53     70   
                            "defaultDocumentMap" => {
   54         -
                                if let Some(v) = Some(
   55         -
                                    ::aws_smithy_json::deserialize::token::expect_document(tokens)?,
   56         -
                                ) {
          71  +
                                /* JsonParserGenerator.kt:276 */
          72  +
                                if let Some(v) =
          73  +
                                    /* JsonParserGenerator.kt:319 */
          74  +
                                    Some(
          75  +
                                        ::aws_smithy_json::deserialize::token::expect_document(
          76  +
                                            tokens,
          77  +
                                        )?,
          78  +
                                    )
          79  +
                                /* JsonParserGenerator.kt:278 */
          80  +
                                {
   57     81   
                                    builder = builder.set_default_document_map(v);
   58     82   
                                }
          83  +
                                /* JsonParserGenerator.kt:262 */
   59     84   
                            }
          85  +
                            /* JsonParserGenerator.kt:262 */
   60     86   
                            "defaultDocumentString" => {
   61         -
                                if let Some(v) = Some(
   62         -
                                    ::aws_smithy_json::deserialize::token::expect_document(tokens)?,
   63         -
                                ) {
          87  +
                                /* JsonParserGenerator.kt:276 */
          88  +
                                if let Some(v) =
          89  +
                                    /* JsonParserGenerator.kt:319 */
          90  +
                                    Some(
          91  +
                                        ::aws_smithy_json::deserialize::token::expect_document(
          92  +
                                            tokens,
          93  +
                                        )?,
          94  +
                                    )
          95  +
                                /* JsonParserGenerator.kt:278 */
          96  +
                                {
   64     97   
                                    builder = builder.set_default_document_string(v);
   65     98   
                                }
          99  +
                                /* JsonParserGenerator.kt:262 */
   66    100   
                            }
         101  +
                            /* JsonParserGenerator.kt:262 */
   67    102   
                            "defaultDocumentBoolean" => {
   68         -
                                if let Some(v) = Some(
   69         -
                                    ::aws_smithy_json::deserialize::token::expect_document(tokens)?,
   70         -
                                ) {
         103  +
                                /* JsonParserGenerator.kt:276 */
         104  +
                                if let Some(v) =
         105  +
                                    /* JsonParserGenerator.kt:319 */
         106  +
                                    Some(
         107  +
                                        ::aws_smithy_json::deserialize::token::expect_document(
         108  +
                                            tokens,
         109  +
                                        )?,
         110  +
                                    )
         111  +
                                /* JsonParserGenerator.kt:278 */
         112  +
                                {
   71    113   
                                    builder = builder.set_default_document_boolean(v);
   72    114   
                                }
         115  +
                                /* JsonParserGenerator.kt:262 */
   73    116   
                            }
         117  +
                            /* JsonParserGenerator.kt:262 */
   74    118   
                            "defaultDocumentList" => {
   75         -
                                if let Some(v) = Some(
   76         -
                                    ::aws_smithy_json::deserialize::token::expect_document(tokens)?,
   77         -
                                ) {
         119  +
                                /* JsonParserGenerator.kt:276 */
         120  +
                                if let Some(v) =
         121  +
                                    /* JsonParserGenerator.kt:319 */
         122  +
                                    Some(
         123  +
                                        ::aws_smithy_json::deserialize::token::expect_document(
         124  +
                                            tokens,
         125  +
                                        )?,
         126  +
                                    )
         127  +
                                /* JsonParserGenerator.kt:278 */
         128  +
                                {
   78    129   
                                    builder = builder.set_default_document_list(v);
   79    130   
                                }
         131  +
                                /* JsonParserGenerator.kt:262 */
   80    132   
                            }
         133  +
                            /* JsonParserGenerator.kt:262 */
   81    134   
                            "defaultNullDocument" => {
   82         -
                                builder = builder.set_default_null_document(Some(
   83         -
                                    ::aws_smithy_json::deserialize::token::expect_document(tokens)?,
   84         -
                                ));
   85         -
                            }
         135  +
                                /* JsonParserGenerator.kt:272 */
         136  +
                                builder = builder.set_default_null_document(
         137  +
                                    /* JsonParserGenerator.kt:319 */
         138  +
                                    Some(::aws_smithy_json::deserialize::token::expect_document(
         139  +
                                        tokens,
         140  +
                                    )?), /* JsonParserGenerator.kt:272 */
         141  +
                                );
         142  +
                                /* JsonParserGenerator.kt:262 */
         143  +
                            }
         144  +
                            /* JsonParserGenerator.kt:262 */
   86    145   
                            "defaultTimestamp" => {
         146  +
                                /* JsonParserGenerator.kt:276 */
   87    147   
                                if let Some(v) =
   88         -
                                    ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   89         -
                                        tokens.next(),
   90         -
                                        ::aws_smithy_types::date_time::Format::EpochSeconds,
   91         -
                                    )?
   92         -
                                {
         148  +
                                /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
         149  +
                                /* JsonParserGenerator.kt:278 */{
   93    150   
                                                                            builder = builder.set_default_timestamp(v);
   94    151   
                                                                        }
         152  +
                                /* JsonParserGenerator.kt:262 */
   95    153   
                            }
         154  +
                            /* JsonParserGenerator.kt:262 */
   96    155   
                            "defaultBlob" => {
         156  +
                                /* JsonParserGenerator.kt:276 */
   97    157   
                                if let Some(v) =
   98         -
                                    ::aws_smithy_json::deserialize::token::expect_blob_or_null(
   99         -
                                        tokens.next(),
  100         -
                                    )?
  101         -
                                {
         158  +
                                /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
         159  +
                                /* JsonParserGenerator.kt:278 */{
  102    160   
                                                                            builder = builder.set_default_blob(v);
  103    161   
                                                                        }
         162  +
                                /* JsonParserGenerator.kt:262 */
  104    163   
                            }
         164  +
                            /* JsonParserGenerator.kt:262 */
  105    165   
                            "defaultByte" => {
         166  +
                                /* JsonParserGenerator.kt:276 */
  106    167   
                                if let Some(v) =
  107         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  108         -
                                        tokens.next(),
  109         -
                                    )?
         168  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  110    169   
                                                    .map(i8::try_from)
  111    170   
                                                    .transpose()?
  112         -
                                {
         171  +
                                /* JsonParserGenerator.kt:278 */{
  113    172   
                                                                            builder = builder.set_default_byte(v);
  114    173   
                                                                        }
         174  +
                                /* JsonParserGenerator.kt:262 */
  115    175   
                            }
         176  +
                            /* JsonParserGenerator.kt:262 */
  116    177   
                            "defaultShort" => {
         178  +
                                /* JsonParserGenerator.kt:276 */
  117    179   
                                if let Some(v) =
  118         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  119         -
                                        tokens.next(),
  120         -
                                    )?
         180  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  121    181   
                                                    .map(i16::try_from)
  122    182   
                                                    .transpose()?
  123         -
                                {
         183  +
                                /* JsonParserGenerator.kt:278 */{
  124    184   
                                                                            builder = builder.set_default_short(v);
  125    185   
                                                                        }
         186  +
                                /* JsonParserGenerator.kt:262 */
  126    187   
                            }
         188  +
                            /* JsonParserGenerator.kt:262 */
  127    189   
                            "defaultInteger" => {
         190  +
                                /* JsonParserGenerator.kt:276 */
  128    191   
                                if let Some(v) =
  129         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  130         -
                                        tokens.next(),
  131         -
                                    )?
         192  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  132    193   
                                                    .map(i32::try_from)
  133    194   
                                                    .transpose()?
  134         -
                                {
         195  +
                                /* JsonParserGenerator.kt:278 */{
  135    196   
                                                                            builder = builder.set_default_integer(v);
  136    197   
                                                                        }
         198  +
                                /* JsonParserGenerator.kt:262 */
  137    199   
                            }
         200  +
                            /* JsonParserGenerator.kt:262 */
  138    201   
                            "defaultLong" => {
         202  +
                                /* JsonParserGenerator.kt:276 */
  139    203   
                                if let Some(v) =
  140         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  141         -
                                        tokens.next(),
  142         -
                                    )?
         204  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  143    205   
                                                    .map(i64::try_from)
  144    206   
                                                    .transpose()?
  145         -
                                {
         207  +
                                /* JsonParserGenerator.kt:278 */{
  146    208   
                                                                            builder = builder.set_default_long(v);
  147    209   
                                                                        }
         210  +
                                /* JsonParserGenerator.kt:262 */
  148    211   
                            }
         212  +
                            /* JsonParserGenerator.kt:262 */
  149    213   
                            "defaultFloat" => {
         214  +
                                /* JsonParserGenerator.kt:276 */
  150    215   
                                if let Some(v) =
  151         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  152         -
                                        tokens.next(),
  153         -
                                    )?
  154         -
                                    .map(|v| v.to_f32_lossy())
  155         -
                                {
         216  +
                                /* JsonParserGenerator.kt:361 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy())
         217  +
                                /* JsonParserGenerator.kt:278 */{
  156    218   
                                                                            builder = builder.set_default_float(v);
  157    219   
                                                                        }
         220  +
                                /* JsonParserGenerator.kt:262 */
  158    221   
                            }
         222  +
                            /* JsonParserGenerator.kt:262 */
  159    223   
                            "defaultDouble" => {
         224  +
                                /* JsonParserGenerator.kt:276 */
  160    225   
                                if let Some(v) =
  161         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  162         -
                                        tokens.next(),
  163         -
                                    )?
  164         -
                                    .map(|v| v.to_f64_lossy())
  165         -
                                {
         226  +
                                /* JsonParserGenerator.kt:363 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())
         227  +
                                /* JsonParserGenerator.kt:278 */{
  166    228   
                                                                            builder = builder.set_default_double(v);
  167    229   
                                                                        }
         230  +
                                /* JsonParserGenerator.kt:262 */
  168    231   
                            }
         232  +
                            /* JsonParserGenerator.kt:262 */
  169    233   
                            "defaultMap" => {
         234  +
                                /* JsonParserGenerator.kt:276 */
  170    235   
                                if let Some(v) =
  171         -
                                crate::protocol_serde::shape_test_string_map::de_test_string_map(tokens)?
  172         -
                                {
         236  +
                                /* JsonParserGenerator.kt:509 */crate::protocol_serde::shape_test_string_map::de_test_string_map(tokens)?
         237  +
                                /* JsonParserGenerator.kt:278 */{
  173    238   
                                                                            builder = builder.set_default_map(v);
  174    239   
                                                                        }
         240  +
                                /* JsonParserGenerator.kt:262 */
  175    241   
                            }
         242  +
                            /* JsonParserGenerator.kt:262 */
  176    243   
                            "defaultEnum" => {
         244  +
                                /* JsonParserGenerator.kt:276 */
  177    245   
                                if let Some(v) =
  178         -
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
  179         -
                                        tokens.next(),
  180         -
                                    )?
  181         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  182         -
                                    .transpose()?
  183         -
                                {
         246  +
                                /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
         247  +
                                    /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
         248  +
                                        /* JsonParserGenerator.kt:343 */u.into_owned()
         249  +
                                    /* JsonParserGenerator.kt:339 */)
         250  +
                                /* JsonParserGenerator.kt:354 */).transpose()?
         251  +
                                /* JsonParserGenerator.kt:278 */{
  184    252   
                                                                            builder = builder.set_default_enum(v);
  185    253   
                                                                        }
         254  +
                                /* JsonParserGenerator.kt:262 */
  186    255   
                            }
         256  +
                            /* JsonParserGenerator.kt:262 */
  187    257   
                            "defaultIntEnum" => {
         258  +
                                /* JsonParserGenerator.kt:276 */
  188    259   
                                if let Some(v) =
  189         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  190         -
                                        tokens.next(),
  191         -
                                    )?
         260  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  192    261   
                                                    .map(i32::try_from)
  193    262   
                                                    .transpose()?
  194         -
                                {
         263  +
                                /* JsonParserGenerator.kt:278 */{
  195    264   
                                                                            builder = builder.set_default_int_enum(v);
  196    265   
                                                                        }
         266  +
                                /* JsonParserGenerator.kt:262 */
  197    267   
                            }
         268  +
                            /* JsonParserGenerator.kt:262 */
  198    269   
                            "emptyString" => {
         270  +
                                /* JsonParserGenerator.kt:276 */
  199    271   
                                if let Some(v) =
  200         -
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
  201         -
                                        tokens.next(),
  202         -
                                    )?
  203         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  204         -
                                    .transpose()?
  205         -
                                {
         272  +
                                /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
         273  +
                                    /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
         274  +
                                        /* JsonParserGenerator.kt:348 */u.into_owned()
         275  +
                                    /* JsonParserGenerator.kt:339 */)
         276  +
                                /* JsonParserGenerator.kt:354 */).transpose()?
         277  +
                                /* JsonParserGenerator.kt:278 */{
  206    278   
                                                                            builder = builder.set_empty_string(v);
  207    279   
                                                                        }
         280  +
                                /* JsonParserGenerator.kt:262 */
  208    281   
                            }
         282  +
                            /* JsonParserGenerator.kt:262 */
  209    283   
                            "falseBoolean" => {
         284  +
                                /* JsonParserGenerator.kt:276 */
  210    285   
                                if let Some(v) =
  211         -
                                    ::aws_smithy_json::deserialize::token::expect_bool_or_null(
  212         -
                                        tokens.next(),
  213         -
                                    )?
  214         -
                                {
         286  +
                                /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
         287  +
                                /* JsonParserGenerator.kt:278 */{
  215    288   
                                                                            builder = builder.set_false_boolean(v);
  216    289   
                                                                        }
         290  +
                                /* JsonParserGenerator.kt:262 */
  217    291   
                            }
         292  +
                            /* JsonParserGenerator.kt:262 */
  218    293   
                            "emptyBlob" => {
         294  +
                                /* JsonParserGenerator.kt:276 */
  219    295   
                                if let Some(v) =
  220         -
                                    ::aws_smithy_json::deserialize::token::expect_blob_or_null(
  221         -
                                        tokens.next(),
  222         -
                                    )?
  223         -
                                {
         296  +
                                /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
         297  +
                                /* JsonParserGenerator.kt:278 */{
  224    298   
                                                                            builder = builder.set_empty_blob(v);
  225    299   
                                                                        }
         300  +
                                /* JsonParserGenerator.kt:262 */
  226    301   
                            }
         302  +
                            /* JsonParserGenerator.kt:262 */
  227    303   
                            "zeroByte" => {
         304  +
                                /* JsonParserGenerator.kt:276 */
  228    305   
                                if let Some(v) =
  229         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  230         -
                                        tokens.next(),
  231         -
                                    )?
         306  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  232    307   
                                                    .map(i8::try_from)
  233    308   
                                                    .transpose()?
  234         -
                                {
         309  +
                                /* JsonParserGenerator.kt:278 */{
  235    310   
                                                                            builder = builder.set_zero_byte(v);
  236    311   
                                                                        }
         312  +
                                /* JsonParserGenerator.kt:262 */
  237    313   
                            }
         314  +
                            /* JsonParserGenerator.kt:262 */
  238    315   
                            "zeroShort" => {
         316  +
                                /* JsonParserGenerator.kt:276 */
  239    317   
                                if let Some(v) =
  240         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  241         -
                                        tokens.next(),
  242         -
                                    )?
         318  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  243    319   
                                                    .map(i16::try_from)
  244    320   
                                                    .transpose()?
  245         -
                                {
         321  +
                                /* JsonParserGenerator.kt:278 */{
  246    322   
                                                                            builder = builder.set_zero_short(v);
  247    323   
                                                                        }
         324  +
                                /* JsonParserGenerator.kt:262 */
  248    325   
                            }
         326  +
                            /* JsonParserGenerator.kt:262 */
  249    327   
                            "zeroInteger" => {
         328  +
                                /* JsonParserGenerator.kt:276 */
  250    329   
                                if let Some(v) =
  251         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  252         -
                                        tokens.next(),
  253         -
                                    )?
         330  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  254    331   
                                                    .map(i32::try_from)
  255    332   
                                                    .transpose()?
  256         -
                                {
         333  +
                                /* JsonParserGenerator.kt:278 */{
  257    334   
                                                                            builder = builder.set_zero_integer(v);
  258    335   
                                                                        }
         336  +
                                /* JsonParserGenerator.kt:262 */
  259    337   
                            }
         338  +
                            /* JsonParserGenerator.kt:262 */
  260    339   
                            "zeroLong" => {
         340  +
                                /* JsonParserGenerator.kt:276 */
  261    341   
                                if let Some(v) =
  262         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  263         -
                                        tokens.next(),
  264         -
                                    )?
         342  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
  265    343   
                                                    .map(i64::try_from)
  266    344   
                                                    .transpose()?
  267         -
                                {
         345  +
                                /* JsonParserGenerator.kt:278 */{
  268    346   
                                                                            builder = builder.set_zero_long(v);
  269    347   
                                                                        }
         348  +
                                /* JsonParserGenerator.kt:262 */
  270    349   
                            }
         350  +
                            /* JsonParserGenerator.kt:262 */
  271    351   
                            "zeroFloat" => {
         352  +
                                /* JsonParserGenerator.kt:276 */
  272    353   
                                if let Some(v) =
  273         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  274         -
                                        tokens.next(),
  275         -
                                    )?
  276         -
                                    .map(|v| v.to_f32_lossy())
  277         -
                                {
         354  +
                                /* JsonParserGenerator.kt:361 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy())
         355  +
                                /* JsonParserGenerator.kt:278 */{
  278    356   
                                                                            builder = builder.set_zero_float(v);
  279    357   
                                                                        }
         358  +
                                /* JsonParserGenerator.kt:262 */
  280    359   
                            }
         360  +
                            /* JsonParserGenerator.kt:262 */
  281    361   
                            "zeroDouble" => {
         362  +
                                /* JsonParserGenerator.kt:276 */
  282    363   
                                if let Some(v) =
  283         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
  284         -
                                        tokens.next(),
  285         -
                                    )?
  286         -
                                    .map(|v| v.to_f64_lossy())
  287         -
                                {
         364  +
                                /* JsonParserGenerator.kt:363 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())
         365  +
                                /* JsonParserGenerator.kt:278 */{
  288    366   
                                                                            builder = builder.set_zero_double(v);
  289    367   
                                                                        }
         368  +
                                /* JsonParserGenerator.kt:262 */
  290    369   
                            }
  291         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         370  +
                            /* JsonParserGenerator.kt:290 */
         371  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  292    372   
                        }
         373  +
                        /* JsonParserGenerator.kt:686 */
  293    374   
                    }
         375  +
                    /* JsonParserGenerator.kt:695 */
  294    376   
                    other => {
  295    377   
                        return Err(
  296    378   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  297    379   
                                format!("expected object key or end object, found: {:?}", other),
  298    380   
                            ),
  299    381   
                        )
         382  +
                    } /* JsonParserGenerator.kt:685 */
  300    383   
                }
         384  +
                /* JsonParserGenerator.kt:684 */
  301    385   
            }
  302         -
            }
         386  +
            /* JsonParserGenerator.kt:540 */
  303    387   
            Ok(Some(builder))
         388  +
            /* JsonParserGenerator.kt:713 */
  304    389   
        }
  305         -
        _ => Err(
         390  +
        /* JsonParserGenerator.kt:722 */
         391  +
        _ => {
         392  +
            /* JsonParserGenerator.kt:723 */
         393  +
            Err(
  306    394   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  307    395   
                    "expected start object or null",
  308    396   
                ),
  309         -
        ),
         397  +
            )
         398  +
            /* JsonParserGenerator.kt:722 */
         399  +
        } /* JsonParserGenerator.kt:712 */
  310    400   
    }
         401  +
    /* JsonParserGenerator.kt:516 */
  311    402   
}