Client Test

Client Test

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

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

@@ -5,5 +151,159 @@
   25     25   
    "com.amazonaws.dynamodb.synthetic",
   26     26   
    "DescribeGlobalTableSettingsOutput",
   27     27   
);
   28     28   
static DESCRIBEGLOBALTABLESETTINGSOUTPUT_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#DescribeGlobalTableSettingsOutput$GlobalTableName",
   31     31   
        "com.amazonaws.dynamodb.synthetic",
   32     32   
        "DescribeGlobalTableSettingsOutput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::String,
   35         -
    "global_table_name",
          35  +
    "GlobalTableName",
   36     36   
    0,
   37     37   
);
   38     38   
static DESCRIBEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.dynamodb.synthetic#DescribeGlobalTableSettingsOutput$ReplicaSettings",
   41     41   
        "com.amazonaws.dynamodb.synthetic",
   42     42   
        "DescribeGlobalTableSettingsOutput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::List,
   45         -
    "replica_settings",
          45  +
    "ReplicaSettings",
   46     46   
    1,
   47     47   
);
   48     48   
static DESCRIBEGLOBALTABLESETTINGSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    DESCRIBEGLOBALTABLESETTINGSOUTPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[
   52     52   
        &DESCRIBEGLOBALTABLESETTINGSOUTPUT_MEMBER_GLOBAL_TABLE_NAME,
   53     53   
        &DESCRIBEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS,
   54     54   
    ],
   55     55   
);
   56     56   
impl DescribeGlobalTableSettingsOutput {
   57     57   
    /// The schema for this shape.
   58     58   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEGLOBALTABLESETTINGSOUTPUT_SCHEMA;
   59     59   
}
   60     60   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeGlobalTableSettingsOutput {
   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(&DESCRIBEGLOBALTABLESETTINGSOUTPUT_MEMBER_GLOBAL_TABLE_NAME, val)?;
   68     68   
        }
   69     69   
        if let Some(ref val) = self.replica_settings {
   70     70   
            ser.write_list(
   71     71   
                &DESCRIBEGLOBALTABLESETTINGSOUTPUT_MEMBER_REPLICA_SETTINGS,
   72     72   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     73   
                    for item in val {
   74     74   
                        ser.write_struct(crate::types::ReplicaSettingsDescription::SCHEMA, item)?;
   75     75   
                    }
   76     76   
                    Ok(())
   77     77   
                },
   78     78   
            )?;
   79     79   
        }
   80     80   
        Ok(())
   81     81   
    }
   82     82   
}
   83     83   
impl DescribeGlobalTableSettingsOutput {
   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(&DESCRIBEGLOBALTABLESETTINGSOUTPUT_SCHEMA, (), |_, member, deser| {
          97  +
        deserializer.read_struct(&DESCRIBEGLOBALTABLESETTINGSOUTPUT_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_settings = 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::ReplicaSettingsDescription::deserialize(deser)?);
  111         -
                            Ok(list)
  112         -
                        })?
         104  +
                        let mut container = Vec::new();
         105  +
                        deser.read_list(member, &mut |deser| {
         106  +
                            container.push(crate::types::ReplicaSettingsDescription::deserialize(deser)?);
         107  +
                            Ok(())
         108  +
                        })?;
         109  +
                        container
  113    110   
                    });
  114    111   
                }
  115    112   
                _ => {}
  116    113   
            }
  117    114   
            Ok(())
  118    115   
        })?;
  119    116   
        Ok(builder.build())
  120    117   
    }
  121    118   
}
         119  +
impl DescribeGlobalTableSettingsOutput {
         120  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         121  +
    pub fn deserialize_with_response(
         122  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         123  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         124  +
        _status: u16,
         125  +
        _body: &[u8],
         126  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         127  +
        Self::deserialize(deserializer)
         128  +
    }
         129  +
}
  122    130   
impl DescribeGlobalTableSettingsOutput {
  123    131   
    /// Creates a new builder-style object to manufacture [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
  124    132   
    pub fn builder() -> crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder {
  125    133   
        crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder::default()
  126    134   
    }
  127    135   
}
  128    136   
  129    137   
/// A builder for [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
  130    138   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  131    139   
#[non_exhaustive]

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

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

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

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

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

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

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

@@ -1,1 +70,83 @@
   19     19   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   20     20   
    fn serialize_members(
   21     21   
        &self,
   22     22   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   23     23   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   24     24   
        Ok(())
   25     25   
    }
   26     26   
}
   27     27   
impl DescribeLimitsInput {
   28     28   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   29         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   30         -
        deserializer: &mut D,
          29  +
    pub fn deserialize(
          30  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   31     31   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   32     32   
        #[allow(unused_variables, unused_mut)]
   33     33   
        let mut builder = Self::builder();
   34     34   
        #[allow(
   35     35   
            unused_variables,
   36     36   
            unreachable_code,
   37     37   
            clippy::single_match,
   38     38   
            clippy::match_single_binding,
   39     39   
            clippy::diverging_sub_expression
   40     40   
        )]
   41         -
        deserializer.read_struct(&DESCRIBELIMITSINPUT_SCHEMA, (), |_, member, deser| {
          41  +
        deserializer.read_struct(&DESCRIBELIMITSINPUT_SCHEMA, &mut |member, deser| {
   42     42   
            match member.member_index() {
   43     43   
                _ => {}
   44     44   
            }
   45     45   
            Ok(())
   46     46   
        })?;
   47     47   
        builder
   48     48   
            .build()
   49     49   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   50     50   
    }
   51     51   
}
          52  +
impl DescribeLimitsInput {
          53  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          54  +
    pub fn deserialize_with_response(
          55  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          56  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          57  +
        _status: u16,
          58  +
        _body: &[u8],
          59  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          60  +
        Self::builder()
          61  +
            .build()
          62  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          63  +
    }
          64  +
}
   52     65   
impl DescribeLimitsInput {
   53     66   
    /// Creates a new builder-style object to manufacture [`DescribeLimitsInput`](crate::operation::describe_limits::DescribeLimitsInput).
   54     67   
    pub fn builder() -> crate::operation::describe_limits::builders::DescribeLimitsInputBuilder {
   55     68   
        crate::operation::describe_limits::builders::DescribeLimitsInputBuilder::default()
   56     69   
    }
   57     70   
}
   58     71   
   59     72   
/// A builder for [`DescribeLimitsInput`](crate::operation::describe_limits::DescribeLimitsInput).
   60     73   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   61     74   
#[non_exhaustive]

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

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

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

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

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

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

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

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