Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/list_tables/_list_tables_input.rs

@@ -4,4 +131,142 @@
   24     24   
    "com.amazonaws.dynamodb.synthetic",
   25     25   
    "ListTablesInput",
   26     26   
);
   27     27   
static LISTTABLESINPUT_MEMBER_EXCLUSIVE_START_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.dynamodb.synthetic#ListTablesInput$ExclusiveStartTableName",
   30     30   
        "com.amazonaws.dynamodb.synthetic",
   31     31   
        "ListTablesInput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "exclusive_start_table_name",
          34  +
    "ExclusiveStartTableName",
   35     35   
    0,
   36     36   
);
   37     37   
static LISTTABLESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.dynamodb.synthetic#ListTablesInput$Limit",
   40     40   
        "com.amazonaws.dynamodb.synthetic",
   41     41   
        "ListTablesInput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::Integer,
   44         -
    "limit",
          44  +
    "Limit",
   45     45   
    1,
   46     46   
);
   47     47   
static LISTTABLESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     48   
    LISTTABLESINPUT_SCHEMA_ID,
   49     49   
    ::aws_smithy_schema::ShapeType::Structure,
   50     50   
    &[&LISTTABLESINPUT_MEMBER_EXCLUSIVE_START_TABLE_NAME, &LISTTABLESINPUT_MEMBER_LIMIT],
   51     51   
);
   52     52   
impl ListTablesInput {
   53     53   
    /// The schema for this shape.
   54     54   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTABLESINPUT_SCHEMA;
   55     55   
}
   56     56   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTablesInput {
   57     57   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     58   
    fn serialize_members(
   59     59   
        &self,
   60     60   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     61   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     62   
        if let Some(ref val) = self.exclusive_start_table_name {
   63     63   
            ser.write_string(&LISTTABLESINPUT_MEMBER_EXCLUSIVE_START_TABLE_NAME, val)?;
   64     64   
        }
   65     65   
        if let Some(ref val) = self.limit {
   66     66   
            ser.write_integer(&LISTTABLESINPUT_MEMBER_LIMIT, *val)?;
   67     67   
        }
   68     68   
        Ok(())
   69     69   
    }
   70     70   
}
   71     71   
impl ListTablesInput {
   72     72   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   73         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   74         -
        deserializer: &mut D,
          73  +
    pub fn deserialize(
          74  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   75     75   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   76     76   
        #[allow(unused_variables, unused_mut)]
   77     77   
        let mut builder = Self::builder();
   78     78   
        #[allow(
   79     79   
            unused_variables,
   80     80   
            unreachable_code,
   81     81   
            clippy::single_match,
   82     82   
            clippy::match_single_binding,
   83     83   
            clippy::diverging_sub_expression
   84     84   
        )]
   85         -
        deserializer.read_struct(&LISTTABLESINPUT_SCHEMA, (), |_, member, deser| {
          85  +
        deserializer.read_struct(&LISTTABLESINPUT_SCHEMA, &mut |member, deser| {
   86     86   
            match member.member_index() {
   87     87   
                Some(0) => {
   88     88   
                    builder.exclusive_start_table_name = Some(deser.read_string(member)?);
   89     89   
                }
   90     90   
                Some(1) => {
   91     91   
                    builder.limit = Some(deser.read_integer(member)?);
   92     92   
                }
   93     93   
                _ => {}
   94     94   
            }
   95     95   
            Ok(())
   96     96   
        })?;
   97     97   
        builder
   98     98   
            .build()
   99     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  100    100   
    }
  101    101   
}
         102  +
impl ListTablesInput {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  102    113   
impl ListTablesInput {
  103    114   
    /// Creates a new builder-style object to manufacture [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
  104    115   
    pub fn builder() -> crate::operation::list_tables::builders::ListTablesInputBuilder {
  105    116   
        crate::operation::list_tables::builders::ListTablesInputBuilder::default()
  106    117   
    }
  107    118   
}
  108    119   
  109    120   
/// A builder for [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
  110    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/list_tables/_list_tables_output.rs

@@ -10,10 +153,154 @@
   30     30   
    "com.amazonaws.dynamodb.synthetic",
   31     31   
    "ListTablesOutput",
   32     32   
);
   33     33   
static LISTTABLESOUTPUT_MEMBER_TABLE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   34     34   
    ::aws_smithy_schema::ShapeId::from_static(
   35     35   
        "com.amazonaws.dynamodb.synthetic#ListTablesOutput$TableNames",
   36     36   
        "com.amazonaws.dynamodb.synthetic",
   37     37   
        "ListTablesOutput",
   38     38   
    ),
   39     39   
    ::aws_smithy_schema::ShapeType::List,
   40         -
    "table_names",
          40  +
    "TableNames",
   41     41   
    0,
   42     42   
);
   43     43   
static LISTTABLESOUTPUT_MEMBER_LAST_EVALUATED_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.dynamodb.synthetic#ListTablesOutput$LastEvaluatedTableName",
   46     46   
        "com.amazonaws.dynamodb.synthetic",
   47     47   
        "ListTablesOutput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::String,
   50         -
    "last_evaluated_table_name",
          50  +
    "LastEvaluatedTableName",
   51     51   
    1,
   52     52   
);
   53     53   
static LISTTABLESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   54     54   
    LISTTABLESOUTPUT_SCHEMA_ID,
   55     55   
    ::aws_smithy_schema::ShapeType::Structure,
   56     56   
    &[&LISTTABLESOUTPUT_MEMBER_TABLE_NAMES, &LISTTABLESOUTPUT_MEMBER_LAST_EVALUATED_TABLE_NAME],
   57     57   
);
   58     58   
impl ListTablesOutput {
   59     59   
    /// The schema for this shape.
   60     60   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTABLESOUTPUT_SCHEMA;
   61     61   
}
   62     62   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTablesOutput {
   63     63   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   64     64   
    fn serialize_members(
   65     65   
        &self,
   66     66   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   67     67   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   68     68   
        if let Some(ref val) = self.table_names {
   69     69   
            ser.write_list(
   70     70   
                &LISTTABLESOUTPUT_MEMBER_TABLE_NAMES,
   71     71   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     72   
                    for item in val {
   73     73   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   74     74   
                    }
   75     75   
                    Ok(())
   76     76   
                },
   77     77   
            )?;
   78     78   
        }
   79     79   
        if let Some(ref val) = self.last_evaluated_table_name {
   80     80   
            ser.write_string(&LISTTABLESOUTPUT_MEMBER_LAST_EVALUATED_TABLE_NAME, val)?;
   81     81   
        }
   82     82   
        Ok(())
   83     83   
    }
   84     84   
}
   85     85   
impl ListTablesOutput {
   86     86   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   87         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   88         -
        deserializer: &mut D,
          87  +
    pub fn deserialize(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   89     89   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   90     90   
        #[allow(unused_variables, unused_mut)]
   91     91   
        let mut builder = Self::builder();
   92     92   
        #[allow(
   93     93   
            unused_variables,
   94     94   
            unreachable_code,
   95     95   
            clippy::single_match,
   96     96   
            clippy::match_single_binding,
   97     97   
            clippy::diverging_sub_expression
   98     98   
        )]
   99         -
        deserializer.read_struct(&LISTTABLESOUTPUT_SCHEMA, (), |_, member, deser| {
          99  +
        deserializer.read_struct(&LISTTABLESOUTPUT_SCHEMA, &mut |member, deser| {
  100    100   
            match member.member_index() {
  101    101   
                Some(0) => {
  102         -
                    builder.table_names = Some({
  103         -
                        let container = if let Some(cap) = deser.container_size() {
  104         -
                            Vec::with_capacity(cap)
  105         -
                        } else {
  106         -
                            Vec::new()
  107         -
                        };
  108         -
                        deser.read_list(member, container, |mut list, deser| {
  109         -
                            list.push(deser.read_string(member)?);
  110         -
                            Ok(list)
  111         -
                        })?
  112         -
                    });
         102  +
                    builder.table_names = Some(deser.read_string_list(member)?);
  113    103   
                }
  114    104   
                Some(1) => {
  115    105   
                    builder.last_evaluated_table_name = Some(deser.read_string(member)?);
  116    106   
                }
  117    107   
                _ => {}
  118    108   
            }
  119    109   
            Ok(())
  120    110   
        })?;
  121    111   
        Ok(builder.build())
  122    112   
    }
  123    113   
}
         114  +
impl ListTablesOutput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         116  +
    pub fn deserialize_with_response(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         119  +
        _status: u16,
         120  +
        _body: &[u8],
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        Self::deserialize(deserializer)
         123  +
    }
         124  +
}
  124    125   
impl ListTablesOutput {
  125    126   
    /// Creates a new builder-style object to manufacture [`ListTablesOutput`](crate::operation::list_tables::ListTablesOutput).
  126    127   
    pub fn builder() -> crate::operation::list_tables::builders::ListTablesOutputBuilder {
  127    128   
        crate::operation::list_tables::builders::ListTablesOutputBuilder::default()
  128    129   
    }
  129    130   
}
  130    131   
  131    132   
/// A builder for [`ListTablesOutput`](crate::operation::list_tables::ListTablesOutput).
  132    133   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  133    134   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/list_tags_of_resource.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 `ListTagsOfResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTagsOfResource;
    6      6   
impl ListTagsOfResource {
    7      7   
    /// Creates a new `ListTagsOfResource`
    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::list_tags_of_resource::ListTagsOfResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_of_resource::ListTagsOfResourceOutput::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::list_tags_of_resource::ListTagsOfResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tags_of_resource::ListTagsOfResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tags_of_resource::ListTagsOfResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +233,320 @@
  124    128   
                crate::operation::list_tags_of_resource::ListTagsOfResourceError,
  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 ListTagsOfResourceResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsOfResourceResponseDeserializer {
  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_list_tags_of_resource::de_list_tags_of_resource_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_list_tags_of_resource::de_list_tags_of_resource_http_response(status, headers, body)
         155  +
            let generic = generic_builder.build();
         156  +
            let error_code = match generic.code() {
         157  +
                ::std::option::Option::Some(code) => code,
         158  +
                ::std::option::Option::None => {
         159  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         160  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         161  +
                            crate::operation::list_tags_of_resource::ListTagsOfResourceError::unhandled(generic),
         162  +
                        ),
         163  +
                    ))
         164  +
                }
  148    165   
            };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "InternalServerError" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::InternalServerError({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         176  +
                                &mut *deser,
         177  +
                                response.headers(),
         178  +
                                response.status().into(),
         179  +
                                body,
         180  +
                            )
         181  +
                        }) {
         182  +
                        ::std::result::Result::Ok(val) => val,
         183  +
                        ::std::result::Result::Err(e) => {
         184  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         185  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         186  +
                            ))
         187  +
                        }
         188  +
                    };
         189  +
                    tmp.meta = generic;
         190  +
                    if tmp.message.is_none() {
         191  +
                        tmp.message = _error_message;
         192  +
                    }
         193  +
                    tmp
         194  +
                }),
         195  +
                "InvalidEndpointException" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::InvalidEndpointError({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         200  +
                                &mut *deser,
         201  +
                                response.headers(),
         202  +
                                response.status().into(),
         203  +
                                body,
         204  +
                            )
         205  +
                        }) {
         206  +
                        ::std::result::Result::Ok(val) => val,
         207  +
                        ::std::result::Result::Err(e) => {
         208  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         209  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         210  +
                            ))
         211  +
                        }
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
                    if tmp.message.is_none() {
         215  +
                        tmp.message = _error_message;
         216  +
                    }
         217  +
                    tmp
         218  +
                }),
         219  +
                "ResourceNotFoundException" => crate::operation::list_tags_of_resource::ListTagsOfResourceError::ResourceNotFoundError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                _ => crate::operation::list_tags_of_resource::ListTagsOfResourceError::generic(generic),
         244  +
            };
         245  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         246  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         247  +
            ))
         248  +
        } else {
         249  +
            let protocol = _cfg
         250  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         251  +
                .expect("a SharedClientProtocol is required");
         252  +
            let mut deser = protocol
         253  +
                .deserialize_response(response, ListTagsOfResource::OUTPUT_SCHEMA, _cfg)
         254  +
                .map_err(|e| {
         255  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
                })?;
         257  +
            let body = response.body().bytes().expect("body loaded");
         258  +
            let output = crate::operation::list_tags_of_resource::ListTagsOfResourceOutput::deserialize_with_response(
         259  +
                &mut *deser,
         260  +
                response.headers(),
         261  +
                response.status().into(),
         262  +
                body,
         263  +
            )
         264  +
            .map_err(|e| {
         265  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         266  +
            })?;
         267  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         268  +
        }
  150    269   
    }
  151    270   
}
  152    271   
#[derive(Debug)]
  153    272   
struct ListTagsOfResourceRequestSerializer;
  154    273   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsOfResourceRequestSerializer {
  155    274   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    275   
    fn serialize_input(
  157    276   
        &self,
  158    277   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    278   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    279   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    280   
        let input = input
  162    281   
            .downcast::<crate::operation::list_tags_of_resource::ListTagsOfResourceInput>()
  163    282   
            .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::list_tags_of_resource::ListTagsOfResourceInput,
  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::list_tags_of_resource::ListTagsOfResourceInput,
  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.0");
  189         -
            builder = _header_serialization_settings.set_default_header(
  190         -
                builder,
  191         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192         -
                "DynamoDB_20120810.ListTagsOfResource",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tags_of_resource::ser_list_tags_of_resource_input(
  197         -
            &input,
  198         -
        )?);
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         283  +
        let protocol = _cfg
         284  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
            .expect("a SharedClientProtocol is required");
         286  +
        let mut request = protocol
         287  +
            .serialize_request(&input, ListTagsOfResource::INPUT_SCHEMA, "", _cfg)
         288  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         289  +
         290  +
        return ::std::result::Result::Ok(request);
  204    291   
    }
  205    292   
}
  206    293   
#[derive(Debug)]
  207    294   
struct ListTagsOfResourceEndpointParamsInterceptor;
  208    295   
  209    296   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsOfResourceEndpointParamsInterceptor {
  210    297   
    fn name(&self) -> &'static str {
  211    298   
        "ListTagsOfResourceEndpointParamsInterceptor"
  212    299   
    }
  213    300   

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/list_tags_of_resource/_list_tags_of_resource_input.rs

@@ -3,3 +130,142 @@
   23     23   
    "com.amazonaws.dynamodb.synthetic",
   24     24   
    "ListTagsOfResourceInput",
   25     25   
);
   26     26   
static LISTTAGSOFRESOURCEINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "com.amazonaws.dynamodb.synthetic#ListTagsOfResourceInput$ResourceArn",
   29     29   
        "com.amazonaws.dynamodb.synthetic",
   30     30   
        "ListTagsOfResourceInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "resource_arn",
          33  +
    "ResourceArn",
   34     34   
    0,
   35     35   
);
   36     36   
static LISTTAGSOFRESOURCEINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "com.amazonaws.dynamodb.synthetic#ListTagsOfResourceInput$NextToken",
   39     39   
        "com.amazonaws.dynamodb.synthetic",
   40     40   
        "ListTagsOfResourceInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::String,
   43         -
    "next_token",
          43  +
    "NextToken",
   44     44   
    1,
   45     45   
);
   46     46   
static LISTTAGSOFRESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    LISTTAGSOFRESOURCEINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[&LISTTAGSOFRESOURCEINPUT_MEMBER_RESOURCE_ARN, &LISTTAGSOFRESOURCEINPUT_MEMBER_NEXT_TOKEN],
   50     50   
);
   51     51   
impl ListTagsOfResourceInput {
   52     52   
    /// The schema for this shape.
   53     53   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSOFRESOURCEINPUT_SCHEMA;
   54     54   
}
   55     55   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsOfResourceInput {
   56     56   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   57     57   
    fn serialize_members(
   58     58   
        &self,
   59     59   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   60     60   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   61     61   
        if let Some(ref val) = self.resource_arn {
   62     62   
            ser.write_string(&LISTTAGSOFRESOURCEINPUT_MEMBER_RESOURCE_ARN, val)?;
   63     63   
        }
   64     64   
        if let Some(ref val) = self.next_token {
   65     65   
            ser.write_string(&LISTTAGSOFRESOURCEINPUT_MEMBER_NEXT_TOKEN, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl ListTagsOfResourceInput {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&LISTTAGSOFRESOURCEINPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&LISTTAGSOFRESOURCEINPUT_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.resource_arn = Some(deser.read_string(member)?);
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.next_token = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.resource_arn = builder.resource_arn.or(Some(String::new()));
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl ListTagsOfResourceInput {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  101    113   
impl ListTagsOfResourceInput {
  102    114   
    /// Creates a new builder-style object to manufacture [`ListTagsOfResourceInput`](crate::operation::list_tags_of_resource::ListTagsOfResourceInput).
  103    115   
    pub fn builder() -> crate::operation::list_tags_of_resource::builders::ListTagsOfResourceInputBuilder {
  104    116   
        crate::operation::list_tags_of_resource::builders::ListTagsOfResourceInputBuilder::default()
  105    117   
    }
  106    118   
}
  107    119   
  108    120   
/// A builder for [`ListTagsOfResourceInput`](crate::operation::list_tags_of_resource::ListTagsOfResourceInput).
  109    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/list_tags_of_resource/_list_tags_of_resource_output.rs

@@ -5,5 +148,156 @@
   25     25   
    "com.amazonaws.dynamodb.synthetic",
   26     26   
    "ListTagsOfResourceOutput",
   27     27   
);
   28     28   
static LISTTAGSOFRESOURCEOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   29     29   
    ::aws_smithy_schema::ShapeId::from_static(
   30     30   
        "com.amazonaws.dynamodb.synthetic#ListTagsOfResourceOutput$Tags",
   31     31   
        "com.amazonaws.dynamodb.synthetic",
   32     32   
        "ListTagsOfResourceOutput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::List,
   35         -
    "tags",
          35  +
    "Tags",
   36     36   
    0,
   37     37   
);
   38     38   
static LISTTAGSOFRESOURCEOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.dynamodb.synthetic#ListTagsOfResourceOutput$NextToken",
   41     41   
        "com.amazonaws.dynamodb.synthetic",
   42     42   
        "ListTagsOfResourceOutput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "next_token",
          45  +
    "NextToken",
   46     46   
    1,
   47     47   
);
   48     48   
static LISTTAGSOFRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    LISTTAGSOFRESOURCEOUTPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&LISTTAGSOFRESOURCEOUTPUT_MEMBER_TAGS, &LISTTAGSOFRESOURCEOUTPUT_MEMBER_NEXT_TOKEN],
   52     52   
);
   53     53   
impl ListTagsOfResourceOutput {
   54     54   
    /// The schema for this shape.
   55     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSOFRESOURCEOUTPUT_SCHEMA;
   56     56   
}
   57     57   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsOfResourceOutput {
   58     58   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     59   
    fn serialize_members(
   60     60   
        &self,
   61     61   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     62   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     63   
        if let Some(ref val) = self.tags {
   64     64   
            ser.write_list(
   65     65   
                &LISTTAGSOFRESOURCEOUTPUT_MEMBER_TAGS,
   66     66   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   67     67   
                    for item in val {
   68     68   
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
   69     69   
                    }
   70     70   
                    Ok(())
   71     71   
                },
   72     72   
            )?;
   73     73   
        }
   74     74   
        if let Some(ref val) = self.next_token {
   75     75   
            ser.write_string(&LISTTAGSOFRESOURCEOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   76     76   
        }
   77     77   
        Ok(())
   78     78   
    }
   79     79   
}
   80     80   
impl ListTagsOfResourceOutput {
   81     81   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   82         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   83         -
        deserializer: &mut D,
          82  +
    pub fn deserialize(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   84     84   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   85     85   
        #[allow(unused_variables, unused_mut)]
   86     86   
        let mut builder = Self::builder();
   87     87   
        #[allow(
   88     88   
            unused_variables,
   89     89   
            unreachable_code,
   90     90   
            clippy::single_match,
   91     91   
            clippy::match_single_binding,
   92     92   
            clippy::diverging_sub_expression
   93     93   
        )]
   94         -
        deserializer.read_struct(&LISTTAGSOFRESOURCEOUTPUT_SCHEMA, (), |_, member, deser| {
          94  +
        deserializer.read_struct(&LISTTAGSOFRESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
   95     95   
            match member.member_index() {
   96     96   
                Some(0) => {
   97     97   
                    builder.tags = Some({
   98         -
                        let container = if let Some(cap) = deser.container_size() {
   99         -
                            Vec::with_capacity(cap)
  100         -
                        } else {
  101         -
                            Vec::new()
  102         -
                        };
  103         -
                        deser.read_list(member, container, |mut list, deser| {
  104         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  105         -
                            Ok(list)
  106         -
                        })?
          98  +
                        let mut container = Vec::new();
          99  +
                        deser.read_list(member, &mut |deser| {
         100  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         101  +
                            Ok(())
         102  +
                        })?;
         103  +
                        container
  107    104   
                    });
  108    105   
                }
  109    106   
                Some(1) => {
  110    107   
                    builder.next_token = Some(deser.read_string(member)?);
  111    108   
                }
  112    109   
                _ => {}
  113    110   
            }
  114    111   
            Ok(())
  115    112   
        })?;
  116    113   
        Ok(builder.build())
  117    114   
    }
  118    115   
}
         116  +
impl ListTagsOfResourceOutput {
         117  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         118  +
    pub fn deserialize_with_response(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         121  +
        _status: u16,
         122  +
        _body: &[u8],
         123  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         124  +
        Self::deserialize(deserializer)
         125  +
    }
         126  +
}
  119    127   
impl ListTagsOfResourceOutput {
  120    128   
    /// Creates a new builder-style object to manufacture [`ListTagsOfResourceOutput`](crate::operation::list_tags_of_resource::ListTagsOfResourceOutput).
  121    129   
    pub fn builder() -> crate::operation::list_tags_of_resource::builders::ListTagsOfResourceOutputBuilder {
  122    130   
        crate::operation::list_tags_of_resource::builders::ListTagsOfResourceOutputBuilder::default()
  123    131   
    }
  124    132   
}
  125    133   
  126    134   
/// A builder for [`ListTagsOfResourceOutput`](crate::operation::list_tags_of_resource::ListTagsOfResourceOutput).
  127    135   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  128    136   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/put_item.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 `PutItem`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutItem;
    6      6   
impl PutItem {
    7      7   
    /// Creates a new `PutItem`
    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_item::PutItemInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_item::PutItemOutput::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_item::PutItemInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_item::PutItemOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_item::PutItemError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -97,101 +222,425 @@
  117    121   
                crate::operation::put_item::PutItemError,
  118    122   
            >::new());
  119    123   
  120    124   
        ::std::borrow::Cow::Owned(rcb)
  121    125   
    }
  122    126   
}
  123    127   
  124    128   
#[derive(Debug)]
  125    129   
struct PutItemResponseDeserializer;
  126    130   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutItemResponseDeserializer {
  127         -
    fn deserialize_nonstreaming(
         131  +
    fn deserialize_nonstreaming_with_config(
  128    132   
        &self,
  129    133   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         134  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  130    135   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  131    136   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         137  +
        #[allow(unused_mut)]
         138  +
        let mut force_error = false;
         139  +
         140  +
        if !success && status != 200 || force_error {
  132    141   
            let headers = response.headers();
  133    142   
            let body = response.body().bytes().expect("body loaded");
  134    143   
            #[allow(unused_mut)]
  135         -
        let mut force_error = false;
         144  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         145  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         146  +
            })?;
  136    147   
  137         -
        let parse_result = if !success && status != 200 || force_error {
  138         -
            crate::protocol_serde::shape_put_item::de_put_item_http_error(status, headers, body)
  139         -
        } else {
  140         -
            crate::protocol_serde::shape_put_item::de_put_item_http_response(status, headers, body)
         148  +
            let generic = generic_builder.build();
         149  +
            let error_code = match generic.code() {
         150  +
                ::std::option::Option::Some(code) => code,
         151  +
                ::std::option::Option::None => {
         152  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         153  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::put_item::PutItemError::unhandled(generic)),
         154  +
                    ))
         155  +
                }
         156  +
            };
         157  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         158  +
            let protocol = _cfg
         159  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         160  +
                .expect("a SharedClientProtocol is required");
         161  +
            let err = match error_code {
         162  +
                "ConditionalCheckFailedException" => crate::operation::put_item::PutItemError::ConditionalCheckFailedError({
         163  +
                    let mut tmp = match protocol
         164  +
                        .deserialize_response(response, crate::types::error::ConditionalCheckFailedError::SCHEMA, _cfg)
         165  +
                        .and_then(|mut deser| {
         166  +
                            crate::types::error::ConditionalCheckFailedError::deserialize_with_response(
         167  +
                                &mut *deser,
         168  +
                                response.headers(),
         169  +
                                response.status().into(),
         170  +
                                body,
         171  +
                            )
         172  +
                        }) {
         173  +
                        ::std::result::Result::Ok(val) => val,
         174  +
                        ::std::result::Result::Err(e) => {
         175  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         177  +
                            ))
         178  +
                        }
         179  +
                    };
         180  +
                    tmp.meta = generic;
         181  +
                    if tmp.message.is_none() {
         182  +
                        tmp.message = _error_message;
         183  +
                    }
         184  +
                    tmp
         185  +
                }),
         186  +
                "InternalServerError" => crate::operation::put_item::PutItemError::InternalServerError({
         187  +
                    let mut tmp = match protocol
         188  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         189  +
                        .and_then(|mut deser| {
         190  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         191  +
                                &mut *deser,
         192  +
                                response.headers(),
         193  +
                                response.status().into(),
         194  +
                                body,
         195  +
                            )
         196  +
                        }) {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => {
         199  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                            ))
         202  +
                        }
         203  +
                    };
         204  +
                    tmp.meta = generic;
         205  +
                    if tmp.message.is_none() {
         206  +
                        tmp.message = _error_message;
         207  +
                    }
         208  +
                    tmp
         209  +
                }),
         210  +
                "InvalidEndpointException" => crate::operation::put_item::PutItemError::InvalidEndpointError({
         211  +
                    let mut tmp = match protocol
         212  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         213  +
                        .and_then(|mut deser| {
         214  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         215  +
                                &mut *deser,
         216  +
                                response.headers(),
         217  +
                                response.status().into(),
         218  +
                                body,
         219  +
                            )
         220  +
                        }) {
         221  +
                        ::std::result::Result::Ok(val) => val,
         222  +
                        ::std::result::Result::Err(e) => {
         223  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         224  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         225  +
                            ))
         226  +
                        }
         227  +
                    };
         228  +
                    tmp.meta = generic;
         229  +
                    if tmp.message.is_none() {
         230  +
                        tmp.message = _error_message;
         231  +
                    }
         232  +
                    tmp
         233  +
                }),
         234  +
                "ItemCollectionSizeLimitExceededException" => crate::operation::put_item::PutItemError::ItemCollectionSizeLimitExceededError({
         235  +
                    let mut tmp = match protocol
         236  +
                        .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededError::SCHEMA, _cfg)
         237  +
                        .and_then(|mut deser| {
         238  +
                            crate::types::error::ItemCollectionSizeLimitExceededError::deserialize_with_response(
         239  +
                                &mut *deser,
         240  +
                                response.headers(),
         241  +
                                response.status().into(),
         242  +
                                body,
         243  +
                            )
         244  +
                        }) {
         245  +
                        ::std::result::Result::Ok(val) => val,
         246  +
                        ::std::result::Result::Err(e) => {
         247  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                            ))
         250  +
                        }
         251  +
                    };
         252  +
                    tmp.meta = generic;
         253  +
                    if tmp.message.is_none() {
         254  +
                        tmp.message = _error_message;
         255  +
                    }
         256  +
                    tmp
         257  +
                }),
         258  +
                "ProvisionedThroughputExceededException" => crate::operation::put_item::PutItemError::ProvisionedThroughputExceededError({
         259  +
                    let mut tmp = match protocol
         260  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededError::SCHEMA, _cfg)
         261  +
                        .and_then(|mut deser| {
         262  +
                            crate::types::error::ProvisionedThroughputExceededError::deserialize_with_response(
         263  +
                                &mut *deser,
         264  +
                                response.headers(),
         265  +
                                response.status().into(),
         266  +
                                body,
         267  +
                            )
         268  +
                        }) {
         269  +
                        ::std::result::Result::Ok(val) => val,
         270  +
                        ::std::result::Result::Err(e) => {
         271  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                            ))
         274  +
                        }
         275  +
                    };
         276  +
                    tmp.meta = generic;
         277  +
                    if tmp.message.is_none() {
         278  +
                        tmp.message = _error_message;
         279  +
                    }
         280  +
                    tmp
         281  +
                }),
         282  +
                "RequestLimitExceeded" => crate::operation::put_item::PutItemError::RequestLimitExceeded({
         283  +
                    let mut tmp = match protocol
         284  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         285  +
                        .and_then(|mut deser| {
         286  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         287  +
                                &mut *deser,
         288  +
                                response.headers(),
         289  +
                                response.status().into(),
         290  +
                                body,
         291  +
                            )
         292  +
                        }) {
         293  +
                        ::std::result::Result::Ok(val) => val,
         294  +
                        ::std::result::Result::Err(e) => {
         295  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         296  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         297  +
                            ))
         298  +
                        }
         299  +
                    };
         300  +
                    tmp.meta = generic;
         301  +
                    if tmp.message.is_none() {
         302  +
                        tmp.message = _error_message;
         303  +
                    }
         304  +
                    tmp
         305  +
                }),
         306  +
                "ResourceNotFoundException" => crate::operation::put_item::PutItemError::ResourceNotFoundError({
         307  +
                    let mut tmp = match protocol
         308  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         309  +
                        .and_then(|mut deser| {
         310  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         311  +
                                &mut *deser,
         312  +
                                response.headers(),
         313  +
                                response.status().into(),
         314  +
                                body,
         315  +
                            )
         316  +
                        }) {
         317  +
                        ::std::result::Result::Ok(val) => val,
         318  +
                        ::std::result::Result::Err(e) => {
         319  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                            ))
         322  +
                        }
  141    323   
                    };
  142         -
        crate::protocol_serde::type_erase_result(parse_result)
         324  +
                    tmp.meta = generic;
         325  +
                    if tmp.message.is_none() {
         326  +
                        tmp.message = _error_message;
         327  +
                    }
         328  +
                    tmp
         329  +
                }),
         330  +
                "TransactionConflictException" => crate::operation::put_item::PutItemError::TransactionConflictError({
         331  +
                    let mut tmp = match protocol
         332  +
                        .deserialize_response(response, crate::types::error::TransactionConflictError::SCHEMA, _cfg)
         333  +
                        .and_then(|mut deser| {
         334  +
                            crate::types::error::TransactionConflictError::deserialize_with_response(
         335  +
                                &mut *deser,
         336  +
                                response.headers(),
         337  +
                                response.status().into(),
         338  +
                                body,
         339  +
                            )
         340  +
                        }) {
         341  +
                        ::std::result::Result::Ok(val) => val,
         342  +
                        ::std::result::Result::Err(e) => {
         343  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         344  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         345  +
                            ))
         346  +
                        }
         347  +
                    };
         348  +
                    tmp.meta = generic;
         349  +
                    if tmp.message.is_none() {
         350  +
                        tmp.message = _error_message;
         351  +
                    }
         352  +
                    tmp
         353  +
                }),
         354  +
                _ => crate::operation::put_item::PutItemError::generic(generic),
         355  +
            };
         356  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         357  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         358  +
            ))
         359  +
        } else {
         360  +
            let protocol = _cfg
         361  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         362  +
                .expect("a SharedClientProtocol is required");
         363  +
            let mut deser = protocol.deserialize_response(response, PutItem::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         364  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         365  +
            })?;
         366  +
            let body = response.body().bytes().expect("body loaded");
         367  +
            let output =
         368  +
                crate::operation::put_item::PutItemOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         369  +
                    .map_err(|e| {
         370  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         371  +
                            e,
         372  +
                        ))
         373  +
                    })?;
         374  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         375  +
        }
  143    376   
    }
  144    377   
}
  145    378   
#[derive(Debug)]
  146    379   
struct PutItemRequestSerializer;
  147    380   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutItemRequestSerializer {
  148    381   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  149    382   
    fn serialize_input(
  150    383   
        &self,
  151    384   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  152    385   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  153    386   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  154    387   
        let input = input.downcast::<crate::operation::put_item::PutItemInput>().expect("correct type");
  155         -
        let _header_serialization_settings = _cfg
  156         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  157         -
            .cloned()
  158         -
            .unwrap_or_default();
  159         -
        let mut request_builder = {
  160         -
            #[allow(clippy::uninlined_format_args)]
  161         -
            fn uri_base(
  162         -
                _input: &crate::operation::put_item::PutItemInput,
  163         -
                output: &mut ::std::string::String,
  164         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  165         -
                use ::std::fmt::Write as _;
  166         -
                ::std::write!(output, "/").expect("formatting should succeed");
  167         -
                ::std::result::Result::Ok(())
  168         -
            }
  169         -
            #[allow(clippy::unnecessary_wraps)]
  170         -
            fn update_http_builder(
  171         -
                input: &crate::operation::put_item::PutItemInput,
  172         -
                builder: ::http_1x::request::Builder,
  173         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  174         -
                let mut uri = ::std::string::String::new();
  175         -
                uri_base(input, &mut uri)?;
  176         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  177         -
            }
  178         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  179         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  180         -
            builder = _header_serialization_settings.set_default_header(
  181         -
                builder,
  182         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  183         -
                "DynamoDB_20120810.PutItem",
  184         -
            );
  185         -
            builder
  186         -
        };
  187         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_item::ser_put_item_input(&input)?);
  188         -
        if let Some(content_length) = body.content_length() {
  189         -
            let content_length = content_length.to_string();
  190         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  191         -
        }
  192         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         388  +
        let protocol = _cfg
         389  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         390  +
            .expect("a SharedClientProtocol is required");
         391  +
        let mut request = protocol
         392  +
            .serialize_request(&input, PutItem::INPUT_SCHEMA, "", _cfg)
         393  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         394  +
         395  +
        return ::std::result::Result::Ok(request);
  193    396   
    }
  194    397   
}
  195    398   
#[derive(Debug)]
  196    399   
struct PutItemEndpointParamsInterceptor;
  197    400   
  198    401   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutItemEndpointParamsInterceptor {
  199    402   
    fn name(&self) -> &'static str {
  200    403   
        "PutItemEndpointParamsInterceptor"
  201    404   
    }
  202    405   

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/put_item/_put_item_input.rs

@@ -186,186 +526,520 @@
  206    206   
    "com.amazonaws.dynamodb.synthetic",
  207    207   
    "PutItemInput",
  208    208   
);
  209    209   
static PUTITEMINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  210    210   
    ::aws_smithy_schema::ShapeId::from_static(
  211    211   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$TableName",
  212    212   
        "com.amazonaws.dynamodb.synthetic",
  213    213   
        "PutItemInput",
  214    214   
    ),
  215    215   
    ::aws_smithy_schema::ShapeType::String,
  216         -
    "table_name",
         216  +
    "TableName",
  217    217   
    0,
  218    218   
);
  219    219   
static PUTITEMINPUT_MEMBER_ITEM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  220    220   
    ::aws_smithy_schema::ShapeId::from_static(
  221    221   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$Item",
  222    222   
        "com.amazonaws.dynamodb.synthetic",
  223    223   
        "PutItemInput",
  224    224   
    ),
  225    225   
    ::aws_smithy_schema::ShapeType::Map,
  226         -
    "item",
         226  +
    "Item",
  227    227   
    1,
  228    228   
);
  229    229   
static PUTITEMINPUT_MEMBER_EXPECTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  230    230   
    ::aws_smithy_schema::ShapeId::from_static(
  231    231   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$Expected",
  232    232   
        "com.amazonaws.dynamodb.synthetic",
  233    233   
        "PutItemInput",
  234    234   
    ),
  235    235   
    ::aws_smithy_schema::ShapeType::Map,
  236         -
    "expected",
         236  +
    "Expected",
  237    237   
    2,
  238    238   
);
  239    239   
static PUTITEMINPUT_MEMBER_RETURN_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  240    240   
    ::aws_smithy_schema::ShapeId::from_static(
  241    241   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnValues",
  242    242   
        "com.amazonaws.dynamodb.synthetic",
  243    243   
        "PutItemInput",
  244    244   
    ),
  245    245   
    ::aws_smithy_schema::ShapeType::String,
  246         -
    "return_values",
         246  +
    "ReturnValues",
  247    247   
    3,
  248    248   
);
  249    249   
static PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  250    250   
    ::aws_smithy_schema::ShapeId::from_static(
  251    251   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnConsumedCapacity",
  252    252   
        "com.amazonaws.dynamodb.synthetic",
  253    253   
        "PutItemInput",
  254    254   
    ),
  255    255   
    ::aws_smithy_schema::ShapeType::String,
  256         -
    "return_consumed_capacity",
         256  +
    "ReturnConsumedCapacity",
  257    257   
    4,
  258    258   
);
  259    259   
static PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  260    260   
    ::aws_smithy_schema::ShapeId::from_static(
  261    261   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnItemCollectionMetrics",
  262    262   
        "com.amazonaws.dynamodb.synthetic",
  263    263   
        "PutItemInput",
  264    264   
    ),
  265    265   
    ::aws_smithy_schema::ShapeType::String,
  266         -
    "return_item_collection_metrics",
         266  +
    "ReturnItemCollectionMetrics",
  267    267   
    5,
  268    268   
);
  269    269   
static PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  270    270   
    ::aws_smithy_schema::ShapeId::from_static(
  271    271   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ConditionalOperator",
  272    272   
        "com.amazonaws.dynamodb.synthetic",
  273    273   
        "PutItemInput",
  274    274   
    ),
  275    275   
    ::aws_smithy_schema::ShapeType::String,
  276         -
    "conditional_operator",
         276  +
    "ConditionalOperator",
  277    277   
    6,
  278    278   
);
  279    279   
static PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  280    280   
    ::aws_smithy_schema::ShapeId::from_static(
  281    281   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ConditionExpression",
  282    282   
        "com.amazonaws.dynamodb.synthetic",
  283    283   
        "PutItemInput",
  284    284   
    ),
  285    285   
    ::aws_smithy_schema::ShapeType::String,
  286         -
    "condition_expression",
         286  +
    "ConditionExpression",
  287    287   
    7,
  288    288   
);
  289    289   
static PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  290    290   
    ::aws_smithy_schema::ShapeId::from_static(
  291    291   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ExpressionAttributeNames",
  292    292   
        "com.amazonaws.dynamodb.synthetic",
  293    293   
        "PutItemInput",
  294    294   
    ),
  295    295   
    ::aws_smithy_schema::ShapeType::Map,
  296         -
    "expression_attribute_names",
         296  +
    "ExpressionAttributeNames",
  297    297   
    8,
  298    298   
);
  299    299   
static PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  300    300   
    ::aws_smithy_schema::ShapeId::from_static(
  301    301   
        "com.amazonaws.dynamodb.synthetic#PutItemInput$ExpressionAttributeValues",
  302    302   
        "com.amazonaws.dynamodb.synthetic",
  303    303   
        "PutItemInput",
  304    304   
    ),
  305    305   
    ::aws_smithy_schema::ShapeType::Map,
  306         -
    "expression_attribute_values",
         306  +
    "ExpressionAttributeValues",
  307    307   
    9,
  308    308   
);
  309    309   
static PUTITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  310    310   
    PUTITEMINPUT_SCHEMA_ID,
  311    311   
    ::aws_smithy_schema::ShapeType::Structure,
  312    312   
    &[
  313    313   
        &PUTITEMINPUT_MEMBER_TABLE_NAME,
  314    314   
        &PUTITEMINPUT_MEMBER_ITEM,
  315    315   
        &PUTITEMINPUT_MEMBER_EXPECTED,
  316    316   
        &PUTITEMINPUT_MEMBER_RETURN_VALUES,
  317    317   
        &PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  318    318   
        &PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS,
  319    319   
        &PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR,
  320    320   
        &PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION,
  321    321   
        &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  322    322   
        &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES,
  323    323   
    ],
  324    324   
);
  325    325   
impl PutItemInput {
  326    326   
    /// The schema for this shape.
  327    327   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTITEMINPUT_SCHEMA;
  328    328   
}
  329    329   
impl ::aws_smithy_schema::serde::SerializableStruct for PutItemInput {
  330    330   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  331    331   
    fn serialize_members(
  332    332   
        &self,
  333    333   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  334    334   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  335    335   
        if let Some(ref val) = self.table_name {
  336    336   
            ser.write_string(&PUTITEMINPUT_MEMBER_TABLE_NAME, val)?;
  337    337   
        }
  338    338   
        if let Some(ref val) = self.item {
  339    339   
            ser.write_map(&PUTITEMINPUT_MEMBER_ITEM, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  340    340   
                for (key, value) in val {
  341    341   
                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  342         -
                    todo!("schema: unsupported map value type");
         342  +
                    ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  343    343   
                }
  344    344   
                Ok(())
  345    345   
            })?;
  346    346   
        }
  347    347   
        if let Some(ref val) = self.expected {
  348    348   
            ser.write_map(
  349    349   
                &PUTITEMINPUT_MEMBER_EXPECTED,
  350    350   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  351    351   
                    for (key, value) in val {
  352    352   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  353    353   
                        ser.write_struct(crate::types::ExpectedAttributeValue::SCHEMA, value)?;
  354    354   
                    }
  355    355   
                    Ok(())
  356    356   
                },
  357    357   
            )?;
  358    358   
        }
  359    359   
        if let Some(ref val) = self.return_values {
  360    360   
            ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_VALUES, val.as_str())?;
  361    361   
        }
  362    362   
        if let Some(ref val) = self.return_consumed_capacity {
  363    363   
            ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  364    364   
        }
  365    365   
        if let Some(ref val) = self.return_item_collection_metrics {
  366    366   
            ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS, val.as_str())?;
  367    367   
        }
  368    368   
        if let Some(ref val) = self.conditional_operator {
  369    369   
            ser.write_string(&PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR, val.as_str())?;
  370    370   
        }
  371    371   
        if let Some(ref val) = self.condition_expression {
  372    372   
            ser.write_string(&PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION, val)?;
  373    373   
        }
  374    374   
        if let Some(ref val) = self.expression_attribute_names {
  375    375   
            ser.write_map(
  376    376   
                &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  377    377   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  378    378   
                    for (key, value) in val {
  379    379   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  380    380   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  381    381   
                    }
  382    382   
                    Ok(())
  383    383   
                },
  384    384   
            )?;
  385    385   
        }
  386    386   
        if let Some(ref val) = self.expression_attribute_values {
  387    387   
            ser.write_map(
  388    388   
                &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES,
  389    389   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  390    390   
                    for (key, value) in val {
  391    391   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  392         -
                        todo!("schema: unsupported map value type");
         392  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  393    393   
                    }
  394    394   
                    Ok(())
  395    395   
                },
  396    396   
            )?;
  397    397   
        }
  398    398   
        Ok(())
  399    399   
    }
  400    400   
}
  401    401   
impl PutItemInput {
  402    402   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  403         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  404         -
        deserializer: &mut D,
         403  +
    pub fn deserialize(
         404  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  405    405   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  406    406   
        #[allow(unused_variables, unused_mut)]
  407    407   
        let mut builder = Self::builder();
  408    408   
        #[allow(
  409    409   
            unused_variables,
  410    410   
            unreachable_code,
  411    411   
            clippy::single_match,
  412    412   
            clippy::match_single_binding,
  413    413   
            clippy::diverging_sub_expression
  414    414   
        )]
  415         -
        deserializer.read_struct(&PUTITEMINPUT_SCHEMA, (), |_, member, deser| {
         415  +
        deserializer.read_struct(&PUTITEMINPUT_SCHEMA, &mut |member, deser| {
  416    416   
            match member.member_index() {
  417    417   
                Some(0) => {
  418    418   
                    builder.table_name = Some(deser.read_string(member)?);
  419    419   
                }
  420    420   
                Some(1) => {
  421    421   
                    builder.item = Some({
  422         -
                        let container = if let Some(cap) = deser.container_size() {
  423         -
                            std::collections::HashMap::with_capacity(cap)
  424         -
                        } else {
  425         -
                            std::collections::HashMap::new()
  426         -
                        };
  427         -
                        deser.read_map(member, container, |mut map, key, deser| {
  428         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  429         -
                            Ok(map)
  430         -
                        })?
         422  +
                        let mut container = std::collections::HashMap::new();
         423  +
                        deser.read_map(member, &mut |key, deser| {
         424  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         425  +
                            Ok(())
         426  +
                        })?;
         427  +
                        container
  431    428   
                    });
  432    429   
                }
  433    430   
                Some(2) => {
  434    431   
                    builder.expected = Some({
  435         -
                        let container = if let Some(cap) = deser.container_size() {
  436         -
                            std::collections::HashMap::with_capacity(cap)
  437         -
                        } else {
  438         -
                            std::collections::HashMap::new()
  439         -
                        };
  440         -
                        deser.read_map(member, container, |mut map, key, deser| {
  441         -
                            map.insert(key, crate::types::ExpectedAttributeValue::deserialize(deser)?);
  442         -
                            Ok(map)
  443         -
                        })?
         432  +
                        let mut container = std::collections::HashMap::new();
         433  +
                        deser.read_map(member, &mut |key, deser| {
         434  +
                            container.insert(key, crate::types::ExpectedAttributeValue::deserialize(deser)?);
         435  +
                            Ok(())
         436  +
                        })?;
         437  +
                        container
  444    438   
                    });
  445    439   
                }
  446    440   
                Some(3) => {
  447    441   
                    builder.return_values = Some(crate::types::ReturnValue::from(deser.read_string(member)?.as_str()));
  448    442   
                }
  449    443   
                Some(4) => {
  450    444   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  451    445   
                }
  452    446   
                Some(5) => {
  453    447   
                    builder.return_item_collection_metrics =
  454    448   
                        Some(crate::types::ReturnItemCollectionMetrics::from(deser.read_string(member)?.as_str()));
  455    449   
                }
  456    450   
                Some(6) => {
  457    451   
                    builder.conditional_operator = Some(crate::types::ConditionalOperator::from(deser.read_string(member)?.as_str()));
  458    452   
                }
  459    453   
                Some(7) => {
  460    454   
                    builder.condition_expression = Some(deser.read_string(member)?);
  461    455   
                }
  462    456   
                Some(8) => {
  463         -
                    builder.expression_attribute_names = Some({
  464         -
                        let container = if let Some(cap) = deser.container_size() {
  465         -
                            std::collections::HashMap::with_capacity(cap)
  466         -
                        } else {
  467         -
                            std::collections::HashMap::new()
  468         -
                        };
  469         -
                        deser.read_map(member, container, |mut map, key, deser| {
  470         -
                            map.insert(key, deser.read_string(member)?);
  471         -
                            Ok(map)
  472         -
                        })?
  473         -
                    });
         457  +
                    builder.expression_attribute_names = Some(deser.read_string_string_map(member)?);
  474    458   
                }
  475    459   
                Some(9) => {
  476    460   
                    builder.expression_attribute_values = Some({
  477         -
                        let container = if let Some(cap) = deser.container_size() {
  478         -
                            std::collections::HashMap::with_capacity(cap)
  479         -
                        } else {
  480         -
                            std::collections::HashMap::new()
  481         -
                        };
  482         -
                        deser.read_map(member, container, |mut map, key, deser| {
  483         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  484         -
                            Ok(map)
  485         -
                        })?
         461  +
                        let mut container = std::collections::HashMap::new();
         462  +
                        deser.read_map(member, &mut |key, deser| {
         463  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         464  +
                            Ok(())
         465  +
                        })?;
         466  +
                        container
  486    467   
                    });
  487    468   
                }
  488    469   
                _ => {}
  489    470   
            }
  490    471   
            Ok(())
  491    472   
        })?;
         473  +
        builder.table_name = builder.table_name.or(Some(String::new()));
         474  +
        builder.item = builder.item.or(Some(::std::collections::HashMap::new()));
  492    475   
        builder
  493    476   
            .build()
  494    477   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  495    478   
    }
  496    479   
}
         480  +
impl PutItemInput {
         481  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         482  +
    pub fn deserialize_with_response(
         483  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         484  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         485  +
        _status: u16,
         486  +
        _body: &[u8],
         487  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         488  +
        Self::deserialize(deserializer)
         489  +
    }
         490  +
}
  497    491   
impl PutItemInput {
  498    492   
    /// Creates a new builder-style object to manufacture [`PutItemInput`](crate::operation::put_item::PutItemInput).
  499    493   
    pub fn builder() -> crate::operation::put_item::builders::PutItemInputBuilder {
  500    494   
        crate::operation::put_item::builders::PutItemInputBuilder::default()
  501    495   
    }
  502    496   
}
  503    497   
  504    498   
/// A builder for [`PutItemInput`](crate::operation::put_item::PutItemInput).
  505    499   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  506    500   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/put_item/_put_item_output.rs

@@ -26,26 +190,198 @@
   46     46   
    "com.amazonaws.dynamodb.synthetic",
   47     47   
    "PutItemOutput",
   48     48   
);
   49     49   
static PUTITEMOUTPUT_MEMBER_ATTRIBUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$Attributes",
   52     52   
        "com.amazonaws.dynamodb.synthetic",
   53     53   
        "PutItemOutput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::Map,
   56         -
    "attributes",
          56  +
    "Attributes",
   57     57   
    0,
   58     58   
);
   59     59   
static PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$ConsumedCapacity",
   62     62   
        "com.amazonaws.dynamodb.synthetic",
   63     63   
        "PutItemOutput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Structure,
   66         -
    "consumed_capacity",
          66  +
    "ConsumedCapacity",
   67     67   
    1,
   68     68   
);
   69     69   
static PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$ItemCollectionMetrics",
   72     72   
        "com.amazonaws.dynamodb.synthetic",
   73     73   
        "PutItemOutput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::Structure,
   76         -
    "item_collection_metrics",
          76  +
    "ItemCollectionMetrics",
   77     77   
    2,
   78     78   
);
   79     79   
static PUTITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   80     80   
    PUTITEMOUTPUT_SCHEMA_ID,
   81     81   
    ::aws_smithy_schema::ShapeType::Structure,
   82     82   
    &[
   83     83   
        &PUTITEMOUTPUT_MEMBER_ATTRIBUTES,
   84     84   
        &PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
   85     85   
        &PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
   86     86   
    ],
   87     87   
);
   88     88   
impl PutItemOutput {
   89     89   
    /// The schema for this shape.
   90     90   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTITEMOUTPUT_SCHEMA;
   91     91   
}
   92     92   
impl ::aws_smithy_schema::serde::SerializableStruct for PutItemOutput {
   93     93   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   94     94   
    fn serialize_members(
   95     95   
        &self,
   96     96   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   97     97   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        if let Some(ref val) = self.attributes {
   99     99   
            ser.write_map(
  100    100   
                &PUTITEMOUTPUT_MEMBER_ATTRIBUTES,
  101    101   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  102    102   
                    for (key, value) in val {
  103    103   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  104         -
                        todo!("schema: unsupported map value type");
         104  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  105    105   
                    }
  106    106   
                    Ok(())
  107    107   
                },
  108    108   
            )?;
  109    109   
        }
  110    110   
        if let Some(ref val) = self.consumed_capacity {
  111    111   
            ser.write_struct(&PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY, val)?;
  112    112   
        }
  113    113   
        if let Some(ref val) = self.item_collection_metrics {
  114    114   
            ser.write_struct(&PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS, val)?;
  115    115   
        }
  116    116   
        Ok(())
  117    117   
    }
  118    118   
}
  119    119   
impl PutItemOutput {
  120    120   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  121         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  122         -
        deserializer: &mut D,
         121  +
    pub fn deserialize(
         122  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  123    123   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  124    124   
        #[allow(unused_variables, unused_mut)]
  125    125   
        let mut builder = Self::builder();
  126    126   
        #[allow(
  127    127   
            unused_variables,
  128    128   
            unreachable_code,
  129    129   
            clippy::single_match,
  130    130   
            clippy::match_single_binding,
  131    131   
            clippy::diverging_sub_expression
  132    132   
        )]
  133         -
        deserializer.read_struct(&PUTITEMOUTPUT_SCHEMA, (), |_, member, deser| {
         133  +
        deserializer.read_struct(&PUTITEMOUTPUT_SCHEMA, &mut |member, deser| {
  134    134   
            match member.member_index() {
  135    135   
                Some(0) => {
  136    136   
                    builder.attributes = Some({
  137         -
                        let container = if let Some(cap) = deser.container_size() {
  138         -
                            std::collections::HashMap::with_capacity(cap)
  139         -
                        } else {
  140         -
                            std::collections::HashMap::new()
  141         -
                        };
  142         -
                        deser.read_map(member, container, |mut map, key, deser| {
  143         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  144         -
                            Ok(map)
  145         -
                        })?
         137  +
                        let mut container = std::collections::HashMap::new();
         138  +
                        deser.read_map(member, &mut |key, deser| {
         139  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         140  +
                            Ok(())
         141  +
                        })?;
         142  +
                        container
  146    143   
                    });
  147    144   
                }
  148    145   
                Some(1) => {
  149    146   
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
  150    147   
                }
  151    148   
                Some(2) => {
  152    149   
                    builder.item_collection_metrics = Some(crate::types::ItemCollectionMetrics::deserialize(deser)?);
  153    150   
                }
  154    151   
                _ => {}
  155    152   
            }
  156    153   
            Ok(())
  157    154   
        })?;
  158    155   
        Ok(builder.build())
  159    156   
    }
  160    157   
}
         158  +
impl PutItemOutput {
         159  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         160  +
    pub fn deserialize_with_response(
         161  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         162  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         163  +
        _status: u16,
         164  +
        _body: &[u8],
         165  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         166  +
        Self::deserialize(deserializer)
         167  +
    }
         168  +
}
  161    169   
impl PutItemOutput {
  162    170   
    /// Creates a new builder-style object to manufacture [`PutItemOutput`](crate::operation::put_item::PutItemOutput).
  163    171   
    pub fn builder() -> crate::operation::put_item::builders::PutItemOutputBuilder {
  164    172   
        crate::operation::put_item::builders::PutItemOutputBuilder::default()
  165    173   
    }
  166    174   
}
  167    175   
  168    176   
/// A builder for [`PutItemOutput`](crate::operation::put_item::PutItemOutput).
  169    177   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  170    178   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/query.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 `Query`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct Query;
    6      6   
impl Query {
    7      7   
    /// Creates a new `Query`
    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::query::QueryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::query::QueryOutput::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::query::QueryInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::query::QueryOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::query::QueryError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -92,96 +217,348 @@
  112    116   
                crate::operation::query::QueryError,
  113    117   
            >::new());
  114    118   
  115    119   
        ::std::borrow::Cow::Owned(rcb)
  116    120   
    }
  117    121   
}
  118    122   
  119    123   
#[derive(Debug)]
  120    124   
struct QueryResponseDeserializer;
  121    125   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryResponseDeserializer {
  122         -
    fn deserialize_nonstreaming(
         126  +
    fn deserialize_nonstreaming_with_config(
  123    127   
        &self,
  124    128   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         129  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  125    130   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  126    131   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         132  +
        #[allow(unused_mut)]
         133  +
        let mut force_error = false;
         134  +
         135  +
        if !success && status != 200 || force_error {
  127    136   
            let headers = response.headers();
  128    137   
            let body = response.body().bytes().expect("body loaded");
  129    138   
            #[allow(unused_mut)]
  130         -
        let mut force_error = false;
         139  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         140  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         141  +
            })?;
  131    142   
  132         -
        let parse_result = if !success && status != 200 || force_error {
  133         -
            crate::protocol_serde::shape_query::de_query_http_error(status, headers, body)
  134         -
        } else {
  135         -
            crate::protocol_serde::shape_query::de_query_http_response(status, headers, body)
         143  +
            let generic = generic_builder.build();
         144  +
            let error_code = match generic.code() {
         145  +
                ::std::option::Option::Some(code) => code,
         146  +
                ::std::option::Option::None => {
         147  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         148  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::query::QueryError::unhandled(generic)),
         149  +
                    ))
         150  +
                }
  136    151   
            };
  137         -
        crate::protocol_serde::type_erase_result(parse_result)
         152  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         153  +
            let protocol = _cfg
         154  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         155  +
                .expect("a SharedClientProtocol is required");
         156  +
            let err = match error_code {
         157  +
                "InternalServerError" => crate::operation::query::QueryError::InternalServerError({
         158  +
                    let mut tmp = match protocol
         159  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         160  +
                        .and_then(|mut deser| {
         161  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         162  +
                                &mut *deser,
         163  +
                                response.headers(),
         164  +
                                response.status().into(),
         165  +
                                body,
         166  +
                            )
         167  +
                        }) {
         168  +
                        ::std::result::Result::Ok(val) => val,
         169  +
                        ::std::result::Result::Err(e) => {
         170  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         172  +
                            ))
         173  +
                        }
         174  +
                    };
         175  +
                    tmp.meta = generic;
         176  +
                    if tmp.message.is_none() {
         177  +
                        tmp.message = _error_message;
         178  +
                    }
         179  +
                    tmp
         180  +
                }),
         181  +
                "InvalidEndpointException" => crate::operation::query::QueryError::InvalidEndpointError({
         182  +
                    let mut tmp = match protocol
         183  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         184  +
                        .and_then(|mut deser| {
         185  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         186  +
                                &mut *deser,
         187  +
                                response.headers(),
         188  +
                                response.status().into(),
         189  +
                                body,
         190  +
                            )
         191  +
                        }) {
         192  +
                        ::std::result::Result::Ok(val) => val,
         193  +
                        ::std::result::Result::Err(e) => {
         194  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         196  +
                            ))
         197  +
                        }
         198  +
                    };
         199  +
                    tmp.meta = generic;
         200  +
                    if tmp.message.is_none() {
         201  +
                        tmp.message = _error_message;
         202  +
                    }
         203  +
                    tmp
         204  +
                }),
         205  +
                "ProvisionedThroughputExceededException" => crate::operation::query::QueryError::ProvisionedThroughputExceededError({
         206  +
                    let mut tmp = match protocol
         207  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededError::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| {
         209  +
                            crate::types::error::ProvisionedThroughputExceededError::deserialize_with_response(
         210  +
                                &mut *deser,
         211  +
                                response.headers(),
         212  +
                                response.status().into(),
         213  +
                                body,
         214  +
                            )
         215  +
                        }) {
         216  +
                        ::std::result::Result::Ok(val) => val,
         217  +
                        ::std::result::Result::Err(e) => {
         218  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         219  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         220  +
                            ))
         221  +
                        }
         222  +
                    };
         223  +
                    tmp.meta = generic;
         224  +
                    if tmp.message.is_none() {
         225  +
                        tmp.message = _error_message;
         226  +
                    }
         227  +
                    tmp
         228  +
                }),
         229  +
                "RequestLimitExceeded" => crate::operation::query::QueryError::RequestLimitExceeded({
         230  +
                    let mut tmp = match protocol
         231  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         232  +
                        .and_then(|mut deser| {
         233  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         234  +
                                &mut *deser,
         235  +
                                response.headers(),
         236  +
                                response.status().into(),
         237  +
                                body,
         238  +
                            )
         239  +
                        }) {
         240  +
                        ::std::result::Result::Ok(val) => val,
         241  +
                        ::std::result::Result::Err(e) => {
         242  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         243  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         244  +
                            ))
         245  +
                        }
         246  +
                    };
         247  +
                    tmp.meta = generic;
         248  +
                    if tmp.message.is_none() {
         249  +
                        tmp.message = _error_message;
         250  +
                    }
         251  +
                    tmp
         252  +
                }),
         253  +
                "ResourceNotFoundException" => crate::operation::query::QueryError::ResourceNotFoundError({
         254  +
                    let mut tmp = match protocol
         255  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         256  +
                        .and_then(|mut deser| {
         257  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         258  +
                                &mut *deser,
         259  +
                                response.headers(),
         260  +
                                response.status().into(),
         261  +
                                body,
         262  +
                            )
         263  +
                        }) {
         264  +
                        ::std::result::Result::Ok(val) => val,
         265  +
                        ::std::result::Result::Err(e) => {
         266  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         267  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         268  +
                            ))
         269  +
                        }
         270  +
                    };
         271  +
                    tmp.meta = generic;
         272  +
                    if tmp.message.is_none() {
         273  +
                        tmp.message = _error_message;
         274  +
                    }
         275  +
                    tmp
         276  +
                }),
         277  +
                _ => crate::operation::query::QueryError::generic(generic),
         278  +
            };
         279  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         280  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         281  +
            ))
         282  +
        } else {
         283  +
            let protocol = _cfg
         284  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
                .expect("a SharedClientProtocol is required");
         286  +
            let mut deser = protocol.deserialize_response(response, Query::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         287  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         288  +
            })?;
         289  +
            let body = response.body().bytes().expect("body loaded");
         290  +
            let output =
         291  +
                crate::operation::query::QueryOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         292  +
                    .map_err(|e| {
         293  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         294  +
                            e,
         295  +
                        ))
         296  +
                    })?;
         297  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         298  +
        }
  138    299   
    }
  139    300   
}
  140    301   
#[derive(Debug)]
  141    302   
struct QueryRequestSerializer;
  142    303   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for QueryRequestSerializer {
  143    304   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  144    305   
    fn serialize_input(
  145    306   
        &self,
  146    307   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  147    308   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  148    309   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  149    310   
        let input = input.downcast::<crate::operation::query::QueryInput>().expect("correct type");
  150         -
        let _header_serialization_settings = _cfg
  151         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  152         -
            .cloned()
  153         -
            .unwrap_or_default();
  154         -
        let mut request_builder = {
  155         -
            #[allow(clippy::uninlined_format_args)]
  156         -
            fn uri_base(
  157         -
                _input: &crate::operation::query::QueryInput,
  158         -
                output: &mut ::std::string::String,
  159         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  160         -
                use ::std::fmt::Write as _;
  161         -
                ::std::write!(output, "/").expect("formatting should succeed");
  162         -
                ::std::result::Result::Ok(())
  163         -
            }
  164         -
            #[allow(clippy::unnecessary_wraps)]
  165         -
            fn update_http_builder(
  166         -
                input: &crate::operation::query::QueryInput,
  167         -
                builder: ::http_1x::request::Builder,
  168         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  169         -
                let mut uri = ::std::string::String::new();
  170         -
                uri_base(input, &mut uri)?;
  171         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  172         -
            }
  173         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  174         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  175         -
            builder = _header_serialization_settings.set_default_header(
  176         -
                builder,
  177         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  178         -
                "DynamoDB_20120810.Query",
  179         -
            );
  180         -
            builder
  181         -
        };
  182         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_query::ser_query_input(&input)?);
  183         -
        if let Some(content_length) = body.content_length() {
  184         -
            let content_length = content_length.to_string();
  185         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  186         -
        }
  187         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         311  +
        let protocol = _cfg
         312  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
            .expect("a SharedClientProtocol is required");
         314  +
        let mut request = protocol
         315  +
            .serialize_request(&input, Query::INPUT_SCHEMA, "", _cfg)
         316  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         317  +
         318  +
        return ::std::result::Result::Ok(request);
  188    319   
    }
  189    320   
}
  190    321   
#[derive(Debug)]
  191    322   
struct QueryEndpointParamsInterceptor;
  192    323   
  193    324   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for QueryEndpointParamsInterceptor {
  194    325   
    fn name(&self) -> &'static str {
  195    326   
        "QueryEndpointParamsInterceptor"
  196    327   
    }
  197    328   

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/query/_query_input.rs

@@ -304,304 +524,524 @@
  324    324   
    "com.amazonaws.dynamodb.synthetic",
  325    325   
    "QueryInput",
  326    326   
);
  327    327   
static QUERYINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  328    328   
    ::aws_smithy_schema::ShapeId::from_static(
  329    329   
        "com.amazonaws.dynamodb.synthetic#QueryInput$TableName",
  330    330   
        "com.amazonaws.dynamodb.synthetic",
  331    331   
        "QueryInput",
  332    332   
    ),
  333    333   
    ::aws_smithy_schema::ShapeType::String,
  334         -
    "table_name",
         334  +
    "TableName",
  335    335   
    0,
  336    336   
);
  337    337   
static QUERYINPUT_MEMBER_INDEX_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  338    338   
    ::aws_smithy_schema::ShapeId::from_static(
  339    339   
        "com.amazonaws.dynamodb.synthetic#QueryInput$IndexName",
  340    340   
        "com.amazonaws.dynamodb.synthetic",
  341    341   
        "QueryInput",
  342    342   
    ),
  343    343   
    ::aws_smithy_schema::ShapeType::String,
  344         -
    "index_name",
         344  +
    "IndexName",
  345    345   
    1,
  346    346   
);
  347    347   
static QUERYINPUT_MEMBER_SELECT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  348    348   
    ::aws_smithy_schema::ShapeId::from_static(
  349    349   
        "com.amazonaws.dynamodb.synthetic#QueryInput$Select",
  350    350   
        "com.amazonaws.dynamodb.synthetic",
  351    351   
        "QueryInput",
  352    352   
    ),
  353    353   
    ::aws_smithy_schema::ShapeType::String,
  354         -
    "select",
         354  +
    "Select",
  355    355   
    2,
  356    356   
);
  357    357   
static QUERYINPUT_MEMBER_ATTRIBUTES_TO_GET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  358    358   
    ::aws_smithy_schema::ShapeId::from_static(
  359    359   
        "com.amazonaws.dynamodb.synthetic#QueryInput$AttributesToGet",
  360    360   
        "com.amazonaws.dynamodb.synthetic",
  361    361   
        "QueryInput",
  362    362   
    ),
  363    363   
    ::aws_smithy_schema::ShapeType::List,
  364         -
    "attributes_to_get",
         364  +
    "AttributesToGet",
  365    365   
    3,
  366    366   
);
  367    367   
static QUERYINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  368    368   
    ::aws_smithy_schema::ShapeId::from_static(
  369    369   
        "com.amazonaws.dynamodb.synthetic#QueryInput$Limit",
  370    370   
        "com.amazonaws.dynamodb.synthetic",
  371    371   
        "QueryInput",
  372    372   
    ),
  373    373   
    ::aws_smithy_schema::ShapeType::Integer,
  374         -
    "limit",
         374  +
    "Limit",
  375    375   
    4,
  376    376   
);
  377    377   
static QUERYINPUT_MEMBER_CONSISTENT_READ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  378    378   
    ::aws_smithy_schema::ShapeId::from_static(
  379    379   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ConsistentRead",
  380    380   
        "com.amazonaws.dynamodb.synthetic",
  381    381   
        "QueryInput",
  382    382   
    ),
  383    383   
    ::aws_smithy_schema::ShapeType::Boolean,
  384         -
    "consistent_read",
         384  +
    "ConsistentRead",
  385    385   
    5,
  386    386   
);
  387    387   
static QUERYINPUT_MEMBER_KEY_CONDITIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  388    388   
    ::aws_smithy_schema::ShapeId::from_static(
  389    389   
        "com.amazonaws.dynamodb.synthetic#QueryInput$KeyConditions",
  390    390   
        "com.amazonaws.dynamodb.synthetic",
  391    391   
        "QueryInput",
  392    392   
    ),
  393    393   
    ::aws_smithy_schema::ShapeType::Map,
  394         -
    "key_conditions",
         394  +
    "KeyConditions",
  395    395   
    6,
  396    396   
);
  397    397   
static QUERYINPUT_MEMBER_QUERY_FILTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  398    398   
    ::aws_smithy_schema::ShapeId::from_static(
  399    399   
        "com.amazonaws.dynamodb.synthetic#QueryInput$QueryFilter",
  400    400   
        "com.amazonaws.dynamodb.synthetic",
  401    401   
        "QueryInput",
  402    402   
    ),
  403    403   
    ::aws_smithy_schema::ShapeType::Map,
  404         -
    "query_filter",
         404  +
    "QueryFilter",
  405    405   
    7,
  406    406   
);
  407    407   
static QUERYINPUT_MEMBER_CONDITIONAL_OPERATOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  408    408   
    ::aws_smithy_schema::ShapeId::from_static(
  409    409   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ConditionalOperator",
  410    410   
        "com.amazonaws.dynamodb.synthetic",
  411    411   
        "QueryInput",
  412    412   
    ),
  413    413   
    ::aws_smithy_schema::ShapeType::String,
  414         -
    "conditional_operator",
         414  +
    "ConditionalOperator",
  415    415   
    8,
  416    416   
);
  417    417   
static QUERYINPUT_MEMBER_SCAN_INDEX_FORWARD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  418    418   
    ::aws_smithy_schema::ShapeId::from_static(
  419    419   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ScanIndexForward",
  420    420   
        "com.amazonaws.dynamodb.synthetic",
  421    421   
        "QueryInput",
  422    422   
    ),
  423    423   
    ::aws_smithy_schema::ShapeType::Boolean,
  424         -
    "scan_index_forward",
         424  +
    "ScanIndexForward",
  425    425   
    9,
  426    426   
);
  427    427   
static QUERYINPUT_MEMBER_EXCLUSIVE_START_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  428    428   
    ::aws_smithy_schema::ShapeId::from_static(
  429    429   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ExclusiveStartKey",
  430    430   
        "com.amazonaws.dynamodb.synthetic",
  431    431   
        "QueryInput",
  432    432   
    ),
  433    433   
    ::aws_smithy_schema::ShapeType::Map,
  434         -
    "exclusive_start_key",
         434  +
    "ExclusiveStartKey",
  435    435   
    10,
  436    436   
);
  437    437   
static QUERYINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  438    438   
    ::aws_smithy_schema::ShapeId::from_static(
  439    439   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ReturnConsumedCapacity",
  440    440   
        "com.amazonaws.dynamodb.synthetic",
  441    441   
        "QueryInput",
  442    442   
    ),
  443    443   
    ::aws_smithy_schema::ShapeType::String,
  444         -
    "return_consumed_capacity",
         444  +
    "ReturnConsumedCapacity",
  445    445   
    11,
  446    446   
);
  447    447   
static QUERYINPUT_MEMBER_PROJECTION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  448    448   
    ::aws_smithy_schema::ShapeId::from_static(
  449    449   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ProjectionExpression",
  450    450   
        "com.amazonaws.dynamodb.synthetic",
  451    451   
        "QueryInput",
  452    452   
    ),
  453    453   
    ::aws_smithy_schema::ShapeType::String,
  454         -
    "projection_expression",
         454  +
    "ProjectionExpression",
  455    455   
    12,
  456    456   
);
  457    457   
static QUERYINPUT_MEMBER_FILTER_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  458    458   
    ::aws_smithy_schema::ShapeId::from_static(
  459    459   
        "com.amazonaws.dynamodb.synthetic#QueryInput$FilterExpression",
  460    460   
        "com.amazonaws.dynamodb.synthetic",
  461    461   
        "QueryInput",
  462    462   
    ),
  463    463   
    ::aws_smithy_schema::ShapeType::String,
  464         -
    "filter_expression",
         464  +
    "FilterExpression",
  465    465   
    13,
  466    466   
);
  467    467   
static QUERYINPUT_MEMBER_KEY_CONDITION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  468    468   
    ::aws_smithy_schema::ShapeId::from_static(
  469    469   
        "com.amazonaws.dynamodb.synthetic#QueryInput$KeyConditionExpression",
  470    470   
        "com.amazonaws.dynamodb.synthetic",
  471    471   
        "QueryInput",
  472    472   
    ),
  473    473   
    ::aws_smithy_schema::ShapeType::String,
  474         -
    "key_condition_expression",
         474  +
    "KeyConditionExpression",
  475    475   
    14,
  476    476   
);
  477    477   
static QUERYINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  478    478   
    ::aws_smithy_schema::ShapeId::from_static(
  479    479   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ExpressionAttributeNames",
  480    480   
        "com.amazonaws.dynamodb.synthetic",
  481    481   
        "QueryInput",
  482    482   
    ),
  483    483   
    ::aws_smithy_schema::ShapeType::Map,
  484         -
    "expression_attribute_names",
         484  +
    "ExpressionAttributeNames",
  485    485   
    15,
  486    486   
);
  487    487   
static QUERYINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  488    488   
    ::aws_smithy_schema::ShapeId::from_static(
  489    489   
        "com.amazonaws.dynamodb.synthetic#QueryInput$ExpressionAttributeValues",
  490    490   
        "com.amazonaws.dynamodb.synthetic",
  491    491   
        "QueryInput",
  492    492   
    ),
  493    493   
    ::aws_smithy_schema::ShapeType::Map,
  494         -
    "expression_attribute_values",
         494  +
    "ExpressionAttributeValues",
  495    495   
    16,
  496    496   
);
  497    497   
static QUERYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  498    498   
    QUERYINPUT_SCHEMA_ID,
  499    499   
    ::aws_smithy_schema::ShapeType::Structure,
  500    500   
    &[
  501    501   
        &QUERYINPUT_MEMBER_TABLE_NAME,
  502    502   
        &QUERYINPUT_MEMBER_INDEX_NAME,
  503    503   
        &QUERYINPUT_MEMBER_SELECT,
  504    504   
        &QUERYINPUT_MEMBER_ATTRIBUTES_TO_GET,
@@ -562,562 +802,782 @@
  582    582   
        }
  583    583   
        if let Some(ref val) = self.scan_index_forward {
  584    584   
            ser.write_boolean(&QUERYINPUT_MEMBER_SCAN_INDEX_FORWARD, *val)?;
  585    585   
        }
  586    586   
        if let Some(ref val) = self.exclusive_start_key {
  587    587   
            ser.write_map(
  588    588   
                &QUERYINPUT_MEMBER_EXCLUSIVE_START_KEY,
  589    589   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  590    590   
                    for (key, value) in val {
  591    591   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  592         -
                        todo!("schema: unsupported map value type");
         592  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  593    593   
                    }
  594    594   
                    Ok(())
  595    595   
                },
  596    596   
            )?;
  597    597   
        }
  598    598   
        if let Some(ref val) = self.return_consumed_capacity {
  599    599   
            ser.write_string(&QUERYINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  600    600   
        }
  601    601   
        if let Some(ref val) = self.projection_expression {
  602    602   
            ser.write_string(&QUERYINPUT_MEMBER_PROJECTION_EXPRESSION, val)?;
  603    603   
        }
  604    604   
        if let Some(ref val) = self.filter_expression {
  605    605   
            ser.write_string(&QUERYINPUT_MEMBER_FILTER_EXPRESSION, val)?;
  606    606   
        }
  607    607   
        if let Some(ref val) = self.key_condition_expression {
  608    608   
            ser.write_string(&QUERYINPUT_MEMBER_KEY_CONDITION_EXPRESSION, val)?;
  609    609   
        }
  610    610   
        if let Some(ref val) = self.expression_attribute_names {
  611    611   
            ser.write_map(
  612    612   
                &QUERYINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  613    613   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  614    614   
                    for (key, value) in val {
  615    615   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  616    616   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  617    617   
                    }
  618    618   
                    Ok(())
  619    619   
                },
  620    620   
            )?;
  621    621   
        }
  622    622   
        if let Some(ref val) = self.expression_attribute_values {
  623    623   
            ser.write_map(
  624    624   
                &QUERYINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES,
  625    625   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  626    626   
                    for (key, value) in val {
  627    627   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  628         -
                        todo!("schema: unsupported map value type");
         628  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  629    629   
                    }
  630    630   
                    Ok(())
  631    631   
                },
  632    632   
            )?;
  633    633   
        }
  634    634   
        Ok(())
  635    635   
    }
  636    636   
}
  637    637   
impl QueryInput {
  638    638   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  639         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  640         -
        deserializer: &mut D,
         639  +
    pub fn deserialize(
         640  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  641    641   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  642    642   
        #[allow(unused_variables, unused_mut)]
  643    643   
        let mut builder = Self::builder();
  644    644   
        #[allow(
  645    645   
            unused_variables,
  646    646   
            unreachable_code,
  647    647   
            clippy::single_match,
  648    648   
            clippy::match_single_binding,
  649    649   
            clippy::diverging_sub_expression
  650    650   
        )]
  651         -
        deserializer.read_struct(&QUERYINPUT_SCHEMA, (), |_, member, deser| {
         651  +
        deserializer.read_struct(&QUERYINPUT_SCHEMA, &mut |member, deser| {
  652    652   
            match member.member_index() {
  653    653   
                Some(0) => {
  654    654   
                    builder.table_name = Some(deser.read_string(member)?);
  655    655   
                }
  656    656   
                Some(1) => {
  657    657   
                    builder.index_name = Some(deser.read_string(member)?);
  658    658   
                }
  659    659   
                Some(2) => {
  660    660   
                    builder.select = Some(crate::types::Select::from(deser.read_string(member)?.as_str()));
  661    661   
                }
  662    662   
                Some(3) => {
  663         -
                    builder.attributes_to_get = Some({
  664         -
                        let container = if let Some(cap) = deser.container_size() {
  665         -
                            Vec::with_capacity(cap)
  666         -
                        } else {
  667         -
                            Vec::new()
  668         -
                        };
  669         -
                        deser.read_list(member, container, |mut list, deser| {
  670         -
                            list.push(deser.read_string(member)?);
  671         -
                            Ok(list)
  672         -
                        })?
  673         -
                    });
         663  +
                    builder.attributes_to_get = Some(deser.read_string_list(member)?);
  674    664   
                }
  675    665   
                Some(4) => {
  676    666   
                    builder.limit = Some(deser.read_integer(member)?);
  677    667   
                }
  678    668   
                Some(5) => {
  679    669   
                    builder.consistent_read = Some(deser.read_boolean(member)?);
  680    670   
                }
  681    671   
                Some(6) => {
  682    672   
                    builder.key_conditions = Some({
  683         -
                        let container = if let Some(cap) = deser.container_size() {
  684         -
                            std::collections::HashMap::with_capacity(cap)
  685         -
                        } else {
  686         -
                            std::collections::HashMap::new()
  687         -
                        };
  688         -
                        deser.read_map(member, container, |mut map, key, deser| {
  689         -
                            map.insert(key, crate::types::Condition::deserialize(deser)?);
  690         -
                            Ok(map)
  691         -
                        })?
         673  +
                        let mut container = std::collections::HashMap::new();
         674  +
                        deser.read_map(member, &mut |key, deser| {
         675  +
                            container.insert(key, crate::types::Condition::deserialize(deser)?);
         676  +
                            Ok(())
         677  +
                        })?;
         678  +
                        container
  692    679   
                    });
  693    680   
                }
  694    681   
                Some(7) => {
  695    682   
                    builder.query_filter = Some({
  696         -
                        let container = if let Some(cap) = deser.container_size() {
  697         -
                            std::collections::HashMap::with_capacity(cap)
  698         -
                        } else {
  699         -
                            std::collections::HashMap::new()
  700         -
                        };
  701         -
                        deser.read_map(member, container, |mut map, key, deser| {
  702         -
                            map.insert(key, crate::types::Condition::deserialize(deser)?);
  703         -
                            Ok(map)
  704         -
                        })?
         683  +
                        let mut container = std::collections::HashMap::new();
         684  +
                        deser.read_map(member, &mut |key, deser| {
         685  +
                            container.insert(key, crate::types::Condition::deserialize(deser)?);
         686  +
                            Ok(())
         687  +
                        })?;
         688  +
                        container
  705    689   
                    });
  706    690   
                }
  707    691   
                Some(8) => {
  708    692   
                    builder.conditional_operator = Some(crate::types::ConditionalOperator::from(deser.read_string(member)?.as_str()));
  709    693   
                }
  710    694   
                Some(9) => {
  711    695   
                    builder.scan_index_forward = Some(deser.read_boolean(member)?);
  712    696   
                }
  713    697   
                Some(10) => {
  714    698   
                    builder.exclusive_start_key = Some({
  715         -
                        let container = if let Some(cap) = deser.container_size() {
  716         -
                            std::collections::HashMap::with_capacity(cap)
  717         -
                        } else {
  718         -
                            std::collections::HashMap::new()
  719         -
                        };
  720         -
                        deser.read_map(member, container, |mut map, key, deser| {
  721         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  722         -
                            Ok(map)
  723         -
                        })?
         699  +
                        let mut container = std::collections::HashMap::new();
         700  +
                        deser.read_map(member, &mut |key, deser| {
         701  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         702  +
                            Ok(())
         703  +
                        })?;
         704  +
                        container
  724    705   
                    });
  725    706   
                }
  726    707   
                Some(11) => {
  727    708   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  728    709   
                }
  729    710   
                Some(12) => {
  730    711   
                    builder.projection_expression = Some(deser.read_string(member)?);
  731    712   
                }
  732    713   
                Some(13) => {
  733    714   
                    builder.filter_expression = Some(deser.read_string(member)?);
  734    715   
                }
  735    716   
                Some(14) => {
  736    717   
                    builder.key_condition_expression = Some(deser.read_string(member)?);
  737    718   
                }
  738    719   
                Some(15) => {
  739         -
                    builder.expression_attribute_names = Some({
  740         -
                        let container = if let Some(cap) = deser.container_size() {
  741         -
                            std::collections::HashMap::with_capacity(cap)
  742         -
                        } else {
  743         -
                            std::collections::HashMap::new()
  744         -
                        };
  745         -
                        deser.read_map(member, container, |mut map, key, deser| {
  746         -
                            map.insert(key, deser.read_string(member)?);
  747         -
                            Ok(map)
  748         -
                        })?
  749         -
                    });
         720  +
                    builder.expression_attribute_names = Some(deser.read_string_string_map(member)?);
  750    721   
                }
  751    722   
                Some(16) => {
  752    723   
                    builder.expression_attribute_values = Some({
  753         -
                        let container = if let Some(cap) = deser.container_size() {
  754         -
                            std::collections::HashMap::with_capacity(cap)
  755         -
                        } else {
  756         -
                            std::collections::HashMap::new()
  757         -
                        };
  758         -
                        deser.read_map(member, container, |mut map, key, deser| {
  759         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  760         -
                            Ok(map)
  761         -
                        })?
         724  +
                        let mut container = std::collections::HashMap::new();
         725  +
                        deser.read_map(member, &mut |key, deser| {
         726  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         727  +
                            Ok(())
         728  +
                        })?;
         729  +
                        container
  762    730   
                    });
  763    731   
                }
  764    732   
                _ => {}
  765    733   
            }
  766    734   
            Ok(())
  767    735   
        })?;
         736  +
        builder.table_name = builder.table_name.or(Some(String::new()));
  768    737   
        builder
  769    738   
            .build()
  770    739   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  771    740   
    }
  772    741   
}
         742  +
impl QueryInput {
         743  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         744  +
    pub fn deserialize_with_response(
         745  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         746  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         747  +
        _status: u16,
         748  +
        _body: &[u8],
         749  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         750  +
        Self::deserialize(deserializer)
         751  +
    }
         752  +
}
  773    753   
impl QueryInput {
  774    754   
    /// Creates a new builder-style object to manufacture [`QueryInput`](crate::operation::query::QueryInput).
  775    755   
    pub fn builder() -> crate::operation::query::builders::QueryInputBuilder {
  776    756   
        crate::operation::query::builders::QueryInputBuilder::default()
  777    757   
    }
  778    758   
}
  779    759   
  780    760   
/// A builder for [`QueryInput`](crate::operation::query::QueryInput).
  781    761   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  782    762   
#[non_exhaustive]