Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/transact_write_items/_transact_write_items_input.rs

@@ -41,41 +224,233 @@
   61     61   
    "com.amazonaws.dynamodb.synthetic",
   62     62   
    "TransactWriteItemsInput",
   63     63   
);
   64     64   
static TRANSACTWRITEITEMSINPUT_MEMBER_TRANSACT_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsInput$TransactItems",
   67     67   
        "com.amazonaws.dynamodb.synthetic",
   68     68   
        "TransactWriteItemsInput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::List,
   71         -
    "transact_items",
          71  +
    "TransactItems",
   72     72   
    0,
   73     73   
);
   74     74   
static TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsInput$ReturnConsumedCapacity",
   77     77   
        "com.amazonaws.dynamodb.synthetic",
   78     78   
        "TransactWriteItemsInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "return_consumed_capacity",
          81  +
    "ReturnConsumedCapacity",
   82     82   
    1,
   83     83   
);
   84     84   
static TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsInput$ReturnItemCollectionMetrics",
   87     87   
        "com.amazonaws.dynamodb.synthetic",
   88     88   
        "TransactWriteItemsInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "return_item_collection_metrics",
          91  +
    "ReturnItemCollectionMetrics",
   92     92   
    2,
   93     93   
);
   94     94   
static TRANSACTWRITEITEMSINPUT_MEMBER_CLIENT_REQUEST_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsInput$ClientRequestToken",
   97     97   
        "com.amazonaws.dynamodb.synthetic",
   98     98   
        "TransactWriteItemsInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101         -
    "client_request_token",
         101  +
    "ClientRequestToken",
  102    102   
    3,
  103    103   
);
  104    104   
static TRANSACTWRITEITEMSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  105    105   
    TRANSACTWRITEITEMSINPUT_SCHEMA_ID,
  106    106   
    ::aws_smithy_schema::ShapeType::Structure,
  107    107   
    &[
  108    108   
        &TRANSACTWRITEITEMSINPUT_MEMBER_TRANSACT_ITEMS,
  109    109   
        &TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  110    110   
        &TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS,
  111    111   
        &TRANSACTWRITEITEMSINPUT_MEMBER_CLIENT_REQUEST_TOKEN,
  112    112   
    ],
  113    113   
);
  114    114   
impl TransactWriteItemsInput {
  115    115   
    /// The schema for this shape.
  116    116   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TRANSACTWRITEITEMSINPUT_SCHEMA;
  117    117   
}
  118    118   
impl ::aws_smithy_schema::serde::SerializableStruct for TransactWriteItemsInput {
  119    119   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  120    120   
    fn serialize_members(
  121    121   
        &self,
  122    122   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  123    123   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  124    124   
        if let Some(ref val) = self.transact_items {
  125    125   
            ser.write_list(
  126    126   
                &TRANSACTWRITEITEMSINPUT_MEMBER_TRANSACT_ITEMS,
  127    127   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  128    128   
                    for item in val {
  129    129   
                        ser.write_struct(crate::types::TransactWriteItem::SCHEMA, item)?;
  130    130   
                    }
  131    131   
                    Ok(())
  132    132   
                },
  133    133   
            )?;
  134    134   
        }
  135    135   
        if let Some(ref val) = self.return_consumed_capacity {
  136    136   
            ser.write_string(&TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  137    137   
        }
  138    138   
        if let Some(ref val) = self.return_item_collection_metrics {
  139    139   
            ser.write_string(&TRANSACTWRITEITEMSINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS, val.as_str())?;
  140    140   
        }
  141    141   
        if let Some(ref val) = self.client_request_token {
  142    142   
            ser.write_string(&TRANSACTWRITEITEMSINPUT_MEMBER_CLIENT_REQUEST_TOKEN, val)?;
  143    143   
        }
  144    144   
        Ok(())
  145    145   
    }
  146    146   
}
  147    147   
impl TransactWriteItemsInput {
  148    148   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  149         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  150         -
        deserializer: &mut D,
         149  +
    pub fn deserialize(
         150  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  151    151   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  152    152   
        #[allow(unused_variables, unused_mut)]
  153    153   
        let mut builder = Self::builder();
  154    154   
        #[allow(
  155    155   
            unused_variables,
  156    156   
            unreachable_code,
  157    157   
            clippy::single_match,
  158    158   
            clippy::match_single_binding,
  159    159   
            clippy::diverging_sub_expression
  160    160   
        )]
  161         -
        deserializer.read_struct(&TRANSACTWRITEITEMSINPUT_SCHEMA, (), |_, member, deser| {
         161  +
        deserializer.read_struct(&TRANSACTWRITEITEMSINPUT_SCHEMA, &mut |member, deser| {
  162    162   
            match member.member_index() {
  163    163   
                Some(0) => {
  164    164   
                    builder.transact_items = Some({
  165         -
                        let container = if let Some(cap) = deser.container_size() {
  166         -
                            Vec::with_capacity(cap)
  167         -
                        } else {
  168         -
                            Vec::new()
  169         -
                        };
  170         -
                        deser.read_list(member, container, |mut list, deser| {
  171         -
                            list.push(crate::types::TransactWriteItem::deserialize(deser)?);
  172         -
                            Ok(list)
  173         -
                        })?
         165  +
                        let mut container = Vec::new();
         166  +
                        deser.read_list(member, &mut |deser| {
         167  +
                            container.push(crate::types::TransactWriteItem::deserialize(deser)?);
         168  +
                            Ok(())
         169  +
                        })?;
         170  +
                        container
  174    171   
                    });
  175    172   
                }
  176    173   
                Some(1) => {
  177    174   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  178    175   
                }
  179    176   
                Some(2) => {
  180    177   
                    builder.return_item_collection_metrics =
  181    178   
                        Some(crate::types::ReturnItemCollectionMetrics::from(deser.read_string(member)?.as_str()));
  182    179   
                }
  183    180   
                Some(3) => {
  184    181   
                    builder.client_request_token = Some(deser.read_string(member)?);
  185    182   
                }
  186    183   
                _ => {}
  187    184   
            }
  188    185   
            Ok(())
  189    186   
        })?;
         187  +
        builder.transact_items = builder.transact_items.or(Some(Vec::new()));
  190    188   
        builder
  191    189   
            .build()
  192    190   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  193    191   
    }
  194    192   
}
         193  +
impl TransactWriteItemsInput {
         194  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         195  +
    pub fn deserialize_with_response(
         196  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         197  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         198  +
        _status: u16,
         199  +
        _body: &[u8],
         200  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         201  +
        Self::deserialize(deserializer)
         202  +
    }
         203  +
}
  195    204   
impl TransactWriteItemsInput {
  196    205   
    /// Creates a new builder-style object to manufacture [`TransactWriteItemsInput`](crate::operation::transact_write_items::TransactWriteItemsInput).
  197    206   
    pub fn builder() -> crate::operation::transact_write_items::builders::TransactWriteItemsInputBuilder {
  198    207   
        crate::operation::transact_write_items::builders::TransactWriteItemsInputBuilder::default()
  199    208   
    }
  200    209   
}
  201    210   
  202    211   
/// A builder for [`TransactWriteItemsInput`](crate::operation::transact_write_items::TransactWriteItemsInput).
  203    212   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  204    213   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/transact_write_items/_transact_write_items_output.rs

@@ -8,8 +173,194 @@
   28     28   
    "com.amazonaws.dynamodb.synthetic",
   29     29   
    "TransactWriteItemsOutput",
   30     30   
);
   31     31   
static TRANSACTWRITEITEMSOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   32     32   
    ::aws_smithy_schema::ShapeId::from_static(
   33     33   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsOutput$ConsumedCapacity",
   34     34   
        "com.amazonaws.dynamodb.synthetic",
   35     35   
        "TransactWriteItemsOutput",
   36     36   
    ),
   37     37   
    ::aws_smithy_schema::ShapeType::List,
   38         -
    "consumed_capacity",
          38  +
    "ConsumedCapacity",
   39     39   
    0,
   40     40   
);
   41     41   
static TRANSACTWRITEITEMSOUTPUT_MEMBER_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.dynamodb.synthetic#TransactWriteItemsOutput$ItemCollectionMetrics",
   44     44   
        "com.amazonaws.dynamodb.synthetic",
   45     45   
        "TransactWriteItemsOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::Map,
   48         -
    "item_collection_metrics",
          48  +
    "ItemCollectionMetrics",
   49     49   
    1,
   50     50   
);
   51     51   
static TRANSACTWRITEITEMSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   52     52   
    TRANSACTWRITEITEMSOUTPUT_SCHEMA_ID,
   53     53   
    ::aws_smithy_schema::ShapeType::Structure,
   54     54   
    &[
   55     55   
        &TRANSACTWRITEITEMSOUTPUT_MEMBER_CONSUMED_CAPACITY,
   56     56   
        &TRANSACTWRITEITEMSOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
   57     57   
    ],
   58     58   
);
   59     59   
impl TransactWriteItemsOutput {
   60     60   
    /// The schema for this shape.
   61     61   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TRANSACTWRITEITEMSOUTPUT_SCHEMA;
   62     62   
}
   63     63   
impl ::aws_smithy_schema::serde::SerializableStruct for TransactWriteItemsOutput {
   64     64   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   65     65   
    fn serialize_members(
   66     66   
        &self,
   67     67   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   68     68   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   69     69   
        if let Some(ref val) = self.consumed_capacity {
   70     70   
            ser.write_list(
   71     71   
                &TRANSACTWRITEITEMSOUTPUT_MEMBER_CONSUMED_CAPACITY,
   72     72   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     73   
                    for item in val {
   74     74   
                        ser.write_struct(crate::types::ConsumedCapacity::SCHEMA, item)?;
   75     75   
                    }
   76     76   
                    Ok(())
   77     77   
                },
   78     78   
            )?;
   79     79   
        }
   80     80   
        if let Some(ref val) = self.item_collection_metrics {
   81     81   
            ser.write_map(
   82     82   
                &TRANSACTWRITEITEMSOUTPUT_MEMBER_ITEM_COLLECTION_METRICS,
   83     83   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   84     84   
                    for (key, value) in val {
   85     85   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   86         -
                        todo!("schema: unsupported map value type");
          86  +
          87  +
                        ser.write_list(
          88  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
          89  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          90  +
                                for item in value {
          91  +
                                    ser.write_struct(crate::types::ItemCollectionMetrics::SCHEMA, item)?;
          92  +
                                }
          93  +
                                Ok(())
          94  +
                            },
          95  +
                        )?;
   87     96   
                    }
   88     97   
                    Ok(())
   89     98   
                },
   90     99   
            )?;
   91    100   
        }
   92    101   
        Ok(())
   93    102   
    }
   94    103   
}
   95    104   
impl TransactWriteItemsOutput {
   96    105   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   97         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   98         -
        deserializer: &mut D,
         106  +
    pub fn deserialize(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   99    108   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  100    109   
        #[allow(unused_variables, unused_mut)]
  101    110   
        let mut builder = Self::builder();
  102    111   
        #[allow(
  103    112   
            unused_variables,
  104    113   
            unreachable_code,
  105    114   
            clippy::single_match,
  106    115   
            clippy::match_single_binding,
  107    116   
            clippy::diverging_sub_expression
  108    117   
        )]
  109         -
        deserializer.read_struct(&TRANSACTWRITEITEMSOUTPUT_SCHEMA, (), |_, member, deser| {
         118  +
        deserializer.read_struct(&TRANSACTWRITEITEMSOUTPUT_SCHEMA, &mut |member, deser| {
  110    119   
            match member.member_index() {
  111    120   
                Some(0) => {
  112    121   
                    builder.consumed_capacity = Some({
  113         -
                        let container = if let Some(cap) = deser.container_size() {
  114         -
                            Vec::with_capacity(cap)
  115         -
                        } else {
  116         -
                            Vec::new()
  117         -
                        };
  118         -
                        deser.read_list(member, container, |mut list, deser| {
  119         -
                            list.push(crate::types::ConsumedCapacity::deserialize(deser)?);
  120         -
                            Ok(list)
  121         -
                        })?
         122  +
                        let mut container = Vec::new();
         123  +
                        deser.read_list(member, &mut |deser| {
         124  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         125  +
                            Ok(())
         126  +
                        })?;
         127  +
                        container
  122    128   
                    });
  123    129   
                }
  124    130   
                Some(1) => {
  125    131   
                    builder.item_collection_metrics = Some({
  126         -
                        let container = if let Some(cap) = deser.container_size() {
  127         -
                            std::collections::HashMap::with_capacity(cap)
  128         -
                        } else {
  129         -
                            std::collections::HashMap::new()
  130         -
                        };
  131         -
                        deser.read_map(member, container, |mut map, key, deser| {
  132         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  133         -
                            Ok(map)
  134         -
                        })?
         132  +
                        let mut container = std::collections::HashMap::new();
         133  +
                        deser.read_map(member, &mut |key, deser| {
         134  +
                            container.insert(key, {
         135  +
                                let mut list = Vec::new();
         136  +
                                deser.read_list(member, &mut |deser| {
         137  +
                                    list.push(crate::types::ItemCollectionMetrics::deserialize(deser)?);
         138  +
                                    Ok(())
         139  +
                                })?;
         140  +
                                list
         141  +
                            });
         142  +
                            Ok(())
         143  +
                        })?;
         144  +
                        container
  135    145   
                    });
  136    146   
                }
  137    147   
                _ => {}
  138    148   
            }
  139    149   
            Ok(())
  140    150   
        })?;
  141    151   
        Ok(builder.build())
  142    152   
    }
  143    153   
}
         154  +
impl TransactWriteItemsOutput {
         155  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         156  +
    pub fn deserialize_with_response(
         157  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         158  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         159  +
        _status: u16,
         160  +
        _body: &[u8],
         161  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         162  +
        Self::deserialize(deserializer)
         163  +
    }
         164  +
}
  144    165   
impl TransactWriteItemsOutput {
  145    166   
    /// Creates a new builder-style object to manufacture [`TransactWriteItemsOutput`](crate::operation::transact_write_items::TransactWriteItemsOutput).
  146    167   
    pub fn builder() -> crate::operation::transact_write_items::builders::TransactWriteItemsOutputBuilder {
  147    168   
        crate::operation::transact_write_items::builders::TransactWriteItemsOutputBuilder::default()
  148    169   
    }
  149    170   
}
  150    171   
  151    172   
/// A builder for [`TransactWriteItemsOutput`](crate::operation::transact_write_items::TransactWriteItemsOutput).
  152    173   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  153    174   
#[non_exhaustive]

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/untag_resource/_untag_resource_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/untag_resource/_untag_resource_output.rs

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

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

@@ -1,1 +40,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `UpdateContinuousBackups`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateContinuousBackups;
    6      6   
impl UpdateContinuousBackups {
    7      7   
    /// Creates a new `UpdateContinuousBackups`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_continuous_backups::UpdateContinuousBackupsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput::SCHEMA;
   11     16   
    pub(crate) async fn orchestrate(
   12     17   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     18   
        input: crate::operation::update_continuous_backups::UpdateContinuousBackupsInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::update_continuous_backups::UpdateContinuousBackupsError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -104,109 +233,347 @@
  124    129   
                crate::operation::update_continuous_backups::UpdateContinuousBackupsError,
  125    130   
            >::new());
  126    131   
  127    132   
        ::std::borrow::Cow::Owned(rcb)
  128    133   
    }
  129    134   
}
  130    135   
  131    136   
#[derive(Debug)]
  132    137   
struct UpdateContinuousBackupsResponseDeserializer;
  133    138   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateContinuousBackupsResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         139  +
    fn deserialize_nonstreaming_with_config(
  135    140   
        &self,
  136    141   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         142  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    143   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    144   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         145  +
        #[allow(unused_mut)]
         146  +
        let mut force_error = false;
         147  +
         148  +
        if !success && status != 200 || force_error {
  139    149   
            let headers = response.headers();
  140    150   
            let body = response.body().bytes().expect("body loaded");
  141    151   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         152  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         153  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         154  +
            })?;
  143    155   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_update_continuous_backups::de_update_continuous_backups_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_update_continuous_backups::de_update_continuous_backups_http_response(status, headers, body)
         156  +
            let generic = generic_builder.build();
         157  +
            let error_code = match generic.code() {
         158  +
                ::std::option::Option::Some(code) => code,
         159  +
                ::std::option::Option::None => {
         160  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         161  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         162  +
                            crate::operation::update_continuous_backups::UpdateContinuousBackupsError::unhandled(generic),
         163  +
                        ),
         164  +
                    ))
         165  +
                }
         166  +
            };
         167  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let err = match error_code {
         172  +
                "ContinuousBackupsUnavailableException" => {
         173  +
                    crate::operation::update_continuous_backups::UpdateContinuousBackupsError::ContinuousBackupsUnavailableError({
         174  +
                        let mut tmp = match protocol
         175  +
                            .deserialize_response(response, crate::types::error::ContinuousBackupsUnavailableError::SCHEMA, _cfg)
         176  +
                            .and_then(|mut deser| {
         177  +
                                crate::types::error::ContinuousBackupsUnavailableError::deserialize_with_response(
         178  +
                                    &mut *deser,
         179  +
                                    response.headers(),
         180  +
                                    response.status().into(),
         181  +
                                    body,
         182  +
                                )
         183  +
                            }) {
         184  +
                            ::std::result::Result::Ok(val) => val,
         185  +
                            ::std::result::Result::Err(e) => {
         186  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         187  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         188  +
                                ))
         189  +
                            }
         190  +
                        };
         191  +
                        tmp.meta = generic;
         192  +
                        if tmp.message.is_none() {
         193  +
                            tmp.message = _error_message;
         194  +
                        }
         195  +
                        tmp
         196  +
                    })
         197  +
                }
         198  +
                "InternalServerError" => crate::operation::update_continuous_backups::UpdateContinuousBackupsError::InternalServerError({
         199  +
                    let mut tmp = match protocol
         200  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         201  +
                        .and_then(|mut deser| {
         202  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         203  +
                                &mut *deser,
         204  +
                                response.headers(),
         205  +
                                response.status().into(),
         206  +
                                body,
         207  +
                            )
         208  +
                        }) {
         209  +
                        ::std::result::Result::Ok(val) => val,
         210  +
                        ::std::result::Result::Err(e) => {
         211  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         212  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         213  +
                            ))
         214  +
                        }
         215  +
                    };
         216  +
                    tmp.meta = generic;
         217  +
                    if tmp.message.is_none() {
         218  +
                        tmp.message = _error_message;
         219  +
                    }
         220  +
                    tmp
         221  +
                }),
         222  +
                "InvalidEndpointException" => crate::operation::update_continuous_backups::UpdateContinuousBackupsError::InvalidEndpointError({
         223  +
                    let mut tmp = match protocol
         224  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         225  +
                        .and_then(|mut deser| {
         226  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         227  +
                                &mut *deser,
         228  +
                                response.headers(),
         229  +
                                response.status().into(),
         230  +
                                body,
         231  +
                            )
         232  +
                        }) {
         233  +
                        ::std::result::Result::Ok(val) => val,
         234  +
                        ::std::result::Result::Err(e) => {
         235  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         236  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         237  +
                            ))
         238  +
                        }
         239  +
                    };
         240  +
                    tmp.meta = generic;
         241  +
                    if tmp.message.is_none() {
         242  +
                        tmp.message = _error_message;
         243  +
                    }
         244  +
                    tmp
         245  +
                }),
         246  +
                "TableNotFoundException" => crate::operation::update_continuous_backups::UpdateContinuousBackupsError::TableNotFoundError({
         247  +
                    let mut tmp = match protocol
         248  +
                        .deserialize_response(response, crate::types::error::TableNotFoundError::SCHEMA, _cfg)
         249  +
                        .and_then(|mut deser| {
         250  +
                            crate::types::error::TableNotFoundError::deserialize_with_response(
         251  +
                                &mut *deser,
         252  +
                                response.headers(),
         253  +
                                response.status().into(),
         254  +
                                body,
         255  +
                            )
         256  +
                        }) {
         257  +
                        ::std::result::Result::Ok(val) => val,
         258  +
                        ::std::result::Result::Err(e) => {
         259  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         260  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         261  +
                            ))
         262  +
                        }
  148    263   
                    };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         264  +
                    tmp.meta = generic;
         265  +
                    if tmp.message.is_none() {
         266  +
                        tmp.message = _error_message;
         267  +
                    }
         268  +
                    tmp
         269  +
                }),
         270  +
                _ => crate::operation::update_continuous_backups::UpdateContinuousBackupsError::generic(generic),
         271  +
            };
         272  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         273  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         274  +
            ))
         275  +
        } else {
         276  +
            let protocol = _cfg
         277  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         278  +
                .expect("a SharedClientProtocol is required");
         279  +
            let mut deser = protocol
         280  +
                .deserialize_response(response, UpdateContinuousBackups::OUTPUT_SCHEMA, _cfg)
         281  +
                .map_err(|e| {
         282  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         283  +
                })?;
         284  +
            let body = response.body().bytes().expect("body loaded");
         285  +
            let output = crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput::deserialize_with_response(
         286  +
                &mut *deser,
         287  +
                response.headers(),
         288  +
                response.status().into(),
         289  +
                body,
         290  +
            )
         291  +
            .map_err(|e| {
         292  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         293  +
            })?;
         294  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         295  +
        }
  150    296   
    }
  151    297   
}
  152    298   
#[derive(Debug)]
  153    299   
struct UpdateContinuousBackupsRequestSerializer;
  154    300   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateContinuousBackupsRequestSerializer {
  155    301   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    302   
    fn serialize_input(
  157    303   
        &self,
  158    304   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    305   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    306   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    307   
        let input = input
  162    308   
            .downcast::<crate::operation::update_continuous_backups::UpdateContinuousBackupsInput>()
  163    309   
            .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::update_continuous_backups::UpdateContinuousBackupsInput,
  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::update_continuous_backups::UpdateContinuousBackupsInput,
  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.UpdateContinuousBackups",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  197         -
            crate::protocol_serde::shape_update_continuous_backups::ser_update_continuous_backups_input(&input)?,
  198         -
        );
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         310  +
        let protocol = _cfg
         311  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         312  +
            .expect("a SharedClientProtocol is required");
         313  +
        let mut request = protocol
         314  +
            .serialize_request(&input, UpdateContinuousBackups::INPUT_SCHEMA, "", _cfg)
         315  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         316  +
         317  +
        return ::std::result::Result::Ok(request);
  204    318   
    }
  205    319   
}
  206    320   
#[derive(Debug)]
  207    321   
struct UpdateContinuousBackupsEndpointParamsInterceptor;
  208    322   
  209    323   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateContinuousBackupsEndpointParamsInterceptor {
  210    324   
    fn name(&self) -> &'static str {
  211    325   
        "UpdateContinuousBackupsEndpointParamsInterceptor"
  212    326   
    }
  213    327   

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_continuous_backups/_update_continuous_backups_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_continuous_backups/_update_continuous_backups_output.rs

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_contributor_insights/_update_contributor_insights_input.rs

@@ -9,9 +156,168 @@
   29     29   
    "com.amazonaws.dynamodb.synthetic",
   30     30   
    "UpdateContributorInsightsInput",
   31     31   
);
   32     32   
static UPDATECONTRIBUTORINSIGHTSINPUT_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#UpdateContributorInsightsInput$TableName",
   35     35   
        "com.amazonaws.dynamodb.synthetic",
   36     36   
        "UpdateContributorInsightsInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "table_name",
          39  +
    "TableName",
   40     40   
    0,
   41     41   
);
   42     42   
static UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_INDEX_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.dynamodb.synthetic#UpdateContributorInsightsInput$IndexName",
   45     45   
        "com.amazonaws.dynamodb.synthetic",
   46     46   
        "UpdateContributorInsightsInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::String,
   49         -
    "index_name",
          49  +
    "IndexName",
   50     50   
    1,
   51     51   
);
   52     52   
static UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_CONTRIBUTOR_INSIGHTS_ACTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.dynamodb.synthetic#UpdateContributorInsightsInput$ContributorInsightsAction",
   55     55   
        "com.amazonaws.dynamodb.synthetic",
   56     56   
        "UpdateContributorInsightsInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "contributor_insights_action",
          59  +
    "ContributorInsightsAction",
   60     60   
    2,
   61     61   
);
   62     62   
static UPDATECONTRIBUTORINSIGHTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    UPDATECONTRIBUTORINSIGHTSINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_TABLE_NAME,
   67     67   
        &UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_INDEX_NAME,
   68     68   
        &UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_CONTRIBUTOR_INSIGHTS_ACTION,
   69     69   
    ],
   70     70   
);
   71     71   
impl UpdateContributorInsightsInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECONTRIBUTORINSIGHTSINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateContributorInsightsInput {
   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(&UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_TABLE_NAME, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.index_name {
   85     85   
            ser.write_string(&UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_INDEX_NAME, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.contributor_insights_action {
   88     88   
            ser.write_string(&UPDATECONTRIBUTORINSIGHTSINPUT_MEMBER_CONTRIBUTOR_INSIGHTS_ACTION, val.as_str())?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl UpdateContributorInsightsInput {
   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(&UPDATECONTRIBUTORINSIGHTSINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&UPDATECONTRIBUTORINSIGHTSINPUT_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.index_name = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.contributor_insights_action = Some(crate::types::ContributorInsightsAction::from(deser.read_string(member)?.as_str()));
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
         122  +
        builder.table_name = builder.table_name.or(Some(String::new()));
  122    123   
        builder
  123    124   
            .build()
  124    125   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    126   
    }
  126    127   
}
         128  +
impl UpdateContributorInsightsInput {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        _body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        Self::deserialize(deserializer)
         137  +
    }
         138  +
}
  127    139   
impl UpdateContributorInsightsInput {
  128    140   
    /// Creates a new builder-style object to manufacture [`UpdateContributorInsightsInput`](crate::operation::update_contributor_insights::UpdateContributorInsightsInput).
  129    141   
    pub fn builder() -> crate::operation::update_contributor_insights::builders::UpdateContributorInsightsInputBuilder {
  130    142   
        crate::operation::update_contributor_insights::builders::UpdateContributorInsightsInputBuilder::default()
  131    143   
    }
  132    144   
}
  133    145   
  134    146   
/// A builder for [`UpdateContributorInsightsInput`](crate::operation::update_contributor_insights::UpdateContributorInsightsInput).
  135    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    148   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_contributor_insights/_update_contributor_insights_output.rs

@@ -9,9 +154,165 @@
   29     29   
    "com.amazonaws.dynamodb.synthetic",
   30     30   
    "UpdateContributorInsightsOutput",
   31     31   
);
   32     32   
static UPDATECONTRIBUTORINSIGHTSOUTPUT_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#UpdateContributorInsightsOutput$TableName",
   35     35   
        "com.amazonaws.dynamodb.synthetic",
   36     36   
        "UpdateContributorInsightsOutput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "table_name",
          39  +
    "TableName",
   40     40   
    0,
   41     41   
);
   42     42   
static UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.dynamodb.synthetic#UpdateContributorInsightsOutput$IndexName",
   45     45   
        "com.amazonaws.dynamodb.synthetic",
   46     46   
        "UpdateContributorInsightsOutput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::String,
   49         -
    "index_name",
          49  +
    "IndexName",
   50     50   
    1,
   51     51   
);
   52     52   
static UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_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#UpdateContributorInsightsOutput$ContributorInsightsStatus",
   55     55   
        "com.amazonaws.dynamodb.synthetic",
   56     56   
        "UpdateContributorInsightsOutput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "contributor_insights_status",
          59  +
    "ContributorInsightsStatus",
   60     60   
    2,
   61     61   
);
   62     62   
static UPDATECONTRIBUTORINSIGHTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    UPDATECONTRIBUTORINSIGHTSOUTPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME,
   67     67   
        &UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME,
   68     68   
        &UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS,
   69     69   
    ],
   70     70   
);
   71     71   
impl UpdateContributorInsightsOutput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATECONTRIBUTORINSIGHTSOUTPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateContributorInsightsOutput {
   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(&UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.index_name {
   85     85   
            ser.write_string(&UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.contributor_insights_status {
   88     88   
            ser.write_string(&UPDATECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS, val.as_str())?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl UpdateContributorInsightsOutput {
   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(&UPDATECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&UPDATECONTRIBUTORINSIGHTSOUTPUT_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.index_name = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.contributor_insights_status = Some(crate::types::ContributorInsightsStatus::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 UpdateContributorInsightsOutput {
         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 UpdateContributorInsightsOutput {
  126    137   
    /// Creates a new builder-style object to manufacture [`UpdateContributorInsightsOutput`](crate::operation::update_contributor_insights::UpdateContributorInsightsOutput).
  127    138   
    pub fn builder() -> crate::operation::update_contributor_insights::builders::UpdateContributorInsightsOutputBuilder {
  128    139   
        crate::operation::update_contributor_insights::builders::UpdateContributorInsightsOutputBuilder::default()
  129    140   
    }
  130    141   
}
  131    142   
  132    143   
/// A builder for [`UpdateContributorInsightsOutput`](crate::operation::update_contributor_insights::UpdateContributorInsightsOutput).
  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/update_global_table.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `UpdateGlobalTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateGlobalTable;
    6      6   
impl UpdateGlobalTable {
    7      7   
    /// Creates a new `UpdateGlobalTable`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table::UpdateGlobalTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table::UpdateGlobalTableOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_global_table::UpdateGlobalTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_global_table::UpdateGlobalTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_global_table::UpdateGlobalTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +231,392 @@
  124    128   
                crate::operation::update_global_table::UpdateGlobalTableError,
  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 UpdateGlobalTableResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateGlobalTableResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         144  +
        #[allow(unused_mut)]
         145  +
        let mut force_error = false;
         146  +
         147  +
        if !success && status != 200 || force_error {
  139    148   
            let headers = response.headers();
  140    149   
            let body = response.body().bytes().expect("body loaded");
  141    150   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
  143    154   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_update_global_table::de_update_global_table_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_update_global_table::de_update_global_table_http_response(status, headers, body)
         155  +
            let generic = generic_builder.build();
         156  +
            let error_code = match generic.code() {
         157  +
                ::std::option::Option::Some(code) => code,
         158  +
                ::std::option::Option::None => {
         159  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         160  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         161  +
                            crate::operation::update_global_table::UpdateGlobalTableError::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  +
                "GlobalTableNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::GlobalTableNotFoundError({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::GlobalTableNotFoundError::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::GlobalTableNotFoundError::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  +
                "InternalServerError" => crate::operation::update_global_table::UpdateGlobalTableError::InternalServerError({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::update_global_table::UpdateGlobalTableError::InvalidEndpointError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::InvalidEndpointError::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  +
                "ReplicaAlreadyExistsException" => crate::operation::update_global_table::UpdateGlobalTableError::ReplicaAlreadyExistsError({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::ReplicaAlreadyExistsError::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::ReplicaAlreadyExistsError::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                "ReplicaNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::ReplicaNotFoundError({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::ReplicaNotFoundError::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::ReplicaNotFoundError::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    if tmp.message.is_none() {
         287  +
                        tmp.message = _error_message;
         288  +
                    }
         289  +
                    tmp
         290  +
                }),
         291  +
                "TableNotFoundException" => crate::operation::update_global_table::UpdateGlobalTableError::TableNotFoundError({
         292  +
                    let mut tmp = match protocol
         293  +
                        .deserialize_response(response, crate::types::error::TableNotFoundError::SCHEMA, _cfg)
         294  +
                        .and_then(|mut deser| {
         295  +
                            crate::types::error::TableNotFoundError::deserialize_with_response(
         296  +
                                &mut *deser,
         297  +
                                response.headers(),
         298  +
                                response.status().into(),
         299  +
                                body,
         300  +
                            )
         301  +
                        }) {
         302  +
                        ::std::result::Result::Ok(val) => val,
         303  +
                        ::std::result::Result::Err(e) => {
         304  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         305  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         306  +
                            ))
         307  +
                        }
  148    308   
                    };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         309  +
                    tmp.meta = generic;
         310  +
                    if tmp.message.is_none() {
         311  +
                        tmp.message = _error_message;
         312  +
                    }
         313  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::update_global_table::UpdateGlobalTableError::generic(generic),
         316  +
            };
         317  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         318  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         319  +
            ))
         320  +
        } else {
         321  +
            let protocol = _cfg
         322  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
                .expect("a SharedClientProtocol is required");
         324  +
            let mut deser = protocol
         325  +
                .deserialize_response(response, UpdateGlobalTable::OUTPUT_SCHEMA, _cfg)
         326  +
                .map_err(|e| {
         327  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         328  +
                })?;
         329  +
            let body = response.body().bytes().expect("body loaded");
         330  +
            let output = crate::operation::update_global_table::UpdateGlobalTableOutput::deserialize_with_response(
         331  +
                &mut *deser,
         332  +
                response.headers(),
         333  +
                response.status().into(),
         334  +
                body,
         335  +
            )
         336  +
            .map_err(|e| {
         337  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         338  +
            })?;
         339  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         340  +
        }
  150    341   
    }
  151    342   
}
  152    343   
#[derive(Debug)]
  153    344   
struct UpdateGlobalTableRequestSerializer;
  154    345   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateGlobalTableRequestSerializer {
  155    346   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    347   
    fn serialize_input(
  157    348   
        &self,
  158    349   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    350   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    351   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    352   
        let input = input
  162    353   
            .downcast::<crate::operation::update_global_table::UpdateGlobalTableInput>()
  163    354   
            .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::update_global_table::UpdateGlobalTableInput,
  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::update_global_table::UpdateGlobalTableInput,
  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.UpdateGlobalTable",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_global_table::ser_update_global_table_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())
         355  +
        let protocol = _cfg
         356  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         357  +
            .expect("a SharedClientProtocol is required");
         358  +
        let mut request = protocol
         359  +
            .serialize_request(&input, UpdateGlobalTable::INPUT_SCHEMA, "", _cfg)
         360  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         361  +
         362  +
        return ::std::result::Result::Ok(request);
  202    363   
    }
  203    364   
}
  204    365   
#[derive(Debug)]
  205    366   
struct UpdateGlobalTableEndpointParamsInterceptor;
  206    367   
  207    368   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateGlobalTableEndpointParamsInterceptor {
  208    369   
    fn name(&self) -> &'static str {
  209    370   
        "UpdateGlobalTableEndpointParamsInterceptor"
  210    371   
    }
  211    372