Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/kitchen_sink_operation/_kitchen_sink_operation_input.rs

@@ -165,165 +477,477 @@
  185    185   
    "aws.protocoltests.json.synthetic",
  186    186   
    "KitchenSinkOperationInput",
  187    187   
);
  188    188   
static KITCHENSINKOPERATIONINPUT_MEMBER_BLOB: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Blob",
  191    191   
        "aws.protocoltests.json.synthetic",
  192    192   
        "KitchenSinkOperationInput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::Blob,
  195         -
    "blob",
         195  +
    "Blob",
  196    196   
    0,
  197    197   
);
  198    198   
static KITCHENSINKOPERATIONINPUT_MEMBER_BOOLEAN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  199    199   
    ::aws_smithy_schema::ShapeId::from_static(
  200    200   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Boolean",
  201    201   
        "aws.protocoltests.json.synthetic",
  202    202   
        "KitchenSinkOperationInput",
  203    203   
    ),
  204    204   
    ::aws_smithy_schema::ShapeType::Boolean,
  205         -
    "boolean",
         205  +
    "Boolean",
  206    206   
    1,
  207    207   
);
  208    208   
static KITCHENSINKOPERATIONINPUT_MEMBER_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  209    209   
    ::aws_smithy_schema::ShapeId::from_static(
  210    210   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Double",
  211    211   
        "aws.protocoltests.json.synthetic",
  212    212   
        "KitchenSinkOperationInput",
  213    213   
    ),
  214    214   
    ::aws_smithy_schema::ShapeType::Double,
  215         -
    "double",
         215  +
    "Double",
  216    216   
    2,
  217    217   
);
  218    218   
static KITCHENSINKOPERATIONINPUT_MEMBER_EMPTY_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  219    219   
    ::aws_smithy_schema::ShapeId::from_static(
  220    220   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$EmptyStruct",
  221    221   
        "aws.protocoltests.json.synthetic",
  222    222   
        "KitchenSinkOperationInput",
  223    223   
    ),
  224    224   
    ::aws_smithy_schema::ShapeType::Structure,
  225         -
    "empty_struct",
         225  +
    "EmptyStruct",
  226    226   
    3,
  227    227   
);
  228    228   
static KITCHENSINKOPERATIONINPUT_MEMBER_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  229    229   
    ::aws_smithy_schema::ShapeId::from_static(
  230    230   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Float",
  231    231   
        "aws.protocoltests.json.synthetic",
  232    232   
        "KitchenSinkOperationInput",
  233    233   
    ),
  234    234   
    ::aws_smithy_schema::ShapeType::Float,
  235         -
    "float",
         235  +
    "Float",
  236    236   
    4,
  237    237   
);
  238    238   
static KITCHENSINKOPERATIONINPUT_MEMBER_HTTPDATE_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  239    239   
    ::aws_smithy_schema::ShapeId::from_static(
  240    240   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$HttpdateTimestamp",
  241    241   
        "aws.protocoltests.json.synthetic",
  242    242   
        "KitchenSinkOperationInput",
  243    243   
    ),
  244    244   
    ::aws_smithy_schema::ShapeType::Timestamp,
  245         -
    "httpdate_timestamp",
         245  +
    "HttpdateTimestamp",
  246    246   
    5,
  247    247   
)
  248    248   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
  249    249   
static KITCHENSINKOPERATIONINPUT_MEMBER_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  250    250   
    ::aws_smithy_schema::ShapeId::from_static(
  251    251   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Integer",
  252    252   
        "aws.protocoltests.json.synthetic",
  253    253   
        "KitchenSinkOperationInput",
  254    254   
    ),
  255    255   
    ::aws_smithy_schema::ShapeType::Integer,
  256         -
    "integer",
         256  +
    "Integer",
  257    257   
    6,
  258    258   
);
  259    259   
static KITCHENSINKOPERATIONINPUT_MEMBER_ISO8601_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  260    260   
    ::aws_smithy_schema::ShapeId::from_static(
  261    261   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Iso8601Timestamp",
  262    262   
        "aws.protocoltests.json.synthetic",
  263    263   
        "KitchenSinkOperationInput",
  264    264   
    ),
  265    265   
    ::aws_smithy_schema::ShapeType::Timestamp,
  266         -
    "iso8601_timestamp",
         266  +
    "Iso8601Timestamp",
  267    267   
    7,
  268    268   
)
  269    269   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  270    270   
static KITCHENSINKOPERATIONINPUT_MEMBER_JSON_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  271    271   
    ::aws_smithy_schema::ShapeId::from_static(
  272    272   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$JsonValue",
  273    273   
        "aws.protocoltests.json.synthetic",
  274    274   
        "KitchenSinkOperationInput",
  275    275   
    ),
  276    276   
    ::aws_smithy_schema::ShapeType::String,
  277         -
    "json_value",
         277  +
    "JsonValue",
  278    278   
    8,
  279    279   
);
  280    280   
static KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_LISTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  281    281   
    ::aws_smithy_schema::ShapeId::from_static(
  282    282   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$ListOfLists",
  283    283   
        "aws.protocoltests.json.synthetic",
  284    284   
        "KitchenSinkOperationInput",
  285    285   
    ),
  286    286   
    ::aws_smithy_schema::ShapeType::List,
  287         -
    "list_of_lists",
         287  +
    "ListOfLists",
  288    288   
    9,
  289    289   
);
  290    290   
static KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_MAPS_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  291    291   
    ::aws_smithy_schema::ShapeId::from_static(
  292    292   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$ListOfMapsOfStrings",
  293    293   
        "aws.protocoltests.json.synthetic",
  294    294   
        "KitchenSinkOperationInput",
  295    295   
    ),
  296    296   
    ::aws_smithy_schema::ShapeType::List,
  297         -
    "list_of_maps_of_strings",
         297  +
    "ListOfMapsOfStrings",
  298    298   
    10,
  299    299   
);
  300    300   
static KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  301    301   
    ::aws_smithy_schema::ShapeId::from_static(
  302    302   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$ListOfStrings",
  303    303   
        "aws.protocoltests.json.synthetic",
  304    304   
        "KitchenSinkOperationInput",
  305    305   
    ),
  306    306   
    ::aws_smithy_schema::ShapeType::List,
  307         -
    "list_of_strings",
         307  +
    "ListOfStrings",
  308    308   
    11,
  309    309   
);
  310    310   
static KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_STRUCTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  311    311   
    ::aws_smithy_schema::ShapeId::from_static(
  312    312   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$ListOfStructs",
  313    313   
        "aws.protocoltests.json.synthetic",
  314    314   
        "KitchenSinkOperationInput",
  315    315   
    ),
  316    316   
    ::aws_smithy_schema::ShapeType::List,
  317         -
    "list_of_structs",
         317  +
    "ListOfStructs",
  318    318   
    12,
  319    319   
);
  320    320   
static KITCHENSINKOPERATIONINPUT_MEMBER_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  321    321   
    ::aws_smithy_schema::ShapeId::from_static(
  322    322   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Long",
  323    323   
        "aws.protocoltests.json.synthetic",
  324    324   
        "KitchenSinkOperationInput",
  325    325   
    ),
  326    326   
    ::aws_smithy_schema::ShapeType::Long,
  327         -
    "long",
         327  +
    "Long",
  328    328   
    13,
  329    329   
);
  330    330   
static KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_LISTS_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  331    331   
    ::aws_smithy_schema::ShapeId::from_static(
  332    332   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$MapOfListsOfStrings",
  333    333   
        "aws.protocoltests.json.synthetic",
  334    334   
        "KitchenSinkOperationInput",
  335    335   
    ),
  336    336   
    ::aws_smithy_schema::ShapeType::Map,
  337         -
    "map_of_lists_of_strings",
         337  +
    "MapOfListsOfStrings",
  338    338   
    14,
  339    339   
);
  340    340   
static KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_MAPS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  341    341   
    ::aws_smithy_schema::ShapeId::from_static(
  342    342   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$MapOfMaps",
  343    343   
        "aws.protocoltests.json.synthetic",
  344    344   
        "KitchenSinkOperationInput",
  345    345   
    ),
  346    346   
    ::aws_smithy_schema::ShapeType::Map,
  347         -
    "map_of_maps",
         347  +
    "MapOfMaps",
  348    348   
    15,
  349    349   
);
  350    350   
static KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  351    351   
    ::aws_smithy_schema::ShapeId::from_static(
  352    352   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$MapOfStrings",
  353    353   
        "aws.protocoltests.json.synthetic",
  354    354   
        "KitchenSinkOperationInput",
  355    355   
    ),
  356    356   
    ::aws_smithy_schema::ShapeType::Map,
  357         -
    "map_of_strings",
         357  +
    "MapOfStrings",
  358    358   
    16,
  359    359   
);
  360    360   
static KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_STRUCTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  361    361   
    ::aws_smithy_schema::ShapeId::from_static(
  362    362   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$MapOfStructs",
  363    363   
        "aws.protocoltests.json.synthetic",
  364    364   
        "KitchenSinkOperationInput",
  365    365   
    ),
  366    366   
    ::aws_smithy_schema::ShapeType::Map,
  367         -
    "map_of_structs",
         367  +
    "MapOfStructs",
  368    368   
    17,
  369    369   
);
  370    370   
static KITCHENSINKOPERATIONINPUT_MEMBER_RECURSIVE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  371    371   
    ::aws_smithy_schema::ShapeId::from_static(
  372    372   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$RecursiveList",
  373    373   
        "aws.protocoltests.json.synthetic",
  374    374   
        "KitchenSinkOperationInput",
  375    375   
    ),
  376    376   
    ::aws_smithy_schema::ShapeType::List,
  377         -
    "recursive_list",
         377  +
    "RecursiveList",
  378    378   
    18,
  379    379   
);
  380    380   
static KITCHENSINKOPERATIONINPUT_MEMBER_RECURSIVE_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  381    381   
    ::aws_smithy_schema::ShapeId::from_static(
  382    382   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$RecursiveMap",
  383    383   
        "aws.protocoltests.json.synthetic",
  384    384   
        "KitchenSinkOperationInput",
  385    385   
    ),
  386    386   
    ::aws_smithy_schema::ShapeType::Map,
  387         -
    "recursive_map",
         387  +
    "RecursiveMap",
  388    388   
    19,
  389    389   
);
  390    390   
static KITCHENSINKOPERATIONINPUT_MEMBER_RECURSIVE_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  391    391   
    ::aws_smithy_schema::ShapeId::from_static(
  392    392   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$RecursiveStruct",
  393    393   
        "aws.protocoltests.json.synthetic",
  394    394   
        "KitchenSinkOperationInput",
  395    395   
    ),
  396    396   
    ::aws_smithy_schema::ShapeType::Structure,
  397         -
    "recursive_struct",
         397  +
    "RecursiveStruct",
  398    398   
    20,
  399    399   
);
  400    400   
static KITCHENSINKOPERATIONINPUT_MEMBER_SIMPLE_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  401    401   
    ::aws_smithy_schema::ShapeId::from_static(
  402    402   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$SimpleStruct",
  403    403   
        "aws.protocoltests.json.synthetic",
  404    404   
        "KitchenSinkOperationInput",
  405    405   
    ),
  406    406   
    ::aws_smithy_schema::ShapeType::Structure,
  407         -
    "simple_struct",
         407  +
    "SimpleStruct",
  408    408   
    21,
  409    409   
);
  410    410   
static KITCHENSINKOPERATIONINPUT_MEMBER_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  411    411   
    ::aws_smithy_schema::ShapeId::from_static(
  412    412   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$String",
  413    413   
        "aws.protocoltests.json.synthetic",
  414    414   
        "KitchenSinkOperationInput",
  415    415   
    ),
  416    416   
    ::aws_smithy_schema::ShapeType::String,
  417         -
    "string",
         417  +
    "String",
  418    418   
    22,
  419    419   
);
  420    420   
static KITCHENSINKOPERATIONINPUT_MEMBER_STRUCT_WITH_JSON_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  421    421   
    ::aws_smithy_schema::ShapeId::from_static(
  422    422   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$StructWithJsonName",
  423    423   
        "aws.protocoltests.json.synthetic",
  424    424   
        "KitchenSinkOperationInput",
  425    425   
    ),
  426    426   
    ::aws_smithy_schema::ShapeType::Structure,
  427         -
    "struct_with_json_name",
         427  +
    "StructWithJsonName",
  428    428   
    23,
  429    429   
);
  430    430   
static KITCHENSINKOPERATIONINPUT_MEMBER_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  431    431   
    ::aws_smithy_schema::ShapeId::from_static(
  432    432   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$Timestamp",
  433    433   
        "aws.protocoltests.json.synthetic",
  434    434   
        "KitchenSinkOperationInput",
  435    435   
    ),
  436    436   
    ::aws_smithy_schema::ShapeType::Timestamp,
  437         -
    "timestamp",
         437  +
    "Timestamp",
  438    438   
    24,
  439    439   
);
  440    440   
static KITCHENSINKOPERATIONINPUT_MEMBER_UNIX_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  441    441   
    ::aws_smithy_schema::ShapeId::from_static(
  442    442   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationInput$UnixTimestamp",
  443    443   
        "aws.protocoltests.json.synthetic",
  444    444   
        "KitchenSinkOperationInput",
  445    445   
    ),
  446    446   
    ::aws_smithy_schema::ShapeType::Timestamp,
  447         -
    "unix_timestamp",
         447  +
    "UnixTimestamp",
  448    448   
    25,
  449    449   
)
  450    450   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
  451    451   
static KITCHENSINKOPERATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  452    452   
    KITCHENSINKOPERATIONINPUT_SCHEMA_ID,
  453    453   
    ::aws_smithy_schema::ShapeType::Structure,
  454    454   
    &[
  455    455   
        &KITCHENSINKOPERATIONINPUT_MEMBER_BLOB,
  456    456   
        &KITCHENSINKOPERATIONINPUT_MEMBER_BOOLEAN,
  457    457   
        &KITCHENSINKOPERATIONINPUT_MEMBER_DOUBLE,
@@ -495,495 +615,651 @@
  515    515   
            ser.write_timestamp(&KITCHENSINKOPERATIONINPUT_MEMBER_ISO8601_TIMESTAMP, val)?;
  516    516   
        }
  517    517   
        if let Some(ref val) = self.json_value {
  518    518   
            ser.write_string(&KITCHENSINKOPERATIONINPUT_MEMBER_JSON_VALUE, val)?;
  519    519   
        }
  520    520   
        if let Some(ref val) = self.list_of_lists {
  521    521   
            ser.write_list(
  522    522   
                &KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_LISTS,
  523    523   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  524    524   
                    for item in val {
  525         -
                        todo!("schema: unsupported list element type");
         525  +
                        ser.write_list(
         526  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         527  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         528  +
                                for item in item {
         529  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         530  +
                                }
         531  +
                                Ok(())
         532  +
                            },
         533  +
                        )?;
  526    534   
                    }
  527    535   
                    Ok(())
  528    536   
                },
  529    537   
            )?;
  530    538   
        }
  531    539   
        if let Some(ref val) = self.list_of_maps_of_strings {
  532    540   
            ser.write_list(
  533    541   
                &KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_MAPS_OF_STRINGS,
  534    542   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  535    543   
                    for item in val {
  536         -
                        todo!("schema: unsupported list element type");
         544  +
                        ser.write_map(
         545  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         546  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         547  +
                                for (key, value) in item {
         548  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         549  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         550  +
                                }
         551  +
                                Ok(())
         552  +
                            },
         553  +
                        )?;
  537    554   
                    }
  538    555   
                    Ok(())
  539    556   
                },
  540    557   
            )?;
  541    558   
        }
  542    559   
        if let Some(ref val) = self.list_of_strings {
  543    560   
            ser.write_list(
  544    561   
                &KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_STRINGS,
  545    562   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  546    563   
                    for item in val {
  547    564   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  548    565   
                    }
  549    566   
                    Ok(())
  550    567   
                },
  551    568   
            )?;
  552    569   
        }
  553    570   
        if let Some(ref val) = self.list_of_structs {
  554    571   
            ser.write_list(
  555    572   
                &KITCHENSINKOPERATIONINPUT_MEMBER_LIST_OF_STRUCTS,
  556    573   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  557    574   
                    for item in val {
  558    575   
                        ser.write_struct(crate::types::SimpleStruct::SCHEMA, item)?;
  559    576   
                    }
  560    577   
                    Ok(())
  561    578   
                },
  562    579   
            )?;
  563    580   
        }
  564    581   
        if let Some(ref val) = self.long {
  565    582   
            ser.write_long(&KITCHENSINKOPERATIONINPUT_MEMBER_LONG, *val)?;
  566    583   
        }
  567    584   
        if let Some(ref val) = self.map_of_lists_of_strings {
  568    585   
            ser.write_map(
  569    586   
                &KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_LISTS_OF_STRINGS,
  570    587   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  571    588   
                    for (key, value) in val {
  572    589   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  573         -
                        todo!("schema: unsupported map value type");
         590  +
         591  +
                        ser.write_list(
         592  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         593  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         594  +
                                for item in value {
         595  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         596  +
                                }
         597  +
                                Ok(())
         598  +
                            },
         599  +
                        )?;
  574    600   
                    }
  575    601   
                    Ok(())
  576    602   
                },
  577    603   
            )?;
  578    604   
        }
  579    605   
        if let Some(ref val) = self.map_of_maps {
  580    606   
            ser.write_map(
  581    607   
                &KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_MAPS,
  582    608   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  583    609   
                    for (key, value) in val {
  584    610   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  585         -
                        todo!("schema: unsupported map value type");
         611  +
         612  +
                        ser.write_map(
         613  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         614  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         615  +
                                for (key, value) in value {
         616  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         617  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         618  +
                                }
         619  +
                                Ok(())
         620  +
                            },
         621  +
                        )?;
  586    622   
                    }
  587    623   
                    Ok(())
  588    624   
                },
  589    625   
            )?;
  590    626   
        }
  591    627   
        if let Some(ref val) = self.map_of_strings {
  592    628   
            ser.write_map(
  593    629   
                &KITCHENSINKOPERATIONINPUT_MEMBER_MAP_OF_STRINGS,
  594    630   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  595    631   
                    for (key, value) in val {
@@ -631,667 +891,924 @@
  651    687   
            ser.write_timestamp(&KITCHENSINKOPERATIONINPUT_MEMBER_TIMESTAMP, val)?;
  652    688   
        }
  653    689   
        if let Some(ref val) = self.unix_timestamp {
  654    690   
            ser.write_timestamp(&KITCHENSINKOPERATIONINPUT_MEMBER_UNIX_TIMESTAMP, val)?;
  655    691   
        }
  656    692   
        Ok(())
  657    693   
    }
  658    694   
}
  659    695   
impl KitchenSinkOperationInput {
  660    696   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  661         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  662         -
        deserializer: &mut D,
         697  +
    pub fn deserialize(
         698  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  663    699   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  664    700   
        #[allow(unused_variables, unused_mut)]
  665    701   
        let mut builder = Self::builder();
  666    702   
        #[allow(
  667    703   
            unused_variables,
  668    704   
            unreachable_code,
  669    705   
            clippy::single_match,
  670    706   
            clippy::match_single_binding,
  671    707   
            clippy::diverging_sub_expression
  672    708   
        )]
  673         -
        deserializer.read_struct(&KITCHENSINKOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
         709  +
        deserializer.read_struct(&KITCHENSINKOPERATIONINPUT_SCHEMA, &mut |member, deser| {
  674    710   
            match member.member_index() {
  675    711   
                Some(0) => {
  676    712   
                    builder.blob = Some(deser.read_blob(member)?);
  677    713   
                }
  678    714   
                Some(1) => {
  679    715   
                    builder.boolean = Some(deser.read_boolean(member)?);
  680    716   
                }
  681    717   
                Some(2) => {
  682    718   
                    builder.double = Some(deser.read_double(member)?);
  683    719   
                }
  684    720   
                Some(3) => {
  685    721   
                    builder.empty_struct = Some(crate::types::EmptyStruct::deserialize(deser)?);
  686    722   
                }
  687    723   
                Some(4) => {
  688    724   
                    builder.float = Some(deser.read_float(member)?);
  689    725   
                }
  690    726   
                Some(5) => {
  691    727   
                    builder.httpdate_timestamp = Some(deser.read_timestamp(member)?);
  692    728   
                }
  693    729   
                Some(6) => {
  694    730   
                    builder.integer = Some(deser.read_integer(member)?);
  695    731   
                }
  696    732   
                Some(7) => {
  697    733   
                    builder.iso8601_timestamp = Some(deser.read_timestamp(member)?);
  698    734   
                }
  699    735   
                Some(8) => {
  700    736   
                    builder.json_value = Some(deser.read_string(member)?);
  701    737   
                }
  702    738   
                Some(9) => {
  703    739   
                    builder.list_of_lists = Some({
  704         -
                        let container = if let Some(cap) = deser.container_size() {
  705         -
                            Vec::with_capacity(cap)
  706         -
                        } else {
  707         -
                            Vec::new()
  708         -
                        };
  709         -
                        deser.read_list(member, container, |mut list, deser| {
  710         -
                            list.push(todo!("deserialize nested aggregate"));
  711         -
                            Ok(list)
  712         -
                        })?
         740  +
                        let mut container = Vec::new();
         741  +
                        deser.read_list(member, &mut |deser| {
         742  +
                            container.push({
         743  +
                                let mut list = Vec::new();
         744  +
                                deser.read_list(member, &mut |deser| {
         745  +
                                    list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
         746  +
                                    Ok(())
         747  +
                                })?;
         748  +
                                list
         749  +
                            });
         750  +
                            Ok(())
         751  +
                        })?;
         752  +
                        container
  713    753   
                    });
  714    754   
                }
  715    755   
                Some(10) => {
  716    756   
                    builder.list_of_maps_of_strings = Some({
  717         -
                        let container = if let Some(cap) = deser.container_size() {
  718         -
                            Vec::with_capacity(cap)
  719         -
                        } else {
  720         -
                            Vec::new()
  721         -
                        };
  722         -
                        deser.read_list(member, container, |mut list, deser| {
  723         -
                            list.push(todo!("deserialize nested aggregate"));
  724         -
                            Ok(list)
  725         -
                        })?
         757  +
                        let mut container = Vec::new();
         758  +
                        deser.read_list(member, &mut |deser| {
         759  +
                            container.push({
         760  +
                                let mut map = ::std::collections::HashMap::new();
         761  +
                                deser.read_map(member, &mut |key, deser| {
         762  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?;
         763  +
                                    map.insert(key, value);
         764  +
                                    Ok(())
         765  +
                                })?;
         766  +
                                map
         767  +
                            });
         768  +
                            Ok(())
         769  +
                        })?;
         770  +
                        container
  726    771   
                    });
  727    772   
                }
  728    773   
                Some(11) => {
  729         -
                    builder.list_of_strings = Some({
  730         -
                        let container = if let Some(cap) = deser.container_size() {
  731         -
                            Vec::with_capacity(cap)
  732         -
                        } else {
  733         -
                            Vec::new()
  734         -
                        };
  735         -
                        deser.read_list(member, container, |mut list, deser| {
  736         -
                            list.push(deser.read_string(member)?);
  737         -
                            Ok(list)
  738         -
                        })?
  739         -
                    });
         774  +
                    builder.list_of_strings = Some(deser.read_string_list(member)?);
  740    775   
                }
  741    776   
                Some(12) => {
  742    777   
                    builder.list_of_structs = Some({
  743         -
                        let container = if let Some(cap) = deser.container_size() {
  744         -
                            Vec::with_capacity(cap)
  745         -
                        } else {
  746         -
                            Vec::new()
  747         -
                        };
  748         -
                        deser.read_list(member, container, |mut list, deser| {
  749         -
                            list.push(crate::types::SimpleStruct::deserialize(deser)?);
  750         -
                            Ok(list)
  751         -
                        })?
         778  +
                        let mut container = Vec::new();
         779  +
                        deser.read_list(member, &mut |deser| {
         780  +
                            container.push(crate::types::SimpleStruct::deserialize(deser)?);
         781  +
                            Ok(())
         782  +
                        })?;
         783  +
                        container
  752    784   
                    });
  753    785   
                }
  754    786   
                Some(13) => {
  755    787   
                    builder.long = Some(deser.read_long(member)?);
  756    788   
                }
  757    789   
                Some(14) => {
  758    790   
                    builder.map_of_lists_of_strings = Some({
  759         -
                        let container = if let Some(cap) = deser.container_size() {
  760         -
                            std::collections::HashMap::with_capacity(cap)
  761         -
                        } else {
  762         -
                            std::collections::HashMap::new()
  763         -
                        };
  764         -
                        deser.read_map(member, container, |mut map, key, deser| {
  765         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  766         -
                            Ok(map)
  767         -
                        })?
         791  +
                        let mut container = std::collections::HashMap::new();
         792  +
                        deser.read_map(member, &mut |key, deser| {
         793  +
                            container.insert(key, {
         794  +
                                let mut list = Vec::new();
         795  +
                                deser.read_list(member, &mut |deser| {
         796  +
                                    list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
         797  +
                                    Ok(())
         798  +
                                })?;
         799  +
                                list
         800  +
                            });
         801  +
                            Ok(())
         802  +
                        })?;
         803  +
                        container
  768    804   
                    });
  769    805   
                }
  770    806   
                Some(15) => {
  771    807   
                    builder.map_of_maps = Some({
  772         -
                        let container = if let Some(cap) = deser.container_size() {
  773         -
                            std::collections::HashMap::with_capacity(cap)
  774         -
                        } else {
  775         -
                            std::collections::HashMap::new()
  776         -
                        };
  777         -
                        deser.read_map(member, container, |mut map, key, deser| {
  778         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  779         -
                            Ok(map)
  780         -
                        })?
         808  +
                        let mut container = std::collections::HashMap::new();
         809  +
                        deser.read_map(member, &mut |key, deser| {
         810  +
                            container.insert(key, {
         811  +
                                let mut map = ::std::collections::HashMap::new();
         812  +
                                deser.read_map(member, &mut |key, deser| {
         813  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?;
         814  +
                                    map.insert(key, value);
         815  +
                                    Ok(())
         816  +
                                })?;
         817  +
                                map
         818  +
                            });
         819  +
                            Ok(())
         820  +
                        })?;
         821  +
                        container
  781    822   
                    });
  782    823   
                }
  783    824   
                Some(16) => {
  784         -
                    builder.map_of_strings = Some({
  785         -
                        let container = if let Some(cap) = deser.container_size() {
  786         -
                            std::collections::HashMap::with_capacity(cap)
  787         -
                        } else {
  788         -
                            std::collections::HashMap::new()
  789         -
                        };
  790         -
                        deser.read_map(member, container, |mut map, key, deser| {
  791         -
                            map.insert(key, deser.read_string(member)?);
  792         -
                            Ok(map)
  793         -
                        })?
  794         -
                    });
         825  +
                    builder.map_of_strings = Some(deser.read_string_string_map(member)?);
  795    826   
                }
  796    827   
                Some(17) => {
  797    828   
                    builder.map_of_structs = Some({
  798         -
                        let container = if let Some(cap) = deser.container_size() {
  799         -
                            std::collections::HashMap::with_capacity(cap)
  800         -
                        } else {
  801         -
                            std::collections::HashMap::new()
  802         -
                        };
  803         -
                        deser.read_map(member, container, |mut map, key, deser| {
  804         -
                            map.insert(key, crate::types::SimpleStruct::deserialize(deser)?);
  805         -
                            Ok(map)
  806         -
                        })?
         829  +
                        let mut container = std::collections::HashMap::new();
         830  +
                        deser.read_map(member, &mut |key, deser| {
         831  +
                            container.insert(key, crate::types::SimpleStruct::deserialize(deser)?);
         832  +
                            Ok(())
         833  +
                        })?;
         834  +
                        container
  807    835   
                    });
  808    836   
                }
  809    837   
                Some(18) => {
  810    838   
                    builder.recursive_list = Some({
  811         -
                        let container = if let Some(cap) = deser.container_size() {
  812         -
                            Vec::with_capacity(cap)
  813         -
                        } else {
  814         -
                            Vec::new()
  815         -
                        };
  816         -
                        deser.read_list(member, container, |mut list, deser| {
  817         -
                            list.push(crate::types::KitchenSink::deserialize(deser)?);
  818         -
                            Ok(list)
  819         -
                        })?
         839  +
                        let mut container = Vec::new();
         840  +
                        deser.read_list(member, &mut |deser| {
         841  +
                            container.push(crate::types::KitchenSink::deserialize(deser)?);
         842  +
                            Ok(())
         843  +
                        })?;
         844  +
                        container
  820    845   
                    });
  821    846   
                }
  822    847   
                Some(19) => {
  823    848   
                    builder.recursive_map = Some({
  824         -
                        let container = if let Some(cap) = deser.container_size() {
  825         -
                            std::collections::HashMap::with_capacity(cap)
  826         -
                        } else {
  827         -
                            std::collections::HashMap::new()
  828         -
                        };
  829         -
                        deser.read_map(member, container, |mut map, key, deser| {
  830         -
                            map.insert(key, crate::types::KitchenSink::deserialize(deser)?);
  831         -
                            Ok(map)
  832         -
                        })?
         849  +
                        let mut container = std::collections::HashMap::new();
         850  +
                        deser.read_map(member, &mut |key, deser| {
         851  +
                            container.insert(key, crate::types::KitchenSink::deserialize(deser)?);
         852  +
                            Ok(())
         853  +
                        })?;
         854  +
                        container
  833    855   
                    });
  834    856   
                }
  835    857   
                Some(20) => {
  836    858   
                    builder.recursive_struct = Some(Box::new(crate::types::KitchenSink::deserialize(deser)?));
  837    859   
                }
  838    860   
                Some(21) => {
  839    861   
                    builder.simple_struct = Some(crate::types::SimpleStruct::deserialize(deser)?);
  840    862   
                }
  841    863   
                Some(22) => {
  842    864   
                    builder.string = Some(deser.read_string(member)?);
  843    865   
                }
  844    866   
                Some(23) => {
  845    867   
                    builder.struct_with_json_name = Some(crate::types::StructWithJsonName::deserialize(deser)?);
  846    868   
                }
  847    869   
                Some(24) => {
  848    870   
                    builder.timestamp = Some(deser.read_timestamp(member)?);
  849    871   
                }
  850    872   
                Some(25) => {
  851    873   
                    builder.unix_timestamp = Some(deser.read_timestamp(member)?);
  852    874   
                }
  853    875   
                _ => {}
  854    876   
            }
  855    877   
            Ok(())
  856    878   
        })?;
  857    879   
        builder
  858    880   
            .build()
  859    881   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  860    882   
    }
  861    883   
}
         884  +
impl KitchenSinkOperationInput {
         885  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         886  +
    pub fn deserialize_with_response(
         887  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         888  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         889  +
        _status: u16,
         890  +
        _body: &[u8],
         891  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         892  +
        Self::deserialize(deserializer)
         893  +
    }
         894  +
}
  862    895   
impl KitchenSinkOperationInput {
  863    896   
    /// Creates a new builder-style object to manufacture [`KitchenSinkOperationInput`](crate::operation::kitchen_sink_operation::KitchenSinkOperationInput).
  864    897   
    pub fn builder() -> crate::operation::kitchen_sink_operation::builders::KitchenSinkOperationInputBuilder {
  865    898   
        crate::operation::kitchen_sink_operation::builders::KitchenSinkOperationInputBuilder::default()
  866    899   
    }
  867    900   
}
  868    901   
  869    902   
/// A builder for [`KitchenSinkOperationInput`](crate::operation::kitchen_sink_operation::KitchenSinkOperationInput).
  870    903   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  871    904   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/kitchen_sink_operation/_kitchen_sink_operation_output.rs

@@ -165,165 +477,477 @@
  185    185   
    "aws.protocoltests.json.synthetic",
  186    186   
    "KitchenSinkOperationOutput",
  187    187   
);
  188    188   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_BLOB: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Blob",
  191    191   
        "aws.protocoltests.json.synthetic",
  192    192   
        "KitchenSinkOperationOutput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::Blob,
  195         -
    "blob",
         195  +
    "Blob",
  196    196   
    0,
  197    197   
);
  198    198   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_BOOLEAN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  199    199   
    ::aws_smithy_schema::ShapeId::from_static(
  200    200   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Boolean",
  201    201   
        "aws.protocoltests.json.synthetic",
  202    202   
        "KitchenSinkOperationOutput",
  203    203   
    ),
  204    204   
    ::aws_smithy_schema::ShapeType::Boolean,
  205         -
    "boolean",
         205  +
    "Boolean",
  206    206   
    1,
  207    207   
);
  208    208   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  209    209   
    ::aws_smithy_schema::ShapeId::from_static(
  210    210   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Double",
  211    211   
        "aws.protocoltests.json.synthetic",
  212    212   
        "KitchenSinkOperationOutput",
  213    213   
    ),
  214    214   
    ::aws_smithy_schema::ShapeType::Double,
  215         -
    "double",
         215  +
    "Double",
  216    216   
    2,
  217    217   
);
  218    218   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_EMPTY_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  219    219   
    ::aws_smithy_schema::ShapeId::from_static(
  220    220   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$EmptyStruct",
  221    221   
        "aws.protocoltests.json.synthetic",
  222    222   
        "KitchenSinkOperationOutput",
  223    223   
    ),
  224    224   
    ::aws_smithy_schema::ShapeType::Structure,
  225         -
    "empty_struct",
         225  +
    "EmptyStruct",
  226    226   
    3,
  227    227   
);
  228    228   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  229    229   
    ::aws_smithy_schema::ShapeId::from_static(
  230    230   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Float",
  231    231   
        "aws.protocoltests.json.synthetic",
  232    232   
        "KitchenSinkOperationOutput",
  233    233   
    ),
  234    234   
    ::aws_smithy_schema::ShapeType::Float,
  235         -
    "float",
         235  +
    "Float",
  236    236   
    4,
  237    237   
);
  238    238   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_HTTPDATE_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  239    239   
    ::aws_smithy_schema::ShapeId::from_static(
  240    240   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$HttpdateTimestamp",
  241    241   
        "aws.protocoltests.json.synthetic",
  242    242   
        "KitchenSinkOperationOutput",
  243    243   
    ),
  244    244   
    ::aws_smithy_schema::ShapeType::Timestamp,
  245         -
    "httpdate_timestamp",
         245  +
    "HttpdateTimestamp",
  246    246   
    5,
  247    247   
)
  248    248   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
  249    249   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  250    250   
    ::aws_smithy_schema::ShapeId::from_static(
  251    251   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Integer",
  252    252   
        "aws.protocoltests.json.synthetic",
  253    253   
        "KitchenSinkOperationOutput",
  254    254   
    ),
  255    255   
    ::aws_smithy_schema::ShapeType::Integer,
  256         -
    "integer",
         256  +
    "Integer",
  257    257   
    6,
  258    258   
);
  259    259   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_ISO8601_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  260    260   
    ::aws_smithy_schema::ShapeId::from_static(
  261    261   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Iso8601Timestamp",
  262    262   
        "aws.protocoltests.json.synthetic",
  263    263   
        "KitchenSinkOperationOutput",
  264    264   
    ),
  265    265   
    ::aws_smithy_schema::ShapeType::Timestamp,
  266         -
    "iso8601_timestamp",
         266  +
    "Iso8601Timestamp",
  267    267   
    7,
  268    268   
)
  269    269   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  270    270   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_JSON_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  271    271   
    ::aws_smithy_schema::ShapeId::from_static(
  272    272   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$JsonValue",
  273    273   
        "aws.protocoltests.json.synthetic",
  274    274   
        "KitchenSinkOperationOutput",
  275    275   
    ),
  276    276   
    ::aws_smithy_schema::ShapeType::String,
  277         -
    "json_value",
         277  +
    "JsonValue",
  278    278   
    8,
  279    279   
);
  280    280   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_LISTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  281    281   
    ::aws_smithy_schema::ShapeId::from_static(
  282    282   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$ListOfLists",
  283    283   
        "aws.protocoltests.json.synthetic",
  284    284   
        "KitchenSinkOperationOutput",
  285    285   
    ),
  286    286   
    ::aws_smithy_schema::ShapeType::List,
  287         -
    "list_of_lists",
         287  +
    "ListOfLists",
  288    288   
    9,
  289    289   
);
  290    290   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_MAPS_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  291    291   
    ::aws_smithy_schema::ShapeId::from_static(
  292    292   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$ListOfMapsOfStrings",
  293    293   
        "aws.protocoltests.json.synthetic",
  294    294   
        "KitchenSinkOperationOutput",
  295    295   
    ),
  296    296   
    ::aws_smithy_schema::ShapeType::List,
  297         -
    "list_of_maps_of_strings",
         297  +
    "ListOfMapsOfStrings",
  298    298   
    10,
  299    299   
);
  300    300   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  301    301   
    ::aws_smithy_schema::ShapeId::from_static(
  302    302   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$ListOfStrings",
  303    303   
        "aws.protocoltests.json.synthetic",
  304    304   
        "KitchenSinkOperationOutput",
  305    305   
    ),
  306    306   
    ::aws_smithy_schema::ShapeType::List,
  307         -
    "list_of_strings",
         307  +
    "ListOfStrings",
  308    308   
    11,
  309    309   
);
  310    310   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_STRUCTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  311    311   
    ::aws_smithy_schema::ShapeId::from_static(
  312    312   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$ListOfStructs",
  313    313   
        "aws.protocoltests.json.synthetic",
  314    314   
        "KitchenSinkOperationOutput",
  315    315   
    ),
  316    316   
    ::aws_smithy_schema::ShapeType::List,
  317         -
    "list_of_structs",
         317  +
    "ListOfStructs",
  318    318   
    12,
  319    319   
);
  320    320   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  321    321   
    ::aws_smithy_schema::ShapeId::from_static(
  322    322   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Long",
  323    323   
        "aws.protocoltests.json.synthetic",
  324    324   
        "KitchenSinkOperationOutput",
  325    325   
    ),
  326    326   
    ::aws_smithy_schema::ShapeType::Long,
  327         -
    "long",
         327  +
    "Long",
  328    328   
    13,
  329    329   
);
  330    330   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_LISTS_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  331    331   
    ::aws_smithy_schema::ShapeId::from_static(
  332    332   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$MapOfListsOfStrings",
  333    333   
        "aws.protocoltests.json.synthetic",
  334    334   
        "KitchenSinkOperationOutput",
  335    335   
    ),
  336    336   
    ::aws_smithy_schema::ShapeType::Map,
  337         -
    "map_of_lists_of_strings",
         337  +
    "MapOfListsOfStrings",
  338    338   
    14,
  339    339   
);
  340    340   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_MAPS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  341    341   
    ::aws_smithy_schema::ShapeId::from_static(
  342    342   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$MapOfMaps",
  343    343   
        "aws.protocoltests.json.synthetic",
  344    344   
        "KitchenSinkOperationOutput",
  345    345   
    ),
  346    346   
    ::aws_smithy_schema::ShapeType::Map,
  347         -
    "map_of_maps",
         347  +
    "MapOfMaps",
  348    348   
    15,
  349    349   
);
  350    350   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  351    351   
    ::aws_smithy_schema::ShapeId::from_static(
  352    352   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$MapOfStrings",
  353    353   
        "aws.protocoltests.json.synthetic",
  354    354   
        "KitchenSinkOperationOutput",
  355    355   
    ),
  356    356   
    ::aws_smithy_schema::ShapeType::Map,
  357         -
    "map_of_strings",
         357  +
    "MapOfStrings",
  358    358   
    16,
  359    359   
);
  360    360   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_STRUCTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  361    361   
    ::aws_smithy_schema::ShapeId::from_static(
  362    362   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$MapOfStructs",
  363    363   
        "aws.protocoltests.json.synthetic",
  364    364   
        "KitchenSinkOperationOutput",
  365    365   
    ),
  366    366   
    ::aws_smithy_schema::ShapeType::Map,
  367         -
    "map_of_structs",
         367  +
    "MapOfStructs",
  368    368   
    17,
  369    369   
);
  370    370   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_RECURSIVE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  371    371   
    ::aws_smithy_schema::ShapeId::from_static(
  372    372   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$RecursiveList",
  373    373   
        "aws.protocoltests.json.synthetic",
  374    374   
        "KitchenSinkOperationOutput",
  375    375   
    ),
  376    376   
    ::aws_smithy_schema::ShapeType::List,
  377         -
    "recursive_list",
         377  +
    "RecursiveList",
  378    378   
    18,
  379    379   
);
  380    380   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_RECURSIVE_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  381    381   
    ::aws_smithy_schema::ShapeId::from_static(
  382    382   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$RecursiveMap",
  383    383   
        "aws.protocoltests.json.synthetic",
  384    384   
        "KitchenSinkOperationOutput",
  385    385   
    ),
  386    386   
    ::aws_smithy_schema::ShapeType::Map,
  387         -
    "recursive_map",
         387  +
    "RecursiveMap",
  388    388   
    19,
  389    389   
);
  390    390   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_RECURSIVE_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  391    391   
    ::aws_smithy_schema::ShapeId::from_static(
  392    392   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$RecursiveStruct",
  393    393   
        "aws.protocoltests.json.synthetic",
  394    394   
        "KitchenSinkOperationOutput",
  395    395   
    ),
  396    396   
    ::aws_smithy_schema::ShapeType::Structure,
  397         -
    "recursive_struct",
         397  +
    "RecursiveStruct",
  398    398   
    20,
  399    399   
);
  400    400   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_SIMPLE_STRUCT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  401    401   
    ::aws_smithy_schema::ShapeId::from_static(
  402    402   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$SimpleStruct",
  403    403   
        "aws.protocoltests.json.synthetic",
  404    404   
        "KitchenSinkOperationOutput",
  405    405   
    ),
  406    406   
    ::aws_smithy_schema::ShapeType::Structure,
  407         -
    "simple_struct",
         407  +
    "SimpleStruct",
  408    408   
    21,
  409    409   
);
  410    410   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  411    411   
    ::aws_smithy_schema::ShapeId::from_static(
  412    412   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$String",
  413    413   
        "aws.protocoltests.json.synthetic",
  414    414   
        "KitchenSinkOperationOutput",
  415    415   
    ),
  416    416   
    ::aws_smithy_schema::ShapeType::String,
  417         -
    "string",
         417  +
    "String",
  418    418   
    22,
  419    419   
);
  420    420   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_STRUCT_WITH_JSON_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  421    421   
    ::aws_smithy_schema::ShapeId::from_static(
  422    422   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$StructWithJsonName",
  423    423   
        "aws.protocoltests.json.synthetic",
  424    424   
        "KitchenSinkOperationOutput",
  425    425   
    ),
  426    426   
    ::aws_smithy_schema::ShapeType::Structure,
  427         -
    "struct_with_json_name",
         427  +
    "StructWithJsonName",
  428    428   
    23,
  429    429   
);
  430    430   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  431    431   
    ::aws_smithy_schema::ShapeId::from_static(
  432    432   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$Timestamp",
  433    433   
        "aws.protocoltests.json.synthetic",
  434    434   
        "KitchenSinkOperationOutput",
  435    435   
    ),
  436    436   
    ::aws_smithy_schema::ShapeType::Timestamp,
  437         -
    "timestamp",
         437  +
    "Timestamp",
  438    438   
    24,
  439    439   
);
  440    440   
static KITCHENSINKOPERATIONOUTPUT_MEMBER_UNIX_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  441    441   
    ::aws_smithy_schema::ShapeId::from_static(
  442    442   
        "aws.protocoltests.json.synthetic#KitchenSinkOperationOutput$UnixTimestamp",
  443    443   
        "aws.protocoltests.json.synthetic",
  444    444   
        "KitchenSinkOperationOutput",
  445    445   
    ),
  446    446   
    ::aws_smithy_schema::ShapeType::Timestamp,
  447         -
    "unix_timestamp",
         447  +
    "UnixTimestamp",
  448    448   
    25,
  449    449   
)
  450    450   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
  451    451   
static KITCHENSINKOPERATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  452    452   
    KITCHENSINKOPERATIONOUTPUT_SCHEMA_ID,
  453    453   
    ::aws_smithy_schema::ShapeType::Structure,
  454    454   
    &[
  455    455   
        &KITCHENSINKOPERATIONOUTPUT_MEMBER_BLOB,
  456    456   
        &KITCHENSINKOPERATIONOUTPUT_MEMBER_BOOLEAN,
  457    457   
        &KITCHENSINKOPERATIONOUTPUT_MEMBER_DOUBLE,
@@ -495,495 +615,651 @@
  515    515   
            ser.write_timestamp(&KITCHENSINKOPERATIONOUTPUT_MEMBER_ISO8601_TIMESTAMP, val)?;
  516    516   
        }
  517    517   
        if let Some(ref val) = self.json_value {
  518    518   
            ser.write_string(&KITCHENSINKOPERATIONOUTPUT_MEMBER_JSON_VALUE, val)?;
  519    519   
        }
  520    520   
        if let Some(ref val) = self.list_of_lists {
  521    521   
            ser.write_list(
  522    522   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_LISTS,
  523    523   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  524    524   
                    for item in val {
  525         -
                        todo!("schema: unsupported list element type");
         525  +
                        ser.write_list(
         526  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         527  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         528  +
                                for item in item {
         529  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         530  +
                                }
         531  +
                                Ok(())
         532  +
                            },
         533  +
                        )?;
  526    534   
                    }
  527    535   
                    Ok(())
  528    536   
                },
  529    537   
            )?;
  530    538   
        }
  531    539   
        if let Some(ref val) = self.list_of_maps_of_strings {
  532    540   
            ser.write_list(
  533    541   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_MAPS_OF_STRINGS,
  534    542   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  535    543   
                    for item in val {
  536         -
                        todo!("schema: unsupported list element type");
         544  +
                        ser.write_map(
         545  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         546  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         547  +
                                for (key, value) in item {
         548  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         549  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         550  +
                                }
         551  +
                                Ok(())
         552  +
                            },
         553  +
                        )?;
  537    554   
                    }
  538    555   
                    Ok(())
  539    556   
                },
  540    557   
            )?;
  541    558   
        }
  542    559   
        if let Some(ref val) = self.list_of_strings {
  543    560   
            ser.write_list(
  544    561   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_STRINGS,
  545    562   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  546    563   
                    for item in val {
  547    564   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  548    565   
                    }
  549    566   
                    Ok(())
  550    567   
                },
  551    568   
            )?;
  552    569   
        }
  553    570   
        if let Some(ref val) = self.list_of_structs {
  554    571   
            ser.write_list(
  555    572   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_LIST_OF_STRUCTS,
  556    573   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  557    574   
                    for item in val {
  558    575   
                        ser.write_struct(crate::types::SimpleStruct::SCHEMA, item)?;
  559    576   
                    }
  560    577   
                    Ok(())
  561    578   
                },
  562    579   
            )?;
  563    580   
        }
  564    581   
        if let Some(ref val) = self.long {
  565    582   
            ser.write_long(&KITCHENSINKOPERATIONOUTPUT_MEMBER_LONG, *val)?;
  566    583   
        }
  567    584   
        if let Some(ref val) = self.map_of_lists_of_strings {
  568    585   
            ser.write_map(
  569    586   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_LISTS_OF_STRINGS,
  570    587   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  571    588   
                    for (key, value) in val {
  572    589   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  573         -
                        todo!("schema: unsupported map value type");
         590  +
         591  +
                        ser.write_list(
         592  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         593  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         594  +
                                for item in value {
         595  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         596  +
                                }
         597  +
                                Ok(())
         598  +
                            },
         599  +
                        )?;
  574    600   
                    }
  575    601   
                    Ok(())
  576    602   
                },
  577    603   
            )?;
  578    604   
        }
  579    605   
        if let Some(ref val) = self.map_of_maps {
  580    606   
            ser.write_map(
  581    607   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_MAPS,
  582    608   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  583    609   
                    for (key, value) in val {
  584    610   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  585         -
                        todo!("schema: unsupported map value type");
         611  +
         612  +
                        ser.write_map(
         613  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         614  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         615  +
                                for (key, value) in value {
         616  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         617  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         618  +
                                }
         619  +
                                Ok(())
         620  +
                            },
         621  +
                        )?;
  586    622   
                    }
  587    623   
                    Ok(())
  588    624   
                },
  589    625   
            )?;
  590    626   
        }
  591    627   
        if let Some(ref val) = self.map_of_strings {
  592    628   
            ser.write_map(
  593    629   
                &KITCHENSINKOPERATIONOUTPUT_MEMBER_MAP_OF_STRINGS,
  594    630   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  595    631   
                    for (key, value) in val {
@@ -631,667 +889,922 @@
  651    687   
            ser.write_timestamp(&KITCHENSINKOPERATIONOUTPUT_MEMBER_TIMESTAMP, val)?;
  652    688   
        }
  653    689   
        if let Some(ref val) = self.unix_timestamp {
  654    690   
            ser.write_timestamp(&KITCHENSINKOPERATIONOUTPUT_MEMBER_UNIX_TIMESTAMP, val)?;
  655    691   
        }
  656    692   
        Ok(())
  657    693   
    }
  658    694   
}
  659    695   
impl KitchenSinkOperationOutput {
  660    696   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  661         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  662         -
        deserializer: &mut D,
         697  +
    pub fn deserialize(
         698  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  663    699   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  664    700   
        #[allow(unused_variables, unused_mut)]
  665    701   
        let mut builder = Self::builder();
  666    702   
        #[allow(
  667    703   
            unused_variables,
  668    704   
            unreachable_code,
  669    705   
            clippy::single_match,
  670    706   
            clippy::match_single_binding,
  671    707   
            clippy::diverging_sub_expression
  672    708   
        )]
  673         -
        deserializer.read_struct(&KITCHENSINKOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
         709  +
        deserializer.read_struct(&KITCHENSINKOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
  674    710   
            match member.member_index() {
  675    711   
                Some(0) => {
  676    712   
                    builder.blob = Some(deser.read_blob(member)?);
  677    713   
                }
  678    714   
                Some(1) => {
  679    715   
                    builder.boolean = Some(deser.read_boolean(member)?);
  680    716   
                }
  681    717   
                Some(2) => {
  682    718   
                    builder.double = Some(deser.read_double(member)?);
  683    719   
                }
  684    720   
                Some(3) => {
  685    721   
                    builder.empty_struct = Some(crate::types::EmptyStruct::deserialize(deser)?);
  686    722   
                }
  687    723   
                Some(4) => {
  688    724   
                    builder.float = Some(deser.read_float(member)?);
  689    725   
                }
  690    726   
                Some(5) => {
  691    727   
                    builder.httpdate_timestamp = Some(deser.read_timestamp(member)?);
  692    728   
                }
  693    729   
                Some(6) => {
  694    730   
                    builder.integer = Some(deser.read_integer(member)?);
  695    731   
                }
  696    732   
                Some(7) => {
  697    733   
                    builder.iso8601_timestamp = Some(deser.read_timestamp(member)?);
  698    734   
                }
  699    735   
                Some(8) => {
  700    736   
                    builder.json_value = Some(deser.read_string(member)?);
  701    737   
                }
  702    738   
                Some(9) => {
  703    739   
                    builder.list_of_lists = Some({
  704         -
                        let container = if let Some(cap) = deser.container_size() {
  705         -
                            Vec::with_capacity(cap)
  706         -
                        } else {
  707         -
                            Vec::new()
  708         -
                        };
  709         -
                        deser.read_list(member, container, |mut list, deser| {
  710         -
                            list.push(todo!("deserialize nested aggregate"));
  711         -
                            Ok(list)
  712         -
                        })?
         740  +
                        let mut container = Vec::new();
         741  +
                        deser.read_list(member, &mut |deser| {
         742  +
                            container.push({
         743  +
                                let mut list = Vec::new();
         744  +
                                deser.read_list(member, &mut |deser| {
         745  +
                                    list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
         746  +
                                    Ok(())
         747  +
                                })?;
         748  +
                                list
         749  +
                            });
         750  +
                            Ok(())
         751  +
                        })?;
         752  +
                        container
  713    753   
                    });
  714    754   
                }
  715    755   
                Some(10) => {
  716    756   
                    builder.list_of_maps_of_strings = Some({
  717         -
                        let container = if let Some(cap) = deser.container_size() {
  718         -
                            Vec::with_capacity(cap)
  719         -
                        } else {
  720         -
                            Vec::new()
  721         -
                        };
  722         -
                        deser.read_list(member, container, |mut list, deser| {
  723         -
                            list.push(todo!("deserialize nested aggregate"));
  724         -
                            Ok(list)
  725         -
                        })?
         757  +
                        let mut container = Vec::new();
         758  +
                        deser.read_list(member, &mut |deser| {
         759  +
                            container.push({
         760  +
                                let mut map = ::std::collections::HashMap::new();
         761  +
                                deser.read_map(member, &mut |key, deser| {
         762  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?;
         763  +
                                    map.insert(key, value);
         764  +
                                    Ok(())
         765  +
                                })?;
         766  +
                                map
         767  +
                            });
         768  +
                            Ok(())
         769  +
                        })?;
         770  +
                        container
  726    771   
                    });
  727    772   
                }
  728    773   
                Some(11) => {
  729         -
                    builder.list_of_strings = Some({
  730         -
                        let container = if let Some(cap) = deser.container_size() {
  731         -
                            Vec::with_capacity(cap)
  732         -
                        } else {
  733         -
                            Vec::new()
  734         -
                        };
  735         -
                        deser.read_list(member, container, |mut list, deser| {
  736         -
                            list.push(deser.read_string(member)?);
  737         -
                            Ok(list)
  738         -
                        })?
  739         -
                    });
         774  +
                    builder.list_of_strings = Some(deser.read_string_list(member)?);
  740    775   
                }
  741    776   
                Some(12) => {
  742    777   
                    builder.list_of_structs = Some({
  743         -
                        let container = if let Some(cap) = deser.container_size() {
  744         -
                            Vec::with_capacity(cap)
  745         -
                        } else {
  746         -
                            Vec::new()
  747         -
                        };
  748         -
                        deser.read_list(member, container, |mut list, deser| {
  749         -
                            list.push(crate::types::SimpleStruct::deserialize(deser)?);
  750         -
                            Ok(list)
  751         -
                        })?
         778  +
                        let mut container = Vec::new();
         779  +
                        deser.read_list(member, &mut |deser| {
         780  +
                            container.push(crate::types::SimpleStruct::deserialize(deser)?);
         781  +
                            Ok(())
         782  +
                        })?;
         783  +
                        container
  752    784   
                    });
  753    785   
                }
  754    786   
                Some(13) => {
  755    787   
                    builder.long = Some(deser.read_long(member)?);
  756    788   
                }
  757    789   
                Some(14) => {
  758    790   
                    builder.map_of_lists_of_strings = Some({
  759         -
                        let container = if let Some(cap) = deser.container_size() {
  760         -
                            std::collections::HashMap::with_capacity(cap)
  761         -
                        } else {
  762         -
                            std::collections::HashMap::new()
  763         -
                        };
  764         -
                        deser.read_map(member, container, |mut map, key, deser| {
  765         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  766         -
                            Ok(map)
  767         -
                        })?
         791  +
                        let mut container = std::collections::HashMap::new();
         792  +
                        deser.read_map(member, &mut |key, deser| {
         793  +
                            container.insert(key, {
         794  +
                                let mut list = Vec::new();
         795  +
                                deser.read_list(member, &mut |deser| {
         796  +
                                    list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
         797  +
                                    Ok(())
         798  +
                                })?;
         799  +
                                list
         800  +
                            });
         801  +
                            Ok(())
         802  +
                        })?;
         803  +
                        container
  768    804   
                    });
  769    805   
                }
  770    806   
                Some(15) => {
  771    807   
                    builder.map_of_maps = Some({
  772         -
                        let container = if let Some(cap) = deser.container_size() {
  773         -
                            std::collections::HashMap::with_capacity(cap)
  774         -
                        } else {
  775         -
                            std::collections::HashMap::new()
  776         -
                        };
  777         -
                        deser.read_map(member, container, |mut map, key, deser| {
  778         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  779         -
                            Ok(map)
  780         -
                        })?
         808  +
                        let mut container = std::collections::HashMap::new();
         809  +
                        deser.read_map(member, &mut |key, deser| {
         810  +
                            container.insert(key, {
         811  +
                                let mut map = ::std::collections::HashMap::new();
         812  +
                                deser.read_map(member, &mut |key, deser| {
         813  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?;
         814  +
                                    map.insert(key, value);
         815  +
                                    Ok(())
         816  +
                                })?;
         817  +
                                map
         818  +
                            });
         819  +
                            Ok(())
         820  +
                        })?;
         821  +
                        container
  781    822   
                    });
  782    823   
                }
  783    824   
                Some(16) => {
  784         -
                    builder.map_of_strings = Some({
  785         -
                        let container = if let Some(cap) = deser.container_size() {
  786         -
                            std::collections::HashMap::with_capacity(cap)
  787         -
                        } else {
  788         -
                            std::collections::HashMap::new()
  789         -
                        };
  790         -
                        deser.read_map(member, container, |mut map, key, deser| {
  791         -
                            map.insert(key, deser.read_string(member)?);
  792         -
                            Ok(map)
  793         -
                        })?
  794         -
                    });
         825  +
                    builder.map_of_strings = Some(deser.read_string_string_map(member)?);
  795    826   
                }
  796    827   
                Some(17) => {
  797    828   
                    builder.map_of_structs = Some({
  798         -
                        let container = if let Some(cap) = deser.container_size() {
  799         -
                            std::collections::HashMap::with_capacity(cap)
  800         -
                        } else {
  801         -
                            std::collections::HashMap::new()
  802         -
                        };
  803         -
                        deser.read_map(member, container, |mut map, key, deser| {
  804         -
                            map.insert(key, crate::types::SimpleStruct::deserialize(deser)?);
  805         -
                            Ok(map)
  806         -
                        })?
         829  +
                        let mut container = std::collections::HashMap::new();
         830  +
                        deser.read_map(member, &mut |key, deser| {
         831  +
                            container.insert(key, crate::types::SimpleStruct::deserialize(deser)?);
         832  +
                            Ok(())
         833  +
                        })?;
         834  +
                        container
  807    835   
                    });
  808    836   
                }
  809    837   
                Some(18) => {
  810    838   
                    builder.recursive_list = Some({
  811         -
                        let container = if let Some(cap) = deser.container_size() {
  812         -
                            Vec::with_capacity(cap)
  813         -
                        } else {
  814         -
                            Vec::new()
  815         -
                        };
  816         -
                        deser.read_list(member, container, |mut list, deser| {
  817         -
                            list.push(crate::types::KitchenSink::deserialize(deser)?);
  818         -
                            Ok(list)
  819         -
                        })?
         839  +
                        let mut container = Vec::new();
         840  +
                        deser.read_list(member, &mut |deser| {
         841  +
                            container.push(crate::types::KitchenSink::deserialize(deser)?);
         842  +
                            Ok(())
         843  +
                        })?;
         844  +
                        container
  820    845   
                    });
  821    846   
                }
  822    847   
                Some(19) => {
  823    848   
                    builder.recursive_map = Some({
  824         -
                        let container = if let Some(cap) = deser.container_size() {
  825         -
                            std::collections::HashMap::with_capacity(cap)
  826         -
                        } else {
  827         -
                            std::collections::HashMap::new()
  828         -
                        };
  829         -
                        deser.read_map(member, container, |mut map, key, deser| {
  830         -
                            map.insert(key, crate::types::KitchenSink::deserialize(deser)?);
  831         -
                            Ok(map)
  832         -
                        })?
         849  +
                        let mut container = std::collections::HashMap::new();
         850  +
                        deser.read_map(member, &mut |key, deser| {
         851  +
                            container.insert(key, crate::types::KitchenSink::deserialize(deser)?);
         852  +
                            Ok(())
         853  +
                        })?;
         854  +
                        container
  833    855   
                    });
  834    856   
                }
  835    857   
                Some(20) => {
  836    858   
                    builder.recursive_struct = Some(Box::new(crate::types::KitchenSink::deserialize(deser)?));
  837    859   
                }
  838    860   
                Some(21) => {
  839    861   
                    builder.simple_struct = Some(crate::types::SimpleStruct::deserialize(deser)?);
  840    862   
                }
  841    863   
                Some(22) => {
  842    864   
                    builder.string = Some(deser.read_string(member)?);
  843    865   
                }
  844    866   
                Some(23) => {
  845    867   
                    builder.struct_with_json_name = Some(crate::types::StructWithJsonName::deserialize(deser)?);
  846    868   
                }
  847    869   
                Some(24) => {
  848    870   
                    builder.timestamp = Some(deser.read_timestamp(member)?);
  849    871   
                }
  850    872   
                Some(25) => {
  851    873   
                    builder.unix_timestamp = Some(deser.read_timestamp(member)?);
  852    874   
                }
  853    875   
                _ => {}
  854    876   
            }
  855    877   
            Ok(())
  856    878   
        })?;
  857    879   
        Ok(builder.build())
  858    880   
    }
  859    881   
}
         882  +
impl KitchenSinkOperationOutput {
         883  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         884  +
    pub fn deserialize_with_response(
         885  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         886  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         887  +
        _status: u16,
         888  +
        _body: &[u8],
         889  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         890  +
        Self::deserialize(deserializer)
         891  +
    }
         892  +
}
  860    893   
impl KitchenSinkOperationOutput {
  861    894   
    /// Creates a new builder-style object to manufacture [`KitchenSinkOperationOutput`](crate::operation::kitchen_sink_operation::KitchenSinkOperationOutput).
  862    895   
    pub fn builder() -> crate::operation::kitchen_sink_operation::builders::KitchenSinkOperationOutputBuilder {
  863    896   
        crate::operation::kitchen_sink_operation::builders::KitchenSinkOperationOutputBuilder::default()
  864    897   
    }
  865    898   
}
  866    899   
  867    900   
/// A builder for [`KitchenSinkOperationOutput`](crate::operation::kitchen_sink_operation::KitchenSinkOperationOutput).
  868    901   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  869    902   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `NullOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct NullOperation;
    6      6   
impl NullOperation {
    7      7   
    /// Creates a new `NullOperation`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::null_operation::NullOperationInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::null_operation::NullOperationOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::null_operation::NullOperationInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::null_operation::NullOperationOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::null_operation::NullOperationError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +231,231 @@
  124    128   
                crate::operation::null_operation::NullOperationError,
  125    129   
            >::new());
  126    130   
  127    131   
        ::std::borrow::Cow::Owned(rcb)
  128    132   
    }
  129    133   
}
  130    134   
  131    135   
#[derive(Debug)]
  132    136   
struct NullOperationResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NullOperationResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         144  +
        #[allow(unused_mut)]
         145  +
        let mut force_error = false;
         146  +
         147  +
        if !success && status != 200 || force_error {
  139    148   
            let headers = response.headers();
  140    149   
            let body = response.body().bytes().expect("body loaded");
  141    150   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
  143    154   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_null_operation::de_null_operation_http_error(status, headers, body)
         155  +
            let generic = generic_builder.build();
         156  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         157  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(crate::operation::null_operation::NullOperationError::generic(
         158  +
                    generic,
         159  +
                )),
         160  +
            ))
  146    161   
        } else {
  147         -
            crate::protocol_serde::shape_null_operation::de_null_operation_http_response(status, headers, body)
  148         -
        };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         162  +
            let protocol = _cfg
         163  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         164  +
                .expect("a SharedClientProtocol is required");
         165  +
            let mut deser = protocol.deserialize_response(response, NullOperation::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            let body = response.body().bytes().expect("body loaded");
         169  +
            let output = crate::operation::null_operation::NullOperationOutput::deserialize_with_response(
         170  +
                &mut *deser,
         171  +
                response.headers(),
         172  +
                response.status().into(),
         173  +
                body,
         174  +
            )
         175  +
            .map_err(|e| {
         176  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         177  +
            })?;
         178  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         179  +
        }
  150    180   
    }
  151    181   
}
  152    182   
#[derive(Debug)]
  153    183   
struct NullOperationRequestSerializer;
  154    184   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NullOperationRequestSerializer {
  155    185   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    186   
    fn serialize_input(
  157    187   
        &self,
  158    188   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    189   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    190   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    191   
        let input = input
  162    192   
            .downcast::<crate::operation::null_operation::NullOperationInput>()
  163    193   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::null_operation::NullOperationInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                ::std::write!(output, "/").expect("formatting should succeed");
  176         -
                ::std::result::Result::Ok(())
  177         -
            }
  178         -
            #[allow(clippy::unnecessary_wraps)]
  179         -
            fn update_http_builder(
  180         -
                input: &crate::operation::null_operation::NullOperationInput,
  181         -
                builder: ::http_1x::request::Builder,
  182         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183         -
                let mut uri = ::std::string::String::new();
  184         -
                uri_base(input, &mut uri)?;
  185         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186         -
            }
  187         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189         -
            builder = _header_serialization_settings.set_default_header(
  190         -
                builder,
  191         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192         -
                "JsonProtocol.NullOperation",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_null_operation::ser_null_operation_input(&input)?);
  197         -
        if let Some(content_length) = body.content_length() {
  198         -
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200         -
        }
  201         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         194  +
        let protocol = _cfg
         195  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         196  +
            .expect("a SharedClientProtocol is required");
         197  +
        let mut request = protocol
         198  +
            .serialize_request(&input, NullOperation::INPUT_SCHEMA, "", _cfg)
         199  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         200  +
         201  +
        return ::std::result::Result::Ok(request);
  202    202   
    }
  203    203   
}
  204    204   
#[derive(Debug)]
  205    205   
struct NullOperationEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NullOperationEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "NullOperationEndpointParamsInterceptor"
  210    210   
    }
  211    211   
@@ -277,277 +337,347 @@
  297    297   
            .expect("the config must have a deserializer");
  298    298   
  299    299   
        let parsed = de.deserialize_streaming(&mut http_response);
  300    300   
        let parsed = parsed.unwrap_or_else(|| {
  301    301   
            let http_response = http_response.map(|body| {
  302    302   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  303    303   
                    body.bytes().unwrap(),
  304    304   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  305    305   
                )))
  306    306   
            });
  307         -
            de.deserialize_nonstreaming(&http_response)
         307  +
            // Build a config bag with the protocol for schema-based deserialization
         308  +
            #[allow(unused_mut)]
         309  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         310  +
            {
         311  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         312  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         313  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         314  +
                ));
         315  +
                test_cfg.push_shared_layer(layer.freeze());
         316  +
            }
         317  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  308    318   
        });
  309    319   
        let parsed = parsed
  310    320   
            .expect("should be successful response")
  311    321   
            .downcast::<crate::operation::null_operation::NullOperationOutput>()
  312    322   
            .unwrap();
  313    323   
        ::pretty_assertions::assert_eq!(parsed.string, expected_output.string, "Unexpected value for `string`");
  314    324   
    }
  315    325   
}
  316    326   
  317    327   
/// Error type for the `NullOperationError` operation.

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation/_null_operation_input.rs

@@ -23,23 +108,119 @@
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.string {
   46     46   
            ser.write_string(&NULLOPERATIONINPUT_MEMBER_STRING, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl NullOperationInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&NULLOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&NULLOPERATIONINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.string = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        builder
   75     75   
            .build()
   76     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     77   
    }
   78     78   
}
          79  +
impl NullOperationInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   79     90   
impl NullOperationInput {
   80     91   
    /// Creates a new builder-style object to manufacture [`NullOperationInput`](crate::operation::null_operation::NullOperationInput).
   81     92   
    pub fn builder() -> crate::operation::null_operation::builders::NullOperationInputBuilder {
   82     93   
        crate::operation::null_operation::builders::NullOperationInputBuilder::default()
   83     94   
    }
   84     95   
}
   85     96   
   86     97   
/// A builder for [`NullOperationInput`](crate::operation::null_operation::NullOperationInput).
   87     98   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88     99   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation/_null_operation_output.rs

@@ -23,23 +106,117 @@
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.string {
   46     46   
            ser.write_string(&NULLOPERATIONOUTPUT_MEMBER_STRING, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl NullOperationOutput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&NULLOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&NULLOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.string = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl NullOperationOutput {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl NullOperationOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
   79     90   
    pub fn builder() -> crate::operation::null_operation::builders::NullOperationOutputBuilder {
   80     91   
        crate::operation::null_operation::builders::NullOperationOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `OperationWithOptionalInputOutput`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct OperationWithOptionalInputOutput;
    6      6   
impl OperationWithOptionalInputOutput {
    7      7   
    /// Creates a new `OperationWithOptionalInputOutput`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +243,241 @@
  130    136   
                crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct OperationWithOptionalInputOutputResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithOptionalInputOutputResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         152  +
        #[allow(unused_mut)]
         153  +
        let mut force_error = false;
         154  +
         155  +
        if !success && status != 200 || force_error {
  145    156   
            let headers = response.headers();
  146    157   
            let body = response.body().bytes().expect("body loaded");
  147    158   
            #[allow(unused_mut)]
  148         -
        let mut force_error = false;
         159  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         160  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         161  +
            })?;
  149    162   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_operation_with_optional_input_output::de_operation_with_optional_input_output_http_error(
  152         -
                status, headers, body,
  153         -
            )
         163  +
            let generic = generic_builder.build();
         164  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         165  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         166  +
                    crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError::generic(generic),
         167  +
                ),
         168  +
            ))
  154    169   
        } else {
  155         -
            crate::protocol_serde::shape_operation_with_optional_input_output::de_operation_with_optional_input_output_http_response(
  156         -
                status, headers, body,
         170  +
            let protocol = _cfg
         171  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         172  +
                .expect("a SharedClientProtocol is required");
         173  +
            let mut deser = protocol
         174  +
                .deserialize_response(response, OperationWithOptionalInputOutput::OUTPUT_SCHEMA, _cfg)
         175  +
                .map_err(|e| {
         176  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         177  +
                })?;
         178  +
            let body = response.body().bytes().expect("body loaded");
         179  +
            let output = crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput::deserialize_with_response(
         180  +
                &mut *deser,
         181  +
                response.headers(),
         182  +
                response.status().into(),
         183  +
                body,
  157    184   
            )
  158         -
        };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         185  +
            .map_err(|e| {
         186  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         187  +
            })?;
         188  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         189  +
        }
  160    190   
    }
  161    191   
}
  162    192   
#[derive(Debug)]
  163    193   
struct OperationWithOptionalInputOutputRequestSerializer;
  164    194   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithOptionalInputOutputRequestSerializer {
  165    195   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  166    196   
    fn serialize_input(
  167    197   
        &self,
  168    198   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  169    199   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  170    200   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  171    201   
        let input = input
  172    202   
            .downcast::<crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput>()
  173    203   
            .expect("correct type");
  174         -
        let _header_serialization_settings = _cfg
  175         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  176         -
            .cloned()
  177         -
            .unwrap_or_default();
  178         -
        let mut request_builder = {
  179         -
            #[allow(clippy::uninlined_format_args)]
  180         -
            fn uri_base(
  181         -
                _input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  182         -
                output: &mut ::std::string::String,
  183         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184         -
                use ::std::fmt::Write as _;
  185         -
                ::std::write!(output, "/").expect("formatting should succeed");
  186         -
                ::std::result::Result::Ok(())
  187         -
            }
  188         -
            #[allow(clippy::unnecessary_wraps)]
  189         -
            fn update_http_builder(
  190         -
                input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  191         -
                builder: ::http_1x::request::Builder,
  192         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  193         -
                let mut uri = ::std::string::String::new();
  194         -
                uri_base(input, &mut uri)?;
  195         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  196         -
            }
  197         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  198         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  199         -
            builder = _header_serialization_settings.set_default_header(
  200         -
                builder,
  201         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  202         -
                "JsonProtocol.OperationWithOptionalInputOutput",
  203         -
            );
  204         -
            builder
  205         -
        };
  206         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  207         -
            crate::protocol_serde::shape_operation_with_optional_input_output::ser_operation_with_optional_input_output_input(&input)?,
  208         -
        );
  209         -
        if let Some(content_length) = body.content_length() {
  210         -
            let content_length = content_length.to_string();
  211         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  212         -
        }
  213         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         204  +
        let protocol = _cfg
         205  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         206  +
            .expect("a SharedClientProtocol is required");
         207  +
        let mut request = protocol
         208  +
            .serialize_request(&input, OperationWithOptionalInputOutput::INPUT_SCHEMA, "", _cfg)
         209  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         210  +
         211  +
        return ::std::result::Result::Ok(request);
  214    212   
    }
  215    213   
}
  216    214   
#[derive(Debug)]
  217    215   
struct OperationWithOptionalInputOutputEndpointParamsInterceptor;
  218    216   
  219    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithOptionalInputOutputEndpointParamsInterceptor {
  220    218   
    fn name(&self) -> &'static str {
  221    219   
        "OperationWithOptionalInputOutputEndpointParamsInterceptor"
  222    220   
    }
  223    221   

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output/_operation_with_optional_input_output_input.rs

@@ -1,1 +108,119 @@
   17     17   
    "aws.protocoltests.json.synthetic",
   18     18   
    "OperationWithOptionalInputOutputInput",
   19     19   
);
   20     20   
static OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_MEMBER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.json.synthetic#OperationWithOptionalInputOutputInput$Value",
   23     23   
        "aws.protocoltests.json.synthetic",
   24     24   
        "OperationWithOptionalInputOutputInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "value",
          27  +
    "Value",
   28     28   
    0,
   29     29   
);
   30     30   
static OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_MEMBER_VALUE],
   34     34   
);
   35     35   
impl OperationWithOptionalInputOutputInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithOptionalInputOutputInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.value {
   46     46   
            ser.write_string(&OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_MEMBER_VALUE, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl OperationWithOptionalInputOutputInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&OPERATIONWITHOPTIONALINPUTOUTPUTINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.value = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        builder
   75     75   
            .build()
   76     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     77   
    }
   78     78   
}
          79  +
impl OperationWithOptionalInputOutputInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   79     90   
impl OperationWithOptionalInputOutputInput {
   80     91   
    /// Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
   81     92   
    pub fn builder() -> crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder {
   82     93   
        crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder::default()
   83     94   
    }
   84     95   
}
   85     96   
   86     97   
/// A builder for [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
   87     98   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88     99   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output/_operation_with_optional_input_output_output.rs

@@ -1,1 +106,117 @@
   17     17   
    "aws.protocoltests.json.synthetic",
   18     18   
    "OperationWithOptionalInputOutputOutput",
   19     19   
);
   20     20   
static OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_MEMBER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.json.synthetic#OperationWithOptionalInputOutputOutput$Value",
   23     23   
        "aws.protocoltests.json.synthetic",
   24     24   
        "OperationWithOptionalInputOutputOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "value",
          27  +
    "Value",
   28     28   
    0,
   29     29   
);
   30     30   
static OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_MEMBER_VALUE],
   34     34   
);
   35     35   
impl OperationWithOptionalInputOutputOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithOptionalInputOutputOutput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.value {
   46     46   
            ser.write_string(&OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_MEMBER_VALUE, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl OperationWithOptionalInputOutputOutput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&OPERATIONWITHOPTIONALINPUTOUTPUTOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.value = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl OperationWithOptionalInputOutputOutput {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl OperationWithOptionalInputOutputOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
   79     90   
    pub fn builder() -> crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputOutputBuilder {
   80     91   
        crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutAndGetInlineDocuments`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutAndGetInlineDocuments;
    6      6   
impl PutAndGetInlineDocuments {
    7      7   
    /// Creates a new `PutAndGetInlineDocuments`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +239,241 @@
  130    136   
                crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct PutAndGetInlineDocumentsResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutAndGetInlineDocumentsResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         152  +
        #[allow(unused_mut)]
         153  +
        let mut force_error = false;
         154  +
         155  +
        if !success && status != 200 || force_error {
  145    156   
            let headers = response.headers();
  146    157   
            let body = response.body().bytes().expect("body loaded");
  147    158   
            #[allow(unused_mut)]
  148         -
        let mut force_error = false;
         159  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         160  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         161  +
            })?;
  149    162   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_put_and_get_inline_documents::de_put_and_get_inline_documents_http_error(status, headers, body)
         163  +
            let generic = generic_builder.build();
         164  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         165  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         166  +
                    crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError::generic(generic),
         167  +
                ),
         168  +
            ))
  152    169   
        } else {
  153         -
            crate::protocol_serde::shape_put_and_get_inline_documents::de_put_and_get_inline_documents_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         170  +
            let protocol = _cfg
         171  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         172  +
                .expect("a SharedClientProtocol is required");
         173  +
            let mut deser = protocol
         174  +
                .deserialize_response(response, PutAndGetInlineDocuments::OUTPUT_SCHEMA, _cfg)
         175  +
                .map_err(|e| {
         176  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         177  +
                })?;
         178  +
            let body = response.body().bytes().expect("body loaded");
         179  +
            let output = crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput::deserialize_with_response(
         180  +
                &mut *deser,
         181  +
                response.headers(),
         182  +
                response.status().into(),
         183  +
                body,
         184  +
            )
         185  +
            .map_err(|e| {
         186  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         187  +
            })?;
         188  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         189  +
        }
  156    190   
    }
  157    191   
}
  158    192   
#[derive(Debug)]
  159    193   
struct PutAndGetInlineDocumentsRequestSerializer;
  160    194   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutAndGetInlineDocumentsRequestSerializer {
  161    195   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    196   
    fn serialize_input(
  163    197   
        &self,
  164    198   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    199   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    200   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    201   
        let input = input
  168    202   
            .downcast::<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput>()
  169    203   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
  183         -
            }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  187         -
                builder: ::http_1x::request::Builder,
  188         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189         -
                let mut uri = ::std::string::String::new();
  190         -
                uri_base(input, &mut uri)?;
  191         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192         -
            }
  193         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195         -
            builder = _header_serialization_settings.set_default_header(
  196         -
                builder,
  197         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198         -
                "JsonProtocol.PutAndGetInlineDocuments",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  203         -
            crate::protocol_serde::shape_put_and_get_inline_documents::ser_put_and_get_inline_documents_input(&input)?,
  204         -
        );
  205         -
        if let Some(content_length) = body.content_length() {
  206         -
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208         -
        }
  209         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         204  +
        let protocol = _cfg
         205  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         206  +
            .expect("a SharedClientProtocol is required");
         207  +
        let mut request = protocol
         208  +
            .serialize_request(&input, PutAndGetInlineDocuments::INPUT_SCHEMA, "", _cfg)
         209  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         210  +
         211  +
        return ::std::result::Result::Ok(request);
  210    212   
    }
  211    213   
}
  212    214   
#[derive(Debug)]
  213    215   
struct PutAndGetInlineDocumentsEndpointParamsInterceptor;
  214    216   
  215    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutAndGetInlineDocumentsEndpointParamsInterceptor {
  216    218   
    fn name(&self) -> &'static str {
  217    219   
        "PutAndGetInlineDocumentsEndpointParamsInterceptor"
  218    220   
    }
  219    221   
@@ -307,309 +367,379 @@
  327    329   
            .expect("the config must have a deserializer");
  328    330   
  329    331   
        let parsed = de.deserialize_streaming(&mut http_response);
  330    332   
        let parsed = parsed.unwrap_or_else(|| {
  331    333   
            let http_response = http_response.map(|body| {
  332    334   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  333    335   
                    body.bytes().unwrap(),
  334    336   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  335    337   
                )))
  336    338   
            });
  337         -
            de.deserialize_nonstreaming(&http_response)
         339  +
            // Build a config bag with the protocol for schema-based deserialization
         340  +
            #[allow(unused_mut)]
         341  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         342  +
            {
         343  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         344  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         345  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         346  +
                ));
         347  +
                test_cfg.push_shared_layer(layer.freeze());
         348  +
            }
         349  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  338    350   
        });
  339    351   
        let parsed = parsed
  340    352   
            .expect("should be successful response")
  341    353   
            .downcast::<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput>()
  342    354   
            .unwrap();
  343    355   
        ::pretty_assertions::assert_eq!(
  344    356   
            parsed.inline_document,
  345    357   
            expected_output.inline_document,
  346    358   
            "Unexpected value for `inline_document`"
  347    359   
        );

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents/_put_and_get_inline_documents_input.rs

@@ -1,1 +108,119 @@
   17     17   
    "aws.protocoltests.json.synthetic",
   18     18   
    "PutAndGetInlineDocumentsInput",
   19     19   
);
   20     20   
static PUTANDGETINLINEDOCUMENTSINPUT_MEMBER_INLINE_DOCUMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.json.synthetic#PutAndGetInlineDocumentsInput$inlineDocument",
   23     23   
        "aws.protocoltests.json.synthetic",
   24     24   
        "PutAndGetInlineDocumentsInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Document,
   27         -
    "inline_document",
          27  +
    "inlineDocument",
   28     28   
    0,
   29     29   
);
   30     30   
static PUTANDGETINLINEDOCUMENTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    PUTANDGETINLINEDOCUMENTSINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&PUTANDGETINLINEDOCUMENTSINPUT_MEMBER_INLINE_DOCUMENT],
   34     34   
);
   35     35   
impl PutAndGetInlineDocumentsInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTANDGETINLINEDOCUMENTSINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for PutAndGetInlineDocumentsInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.inline_document {
   46     46   
            ser.write_document(&PUTANDGETINLINEDOCUMENTSINPUT_MEMBER_INLINE_DOCUMENT, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl PutAndGetInlineDocumentsInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&PUTANDGETINLINEDOCUMENTSINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&PUTANDGETINLINEDOCUMENTSINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.inline_document = Some(deser.read_document(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        builder
   75     75   
            .build()
   76     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     77   
    }
   78     78   
}
          79  +
impl PutAndGetInlineDocumentsInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   79     90   
impl PutAndGetInlineDocumentsInput {
   80     91   
    /// Creates a new builder-style object to manufacture [`PutAndGetInlineDocumentsInput`](crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput).
   81     92   
    pub fn builder() -> crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsInputBuilder {
   82     93   
        crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsInputBuilder::default()
   83     94   
    }
   84     95   
}
   85     96   
   86     97   
/// A builder for [`PutAndGetInlineDocumentsInput`](crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput).
   87     98   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88     99   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents/_put_and_get_inline_documents_output.rs

@@ -1,1 +106,117 @@
   17     17   
    "aws.protocoltests.json.synthetic",
   18     18   
    "PutAndGetInlineDocumentsOutput",
   19     19   
);
   20     20   
static PUTANDGETINLINEDOCUMENTSOUTPUT_MEMBER_INLINE_DOCUMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.json.synthetic#PutAndGetInlineDocumentsOutput$inlineDocument",
   23     23   
        "aws.protocoltests.json.synthetic",
   24     24   
        "PutAndGetInlineDocumentsOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Document,
   27         -
    "inline_document",
          27  +
    "inlineDocument",
   28     28   
    0,
   29     29   
);
   30     30   
static PUTANDGETINLINEDOCUMENTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    PUTANDGETINLINEDOCUMENTSOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&PUTANDGETINLINEDOCUMENTSOUTPUT_MEMBER_INLINE_DOCUMENT],
   34     34   
);
   35     35   
impl PutAndGetInlineDocumentsOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTANDGETINLINEDOCUMENTSOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for PutAndGetInlineDocumentsOutput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.inline_document {
   46     46   
            ser.write_document(&PUTANDGETINLINEDOCUMENTSOUTPUT_MEMBER_INLINE_DOCUMENT, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl PutAndGetInlineDocumentsOutput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&PUTANDGETINLINEDOCUMENTSOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&PUTANDGETINLINEDOCUMENTSOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.inline_document = Some(deser.read_document(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl PutAndGetInlineDocumentsOutput {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl PutAndGetInlineDocumentsOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`PutAndGetInlineDocumentsOutput`](crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput).
   79     90   
    pub fn builder() -> crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsOutputBuilder {
   80     91   
        crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`PutAndGetInlineDocumentsOutput`](crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutWithContentEncoding`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutWithContentEncoding;
    6      6   
impl PutWithContentEncoding {
    7      7   
    /// Creates a new `PutWithContentEncoding`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_with_content_encoding::PutWithContentEncodingInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_with_content_encoding::PutWithContentEncodingOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +239,269 @@
  130    134   
                crate::operation::put_with_content_encoding::PutWithContentEncodingError,
  131    135   
            >::new());
  132    136   
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct PutWithContentEncodingResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutWithContentEncodingResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         144  +
    fn deserialize_nonstreaming_with_config(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         150  +
        #[allow(unused_mut)]
         151  +
        let mut force_error = false;
         152  +
         153  +
        if !success && status != 200 || force_error {
  145    154   
            let headers = response.headers();
  146    155   
            let body = response.body().bytes().expect("body loaded");
  147    156   
            #[allow(unused_mut)]
  148         -
        let mut force_error = false;
         157  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         158  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         159  +
            })?;
  149    160   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_error(status, headers, body)
         161  +
            let generic = generic_builder.build();
         162  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         163  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         164  +
                    crate::operation::put_with_content_encoding::PutWithContentEncodingError::generic(generic),
         165  +
                ),
         166  +
            ))
  152    167   
        } else {
  153         -
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let mut deser = protocol
         172  +
                .deserialize_response(response, PutWithContentEncoding::OUTPUT_SCHEMA, _cfg)
         173  +
                .map_err(|e| {
         174  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
                })?;
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            let output = crate::operation::put_with_content_encoding::PutWithContentEncodingOutput::deserialize_with_response(
         178  +
                &mut *deser,
         179  +
                response.headers(),
         180  +
                response.status().into(),
         181  +
                body,
         182  +
            )
         183  +
            .map_err(|e| {
         184  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         185  +
            })?;
         186  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         187  +
        }
  156    188   
    }
  157    189   
}
  158    190   
#[derive(Debug)]
  159    191   
struct PutWithContentEncodingRequestSerializer;
  160    192   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutWithContentEncodingRequestSerializer {
  161    193   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    194   
    fn serialize_input(
  163    195   
        &self,
  164    196   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    197   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    198   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    199   
        let input = input
  168    200   
            .downcast::<crate::operation::put_with_content_encoding::PutWithContentEncodingInput>()
  169    201   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        if protocol.supports_http_bindings() {
         206  +
            let mut request = protocol
         207  +
                .serialize_body(&input, PutWithContentEncoding::INPUT_SCHEMA, "", _cfg)
         208  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         209  +
            {
         210  +
                let mut uri = "/".to_string();
         211  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         212  +
                if let Some(ref val) = input.encoding {
         213  +
                    request.headers_mut().insert("Content-Encoding", val.to_string());
         214  +
                }
         215  +
                if !query_params.is_empty() {
         216  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         217  +
                    let pairs: Vec<String> = query_params
         218  +
                        .iter()
         219  +
                        .map(|(k, v)| {
         220  +
                            format!(
         221  +
                                "{}={}",
         222  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         223  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         224  +
                            )
         225  +
                        })
         226  +
                        .collect();
         227  +
                    uri.push_str(&pairs.join("&"));
         228  +
                }
         229  +
                request.set_uri(uri.as_str()).expect("valid URI");
         230  +
            }
         231  +
         232  +
            return ::std::result::Result::Ok(request);
         233  +
        } else {
         234  +
            let mut request = protocol
         235  +
                .serialize_request(&input, PutWithContentEncoding::INPUT_SCHEMA, "", _cfg)
         236  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         237  +
         238  +
            return ::std::result::Result::Ok(request);
  183    239   
        }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  187         -
                builder: ::http_1x::request::Builder,
  188         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189         -
                let mut uri = ::std::string::String::new();
  190         -
                uri_base(input, &mut uri)?;
  191         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192         -
            }
  193         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195         -
            builder = _header_serialization_settings.set_default_header(
  196         -
                builder,
  197         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198         -
                "JsonProtocol.PutWithContentEncoding",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  203         -
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_input(&input)?,
  204         -
        );
  205         -
        if let Some(content_length) = body.content_length() {
  206         -
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208         -
        }
  209         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    240   
    }
  211    241   
}
  212    242   
#[derive(Debug)]
  213    243   
struct PutWithContentEncodingEndpointParamsInterceptor;
  214    244   
  215    245   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  216    246   
    fn name(&self) -> &'static str {
  217    247   
        "PutWithContentEncodingEndpointParamsInterceptor"
  218    248   
    }
  219    249