Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeBackupInput",
   19     19   
);
   20     20   
static DESCRIBEBACKUPINPUT_MEMBER_BACKUP_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.dynamodb.synthetic#DescribeBackupInput$BackupArn",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeBackupInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "backup_arn",
          27  +
    "BackupArn",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBEBACKUPINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBEBACKUPINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBEBACKUPINPUT_MEMBER_BACKUP_ARN],
   34     34   
);
   35     35   
impl DescribeBackupInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEBACKUPINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeBackupInput {
   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.backup_arn {
   46     46   
            ser.write_string(&DESCRIBEBACKUPINPUT_MEMBER_BACKUP_ARN, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeBackupInput {
   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(&DESCRIBEBACKUPINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBEBACKUPINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.backup_arn = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.backup_arn = builder.backup_arn.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl DescribeBackupInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl DescribeBackupInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeBackupInput`](crate::operation::describe_backup::DescribeBackupInput).
   81     93   
    pub fn builder() -> crate::operation::describe_backup::builders::DescribeBackupInputBuilder {
   82     94   
        crate::operation::describe_backup::builders::DescribeBackupInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeBackupInput`](crate::operation::describe_backup::DescribeBackupInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_continuous_backups.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 `DescribeContinuousBackups`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeContinuousBackups;
    6      6   
impl DescribeContinuousBackups {
    7      7   
    /// Creates a new `DescribeContinuousBackups`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_continuous_backups::DescribeContinuousBackupsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_continuous_backups::DescribeContinuousBackupsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_continuous_backups::DescribeContinuousBackupsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +239,328 @@
  130    136   
                crate::operation::describe_continuous_backups::DescribeContinuousBackupsError,
  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 DescribeContinuousBackupsResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeContinuousBackupsResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         152  +
        #[allow(unused_mut)]
         153  +
        let mut force_error = false;
         154  +
         155  +
        if !success && status != 200 || force_error {
  145    156   
            let headers = response.headers();
  146    157   
            let body = response.body().bytes().expect("body loaded");
  147    158   
            #[allow(unused_mut)]
  148         -
        let mut force_error = false;
         159  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         160  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         161  +
            })?;
  149    162   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_describe_continuous_backups::de_describe_continuous_backups_http_error(status, headers, body)
  152         -
        } else {
  153         -
            crate::protocol_serde::shape_describe_continuous_backups::de_describe_continuous_backups_http_response(status, headers, body)
         163  +
            let generic = generic_builder.build();
         164  +
            let error_code = match generic.code() {
         165  +
                ::std::option::Option::Some(code) => code,
         166  +
                ::std::option::Option::None => {
         167  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         168  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         169  +
                            crate::operation::describe_continuous_backups::DescribeContinuousBackupsError::unhandled(generic),
         170  +
                        ),
         171  +
                    ))
         172  +
                }
  154    173   
            };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         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::describe_continuous_backups::DescribeContinuousBackupsError::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  +
                "InvalidEndpointException" => crate::operation::describe_continuous_backups::DescribeContinuousBackupsError::InvalidEndpointError({
         204  +
                    let mut tmp = match protocol
         205  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointError::SCHEMA, _cfg)
         206  +
                        .and_then(|mut deser| {
         207  +
                            crate::types::error::InvalidEndpointError::deserialize_with_response(
         208  +
                                &mut *deser,
         209  +
                                response.headers(),
         210  +
                                response.status().into(),
         211  +
                                body,
         212  +
                            )
         213  +
                        }) {
         214  +
                        ::std::result::Result::Ok(val) => val,
         215  +
                        ::std::result::Result::Err(e) => {
         216  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         217  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         218  +
                            ))
         219  +
                        }
         220  +
                    };
         221  +
                    tmp.meta = generic;
         222  +
                    if tmp.message.is_none() {
         223  +
                        tmp.message = _error_message;
         224  +
                    }
         225  +
                    tmp
         226  +
                }),
         227  +
                "TableNotFoundException" => crate::operation::describe_continuous_backups::DescribeContinuousBackupsError::TableNotFoundError({
         228  +
                    let mut tmp = match protocol
         229  +
                        .deserialize_response(response, crate::types::error::TableNotFoundError::SCHEMA, _cfg)
         230  +
                        .and_then(|mut deser| {
         231  +
                            crate::types::error::TableNotFoundError::deserialize_with_response(
         232  +
                                &mut *deser,
         233  +
                                response.headers(),
         234  +
                                response.status().into(),
         235  +
                                body,
         236  +
                            )
         237  +
                        }) {
         238  +
                        ::std::result::Result::Ok(val) => val,
         239  +
                        ::std::result::Result::Err(e) => {
         240  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         241  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         242  +
                            ))
         243  +
                        }
         244  +
                    };
         245  +
                    tmp.meta = generic;
         246  +
                    if tmp.message.is_none() {
         247  +
                        tmp.message = _error_message;
         248  +
                    }
         249  +
                    tmp
         250  +
                }),
         251  +
                _ => crate::operation::describe_continuous_backups::DescribeContinuousBackupsError::generic(generic),
         252  +
            };
         253  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         254  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         255  +
            ))
         256  +
        } else {
         257  +
            let protocol = _cfg
         258  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         259  +
                .expect("a SharedClientProtocol is required");
         260  +
            let mut deser = protocol
         261  +
                .deserialize_response(response, DescribeContinuousBackups::OUTPUT_SCHEMA, _cfg)
         262  +
                .map_err(|e| {
         263  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         264  +
                })?;
         265  +
            let body = response.body().bytes().expect("body loaded");
         266  +
            let output = crate::operation::describe_continuous_backups::DescribeContinuousBackupsOutput::deserialize_with_response(
         267  +
                &mut *deser,
         268  +
                response.headers(),
         269  +
                response.status().into(),
         270  +
                body,
         271  +
            )
         272  +
            .map_err(|e| {
         273  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         274  +
            })?;
         275  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         276  +
        }
  156    277   
    }
  157    278   
}
  158    279   
#[derive(Debug)]
  159    280   
struct DescribeContinuousBackupsRequestSerializer;
  160    281   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeContinuousBackupsRequestSerializer {
  161    282   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    283   
    fn serialize_input(
  163    284   
        &self,
  164    285   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    286   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    287   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    288   
        let input = input
  168    289   
            .downcast::<crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput>()
  169    290   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
  183         -
            }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::describe_continuous_backups::DescribeContinuousBackupsInput,
  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.DescribeContinuousBackups",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  203         -
            crate::protocol_serde::shape_describe_continuous_backups::ser_describe_continuous_backups_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())
         291  +
        let protocol = _cfg
         292  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         293  +
            .expect("a SharedClientProtocol is required");
         294  +
        let mut request = protocol
         295  +
            .serialize_request(&input, DescribeContinuousBackups::INPUT_SCHEMA, "", _cfg)
         296  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         297  +
         298  +
        return ::std::result::Result::Ok(request);
  210    299   
    }
  211    300   
}
  212    301   
#[derive(Debug)]
  213    302   
struct DescribeContinuousBackupsEndpointParamsInterceptor;
  214    303   
  215    304   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeContinuousBackupsEndpointParamsInterceptor {
  216    305   
    fn name(&self) -> &'static str {
  217    306   
        "DescribeContinuousBackupsEndpointParamsInterceptor"
  218    307   
    }
  219    308   

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

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

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

@@ -1,1 +106,117 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeContinuousBackupsOutput",
   19     19   
);
   20     20   
static DESCRIBECONTINUOUSBACKUPSOUTPUT_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#DescribeContinuousBackupsOutput$ContinuousBackupsDescription",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeContinuousBackupsOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27         -
    "continuous_backups_description",
          27  +
    "ContinuousBackupsDescription",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBECONTINUOUSBACKUPSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBECONTINUOUSBACKUPSOUTPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBECONTINUOUSBACKUPSOUTPUT_MEMBER_CONTINUOUS_BACKUPS_DESCRIPTION],
   34     34   
);
   35     35   
impl DescribeContinuousBackupsOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECONTINUOUSBACKUPSOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeContinuousBackupsOutput {
   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(&DESCRIBECONTINUOUSBACKUPSOUTPUT_MEMBER_CONTINUOUS_BACKUPS_DESCRIPTION, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeContinuousBackupsOutput {
   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(&DESCRIBECONTINUOUSBACKUPSOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBECONTINUOUSBACKUPSOUTPUT_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 DescribeContinuousBackupsOutput {
          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 DescribeContinuousBackupsOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`DescribeContinuousBackupsOutput`](crate::operation::describe_continuous_backups::DescribeContinuousBackupsOutput).
   79     90   
    pub fn builder() -> crate::operation::describe_continuous_backups::builders::DescribeContinuousBackupsOutputBuilder {
   80     91   
        crate::operation::describe_continuous_backups::builders::DescribeContinuousBackupsOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`DescribeContinuousBackupsOutput`](crate::operation::describe_continuous_backups::DescribeContinuousBackupsOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_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 `DescribeContributorInsights`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeContributorInsights;
    6      6   
impl DescribeContributorInsights {
    7      7   
    /// Creates a new `DescribeContributorInsights`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_contributor_insights::DescribeContributorInsightsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_contributor_insights::DescribeContributorInsightsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_contributor_insights::DescribeContributorInsightsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_contributor_insights::DescribeContributorInsightsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_contributor_insights::DescribeContributorInsightsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +239,306 @@
  130    136   
                crate::operation::describe_contributor_insights::DescribeContributorInsightsError,
  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 DescribeContributorInsightsResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeContributorInsightsResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         152  +
        #[allow(unused_mut)]
         153  +
        let mut force_error = false;
         154  +
         155  +
        if !success && status != 200 || force_error {
  145    156   
            let headers = response.headers();
  146    157   
            let body = response.body().bytes().expect("body loaded");
  147    158   
            #[allow(unused_mut)]
  148         -
        let mut force_error = false;
         159  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         160  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         161  +
            })?;
  149    162   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_describe_contributor_insights::de_describe_contributor_insights_http_error(status, headers, body)
  152         -
        } else {
  153         -
            crate::protocol_serde::shape_describe_contributor_insights::de_describe_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::describe_contributor_insights::DescribeContributorInsightsError::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::describe_contributor_insights::DescribeContributorInsightsError::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::describe_contributor_insights::DescribeContributorInsightsError::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::describe_contributor_insights::DescribeContributorInsightsError::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, DescribeContributorInsights::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::describe_contributor_insights::DescribeContributorInsightsOutput::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 DescribeContributorInsightsRequestSerializer;
  160    259   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeContributorInsightsRequestSerializer {
  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::describe_contributor_insights::DescribeContributorInsightsInput>()
  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::describe_contributor_insights::DescribeContributorInsightsInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
  183         -
            }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::describe_contributor_insights::DescribeContributorInsightsInput,
  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.DescribeContributorInsights",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  203         -
            crate::protocol_serde::shape_describe_contributor_insights::ser_describe_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, DescribeContributorInsights::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 DescribeContributorInsightsEndpointParamsInterceptor;
  214    281   
  215    282   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeContributorInsightsEndpointParamsInterceptor {
  216    283   
    fn name(&self) -> &'static str {
  217    284   
        "DescribeContributorInsightsEndpointParamsInterceptor"
  218    285   
    }
  219    286   

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

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

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

@@ -51,51 +265,266 @@
   71     71   
    "com.amazonaws.dynamodb.synthetic",
   72     72   
    "DescribeContributorInsightsOutput",
   73     73   
);
   74     74   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$TableName",
   77     77   
        "com.amazonaws.dynamodb.synthetic",
   78     78   
        "DescribeContributorInsightsOutput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "table_name",
          81  +
    "TableName",
   82     82   
    0,
   83     83   
);
   84     84   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$IndexName",
   87     87   
        "com.amazonaws.dynamodb.synthetic",
   88     88   
        "DescribeContributorInsightsOutput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "index_name",
          91  +
    "IndexName",
   92     92   
    1,
   93     93   
);
   94     94   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$ContributorInsightsRuleList",
   97     97   
        "com.amazonaws.dynamodb.synthetic",
   98     98   
        "DescribeContributorInsightsOutput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::List,
  101         -
    "contributor_insights_rule_list",
         101  +
    "ContributorInsightsRuleList",
  102    102   
    2,
  103    103   
);
  104    104   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$ContributorInsightsStatus",
  107    107   
        "com.amazonaws.dynamodb.synthetic",
  108    108   
        "DescribeContributorInsightsOutput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::String,
  111         -
    "contributor_insights_status",
         111  +
    "ContributorInsightsStatus",
  112    112   
    3,
  113    113   
);
  114    114   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$LastUpdateDateTime",
  117    117   
        "com.amazonaws.dynamodb.synthetic",
  118    118   
        "DescribeContributorInsightsOutput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::Timestamp,
  121         -
    "last_update_date_time",
         121  +
    "LastUpdateDateTime",
  122    122   
    4,
  123    123   
);
  124    124   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static(
  126    126   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$FailureException",
  127    127   
        "com.amazonaws.dynamodb.synthetic",
  128    128   
        "DescribeContributorInsightsOutput",
  129    129   
    ),
  130    130   
    ::aws_smithy_schema::ShapeType::Structure,
  131         -
    "failure_exception",
         131  +
    "FailureException",
  132    132   
    5,
  133    133   
);
  134    134   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  135    135   
    DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA_ID,
  136    136   
    ::aws_smithy_schema::ShapeType::Structure,
  137    137   
    &[
  138    138   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME,
  139    139   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME,
  140    140   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST,
  141    141   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS,
  142    142   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME,
  143    143   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION,
  144    144   
    ],
  145    145   
);
  146    146   
impl DescribeContributorInsightsOutput {
  147    147   
    /// The schema for this shape.
  148    148   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA;
  149    149   
}
  150    150   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeContributorInsightsOutput {
  151    151   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  152    152   
    fn serialize_members(
  153    153   
        &self,
  154    154   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  155    155   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  156    156   
        if let Some(ref val) = self.table_name {
  157    157   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME, val)?;
  158    158   
        }
  159    159   
        if let Some(ref val) = self.index_name {
  160    160   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME, val)?;
  161    161   
        }
  162    162   
        if let Some(ref val) = self.contributor_insights_rule_list {
  163    163   
            ser.write_list(
  164    164   
                &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST,
  165    165   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  166    166   
                    for item in val {
  167    167   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  168    168   
                    }
  169    169   
                    Ok(())
  170    170   
                },
  171    171   
            )?;
  172    172   
        }
  173    173   
        if let Some(ref val) = self.contributor_insights_status {
  174    174   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS, val.as_str())?;
  175    175   
        }
  176    176   
        if let Some(ref val) = self.last_update_date_time {
  177    177   
            ser.write_timestamp(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME, val)?;
  178    178   
        }
  179    179   
        if let Some(ref val) = self.failure_exception {
  180    180   
            ser.write_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION, val)?;
  181    181   
        }
  182    182   
        Ok(())
  183    183   
    }
  184    184   
}
  185    185   
impl DescribeContributorInsightsOutput {
  186    186   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  187         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  188         -
        deserializer: &mut D,
         187  +
    pub fn deserialize(
         188  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  189    189   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  190    190   
        #[allow(unused_variables, unused_mut)]
  191    191   
        let mut builder = Self::builder();
  192    192   
        #[allow(
  193    193   
            unused_variables,
  194    194   
            unreachable_code,
  195    195   
            clippy::single_match,
  196    196   
            clippy::match_single_binding,
  197    197   
            clippy::diverging_sub_expression
  198    198   
        )]
  199         -
        deserializer.read_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, (), |_, member, deser| {
         199  +
        deserializer.read_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, &mut |member, deser| {
  200    200   
            match member.member_index() {
  201    201   
                Some(0) => {
  202    202   
                    builder.table_name = Some(deser.read_string(member)?);
  203    203   
                }
  204    204   
                Some(1) => {
  205    205   
                    builder.index_name = Some(deser.read_string(member)?);
  206    206   
                }
  207    207   
                Some(2) => {
  208         -
                    builder.contributor_insights_rule_list = Some({
  209         -
                        let container = if let Some(cap) = deser.container_size() {
  210         -
                            Vec::with_capacity(cap)
  211         -
                        } else {
  212         -
                            Vec::new()
  213         -
                        };
  214         -
                        deser.read_list(member, container, |mut list, deser| {
  215         -
                            list.push(deser.read_string(member)?);
  216         -
                            Ok(list)
  217         -
                        })?
  218         -
                    });
         208  +
                    builder.contributor_insights_rule_list = Some(deser.read_string_list(member)?);
  219    209   
                }
  220    210   
                Some(3) => {
  221    211   
                    builder.contributor_insights_status = Some(crate::types::ContributorInsightsStatus::from(deser.read_string(member)?.as_str()));
  222    212   
                }
  223    213   
                Some(4) => {
  224    214   
                    builder.last_update_date_time = Some(deser.read_timestamp(member)?);
  225    215   
                }
  226    216   
                Some(5) => {
  227    217   
                    builder.failure_exception = Some(crate::types::FailureException::deserialize(deser)?);
  228    218   
                }
  229    219   
                _ => {}
  230    220   
            }
  231    221   
            Ok(())
  232    222   
        })?;
  233    223   
        Ok(builder.build())
  234    224   
    }
  235    225   
}
         226  +
impl DescribeContributorInsightsOutput {
         227  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         228  +
    pub fn deserialize_with_response(
         229  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         230  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         231  +
        _status: u16,
         232  +
        _body: &[u8],
         233  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         234  +
        Self::deserialize(deserializer)
         235  +
    }
         236  +
}
  236    237   
impl DescribeContributorInsightsOutput {
  237    238   
    /// Creates a new builder-style object to manufacture [`DescribeContributorInsightsOutput`](crate::operation::describe_contributor_insights::DescribeContributorInsightsOutput).
  238    239   
    pub fn builder() -> crate::operation::describe_contributor_insights::builders::DescribeContributorInsightsOutputBuilder {
  239    240   
        crate::operation::describe_contributor_insights::builders::DescribeContributorInsightsOutputBuilder::default()
  240    241   
    }
  241    242   
}
  242    243   
  243    244   
/// A builder for [`DescribeContributorInsightsOutput`](crate::operation::describe_contributor_insights::DescribeContributorInsightsOutput).
  244    245   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  245    246   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_endpoints.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 `DescribeEndpoints`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeEndpoints;
    6      6   
impl DescribeEndpoints {
    7      7   
    /// Creates a new `DescribeEndpoints`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_endpoints::DescribeEndpointsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_endpoints::DescribeEndpointsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_endpoints::DescribeEndpointsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_endpoints::DescribeEndpointsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_endpoints::DescribeEndpointsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +228,233 @@
  124    128   
                crate::operation::describe_endpoints::DescribeEndpointsError,
  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 DescribeEndpointsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeEndpointsResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         144  +
        #[allow(unused_mut)]
         145  +
        let mut force_error = false;
         146  +
         147  +
        if !success && status != 200 || force_error {
  139    148   
            let headers = response.headers();
  140    149   
            let body = response.body().bytes().expect("body loaded");
  141    150   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
  143    154   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints_http_error(status, headers, body)
         155  +
            let generic = generic_builder.build();
         156  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         157  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         158  +
                    crate::operation::describe_endpoints::DescribeEndpointsError::generic(generic),
         159  +
                ),
         160  +
            ))
  146    161   
        } else {
  147         -
            crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints_http_response(status, headers, body)
  148         -
        };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         162  +
            let protocol = _cfg
         163  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         164  +
                .expect("a SharedClientProtocol is required");
         165  +
            let mut deser = protocol
         166  +
                .deserialize_response(response, DescribeEndpoints::OUTPUT_SCHEMA, _cfg)
         167  +
                .map_err(|e| {
         168  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
                })?;
         170  +
            let body = response.body().bytes().expect("body loaded");
         171  +
            let output = crate::operation::describe_endpoints::DescribeEndpointsOutput::deserialize_with_response(
         172  +
                &mut *deser,
         173  +
                response.headers(),
         174  +
                response.status().into(),
         175  +
                body,
         176  +
            )
         177  +
            .map_err(|e| {
         178  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         179  +
            })?;
         180  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         181  +
        }
  150    182   
    }
  151    183   
}
  152    184   
#[derive(Debug)]
  153    185   
struct DescribeEndpointsRequestSerializer;
  154    186   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeEndpointsRequestSerializer {
  155    187   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    188   
    fn serialize_input(
  157    189   
        &self,
  158    190   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    191   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    192   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    193   
        let input = input
  162    194   
            .downcast::<crate::operation::describe_endpoints::DescribeEndpointsInput>()
  163    195   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                ::std::write!(output, "/").expect("formatting should succeed");
  176         -
                ::std::result::Result::Ok(())
  177         -
            }
  178         -
            #[allow(clippy::unnecessary_wraps)]
  179         -
            fn update_http_builder(
  180         -
                input: &crate::operation::describe_endpoints::DescribeEndpointsInput,
  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.DescribeEndpoints",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_endpoints::ser_describe_endpoints_input(&input)?);
         196  +
        let protocol = _cfg
         197  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         198  +
            .expect("a SharedClientProtocol is required");
         199  +
        let mut request = protocol
         200  +
            .serialize_request(&input, DescribeEndpoints::INPUT_SCHEMA, "", _cfg)
         201  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  197    202   
  198         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         203  +
        return ::std::result::Result::Ok(request);
  199    204   
    }
  200    205   
}
  201    206   
#[derive(Debug)]
  202    207   
struct DescribeEndpointsEndpointParamsInterceptor;
  203    208   
  204    209   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeEndpointsEndpointParamsInterceptor {
  205    210   
    fn name(&self) -> &'static str {
  206    211   
        "DescribeEndpointsEndpointParamsInterceptor"
  207    212   
    }
  208    213   

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

@@ -1,1 +69,82 @@
   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 DescribeEndpointsInput {
   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(&DESCRIBEENDPOINTSINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&DESCRIBEENDPOINTSINPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        builder
   47     47   
            .build()
   48     48   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   49     49   
    }
   50     50   
}
          51  +
impl DescribeEndpointsInput {
          52  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          53  +
    pub fn deserialize_with_response(
          54  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          55  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          56  +
        _status: u16,
          57  +
        _body: &[u8],
          58  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          59  +
        Self::builder()
          60  +
            .build()
          61  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          62  +
    }
          63  +
}
   51     64   
impl DescribeEndpointsInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
   53     66   
    pub fn builder() -> crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder {
   54     67   
        crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
   59     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   60     73   
#[non_exhaustive]

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_export.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 `DescribeExport`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeExport;
    6      6   
impl DescribeExport {
    7      7   
    /// Creates a new `DescribeExport`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_export::DescribeExportInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_export::DescribeExportOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_export::DescribeExportInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_export::DescribeExportOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_export::DescribeExportError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +231,320 @@
  124    128   
                crate::operation::describe_export::DescribeExportError,
  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 DescribeExportResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeExportResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         144  +
        #[allow(unused_mut)]
         145  +
        let mut force_error = false;
         146  +
         147  +
        if !success && status != 200 || force_error {
  139    148   
            let headers = response.headers();
  140    149   
            let body = response.body().bytes().expect("body loaded");
  141    150   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
  143    154   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_describe_export::de_describe_export_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_describe_export::de_describe_export_http_response(status, headers, body)
         155  +
            let generic = generic_builder.build();
         156  +
            let error_code = match generic.code() {
         157  +
                ::std::option::Option::Some(code) => code,
         158  +
                ::std::option::Option::None => {
         159  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         160  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::describe_export::DescribeExportError::unhandled(
         161  +
                            generic,
         162  +
                        )),
         163  +
                    ))
         164  +
                }
         165  +
            };
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "ExportNotFoundException" => crate::operation::describe_export::DescribeExportError::ExportNotFoundError({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::ExportNotFoundError::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::ExportNotFoundError::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::describe_export::DescribeExportError::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  +
                "LimitExceededException" => crate::operation::describe_export::DescribeExportError::LimitExceededError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::LimitExceededError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::LimitExceededError::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  +
                        }
  148    236   
                    };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                _ => crate::operation::describe_export::DescribeExportError::generic(generic),
         244  +
            };
         245  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         246  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         247  +
            ))
         248  +
        } else {
         249  +
            let protocol = _cfg
         250  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         251  +
                .expect("a SharedClientProtocol is required");
         252  +
            let mut deser = protocol
         253  +
                .deserialize_response(response, DescribeExport::OUTPUT_SCHEMA, _cfg)
         254  +
                .map_err(|e| {
         255  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
                })?;
         257  +
            let body = response.body().bytes().expect("body loaded");
         258  +
            let output = crate::operation::describe_export::DescribeExportOutput::deserialize_with_response(
         259  +
                &mut *deser,
         260  +
                response.headers(),
         261  +
                response.status().into(),
         262  +
                body,
         263  +
            )
         264  +
            .map_err(|e| {
         265  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         266  +
            })?;
         267  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         268  +
        }
  150    269   
    }
  151    270   
}
  152    271   
#[derive(Debug)]
  153    272   
struct DescribeExportRequestSerializer;
  154    273   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeExportRequestSerializer {
  155    274   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    275   
    fn serialize_input(
  157    276   
        &self,
  158    277   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    278   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    279   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    280   
        let input = input
  162    281   
            .downcast::<crate::operation::describe_export::DescribeExportInput>()
  163    282   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::describe_export::DescribeExportInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                ::std::write!(output, "/").expect("formatting should succeed");
  176         -
                ::std::result::Result::Ok(())
  177         -
            }
  178         -
            #[allow(clippy::unnecessary_wraps)]
  179         -
            fn update_http_builder(
  180         -
                input: &crate::operation::describe_export::DescribeExportInput,
  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.DescribeExport",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_export::ser_describe_export_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())
         283  +
        let protocol = _cfg
         284  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
            .expect("a SharedClientProtocol is required");
         286  +
        let mut request = protocol
         287  +
            .serialize_request(&input, DescribeExport::INPUT_SCHEMA, "", _cfg)
         288  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         289  +
         290  +
        return ::std::result::Result::Ok(request);
  202    291   
    }
  203    292   
}
  204    293   
#[derive(Debug)]
  205    294   
struct DescribeExportEndpointParamsInterceptor;
  206    295   
  207    296   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeExportEndpointParamsInterceptor {
  208    297   
    fn name(&self) -> &'static str {
  209    298   
        "DescribeExportEndpointParamsInterceptor"
  210    299   
    }
  211    300   

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeExportInput",
   19     19   
);
   20     20   
static DESCRIBEEXPORTINPUT_MEMBER_EXPORT_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.dynamodb.synthetic#DescribeExportInput$ExportArn",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeExportInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "export_arn",
          27  +
    "ExportArn",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBEEXPORTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBEEXPORTINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBEEXPORTINPUT_MEMBER_EXPORT_ARN],
   34     34   
);
   35     35   
impl DescribeExportInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEEXPORTINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeExportInput {
   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.export_arn {
   46     46   
            ser.write_string(&DESCRIBEEXPORTINPUT_MEMBER_EXPORT_ARN, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeExportInput {
   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(&DESCRIBEEXPORTINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBEEXPORTINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.export_arn = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.export_arn = builder.export_arn.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl DescribeExportInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl DescribeExportInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeExportInput`](crate::operation::describe_export::DescribeExportInput).
   81     93   
    pub fn builder() -> crate::operation::describe_export::builders::DescribeExportInputBuilder {
   82     94   
        crate::operation::describe_export::builders::DescribeExportInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeExportInput`](crate::operation::describe_export::DescribeExportInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table.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 `DescribeGlobalTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeGlobalTable;
    6      6   
impl DescribeGlobalTable {
    7      7   
    /// Creates a new `DescribeGlobalTable`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_global_table::DescribeGlobalTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_global_table::DescribeGlobalTableOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_global_table::DescribeGlobalTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_global_table::DescribeGlobalTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_global_table::DescribeGlobalTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +233,320 @@
  124    128   
                crate::operation::describe_global_table::DescribeGlobalTableError,
  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 DescribeGlobalTableResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeGlobalTableResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         144  +
        #[allow(unused_mut)]
         145  +
        let mut force_error = false;
         146  +
         147  +
        if !success && status != 200 || force_error {
  139    148   
            let headers = response.headers();
  140    149   
            let body = response.body().bytes().expect("body loaded");
  141    150   
            #[allow(unused_mut)]
  142         -
        let mut force_error = false;
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
  143    154   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_describe_global_table::de_describe_global_table_http_error(status, headers, body)
  146         -
        } else {
  147         -
            crate::protocol_serde::shape_describe_global_table::de_describe_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::describe_global_table::DescribeGlobalTableError::unhandled(generic),
         162  +
                        ),
         163  +
                    ))
         164  +
                }
  148    165   
            };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "GlobalTableNotFoundException" => crate::operation::describe_global_table::DescribeGlobalTableError::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::describe_global_table::DescribeGlobalTableError::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::describe_global_table::DescribeGlobalTableError::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  +
                _ => crate::operation::describe_global_table::DescribeGlobalTableError::generic(generic),
         244  +
            };
         245  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         246  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         247  +
            ))
         248  +
        } else {
         249  +
            let protocol = _cfg
         250  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         251  +
                .expect("a SharedClientProtocol is required");
         252  +
            let mut deser = protocol
         253  +
                .deserialize_response(response, DescribeGlobalTable::OUTPUT_SCHEMA, _cfg)
         254  +
                .map_err(|e| {
         255  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
                })?;
         257  +
            let body = response.body().bytes().expect("body loaded");
         258  +
            let output = crate::operation::describe_global_table::DescribeGlobalTableOutput::deserialize_with_response(
         259  +
                &mut *deser,
         260  +
                response.headers(),
         261  +
                response.status().into(),
         262  +
                body,
         263  +
            )
         264  +
            .map_err(|e| {
         265  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         266  +
            })?;
         267  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         268  +
        }
  150    269   
    }
  151    270   
}
  152    271   
#[derive(Debug)]
  153    272   
struct DescribeGlobalTableRequestSerializer;
  154    273   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeGlobalTableRequestSerializer {
  155    274   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    275   
    fn serialize_input(
  157    276   
        &self,
  158    277   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    278   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    279   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    280   
        let input = input
  162    281   
            .downcast::<crate::operation::describe_global_table::DescribeGlobalTableInput>()
  163    282   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::describe_global_table::DescribeGlobalTableInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                ::std::write!(output, "/").expect("formatting should succeed");
  176         -
                ::std::result::Result::Ok(())
  177         -
            }
  178         -
            #[allow(clippy::unnecessary_wraps)]
  179         -
            fn update_http_builder(
  180         -
                input: &crate::operation::describe_global_table::DescribeGlobalTableInput,
  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.DescribeGlobalTable",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_global_table::ser_describe_global_table_input(
  197         -
            &input,
  198         -
        )?);
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         283  +
        let protocol = _cfg
         284  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         285  +
            .expect("a SharedClientProtocol is required");
         286  +
        let mut request = protocol
         287  +
            .serialize_request(&input, DescribeGlobalTable::INPUT_SCHEMA, "", _cfg)
         288  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         289  +
         290  +
        return ::std::result::Result::Ok(request);
  204    291   
    }
  205    292   
}
  206    293   
#[derive(Debug)]
  207    294   
struct DescribeGlobalTableEndpointParamsInterceptor;
  208    295   
  209    296   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeGlobalTableEndpointParamsInterceptor {
  210    297   
    fn name(&self) -> &'static str {
  211    298   
        "DescribeGlobalTableEndpointParamsInterceptor"
  212    299   
    }
  213    300