Client Test

Client Test

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/create_table/_create_table_output.rs

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/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/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_backup/_delete_backup_output.rs

@@ -1,1 +106,117 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DeleteBackupOutput",
   19     19   
);
   20     20   
static DELETEBACKUPOUTPUT_MEMBER_BACKUP_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.dynamodb.synthetic#DeleteBackupOutput$BackupDescription",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DeleteBackupOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27         -
    "backup_description",
          27  +
    "BackupDescription",
   28     28   
    0,
   29     29   
);
   30     30   
static DELETEBACKUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DELETEBACKUPOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DELETEBACKUPOUTPUT_MEMBER_BACKUP_DESCRIPTION],
   34     34   
);
   35     35   
impl DeleteBackupOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEBACKUPOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteBackupOutput {
   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_description {
   46     46   
            ser.write_struct(&DELETEBACKUPOUTPUT_MEMBER_BACKUP_DESCRIPTION, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DeleteBackupOutput {
   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(&DELETEBACKUPOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DELETEBACKUPOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.backup_description = Some(crate::types::BackupDescription::deserialize(deser)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl DeleteBackupOutput {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl DeleteBackupOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`DeleteBackupOutput`](crate::operation::delete_backup::DeleteBackupOutput).
   79     90   
    pub fn builder() -> crate::operation::delete_backup::builders::DeleteBackupOutputBuilder {
   80     91   
        crate::operation::delete_backup::builders::DeleteBackupOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`DeleteBackupOutput`](crate::operation::delete_backup::DeleteBackupOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_item/_delete_item_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_item/_delete_item_output.rs

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

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_table/_delete_table_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_table/_delete_table_output.rs

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

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