Client Test

Client Test

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

@@ -34,34 +249,271 @@
   54     54   
    "com.amazonaws.dynamodb.synthetic",
   55     55   
    "QueryOutput",
   56     56   
);
   57     57   
static QUERYOUTPUT_MEMBER_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   58     58   
    ::aws_smithy_schema::ShapeId::from_static(
   59     59   
        "com.amazonaws.dynamodb.synthetic#QueryOutput$Items",
   60     60   
        "com.amazonaws.dynamodb.synthetic",
   61     61   
        "QueryOutput",
   62     62   
    ),
   63     63   
    ::aws_smithy_schema::ShapeType::List,
   64         -
    "items",
          64  +
    "Items",
   65     65   
    0,
   66     66   
);
   67     67   
static QUERYOUTPUT_MEMBER_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   68     68   
    ::aws_smithy_schema::ShapeId::from_static(
   69     69   
        "com.amazonaws.dynamodb.synthetic#QueryOutput$Count",
   70     70   
        "com.amazonaws.dynamodb.synthetic",
   71     71   
        "QueryOutput",
   72     72   
    ),
   73     73   
    ::aws_smithy_schema::ShapeType::Integer,
   74         -
    "count",
          74  +
    "Count",
   75     75   
    1,
   76     76   
);
   77     77   
static QUERYOUTPUT_MEMBER_SCANNED_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   78     78   
    ::aws_smithy_schema::ShapeId::from_static(
   79     79   
        "com.amazonaws.dynamodb.synthetic#QueryOutput$ScannedCount",
   80     80   
        "com.amazonaws.dynamodb.synthetic",
   81     81   
        "QueryOutput",
   82     82   
    ),
   83     83   
    ::aws_smithy_schema::ShapeType::Integer,
   84         -
    "scanned_count",
          84  +
    "ScannedCount",
   85     85   
    2,
   86     86   
);
   87     87   
static QUERYOUTPUT_MEMBER_LAST_EVALUATED_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     88   
    ::aws_smithy_schema::ShapeId::from_static(
   89     89   
        "com.amazonaws.dynamodb.synthetic#QueryOutput$LastEvaluatedKey",
   90     90   
        "com.amazonaws.dynamodb.synthetic",
   91     91   
        "QueryOutput",
   92     92   
    ),
   93     93   
    ::aws_smithy_schema::ShapeType::Map,
   94         -
    "last_evaluated_key",
          94  +
    "LastEvaluatedKey",
   95     95   
    3,
   96     96   
);
   97     97   
static QUERYOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.dynamodb.synthetic#QueryOutput$ConsumedCapacity",
  100    100   
        "com.amazonaws.dynamodb.synthetic",
  101    101   
        "QueryOutput",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::Structure,
  104         -
    "consumed_capacity",
         104  +
    "ConsumedCapacity",
  105    105   
    4,
  106    106   
);
  107    107   
static QUERYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  108    108   
    QUERYOUTPUT_SCHEMA_ID,
  109    109   
    ::aws_smithy_schema::ShapeType::Structure,
  110    110   
    &[
  111    111   
        &QUERYOUTPUT_MEMBER_ITEMS,
  112    112   
        &QUERYOUTPUT_MEMBER_COUNT,
  113    113   
        &QUERYOUTPUT_MEMBER_SCANNED_COUNT,
  114    114   
        &QUERYOUTPUT_MEMBER_LAST_EVALUATED_KEY,
  115    115   
        &QUERYOUTPUT_MEMBER_CONSUMED_CAPACITY,
  116    116   
    ],
  117    117   
);
  118    118   
impl QueryOutput {
  119    119   
    /// The schema for this shape.
  120    120   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &QUERYOUTPUT_SCHEMA;
  121    121   
}
  122    122   
impl ::aws_smithy_schema::serde::SerializableStruct for QueryOutput {
  123    123   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  124    124   
    fn serialize_members(
  125    125   
        &self,
  126    126   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  127    127   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  128    128   
        if let Some(ref val) = self.items {
  129    129   
            ser.write_list(&QUERYOUTPUT_MEMBER_ITEMS, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  130    130   
                for item in val {
  131         -
                    todo!("schema: unsupported list element type");
         131  +
                    ser.write_map(
         132  +
                        &::aws_smithy_schema::prelude::DOCUMENT,
         133  +
                        &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         134  +
                            for (key, value) in item {
         135  +
                                ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         136  +
                                ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
         137  +
                            }
         138  +
                            Ok(())
         139  +
                        },
         140  +
                    )?;
  132    141   
                }
  133    142   
                Ok(())
  134    143   
            })?;
  135    144   
        }
  136    145   
        {
  137    146   
            let val = &self.count;
  138    147   
            ser.write_integer(&QUERYOUTPUT_MEMBER_COUNT, *val)?;
  139    148   
        }
  140    149   
        {
  141    150   
            let val = &self.scanned_count;
  142    151   
            ser.write_integer(&QUERYOUTPUT_MEMBER_SCANNED_COUNT, *val)?;
  143    152   
        }
  144    153   
        if let Some(ref val) = self.last_evaluated_key {
  145    154   
            ser.write_map(
  146    155   
                &QUERYOUTPUT_MEMBER_LAST_EVALUATED_KEY,
  147    156   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  148    157   
                    for (key, value) in val {
  149    158   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  150         -
                        todo!("schema: unsupported map value type");
         159  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  151    160   
                    }
  152    161   
                    Ok(())
  153    162   
                },
  154    163   
            )?;
  155    164   
        }
  156    165   
        if let Some(ref val) = self.consumed_capacity {
  157    166   
            ser.write_struct(&QUERYOUTPUT_MEMBER_CONSUMED_CAPACITY, val)?;
  158    167   
        }
  159    168   
        Ok(())
  160    169   
    }
  161    170   
}
  162    171   
impl QueryOutput {
  163    172   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  164         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  165         -
        deserializer: &mut D,
         173  +
    pub fn deserialize(
         174  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  166    175   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  167    176   
        #[allow(unused_variables, unused_mut)]
  168    177   
        let mut builder = Self::builder();
  169    178   
        #[allow(
  170    179   
            unused_variables,
  171    180   
            unreachable_code,
  172    181   
            clippy::single_match,
  173    182   
            clippy::match_single_binding,
  174    183   
            clippy::diverging_sub_expression
  175    184   
        )]
  176         -
        deserializer.read_struct(&QUERYOUTPUT_SCHEMA, (), |_, member, deser| {
         185  +
        deserializer.read_struct(&QUERYOUTPUT_SCHEMA, &mut |member, deser| {
  177    186   
            match member.member_index() {
  178    187   
                Some(0) => {
  179    188   
                    builder.items = Some({
  180         -
                        let container = if let Some(cap) = deser.container_size() {
  181         -
                            Vec::with_capacity(cap)
  182         -
                        } else {
  183         -
                            Vec::new()
  184         -
                        };
  185         -
                        deser.read_list(member, container, |mut list, deser| {
  186         -
                            list.push(todo!("deserialize nested aggregate"));
  187         -
                            Ok(list)
  188         -
                        })?
         189  +
                        let mut container = Vec::new();
         190  +
                        deser.read_list(member, &mut |deser| {
         191  +
                            container.push({
         192  +
                                let mut map = ::std::collections::HashMap::new();
         193  +
                                deser.read_map(member, &mut |key, deser| {
         194  +
                                    let value = crate::types::AttributeValue::deserialize(deser)?;
         195  +
                                    map.insert(key, value);
         196  +
                                    Ok(())
         197  +
                                })?;
         198  +
                                map
         199  +
                            });
         200  +
                            Ok(())
         201  +
                        })?;
         202  +
                        container
  189    203   
                    });
  190    204   
                }
  191    205   
                Some(1) => {
  192    206   
                    builder.count = Some(deser.read_integer(member)?);
  193    207   
                }
  194    208   
                Some(2) => {
  195    209   
                    builder.scanned_count = Some(deser.read_integer(member)?);
  196    210   
                }
  197    211   
                Some(3) => {
  198    212   
                    builder.last_evaluated_key = Some({
  199         -
                        let container = if let Some(cap) = deser.container_size() {
  200         -
                            std::collections::HashMap::with_capacity(cap)
  201         -
                        } else {
  202         -
                            std::collections::HashMap::new()
  203         -
                        };
  204         -
                        deser.read_map(member, container, |mut map, key, deser| {
  205         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  206         -
                            Ok(map)
  207         -
                        })?
         213  +
                        let mut container = std::collections::HashMap::new();
         214  +
                        deser.read_map(member, &mut |key, deser| {
         215  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         216  +
                            Ok(())
         217  +
                        })?;
         218  +
                        container
  208    219   
                    });
  209    220   
                }
  210    221   
                Some(4) => {
  211    222   
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
  212    223   
                }
  213    224   
                _ => {}
  214    225   
            }
  215    226   
            Ok(())
  216    227   
        })?;
  217    228   
        Ok(builder.build())
  218    229   
    }
  219    230   
}
         231  +
impl QueryOutput {
         232  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         233  +
    pub fn deserialize_with_response(
         234  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         235  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         236  +
        _status: u16,
         237  +
        _body: &[u8],
         238  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         239  +
        Self::deserialize(deserializer)
         240  +
    }
         241  +
}
  220    242   
impl QueryOutput {
  221    243   
    /// Creates a new builder-style object to manufacture [`QueryOutput`](crate::operation::query::QueryOutput).
  222    244   
    pub fn builder() -> crate::operation::query::builders::QueryOutputBuilder {
  223    245   
        crate::operation::query::builders::QueryOutputBuilder::default()
  224    246   
    }
  225    247   
}
  226    248   
  227    249   
/// A builder for [`QueryOutput`](crate::operation::query::QueryOutput).
  228    250   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  229    251   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/restore_table_from_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 `RestoreTableFromBackup`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RestoreTableFromBackup;
    6      6   
impl RestoreTableFromBackup {
    7      7   
    /// Creates a new `RestoreTableFromBackup`
    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::restore_table_from_backup::RestoreTableFromBackupInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::restore_table_from_backup::RestoreTableFromBackupOutput::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::restore_table_from_backup::RestoreTableFromBackupInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::restore_table_from_backup::RestoreTableFromBackupOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::restore_table_from_backup::RestoreTableFromBackupError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +233,416 @@
  124    128   
                crate::operation::restore_table_from_backup::RestoreTableFromBackupError,
  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 RestoreTableFromBackupResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RestoreTableFromBackupResponseDeserializer {
  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_restore_table_from_backup::de_restore_table_from_backup_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_restore_table_from_backup::de_restore_table_from_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(
         161  +
                            crate::operation::restore_table_from_backup::RestoreTableFromBackupError::unhandled(generic),
         162  +
                        ),
         163  +
                    ))
         164  +
                }
  148    165   
            };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         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  +
                "BackupInUseException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::BackupInUseError({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::BackupInUseError::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::BackupInUseError::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  +
                "BackupNotFoundException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::BackupNotFoundError({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::BackupNotFoundError::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::BackupNotFoundError::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  +
                "InternalServerError" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::InternalServerError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                "InvalidEndpointException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::InvalidEndpointError({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                "LimitExceededException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::LimitExceededError({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::LimitExceededError::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::LimitExceededError::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    if tmp.message.is_none() {
         287  +
                        tmp.message = _error_message;
         288  +
                    }
         289  +
                    tmp
         290  +
                }),
         291  +
                "TableAlreadyExistsException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::TableAlreadyExistsError({
         292  +
                    let mut tmp = match protocol
         293  +
                        .deserialize_response(response, crate::types::error::TableAlreadyExistsError::SCHEMA, _cfg)
         294  +
                        .and_then(|mut deser| {
         295  +
                            crate::types::error::TableAlreadyExistsError::deserialize_with_response(
         296  +
                                &mut *deser,
         297  +
                                response.headers(),
         298  +
                                response.status().into(),
         299  +
                                body,
         300  +
                            )
         301  +
                        }) {
         302  +
                        ::std::result::Result::Ok(val) => val,
         303  +
                        ::std::result::Result::Err(e) => {
         304  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         305  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         306  +
                            ))
         307  +
                        }
         308  +
                    };
         309  +
                    tmp.meta = generic;
         310  +
                    if tmp.message.is_none() {
         311  +
                        tmp.message = _error_message;
         312  +
                    }
         313  +
                    tmp
         314  +
                }),
         315  +
                "TableInUseException" => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::TableInUseError({
         316  +
                    let mut tmp = match protocol
         317  +
                        .deserialize_response(response, crate::types::error::TableInUseError::SCHEMA, _cfg)
         318  +
                        .and_then(|mut deser| {
         319  +
                            crate::types::error::TableInUseError::deserialize_with_response(
         320  +
                                &mut *deser,
         321  +
                                response.headers(),
         322  +
                                response.status().into(),
         323  +
                                body,
         324  +
                            )
         325  +
                        }) {
         326  +
                        ::std::result::Result::Ok(val) => val,
         327  +
                        ::std::result::Result::Err(e) => {
         328  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         329  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         330  +
                            ))
         331  +
                        }
         332  +
                    };
         333  +
                    tmp.meta = generic;
         334  +
                    if tmp.message.is_none() {
         335  +
                        tmp.message = _error_message;
         336  +
                    }
         337  +
                    tmp
         338  +
                }),
         339  +
                _ => crate::operation::restore_table_from_backup::RestoreTableFromBackupError::generic(generic),
         340  +
            };
         341  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         342  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         343  +
            ))
         344  +
        } else {
         345  +
            let protocol = _cfg
         346  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         347  +
                .expect("a SharedClientProtocol is required");
         348  +
            let mut deser = protocol
         349  +
                .deserialize_response(response, RestoreTableFromBackup::OUTPUT_SCHEMA, _cfg)
         350  +
                .map_err(|e| {
         351  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         352  +
                })?;
         353  +
            let body = response.body().bytes().expect("body loaded");
         354  +
            let output = crate::operation::restore_table_from_backup::RestoreTableFromBackupOutput::deserialize_with_response(
         355  +
                &mut *deser,
         356  +
                response.headers(),
         357  +
                response.status().into(),
         358  +
                body,
         359  +
            )
         360  +
            .map_err(|e| {
         361  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         362  +
            })?;
         363  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         364  +
        }
  150    365   
    }
  151    366   
}
  152    367   
#[derive(Debug)]
  153    368   
struct RestoreTableFromBackupRequestSerializer;
  154    369   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RestoreTableFromBackupRequestSerializer {
  155    370   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    371   
    fn serialize_input(
  157    372   
        &self,
  158    373   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    374   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    375   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    376   
        let input = input
  162    377   
            .downcast::<crate::operation::restore_table_from_backup::RestoreTableFromBackupInput>()
  163    378   
            .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::restore_table_from_backup::RestoreTableFromBackupInput,
  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::restore_table_from_backup::RestoreTableFromBackupInput,
  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.RestoreTableFromBackup",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  197         -
            crate::protocol_serde::shape_restore_table_from_backup::ser_restore_table_from_backup_input(&input)?,
  198         -
        );
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         379  +
        let protocol = _cfg
         380  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         381  +
            .expect("a SharedClientProtocol is required");
         382  +
        let mut request = protocol
         383  +
            .serialize_request(&input, RestoreTableFromBackup::INPUT_SCHEMA, "", _cfg)
         384  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         385  +
         386  +
        return ::std::result::Result::Ok(request);
  204    387   
    }
  205    388   
}
  206    389   
#[derive(Debug)]
  207    390   
struct RestoreTableFromBackupEndpointParamsInterceptor;
  208    391   
  209    392   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RestoreTableFromBackupEndpointParamsInterceptor {
  210    393   
    fn name(&self) -> &'static str {
  211    394   
        "RestoreTableFromBackupEndpointParamsInterceptor"
  212    395   
    }
  213    396   

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

@@ -37,37 +157,157 @@
   57     57   
    "com.amazonaws.dynamodb.synthetic",
   58     58   
    "RestoreTableFromBackupInput",
   59     59   
);
   60     60   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_TARGET_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$TargetTableName",
   63     63   
        "com.amazonaws.dynamodb.synthetic",
   64     64   
        "RestoreTableFromBackupInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "target_table_name",
          67  +
    "TargetTableName",
   68     68   
    0,
   69     69   
);
   70     70   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_BACKUP_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$BackupArn",
   73     73   
        "com.amazonaws.dynamodb.synthetic",
   74     74   
        "RestoreTableFromBackupInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "backup_arn",
          77  +
    "BackupArn",
   78     78   
    1,
   79     79   
);
   80     80   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_BILLING_MODE_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$BillingModeOverride",
   83     83   
        "com.amazonaws.dynamodb.synthetic",
   84     84   
        "RestoreTableFromBackupInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "billing_mode_override",
          87  +
    "BillingModeOverride",
   88     88   
    2,
   89     89   
);
   90     90   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$GlobalSecondaryIndexOverride",
   93     93   
        "com.amazonaws.dynamodb.synthetic",
   94     94   
        "RestoreTableFromBackupInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::List,
   97         -
    "global_secondary_index_override",
          97  +
    "GlobalSecondaryIndexOverride",
   98     98   
    3,
   99     99   
);
  100    100   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_LOCAL_SECONDARY_INDEX_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$LocalSecondaryIndexOverride",
  103    103   
        "com.amazonaws.dynamodb.synthetic",
  104    104   
        "RestoreTableFromBackupInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::List,
  107         -
    "local_secondary_index_override",
         107  +
    "LocalSecondaryIndexOverride",
  108    108   
    4,
  109    109   
);
  110    110   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_PROVISIONED_THROUGHPUT_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$ProvisionedThroughputOverride",
  113    113   
        "com.amazonaws.dynamodb.synthetic",
  114    114   
        "RestoreTableFromBackupInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::Structure,
  117         -
    "provisioned_throughput_override",
         117  +
    "ProvisionedThroughputOverride",
  118    118   
    5,
  119    119   
);
  120    120   
static RESTORETABLEFROMBACKUPINPUT_MEMBER_SSE_SPECIFICATION_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.dynamodb.synthetic#RestoreTableFromBackupInput$SSESpecificationOverride",
  123    123   
        "com.amazonaws.dynamodb.synthetic",
  124    124   
        "RestoreTableFromBackupInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::Structure,
  127         -
    "sse_specification_override",
         127  +
    "SSESpecificationOverride",
  128    128   
    6,
  129    129   
);
  130    130   
static RESTORETABLEFROMBACKUPINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  131    131   
    RESTORETABLEFROMBACKUPINPUT_SCHEMA_ID,
  132    132   
    ::aws_smithy_schema::ShapeType::Structure,
  133    133   
    &[
  134    134   
        &RESTORETABLEFROMBACKUPINPUT_MEMBER_TARGET_TABLE_NAME,
  135    135   
        &RESTORETABLEFROMBACKUPINPUT_MEMBER_BACKUP_ARN,
  136    136   
        &RESTORETABLEFROMBACKUPINPUT_MEMBER_BILLING_MODE_OVERRIDE,
  137    137   
        &RESTORETABLEFROMBACKUPINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_OVERRIDE,
@@ -165,165 +288,295 @@
  185    185   
            ser.write_struct(&RESTORETABLEFROMBACKUPINPUT_MEMBER_PROVISIONED_THROUGHPUT_OVERRIDE, val)?;
  186    186   
        }
  187    187   
        if let Some(ref val) = self.sse_specification_override {
  188    188   
            ser.write_struct(&RESTORETABLEFROMBACKUPINPUT_MEMBER_SSE_SPECIFICATION_OVERRIDE, val)?;
  189    189   
        }
  190    190   
        Ok(())
  191    191   
    }
  192    192   
}
  193    193   
impl RestoreTableFromBackupInput {
  194    194   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  195         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  196         -
        deserializer: &mut D,
         195  +
    pub fn deserialize(
         196  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  197    197   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  198    198   
        #[allow(unused_variables, unused_mut)]
  199    199   
        let mut builder = Self::builder();
  200    200   
        #[allow(
  201    201   
            unused_variables,
  202    202   
            unreachable_code,
  203    203   
            clippy::single_match,
  204    204   
            clippy::match_single_binding,
  205    205   
            clippy::diverging_sub_expression
  206    206   
        )]
  207         -
        deserializer.read_struct(&RESTORETABLEFROMBACKUPINPUT_SCHEMA, (), |_, member, deser| {
         207  +
        deserializer.read_struct(&RESTORETABLEFROMBACKUPINPUT_SCHEMA, &mut |member, deser| {
  208    208   
            match member.member_index() {
  209    209   
                Some(0) => {
  210    210   
                    builder.target_table_name = Some(deser.read_string(member)?);
  211    211   
                }
  212    212   
                Some(1) => {
  213    213   
                    builder.backup_arn = Some(deser.read_string(member)?);
  214    214   
                }
  215    215   
                Some(2) => {
  216    216   
                    builder.billing_mode_override = Some(crate::types::BillingMode::from(deser.read_string(member)?.as_str()));
  217    217   
                }
  218    218   
                Some(3) => {
  219    219   
                    builder.global_secondary_index_override = Some({
  220         -
                        let container = if let Some(cap) = deser.container_size() {
  221         -
                            Vec::with_capacity(cap)
  222         -
                        } else {
  223         -
                            Vec::new()
  224         -
                        };
  225         -
                        deser.read_list(member, container, |mut list, deser| {
  226         -
                            list.push(crate::types::GlobalSecondaryIndex::deserialize(deser)?);
  227         -
                            Ok(list)
  228         -
                        })?
         220  +
                        let mut container = Vec::new();
         221  +
                        deser.read_list(member, &mut |deser| {
         222  +
                            container.push(crate::types::GlobalSecondaryIndex::deserialize(deser)?);
         223  +
                            Ok(())
         224  +
                        })?;
         225  +
                        container
  229    226   
                    });
  230    227   
                }
  231    228   
                Some(4) => {
  232    229   
                    builder.local_secondary_index_override = Some({
  233         -
                        let container = if let Some(cap) = deser.container_size() {
  234         -
                            Vec::with_capacity(cap)
  235         -
                        } else {
  236         -
                            Vec::new()
  237         -
                        };
  238         -
                        deser.read_list(member, container, |mut list, deser| {
  239         -
                            list.push(crate::types::LocalSecondaryIndex::deserialize(deser)?);
  240         -
                            Ok(list)
  241         -
                        })?
         230  +
                        let mut container = Vec::new();
         231  +
                        deser.read_list(member, &mut |deser| {
         232  +
                            container.push(crate::types::LocalSecondaryIndex::deserialize(deser)?);
         233  +
                            Ok(())
         234  +
                        })?;
         235  +
                        container
  242    236   
                    });
  243    237   
                }
  244    238   
                Some(5) => {
  245    239   
                    builder.provisioned_throughput_override = Some(crate::types::ProvisionedThroughput::deserialize(deser)?);
  246    240   
                }
  247    241   
                Some(6) => {
  248    242   
                    builder.sse_specification_override = Some(crate::types::SseSpecification::deserialize(deser)?);
  249    243   
                }
  250    244   
                _ => {}
  251    245   
            }
  252    246   
            Ok(())
  253    247   
        })?;
         248  +
        builder.target_table_name = builder.target_table_name.or(Some(String::new()));
         249  +
        builder.backup_arn = builder.backup_arn.or(Some(String::new()));
  254    250   
        builder
  255    251   
            .build()
  256    252   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  257    253   
    }
  258    254   
}
         255  +
impl RestoreTableFromBackupInput {
         256  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         257  +
    pub fn deserialize_with_response(
         258  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         259  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         260  +
        _status: u16,
         261  +
        _body: &[u8],
         262  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         263  +
        Self::deserialize(deserializer)
         264  +
    }
         265  +
}
  259    266   
impl RestoreTableFromBackupInput {
  260    267   
    /// Creates a new builder-style object to manufacture [`RestoreTableFromBackupInput`](crate::operation::restore_table_from_backup::RestoreTableFromBackupInput).
  261    268   
    pub fn builder() -> crate::operation::restore_table_from_backup::builders::RestoreTableFromBackupInputBuilder {
  262    269   
        crate::operation::restore_table_from_backup::builders::RestoreTableFromBackupInputBuilder::default()
  263    270   
    }
  264    271   
}
  265    272   
  266    273   
/// A builder for [`RestoreTableFromBackupInput`](crate::operation::restore_table_from_backup::RestoreTableFromBackupInput).
  267    274   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  268    275   
#[non_exhaustive]

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

@@ -1,1 +106,117 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "RestoreTableFromBackupOutput",
   19     19   
);
   20     20   
static RESTORETABLEFROMBACKUPOUTPUT_MEMBER_TABLE_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#RestoreTableFromBackupOutput$TableDescription",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "RestoreTableFromBackupOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27         -
    "table_description",
          27  +
    "TableDescription",
   28     28   
    0,
   29     29   
);
   30     30   
static RESTORETABLEFROMBACKUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    RESTORETABLEFROMBACKUPOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&RESTORETABLEFROMBACKUPOUTPUT_MEMBER_TABLE_DESCRIPTION],
   34     34   
);
   35     35   
impl RestoreTableFromBackupOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &RESTORETABLEFROMBACKUPOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for RestoreTableFromBackupOutput {
   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.table_description {
   46     46   
            ser.write_struct(&RESTORETABLEFROMBACKUPOUTPUT_MEMBER_TABLE_DESCRIPTION, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl RestoreTableFromBackupOutput {
   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(&RESTORETABLEFROMBACKUPOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&RESTORETABLEFROMBACKUPOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.table_description = Some(crate::types::TableDescription::deserialize(deser)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl RestoreTableFromBackupOutput {
          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 RestoreTableFromBackupOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`RestoreTableFromBackupOutput`](crate::operation::restore_table_from_backup::RestoreTableFromBackupOutput).
   79     90   
    pub fn builder() -> crate::operation::restore_table_from_backup::builders::RestoreTableFromBackupOutputBuilder {
   80     91   
        crate::operation::restore_table_from_backup::builders::RestoreTableFromBackupOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`RestoreTableFromBackupOutput`](crate::operation::restore_table_from_backup::RestoreTableFromBackupOutput).
   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/restore_table_to_point_in_time.rs

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

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

@@ -55,55 +205,205 @@
   75     75   
    "com.amazonaws.dynamodb.synthetic",
   76     76   
    "RestoreTableToPointInTimeInput",
   77     77   
);
   78     78   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SOURCE_TABLE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$SourceTableArn",
   81     81   
        "com.amazonaws.dynamodb.synthetic",
   82     82   
        "RestoreTableToPointInTimeInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "source_table_arn",
          85  +
    "SourceTableArn",
   86     86   
    0,
   87     87   
);
   88     88   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SOURCE_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$SourceTableName",
   91     91   
        "com.amazonaws.dynamodb.synthetic",
   92     92   
        "RestoreTableToPointInTimeInput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::String,
   95         -
    "source_table_name",
          95  +
    "SourceTableName",
   96     96   
    1,
   97     97   
);
   98     98   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_TARGET_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$TargetTableName",
  101    101   
        "com.amazonaws.dynamodb.synthetic",
  102    102   
        "RestoreTableToPointInTimeInput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::String,
  105         -
    "target_table_name",
         105  +
    "TargetTableName",
  106    106   
    2,
  107    107   
);
  108    108   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_USE_LATEST_RESTORABLE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$UseLatestRestorableTime",
  111    111   
        "com.amazonaws.dynamodb.synthetic",
  112    112   
        "RestoreTableToPointInTimeInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::Boolean,
  115         -
    "use_latest_restorable_time",
         115  +
    "UseLatestRestorableTime",
  116    116   
    3,
  117    117   
);
  118    118   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_RESTORE_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$RestoreDateTime",
  121    121   
        "com.amazonaws.dynamodb.synthetic",
  122    122   
        "RestoreTableToPointInTimeInput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::Timestamp,
  125         -
    "restore_date_time",
         125  +
    "RestoreDateTime",
  126    126   
    4,
  127    127   
);
  128    128   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_BILLING_MODE_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$BillingModeOverride",
  131    131   
        "com.amazonaws.dynamodb.synthetic",
  132    132   
        "RestoreTableToPointInTimeInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::String,
  135         -
    "billing_mode_override",
         135  +
    "BillingModeOverride",
  136    136   
    5,
  137    137   
);
  138    138   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$GlobalSecondaryIndexOverride",
  141    141   
        "com.amazonaws.dynamodb.synthetic",
  142    142   
        "RestoreTableToPointInTimeInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::List,
  145         -
    "global_secondary_index_override",
         145  +
    "GlobalSecondaryIndexOverride",
  146    146   
    6,
  147    147   
);
  148    148   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_LOCAL_SECONDARY_INDEX_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$LocalSecondaryIndexOverride",
  151    151   
        "com.amazonaws.dynamodb.synthetic",
  152    152   
        "RestoreTableToPointInTimeInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::List,
  155         -
    "local_secondary_index_override",
         155  +
    "LocalSecondaryIndexOverride",
  156    156   
    7,
  157    157   
);
  158    158   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_PROVISIONED_THROUGHPUT_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  159    159   
    ::aws_smithy_schema::ShapeId::from_static(
  160    160   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$ProvisionedThroughputOverride",
  161    161   
        "com.amazonaws.dynamodb.synthetic",
  162    162   
        "RestoreTableToPointInTimeInput",
  163    163   
    ),
  164    164   
    ::aws_smithy_schema::ShapeType::Structure,
  165         -
    "provisioned_throughput_override",
         165  +
    "ProvisionedThroughputOverride",
  166    166   
    8,
  167    167   
);
  168    168   
static RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SSE_SPECIFICATION_OVERRIDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  169    169   
    ::aws_smithy_schema::ShapeId::from_static(
  170    170   
        "com.amazonaws.dynamodb.synthetic#RestoreTableToPointInTimeInput$SSESpecificationOverride",
  171    171   
        "com.amazonaws.dynamodb.synthetic",
  172    172   
        "RestoreTableToPointInTimeInput",
  173    173   
    ),
  174    174   
    ::aws_smithy_schema::ShapeType::Structure,
  175         -
    "sse_specification_override",
         175  +
    "SSESpecificationOverride",
  176    176   
    9,
  177    177   
);
  178    178   
static RESTORETABLETOPOINTINTIMEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  179    179   
    RESTORETABLETOPOINTINTIMEINPUT_SCHEMA_ID,
  180    180   
    ::aws_smithy_schema::ShapeType::Structure,
  181    181   
    &[
  182    182   
        &RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SOURCE_TABLE_ARN,
  183    183   
        &RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SOURCE_TABLE_NAME,
  184    184   
        &RESTORETABLETOPOINTINTIMEINPUT_MEMBER_TARGET_TABLE_NAME,
  185    185   
        &RESTORETABLETOPOINTINTIMEINPUT_MEMBER_USE_LATEST_RESTORABLE_TIME,
@@ -225,225 +357,363 @@
  245    245   
            ser.write_struct(&RESTORETABLETOPOINTINTIMEINPUT_MEMBER_PROVISIONED_THROUGHPUT_OVERRIDE, val)?;
  246    246   
        }
  247    247   
        if let Some(ref val) = self.sse_specification_override {
  248    248   
            ser.write_struct(&RESTORETABLETOPOINTINTIMEINPUT_MEMBER_SSE_SPECIFICATION_OVERRIDE, val)?;
  249    249   
        }
  250    250   
        Ok(())
  251    251   
    }
  252    252   
}
  253    253   
impl RestoreTableToPointInTimeInput {
  254    254   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  255         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  256         -
        deserializer: &mut D,
         255  +
    pub fn deserialize(
         256  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  257    257   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  258    258   
        #[allow(unused_variables, unused_mut)]
  259    259   
        let mut builder = Self::builder();
  260    260   
        #[allow(
  261    261   
            unused_variables,
  262    262   
            unreachable_code,
  263    263   
            clippy::single_match,
  264    264   
            clippy::match_single_binding,
  265    265   
            clippy::diverging_sub_expression
  266    266   
        )]
  267         -
        deserializer.read_struct(&RESTORETABLETOPOINTINTIMEINPUT_SCHEMA, (), |_, member, deser| {
         267  +
        deserializer.read_struct(&RESTORETABLETOPOINTINTIMEINPUT_SCHEMA, &mut |member, deser| {
  268    268   
            match member.member_index() {
  269    269   
                Some(0) => {
  270    270   
                    builder.source_table_arn = Some(deser.read_string(member)?);
  271    271   
                }
  272    272   
                Some(1) => {
  273    273   
                    builder.source_table_name = Some(deser.read_string(member)?);
  274    274   
                }
  275    275   
                Some(2) => {
  276    276   
                    builder.target_table_name = Some(deser.read_string(member)?);
  277    277   
                }
  278    278   
                Some(3) => {
  279    279   
                    builder.use_latest_restorable_time = Some(deser.read_boolean(member)?);
  280    280   
                }
  281    281   
                Some(4) => {
  282    282   
                    builder.restore_date_time = Some(deser.read_timestamp(member)?);
  283    283   
                }
  284    284   
                Some(5) => {
  285    285   
                    builder.billing_mode_override = Some(crate::types::BillingMode::from(deser.read_string(member)?.as_str()));
  286    286   
                }
  287    287   
                Some(6) => {
  288    288   
                    builder.global_secondary_index_override = Some({
  289         -
                        let container = if let Some(cap) = deser.container_size() {
  290         -
                            Vec::with_capacity(cap)
  291         -
                        } else {
  292         -
                            Vec::new()
  293         -
                        };
  294         -
                        deser.read_list(member, container, |mut list, deser| {
  295         -
                            list.push(crate::types::GlobalSecondaryIndex::deserialize(deser)?);
  296         -
                            Ok(list)
  297         -
                        })?
         289  +
                        let mut container = Vec::new();
         290  +
                        deser.read_list(member, &mut |deser| {
         291  +
                            container.push(crate::types::GlobalSecondaryIndex::deserialize(deser)?);
         292  +
                            Ok(())
         293  +
                        })?;
         294  +
                        container
  298    295   
                    });
  299    296   
                }
  300    297   
                Some(7) => {
  301    298   
                    builder.local_secondary_index_override = Some({
  302         -
                        let container = if let Some(cap) = deser.container_size() {
  303         -
                            Vec::with_capacity(cap)
  304         -
                        } else {
  305         -
                            Vec::new()
  306         -
                        };
  307         -
                        deser.read_list(member, container, |mut list, deser| {
  308         -
                            list.push(crate::types::LocalSecondaryIndex::deserialize(deser)?);
  309         -
                            Ok(list)
  310         -
                        })?
         299  +
                        let mut container = Vec::new();
         300  +
                        deser.read_list(member, &mut |deser| {
         301  +
                            container.push(crate::types::LocalSecondaryIndex::deserialize(deser)?);
         302  +
                            Ok(())
         303  +
                        })?;
         304  +
                        container
  311    305   
                    });
  312    306   
                }
  313    307   
                Some(8) => {
  314    308   
                    builder.provisioned_throughput_override = Some(crate::types::ProvisionedThroughput::deserialize(deser)?);
  315    309   
                }
  316    310   
                Some(9) => {
  317    311   
                    builder.sse_specification_override = Some(crate::types::SseSpecification::deserialize(deser)?);
  318    312   
                }
  319    313   
                _ => {}
  320    314   
            }
  321    315   
            Ok(())
  322    316   
        })?;
         317  +
        builder.target_table_name = builder.target_table_name.or(Some(String::new()));
  323    318   
        builder
  324    319   
            .build()
  325    320   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  326    321   
    }
  327    322   
}
         323  +
impl RestoreTableToPointInTimeInput {
         324  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         325  +
    pub fn deserialize_with_response(
         326  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         327  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         328  +
        _status: u16,
         329  +
        _body: &[u8],
         330  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         331  +
        Self::deserialize(deserializer)
         332  +
    }
         333  +
}
  328    334   
impl RestoreTableToPointInTimeInput {
  329    335   
    /// Creates a new builder-style object to manufacture [`RestoreTableToPointInTimeInput`](crate::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeInput).
  330    336   
    pub fn builder() -> crate::operation::restore_table_to_point_in_time::builders::RestoreTableToPointInTimeInputBuilder {
  331    337   
        crate::operation::restore_table_to_point_in_time::builders::RestoreTableToPointInTimeInputBuilder::default()
  332    338   
    }
  333    339   
}
  334    340   
  335    341   
/// A builder for [`RestoreTableToPointInTimeInput`](crate::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeInput).
  336    342   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  337    343   
#[non_exhaustive]

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

@@ -1,1 +106,117 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "RestoreTableToPointInTimeOutput",
   19     19   
);
   20     20   
static RESTORETABLETOPOINTINTIMEOUTPUT_MEMBER_TABLE_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#RestoreTableToPointInTimeOutput$TableDescription",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "RestoreTableToPointInTimeOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27         -
    "table_description",
          27  +
    "TableDescription",
   28     28   
    0,
   29     29   
);
   30     30   
static RESTORETABLETOPOINTINTIMEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    RESTORETABLETOPOINTINTIMEOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&RESTORETABLETOPOINTINTIMEOUTPUT_MEMBER_TABLE_DESCRIPTION],
   34     34   
);
   35     35   
impl RestoreTableToPointInTimeOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &RESTORETABLETOPOINTINTIMEOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for RestoreTableToPointInTimeOutput {
   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.table_description {
   46     46   
            ser.write_struct(&RESTORETABLETOPOINTINTIMEOUTPUT_MEMBER_TABLE_DESCRIPTION, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl RestoreTableToPointInTimeOutput {
   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(&RESTORETABLETOPOINTINTIMEOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&RESTORETABLETOPOINTINTIMEOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.table_description = Some(crate::types::TableDescription::deserialize(deser)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl RestoreTableToPointInTimeOutput {
          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 RestoreTableToPointInTimeOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`RestoreTableToPointInTimeOutput`](crate::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeOutput).
   79     90   
    pub fn builder() -> crate::operation::restore_table_to_point_in_time::builders::RestoreTableToPointInTimeOutputBuilder {
   80     91   
        crate::operation::restore_table_to_point_in_time::builders::RestoreTableToPointInTimeOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`RestoreTableToPointInTimeOutput`](crate::operation::restore_table_to_point_in_time::RestoreTableToPointInTimeOutput).
   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/scan.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 `Scan`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct Scan;
    6      6   
impl Scan {
    7      7   
    /// Creates a new `Scan`
    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::scan::ScanInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::scan::ScanOutput::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::scan::ScanInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::scan::ScanOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::scan::ScanError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -92,96 +217,348 @@
  112    116   
                crate::operation::scan::ScanError,
  113    117   
            >::new());
  114    118   
  115    119   
        ::std::borrow::Cow::Owned(rcb)
  116    120   
    }
  117    121   
}
  118    122   
  119    123   
#[derive(Debug)]
  120    124   
struct ScanResponseDeserializer;
  121    125   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ScanResponseDeserializer {
  122         -
    fn deserialize_nonstreaming(
         126  +
    fn deserialize_nonstreaming_with_config(
  123    127   
        &self,
  124    128   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         129  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  125    130   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  126    131   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         132  +
        #[allow(unused_mut)]
         133  +
        let mut force_error = false;
         134  +
         135  +
        if !success && status != 200 || force_error {
  127    136   
            let headers = response.headers();
  128    137   
            let body = response.body().bytes().expect("body loaded");
  129    138   
            #[allow(unused_mut)]
  130         -
        let mut force_error = false;
         139  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         140  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         141  +
            })?;
  131    142   
  132         -
        let parse_result = if !success && status != 200 || force_error {
  133         -
            crate::protocol_serde::shape_scan::de_scan_http_error(status, headers, body)
  134         -
        } else {
  135         -
            crate::protocol_serde::shape_scan::de_scan_http_response(status, headers, body)
         143  +
            let generic = generic_builder.build();
         144  +
            let error_code = match generic.code() {
         145  +
                ::std::option::Option::Some(code) => code,
         146  +
                ::std::option::Option::None => {
         147  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         148  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::scan::ScanError::unhandled(generic)),
         149  +
                    ))
         150  +
                }
  136    151   
            };
  137         -
        crate::protocol_serde::type_erase_result(parse_result)
         152  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         153  +
            let protocol = _cfg
         154  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         155  +
                .expect("a SharedClientProtocol is required");
         156  +
            let err = match error_code {
         157  +
                "InternalServerError" => crate::operation::scan::ScanError::InternalServerError({
         158  +
                    let mut tmp = match protocol
         159  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         160  +
                        .and_then(|mut deser| {
         161  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         162  +
                                &mut *deser,
         163  +
                                response.headers(),
         164  +
                                response.status().into(),
         165  +
                                body,
         166  +
                            )
         167  +
                        }) {
         168  +
                        ::std::result::Result::Ok(val) => val,
         169  +
                        ::std::result::Result::Err(e) => {
         170  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         172  +
                            ))
         173  +
                        }
         174  +
                    };
         175  +
                    tmp.meta = generic;
         176  +
                    if tmp.message.is_none() {
         177  +
                        tmp.message = _error_message;
         178  +
                    }
         179  +
                    tmp
         180  +
                }),
         181  +
                "InvalidEndpointException" => crate::operation::scan::ScanError::InvalidEndpointError({
         182  +
                    let mut tmp = match protocol
         183  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         184  +
                        .and_then(|mut deser| {
         185  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         186  +
                                &mut *deser,
         187  +
                                response.headers(),
         188  +
                                response.status().into(),
         189  +
                                body,
         190  +
                            )
         191  +
                        }) {
         192  +
                        ::std::result::Result::Ok(val) => val,
         193  +
                        ::std::result::Result::Err(e) => {
         194  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         196  +
                            ))
         197  +
                        }
         198  +
                    };
         199  +
                    tmp.meta = generic;
         200  +
                    if tmp.message.is_none() {
         201  +
                        tmp.message = _error_message;
         202  +
                    }
         203  +
                    tmp
         204  +
                }),
         205  +
                "ProvisionedThroughputExceededException" => crate::operation::scan::ScanError::ProvisionedThroughputExceededError({
         206  +
                    let mut tmp = match protocol
         207  +
                        .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededError::SCHEMA, _cfg)
         208  +
                        .and_then(|mut deser| {
         209  +
                            crate::types::error::ProvisionedThroughputExceededError::deserialize_with_response(
         210  +
                                &mut *deser,
         211  +
                                response.headers(),
         212  +
                                response.status().into(),
         213  +
                                body,
         214  +
                            )
         215  +
                        }) {
         216  +
                        ::std::result::Result::Ok(val) => val,
         217  +
                        ::std::result::Result::Err(e) => {
         218  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         219  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         220  +
                            ))
         221  +
                        }
         222  +
                    };
         223  +
                    tmp.meta = generic;
         224  +
                    if tmp.message.is_none() {
         225  +
                        tmp.message = _error_message;
         226  +
                    }
         227  +
                    tmp
         228  +
                }),
         229  +
                "RequestLimitExceeded" => crate::operation::scan::ScanError::RequestLimitExceeded({
         230  +
                    let mut tmp = match protocol
         231  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         232  +
                        .and_then(|mut deser| {
         233  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         234  +
                                &mut *deser,
         235  +
                                response.headers(),
         236  +
                                response.status().into(),
         237  +
                                body,
         238  +
                            )
         239  +
                        }) {
         240  +
                        ::std::result::Result::Ok(val) => val,
         241  +
                        ::std::result::Result::Err(e) => {
         242  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         243  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         244  +
                            ))
         245  +
                        }
         246  +
                    };
         247  +
                    tmp.meta = generic;
         248  +
                    if tmp.message.is_none() {
         249  +
                        tmp.message = _error_message;
         250  +
                    }
         251  +
                    tmp
         252  +
                }),
         253  +
                "ResourceNotFoundException" => crate::operation::scan::ScanError::ResourceNotFoundError({
         254  +
                    let mut tmp = match protocol
         255  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         256  +
                        .and_then(|mut deser| {
         257  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         258  +
                                &mut *deser,
         259  +
                                response.headers(),
         260  +
                                response.status().into(),
         261  +
                                body,
         262  +
                            )
         263  +
                        }) {
         264  +
                        ::std::result::Result::Ok(val) => val,
         265  +
                        ::std::result::Result::Err(e) => {
         266  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         267  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         268  +
                            ))
         269  +
                        }
         270  +
                    };
         271  +
                    tmp.meta = generic;
         272  +
                    if tmp.message.is_none() {
         273  +
                        tmp.message = _error_message;
         274  +
                    }
         275  +
                    tmp
         276  +
                }),
         277  +
                _ => crate::operation::scan::ScanError::generic(generic),
         278  +
            };
         279  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         280  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         281  +
            ))
         282  +
        } else {
         283  +
            let protocol = _cfg
         284  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
                .expect("a SharedClientProtocol is required");
         286  +
            let mut deser = protocol.deserialize_response(response, Scan::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         287  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         288  +
            })?;
         289  +
            let body = response.body().bytes().expect("body loaded");
         290  +
            let output =
         291  +
                crate::operation::scan::ScanOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         292  +
                    .map_err(|e| {
         293  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         294  +
                            e,
         295  +
                        ))
         296  +
                    })?;
         297  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         298  +
        }
  138    299   
    }
  139    300   
}
  140    301   
#[derive(Debug)]
  141    302   
struct ScanRequestSerializer;
  142    303   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ScanRequestSerializer {
  143    304   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  144    305   
    fn serialize_input(
  145    306   
        &self,
  146    307   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  147    308   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  148    309   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  149    310   
        let input = input.downcast::<crate::operation::scan::ScanInput>().expect("correct type");
  150         -
        let _header_serialization_settings = _cfg
  151         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  152         -
            .cloned()
  153         -
            .unwrap_or_default();
  154         -
        let mut request_builder = {
  155         -
            #[allow(clippy::uninlined_format_args)]
  156         -
            fn uri_base(
  157         -
                _input: &crate::operation::scan::ScanInput,
  158         -
                output: &mut ::std::string::String,
  159         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  160         -
                use ::std::fmt::Write as _;
  161         -
                ::std::write!(output, "/").expect("formatting should succeed");
  162         -
                ::std::result::Result::Ok(())
  163         -
            }
  164         -
            #[allow(clippy::unnecessary_wraps)]
  165         -
            fn update_http_builder(
  166         -
                input: &crate::operation::scan::ScanInput,
  167         -
                builder: ::http_1x::request::Builder,
  168         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  169         -
                let mut uri = ::std::string::String::new();
  170         -
                uri_base(input, &mut uri)?;
  171         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  172         -
            }
  173         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  174         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  175         -
            builder = _header_serialization_settings.set_default_header(
  176         -
                builder,
  177         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  178         -
                "DynamoDB_20120810.Scan",
  179         -
            );
  180         -
            builder
  181         -
        };
  182         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_scan::ser_scan_input(&input)?);
  183         -
        if let Some(content_length) = body.content_length() {
  184         -
            let content_length = content_length.to_string();
  185         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  186         -
        }
  187         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         311  +
        let protocol = _cfg
         312  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
            .expect("a SharedClientProtocol is required");
         314  +
        let mut request = protocol
         315  +
            .serialize_request(&input, Scan::INPUT_SCHEMA, "", _cfg)
         316  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         317  +
         318  +
        return ::std::result::Result::Ok(request);
  188    319   
    }
  189    320   
}
  190    321   
#[derive(Debug)]
  191    322   
struct ScanEndpointParamsInterceptor;
  192    323   
  193    324   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ScanEndpointParamsInterceptor {
  194    325   
    fn name(&self) -> &'static str {
  195    326   
        "ScanEndpointParamsInterceptor"
  196    327   
    }
  197    328