Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeTableReplicaAutoScalingInput",
   19     19   
);
   20     20   
static DESCRIBETABLEREPLICAAUTOSCALINGINPUT_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#DescribeTableReplicaAutoScalingInput$TableName",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeTableReplicaAutoScalingInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "table_name",
          27  +
    "TableName",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBETABLEREPLICAAUTOSCALINGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBETABLEREPLICAAUTOSCALINGINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBETABLEREPLICAAUTOSCALINGINPUT_MEMBER_TABLE_NAME],
   34     34   
);
   35     35   
impl DescribeTableReplicaAutoScalingInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETABLEREPLICAAUTOSCALINGINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTableReplicaAutoScalingInput {
   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(&DESCRIBETABLEREPLICAAUTOSCALINGINPUT_MEMBER_TABLE_NAME, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeTableReplicaAutoScalingInput {
   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(&DESCRIBETABLEREPLICAAUTOSCALINGINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBETABLEREPLICAAUTOSCALINGINPUT_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 DescribeTableReplicaAutoScalingInput {
          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 DescribeTableReplicaAutoScalingInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeTableReplicaAutoScalingInput`](crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput).
   81     93   
    pub fn builder() -> crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingInputBuilder {
   82     94   
        crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeTableReplicaAutoScalingInput`](crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingInput).
   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_table_replica_auto_scaling/_describe_table_replica_auto_scaling_output.rs

@@ -1,1 +107,118 @@
   18     18   
    "DescribeTableReplicaAutoScalingOutput",
   19     19   
);
   20     20   
static DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_MEMBER_TABLE_AUTO_SCALING_DESCRIPTION: ::aws_smithy_schema::Schema =
   21     21   
    ::aws_smithy_schema::Schema::new_member(
   22     22   
        ::aws_smithy_schema::ShapeId::from_static(
   23     23   
            "com.amazonaws.dynamodb.synthetic#DescribeTableReplicaAutoScalingOutput$TableAutoScalingDescription",
   24     24   
            "com.amazonaws.dynamodb.synthetic",
   25     25   
            "DescribeTableReplicaAutoScalingOutput",
   26     26   
        ),
   27     27   
        ::aws_smithy_schema::ShapeType::Structure,
   28         -
        "table_auto_scaling_description",
          28  +
        "TableAutoScalingDescription",
   29     29   
        0,
   30     30   
    );
   31     31   
static DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_MEMBER_TABLE_AUTO_SCALING_DESCRIPTION],
   35     35   
);
   36     36   
impl DescribeTableReplicaAutoScalingOutput {
   37     37   
    /// The schema for this shape.
   38     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_SCHEMA;
   39     39   
}
   40     40   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTableReplicaAutoScalingOutput {
   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_auto_scaling_description {
   47     47   
            ser.write_struct(&DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_MEMBER_TABLE_AUTO_SCALING_DESCRIPTION, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl DescribeTableReplicaAutoScalingOutput {
   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(&DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&DESCRIBETABLEREPLICAAUTOSCALINGOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.table_auto_scaling_description = Some(crate::types::TableAutoScalingDescription::deserialize(deser)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl DescribeTableReplicaAutoScalingOutput {
          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 DescribeTableReplicaAutoScalingOutput {
   79     90   
    /// Creates a new builder-style object to manufacture [`DescribeTableReplicaAutoScalingOutput`](crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput).
   80     91   
    pub fn builder() -> crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingOutputBuilder {
   81     92   
        crate::operation::describe_table_replica_auto_scaling::builders::DescribeTableReplicaAutoScalingOutputBuilder::default()
   82     93   
    }
   83     94   
}
   84     95   
   85     96   
/// A builder for [`DescribeTableReplicaAutoScalingOutput`](crate::operation::describe_table_replica_auto_scaling::DescribeTableReplicaAutoScalingOutput).
   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_time_to_live.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 `DescribeTimeToLive`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeTimeToLive;
    6      6   
impl DescribeTimeToLive {
    7      7   
    /// Creates a new `DescribeTimeToLive`
    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_time_to_live::DescribeTimeToLiveInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_time_to_live::DescribeTimeToLiveOutput::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_time_to_live::DescribeTimeToLiveInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_time_to_live::DescribeTimeToLiveOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_time_to_live::DescribeTimeToLiveError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +233,320 @@
  124    128   
                crate::operation::describe_time_to_live::DescribeTimeToLiveError,
  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 DescribeTimeToLiveResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeTimeToLiveResponseDeserializer {
  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());
  139         -
        let headers = response.headers();
  140         -
        let body = response.body().bytes().expect("body loaded");
  141    144   
        #[allow(unused_mut)]
  142    145   
        let mut force_error = false;
  143    146   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_describe_time_to_live::de_describe_time_to_live_http_error(status, headers, body)
         147  +
        if !success && status != 200 || force_error {
         148  +
            let headers = response.headers();
         149  +
            let body = response.body().bytes().expect("body loaded");
         150  +
            #[allow(unused_mut)]
         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  +
            })?;
         154  +
         155  +
            let generic = generic_builder.build();
         156  +
            let error_code = match generic.code() {
         157  +
                ::std::option::Option::Some(code) => code,
         158  +
                ::std::option::Option::None => {
         159  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         160  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         161  +
                            crate::operation::describe_time_to_live::DescribeTimeToLiveError::unhandled(generic),
         162  +
                        ),
         163  +
                    ))
         164  +
                }
         165  +
            };
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "InternalServerError" => crate::operation::describe_time_to_live::DescribeTimeToLiveError::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_time_to_live::DescribeTimeToLiveError::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  +
                "ResourceNotFoundException" => crate::operation::describe_time_to_live::DescribeTimeToLiveError::ResourceNotFoundError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                _ => crate::operation::describe_time_to_live::DescribeTimeToLiveError::generic(generic),
         244  +
            };
         245  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         246  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         247  +
            ))
  146    248   
        } else {
  147         -
            crate::protocol_serde::shape_describe_time_to_live::de_describe_time_to_live_http_response(status, headers, body)
  148         -
        };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         249  +
            let protocol = _cfg
         250  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         251  +
                .expect("a SharedClientProtocol is required");
         252  +
            let mut deser = protocol
         253  +
                .deserialize_response(response, DescribeTimeToLive::OUTPUT_SCHEMA, _cfg)
         254  +
                .map_err(|e| {
         255  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
                })?;
         257  +
            let body = response.body().bytes().expect("body loaded");
         258  +
            let output = crate::operation::describe_time_to_live::DescribeTimeToLiveOutput::deserialize_with_response(
         259  +
                &mut *deser,
         260  +
                response.headers(),
         261  +
                response.status().into(),
         262  +
                body,
         263  +
            )
         264  +
            .map_err(|e| {
         265  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         266  +
            })?;
         267  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         268  +
        }
  150    269   
    }
  151    270   
}
  152    271   
#[derive(Debug)]
  153    272   
struct DescribeTimeToLiveRequestSerializer;
  154    273   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeTimeToLiveRequestSerializer {
  155    274   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    275   
    fn serialize_input(
  157    276   
        &self,
  158    277   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    278   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    279   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    280   
        let input = input
  162    281   
            .downcast::<crate::operation::describe_time_to_live::DescribeTimeToLiveInput>()
  163    282   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::describe_time_to_live::DescribeTimeToLiveInput,
  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_time_to_live::DescribeTimeToLiveInput,
  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.DescribeTimeToLive",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_time_to_live::ser_describe_time_to_live_input(
  197         -
            &input,
  198         -
        )?);
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         283  +
        let protocol = _cfg
         284  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
            .expect("a SharedClientProtocol is required");
         286  +
        let mut request = protocol
         287  +
            .serialize_request(&input, DescribeTimeToLive::INPUT_SCHEMA, "", _cfg)
         288  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         289  +
         290  +
        return ::std::result::Result::Ok(request);
  204    291   
    }
  205    292   
}
  206    293   
#[derive(Debug)]
  207    294   
struct DescribeTimeToLiveEndpointParamsInterceptor;
  208    295   
  209    296   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeTimeToLiveEndpointParamsInterceptor {
  210    297   
    fn name(&self) -> &'static str {
  211    298   
        "DescribeTimeToLiveEndpointParamsInterceptor"
  212    299   
    }
  213    300   

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeTimeToLiveInput",
   19     19   
);
   20     20   
static DESCRIBETIMETOLIVEINPUT_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#DescribeTimeToLiveInput$TableName",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeTimeToLiveInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "table_name",
          27  +
    "TableName",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBETIMETOLIVEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBETIMETOLIVEINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBETIMETOLIVEINPUT_MEMBER_TABLE_NAME],
   34     34   
);
   35     35   
impl DescribeTimeToLiveInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETIMETOLIVEINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTimeToLiveInput {
   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(&DESCRIBETIMETOLIVEINPUT_MEMBER_TABLE_NAME, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeTimeToLiveInput {
   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(&DESCRIBETIMETOLIVEINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBETIMETOLIVEINPUT_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 DescribeTimeToLiveInput {
          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 DescribeTimeToLiveInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeTimeToLiveInput`](crate::operation::describe_time_to_live::DescribeTimeToLiveInput).
   81     93   
    pub fn builder() -> crate::operation::describe_time_to_live::builders::DescribeTimeToLiveInputBuilder {
   82     94   
        crate::operation::describe_time_to_live::builders::DescribeTimeToLiveInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeTimeToLiveInput`](crate::operation::describe_time_to_live::DescribeTimeToLiveInput).
   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_time_to_live/_describe_time_to_live_output.rs

@@ -1,1 +106,117 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeTimeToLiveOutput",
   19     19   
);
   20     20   
static DESCRIBETIMETOLIVEOUTPUT_MEMBER_TIME_TO_LIVE_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#DescribeTimeToLiveOutput$TimeToLiveDescription",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeTimeToLiveOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27         -
    "time_to_live_description",
          27  +
    "TimeToLiveDescription",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBETIMETOLIVEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBETIMETOLIVEOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBETIMETOLIVEOUTPUT_MEMBER_TIME_TO_LIVE_DESCRIPTION],
   34     34   
);
   35     35   
impl DescribeTimeToLiveOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBETIMETOLIVEOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeTimeToLiveOutput {
   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.time_to_live_description {
   46     46   
            ser.write_struct(&DESCRIBETIMETOLIVEOUTPUT_MEMBER_TIME_TO_LIVE_DESCRIPTION, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeTimeToLiveOutput {
   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(&DESCRIBETIMETOLIVEOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBETIMETOLIVEOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.time_to_live_description = Some(crate::types::TimeToLiveDescription::deserialize(deser)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl DescribeTimeToLiveOutput {
          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 DescribeTimeToLiveOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`DescribeTimeToLiveOutput`](crate::operation::describe_time_to_live::DescribeTimeToLiveOutput).
   79     90   
    pub fn builder() -> crate::operation::describe_time_to_live::builders::DescribeTimeToLiveOutputBuilder {
   80     91   
        crate::operation::describe_time_to_live::builders::DescribeTimeToLiveOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`DescribeTimeToLiveOutput`](crate::operation::describe_time_to_live::DescribeTimeToLiveOutput).
   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/disable_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 `DisableKinesisStreamingDestination`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisableKinesisStreamingDestination;
    6      6   
impl DisableKinesisStreamingDestination {
    7      7   
    /// Creates a new `DisableKinesisStreamingDestination`
    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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +243,387 @@
  130    136   
                crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError,
  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 DisableKinesisStreamingDestinationResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisableKinesisStreamingDestinationResponseDeserializer {
  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());
  145         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_disable_kinesis_streaming_destination::de_disable_kinesis_streaming_destination_http_error(
  152         -
                status, headers, body,
  153         -
            )
         155  +
        if !success && status != 200 || force_error {
         156  +
            let headers = response.headers();
         157  +
            let body = response.body().bytes().expect("body loaded");
         158  +
            #[allow(unused_mut)]
         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  +
            })?;
         162  +
         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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::InternalServerError({
         181  +
                        let mut tmp = match protocol
         182  +
                            .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         183  +
                            .and_then(|mut deser| {
         184  +
                                crate::types::error::InternalServerError::deserialize_with_response(
         185  +
                                    &mut *deser,
         186  +
                                    response.headers(),
         187  +
                                    response.status().into(),
         188  +
                                    body,
         189  +
                                )
         190  +
                            }) {
         191  +
                            ::std::result::Result::Ok(val) => val,
         192  +
                            ::std::result::Result::Err(e) => {
         193  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                                ))
         196  +
                            }
         197  +
                        };
         198  +
                        tmp.meta = generic;
         199  +
                        if tmp.message.is_none() {
         200  +
                            tmp.message = _error_message;
         201  +
                        }
         202  +
                        tmp
         203  +
                    })
         204  +
                }
         205  +
                "InvalidEndpointException" => {
         206  +
                    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::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,
         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  +
                "LimitExceededException" => {
         232  +
                    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::LimitExceededError({
         233  +
                        let mut tmp = match protocol
         234  +
                            .deserialize_response(response, crate::types::error::LimitExceededError::SCHEMA, _cfg)
         235  +
                            .and_then(|mut deser| {
         236  +
                                crate::types::error::LimitExceededError::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  +
                "ResourceInUseException" => {
         258  +
                    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceInUseError({
         259  +
                        let mut tmp = match protocol
         260  +
                            .deserialize_response(response, crate::types::error::ResourceInUseError::SCHEMA, _cfg)
         261  +
                            .and_then(|mut deser| {
         262  +
                                crate::types::error::ResourceInUseError::deserialize_with_response(
         263  +
                                    &mut *deser,
         264  +
                                    response.headers(),
         265  +
                                    response.status().into(),
         266  +
                                    body,
         267  +
                                )
         268  +
                            }) {
         269  +
                            ::std::result::Result::Ok(val) => val,
         270  +
                            ::std::result::Result::Err(e) => {
         271  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                                ))
         274  +
                            }
         275  +
                        };
         276  +
                        tmp.meta = generic;
         277  +
                        if tmp.message.is_none() {
         278  +
                            tmp.message = _error_message;
         279  +
                        }
         280  +
                        tmp
         281  +
                    })
         282  +
                }
         283  +
                "ResourceNotFoundException" => {
         284  +
                    crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::ResourceNotFoundError({
         285  +
                        let mut tmp = match protocol
         286  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         287  +
                            .and_then(|mut deser| {
         288  +
                                crate::types::error::ResourceNotFoundError::deserialize_with_response(
         289  +
                                    &mut *deser,
         290  +
                                    response.headers(),
         291  +
                                    response.status().into(),
         292  +
                                    body,
         293  +
                                )
         294  +
                            }) {
         295  +
                            ::std::result::Result::Ok(val) => val,
         296  +
                            ::std::result::Result::Err(e) => {
         297  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         298  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         299  +
                                ))
         300  +
                            }
         301  +
                        };
         302  +
                        tmp.meta = generic;
         303  +
                        if tmp.message.is_none() {
         304  +
                            tmp.message = _error_message;
         305  +
                        }
         306  +
                        tmp
         307  +
                    })
         308  +
                }
         309  +
                _ => crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationError::generic(generic),
         310  +
            };
         311  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         312  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         313  +
            ))
  154    314   
        } else {
  155         -
            crate::protocol_serde::shape_disable_kinesis_streaming_destination::de_disable_kinesis_streaming_destination_http_response(
  156         -
                status, headers, body,
  157         -
            )
  158         -
        };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         315  +
            let protocol = _cfg
         316  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
                .expect("a SharedClientProtocol is required");
         318  +
            let mut deser = protocol
         319  +
                .deserialize_response(response, DisableKinesisStreamingDestination::OUTPUT_SCHEMA, _cfg)
         320  +
                .map_err(|e| {
         321  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         322  +
                })?;
         323  +
            let body = response.body().bytes().expect("body loaded");
         324  +
            let output =
         325  +
                crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationOutput::deserialize_with_response(
         326  +
                    &mut *deser,
         327  +
                    response.headers(),
         328  +
                    response.status().into(),
         329  +
                    body,
         330  +
                )
         331  +
                .map_err(|e| {
         332  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         333  +
                })?;
         334  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         335  +
        }
  160    336   
    }
  161    337   
}
  162    338   
#[derive(Debug)]
  163    339   
struct DisableKinesisStreamingDestinationRequestSerializer;
  164    340   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisableKinesisStreamingDestinationRequestSerializer {
  165    341   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  166    342   
    fn serialize_input(
  167    343   
        &self,
  168    344   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  169    345   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  170    346   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  171    347   
        let input = input
  172    348   
            .downcast::<crate::operation::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput>()
  173    349   
            .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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput,
  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::disable_kinesis_streaming_destination::DisableKinesisStreamingDestinationInput,
  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.DisableKinesisStreamingDestination",
  203         -
            );
  204         -
            builder
  205         -
        };
  206         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  207         -
            crate::protocol_serde::shape_disable_kinesis_streaming_destination::ser_disable_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())
         350  +
        let protocol = _cfg
         351  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         352  +
            .expect("a SharedClientProtocol is required");
         353  +
        let mut request = protocol
         354  +
            .serialize_request(&input, DisableKinesisStreamingDestination::INPUT_SCHEMA, "", _cfg)
         355  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         356  +
         357  +
        return ::std::result::Result::Ok(request);
  214    358   
    }
  215    359   
}
  216    360   
#[derive(Debug)]
  217    361   
struct DisableKinesisStreamingDestinationEndpointParamsInterceptor;
  218    362   
  219    363   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisableKinesisStreamingDestinationEndpointParamsInterceptor {
  220    364   
    fn name(&self) -> &'static str {
  221    365   
        "DisableKinesisStreamingDestinationEndpointParamsInterceptor"
  222    366   
    }
  223    367   

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

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

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/enable_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 `EnableKinesisStreamingDestination`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct EnableKinesisStreamingDestination;
    6      6   
impl EnableKinesisStreamingDestination {
    7      7   
    /// Creates a new `EnableKinesisStreamingDestination`
    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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +243,386 @@
  130    136   
                crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError,
  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 EnableKinesisStreamingDestinationResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EnableKinesisStreamingDestinationResponseDeserializer {
  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());
  145         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_enable_kinesis_streaming_destination::de_enable_kinesis_streaming_destination_http_error(
  152         -
                status, headers, body,
  153         -
            )
         155  +
        if !success && status != 200 || force_error {
         156  +
            let headers = response.headers();
         157  +
            let body = response.body().bytes().expect("body loaded");
         158  +
            #[allow(unused_mut)]
         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  +
            })?;
         162  +
         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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::InternalServerError({
         181  +
                        let mut tmp = match protocol
         182  +
                            .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         183  +
                            .and_then(|mut deser| {
         184  +
                                crate::types::error::InternalServerError::deserialize_with_response(
         185  +
                                    &mut *deser,
         186  +
                                    response.headers(),
         187  +
                                    response.status().into(),
         188  +
                                    body,
         189  +
                                )
         190  +
                            }) {
         191  +
                            ::std::result::Result::Ok(val) => val,
         192  +
                            ::std::result::Result::Err(e) => {
         193  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                                ))
         196  +
                            }
         197  +
                        };
         198  +
                        tmp.meta = generic;
         199  +
                        if tmp.message.is_none() {
         200  +
                            tmp.message = _error_message;
         201  +
                        }
         202  +
                        tmp
         203  +
                    })
         204  +
                }
         205  +
                "InvalidEndpointException" => {
         206  +
                    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::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,
         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  +
                "LimitExceededException" => {
         232  +
                    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::LimitExceededError({
         233  +
                        let mut tmp = match protocol
         234  +
                            .deserialize_response(response, crate::types::error::LimitExceededError::SCHEMA, _cfg)
         235  +
                            .and_then(|mut deser| {
         236  +
                                crate::types::error::LimitExceededError::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  +
                "ResourceInUseException" => {
         258  +
                    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceInUseError({
         259  +
                        let mut tmp = match protocol
         260  +
                            .deserialize_response(response, crate::types::error::ResourceInUseError::SCHEMA, _cfg)
         261  +
                            .and_then(|mut deser| {
         262  +
                                crate::types::error::ResourceInUseError::deserialize_with_response(
         263  +
                                    &mut *deser,
         264  +
                                    response.headers(),
         265  +
                                    response.status().into(),
         266  +
                                    body,
         267  +
                                )
         268  +
                            }) {
         269  +
                            ::std::result::Result::Ok(val) => val,
         270  +
                            ::std::result::Result::Err(e) => {
         271  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                                ))
         274  +
                            }
         275  +
                        };
         276  +
                        tmp.meta = generic;
         277  +
                        if tmp.message.is_none() {
         278  +
                            tmp.message = _error_message;
         279  +
                        }
         280  +
                        tmp
         281  +
                    })
         282  +
                }
         283  +
                "ResourceNotFoundException" => {
         284  +
                    crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::ResourceNotFoundError({
         285  +
                        let mut tmp = match protocol
         286  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         287  +
                            .and_then(|mut deser| {
         288  +
                                crate::types::error::ResourceNotFoundError::deserialize_with_response(
         289  +
                                    &mut *deser,
         290  +
                                    response.headers(),
         291  +
                                    response.status().into(),
         292  +
                                    body,
         293  +
                                )
         294  +
                            }) {
         295  +
                            ::std::result::Result::Ok(val) => val,
         296  +
                            ::std::result::Result::Err(e) => {
         297  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         298  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         299  +
                                ))
         300  +
                            }
         301  +
                        };
         302  +
                        tmp.meta = generic;
         303  +
                        if tmp.message.is_none() {
         304  +
                            tmp.message = _error_message;
         305  +
                        }
         306  +
                        tmp
         307  +
                    })
         308  +
                }
         309  +
                _ => crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationError::generic(generic),
         310  +
            };
         311  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         312  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         313  +
            ))
  154    314   
        } else {
  155         -
            crate::protocol_serde::shape_enable_kinesis_streaming_destination::de_enable_kinesis_streaming_destination_http_response(
  156         -
                status, headers, body,
         315  +
            let protocol = _cfg
         316  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
                .expect("a SharedClientProtocol is required");
         318  +
            let mut deser = protocol
         319  +
                .deserialize_response(response, EnableKinesisStreamingDestination::OUTPUT_SCHEMA, _cfg)
         320  +
                .map_err(|e| {
         321  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         322  +
                })?;
         323  +
            let body = response.body().bytes().expect("body loaded");
         324  +
            let output = crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationOutput::deserialize_with_response(
         325  +
                &mut *deser,
         326  +
                response.headers(),
         327  +
                response.status().into(),
         328  +
                body,
  157    329   
            )
  158         -
        };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         330  +
            .map_err(|e| {
         331  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         332  +
            })?;
         333  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         334  +
        }
  160    335   
    }
  161    336   
}
  162    337   
#[derive(Debug)]
  163    338   
struct EnableKinesisStreamingDestinationRequestSerializer;
  164    339   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for EnableKinesisStreamingDestinationRequestSerializer {
  165    340   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  166    341   
    fn serialize_input(
  167    342   
        &self,
  168    343   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  169    344   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  170    345   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  171    346   
        let input = input
  172    347   
            .downcast::<crate::operation::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput>()
  173    348   
            .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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput,
  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::enable_kinesis_streaming_destination::EnableKinesisStreamingDestinationInput,
  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.EnableKinesisStreamingDestination",
  203         -
            );
  204         -
            builder
  205         -
        };
  206         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  207         -
            crate::protocol_serde::shape_enable_kinesis_streaming_destination::ser_enable_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())
         349  +
        let protocol = _cfg
         350  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         351  +
            .expect("a SharedClientProtocol is required");
         352  +
        let mut request = protocol
         353  +
            .serialize_request(&input, EnableKinesisStreamingDestination::INPUT_SCHEMA, "", _cfg)
         354  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         355  +
         356  +
        return ::std::result::Result::Ok(request);
  214    357   
    }
  215    358   
}
  216    359   
#[derive(Debug)]
  217    360   
struct EnableKinesisStreamingDestinationEndpointParamsInterceptor;
  218    361   
  219    362   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EnableKinesisStreamingDestinationEndpointParamsInterceptor {
  220    363   
    fn name(&self) -> &'static str {
  221    364   
        "EnableKinesisStreamingDestinationEndpointParamsInterceptor"
  222    365   
    }
  223    366   

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

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

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/execute_statement.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 `ExecuteStatement`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ExecuteStatement;
    6      6   
impl ExecuteStatement {
    7      7   
    /// Creates a new `ExecuteStatement`
    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::execute_statement::ExecuteStatementInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::execute_statement::ExecuteStatementOutput::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::execute_statement::ExecuteStatementInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::execute_statement::ExecuteStatementOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::execute_statement::ExecuteStatementError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +231,444 @@
  124    128   
                crate::operation::execute_statement::ExecuteStatementError,
  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 ExecuteStatementResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ExecuteStatementResponseDeserializer {
  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());
  139         -
        let headers = response.headers();
  140         -
        let body = response.body().bytes().expect("body loaded");
  141    144   
        #[allow(unused_mut)]
  142    145   
        let mut force_error = false;
  143    146   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_execute_statement::de_execute_statement_http_error(status, headers, body)
         147  +
        if !success && status != 200 || force_error {
         148  +
            let headers = response.headers();
         149  +
            let body = response.body().bytes().expect("body loaded");
         150  +
            #[allow(unused_mut)]
         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  +
            })?;
         154  +
         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::execute_statement::ExecuteStatementError::unhandled(
         161  +
                            generic,
         162  +
                        )),
         163  +
                    ))
         164  +
                }
         165  +
            };
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "ConditionalCheckFailedException" => crate::operation::execute_statement::ExecuteStatementError::ConditionalCheckFailedError({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::ConditionalCheckFailedError::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::ConditionalCheckFailedError::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  +
                "DuplicateItemException" => crate::operation::execute_statement::ExecuteStatementError::DuplicateItemError({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::DuplicateItemError::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::DuplicateItemError::deserialize_with_response(
         200  +
                                &mut *deser,
         201  +
                                response.headers(),
         202  +
                                response.status().into(),
         203  +
                                body,
         204  +
                            )
         205  +
                        }) {
         206  +
                        ::std::result::Result::Ok(val) => val,
         207  +
                        ::std::result::Result::Err(e) => {
         208  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         209  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         210  +
                            ))
         211  +
                        }
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
                    if tmp.message.is_none() {
         215  +
                        tmp.message = _error_message;
         216  +
                    }
         217  +
                    tmp
         218  +
                }),
         219  +
                "InternalServerError" => crate::operation::execute_statement::ExecuteStatementError::InternalServerError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                "ItemCollectionSizeLimitExceededException" => {
         244  +
                    crate::operation::execute_statement::ExecuteStatementError::ItemCollectionSizeLimitExceededError({
         245  +
                        let mut tmp = match protocol
         246  +
                            .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededError::SCHEMA, _cfg)
         247  +
                            .and_then(|mut deser| {
         248  +
                                crate::types::error::ItemCollectionSizeLimitExceededError::deserialize_with_response(
         249  +
                                    &mut *deser,
         250  +
                                    response.headers(),
         251  +
                                    response.status().into(),
         252  +
                                    body,
         253  +
                                )
         254  +
                            }) {
         255  +
                            ::std::result::Result::Ok(val) => val,
         256  +
                            ::std::result::Result::Err(e) => {
         257  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         258  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         259  +
                                ))
         260  +
                            }
         261  +
                        };
         262  +
                        tmp.meta = generic;
         263  +
                        if tmp.message.is_none() {
         264  +
                            tmp.message = _error_message;
         265  +
                        }
         266  +
                        tmp
         267  +
                    })
         268  +
                }
         269  +
                "ProvisionedThroughputExceededException" => {
         270  +
                    crate::operation::execute_statement::ExecuteStatementError::ProvisionedThroughputExceededError({
         271  +
                        let mut tmp = match protocol
         272  +
                            .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededError::SCHEMA, _cfg)
         273  +
                            .and_then(|mut deser| {
         274  +
                                crate::types::error::ProvisionedThroughputExceededError::deserialize_with_response(
         275  +
                                    &mut *deser,
         276  +
                                    response.headers(),
         277  +
                                    response.status().into(),
         278  +
                                    body,
         279  +
                                )
         280  +
                            }) {
         281  +
                            ::std::result::Result::Ok(val) => val,
         282  +
                            ::std::result::Result::Err(e) => {
         283  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         284  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         285  +
                                ))
         286  +
                            }
         287  +
                        };
         288  +
                        tmp.meta = generic;
         289  +
                        if tmp.message.is_none() {
         290  +
                            tmp.message = _error_message;
         291  +
                        }
         292  +
                        tmp
         293  +
                    })
         294  +
                }
         295  +
                "RequestLimitExceeded" => crate::operation::execute_statement::ExecuteStatementError::RequestLimitExceeded({
         296  +
                    let mut tmp = match protocol
         297  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         298  +
                        .and_then(|mut deser| {
         299  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         300  +
                                &mut *deser,
         301  +
                                response.headers(),
         302  +
                                response.status().into(),
         303  +
                                body,
         304  +
                            )
         305  +
                        }) {
         306  +
                        ::std::result::Result::Ok(val) => val,
         307  +
                        ::std::result::Result::Err(e) => {
         308  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         309  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         310  +
                            ))
         311  +
                        }
         312  +
                    };
         313  +
                    tmp.meta = generic;
         314  +
                    if tmp.message.is_none() {
         315  +
                        tmp.message = _error_message;
         316  +
                    }
         317  +
                    tmp
         318  +
                }),
         319  +
                "ResourceNotFoundException" => crate::operation::execute_statement::ExecuteStatementError::ResourceNotFoundError({
         320  +
                    let mut tmp = match protocol
         321  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundError::SCHEMA, _cfg)
         322  +
                        .and_then(|mut deser| {
         323  +
                            crate::types::error::ResourceNotFoundError::deserialize_with_response(
         324  +
                                &mut *deser,
         325  +
                                response.headers(),
         326  +
                                response.status().into(),
         327  +
                                body,
         328  +
                            )
         329  +
                        }) {
         330  +
                        ::std::result::Result::Ok(val) => val,
         331  +
                        ::std::result::Result::Err(e) => {
         332  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         333  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         334  +
                            ))
         335  +
                        }
         336  +
                    };
         337  +
                    tmp.meta = generic;
         338  +
                    if tmp.message.is_none() {
         339  +
                        tmp.message = _error_message;
         340  +
                    }
         341  +
                    tmp
         342  +
                }),
         343  +
                "TransactionConflictException" => crate::operation::execute_statement::ExecuteStatementError::TransactionConflictError({
         344  +
                    let mut tmp = match protocol
         345  +
                        .deserialize_response(response, crate::types::error::TransactionConflictError::SCHEMA, _cfg)
         346  +
                        .and_then(|mut deser| {
         347  +
                            crate::types::error::TransactionConflictError::deserialize_with_response(
         348  +
                                &mut *deser,
         349  +
                                response.headers(),
         350  +
                                response.status().into(),
         351  +
                                body,
         352  +
                            )
         353  +
                        }) {
         354  +
                        ::std::result::Result::Ok(val) => val,
         355  +
                        ::std::result::Result::Err(e) => {
         356  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         357  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         358  +
                            ))
         359  +
                        }
         360  +
                    };
         361  +
                    tmp.meta = generic;
         362  +
                    if tmp.message.is_none() {
         363  +
                        tmp.message = _error_message;
         364  +
                    }
         365  +
                    tmp
         366  +
                }),
         367  +
                _ => crate::operation::execute_statement::ExecuteStatementError::generic(generic),
         368  +
            };
         369  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         370  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         371  +
            ))
  146    372   
        } else {
  147         -
            crate::protocol_serde::shape_execute_statement::de_execute_statement_http_response(status, headers, body)
  148         -
        };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         373  +
            let protocol = _cfg
         374  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         375  +
                .expect("a SharedClientProtocol is required");
         376  +
            let mut deser = protocol
         377  +
                .deserialize_response(response, ExecuteStatement::OUTPUT_SCHEMA, _cfg)
         378  +
                .map_err(|e| {
         379  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         380  +
                })?;
         381  +
            let body = response.body().bytes().expect("body loaded");
         382  +
            let output = crate::operation::execute_statement::ExecuteStatementOutput::deserialize_with_response(
         383  +
                &mut *deser,
         384  +
                response.headers(),
         385  +
                response.status().into(),
         386  +
                body,
         387  +
            )
         388  +
            .map_err(|e| {
         389  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         390  +
            })?;
         391  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         392  +
        }
  150    393   
    }
  151    394   
}
  152    395   
#[derive(Debug)]
  153    396   
struct ExecuteStatementRequestSerializer;
  154    397   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ExecuteStatementRequestSerializer {
  155    398   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    399   
    fn serialize_input(
  157    400   
        &self,
  158    401   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    402   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    403   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    404   
        let input = input
  162    405   
            .downcast::<crate::operation::execute_statement::ExecuteStatementInput>()
  163    406   
            .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::execute_statement::ExecuteStatementInput,
  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::execute_statement::ExecuteStatementInput,
  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.ExecuteStatement",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_execute_statement::ser_execute_statement_input(&input)?);
  197         -
        if let Some(content_length) = body.content_length() {
  198         -
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200         -
        }
  201         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         407  +
        let protocol = _cfg
         408  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         409  +
            .expect("a SharedClientProtocol is required");
         410  +
        let mut request = protocol
         411  +
            .serialize_request(&input, ExecuteStatement::INPUT_SCHEMA, "", _cfg)
         412  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         413  +
         414  +
        return ::std::result::Result::Ok(request);
  202    415   
    }
  203    416   
}
  204    417   
#[derive(Debug)]
  205    418   
struct ExecuteStatementEndpointParamsInterceptor;
  206    419   
  207    420   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ExecuteStatementEndpointParamsInterceptor {
  208    421   
    fn name(&self) -> &'static str {
  209    422   
        "ExecuteStatementEndpointParamsInterceptor"
  210    423   
    }
  211    424