AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/delete_backup.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 `DeleteBackup`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteBackup;
    6      6   
impl DeleteBackup {
    7      7   
    /// Creates a new `DeleteBackup`
    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::delete_backup::DeleteBackupInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_backup::DeleteBackupOutput::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::delete_backup::DeleteBackupInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_backup::DeleteBackupOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_backup::DeleteBackupError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,375 @@
  135    139   
                crate::operation::delete_backup::DeleteBackupError,
  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 DeleteBackupResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteBackupResponseDeserializer {
  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_delete_backup::de_delete_backup_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_delete_backup::de_delete_backup_http_response(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::delete_backup::DeleteBackupError::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  +
                "BackupInUseException" => crate::operation::delete_backup::DeleteBackupError::BackupInUseException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::BackupInUseException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::BackupInUseException::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  +
                "BackupNotFoundException" => crate::operation::delete_backup::DeleteBackupError::BackupNotFoundException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::BackupNotFoundException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::BackupNotFoundException::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  +
                "InternalServerError" => crate::operation::delete_backup::DeleteBackupError::InternalServerError({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::delete_backup::DeleteBackupError::InvalidEndpointException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidEndpointException::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  +
                        }
  159    269   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "LimitExceededException" => crate::operation::delete_backup::DeleteBackupError::LimitExceededException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::LimitExceededException::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::delete_backup::DeleteBackupError::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  +
            ))
         305  +
        } else {
         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, DeleteBackup::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::delete_backup::DeleteBackupOutput::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 DeleteBackupRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteBackupRequestSerializer {
  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::delete_backup::DeleteBackupInput>()
  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::delete_backup::DeleteBackupInput,
  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::delete_backup::DeleteBackupInput,
  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.DeleteBackup",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_backup::ser_delete_backup_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, DeleteBackup::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 DeleteBackupEndpointParamsInterceptor;
  217    350   
  218    351   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteBackupEndpointParamsInterceptor {
  219    352   
    fn name(&self) -> &'static str {
  220    353   
        "DeleteBackupEndpointParamsInterceptor"
  221    354   
    }
  222    355   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/delete_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 `DeleteItem`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteItem;
    6      6   
impl DeleteItem {
    7      7   
    /// Creates a new `DeleteItem`
    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::delete_item::DeleteItemInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_item::DeleteItemOutput::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::delete_item::DeleteItemInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_item::DeleteItemOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_item::DeleteItemError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,495 @@
  135    139   
                crate::operation::delete_item::DeleteItemError,
  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 DeleteItemResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteItemResponseDeserializer {
  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_delete_item::de_delete_item_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_delete_item::de_delete_item_http_response(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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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  +
                        }
  159    221   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidEndpointException" => crate::operation::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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::delete_item::DeleteItemError::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  +
            ))
         427  +
        } else {
         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, DeleteItem::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::delete_item::DeleteItemOutput::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 DeleteItemRequestSerializer;
  165    450   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteItemRequestSerializer {
  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::delete_item::DeleteItemInput>().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::delete_item::DeleteItemInput,
  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::delete_item::DeleteItemInput,
  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.DeleteItem",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_item::ser_delete_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, DeleteItem::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 DeleteItemEndpointParamsInterceptor;
  215    470   
  216    471   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteItemEndpointParamsInterceptor {
  217    472   
    fn name(&self) -> &'static str {
  218    473   
        "DeleteItemEndpointParamsInterceptor"
  219    474   
    }
  220    475   

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

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

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

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

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

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