AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_global_table_settings/_update_global_table_settings_output.rs

@@ -6,6 +143,195 @@
   26     26   
    "com.amazonaws.dynamodb.synthetic",
   27     27   
    "UpdateGlobalTableSettingsOutput",
   28     28   
);
   29     29   
static UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_GLOBAL_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsOutput$GlobalTableName",
   32     32   
        "com.amazonaws.dynamodb.synthetic",
   33     33   
        "UpdateGlobalTableSettingsOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::String,
   36         -
    "global_table_name",
          36  +
    "GlobalTableName",
   37     37   
    0,
   38     38   
);
   39     39   
static UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsOutput$ReplicaSettings",
   42     42   
        "com.amazonaws.dynamodb.synthetic",
   43     43   
        "UpdateGlobalTableSettingsOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46         -
    "replica_settings",
          46  +
    "ReplicaSettings",
   47     47   
    1,
   48     48   
);
          49  +
static UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_GLOBAL_TABLE_NAME,
   54     61   
        &UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS,
          62  +
        &UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl UpdateGlobalTableSettingsOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateGlobalTableSettingsOutput {
   62     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     71   
    fn serialize_members(
   64     72   
        &self,
   65     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     75   
        if let Some(ref val) = self.global_table_name {
   68     76   
            ser.write_string(&UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_GLOBAL_TABLE_NAME, val)?;
   69     77   
        }
   70     78   
        if let Some(ref val) = self.replica_settings {
   71     79   
            ser.write_list(
   72     80   
                &UPDATEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS,
   73     81   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   74     82   
                    for item in val {
   75     83   
                        ser.write_struct(crate::types::ReplicaSettingsDescription::SCHEMA, item)?;
   76     84   
                    }
   77     85   
                    Ok(())
   78     86   
                },
   79     87   
            )?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl UpdateGlobalTableSettingsOutput {
   85     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   86         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   87         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   88     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   89     97   
        #[allow(unused_variables, unused_mut)]
   90     98   
        let mut builder = Self::builder();
   91     99   
        #[allow(
   92    100   
            unused_variables,
   93    101   
            unreachable_code,
   94    102   
            clippy::single_match,
   95    103   
            clippy::match_single_binding,
   96    104   
            clippy::diverging_sub_expression
   97    105   
        )]
   98         -
        deserializer.read_struct(&UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA, &mut |member, deser| {
         107  +
            match member.member_index() {
         108  +
                Some(0) => {
         109  +
                    builder.global_table_name = Some(deser.read_string(member)?);
         110  +
                }
         111  +
                Some(1) => {
         112  +
                    builder.replica_settings = Some({
         113  +
                        let mut container = Vec::new();
         114  +
                        deser.read_list(member, &mut |deser| {
         115  +
                            container.push(crate::types::ReplicaSettingsDescription::deserialize(deser)?);
         116  +
                            Ok(())
         117  +
                        })?;
         118  +
                        container
         119  +
                    });
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl UpdateGlobalTableSettingsOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&UPDATEGLOBALTABLESETTINGSOUTPUT_SCHEMA, &mut |member, deser| {
   99    154   
            match member.member_index() {
  100    155   
                Some(0) => {
  101    156   
                    builder.global_table_name = Some(deser.read_string(member)?);
  102    157   
                }
  103    158   
                Some(1) => {
  104    159   
                    builder.replica_settings = Some({
  105         -
                        let container = if let Some(cap) = deser.container_size() {
  106         -
                            Vec::with_capacity(cap)
  107         -
                        } else {
  108         -
                            Vec::new()
  109         -
                        };
  110         -
                        deser.read_list(member, container, |mut list, deser| {
  111         -
                            list.push(crate::types::ReplicaSettingsDescription::deserialize(deser)?);
  112         -
                            Ok(list)
  113         -
                        })?
         160  +
                        let mut container = Vec::new();
         161  +
                        deser.read_list(member, &mut |deser| {
         162  +
                            container.push(crate::types::ReplicaSettingsDescription::deserialize(deser)?);
         163  +
                            Ok(())
         164  +
                        })?;
         165  +
                        container
  114    166   
                    });
  115    167   
                }
  116    168   
                _ => {}
  117    169   
            }
  118    170   
            Ok(())
  119    171   
        })?;
  120    172   
        Ok(builder.build())
  121    173   
    }
  122    174   
}
  123    175   
impl ::aws_types::request_id::RequestId for UpdateGlobalTableSettingsOutput {

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_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 `UpdateItem`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateItem;
    6      6   
impl UpdateItem {
    7      7   
    /// Creates a new `UpdateItem`
    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::update_item::UpdateItemInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_item::UpdateItemOutput::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::update_item::UpdateItemInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_item::UpdateItemOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_item::UpdateItemError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,495 @@
  135    139   
                crate::operation::update_item::UpdateItemError,
  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 UpdateItemResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateItemResponseDeserializer {
  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_update_item::de_update_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::update_item::UpdateItemError::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  +
                "ConditionalCheckFailedException" => crate::operation::update_item::UpdateItemError::ConditionalCheckFailedException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::ConditionalCheckFailedException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::ConditionalCheckFailedException::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  +
                "InternalServerError" => crate::operation::update_item::UpdateItemError::InternalServerError({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::update_item::UpdateItemError::InvalidEndpointException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "ItemCollectionSizeLimitExceededException" => {
         253  +
                    crate::operation::update_item::UpdateItemError::ItemCollectionSizeLimitExceededException({
         254  +
                        let mut tmp = match protocol
         255  +
                            .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededException::SCHEMA, _cfg)
         256  +
                            .and_then(|mut deser| {
         257  +
                                crate::types::error::ItemCollectionSizeLimitExceededException::deserialize_with_response(
         258  +
                                    &mut *deser,
         259  +
                                    response.headers(),
         260  +
                                    response.status().into(),
         261  +
                                    body,
         262  +
                                )
         263  +
                            }) {
         264  +
                            ::std::result::Result::Ok(val) => val,
         265  +
                            ::std::result::Result::Err(e) => {
         266  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         267  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         268  +
                                ))
         269  +
                            }
         270  +
                        };
         271  +
                        tmp.meta = generic;
         272  +
                        if tmp.message.is_none() {
         273  +
                            tmp.message = _error_message;
         274  +
                        }
         275  +
                        tmp
         276  +
                    })
         277  +
                }
         278  +
                "ProvisionedThroughputExceededException" => crate::operation::update_item::UpdateItemError::ProvisionedThroughputExceededException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::ProvisionedThroughputExceededException::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  +
                "ReplicatedWriteConflictException" => crate::operation::update_item::UpdateItemError::ReplicatedWriteConflictException({
         303  +
                    let mut tmp = match protocol
         304  +
                        .deserialize_response(response, crate::types::error::ReplicatedWriteConflictException::SCHEMA, _cfg)
         305  +
                        .and_then(|mut deser| {
         306  +
                            crate::types::error::ReplicatedWriteConflictException::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  +
                "RequestLimitExceeded" => crate::operation::update_item::UpdateItemError::RequestLimitExceeded({
         327  +
                    let mut tmp = match protocol
         328  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         329  +
                        .and_then(|mut deser| {
         330  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         331  +
                                &mut *deser,
         332  +
                                response.headers(),
         333  +
                                response.status().into(),
         334  +
                                body,
         335  +
                            )
         336  +
                        }) {
         337  +
                        ::std::result::Result::Ok(val) => val,
         338  +
                        ::std::result::Result::Err(e) => {
         339  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         340  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         341  +
                            ))
         342  +
                        }
         343  +
                    };
         344  +
                    tmp.meta = generic;
         345  +
                    if tmp.message.is_none() {
         346  +
                        tmp.message = _error_message;
         347  +
                    }
         348  +
                    tmp
         349  +
                }),
         350  +
                "ResourceNotFoundException" => crate::operation::update_item::UpdateItemError::ResourceNotFoundException({
         351  +
                    let mut tmp = match protocol
         352  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         353  +
                        .and_then(|mut deser| {
         354  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         355  +
                                &mut *deser,
         356  +
                                response.headers(),
         357  +
                                response.status().into(),
         358  +
                                body,
         359  +
                            )
         360  +
                        }) {
         361  +
                        ::std::result::Result::Ok(val) => val,
         362  +
                        ::std::result::Result::Err(e) => {
         363  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         364  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         365  +
                            ))
         366  +
                        }
         367  +
                    };
         368  +
                    tmp.meta = generic;
         369  +
                    if tmp.message.is_none() {
         370  +
                        tmp.message = _error_message;
         371  +
                    }
         372  +
                    tmp
         373  +
                }),
         374  +
                "ThrottlingException" => crate::operation::update_item::UpdateItemError::ThrottlingException({
         375  +
                    let mut tmp = match protocol
         376  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         377  +
                        .and_then(|mut deser| {
         378  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         379  +
                                &mut *deser,
         380  +
                                response.headers(),
         381  +
                                response.status().into(),
         382  +
                                body,
         383  +
                            )
         384  +
                        }) {
         385  +
                        ::std::result::Result::Ok(val) => val,
         386  +
                        ::std::result::Result::Err(e) => {
         387  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         388  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         389  +
                            ))
         390  +
                        }
         391  +
                    };
         392  +
                    tmp.meta = generic;
         393  +
                    if tmp.message.is_none() {
         394  +
                        tmp.message = _error_message;
         395  +
                    }
         396  +
                    tmp
         397  +
                }),
         398  +
                "TransactionConflictException" => crate::operation::update_item::UpdateItemError::TransactionConflictException({
         399  +
                    let mut tmp = match protocol
         400  +
                        .deserialize_response(response, crate::types::error::TransactionConflictException::SCHEMA, _cfg)
         401  +
                        .and_then(|mut deser| {
         402  +
                            crate::types::error::TransactionConflictException::deserialize_with_response(
         403  +
                                &mut *deser,
         404  +
                                response.headers(),
         405  +
                                response.status().into(),
         406  +
                                body,
         407  +
                            )
         408  +
                        }) {
         409  +
                        ::std::result::Result::Ok(val) => val,
         410  +
                        ::std::result::Result::Err(e) => {
         411  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         412  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         413  +
                            ))
         414  +
                        }
         415  +
                    };
         416  +
                    tmp.meta = generic;
         417  +
                    if tmp.message.is_none() {
         418  +
                        tmp.message = _error_message;
         419  +
                    }
         420  +
                    tmp
         421  +
                }),
         422  +
                _ => crate::operation::update_item::UpdateItemError::generic(generic),
         423  +
            };
         424  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         425  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         426  +
            ))
  157    427   
        } else {
  158         -
            crate::protocol_serde::shape_update_item::de_update_item_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         428  +
            let protocol = _cfg
         429  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         430  +
                .expect("a SharedClientProtocol is required");
         431  +
            let mut deser = protocol.deserialize_response(response, UpdateItem::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         432  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         433  +
            })?;
         434  +
            let body = response.body().bytes().expect("body loaded");
         435  +
            let output = crate::operation::update_item::UpdateItemOutput::deserialize_with_response(
         436  +
                &mut *deser,
         437  +
                response.headers(),
         438  +
                response.status().into(),
         439  +
                body,
         440  +
            )
         441  +
            .map_err(|e| {
         442  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         443  +
            })?;
         444  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         445  +
        }
  161    446   
    }
  162    447   
}
  163    448   
#[derive(Debug)]
  164    449   
struct UpdateItemRequestSerializer;
  165    450   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateItemRequestSerializer {
  166    451   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    452   
    fn serialize_input(
  168    453   
        &self,
  169    454   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    455   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    456   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    457   
        let input = input.downcast::<crate::operation::update_item::UpdateItemInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::update_item::UpdateItemInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                ::std::write!(output, "/").expect("formatting should succeed");
  185         -
                ::std::result::Result::Ok(())
  186         -
            }
  187         -
            #[allow(clippy::unnecessary_wraps)]
  188         -
            fn update_http_builder(
  189         -
                input: &crate::operation::update_item::UpdateItemInput,
  190         -
                builder: ::http_1x::request::Builder,
  191         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192         -
                let mut uri = ::std::string::String::new();
  193         -
                uri_base(input, &mut uri)?;
  194         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195         -
            }
  196         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  198         -
            builder = _header_serialization_settings.set_default_header(
  199         -
                builder,
  200         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  201         -
                "DynamoDB_20120810.UpdateItem",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_item::ser_update_item_input(&input)?);
  206         -
        if let Some(content_length) = body.content_length() {
  207         -
            let content_length = content_length.to_string();
  208         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  209         -
        }
  210         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         458  +
        let protocol = _cfg
         459  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         460  +
            .expect("a SharedClientProtocol is required");
         461  +
        let mut request = protocol
         462  +
            .serialize_request(&input, UpdateItem::INPUT_SCHEMA, "", _cfg)
         463  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         464  +
         465  +
        return ::std::result::Result::Ok(request);
  211    466   
    }
  212    467   
}
  213    468   
#[derive(Debug)]
  214    469   
struct UpdateItemEndpointParamsInterceptor;
  215    470   
  216    471   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateItemEndpointParamsInterceptor {
  217    472   
    fn name(&self) -> &'static str {
  218    473   
        "UpdateItemEndpointParamsInterceptor"
  219    474   
    }
  220    475   

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_item/_update_item_input.rs

@@ -284,284 +505,505 @@
  304    304   
    "com.amazonaws.dynamodb.synthetic",
  305    305   
    "UpdateItemInput",
  306    306   
);
  307    307   
static UPDATEITEMINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  308    308   
    ::aws_smithy_schema::ShapeId::from_static(
  309    309   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$TableName",
  310    310   
        "com.amazonaws.dynamodb.synthetic",
  311    311   
        "UpdateItemInput",
  312    312   
    ),
  313    313   
    ::aws_smithy_schema::ShapeType::String,
  314         -
    "table_name",
         314  +
    "TableName",
  315    315   
    0,
  316    316   
);
  317    317   
static UPDATEITEMINPUT_MEMBER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  318    318   
    ::aws_smithy_schema::ShapeId::from_static(
  319    319   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$Key",
  320    320   
        "com.amazonaws.dynamodb.synthetic",
  321    321   
        "UpdateItemInput",
  322    322   
    ),
  323    323   
    ::aws_smithy_schema::ShapeType::Map,
  324         -
    "key",
         324  +
    "Key",
  325    325   
    1,
  326    326   
);
  327    327   
static UPDATEITEMINPUT_MEMBER_ATTRIBUTE_UPDATES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  328    328   
    ::aws_smithy_schema::ShapeId::from_static(
  329    329   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$AttributeUpdates",
  330    330   
        "com.amazonaws.dynamodb.synthetic",
  331    331   
        "UpdateItemInput",
  332    332   
    ),
  333    333   
    ::aws_smithy_schema::ShapeType::Map,
  334         -
    "attribute_updates",
         334  +
    "AttributeUpdates",
  335    335   
    2,
  336    336   
);
  337    337   
static UPDATEITEMINPUT_MEMBER_EXPECTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  338    338   
    ::aws_smithy_schema::ShapeId::from_static(
  339    339   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$Expected",
  340    340   
        "com.amazonaws.dynamodb.synthetic",
  341    341   
        "UpdateItemInput",
  342    342   
    ),
  343    343   
    ::aws_smithy_schema::ShapeType::Map,
  344         -
    "expected",
         344  +
    "Expected",
  345    345   
    3,
  346    346   
);
  347    347   
static UPDATEITEMINPUT_MEMBER_CONDITIONAL_OPERATOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  348    348   
    ::aws_smithy_schema::ShapeId::from_static(
  349    349   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ConditionalOperator",
  350    350   
        "com.amazonaws.dynamodb.synthetic",
  351    351   
        "UpdateItemInput",
  352    352   
    ),
  353    353   
    ::aws_smithy_schema::ShapeType::String,
  354         -
    "conditional_operator",
         354  +
    "ConditionalOperator",
  355    355   
    4,
  356    356   
);
  357    357   
static UPDATEITEMINPUT_MEMBER_RETURN_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  358    358   
    ::aws_smithy_schema::ShapeId::from_static(
  359    359   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ReturnValues",
  360    360   
        "com.amazonaws.dynamodb.synthetic",
  361    361   
        "UpdateItemInput",
  362    362   
    ),
  363    363   
    ::aws_smithy_schema::ShapeType::String,
  364         -
    "return_values",
         364  +
    "ReturnValues",
  365    365   
    5,
  366    366   
);
  367    367   
static UPDATEITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  368    368   
    ::aws_smithy_schema::ShapeId::from_static(
  369    369   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ReturnConsumedCapacity",
  370    370   
        "com.amazonaws.dynamodb.synthetic",
  371    371   
        "UpdateItemInput",
  372    372   
    ),
  373    373   
    ::aws_smithy_schema::ShapeType::String,
  374         -
    "return_consumed_capacity",
         374  +
    "ReturnConsumedCapacity",
  375    375   
    6,
  376    376   
);
  377    377   
static UPDATEITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  378    378   
    ::aws_smithy_schema::ShapeId::from_static(
  379    379   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ReturnItemCollectionMetrics",
  380    380   
        "com.amazonaws.dynamodb.synthetic",
  381    381   
        "UpdateItemInput",
  382    382   
    ),
  383    383   
    ::aws_smithy_schema::ShapeType::String,
  384         -
    "return_item_collection_metrics",
         384  +
    "ReturnItemCollectionMetrics",
  385    385   
    7,
  386    386   
);
  387    387   
static UPDATEITEMINPUT_MEMBER_UPDATE_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  388    388   
    ::aws_smithy_schema::ShapeId::from_static(
  389    389   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$UpdateExpression",
  390    390   
        "com.amazonaws.dynamodb.synthetic",
  391    391   
        "UpdateItemInput",
  392    392   
    ),
  393    393   
    ::aws_smithy_schema::ShapeType::String,
  394         -
    "update_expression",
         394  +
    "UpdateExpression",
  395    395   
    8,
  396    396   
);
  397    397   
static UPDATEITEMINPUT_MEMBER_CONDITION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  398    398   
    ::aws_smithy_schema::ShapeId::from_static(
  399    399   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ConditionExpression",
  400    400   
        "com.amazonaws.dynamodb.synthetic",
  401    401   
        "UpdateItemInput",
  402    402   
    ),
  403    403   
    ::aws_smithy_schema::ShapeType::String,
  404         -
    "condition_expression",
         404  +
    "ConditionExpression",
  405    405   
    9,
  406    406   
);
  407    407   
static UPDATEITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  408    408   
    ::aws_smithy_schema::ShapeId::from_static(
  409    409   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ExpressionAttributeNames",
  410    410   
        "com.amazonaws.dynamodb.synthetic",
  411    411   
        "UpdateItemInput",
  412    412   
    ),
  413    413   
    ::aws_smithy_schema::ShapeType::Map,
  414         -
    "expression_attribute_names",
         414  +
    "ExpressionAttributeNames",
  415    415   
    10,
  416    416   
);
  417    417   
static UPDATEITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  418    418   
    ::aws_smithy_schema::ShapeId::from_static(
  419    419   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ExpressionAttributeValues",
  420    420   
        "com.amazonaws.dynamodb.synthetic",
  421    421   
        "UpdateItemInput",
  422    422   
    ),
  423    423   
    ::aws_smithy_schema::ShapeType::Map,
  424         -
    "expression_attribute_values",
         424  +
    "ExpressionAttributeValues",
  425    425   
    11,
  426    426   
);
  427    427   
static UPDATEITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  428    428   
    ::aws_smithy_schema::ShapeId::from_static(
  429    429   
        "com.amazonaws.dynamodb.synthetic#UpdateItemInput$ReturnValuesOnConditionCheckFailure",
  430    430   
        "com.amazonaws.dynamodb.synthetic",
  431    431   
        "UpdateItemInput",
  432    432   
    ),
  433    433   
    ::aws_smithy_schema::ShapeType::String,
  434         -
    "return_values_on_condition_check_failure",
         434  +
    "ReturnValuesOnConditionCheckFailure",
  435    435   
    12,
  436    436   
);
  437    437   
static UPDATEITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  438    438   
    UPDATEITEMINPUT_SCHEMA_ID,
  439    439   
    ::aws_smithy_schema::ShapeType::Structure,
  440    440   
    &[
  441    441   
        &UPDATEITEMINPUT_MEMBER_TABLE_NAME,
  442    442   
        &UPDATEITEMINPUT_MEMBER_KEY,
  443    443   
        &UPDATEITEMINPUT_MEMBER_ATTRIBUTE_UPDATES,
  444    444   
        &UPDATEITEMINPUT_MEMBER_EXPECTED,
  445    445   
        &UPDATEITEMINPUT_MEMBER_CONDITIONAL_OPERATOR,
  446    446   
        &UPDATEITEMINPUT_MEMBER_RETURN_VALUES,
  447    447   
        &UPDATEITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  448    448   
        &UPDATEITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS,
  449    449   
        &UPDATEITEMINPUT_MEMBER_UPDATE_EXPRESSION,
  450    450   
        &UPDATEITEMINPUT_MEMBER_CONDITION_EXPRESSION,
  451    451   
        &UPDATEITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  452    452   
        &UPDATEITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES,
  453    453   
        &UPDATEITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE,
  454    454   
    ],
  455    455   
);
  456    456   
impl UpdateItemInput {
  457    457   
    /// The schema for this shape.
  458    458   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEITEMINPUT_SCHEMA;
  459    459   
}
  460    460   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateItemInput {
  461    461   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  462    462   
    fn serialize_members(
  463    463   
        &self,
  464    464   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  465    465   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  466    466   
        if let Some(ref val) = self.table_name {
  467    467   
            ser.write_string(&UPDATEITEMINPUT_MEMBER_TABLE_NAME, val)?;
  468    468   
        }
  469    469   
        if let Some(ref val) = self.key {
  470    470   
            ser.write_map(
  471    471   
                &UPDATEITEMINPUT_MEMBER_KEY,
  472    472   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  473    473   
                    for (key, value) in val {
  474    474   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  475         -
                        todo!("schema: unsupported map value type");
         475  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  476    476   
                    }
  477    477   
                    Ok(())
  478    478   
                },
  479    479   
            )?;
  480    480   
        }
  481    481   
        if let Some(ref val) = self.attribute_updates {
  482    482   
            ser.write_map(
  483    483   
                &UPDATEITEMINPUT_MEMBER_ATTRIBUTE_UPDATES,
  484    484   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  485    485   
                    for (key, value) in val {
@@ -511,511 +699,690 @@
  531    531   
                    Ok(())
  532    532   
                },
  533    533   
            )?;
  534    534   
        }
  535    535   
        if let Some(ref val) = self.expression_attribute_values {
  536    536   
            ser.write_map(
  537    537   
                &UPDATEITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES,
  538    538   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  539    539   
                    for (key, value) in val {
  540    540   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  541         -
                        todo!("schema: unsupported map value type");
         541  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  542    542   
                    }
  543    543   
                    Ok(())
  544    544   
                },
  545    545   
            )?;
  546    546   
        }
  547    547   
        if let Some(ref val) = self.return_values_on_condition_check_failure {
  548    548   
            ser.write_string(&UPDATEITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE, val.as_str())?;
  549    549   
        }
  550    550   
        Ok(())
  551    551   
    }
  552    552   
}
  553    553   
impl UpdateItemInput {
  554    554   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  555         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  556         -
        deserializer: &mut D,
         555  +
    pub fn deserialize(
         556  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  557    557   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  558    558   
        #[allow(unused_variables, unused_mut)]
  559    559   
        let mut builder = Self::builder();
  560    560   
        #[allow(
  561    561   
            unused_variables,
  562    562   
            unreachable_code,
  563    563   
            clippy::single_match,
  564    564   
            clippy::match_single_binding,
  565    565   
            clippy::diverging_sub_expression
  566    566   
        )]
  567         -
        deserializer.read_struct(&UPDATEITEMINPUT_SCHEMA, (), |_, member, deser| {
         567  +
        deserializer.read_struct(&UPDATEITEMINPUT_SCHEMA, &mut |member, deser| {
  568    568   
            match member.member_index() {
  569    569   
                Some(0) => {
  570    570   
                    builder.table_name = Some(deser.read_string(member)?);
  571    571   
                }
  572    572   
                Some(1) => {
  573    573   
                    builder.key = Some({
  574         -
                        let container = if let Some(cap) = deser.container_size() {
  575         -
                            std::collections::HashMap::with_capacity(cap)
  576         -
                        } else {
  577         -
                            std::collections::HashMap::new()
  578         -
                        };
  579         -
                        deser.read_map(member, container, |mut map, key, deser| {
  580         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  581         -
                            Ok(map)
  582         -
                        })?
         574  +
                        let mut container = std::collections::HashMap::new();
         575  +
                        deser.read_map(member, &mut |key, deser| {
         576  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         577  +
                            Ok(())
         578  +
                        })?;
         579  +
                        container
  583    580   
                    });
  584    581   
                }
  585    582   
                Some(2) => {
  586    583   
                    builder.attribute_updates = Some({
  587         -
                        let container = if let Some(cap) = deser.container_size() {
  588         -
                            std::collections::HashMap::with_capacity(cap)
  589         -
                        } else {
  590         -
                            std::collections::HashMap::new()
  591         -
                        };
  592         -
                        deser.read_map(member, container, |mut map, key, deser| {
  593         -
                            map.insert(key, crate::types::AttributeValueUpdate::deserialize(deser)?);
  594         -
                            Ok(map)
  595         -
                        })?
         584  +
                        let mut container = std::collections::HashMap::new();
         585  +
                        deser.read_map(member, &mut |key, deser| {
         586  +
                            container.insert(key, crate::types::AttributeValueUpdate::deserialize(deser)?);
         587  +
                            Ok(())
         588  +
                        })?;
         589  +
                        container
  596    590   
                    });
  597    591   
                }
  598    592   
                Some(3) => {
  599    593   
                    builder.expected = Some({
  600         -
                        let container = if let Some(cap) = deser.container_size() {
  601         -
                            std::collections::HashMap::with_capacity(cap)
  602         -
                        } else {
  603         -
                            std::collections::HashMap::new()
  604         -
                        };
  605         -
                        deser.read_map(member, container, |mut map, key, deser| {
  606         -
                            map.insert(key, crate::types::ExpectedAttributeValue::deserialize(deser)?);
  607         -
                            Ok(map)
  608         -
                        })?
         594  +
                        let mut container = std::collections::HashMap::new();
         595  +
                        deser.read_map(member, &mut |key, deser| {
         596  +
                            container.insert(key, crate::types::ExpectedAttributeValue::deserialize(deser)?);
         597  +
                            Ok(())
         598  +
                        })?;
         599  +
                        container
  609    600   
                    });
  610    601   
                }
  611    602   
                Some(4) => {
  612    603   
                    builder.conditional_operator = Some(crate::types::ConditionalOperator::from(deser.read_string(member)?.as_str()));
  613    604   
                }
  614    605   
                Some(5) => {
  615    606   
                    builder.return_values = Some(crate::types::ReturnValue::from(deser.read_string(member)?.as_str()));
  616    607   
                }
  617    608   
                Some(6) => {
  618    609   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  619    610   
                }
  620    611   
                Some(7) => {
  621    612   
                    builder.return_item_collection_metrics =
  622    613   
                        Some(crate::types::ReturnItemCollectionMetrics::from(deser.read_string(member)?.as_str()));
  623    614   
                }
  624    615   
                Some(8) => {
  625    616   
                    builder.update_expression = Some(deser.read_string(member)?);
  626    617   
                }
  627    618   
                Some(9) => {
  628    619   
                    builder.condition_expression = Some(deser.read_string(member)?);
  629    620   
                }
  630    621   
                Some(10) => {
  631         -
                    builder.expression_attribute_names = Some({
  632         -
                        let container = if let Some(cap) = deser.container_size() {
  633         -
                            std::collections::HashMap::with_capacity(cap)
  634         -
                        } else {
  635         -
                            std::collections::HashMap::new()
  636         -
                        };
  637         -
                        deser.read_map(member, container, |mut map, key, deser| {
  638         -
                            map.insert(key, deser.read_string(member)?);
  639         -
                            Ok(map)
  640         -
                        })?
  641         -
                    });
         622  +
                    builder.expression_attribute_names = Some(deser.read_string_string_map(member)?);
  642    623   
                }
  643    624   
                Some(11) => {
  644    625   
                    builder.expression_attribute_values = Some({
  645         -
                        let container = if let Some(cap) = deser.container_size() {
  646         -
                            std::collections::HashMap::with_capacity(cap)
  647         -
                        } else {
  648         -
                            std::collections::HashMap::new()
  649         -
                        };
  650         -
                        deser.read_map(member, container, |mut map, key, deser| {
  651         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  652         -
                            Ok(map)
  653         -
                        })?
         626  +
                        let mut container = std::collections::HashMap::new();
         627  +
                        deser.read_map(member, &mut |key, deser| {
         628  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         629  +
                            Ok(())
         630  +
                        })?;
         631  +
                        container
  654    632   
                    });
  655    633   
                }
  656    634   
                Some(12) => {
  657    635   
                    builder.return_values_on_condition_check_failure = Some(crate::types::ReturnValuesOnConditionCheckFailure::from(
  658    636   
                        deser.read_string(member)?.as_str(),
  659    637   
                    ));
  660    638   
                }
  661    639   
                _ => {}
  662    640   
            }
  663    641   
            Ok(())
  664    642   
        })?;
         643  +
        builder.table_name = builder.table_name.or(Some(String::new()));
         644  +
        builder.key = builder.key.or(Some(::std::collections::HashMap::new()));
  665    645   
        builder
  666    646   
            .build()
  667    647   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  668    648   
    }
  669    649   
}
         650  +
impl UpdateItemInput {
         651  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         652  +
    pub fn deserialize_with_response(
         653  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         654  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         655  +
        _status: u16,
         656  +
        _body: &[u8],
         657  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         658  +
        Self::deserialize(deserializer)
         659  +
    }
         660  +
}
  670    661   
impl UpdateItemInput {
  671    662   
    /// Creates a new builder-style object to manufacture [`UpdateItemInput`](crate::operation::update_item::UpdateItemInput).
  672    663   
    pub fn builder() -> crate::operation::update_item::builders::UpdateItemInputBuilder {
  673    664   
        crate::operation::update_item::builders::UpdateItemInputBuilder::default()
  674    665   
    }
  675    666   
}
  676    667   
  677    668   
/// A builder for [`UpdateItemInput`](crate::operation::update_item::UpdateItemInput).
  678    669   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  679    670   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_item/_update_item_output.rs

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

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_input.rs

@@ -9,9 +157,170 @@
   29     29   
    "com.amazonaws.dynamodb.synthetic",
   30     30   
    "UpdateKinesisStreamingDestinationInput",
   31     31   
);
   32     32   
static UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationInput$TableName",
   35     35   
        "com.amazonaws.dynamodb.synthetic",
   36     36   
        "UpdateKinesisStreamingDestinationInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "table_name",
          39  +
    "TableName",
   40     40   
    0,
   41     41   
);
   42     42   
static UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_STREAM_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationInput$StreamArn",
   45     45   
        "com.amazonaws.dynamodb.synthetic",
   46     46   
        "UpdateKinesisStreamingDestinationInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::String,
   49         -
    "stream_arn",
          49  +
    "StreamArn",
   50     50   
    1,
   51     51   
);
   52     52   
static UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION: ::aws_smithy_schema::Schema =
   53     53   
    ::aws_smithy_schema::Schema::new_member(
   54     54   
        ::aws_smithy_schema::ShapeId::from_static(
   55     55   
            "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationInput$UpdateKinesisStreamingConfiguration",
   56     56   
            "com.amazonaws.dynamodb.synthetic",
   57     57   
            "UpdateKinesisStreamingDestinationInput",
   58     58   
        ),
   59     59   
        ::aws_smithy_schema::ShapeType::Structure,
   60         -
        "update_kinesis_streaming_configuration",
          60  +
        "UpdateKinesisStreamingConfiguration",
   61     61   
        2,
   62     62   
    );
   63     63   
static UPDATEKINESISSTREAMINGDESTINATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   64     64   
    UPDATEKINESISSTREAMINGDESTINATIONINPUT_SCHEMA_ID,
   65     65   
    ::aws_smithy_schema::ShapeType::Structure,
   66     66   
    &[
   67     67   
        &UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_TABLE_NAME,
   68     68   
        &UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_STREAM_ARN,
   69     69   
        &UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION,
   70     70   
    ],
   71     71   
);
   72     72   
impl UpdateKinesisStreamingDestinationInput {
   73     73   
    /// The schema for this shape.
   74     74   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEKINESISSTREAMINGDESTINATIONINPUT_SCHEMA;
   75     75   
}
   76     76   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateKinesisStreamingDestinationInput {
   77     77   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   78     78   
    fn serialize_members(
   79     79   
        &self,
   80     80   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   81     81   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   82     82   
        if let Some(ref val) = self.table_name {
   83     83   
            ser.write_string(&UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_TABLE_NAME, val)?;
   84     84   
        }
   85     85   
        if let Some(ref val) = self.stream_arn {
   86     86   
            ser.write_string(&UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_STREAM_ARN, val)?;
   87     87   
        }
   88     88   
        if let Some(ref val) = self.update_kinesis_streaming_configuration {
   89     89   
            ser.write_struct(&UPDATEKINESISSTREAMINGDESTINATIONINPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION, val)?;
   90     90   
        }
   91     91   
        Ok(())
   92     92   
    }
   93     93   
}
   94     94   
impl UpdateKinesisStreamingDestinationInput {
   95     95   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
          96  +
    pub fn deserialize(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98     98   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99     99   
        #[allow(unused_variables, unused_mut)]
  100    100   
        let mut builder = Self::builder();
  101    101   
        #[allow(
  102    102   
            unused_variables,
  103    103   
            unreachable_code,
  104    104   
            clippy::single_match,
  105    105   
            clippy::match_single_binding,
  106    106   
            clippy::diverging_sub_expression
  107    107   
        )]
  108         -
        deserializer.read_struct(&UPDATEKINESISSTREAMINGDESTINATIONINPUT_SCHEMA, (), |_, member, deser| {
         108  +
        deserializer.read_struct(&UPDATEKINESISSTREAMINGDESTINATIONINPUT_SCHEMA, &mut |member, deser| {
  109    109   
            match member.member_index() {
  110    110   
                Some(0) => {
  111    111   
                    builder.table_name = Some(deser.read_string(member)?);
  112    112   
                }
  113    113   
                Some(1) => {
  114    114   
                    builder.stream_arn = Some(deser.read_string(member)?);
  115    115   
                }
  116    116   
                Some(2) => {
  117    117   
                    builder.update_kinesis_streaming_configuration = Some(crate::types::UpdateKinesisStreamingConfiguration::deserialize(deser)?);
  118    118   
                }
  119    119   
                _ => {}
  120    120   
            }
  121    121   
            Ok(())
  122    122   
        })?;
         123  +
        builder.table_name = builder.table_name.or(Some(String::new()));
         124  +
        builder.stream_arn = builder.stream_arn.or(Some(String::new()));
  123    125   
        builder
  124    126   
            .build()
  125    127   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  126    128   
    }
  127    129   
}
         130  +
impl UpdateKinesisStreamingDestinationInput {
         131  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         132  +
    pub fn deserialize_with_response(
         133  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         134  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         135  +
        _status: u16,
         136  +
        _body: &[u8],
         137  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         138  +
        Self::deserialize(deserializer)
         139  +
    }
         140  +
}
  128    141   
impl UpdateKinesisStreamingDestinationInput {
  129    142   
    /// Creates a new builder-style object to manufacture [`UpdateKinesisStreamingDestinationInput`](crate::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationInput).
  130    143   
    pub fn builder() -> crate::operation::update_kinesis_streaming_destination::builders::UpdateKinesisStreamingDestinationInputBuilder {
  131    144   
        crate::operation::update_kinesis_streaming_destination::builders::UpdateKinesisStreamingDestinationInputBuilder::default()
  132    145   
    }
  133    146   
}
  134    147   
  135    148   
/// A builder for [`UpdateKinesisStreamingDestinationInput`](crate::operation::update_kinesis_streaming_destination::UpdateKinesisStreamingDestinationInput).
  136    149   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  137    150   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_kinesis_streaming_destination/_update_kinesis_streaming_destination_output.rs

@@ -16,16 +162,216 @@
   36     36   
    "com.amazonaws.dynamodb.synthetic",
   37     37   
    "UpdateKinesisStreamingDestinationOutput",
   38     38   
);
   39     39   
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationOutput$TableName",
   42     42   
        "com.amazonaws.dynamodb.synthetic",
   43     43   
        "UpdateKinesisStreamingDestinationOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "table_name",
          46  +
    "TableName",
   47     47   
    0,
   48     48   
);
   49     49   
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationOutput$StreamArn",
   52     52   
        "com.amazonaws.dynamodb.synthetic",
   53     53   
        "UpdateKinesisStreamingDestinationOutput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "stream_arn",
          56  +
    "StreamArn",
   57     57   
    1,
   58     58   
);
   59     59   
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationOutput$DestinationStatus",
   62     62   
        "com.amazonaws.dynamodb.synthetic",
   63     63   
        "UpdateKinesisStreamingDestinationOutput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::String,
   66         -
    "destination_status",
          66  +
    "DestinationStatus",
   67     67   
    2,
   68     68   
);
   69     69   
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION: ::aws_smithy_schema::Schema =
   70     70   
    ::aws_smithy_schema::Schema::new_member(
   71     71   
        ::aws_smithy_schema::ShapeId::from_static(
   72     72   
            "com.amazonaws.dynamodb.synthetic#UpdateKinesisStreamingDestinationOutput$UpdateKinesisStreamingConfiguration",
   73     73   
            "com.amazonaws.dynamodb.synthetic",
   74     74   
            "UpdateKinesisStreamingDestinationOutput",
   75     75   
        ),
   76     76   
        ::aws_smithy_schema::ShapeType::Structure,
   77         -
        "update_kinesis_streaming_configuration",
          77  +
        "UpdateKinesisStreamingConfiguration",
   78     78   
        3,
   79     79   
    );
          80  +
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "request_id",
          84  +
    4,
          85  +
)
          86  +
.with_http_header("x-amzn-requestid");
   80     87   
static UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     88   
    UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA_ID,
   82     89   
    ::aws_smithy_schema::ShapeType::Structure,
   83     90   
    &[
   84     91   
        &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME,
   85     92   
        &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN,
   86     93   
        &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS,
   87     94   
        &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION,
          95  +
        &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER__REQUEST_ID,
   88     96   
    ],
   89     97   
);
   90     98   
impl UpdateKinesisStreamingDestinationOutput {
   91     99   
    /// The schema for this shape.
   92    100   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA;
   93    101   
}
   94    102   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateKinesisStreamingDestinationOutput {
   95    103   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   96    104   
    fn serialize_members(
   97    105   
        &self,
   98    106   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   99    107   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  100    108   
        if let Some(ref val) = self.table_name {
  101    109   
            ser.write_string(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME, val)?;
  102    110   
        }
  103    111   
        if let Some(ref val) = self.stream_arn {
  104    112   
            ser.write_string(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN, val)?;
  105    113   
        }
  106    114   
        if let Some(ref val) = self.destination_status {
  107    115   
            ser.write_string(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS, val.as_str())?;
  108    116   
        }
  109    117   
        if let Some(ref val) = self.update_kinesis_streaming_configuration {
  110    118   
            ser.write_struct(
  111    119   
                &UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_UPDATE_KINESIS_STREAMING_CONFIGURATION,
  112    120   
                val,
  113    121   
            )?;
  114    122   
        }
  115    123   
        Ok(())
  116    124   
    }
  117    125   
}
  118    126   
impl UpdateKinesisStreamingDestinationOutput {
  119    127   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  120         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  121         -
        deserializer: &mut D,
         128  +
    pub fn deserialize(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         130  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         131  +
        #[allow(unused_variables, unused_mut)]
         132  +
        let mut builder = Self::builder();
         133  +
        #[allow(
         134  +
            unused_variables,
         135  +
            unreachable_code,
         136  +
            clippy::single_match,
         137  +
            clippy::match_single_binding,
         138  +
            clippy::diverging_sub_expression
         139  +
        )]
         140  +
        deserializer.read_struct(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, &mut |member, deser| {
         141  +
            match member.member_index() {
         142  +
                Some(0) => {
         143  +
                    builder.table_name = Some(deser.read_string(member)?);
         144  +
                }
         145  +
                Some(1) => {
         146  +
                    builder.stream_arn = Some(deser.read_string(member)?);
         147  +
                }
         148  +
                Some(2) => {
         149  +
                    builder.destination_status = Some(crate::types::DestinationStatus::from(deser.read_string(member)?.as_str()));
         150  +
                }
         151  +
                Some(3) => {
         152  +
                    builder.update_kinesis_streaming_configuration = Some(crate::types::UpdateKinesisStreamingConfiguration::deserialize(deser)?);
         153  +
                }
         154  +
                Some(4) => {
         155  +
                    builder._request_id = Some(deser.read_string(member)?);
         156  +
                }
         157  +
                _ => {}
         158  +
            }
         159  +
            Ok(())
         160  +
        })?;
         161  +
        Ok(builder.build())
         162  +
    }
         163  +
}
         164  +
impl UpdateKinesisStreamingDestinationOutput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         166  +
    /// Header-bound members are read directly from headers, avoiding runtime
         167  +
    /// member iteration overhead. Body members are read via the deserializer.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
  122    173   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  123    174   
        #[allow(unused_variables, unused_mut)]
  124    175   
        let mut builder = Self::builder();
         176  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         177  +
            builder._request_id = Some(val.to_string());
         178  +
        }
  125    179   
        #[allow(
  126    180   
            unused_variables,
  127    181   
            unreachable_code,
  128    182   
            clippy::single_match,
  129    183   
            clippy::match_single_binding,
  130    184   
            clippy::diverging_sub_expression
  131    185   
        )]
  132         -
        deserializer.read_struct(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, (), |_, member, deser| {
         186  +
        deserializer.read_struct(&UPDATEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, &mut |member, deser| {
  133    187   
            match member.member_index() {
  134    188   
                Some(0) => {
  135    189   
                    builder.table_name = Some(deser.read_string(member)?);
  136    190   
                }
  137    191   
                Some(1) => {
  138    192   
                    builder.stream_arn = Some(deser.read_string(member)?);
  139    193   
                }
  140    194   
                Some(2) => {
  141    195   
                    builder.destination_status = Some(crate::types::DestinationStatus::from(deser.read_string(member)?.as_str()));
  142    196   
                }

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/update_table.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 `UpdateTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateTable;
    6      6   
impl UpdateTable {
    7      7   
    /// Creates a new `UpdateTable`
    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::update_table::UpdateTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_table::UpdateTableOutput::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::update_table::UpdateTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_table::UpdateTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_table::UpdateTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,375 @@
  135    139   
                crate::operation::update_table::UpdateTableError,
  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 UpdateTableResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateTableResponseDeserializer {
  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_update_table::de_update_table_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::update_table::UpdateTableError::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::update_table::UpdateTableError::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::update_table::UpdateTableError::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  +
                "LimitExceededException" => crate::operation::update_table::UpdateTableError::LimitExceededException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "ResourceInUseException" => crate::operation::update_table::UpdateTableError::ResourceInUseException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::ResourceInUseException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::ResourceInUseException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "ResourceNotFoundException" => crate::operation::update_table::UpdateTableError::ResourceNotFoundException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                _ => crate::operation::update_table::UpdateTableError::generic(generic),
         301  +
            };
         302  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         303  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         304  +
            ))
  157    305   
        } else {
  158         -
            crate::protocol_serde::shape_update_table::de_update_table_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         306  +
            let protocol = _cfg
         307  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         308  +
                .expect("a SharedClientProtocol is required");
         309  +
            let mut deser = protocol.deserialize_response(response, UpdateTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         310  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         311  +
            })?;
         312  +
            let body = response.body().bytes().expect("body loaded");
         313  +
            let output = crate::operation::update_table::UpdateTableOutput::deserialize_with_response(
         314  +
                &mut *deser,
         315  +
                response.headers(),
         316  +
                response.status().into(),
         317  +
                body,
         318  +
            )
         319  +
            .map_err(|e| {
         320  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         321  +
            })?;
         322  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         323  +
        }
  161    324   
    }
  162    325   
}
  163    326   
#[derive(Debug)]
  164    327   
struct UpdateTableRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateTableRequestSerializer {
  166    329   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    330   
    fn serialize_input(
  168    331   
        &self,
  169    332   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    333   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    334   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    335   
        let input = input
  173    336   
            .downcast::<crate::operation::update_table::UpdateTableInput>()
  174    337   
            .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::update_table::UpdateTableInput,
  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::update_table::UpdateTableInput,
  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.UpdateTable",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_table::ser_update_table_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())
         338  +
        let protocol = _cfg
         339  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         340  +
            .expect("a SharedClientProtocol is required");
         341  +
        let mut request = protocol
         342  +
            .serialize_request(&input, UpdateTable::INPUT_SCHEMA, "", _cfg)
         343  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         344  +
         345  +
        return ::std::result::Result::Ok(request);
  213    346   
    }
  214    347   
}
  215    348   
#[derive(Debug)]
  216    349   
struct UpdateTableEndpointParamsInterceptor;
  217    350   
  218    351   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTableEndpointParamsInterceptor {
  219    352   
    fn name(&self) -> &'static str {
  220    353   
        "UpdateTableEndpointParamsInterceptor"
  221    354   
    }
  222    355