AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/list_imports.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 `ListImports`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListImports;
    6      6   
impl ListImports {
    7      7   
    /// Creates a new `ListImports`
    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::list_imports::ListImportsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_imports::ListImportsOutput::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::list_imports::ListImportsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_imports::ListImportsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_imports::ListImportsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,279 @@
  135    139   
                crate::operation::list_imports::ListImportsError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct ListImportsResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListImportsResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_list_imports::de_list_imports_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_list_imports::de_list_imports_http_response(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_imports::ListImportsError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "LimitExceededException" => crate::operation::list_imports::ListImportsError::LimitExceededException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                _ => crate::operation::list_imports::ListImportsError::generic(generic),
  159    205   
            };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         206  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         207  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         208  +
            ))
         209  +
        } else {
         210  +
            let protocol = _cfg
         211  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         212  +
                .expect("a SharedClientProtocol is required");
         213  +
            let mut deser = protocol.deserialize_response(response, ListImports::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         214  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         215  +
            })?;
         216  +
            let body = response.body().bytes().expect("body loaded");
         217  +
            let output = crate::operation::list_imports::ListImportsOutput::deserialize_with_response(
         218  +
                &mut *deser,
         219  +
                response.headers(),
         220  +
                response.status().into(),
         221  +
                body,
         222  +
            )
         223  +
            .map_err(|e| {
         224  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         225  +
            })?;
         226  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         227  +
        }
  161    228   
    }
  162    229   
}
  163    230   
#[derive(Debug)]
  164    231   
struct ListImportsRequestSerializer;
  165    232   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListImportsRequestSerializer {
  166    233   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    234   
    fn serialize_input(
  168    235   
        &self,
  169    236   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    237   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    238   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    239   
        let input = input
  173    240   
            .downcast::<crate::operation::list_imports::ListImportsInput>()
  174    241   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::list_imports::ListImportsInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            #[allow(clippy::unnecessary_wraps)]
  190         -
            fn update_http_builder(
  191         -
                input: &crate::operation::list_imports::ListImportsInput,
  192         -
                builder: ::http_1x::request::Builder,
  193         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  194         -
                let mut uri = ::std::string::String::new();
  195         -
                uri_base(input, &mut uri)?;
  196         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  197         -
            }
  198         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  199         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  200         -
            builder = _header_serialization_settings.set_default_header(
  201         -
                builder,
  202         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  203         -
                "DynamoDB_20120810.ListImports",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_imports::ser_list_imports_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         242  +
        let protocol = _cfg
         243  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         244  +
            .expect("a SharedClientProtocol is required");
         245  +
        let mut request = protocol
         246  +
            .serialize_request(&input, ListImports::INPUT_SCHEMA, "", _cfg)
         247  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         248  +
         249  +
        return ::std::result::Result::Ok(request);
  213    250   
    }
  214    251   
}
  215    252   
#[derive(Debug)]
  216    253   
struct ListImportsEndpointParamsInterceptor;
  217    254   
  218    255   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListImportsEndpointParamsInterceptor {
  219    256   
    fn name(&self) -> &'static str {
  220    257   
        "ListImportsEndpointParamsInterceptor"
  221    258   
    }
  222    259   

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

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

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

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

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

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

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

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

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

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

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

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

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

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