AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/dynamodb/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   
    > {
@@ -111,115 +236,487 @@
  131    135   
                crate::operation::put_item::PutItemError,
  132    136   
            >::new());
  133    137   
  134    138   
        ::std::borrow::Cow::Owned(rcb)
  135    139   
    }
  136    140   
}
  137    141   
  138    142   
#[derive(Debug)]
  139    143   
struct PutItemResponseDeserializer;
  140    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutItemResponseDeserializer {
  141         -
    fn deserialize_nonstreaming(
         145  +
    fn deserialize_nonstreaming_with_config(
  142    146   
        &self,
  143    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         148  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  144    149   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    150   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146         -
        let headers = response.headers();
  147         -
        let body = response.body().bytes().expect("body loaded");
  148    151   
        #[allow(unused_mut)]
  149    152   
        let mut force_error = false;
  150    153   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  151         -
        let parse_result = if !success && status != 200 || force_error {
  152         -
            crate::protocol_serde::shape_put_item::de_put_item_http_error(status, headers, body)
         154  +
        if !success && status != 200 || force_error {
         155  +
            let headers = response.headers();
         156  +
            let body = response.body().bytes().expect("body loaded");
         157  +
            #[allow(unused_mut)]
         158  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         159  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         160  +
            })?;
         161  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         162  +
            let generic = generic_builder.build();
         163  +
            let error_code = match generic.code() {
         164  +
                ::std::option::Option::Some(code) => code,
         165  +
                ::std::option::Option::None => {
         166  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         167  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::put_item::PutItemError::unhandled(generic)),
         168  +
                    ))
         169  +
                }
         170  +
            };
         171  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         172  +
            let protocol = _cfg
         173  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         174  +
                .expect("a SharedClientProtocol is required");
         175  +
            let err = match error_code {
         176  +
                "ConditionalCheckFailedException" => crate::operation::put_item::PutItemError::ConditionalCheckFailedException({
         177  +
                    let mut tmp = match protocol
         178  +
                        .deserialize_response(response, crate::types::error::ConditionalCheckFailedException::SCHEMA, _cfg)
         179  +
                        .and_then(|mut deser| {
         180  +
                            crate::types::error::ConditionalCheckFailedException::deserialize_with_response(
         181  +
                                &mut *deser,
         182  +
                                response.headers(),
         183  +
                                response.status().into(),
         184  +
                                body,
         185  +
                            )
         186  +
                        }) {
         187  +
                        ::std::result::Result::Ok(val) => val,
         188  +
                        ::std::result::Result::Err(e) => {
         189  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         190  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         191  +
                            ))
         192  +
                        }
         193  +
                    };
         194  +
                    tmp.meta = generic;
         195  +
                    if tmp.message.is_none() {
         196  +
                        tmp.message = _error_message;
         197  +
                    }
         198  +
                    tmp
         199  +
                }),
         200  +
                "InternalServerError" => crate::operation::put_item::PutItemError::InternalServerError({
         201  +
                    let mut tmp = match protocol
         202  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         203  +
                        .and_then(|mut deser| {
         204  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         205  +
                                &mut *deser,
         206  +
                                response.headers(),
         207  +
                                response.status().into(),
         208  +
                                body,
         209  +
                            )
         210  +
                        }) {
         211  +
                        ::std::result::Result::Ok(val) => val,
         212  +
                        ::std::result::Result::Err(e) => {
         213  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         214  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         215  +
                            ))
         216  +
                        }
         217  +
                    };
         218  +
                    tmp.meta = generic;
         219  +
                    if tmp.message.is_none() {
         220  +
                        tmp.message = _error_message;
         221  +
                    }
         222  +
                    tmp
         223  +
                }),
         224  +
                "InvalidEndpointException" => crate::operation::put_item::PutItemError::InvalidEndpointException({
         225  +
                    let mut tmp = match protocol
         226  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         227  +
                        .and_then(|mut deser| {
         228  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         229  +
                                &mut *deser,
         230  +
                                response.headers(),
         231  +
                                response.status().into(),
         232  +
                                body,
         233  +
                            )
         234  +
                        }) {
         235  +
                        ::std::result::Result::Ok(val) => val,
         236  +
                        ::std::result::Result::Err(e) => {
         237  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         238  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         239  +
                            ))
         240  +
                        }
         241  +
                    };
         242  +
                    tmp.meta = generic;
         243  +
                    if tmp.message.is_none() {
         244  +
                        tmp.message = _error_message;
         245  +
                    }
         246  +
                    tmp
         247  +
                }),
         248  +
                "ItemCollectionSizeLimitExceededException" => crate::operation::put_item::PutItemError::ItemCollectionSizeLimitExceededException({
         249  +
                    let mut tmp = match protocol
         250  +
                        .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededException::SCHEMA, _cfg)
         251  +
                        .and_then(|mut deser| {
         252  +
                            crate::types::error::ItemCollectionSizeLimitExceededException::deserialize_with_response(
         253  +
                                &mut *deser,
         254  +
                                response.headers(),
         255  +
                                response.status().into(),
         256  +
                                body,
         257  +
                            )
         258  +
                        }) {
         259  +
                        ::std::result::Result::Ok(val) => val,
         260  +
                        ::std::result::Result::Err(e) => {
         261  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         262  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         263  +
                            ))
         264  +
                        }
         265  +
                    };
         266  +
                    tmp.meta = generic;
         267  +
                    if tmp.message.is_none() {
         268  +
                        tmp.message = _error_message;
         269  +
                    }
         270  +
                    tmp
         271  +
                }),
         272  +
                "ProvisionedThroughputExceededException" => crate::operation::put_item::PutItemError::ProvisionedThroughputExceededException({
         273  +
                    let mut tmp = match protocol
         274  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
         275  +
                        .and_then(|mut deser| {
         276  +
                            crate::types::error::ProvisionedThroughputExceededException::deserialize_with_response(
         277  +
                                &mut *deser,
         278  +
                                response.headers(),
         279  +
                                response.status().into(),
         280  +
                                body,
         281  +
                            )
         282  +
                        }) {
         283  +
                        ::std::result::Result::Ok(val) => val,
         284  +
                        ::std::result::Result::Err(e) => {
         285  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         286  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         287  +
                            ))
         288  +
                        }
         289  +
                    };
         290  +
                    tmp.meta = generic;
         291  +
                    if tmp.message.is_none() {
         292  +
                        tmp.message = _error_message;
         293  +
                    }
         294  +
                    tmp
         295  +
                }),
         296  +
                "ReplicatedWriteConflictException" => crate::operation::put_item::PutItemError::ReplicatedWriteConflictException({
         297  +
                    let mut tmp = match protocol
         298  +
                        .deserialize_response(response, crate::types::error::ReplicatedWriteConflictException::SCHEMA, _cfg)
         299  +
                        .and_then(|mut deser| {
         300  +
                            crate::types::error::ReplicatedWriteConflictException::deserialize_with_response(
         301  +
                                &mut *deser,
         302  +
                                response.headers(),
         303  +
                                response.status().into(),
         304  +
                                body,
         305  +
                            )
         306  +
                        }) {
         307  +
                        ::std::result::Result::Ok(val) => val,
         308  +
                        ::std::result::Result::Err(e) => {
         309  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         310  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         311  +
                            ))
         312  +
                        }
         313  +
                    };
         314  +
                    tmp.meta = generic;
         315  +
                    if tmp.message.is_none() {
         316  +
                        tmp.message = _error_message;
         317  +
                    }
         318  +
                    tmp
         319  +
                }),
         320  +
                "RequestLimitExceeded" => crate::operation::put_item::PutItemError::RequestLimitExceeded({
         321  +
                    let mut tmp = match protocol
         322  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         323  +
                        .and_then(|mut deser| {
         324  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         325  +
                                &mut *deser,
         326  +
                                response.headers(),
         327  +
                                response.status().into(),
         328  +
                                body,
         329  +
                            )
         330  +
                        }) {
         331  +
                        ::std::result::Result::Ok(val) => val,
         332  +
                        ::std::result::Result::Err(e) => {
         333  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         334  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         335  +
                            ))
         336  +
                        }
         337  +
                    };
         338  +
                    tmp.meta = generic;
         339  +
                    if tmp.message.is_none() {
         340  +
                        tmp.message = _error_message;
         341  +
                    }
         342  +
                    tmp
         343  +
                }),
         344  +
                "ResourceNotFoundException" => crate::operation::put_item::PutItemError::ResourceNotFoundException({
         345  +
                    let mut tmp = match protocol
         346  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         347  +
                        .and_then(|mut deser| {
         348  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         349  +
                                &mut *deser,
         350  +
                                response.headers(),
         351  +
                                response.status().into(),
         352  +
                                body,
         353  +
                            )
         354  +
                        }) {
         355  +
                        ::std::result::Result::Ok(val) => val,
         356  +
                        ::std::result::Result::Err(e) => {
         357  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         358  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         359  +
                            ))
         360  +
                        }
         361  +
                    };
         362  +
                    tmp.meta = generic;
         363  +
                    if tmp.message.is_none() {
         364  +
                        tmp.message = _error_message;
         365  +
                    }
         366  +
                    tmp
         367  +
                }),
         368  +
                "ThrottlingException" => crate::operation::put_item::PutItemError::ThrottlingException({
         369  +
                    let mut tmp = match protocol
         370  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         371  +
                        .and_then(|mut deser| {
         372  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         373  +
                                &mut *deser,
         374  +
                                response.headers(),
         375  +
                                response.status().into(),
         376  +
                                body,
         377  +
                            )
         378  +
                        }) {
         379  +
                        ::std::result::Result::Ok(val) => val,
         380  +
                        ::std::result::Result::Err(e) => {
         381  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         382  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         383  +
                            ))
         384  +
                        }
         385  +
                    };
         386  +
                    tmp.meta = generic;
         387  +
                    if tmp.message.is_none() {
         388  +
                        tmp.message = _error_message;
         389  +
                    }
         390  +
                    tmp
         391  +
                }),
         392  +
                "TransactionConflictException" => crate::operation::put_item::PutItemError::TransactionConflictException({
         393  +
                    let mut tmp = match protocol
         394  +
                        .deserialize_response(response, crate::types::error::TransactionConflictException::SCHEMA, _cfg)
         395  +
                        .and_then(|mut deser| {
         396  +
                            crate::types::error::TransactionConflictException::deserialize_with_response(
         397  +
                                &mut *deser,
         398  +
                                response.headers(),
         399  +
                                response.status().into(),
         400  +
                                body,
         401  +
                            )
         402  +
                        }) {
         403  +
                        ::std::result::Result::Ok(val) => val,
         404  +
                        ::std::result::Result::Err(e) => {
         405  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         406  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         407  +
                            ))
         408  +
                        }
         409  +
                    };
         410  +
                    tmp.meta = generic;
         411  +
                    if tmp.message.is_none() {
         412  +
                        tmp.message = _error_message;
         413  +
                    }
         414  +
                    tmp
         415  +
                }),
         416  +
                _ => crate::operation::put_item::PutItemError::generic(generic),
         417  +
            };
         418  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         419  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         420  +
            ))
  153    421   
        } else {
  154         -
            crate::protocol_serde::shape_put_item::de_put_item_http_response(status, headers, body)
  155         -
        };
  156         -
        crate::protocol_serde::type_erase_result(parse_result)
         422  +
            let protocol = _cfg
         423  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         424  +
                .expect("a SharedClientProtocol is required");
         425  +
            let mut deser = protocol.deserialize_response(response, PutItem::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         426  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         427  +
            })?;
         428  +
            let body = response.body().bytes().expect("body loaded");
         429  +
            let output =
         430  +
                crate::operation::put_item::PutItemOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         431  +
                    .map_err(|e| {
         432  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         433  +
                            e,
         434  +
                        ))
         435  +
                    })?;
         436  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         437  +
        }
  157    438   
    }
  158    439   
}
  159    440   
#[derive(Debug)]
  160    441   
struct PutItemRequestSerializer;
  161    442   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutItemRequestSerializer {
  162    443   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    444   
    fn serialize_input(
  164    445   
        &self,
  165    446   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    447   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    448   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    449   
        let input = input.downcast::<crate::operation::put_item::PutItemInput>().expect("correct type");
  169         -
        let _header_serialization_settings = _cfg
  170         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171         -
            .cloned()
  172         -
            .unwrap_or_default();
  173         -
        let mut request_builder = {
  174         -
            #[allow(clippy::uninlined_format_args)]
  175         -
            fn uri_base(
  176         -
                _input: &crate::operation::put_item::PutItemInput,
  177         -
                output: &mut ::std::string::String,
  178         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  179         -
                use ::std::fmt::Write as _;
  180         -
                ::std::write!(output, "/").expect("formatting should succeed");
  181         -
                ::std::result::Result::Ok(())
  182         -
            }
  183         -
            #[allow(clippy::unnecessary_wraps)]
  184         -
            fn update_http_builder(
  185         -
                input: &crate::operation::put_item::PutItemInput,
  186         -
                builder: ::http_1x::request::Builder,
  187         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  188         -
                let mut uri = ::std::string::String::new();
  189         -
                uri_base(input, &mut uri)?;
  190         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191         -
            }
  192         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  193         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  194         -
            builder = _header_serialization_settings.set_default_header(
  195         -
                builder,
  196         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  197         -
                "DynamoDB_20120810.PutItem",
  198         -
            );
  199         -
            builder
  200         -
        };
  201         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_item::ser_put_item_input(&input)?);
  202         -
        if let Some(content_length) = body.content_length() {
  203         -
            let content_length = content_length.to_string();
  204         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  205         -
        }
  206         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         450  +
        let protocol = _cfg
         451  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         452  +
            .expect("a SharedClientProtocol is required");
         453  +
        let mut request = protocol
         454  +
            .serialize_request(&input, PutItem::INPUT_SCHEMA, "", _cfg)
         455  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         456  +
         457  +
        return ::std::result::Result::Ok(request);
  207    458   
    }
  208    459   
}
  209    460   
#[derive(Debug)]
  210    461   
struct PutItemEndpointParamsInterceptor;
  211    462   
  212    463   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutItemEndpointParamsInterceptor {
  213    464   
    fn name(&self) -> &'static str {
  214    465   
        "PutItemEndpointParamsInterceptor"
  215    466   
    }
  216    467   

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/put_item/_put_item_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/put_item/_put_item_output.rs

@@ -27,27 +176,231 @@
   47     47   
    "com.amazonaws.dynamodb.synthetic",
   48     48   
    "PutItemOutput",
   49     49   
);
   50     50   
static PUTITEMOUTPUT_MEMBER_ATTRIBUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$Attributes",
   53     53   
        "com.amazonaws.dynamodb.synthetic",
   54     54   
        "PutItemOutput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::Map,
   57         -
    "attributes",
          57  +
    "Attributes",
   58     58   
    0,
   59     59   
);
   60     60   
static PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$ConsumedCapacity",
   63     63   
        "com.amazonaws.dynamodb.synthetic",
   64     64   
        "PutItemOutput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67         -
    "consumed_capacity",
          67  +
    "ConsumedCapacity",
   68     68   
    1,
   69     69   
);
   70     70   
static PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.dynamodb.synthetic#PutItemOutput$ItemCollectionMetrics",
   73     73   
        "com.amazonaws.dynamodb.synthetic",
   74     74   
        "PutItemOutput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::Structure,
   77         -
    "item_collection_metrics",
          77  +
    "ItemCollectionMetrics",
   78     78   
    2,
   79     79   
);
          80  +
static PUTITEMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "request_id",
          84  +
    3,
          85  +
)
          86  +
.with_http_header("x-amzn-requestid");
   80     87   
static PUTITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     88   
    PUTITEMOUTPUT_SCHEMA_ID,
   82     89   
    ::aws_smithy_schema::ShapeType::Structure,
   83     90   
    &[
   84     91   
        &PUTITEMOUTPUT_MEMBER_ATTRIBUTES,
   85     92   
        &PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
   86     93   
        &PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
          94  +
        &PUTITEMOUTPUT_MEMBER__REQUEST_ID,
   87     95   
    ],
   88     96   
);
   89     97   
impl PutItemOutput {
   90     98   
    /// The schema for this shape.
   91     99   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTITEMOUTPUT_SCHEMA;
   92    100   
}
   93    101   
impl ::aws_smithy_schema::serde::SerializableStruct for PutItemOutput {
   94    102   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   95    103   
    fn serialize_members(
   96    104   
        &self,
   97    105   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   98    106   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        if let Some(ref val) = self.attributes {
  100    108   
            ser.write_map(
  101    109   
                &PUTITEMOUTPUT_MEMBER_ATTRIBUTES,
  102    110   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  103    111   
                    for (key, value) in val {
  104    112   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  105         -
                        todo!("schema: unsupported map value type");
         113  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  106    114   
                    }
  107    115   
                    Ok(())
  108    116   
                },
  109    117   
            )?;
  110    118   
        }
  111    119   
        if let Some(ref val) = self.consumed_capacity {
  112    120   
            ser.write_struct(&PUTITEMOUTPUT_MEMBER_CONSUMED_CAPACITY, val)?;
  113    121   
        }
  114    122   
        if let Some(ref val) = self.item_collection_metrics {
  115    123   
            ser.write_struct(&PUTITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS, val)?;
  116    124   
        }
  117    125   
        Ok(())
  118    126   
    }
  119    127   
}
  120    128   
impl PutItemOutput {
  121    129   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  122         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  123         -
        deserializer: &mut D,
         130  +
    pub fn deserialize(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  124    132   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  125    133   
        #[allow(unused_variables, unused_mut)]
  126    134   
        let mut builder = Self::builder();
  127    135   
        #[allow(
  128    136   
            unused_variables,
  129    137   
            unreachable_code,
  130    138   
            clippy::single_match,
  131    139   
            clippy::match_single_binding,
  132    140   
            clippy::diverging_sub_expression
  133    141   
        )]
  134         -
        deserializer.read_struct(&PUTITEMOUTPUT_SCHEMA, (), |_, member, deser| {
         142  +
        deserializer.read_struct(&PUTITEMOUTPUT_SCHEMA, &mut |member, deser| {
  135    143   
            match member.member_index() {
  136    144   
                Some(0) => {
  137    145   
                    builder.attributes = Some({
  138         -
                        let container = if let Some(cap) = deser.container_size() {
  139         -
                            std::collections::HashMap::with_capacity(cap)
  140         -
                        } else {
  141         -
                            std::collections::HashMap::new()
  142         -
                        };
  143         -
                        deser.read_map(member, container, |mut map, key, deser| {
  144         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  145         -
                            Ok(map)
  146         -
                        })?
         146  +
                        let mut container = std::collections::HashMap::new();
         147  +
                        deser.read_map(member, &mut |key, deser| {
         148  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         149  +
                            Ok(())
         150  +
                        })?;
         151  +
                        container
         152  +
                    });
         153  +
                }
         154  +
                Some(1) => {
         155  +
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
         156  +
                }
         157  +
                Some(2) => {
         158  +
                    builder.item_collection_metrics = Some(crate::types::ItemCollectionMetrics::deserialize(deser)?);
         159  +
                }
         160  +
                Some(3) => {
         161  +
                    builder._request_id = Some(deser.read_string(member)?);
         162  +
                }
         163  +
                _ => {}
         164  +
            }
         165  +
            Ok(())
         166  +
        })?;
         167  +
        Ok(builder.build())
         168  +
    }
         169  +
}
         170  +
impl PutItemOutput {
         171  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         172  +
    /// Header-bound members are read directly from headers, avoiding runtime
         173  +
    /// member iteration overhead. Body members are read via the deserializer.
         174  +
    pub fn deserialize_with_response(
         175  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         176  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         177  +
        _status: u16,
         178  +
        _body: &[u8],
         179  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         180  +
        #[allow(unused_variables, unused_mut)]
         181  +
        let mut builder = Self::builder();
         182  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         183  +
            builder._request_id = Some(val.to_string());
         184  +
        }
         185  +
        #[allow(
         186  +
            unused_variables,
         187  +
            unreachable_code,
         188  +
            clippy::single_match,
         189  +
            clippy::match_single_binding,
         190  +
            clippy::diverging_sub_expression
         191  +
        )]
         192  +
        deserializer.read_struct(&PUTITEMOUTPUT_SCHEMA, &mut |member, deser| {
         193  +
            match member.member_index() {
         194  +
                Some(0) => {
         195  +
                    builder.attributes = Some({
         196  +
                        let mut container = std::collections::HashMap::new();
         197  +
                        deser.read_map(member, &mut |key, deser| {
         198  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         199  +
                            Ok(())
         200  +
                        })?;
         201  +
                        container
  147    202   
                    });
  148    203   
                }
  149    204   
                Some(1) => {
  150    205   
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
  151    206   
                }
  152    207   
                Some(2) => {
  153    208   
                    builder.item_collection_metrics = Some(crate::types::ItemCollectionMetrics::deserialize(deser)?);
  154    209   
                }
  155    210   
                _ => {}
  156    211   
            }

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/put_resource_policy/_put_resource_policy_input.rs

@@ -37,37 +197,242 @@
   57     57   
    "com.amazonaws.dynamodb.synthetic",
   58     58   
    "PutResourcePolicyInput",
   59     59   
);
   60     60   
static PUTRESOURCEPOLICYINPUT_MEMBER_RESOURCE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.dynamodb.synthetic#PutResourcePolicyInput$ResourceArn",
   63     63   
        "com.amazonaws.dynamodb.synthetic",
   64     64   
        "PutResourcePolicyInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "resource_arn",
          67  +
    "ResourceArn",
   68     68   
    0,
   69     69   
);
   70     70   
static PUTRESOURCEPOLICYINPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.dynamodb.synthetic#PutResourcePolicyInput$Policy",
   73     73   
        "com.amazonaws.dynamodb.synthetic",
   74     74   
        "PutResourcePolicyInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "policy",
          77  +
    "Policy",
   78     78   
    1,
   79     79   
);
   80     80   
static PUTRESOURCEPOLICYINPUT_MEMBER_EXPECTED_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.dynamodb.synthetic#PutResourcePolicyInput$ExpectedRevisionId",
   83     83   
        "com.amazonaws.dynamodb.synthetic",
   84     84   
        "PutResourcePolicyInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "expected_revision_id",
          87  +
    "ExpectedRevisionId",
   88     88   
    2,
   89     89   
);
   90     90   
static PUTRESOURCEPOLICYINPUT_MEMBER_CONFIRM_REMOVE_SELF_RESOURCE_ACCESS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.dynamodb.synthetic#PutResourcePolicyInput$ConfirmRemoveSelfResourceAccess",
   93     93   
        "com.amazonaws.dynamodb.synthetic",
   94     94   
        "PutResourcePolicyInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Boolean,
   97         -
    "confirm_remove_self_resource_access",
          97  +
    "ConfirmRemoveSelfResourceAccess",
   98     98   
    3,
   99     99   
)
  100    100   
.with_http_header("x-amz-confirm-remove-self-resource-access");
  101    101   
static PUTRESOURCEPOLICYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  102    102   
    PUTRESOURCEPOLICYINPUT_SCHEMA_ID,
  103    103   
    ::aws_smithy_schema::ShapeType::Structure,
  104    104   
    &[
  105    105   
        &PUTRESOURCEPOLICYINPUT_MEMBER_RESOURCE_ARN,
  106    106   
        &PUTRESOURCEPOLICYINPUT_MEMBER_POLICY,
  107    107   
        &PUTRESOURCEPOLICYINPUT_MEMBER_EXPECTED_REVISION_ID,
  108    108   
        &PUTRESOURCEPOLICYINPUT_MEMBER_CONFIRM_REMOVE_SELF_RESOURCE_ACCESS,
  109    109   
    ],
  110    110   
);
  111    111   
impl PutResourcePolicyInput {
  112    112   
    /// The schema for this shape.
  113    113   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTRESOURCEPOLICYINPUT_SCHEMA;
  114    114   
}
  115    115   
impl ::aws_smithy_schema::serde::SerializableStruct for PutResourcePolicyInput {
  116    116   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  117    117   
    fn serialize_members(
  118    118   
        &self,
  119    119   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  120    120   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  121    121   
        if let Some(ref val) = self.resource_arn {
  122    122   
            ser.write_string(&PUTRESOURCEPOLICYINPUT_MEMBER_RESOURCE_ARN, val)?;
  123    123   
        }
  124    124   
        if let Some(ref val) = self.policy {
  125    125   
            ser.write_string(&PUTRESOURCEPOLICYINPUT_MEMBER_POLICY, val)?;
  126    126   
        }
  127    127   
        if let Some(ref val) = self.expected_revision_id {
  128    128   
            ser.write_string(&PUTRESOURCEPOLICYINPUT_MEMBER_EXPECTED_REVISION_ID, val)?;
  129    129   
        }
  130    130   
        if let Some(ref val) = self.confirm_remove_self_resource_access {
  131    131   
            ser.write_boolean(&PUTRESOURCEPOLICYINPUT_MEMBER_CONFIRM_REMOVE_SELF_RESOURCE_ACCESS, *val)?;
  132    132   
        }
  133    133   
        Ok(())
  134    134   
    }
  135    135   
}
  136    136   
impl PutResourcePolicyInput {
  137    137   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  138         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  139         -
        deserializer: &mut D,
         138  +
    pub fn deserialize(
         139  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  140    140   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  141    141   
        #[allow(unused_variables, unused_mut)]
  142    142   
        let mut builder = Self::builder();
  143    143   
        #[allow(
  144    144   
            unused_variables,
  145    145   
            unreachable_code,
  146    146   
            clippy::single_match,
  147    147   
            clippy::match_single_binding,
  148    148   
            clippy::diverging_sub_expression
  149    149   
        )]
  150         -
        deserializer.read_struct(&PUTRESOURCEPOLICYINPUT_SCHEMA, (), |_, member, deser| {
         150  +
        deserializer.read_struct(&PUTRESOURCEPOLICYINPUT_SCHEMA, &mut |member, deser| {
  151    151   
            match member.member_index() {
  152    152   
                Some(0) => {
  153    153   
                    builder.resource_arn = Some(deser.read_string(member)?);
  154    154   
                }
  155    155   
                Some(1) => {
  156    156   
                    builder.policy = Some(deser.read_string(member)?);
  157    157   
                }
  158    158   
                Some(2) => {
  159    159   
                    builder.expected_revision_id = Some(deser.read_string(member)?);
  160    160   
                }
  161    161   
                Some(3) => {
  162    162   
                    builder.confirm_remove_self_resource_access = Some(deser.read_boolean(member)?);
  163    163   
                }
  164    164   
                _ => {}
  165    165   
            }
  166    166   
            Ok(())
  167    167   
        })?;
         168  +
        builder.resource_arn = builder.resource_arn.or(Some(String::new()));
         169  +
        builder.policy = builder.policy.or(Some(String::new()));
         170  +
        builder
         171  +
            .build()
         172  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         173  +
    }
         174  +
}
         175  +
impl PutResourcePolicyInput {
         176  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         177  +
    /// Header-bound members are read directly from headers, avoiding runtime
         178  +
    /// member iteration overhead. Body members are read via the deserializer.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        #[allow(unused_variables, unused_mut)]
         186  +
        let mut builder = Self::builder();
         187  +
        if let Some(val) = headers.get("x-amz-confirm-remove-self-resource-access") {
         188  +
            builder.confirm_remove_self_resource_access = val.parse::<bool>().ok();
         189  +
        }
         190  +
        #[allow(
         191  +
            unused_variables,
         192  +
            unreachable_code,
         193  +
            clippy::single_match,
         194  +
            clippy::match_single_binding,
         195  +
            clippy::diverging_sub_expression
         196  +
        )]
         197  +
        deserializer.read_struct(&PUTRESOURCEPOLICYINPUT_SCHEMA, &mut |member, deser| {
         198  +
            match member.member_index() {
         199  +
                Some(0) => {
         200  +
                    builder.resource_arn = Some(deser.read_string(member)?);
         201  +
                }
         202  +
                Some(1) => {
         203  +
                    builder.policy = Some(deser.read_string(member)?);
         204  +
                }
         205  +
                Some(2) => {
         206  +
                    builder.expected_revision_id = Some(deser.read_string(member)?);
         207  +
                }
         208  +
                Some(3) => { /* read from headers above */ }
         209  +
                _ => {}
         210  +
            }
         211  +
            Ok(())
         212  +
        })?;
  168    213   
        builder
  169    214   
            .build()
  170    215   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  171    216   
    }
  172    217   
}
  173    218   
impl PutResourcePolicyInput {
  174    219   
    /// Creates a new builder-style object to manufacture [`PutResourcePolicyInput`](crate::operation::put_resource_policy::PutResourcePolicyInput).
  175    220   
    pub fn builder() -> crate::operation::put_resource_policy::builders::PutResourcePolicyInputBuilder {
  176    221   
        crate::operation::put_resource_policy::builders::PutResourcePolicyInputBuilder::default()
  177    222   
    }

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/put_resource_policy/_put_resource_policy_output.rs

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.dynamodb.synthetic",
   19     19   
    "PutResourcePolicyOutput",
   20     20   
);
   21     21   
static PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.dynamodb.synthetic#PutResourcePolicyOutput$RevisionId",
   24     24   
        "com.amazonaws.dynamodb.synthetic",
   25     25   
        "PutResourcePolicyOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::String,
   28         -
    "revision_id",
          28  +
    "RevisionId",
   29     29   
    0,
   30     30   
);
          31  +
static PUTRESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static PUTRESOURCEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    PUTRESOURCEPOLICYOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID],
          41  +
    &[&PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID, &PUTRESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl PutResourcePolicyOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTRESOURCEPOLICYOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for PutResourcePolicyOutput {
   41     48   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     49   
    fn serialize_members(
   43     50   
        &self,
   44     51   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     52   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     53   
        if let Some(ref val) = self.revision_id {
   47     54   
            ser.write_string(&PUTRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl PutResourcePolicyOutput {
   53     60   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          61  +
    pub fn deserialize(
          62  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     63   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     64   
        #[allow(unused_variables, unused_mut)]
   58     65   
        let mut builder = Self::builder();
   59     66   
        #[allow(
   60     67   
            unused_variables,
   61     68   
            unreachable_code,
   62     69   
            clippy::single_match,
   63     70   
            clippy::match_single_binding,
   64     71   
            clippy::diverging_sub_expression
   65     72   
        )]
   66         -
        deserializer.read_struct(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.revision_id = Some(deser.read_string(member)?);
          77  +
                }
          78  +
                Some(1) => {
          79  +
                    builder._request_id = Some(deser.read_string(member)?);
          80  +
                }
          81  +
                _ => {}
          82  +
            }
          83  +
            Ok(())
          84  +
        })?;
          85  +
        Ok(builder.build())
          86  +
    }
          87  +
}
          88  +
impl PutResourcePolicyOutput {
          89  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          90  +
    /// Header-bound members are read directly from headers, avoiding runtime
          91  +
    /// member iteration overhead. Body members are read via the deserializer.
          92  +
    pub fn deserialize_with_response(
          93  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          94  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          95  +
        _status: u16,
          96  +
        _body: &[u8],
          97  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          98  +
        #[allow(unused_variables, unused_mut)]
          99  +
        let mut builder = Self::builder();
         100  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         101  +
            builder._request_id = Some(val.to_string());
         102  +
        }
         103  +
        #[allow(
         104  +
            unused_variables,
         105  +
            unreachable_code,
         106  +
            clippy::single_match,
         107  +
            clippy::match_single_binding,
         108  +
            clippy::diverging_sub_expression
         109  +
        )]
         110  +
        deserializer.read_struct(&PUTRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.revision_id = Some(deser.read_string(member)?);
   70    114   
                }
   71    115   
                _ => {}
   72    116   
            }
   73    117   
            Ok(())
   74    118   
        })?;
   75    119   
        Ok(builder.build())
   76    120   
    }

tmp-codegen-diff/aws-sdk/sdk/dynamodb/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   
    > {
@@ -106,110 +231,386 @@
  126    130   
                crate::operation::query::QueryError,
  127    131   
            >::new());
  128    132   
  129    133   
        ::std::borrow::Cow::Owned(rcb)
  130    134   
    }
  131    135   
}
  132    136   
  133    137   
#[derive(Debug)]
  134    138   
struct QueryResponseDeserializer;
  135    139   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryResponseDeserializer {
  136         -
    fn deserialize_nonstreaming(
         140  +
    fn deserialize_nonstreaming_with_config(
  137    141   
        &self,
  138    142   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         143  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  139    144   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  140    145   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  141         -
        let headers = response.headers();
  142         -
        let body = response.body().bytes().expect("body loaded");
  143    146   
        #[allow(unused_mut)]
  144    147   
        let mut force_error = false;
  145    148   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  146         -
        let parse_result = if !success && status != 200 || force_error {
  147         -
            crate::protocol_serde::shape_query::de_query_http_error(status, headers, body)
         149  +
        if !success && status != 200 || force_error {
         150  +
            let headers = response.headers();
         151  +
            let body = response.body().bytes().expect("body loaded");
         152  +
            #[allow(unused_mut)]
         153  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         154  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         155  +
            })?;
         156  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         157  +
            let generic = generic_builder.build();
         158  +
            let error_code = match generic.code() {
         159  +
                ::std::option::Option::Some(code) => code,
         160  +
                ::std::option::Option::None => {
         161  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         162  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::query::QueryError::unhandled(generic)),
         163  +
                    ))
         164  +
                }
         165  +
            };
         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::query::QueryError::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::query::QueryError::InvalidEndpointException({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::InvalidEndpointException::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  +
                "ProvisionedThroughputExceededException" => crate::operation::query::QueryError::ProvisionedThroughputExceededException({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::ProvisionedThroughputExceededException::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  +
                "RequestLimitExceeded" => crate::operation::query::QueryError::RequestLimitExceeded({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                "ResourceNotFoundException" => crate::operation::query::QueryError::ResourceNotFoundException({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    if tmp.message.is_none() {
         287  +
                        tmp.message = _error_message;
         288  +
                    }
         289  +
                    tmp
         290  +
                }),
         291  +
                "ThrottlingException" => crate::operation::query::QueryError::ThrottlingException({
         292  +
                    let mut tmp = match protocol
         293  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         294  +
                        .and_then(|mut deser| {
         295  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         296  +
                                &mut *deser,
         297  +
                                response.headers(),
         298  +
                                response.status().into(),
         299  +
                                body,
         300  +
                            )
         301  +
                        }) {
         302  +
                        ::std::result::Result::Ok(val) => val,
         303  +
                        ::std::result::Result::Err(e) => {
         304  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         305  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         306  +
                            ))
         307  +
                        }
         308  +
                    };
         309  +
                    tmp.meta = generic;
         310  +
                    if tmp.message.is_none() {
         311  +
                        tmp.message = _error_message;
         312  +
                    }
         313  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::query::QueryError::generic(generic),
         316  +
            };
         317  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         318  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         319  +
            ))
  148    320   
        } else {
  149         -
            crate::protocol_serde::shape_query::de_query_http_response(status, headers, body)
  150         -
        };
  151         -
        crate::protocol_serde::type_erase_result(parse_result)
         321  +
            let protocol = _cfg
         322  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
                .expect("a SharedClientProtocol is required");
         324  +
            let mut deser = protocol.deserialize_response(response, Query::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         325  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         326  +
            })?;
         327  +
            let body = response.body().bytes().expect("body loaded");
         328  +
            let output =
         329  +
                crate::operation::query::QueryOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         330  +
                    .map_err(|e| {
         331  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         332  +
                            e,
         333  +
                        ))
         334  +
                    })?;
         335  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         336  +
        }
  152    337   
    }
  153    338   
}
  154    339   
#[derive(Debug)]
  155    340   
struct QueryRequestSerializer;
  156    341   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for QueryRequestSerializer {
  157    342   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  158    343   
    fn serialize_input(
  159    344   
        &self,
  160    345   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  161    346   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  162    347   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  163    348   
        let input = input.downcast::<crate::operation::query::QueryInput>().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::query::QueryInput,
  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::query::QueryInput,
  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.Query",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_query::ser_query_input(&input)?);
  197         -
        if let Some(content_length) = body.content_length() {
  198         -
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200         -
        }
  201         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         349  +
        let protocol = _cfg
         350  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         351  +
            .expect("a SharedClientProtocol is required");
         352  +
        let mut request = protocol
         353  +
            .serialize_request(&input, Query::INPUT_SCHEMA, "", _cfg)
         354  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         355  +
         356  +
        return ::std::result::Result::Ok(request);
  202    357   
    }
  203    358   
}
  204    359   
#[derive(Debug)]
  205    360   
struct QueryEndpointParamsInterceptor;
  206    361   
  207    362   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for QueryEndpointParamsInterceptor {
  208    363   
    fn name(&self) -> &'static str {
  209    364   
        "QueryEndpointParamsInterceptor"
  210    365   
    }
  211    366