AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/batch_get_item/_batch_get_item_input.rs

@@ -104,104 +253,262 @@
  124    124   
    "com.amazonaws.dynamodb.synthetic",
  125    125   
    "BatchGetItemInput",
  126    126   
);
  127    127   
static BATCHGETITEMINPUT_MEMBER_REQUEST_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  128    128   
    ::aws_smithy_schema::ShapeId::from_static(
  129    129   
        "com.amazonaws.dynamodb.synthetic#BatchGetItemInput$RequestItems",
  130    130   
        "com.amazonaws.dynamodb.synthetic",
  131    131   
        "BatchGetItemInput",
  132    132   
    ),
  133    133   
    ::aws_smithy_schema::ShapeType::Map,
  134         -
    "request_items",
         134  +
    "RequestItems",
  135    135   
    0,
  136    136   
);
  137    137   
static BATCHGETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  138    138   
    ::aws_smithy_schema::ShapeId::from_static(
  139    139   
        "com.amazonaws.dynamodb.synthetic#BatchGetItemInput$ReturnConsumedCapacity",
  140    140   
        "com.amazonaws.dynamodb.synthetic",
  141    141   
        "BatchGetItemInput",
  142    142   
    ),
  143    143   
    ::aws_smithy_schema::ShapeType::String,
  144         -
    "return_consumed_capacity",
         144  +
    "ReturnConsumedCapacity",
  145    145   
    1,
  146    146   
);
  147    147   
static BATCHGETITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  148    148   
    BATCHGETITEMINPUT_SCHEMA_ID,
  149    149   
    ::aws_smithy_schema::ShapeType::Structure,
  150    150   
    &[
  151    151   
        &BATCHGETITEMINPUT_MEMBER_REQUEST_ITEMS,
  152    152   
        &BATCHGETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  153    153   
    ],
  154    154   
);
  155    155   
impl BatchGetItemInput {
  156    156   
    /// The schema for this shape.
  157    157   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &BATCHGETITEMINPUT_SCHEMA;
  158    158   
}
  159    159   
impl ::aws_smithy_schema::serde::SerializableStruct for BatchGetItemInput {
  160    160   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  161    161   
    fn serialize_members(
  162    162   
        &self,
  163    163   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  164    164   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  165    165   
        if let Some(ref val) = self.request_items {
  166    166   
            ser.write_map(
  167    167   
                &BATCHGETITEMINPUT_MEMBER_REQUEST_ITEMS,
  168    168   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  169    169   
                    for (key, value) in val {
  170    170   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  171    171   
                        ser.write_struct(crate::types::KeysAndAttributes::SCHEMA, value)?;
  172    172   
                    }
  173    173   
                    Ok(())
  174    174   
                },
  175    175   
            )?;
  176    176   
        }
  177    177   
        if let Some(ref val) = self.return_consumed_capacity {
  178    178   
            ser.write_string(&BATCHGETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  179    179   
        }
  180    180   
        Ok(())
  181    181   
    }
  182    182   
}
  183    183   
impl BatchGetItemInput {
  184    184   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  185         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  186         -
        deserializer: &mut D,
         185  +
    pub fn deserialize(
         186  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  187    187   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  188    188   
        #[allow(unused_variables, unused_mut)]
  189    189   
        let mut builder = Self::builder();
  190    190   
        #[allow(
  191    191   
            unused_variables,
  192    192   
            unreachable_code,
  193    193   
            clippy::single_match,
  194    194   
            clippy::match_single_binding,
  195    195   
            clippy::diverging_sub_expression
  196    196   
        )]
  197         -
        deserializer.read_struct(&BATCHGETITEMINPUT_SCHEMA, (), |_, member, deser| {
         197  +
        deserializer.read_struct(&BATCHGETITEMINPUT_SCHEMA, &mut |member, deser| {
  198    198   
            match member.member_index() {
  199    199   
                Some(0) => {
  200    200   
                    builder.request_items = Some({
  201         -
                        let container = if let Some(cap) = deser.container_size() {
  202         -
                            std::collections::HashMap::with_capacity(cap)
  203         -
                        } else {
  204         -
                            std::collections::HashMap::new()
  205         -
                        };
  206         -
                        deser.read_map(member, container, |mut map, key, deser| {
  207         -
                            map.insert(key, crate::types::KeysAndAttributes::deserialize(deser)?);
  208         -
                            Ok(map)
  209         -
                        })?
         201  +
                        let mut container = std::collections::HashMap::new();
         202  +
                        deser.read_map(member, &mut |key, deser| {
         203  +
                            container.insert(key, crate::types::KeysAndAttributes::deserialize(deser)?);
         204  +
                            Ok(())
         205  +
                        })?;
         206  +
                        container
  210    207   
                    });
  211    208   
                }
  212    209   
                Some(1) => {
  213    210   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  214    211   
                }
  215    212   
                _ => {}
  216    213   
            }
  217    214   
            Ok(())
  218    215   
        })?;
         216  +
        builder.request_items = builder.request_items.or(Some(::std::collections::HashMap::new()));
  219    217   
        builder
  220    218   
            .build()
  221    219   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  222    220   
    }
  223    221   
}
         222  +
impl BatchGetItemInput {
         223  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         224  +
    pub fn deserialize_with_response(
         225  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         226  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         227  +
        _status: u16,
         228  +
        _body: &[u8],
         229  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         230  +
        Self::deserialize(deserializer)
         231  +
    }
         232  +
}
  224    233   
impl BatchGetItemInput {
  225    234   
    /// Creates a new builder-style object to manufacture [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
  226    235   
    pub fn builder() -> crate::operation::batch_get_item::builders::BatchGetItemInputBuilder {
  227    236   
        crate::operation::batch_get_item::builders::BatchGetItemInputBuilder::default()
  228    237   
    }
  229    238   
}
  230    239   
  231    240   
/// A builder for [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
  232    241   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  233    242   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/batch_get_item/_batch_get_item_output.rs

@@ -59,59 +251,362 @@
   79     79   
    "com.amazonaws.dynamodb.synthetic",
   80     80   
    "BatchGetItemOutput",
   81     81   
);
   82     82   
static BATCHGETITEMOUTPUT_MEMBER_RESPONSES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.dynamodb.synthetic#BatchGetItemOutput$Responses",
   85     85   
        "com.amazonaws.dynamodb.synthetic",
   86     86   
        "BatchGetItemOutput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::Map,
   89         -
    "responses",
          89  +
    "Responses",
   90     90   
    0,
   91     91   
);
   92     92   
static BATCHGETITEMOUTPUT_MEMBER_UNPROCESSED_KEYS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.dynamodb.synthetic#BatchGetItemOutput$UnprocessedKeys",
   95     95   
        "com.amazonaws.dynamodb.synthetic",
   96     96   
        "BatchGetItemOutput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::Map,
   99         -
    "unprocessed_keys",
          99  +
    "UnprocessedKeys",
  100    100   
    1,
  101    101   
);
  102    102   
static BATCHGETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.dynamodb.synthetic#BatchGetItemOutput$ConsumedCapacity",
  105    105   
        "com.amazonaws.dynamodb.synthetic",
  106    106   
        "BatchGetItemOutput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::List,
  109         -
    "consumed_capacity",
         109  +
    "ConsumedCapacity",
  110    110   
    2,
  111    111   
);
         112  +
static BATCHGETITEMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         113  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         114  +
    ::aws_smithy_schema::ShapeType::String,
         115  +
    "request_id",
         116  +
    3,
         117  +
)
         118  +
.with_http_header("x-amzn-requestid");
  112    119   
static BATCHGETITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  113    120   
    BATCHGETITEMOUTPUT_SCHEMA_ID,
  114    121   
    ::aws_smithy_schema::ShapeType::Structure,
  115    122   
    &[
  116    123   
        &BATCHGETITEMOUTPUT_MEMBER_RESPONSES,
  117    124   
        &BATCHGETITEMOUTPUT_MEMBER_UNPROCESSED_KEYS,
  118    125   
        &BATCHGETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
         126  +
        &BATCHGETITEMOUTPUT_MEMBER__REQUEST_ID,
  119    127   
    ],
  120    128   
);
  121    129   
impl BatchGetItemOutput {
  122    130   
    /// The schema for this shape.
  123    131   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &BATCHGETITEMOUTPUT_SCHEMA;
  124    132   
}
  125    133   
impl ::aws_smithy_schema::serde::SerializableStruct for BatchGetItemOutput {
  126    134   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  127    135   
    fn serialize_members(
  128    136   
        &self,
  129    137   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  130    138   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  131    139   
        if let Some(ref val) = self.responses {
  132    140   
            ser.write_map(
  133    141   
                &BATCHGETITEMOUTPUT_MEMBER_RESPONSES,
  134    142   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  135    143   
                    for (key, value) in val {
  136    144   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  137         -
                        todo!("schema: unsupported map value type");
         145  +
         146  +
                        ser.write_list(
         147  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         148  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         149  +
                                for item in value {
         150  +
                                    ser.write_map(
         151  +
                                        &::aws_smithy_schema::prelude::DOCUMENT,
         152  +
                                        &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         153  +
                                            for (key, value) in item {
         154  +
                                                ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         155  +
                                                ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
         156  +
                                            }
         157  +
                                            Ok(())
         158  +
                                        },
         159  +
                                    )?;
         160  +
                                }
         161  +
                                Ok(())
         162  +
                            },
         163  +
                        )?;
  138    164   
                    }
  139    165   
                    Ok(())
  140    166   
                },
  141    167   
            )?;
  142    168   
        }
  143    169   
        if let Some(ref val) = self.unprocessed_keys {
  144    170   
            ser.write_map(
  145    171   
                &BATCHGETITEMOUTPUT_MEMBER_UNPROCESSED_KEYS,
  146    172   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  147    173   
                    for (key, value) in val {
  148    174   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  149    175   
                        ser.write_struct(crate::types::KeysAndAttributes::SCHEMA, value)?;
  150    176   
                    }
  151    177   
                    Ok(())
  152    178   
                },
  153    179   
            )?;
  154    180   
        }
  155    181   
        if let Some(ref val) = self.consumed_capacity {
  156    182   
            ser.write_list(
  157    183   
                &BATCHGETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
  158    184   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  159    185   
                    for item in val {
  160    186   
                        ser.write_struct(crate::types::ConsumedCapacity::SCHEMA, item)?;
  161    187   
                    }
  162    188   
                    Ok(())
  163    189   
                },
  164    190   
            )?;
  165    191   
        }
  166    192   
        Ok(())
  167    193   
    }
  168    194   
}
  169    195   
impl BatchGetItemOutput {
  170    196   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  171         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  172         -
        deserializer: &mut D,
         197  +
    pub fn deserialize(
         198  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         199  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         200  +
        #[allow(unused_variables, unused_mut)]
         201  +
        let mut builder = Self::builder();
         202  +
        #[allow(
         203  +
            unused_variables,
         204  +
            unreachable_code,
         205  +
            clippy::single_match,
         206  +
            clippy::match_single_binding,
         207  +
            clippy::diverging_sub_expression
         208  +
        )]
         209  +
        deserializer.read_struct(&BATCHGETITEMOUTPUT_SCHEMA, &mut |member, deser| {
         210  +
            match member.member_index() {
         211  +
                Some(0) => {
         212  +
                    builder.responses = Some({
         213  +
                        let mut container = std::collections::HashMap::new();
         214  +
                        deser.read_map(member, &mut |key, deser| {
         215  +
                            container.insert(key, {
         216  +
                                let mut list = Vec::new();
         217  +
                                deser.read_list(member, &mut |deser| {
         218  +
                                    list.push({
         219  +
                                        let mut map = ::std::collections::HashMap::new();
         220  +
                                        deser.read_map(member, &mut |key, deser| {
         221  +
                                            let value = crate::types::AttributeValue::deserialize(deser)?;
         222  +
                                            map.insert(key, value);
         223  +
                                            Ok(())
         224  +
                                        })?;
         225  +
                                        map
         226  +
                                    });
         227  +
                                    Ok(())
         228  +
                                })?;
         229  +
                                list
         230  +
                            });
         231  +
                            Ok(())
         232  +
                        })?;
         233  +
                        container
         234  +
                    });
         235  +
                }
         236  +
                Some(1) => {
         237  +
                    builder.unprocessed_keys = Some({
         238  +
                        let mut container = std::collections::HashMap::new();
         239  +
                        deser.read_map(member, &mut |key, deser| {
         240  +
                            container.insert(key, crate::types::KeysAndAttributes::deserialize(deser)?);
         241  +
                            Ok(())
         242  +
                        })?;
         243  +
                        container
         244  +
                    });
         245  +
                }
         246  +
                Some(2) => {
         247  +
                    builder.consumed_capacity = Some({
         248  +
                        let mut container = Vec::new();
         249  +
                        deser.read_list(member, &mut |deser| {
         250  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         251  +
                            Ok(())
         252  +
                        })?;
         253  +
                        container
         254  +
                    });
         255  +
                }
         256  +
                Some(3) => {
         257  +
                    builder._request_id = Some(deser.read_string(member)?);
         258  +
                }
         259  +
                _ => {}
         260  +
            }
         261  +
            Ok(())
         262  +
        })?;
         263  +
        Ok(builder.build())
         264  +
    }
         265  +
}
         266  +
impl BatchGetItemOutput {
         267  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         268  +
    /// Header-bound members are read directly from headers, avoiding runtime
         269  +
    /// member iteration overhead. Body members are read via the deserializer.
         270  +
    pub fn deserialize_with_response(
         271  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         272  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         273  +
        _status: u16,
         274  +
        _body: &[u8],
  173    275   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  174    276   
        #[allow(unused_variables, unused_mut)]
  175    277   
        let mut builder = Self::builder();
         278  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         279  +
            builder._request_id = Some(val.to_string());
         280  +
        }
  176    281   
        #[allow(
  177    282   
            unused_variables,
  178    283   
            unreachable_code,
  179    284   
            clippy::single_match,
  180    285   
            clippy::match_single_binding,
  181    286   
            clippy::diverging_sub_expression
  182    287   
        )]
  183         -
        deserializer.read_struct(&BATCHGETITEMOUTPUT_SCHEMA, (), |_, member, deser| {
         288  +
        deserializer.read_struct(&BATCHGETITEMOUTPUT_SCHEMA, &mut |member, deser| {
  184    289   
            match member.member_index() {
  185    290   
                Some(0) => {
  186    291   
                    builder.responses = Some({
  187         -
                        let container = if let Some(cap) = deser.container_size() {
  188         -
                            std::collections::HashMap::with_capacity(cap)
  189         -
                        } else {
  190         -
                            std::collections::HashMap::new()
  191         -
                        };
  192         -
                        deser.read_map(member, container, |mut map, key, deser| {
  193         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  194         -
                            Ok(map)
  195         -
                        })?
         292  +
                        let mut container = std::collections::HashMap::new();
         293  +
                        deser.read_map(member, &mut |key, deser| {
         294  +
                            container.insert(key, {
         295  +
                                let mut list = Vec::new();
         296  +
                                deser.read_list(member, &mut |deser| {
         297  +
                                    list.push({
         298  +
                                        let mut map = ::std::collections::HashMap::new();
         299  +
                                        deser.read_map(member, &mut |key, deser| {
         300  +
                                            let value = crate::types::AttributeValue::deserialize(deser)?;
         301  +
                                            map.insert(key, value);
         302  +
                                            Ok(())
         303  +
                                        })?;
         304  +
                                        map
         305  +
                                    });
         306  +
                                    Ok(())
         307  +
                                })?;
         308  +
                                list
         309  +
                            });
         310  +
                            Ok(())
         311  +
                        })?;
         312  +
                        container
  196    313   
                    });
  197    314   
                }
  198    315   
                Some(1) => {
  199    316   
                    builder.unprocessed_keys = Some({
  200         -
                        let container = if let Some(cap) = deser.container_size() {
  201         -
                            std::collections::HashMap::with_capacity(cap)
  202         -
                        } else {
  203         -
                            std::collections::HashMap::new()
  204         -
                        };
  205         -
                        deser.read_map(member, container, |mut map, key, deser| {
  206         -
                            map.insert(key, crate::types::KeysAndAttributes::deserialize(deser)?);
  207         -
                            Ok(map)
  208         -
                        })?
         317  +
                        let mut container = std::collections::HashMap::new();
         318  +
                        deser.read_map(member, &mut |key, deser| {
         319  +
                            container.insert(key, crate::types::KeysAndAttributes::deserialize(deser)?);
         320  +
                            Ok(())
         321  +
                        })?;
         322  +
                        container
  209    323   
                    });
  210    324   
                }
  211    325   
                Some(2) => {
  212    326   
                    builder.consumed_capacity = Some({
  213         -
                        let container = if let Some(cap) = deser.container_size() {
  214         -
                            Vec::with_capacity(cap)
  215         -
                        } else {
  216         -
                            Vec::new()
  217         -
                        };
  218         -
                        deser.read_list(member, container, |mut list, deser| {
  219         -
                            list.push(crate::types::ConsumedCapacity::deserialize(deser)?);
  220         -
                            Ok(list)
  221         -
                        })?
         327  +
                        let mut container = Vec::new();
         328  +
                        deser.read_list(member, &mut |deser| {
         329  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         330  +
                            Ok(())
         331  +
                        })?;
         332  +
                        container
  222    333   
                    });
  223    334   
                }
  224    335   
                _ => {}
  225    336   
            }
  226    337   
            Ok(())
  227    338   
        })?;
  228    339   
        Ok(builder.build())
  229    340   
    }
  230    341   
}
  231    342   
impl ::aws_types::request_id::RequestId for BatchGetItemOutput {

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/batch_write_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 `BatchWriteItem`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct BatchWriteItem;
    6      6   
impl BatchWriteItem {
    7      7   
    /// Creates a new `BatchWriteItem`
    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::batch_write_item::BatchWriteItemInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::batch_write_item::BatchWriteItemOutput::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::batch_write_item::BatchWriteItemInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::batch_write_item::BatchWriteItemOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::batch_write_item::BatchWriteItemError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,458 @@
  138    142   
                crate::operation::batch_write_item::BatchWriteItemError,
  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 BatchWriteItemResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchWriteItemResponseDeserializer {
  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_batch_write_item::de_batch_write_item_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(crate::operation::batch_write_item::BatchWriteItemError::unhandled(
         175  +
                            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::batch_write_item::BatchWriteItemError::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::batch_write_item::BatchWriteItemError::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  +
                "ItemCollectionSizeLimitExceededException" => {
         234  +
                    crate::operation::batch_write_item::BatchWriteItemError::ItemCollectionSizeLimitExceededException({
         235  +
                        let mut tmp = match protocol
         236  +
                            .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededException::SCHEMA, _cfg)
         237  +
                            .and_then(|mut deser| {
         238  +
                                crate::types::error::ItemCollectionSizeLimitExceededException::deserialize_with_response(
         239  +
                                    &mut *deser,
         240  +
                                    response.headers(),
         241  +
                                    response.status().into(),
         242  +
                                    body,
         243  +
                                )
         244  +
                            }) {
         245  +
                            ::std::result::Result::Ok(val) => val,
         246  +
                            ::std::result::Result::Err(e) => {
         247  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                                ))
         250  +
                            }
         251  +
                        };
         252  +
                        tmp.meta = generic;
         253  +
                        if tmp.message.is_none() {
         254  +
                            tmp.message = _error_message;
         255  +
                        }
         256  +
                        tmp
         257  +
                    })
         258  +
                }
         259  +
                "ProvisionedThroughputExceededException" => {
         260  +
                    crate::operation::batch_write_item::BatchWriteItemError::ProvisionedThroughputExceededException({
         261  +
                        let mut tmp = match protocol
         262  +
                            .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
         263  +
                            .and_then(|mut deser| {
         264  +
                                crate::types::error::ProvisionedThroughputExceededException::deserialize_with_response(
         265  +
                                    &mut *deser,
         266  +
                                    response.headers(),
         267  +
                                    response.status().into(),
         268  +
                                    body,
         269  +
                                )
         270  +
                            }) {
         271  +
                            ::std::result::Result::Ok(val) => val,
         272  +
                            ::std::result::Result::Err(e) => {
         273  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         274  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         275  +
                                ))
         276  +
                            }
         277  +
                        };
         278  +
                        tmp.meta = generic;
         279  +
                        if tmp.message.is_none() {
         280  +
                            tmp.message = _error_message;
         281  +
                        }
         282  +
                        tmp
         283  +
                    })
         284  +
                }
         285  +
                "ReplicatedWriteConflictException" => crate::operation::batch_write_item::BatchWriteItemError::ReplicatedWriteConflictException({
         286  +
                    let mut tmp = match protocol
         287  +
                        .deserialize_response(response, crate::types::error::ReplicatedWriteConflictException::SCHEMA, _cfg)
         288  +
                        .and_then(|mut deser| {
         289  +
                            crate::types::error::ReplicatedWriteConflictException::deserialize_with_response(
         290  +
                                &mut *deser,
         291  +
                                response.headers(),
         292  +
                                response.status().into(),
         293  +
                                body,
         294  +
                            )
         295  +
                        }) {
         296  +
                        ::std::result::Result::Ok(val) => val,
         297  +
                        ::std::result::Result::Err(e) => {
         298  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         299  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         300  +
                            ))
         301  +
                        }
         302  +
                    };
         303  +
                    tmp.meta = generic;
         304  +
                    if tmp.message.is_none() {
         305  +
                        tmp.message = _error_message;
         306  +
                    }
         307  +
                    tmp
         308  +
                }),
         309  +
                "RequestLimitExceeded" => crate::operation::batch_write_item::BatchWriteItemError::RequestLimitExceeded({
         310  +
                    let mut tmp = match protocol
         311  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         312  +
                        .and_then(|mut deser| {
         313  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         314  +
                                &mut *deser,
         315  +
                                response.headers(),
         316  +
                                response.status().into(),
         317  +
                                body,
         318  +
                            )
         319  +
                        }) {
         320  +
                        ::std::result::Result::Ok(val) => val,
         321  +
                        ::std::result::Result::Err(e) => {
         322  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         323  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         324  +
                            ))
         325  +
                        }
         326  +
                    };
         327  +
                    tmp.meta = generic;
         328  +
                    if tmp.message.is_none() {
         329  +
                        tmp.message = _error_message;
         330  +
                    }
         331  +
                    tmp
         332  +
                }),
         333  +
                "ResourceNotFoundException" => crate::operation::batch_write_item::BatchWriteItemError::ResourceNotFoundException({
         334  +
                    let mut tmp = match protocol
         335  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         336  +
                        .and_then(|mut deser| {
         337  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         338  +
                                &mut *deser,
         339  +
                                response.headers(),
         340  +
                                response.status().into(),
         341  +
                                body,
         342  +
                            )
         343  +
                        }) {
         344  +
                        ::std::result::Result::Ok(val) => val,
         345  +
                        ::std::result::Result::Err(e) => {
         346  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         347  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         348  +
                            ))
         349  +
                        }
         350  +
                    };
         351  +
                    tmp.meta = generic;
         352  +
                    if tmp.message.is_none() {
         353  +
                        tmp.message = _error_message;
         354  +
                    }
         355  +
                    tmp
         356  +
                }),
         357  +
                "ThrottlingException" => crate::operation::batch_write_item::BatchWriteItemError::ThrottlingException({
         358  +
                    let mut tmp = match protocol
         359  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         360  +
                        .and_then(|mut deser| {
         361  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         362  +
                                &mut *deser,
         363  +
                                response.headers(),
         364  +
                                response.status().into(),
         365  +
                                body,
         366  +
                            )
         367  +
                        }) {
         368  +
                        ::std::result::Result::Ok(val) => val,
         369  +
                        ::std::result::Result::Err(e) => {
         370  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         371  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         372  +
                            ))
         373  +
                        }
         374  +
                    };
         375  +
                    tmp.meta = generic;
         376  +
                    if tmp.message.is_none() {
         377  +
                        tmp.message = _error_message;
         378  +
                    }
         379  +
                    tmp
         380  +
                }),
         381  +
                _ => crate::operation::batch_write_item::BatchWriteItemError::generic(generic),
         382  +
            };
         383  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         384  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         385  +
            ))
  160    386   
        } else {
  161         -
            crate::protocol_serde::shape_batch_write_item::de_batch_write_item_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         387  +
            let protocol = _cfg
         388  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         389  +
                .expect("a SharedClientProtocol is required");
         390  +
            let mut deser = protocol
         391  +
                .deserialize_response(response, BatchWriteItem::OUTPUT_SCHEMA, _cfg)
         392  +
                .map_err(|e| {
         393  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         394  +
                })?;
         395  +
            let body = response.body().bytes().expect("body loaded");
         396  +
            let output = crate::operation::batch_write_item::BatchWriteItemOutput::deserialize_with_response(
         397  +
                &mut *deser,
         398  +
                response.headers(),
         399  +
                response.status().into(),
         400  +
                body,
         401  +
            )
         402  +
            .map_err(|e| {
         403  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         404  +
            })?;
         405  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         406  +
        }
  164    407   
    }
  165    408   
}
  166    409   
#[derive(Debug)]
  167    410   
struct BatchWriteItemRequestSerializer;
  168    411   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchWriteItemRequestSerializer {
  169    412   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    413   
    fn serialize_input(
  171    414   
        &self,
  172    415   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    416   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    417   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    418   
        let input = input
  176    419   
            .downcast::<crate::operation::batch_write_item::BatchWriteItemInput>()
  177    420   
            .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::batch_write_item::BatchWriteItemInput,
  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::batch_write_item::BatchWriteItemInput,
  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.BatchWriteItem",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_write_item::ser_batch_write_item_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())
         421  +
        let protocol = _cfg
         422  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         423  +
            .expect("a SharedClientProtocol is required");
         424  +
        let mut request = protocol
         425  +
            .serialize_request(&input, BatchWriteItem::INPUT_SCHEMA, "", _cfg)
         426  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         427  +
         428  +
        return ::std::result::Result::Ok(request);
  216    429   
    }
  217    430   
}
  218    431   
#[derive(Debug)]
  219    432   
struct BatchWriteItemEndpointParamsInterceptor;
  220    433   
  221    434   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchWriteItemEndpointParamsInterceptor {
  222    435   
    fn name(&self) -> &'static str {
  223    436   
        "BatchWriteItemEndpointParamsInterceptor"
  224    437   
    }
  225    438   

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/batch_write_item/_batch_write_item_input.rs

@@ -60,60 +227,252 @@
   80     80   
    "com.amazonaws.dynamodb.synthetic",
   81     81   
    "BatchWriteItemInput",
   82     82   
);
   83     83   
static BATCHWRITEITEMINPUT_MEMBER_REQUEST_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemInput$RequestItems",
   86     86   
        "com.amazonaws.dynamodb.synthetic",
   87     87   
        "BatchWriteItemInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::Map,
   90         -
    "request_items",
          90  +
    "RequestItems",
   91     91   
    0,
   92     92   
);
   93     93   
static BATCHWRITEITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemInput$ReturnConsumedCapacity",
   96     96   
        "com.amazonaws.dynamodb.synthetic",
   97     97   
        "BatchWriteItemInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::String,
  100         -
    "return_consumed_capacity",
         100  +
    "ReturnConsumedCapacity",
  101    101   
    1,
  102    102   
);
  103    103   
static BATCHWRITEITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemInput$ReturnItemCollectionMetrics",
  106    106   
        "com.amazonaws.dynamodb.synthetic",
  107    107   
        "BatchWriteItemInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::String,
  110         -
    "return_item_collection_metrics",
         110  +
    "ReturnItemCollectionMetrics",
  111    111   
    2,
  112    112   
);
  113    113   
static BATCHWRITEITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  114    114   
    BATCHWRITEITEMINPUT_SCHEMA_ID,
  115    115   
    ::aws_smithy_schema::ShapeType::Structure,
  116    116   
    &[
  117    117   
        &BATCHWRITEITEMINPUT_MEMBER_REQUEST_ITEMS,
  118    118   
        &BATCHWRITEITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  119    119   
        &BATCHWRITEITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS,
  120    120   
    ],
  121    121   
);
  122    122   
impl BatchWriteItemInput {
  123    123   
    /// The schema for this shape.
  124    124   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &BATCHWRITEITEMINPUT_SCHEMA;
  125    125   
}
  126    126   
impl ::aws_smithy_schema::serde::SerializableStruct for BatchWriteItemInput {
  127    127   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  128    128   
    fn serialize_members(
  129    129   
        &self,
  130    130   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  131    131   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  132    132   
        if let Some(ref val) = self.request_items {
  133    133   
            ser.write_map(
  134    134   
                &BATCHWRITEITEMINPUT_MEMBER_REQUEST_ITEMS,
  135    135   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  136    136   
                    for (key, value) in val {
  137    137   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  138         -
                        todo!("schema: unsupported map value type");
         138  +
         139  +
                        ser.write_list(
         140  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         141  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         142  +
                                for item in value {
         143  +
                                    ser.write_struct(crate::types::WriteRequest::SCHEMA, item)?;
         144  +
                                }
         145  +
                                Ok(())
         146  +
                            },
         147  +
                        )?;
  139    148   
                    }
  140    149   
                    Ok(())
  141    150   
                },
  142    151   
            )?;
  143    152   
        }
  144    153   
        if let Some(ref val) = self.return_consumed_capacity {
  145    154   
            ser.write_string(&BATCHWRITEITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  146    155   
        }
  147    156   
        if let Some(ref val) = self.return_item_collection_metrics {
  148    157   
            ser.write_string(&BATCHWRITEITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS, val.as_str())?;
  149    158   
        }
  150    159   
        Ok(())
  151    160   
    }
  152    161   
}
  153    162   
impl BatchWriteItemInput {
  154    163   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  155         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  156         -
        deserializer: &mut D,
         164  +
    pub fn deserialize(
         165  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  157    166   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  158    167   
        #[allow(unused_variables, unused_mut)]
  159    168   
        let mut builder = Self::builder();
  160    169   
        #[allow(
  161    170   
            unused_variables,
  162    171   
            unreachable_code,
  163    172   
            clippy::single_match,
  164    173   
            clippy::match_single_binding,
  165    174   
            clippy::diverging_sub_expression
  166    175   
        )]
  167         -
        deserializer.read_struct(&BATCHWRITEITEMINPUT_SCHEMA, (), |_, member, deser| {
         176  +
        deserializer.read_struct(&BATCHWRITEITEMINPUT_SCHEMA, &mut |member, deser| {
  168    177   
            match member.member_index() {
  169    178   
                Some(0) => {
  170    179   
                    builder.request_items = Some({
  171         -
                        let container = if let Some(cap) = deser.container_size() {
  172         -
                            std::collections::HashMap::with_capacity(cap)
  173         -
                        } else {
  174         -
                            std::collections::HashMap::new()
  175         -
                        };
  176         -
                        deser.read_map(member, container, |mut map, key, deser| {
  177         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  178         -
                            Ok(map)
  179         -
                        })?
         180  +
                        let mut container = std::collections::HashMap::new();
         181  +
                        deser.read_map(member, &mut |key, deser| {
         182  +
                            container.insert(key, {
         183  +
                                let mut list = Vec::new();
         184  +
                                deser.read_list(member, &mut |deser| {
         185  +
                                    list.push(crate::types::WriteRequest::deserialize(deser)?);
         186  +
                                    Ok(())
         187  +
                                })?;
         188  +
                                list
         189  +
                            });
         190  +
                            Ok(())
         191  +
                        })?;
         192  +
                        container
  180    193   
                    });
  181    194   
                }
  182    195   
                Some(1) => {
  183    196   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  184    197   
                }
  185    198   
                Some(2) => {
  186    199   
                    builder.return_item_collection_metrics =
  187    200   
                        Some(crate::types::ReturnItemCollectionMetrics::from(deser.read_string(member)?.as_str()));
  188    201   
                }
  189    202   
                _ => {}
  190    203   
            }
  191    204   
            Ok(())
  192    205   
        })?;
         206  +
        builder.request_items = builder.request_items.or(Some(::std::collections::HashMap::new()));
  193    207   
        builder
  194    208   
            .build()
  195    209   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  196    210   
    }
  197    211   
}
         212  +
impl BatchWriteItemInput {
         213  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         214  +
    pub fn deserialize_with_response(
         215  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         216  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         217  +
        _status: u16,
         218  +
        _body: &[u8],
         219  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         220  +
        Self::deserialize(deserializer)
         221  +
    }
         222  +
}
  198    223   
impl BatchWriteItemInput {
  199    224   
    /// Creates a new builder-style object to manufacture [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
  200    225   
    pub fn builder() -> crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder {
  201    226   
        crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder::default()
  202    227   
    }
  203    228   
}
  204    229   
  205    230   
/// A builder for [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
  206    231   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  207    232   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/batch_write_item/_batch_write_item_output.rs

@@ -82,82 +274,383 @@
  102    102   
    "com.amazonaws.dynamodb.synthetic",
  103    103   
    "BatchWriteItemOutput",
  104    104   
);
  105    105   
static BATCHWRITEITEMOUTPUT_MEMBER_UNPROCESSED_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemOutput$UnprocessedItems",
  108    108   
        "com.amazonaws.dynamodb.synthetic",
  109    109   
        "BatchWriteItemOutput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::Map,
  112         -
    "unprocessed_items",
         112  +
    "UnprocessedItems",
  113    113   
    0,
  114    114   
);
  115    115   
static BATCHWRITEITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemOutput$ItemCollectionMetrics",
  118    118   
        "com.amazonaws.dynamodb.synthetic",
  119    119   
        "BatchWriteItemOutput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::Map,
  122         -
    "item_collection_metrics",
         122  +
    "ItemCollectionMetrics",
  123    123   
    1,
  124    124   
);
  125    125   
static BATCHWRITEITEMOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "com.amazonaws.dynamodb.synthetic#BatchWriteItemOutput$ConsumedCapacity",
  128    128   
        "com.amazonaws.dynamodb.synthetic",
  129    129   
        "BatchWriteItemOutput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::List,
  132         -
    "consumed_capacity",
         132  +
    "ConsumedCapacity",
  133    133   
    2,
  134    134   
);
         135  +
static BATCHWRITEITEMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         136  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         137  +
    ::aws_smithy_schema::ShapeType::String,
         138  +
    "request_id",
         139  +
    3,
         140  +
)
         141  +
.with_http_header("x-amzn-requestid");
  135    142   
static BATCHWRITEITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  136    143   
    BATCHWRITEITEMOUTPUT_SCHEMA_ID,
  137    144   
    ::aws_smithy_schema::ShapeType::Structure,
  138    145   
    &[
  139    146   
        &BATCHWRITEITEMOUTPUT_MEMBER_UNPROCESSED_ITEMS,
  140    147   
        &BATCHWRITEITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
  141    148   
        &BATCHWRITEITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
         149  +
        &BATCHWRITEITEMOUTPUT_MEMBER__REQUEST_ID,
  142    150   
    ],
  143    151   
);
  144    152   
impl BatchWriteItemOutput {
  145    153   
    /// The schema for this shape.
  146    154   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &BATCHWRITEITEMOUTPUT_SCHEMA;
  147    155   
}
  148    156   
impl ::aws_smithy_schema::serde::SerializableStruct for BatchWriteItemOutput {
  149    157   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  150    158   
    fn serialize_members(
  151    159   
        &self,
  152    160   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  153    161   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  154    162   
        if let Some(ref val) = self.unprocessed_items {
  155    163   
            ser.write_map(
  156    164   
                &BATCHWRITEITEMOUTPUT_MEMBER_UNPROCESSED_ITEMS,
  157    165   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  158    166   
                    for (key, value) in val {
  159    167   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  160         -
                        todo!("schema: unsupported map value type");
         168  +
         169  +
                        ser.write_list(
         170  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         171  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         172  +
                                for item in value {
         173  +
                                    ser.write_struct(crate::types::WriteRequest::SCHEMA, item)?;
         174  +
                                }
         175  +
                                Ok(())
         176  +
                            },
         177  +
                        )?;
  161    178   
                    }
  162    179   
                    Ok(())
  163    180   
                },
  164    181   
            )?;
  165    182   
        }
  166    183   
        if let Some(ref val) = self.item_collection_metrics {
  167    184   
            ser.write_map(
  168    185   
                &BATCHWRITEITEMOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
  169    186   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  170    187   
                    for (key, value) in val {
  171    188   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  172         -
                        todo!("schema: unsupported map value type");
         189  +
         190  +
                        ser.write_list(
         191  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         192  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         193  +
                                for item in value {
         194  +
                                    ser.write_struct(crate::types::ItemCollectionMetrics::SCHEMA, item)?;
         195  +
                                }
         196  +
                                Ok(())
         197  +
                            },
         198  +
                        )?;
  173    199   
                    }
  174    200   
                    Ok(())
  175    201   
                },
  176    202   
            )?;
  177    203   
        }
  178    204   
        if let Some(ref val) = self.consumed_capacity {
  179    205   
            ser.write_list(
  180    206   
                &BATCHWRITEITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
  181    207   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  182    208   
                    for item in val {
  183    209   
                        ser.write_struct(crate::types::ConsumedCapacity::SCHEMA, item)?;
  184    210   
                    }
  185    211   
                    Ok(())
  186    212   
                },
  187    213   
            )?;
  188    214   
        }
  189    215   
        Ok(())
  190    216   
    }
  191    217   
}
  192    218   
impl BatchWriteItemOutput {
  193    219   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  194         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  195         -
        deserializer: &mut D,
         220  +
    pub fn deserialize(
         221  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  196    222   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  197    223   
        #[allow(unused_variables, unused_mut)]
  198    224   
        let mut builder = Self::builder();
  199    225   
        #[allow(
  200    226   
            unused_variables,
  201    227   
            unreachable_code,
  202    228   
            clippy::single_match,
  203    229   
            clippy::match_single_binding,
  204    230   
            clippy::diverging_sub_expression
  205    231   
        )]
  206         -
        deserializer.read_struct(&BATCHWRITEITEMOUTPUT_SCHEMA, (), |_, member, deser| {
         232  +
        deserializer.read_struct(&BATCHWRITEITEMOUTPUT_SCHEMA, &mut |member, deser| {
         233  +
            match member.member_index() {
         234  +
                Some(0) => {
         235  +
                    builder.unprocessed_items = Some({
         236  +
                        let mut container = std::collections::HashMap::new();
         237  +
                        deser.read_map(member, &mut |key, deser| {
         238  +
                            container.insert(key, {
         239  +
                                let mut list = Vec::new();
         240  +
                                deser.read_list(member, &mut |deser| {
         241  +
                                    list.push(crate::types::WriteRequest::deserialize(deser)?);
         242  +
                                    Ok(())
         243  +
                                })?;
         244  +
                                list
         245  +
                            });
         246  +
                            Ok(())
         247  +
                        })?;
         248  +
                        container
         249  +
                    });
         250  +
                }
         251  +
                Some(1) => {
         252  +
                    builder.item_collection_metrics = Some({
         253  +
                        let mut container = std::collections::HashMap::new();
         254  +
                        deser.read_map(member, &mut |key, deser| {
         255  +
                            container.insert(key, {
         256  +
                                let mut list = Vec::new();
         257  +
                                deser.read_list(member, &mut |deser| {
         258  +
                                    list.push(crate::types::ItemCollectionMetrics::deserialize(deser)?);
         259  +
                                    Ok(())
         260  +
                                })?;
         261  +
                                list
         262  +
                            });
         263  +
                            Ok(())
         264  +
                        })?;
         265  +
                        container
         266  +
                    });
         267  +
                }
         268  +
                Some(2) => {
         269  +
                    builder.consumed_capacity = Some({
         270  +
                        let mut container = Vec::new();
         271  +
                        deser.read_list(member, &mut |deser| {
         272  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         273  +
                            Ok(())
         274  +
                        })?;
         275  +
                        container
         276  +
                    });
         277  +
                }
         278  +
                Some(3) => {
         279  +
                    builder._request_id = Some(deser.read_string(member)?);
         280  +
                }
         281  +
                _ => {}
         282  +
            }
         283  +
            Ok(())
         284  +
        })?;
         285  +
        Ok(builder.build())
         286  +
    }
         287  +
}
         288  +
impl BatchWriteItemOutput {
         289  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         290  +
    /// Header-bound members are read directly from headers, avoiding runtime
         291  +
    /// member iteration overhead. Body members are read via the deserializer.
         292  +
    pub fn deserialize_with_response(
         293  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         294  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         295  +
        _status: u16,
         296  +
        _body: &[u8],
         297  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         298  +
        #[allow(unused_variables, unused_mut)]
         299  +
        let mut builder = Self::builder();
         300  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         301  +
            builder._request_id = Some(val.to_string());
         302  +
        }
         303  +
        #[allow(
         304  +
            unused_variables,
         305  +
            unreachable_code,
         306  +
            clippy::single_match,
         307  +
            clippy::match_single_binding,
         308  +
            clippy::diverging_sub_expression
         309  +
        )]
         310  +
        deserializer.read_struct(&BATCHWRITEITEMOUTPUT_SCHEMA, &mut |member, deser| {
  207    311   
            match member.member_index() {
  208    312   
                Some(0) => {
  209    313   
                    builder.unprocessed_items = Some({
  210         -
                        let container = if let Some(cap) = deser.container_size() {
  211         -
                            std::collections::HashMap::with_capacity(cap)
  212         -
                        } else {
  213         -
                            std::collections::HashMap::new()
  214         -
                        };
  215         -
                        deser.read_map(member, container, |mut map, key, deser| {
  216         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  217         -
                            Ok(map)
  218         -
                        })?
         314  +
                        let mut container = std::collections::HashMap::new();
         315  +
                        deser.read_map(member, &mut |key, deser| {
         316  +
                            container.insert(key, {
         317  +
                                let mut list = Vec::new();
         318  +
                                deser.read_list(member, &mut |deser| {
         319  +
                                    list.push(crate::types::WriteRequest::deserialize(deser)?);
         320  +
                                    Ok(())
         321  +
                                })?;
         322  +
                                list
         323  +
                            });
         324  +
                            Ok(())
         325  +
                        })?;
         326  +
                        container
  219    327   
                    });
  220    328   
                }
  221    329   
                Some(1) => {
  222    330   
                    builder.item_collection_metrics = Some({
  223         -
                        let container = if let Some(cap) = deser.container_size() {
  224         -
                            std::collections::HashMap::with_capacity(cap)
  225         -
                        } else {
  226         -
                            std::collections::HashMap::new()
  227         -
                        };
  228         -
                        deser.read_map(member, container, |mut map, key, deser| {
  229         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  230         -
                            Ok(map)
  231         -
                        })?
         331  +
                        let mut container = std::collections::HashMap::new();
         332  +
                        deser.read_map(member, &mut |key, deser| {
         333  +
                            container.insert(key, {
         334  +
                                let mut list = Vec::new();
         335  +
                                deser.read_list(member, &mut |deser| {
         336  +
                                    list.push(crate::types::ItemCollectionMetrics::deserialize(deser)?);
         337  +
                                    Ok(())
         338  +
                                })?;
         339  +
                                list
         340  +
                            });
         341  +
                            Ok(())
         342  +
                        })?;
         343  +
                        container
  232    344   
                    });
  233    345   
                }
  234    346   
                Some(2) => {
  235    347   
                    builder.consumed_capacity = Some({
  236         -
                        let container = if let Some(cap) = deser.container_size() {
  237         -
                            Vec::with_capacity(cap)
  238         -
                        } else {
  239         -
                            Vec::new()
  240         -
                        };
  241         -
                        deser.read_list(member, container, |mut list, deser| {
  242         -
                            list.push(crate::types::ConsumedCapacity::deserialize(deser)?);
  243         -
                            Ok(list)
  244         -
                        })?
         348  +
                        let mut container = Vec::new();
         349  +
                        deser.read_list(member, &mut |deser| {
         350  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         351  +
                            Ok(())
         352  +
                        })?;
         353  +
                        container
  245    354   
                    });
  246    355   
                }
  247    356   
                _ => {}
  248    357   
            }
  249    358   
            Ok(())
  250    359   
        })?;
  251    360   
        Ok(builder.build())
  252    361   
    }
  253    362   
}
  254    363   
impl ::aws_types::request_id::RequestId for BatchWriteItemOutput {