AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

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

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `UpdateGlobalTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateGlobalTable;
    6      6   
impl UpdateGlobalTable {
    7      7   
    /// Creates a new `UpdateGlobalTable`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table::UpdateGlobalTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table::UpdateGlobalTableOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_global_table::UpdateGlobalTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_global_table::UpdateGlobalTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_global_table::UpdateGlobalTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,406 @@
  138    142   
                crate::operation::update_global_table::UpdateGlobalTableError,
  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 UpdateGlobalTableResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateGlobalTableResponseDeserializer {
  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_update_global_table::de_update_global_table_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_update_global_table::de_update_global_table_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::update_global_table::UpdateGlobalTableError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "GlobalTableNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::GlobalTableNotFoundException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::GlobalTableNotFoundException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::GlobalTableNotFoundException::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  +
                "InternalServerError" => crate::operation::update_global_table::UpdateGlobalTableError::InternalServerError({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::update_global_table::UpdateGlobalTableError::InvalidEndpointException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidEndpointException::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  +
                "ReplicaAlreadyExistsException" => crate::operation::update_global_table::UpdateGlobalTableError::ReplicaAlreadyExistsException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ReplicaAlreadyExistsException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ReplicaAlreadyExistsException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                "ReplicaNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::ReplicaNotFoundException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ReplicaNotFoundException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ReplicaNotFoundException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                "TableNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::TableNotFoundException({
         306  +
                    let mut tmp = match protocol
         307  +
                        .deserialize_response(response, crate::types::error::TableNotFoundException::SCHEMA, _cfg)
         308  +
                        .and_then(|mut deser| {
         309  +
                            crate::types::error::TableNotFoundException::deserialize_with_response(
         310  +
                                &mut *deser,
         311  +
                                response.headers(),
         312  +
                                response.status().into(),
         313  +
                                body,
         314  +
                            )
         315  +
                        }) {
         316  +
                        ::std::result::Result::Ok(val) => val,
         317  +
                        ::std::result::Result::Err(e) => {
         318  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         320  +
                            ))
         321  +
                        }
  162    322   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         323  +
                    tmp.meta = generic;
         324  +
                    if tmp.message.is_none() {
         325  +
                        tmp.message = _error_message;
         326  +
                    }
         327  +
                    tmp
         328  +
                }),
         329  +
                _ => crate::operation::update_global_table::UpdateGlobalTableError::generic(generic),
         330  +
            };
         331  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         332  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         333  +
            ))
         334  +
        } else {
         335  +
            let protocol = _cfg
         336  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         337  +
                .expect("a SharedClientProtocol is required");
         338  +
            let mut deser = protocol
         339  +
                .deserialize_response(response, UpdateGlobalTable::OUTPUT_SCHEMA, _cfg)
         340  +
                .map_err(|e| {
         341  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         342  +
                })?;
         343  +
            let body = response.body().bytes().expect("body loaded");
         344  +
            let output = crate::operation::update_global_table::UpdateGlobalTableOutput::deserialize_with_response(
         345  +
                &mut *deser,
         346  +
                response.headers(),
         347  +
                response.status().into(),
         348  +
                body,
         349  +
            )
         350  +
            .map_err(|e| {
         351  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         352  +
            })?;
         353  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         354  +
        }
  164    355   
    }
  165    356   
}
  166    357   
#[derive(Debug)]
  167    358   
struct UpdateGlobalTableRequestSerializer;
  168    359   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateGlobalTableRequestSerializer {
  169    360   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    361   
    fn serialize_input(
  171    362   
        &self,
  172    363   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    364   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    365   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    366   
        let input = input
  176    367   
            .downcast::<crate::operation::update_global_table::UpdateGlobalTableInput>()
  177    368   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::update_global_table::UpdateGlobalTableInput,
  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::update_global_table::UpdateGlobalTableInput,
  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.UpdateGlobalTable",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_global_table::ser_update_global_table_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())
         369  +
        let protocol = _cfg
         370  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         371  +
            .expect("a SharedClientProtocol is required");
         372  +
        let mut request = protocol
         373  +
            .serialize_request(&input, UpdateGlobalTable::INPUT_SCHEMA, "", _cfg)
         374  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         375  +
         376  +
        return ::std::result::Result::Ok(request);
  216    377   
    }
  217    378   
}
  218    379   
#[derive(Debug)]
  219    380   
struct UpdateGlobalTableEndpointParamsInterceptor;
  220    381   
  221    382   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateGlobalTableEndpointParamsInterceptor {
  222    383   
    fn name(&self) -> &'static str {
  223    384   
        "UpdateGlobalTableEndpointParamsInterceptor"
  224    385   
    }
  225    386   

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

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

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

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

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

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

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

@@ -46,46 +159,159 @@
   66     66   
    "com.amazonaws.dynamodb.synthetic",
   67     67   
    "UpdateGlobalTableSettingsInput",
   68     68   
);
   69     69   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$GlobalTableName",
   72     72   
        "com.amazonaws.dynamodb.synthetic",
   73     73   
        "UpdateGlobalTableSettingsInput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76         -
    "global_table_name",
          76  +
    "GlobalTableName",
   77     77   
    0,
   78     78   
);
   79     79   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_BILLING_MODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   80     80   
    ::aws_smithy_schema::ShapeId::from_static(
   81     81   
        "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$GlobalTableBillingMode",
   82     82   
        "com.amazonaws.dynamodb.synthetic",
   83     83   
        "UpdateGlobalTableSettingsInput",
   84     84   
    ),
   85     85   
    ::aws_smithy_schema::ShapeType::String,
   86         -
    "global_table_billing_mode",
          86  +
    "GlobalTableBillingMode",
   87     87   
    1,
   88     88   
);
   89     89   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_PROVISIONED_WRITE_CAPACITY_UNITS: ::aws_smithy_schema::Schema =
   90     90   
    ::aws_smithy_schema::Schema::new_member(
   91     91   
        ::aws_smithy_schema::ShapeId::from_static(
   92     92   
            "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$GlobalTableProvisionedWriteCapacityUnits",
   93     93   
            "com.amazonaws.dynamodb.synthetic",
   94     94   
            "UpdateGlobalTableSettingsInput",
   95     95   
        ),
   96     96   
        ::aws_smithy_schema::ShapeType::Long,
   97         -
        "global_table_provisioned_write_capacity_units",
          97  +
        "GlobalTableProvisionedWriteCapacityUnits",
   98     98   
        2,
   99     99   
    );
  100    100   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_PROVISIONED_WRITE_CAPACITY_AUTO_SCALING_SETTINGS_UPDATE: ::aws_smithy_schema::Schema =
  101    101   
    ::aws_smithy_schema::Schema::new_member(
  102    102   
        ::aws_smithy_schema::ShapeId::from_static(
  103    103   
            "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate",
  104    104   
            "com.amazonaws.dynamodb.synthetic",
  105    105   
            "UpdateGlobalTableSettingsInput",
  106    106   
        ),
  107    107   
        ::aws_smithy_schema::ShapeType::Structure,
  108         -
        "global_table_provisioned_write_capacity_auto_scaling_settings_update",
         108  +
        "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate",
  109    109   
        3,
  110    110   
    );
  111    111   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_GLOBAL_SECONDARY_INDEX_SETTINGS_UPDATE: ::aws_smithy_schema::Schema =
  112    112   
    ::aws_smithy_schema::Schema::new_member(
  113    113   
        ::aws_smithy_schema::ShapeId::from_static(
  114    114   
            "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$GlobalTableGlobalSecondaryIndexSettingsUpdate",
  115    115   
            "com.amazonaws.dynamodb.synthetic",
  116    116   
            "UpdateGlobalTableSettingsInput",
  117    117   
        ),
  118    118   
        ::aws_smithy_schema::ShapeType::List,
  119         -
        "global_table_global_secondary_index_settings_update",
         119  +
        "GlobalTableGlobalSecondaryIndexSettingsUpdate",
  120    120   
        4,
  121    121   
    );
  122    122   
static UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_REPLICA_SETTINGS_UPDATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.dynamodb.synthetic#UpdateGlobalTableSettingsInput$ReplicaSettingsUpdate",
  125    125   
        "com.amazonaws.dynamodb.synthetic",
  126    126   
        "UpdateGlobalTableSettingsInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::List,
  129         -
    "replica_settings_update",
         129  +
    "ReplicaSettingsUpdate",
  130    130   
    5,
  131    131   
);
  132    132   
static UPDATEGLOBALTABLESETTINGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  133    133   
    UPDATEGLOBALTABLESETTINGSINPUT_SCHEMA_ID,
  134    134   
    ::aws_smithy_schema::ShapeType::Structure,
  135    135   
    &[
  136    136   
        &UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_NAME,
  137    137   
        &UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_BILLING_MODE,
  138    138   
        &UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_PROVISIONED_WRITE_CAPACITY_UNITS,
  139    139   
        &UPDATEGLOBALTABLESETTINGSINPUT_MEMBER_GLOBAL_TABLE_PROVISIONED_WRITE_CAPACITY_AUTO_SCALING_SETTINGS_UPDATE,
@@ -166,166 +287,293 @@
  186    186   
                    }
  187    187   
                    Ok(())
  188    188   
                },
  189    189   
            )?;
  190    190   
        }
  191    191   
        Ok(())
  192    192   
    }
  193    193   
}
  194    194   
impl UpdateGlobalTableSettingsInput {
  195    195   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  196         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  197         -
        deserializer: &mut D,
         196  +
    pub fn deserialize(
         197  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  198    198   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  199    199   
        #[allow(unused_variables, unused_mut)]
  200    200   
        let mut builder = Self::builder();
  201    201   
        #[allow(
  202    202   
            unused_variables,
  203    203   
            unreachable_code,
  204    204   
            clippy::single_match,
  205    205   
            clippy::match_single_binding,
  206    206   
            clippy::diverging_sub_expression
  207    207   
        )]
  208         -
        deserializer.read_struct(&UPDATEGLOBALTABLESETTINGSINPUT_SCHEMA, (), |_, member, deser| {
         208  +
        deserializer.read_struct(&UPDATEGLOBALTABLESETTINGSINPUT_SCHEMA, &mut |member, deser| {
  209    209   
            match member.member_index() {
  210    210   
                Some(0) => {
  211    211   
                    builder.global_table_name = Some(deser.read_string(member)?);
  212    212   
                }
  213    213   
                Some(1) => {
  214    214   
                    builder.global_table_billing_mode = Some(crate::types::BillingMode::from(deser.read_string(member)?.as_str()));
  215    215   
                }
  216    216   
                Some(2) => {
  217    217   
                    builder.global_table_provisioned_write_capacity_units = Some(deser.read_long(member)?);
  218    218   
                }
  219    219   
                Some(3) => {
  220    220   
                    builder.global_table_provisioned_write_capacity_auto_scaling_settings_update =
  221    221   
                        Some(crate::types::AutoScalingSettingsUpdate::deserialize(deser)?);
  222    222   
                }
  223    223   
                Some(4) => {
  224    224   
                    builder.global_table_global_secondary_index_settings_update = Some({
  225         -
                        let container = if let Some(cap) = deser.container_size() {
  226         -
                            Vec::with_capacity(cap)
  227         -
                        } else {
  228         -
                            Vec::new()
  229         -
                        };
  230         -
                        deser.read_list(member, container, |mut list, deser| {
  231         -
                            list.push(crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate::deserialize(deser)?);
  232         -
                            Ok(list)
  233         -
                        })?
         225  +
                        let mut container = Vec::new();
         226  +
                        deser.read_list(member, &mut |deser| {
         227  +
                            container.push(crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate::deserialize(deser)?);
         228  +
                            Ok(())
         229  +
                        })?;
         230  +
                        container
  234    231   
                    });
  235    232   
                }
  236    233   
                Some(5) => {
  237    234   
                    builder.replica_settings_update = Some({
  238         -
                        let container = if let Some(cap) = deser.container_size() {
  239         -
                            Vec::with_capacity(cap)
  240         -
                        } else {
  241         -
                            Vec::new()
  242         -
                        };
  243         -
                        deser.read_list(member, container, |mut list, deser| {
  244         -
                            list.push(crate::types::ReplicaSettingsUpdate::deserialize(deser)?);
  245         -
                            Ok(list)
  246         -
                        })?
         235  +
                        let mut container = Vec::new();
         236  +
                        deser.read_list(member, &mut |deser| {
         237  +
                            container.push(crate::types::ReplicaSettingsUpdate::deserialize(deser)?);
         238  +
                            Ok(())
         239  +
                        })?;
         240  +
                        container
  247    241   
                    });
  248    242   
                }
  249    243   
                _ => {}
  250    244   
            }
  251    245   
            Ok(())
  252    246   
        })?;
         247  +
        builder.global_table_name = builder.global_table_name.or(Some(String::new()));
  253    248   
        builder
  254    249   
            .build()
  255    250   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  256    251   
    }
  257    252   
}
         253  +
impl UpdateGlobalTableSettingsInput {
         254  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         255  +
    pub fn deserialize_with_response(
         256  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         257  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         258  +
        _status: u16,
         259  +
        _body: &[u8],
         260  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         261  +
        Self::deserialize(deserializer)
         262  +
    }
         263  +
}
  258    264   
impl UpdateGlobalTableSettingsInput {
  259    265   
    /// Creates a new builder-style object to manufacture [`UpdateGlobalTableSettingsInput`](crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput).
  260    266   
    pub fn builder() -> crate::operation::update_global_table_settings::builders::UpdateGlobalTableSettingsInputBuilder {
  261    267   
        crate::operation::update_global_table_settings::builders::UpdateGlobalTableSettingsInputBuilder::default()
  262    268   
    }
  263    269   
}
  264    270   
  265    271   
/// A builder for [`UpdateGlobalTableSettingsInput`](crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput).
  266    272   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  267    273   
#[non_exhaustive]