Client Test

Client Test

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