AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/update_database/_update_database_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/update_database/_update_database_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/update_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 `UpdateTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateTable;
    6      6   
impl UpdateTable {
    7      7   
    /// Creates a new `UpdateTable`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_table::UpdateTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_table::UpdateTableOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_table::UpdateTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_table::UpdateTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_table::UpdateTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,390 @@
  138    142   
                crate::operation::update_table::UpdateTableError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct UpdateTableResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateTableResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_update_table::de_update_table_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_update_table::de_update_table_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_table::UpdateTableError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "AccessDeniedException" => crate::operation::update_table::UpdateTableError::AccessDeniedException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    tmp
         203  +
                }),
         204  +
                "InternalServerException" => crate::operation::update_table::UpdateTableError::InternalServerException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InternalServerException::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  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    tmp
         224  +
                }),
         225  +
                "InvalidEndpointException" => crate::operation::update_table::UpdateTableError::InvalidEndpointException({
         226  +
                    let mut tmp = match protocol
         227  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         228  +
                        .and_then(|mut deser| {
         229  +
                            crate::types::error::InvalidEndpointException::deserialize_with_response(
         230  +
                                &mut *deser,
         231  +
                                response.headers(),
         232  +
                                response.status().into(),
         233  +
                                body,
         234  +
                            )
         235  +
                        }) {
         236  +
                        ::std::result::Result::Ok(val) => val,
         237  +
                        ::std::result::Result::Err(e) => {
         238  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         239  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         240  +
                            ))
         241  +
                        }
         242  +
                    };
         243  +
                    tmp.meta = generic;
         244  +
                    if tmp.message.is_none() {
         245  +
                        tmp.message = _error_message;
         246  +
                    }
         247  +
                    tmp
         248  +
                }),
         249  +
                "ResourceNotFoundException" => crate::operation::update_table::UpdateTableError::ResourceNotFoundException({
         250  +
                    let mut tmp = match protocol
         251  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         252  +
                        .and_then(|mut deser| {
         253  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         254  +
                                &mut *deser,
         255  +
                                response.headers(),
         256  +
                                response.status().into(),
         257  +
                                body,
         258  +
                            )
         259  +
                        }) {
         260  +
                        ::std::result::Result::Ok(val) => val,
         261  +
                        ::std::result::Result::Err(e) => {
         262  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         263  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         264  +
                            ))
         265  +
                        }
         266  +
                    };
         267  +
                    tmp.meta = generic;
         268  +
                    if tmp.message.is_none() {
         269  +
                        tmp.message = _error_message;
         270  +
                    }
         271  +
                    tmp
         272  +
                }),
         273  +
                "ThrottlingException" => crate::operation::update_table::UpdateTableError::ThrottlingException({
         274  +
                    let mut tmp = match protocol
         275  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         276  +
                        .and_then(|mut deser| {
         277  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         278  +
                                &mut *deser,
         279  +
                                response.headers(),
         280  +
                                response.status().into(),
         281  +
                                body,
         282  +
                            )
         283  +
                        }) {
         284  +
                        ::std::result::Result::Ok(val) => val,
         285  +
                        ::std::result::Result::Err(e) => {
         286  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         287  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         288  +
                            ))
         289  +
                        }
  162    290   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         291  +
                    tmp.meta = generic;
         292  +
                    tmp
         293  +
                }),
         294  +
                "ValidationException" => crate::operation::update_table::UpdateTableError::ValidationException({
         295  +
                    let mut tmp = match protocol
         296  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         297  +
                        .and_then(|mut deser| {
         298  +
                            crate::types::error::ValidationException::deserialize_with_response(
         299  +
                                &mut *deser,
         300  +
                                response.headers(),
         301  +
                                response.status().into(),
         302  +
                                body,
         303  +
                            )
         304  +
                        }) {
         305  +
                        ::std::result::Result::Ok(val) => val,
         306  +
                        ::std::result::Result::Err(e) => {
         307  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         308  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         309  +
                            ))
         310  +
                        }
         311  +
                    };
         312  +
                    tmp.meta = generic;
         313  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::update_table::UpdateTableError::generic(generic),
         316  +
            };
         317  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         318  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         319  +
            ))
         320  +
        } else {
         321  +
            let protocol = _cfg
         322  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
                .expect("a SharedClientProtocol is required");
         324  +
            let mut deser = protocol.deserialize_response(response, UpdateTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         325  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         326  +
            })?;
         327  +
            let body = response.body().bytes().expect("body loaded");
         328  +
            let output = crate::operation::update_table::UpdateTableOutput::deserialize_with_response(
         329  +
                &mut *deser,
         330  +
                response.headers(),
         331  +
                response.status().into(),
         332  +
                body,
         333  +
            )
         334  +
            .map_err(|e| {
         335  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         336  +
            })?;
         337  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         338  +
        }
  164    339   
    }
  165    340   
}
  166    341   
#[derive(Debug)]
  167    342   
struct UpdateTableRequestSerializer;
  168    343   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateTableRequestSerializer {
  169    344   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    345   
    fn serialize_input(
  171    346   
        &self,
  172    347   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    348   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    349   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    350   
        let input = input
  176    351   
            .downcast::<crate::operation::update_table::UpdateTableInput>()
  177    352   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::update_table::UpdateTableInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::update_table::UpdateTableInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Timestream_20181101.UpdateTable",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_table::ser_update_table_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         353  +
        let protocol = _cfg
         354  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         355  +
            .expect("a SharedClientProtocol is required");
         356  +
        let mut request = protocol
         357  +
            .serialize_request(&input, UpdateTable::INPUT_SCHEMA, "", _cfg)
         358  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         359  +
         360  +
        return ::std::result::Result::Ok(request);
  216    361   
    }
  217    362   
}
  218    363   
#[derive(Debug)]
  219    364   
struct UpdateTableEndpointParamsInterceptor;
  220    365   
  221    366   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTableEndpointParamsInterceptor {
  222    367   
    fn name(&self) -> &'static str {
  223    368   
        "UpdateTableEndpointParamsInterceptor"
  224    369   
    }
  225    370   

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/update_table/_update_table_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/update_table/_update_table_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/write_records/_write_records_input.rs

@@ -17,17 +199,210 @@
   37     37   
    "com.amazonaws.timestreamwrite.synthetic",
   38     38   
    "WriteRecordsInput",
   39     39   
);
   40     40   
static WRITERECORDSINPUT_MEMBER_DATABASE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "com.amazonaws.timestreamwrite.synthetic#WriteRecordsInput$DatabaseName",
   43     43   
        "com.amazonaws.timestreamwrite.synthetic",
   44     44   
        "WriteRecordsInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "database_name",
          47  +
    "DatabaseName",
   48     48   
    0,
   49     49   
);
   50     50   
static WRITERECORDSINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.timestreamwrite.synthetic#WriteRecordsInput$TableName",
   53     53   
        "com.amazonaws.timestreamwrite.synthetic",
   54     54   
        "WriteRecordsInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::String,
   57         -
    "table_name",
          57  +
    "TableName",
   58     58   
    1,
   59     59   
);
   60     60   
static WRITERECORDSINPUT_MEMBER_COMMON_ATTRIBUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.timestreamwrite.synthetic#WriteRecordsInput$CommonAttributes",
   63     63   
        "com.amazonaws.timestreamwrite.synthetic",
   64     64   
        "WriteRecordsInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67         -
    "common_attributes",
          67  +
    "CommonAttributes",
   68     68   
    2,
   69     69   
);
   70     70   
static WRITERECORDSINPUT_MEMBER_RECORDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.timestreamwrite.synthetic#WriteRecordsInput$Records",
   73     73   
        "com.amazonaws.timestreamwrite.synthetic",
   74     74   
        "WriteRecordsInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::List,
   77         -
    "records",
          77  +
    "Records",
   78     78   
    3,
   79     79   
);
   80     80   
static WRITERECORDSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     81   
    WRITERECORDSINPUT_SCHEMA_ID,
   82     82   
    ::aws_smithy_schema::ShapeType::Structure,
   83     83   
    &[
   84     84   
        &WRITERECORDSINPUT_MEMBER_DATABASE_NAME,
   85     85   
        &WRITERECORDSINPUT_MEMBER_TABLE_NAME,
   86     86   
        &WRITERECORDSINPUT_MEMBER_COMMON_ATTRIBUTES,
   87     87   
        &WRITERECORDSINPUT_MEMBER_RECORDS,
   88     88   
    ],
   89     89   
);
   90     90   
impl WriteRecordsInput {
   91     91   
    /// The schema for this shape.
   92     92   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &WRITERECORDSINPUT_SCHEMA;
   93     93   
}
   94     94   
impl ::aws_smithy_schema::serde::SerializableStruct for WriteRecordsInput {
   95     95   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   96     96   
    fn serialize_members(
   97     97   
        &self,
   98     98   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   99     99   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  100    100   
        if let Some(ref val) = self.database_name {
  101    101   
            ser.write_string(&WRITERECORDSINPUT_MEMBER_DATABASE_NAME, val)?;
  102    102   
        }
  103    103   
        if let Some(ref val) = self.table_name {
  104    104   
            ser.write_string(&WRITERECORDSINPUT_MEMBER_TABLE_NAME, val)?;
  105    105   
        }
  106    106   
        if let Some(ref val) = self.common_attributes {
  107    107   
            ser.write_struct(&WRITERECORDSINPUT_MEMBER_COMMON_ATTRIBUTES, val)?;
  108    108   
        }
  109    109   
        if let Some(ref val) = self.records {
  110    110   
            ser.write_list(
  111    111   
                &WRITERECORDSINPUT_MEMBER_RECORDS,
  112    112   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  113    113   
                    for item in val {
  114    114   
                        ser.write_struct(crate::types::Record::SCHEMA, item)?;
  115    115   
                    }
  116    116   
                    Ok(())
  117    117   
                },
  118    118   
            )?;
  119    119   
        }
  120    120   
        Ok(())
  121    121   
    }
  122    122   
}
  123    123   
impl WriteRecordsInput {
  124    124   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  125         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  126         -
        deserializer: &mut D,
         125  +
    pub fn deserialize(
         126  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  127    127   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  128    128   
        #[allow(unused_variables, unused_mut)]
  129    129   
        let mut builder = Self::builder();
  130    130   
        #[allow(
  131    131   
            unused_variables,
  132    132   
            unreachable_code,
  133    133   
            clippy::single_match,
  134    134   
            clippy::match_single_binding,
  135    135   
            clippy::diverging_sub_expression
  136    136   
        )]
  137         -
        deserializer.read_struct(&WRITERECORDSINPUT_SCHEMA, (), |_, member, deser| {
         137  +
        deserializer.read_struct(&WRITERECORDSINPUT_SCHEMA, &mut |member, deser| {
  138    138   
            match member.member_index() {
  139    139   
                Some(0) => {
  140    140   
                    builder.database_name = Some(deser.read_string(member)?);
  141    141   
                }
  142    142   
                Some(1) => {
  143    143   
                    builder.table_name = Some(deser.read_string(member)?);
  144    144   
                }
  145    145   
                Some(2) => {
  146    146   
                    builder.common_attributes = Some(crate::types::Record::deserialize(deser)?);
  147    147   
                }
  148    148   
                Some(3) => {
  149    149   
                    builder.records = Some({
  150         -
                        let container = if let Some(cap) = deser.container_size() {
  151         -
                            Vec::with_capacity(cap)
  152         -
                        } else {
  153         -
                            Vec::new()
  154         -
                        };
  155         -
                        deser.read_list(member, container, |mut list, deser| {
  156         -
                            list.push(crate::types::Record::deserialize(deser)?);
  157         -
                            Ok(list)
  158         -
                        })?
         150  +
                        let mut container = Vec::new();
         151  +
                        deser.read_list(member, &mut |deser| {
         152  +
                            container.push(crate::types::Record::deserialize(deser)?);
         153  +
                            Ok(())
         154  +
                        })?;
         155  +
                        container
  159    156   
                    });
  160    157   
                }
  161    158   
                _ => {}
  162    159   
            }
  163    160   
            Ok(())
  164    161   
        })?;
         162  +
        builder.database_name = builder.database_name.or(Some(String::new()));
         163  +
        builder.table_name = builder.table_name.or(Some(String::new()));
         164  +
        builder.records = builder.records.or(Some(Vec::new()));
  165    165   
        builder
  166    166   
            .build()
  167    167   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  168    168   
    }
  169    169   
}
         170  +
impl WriteRecordsInput {
         171  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         172  +
    pub fn deserialize_with_response(
         173  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         174  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         175  +
        _status: u16,
         176  +
        _body: &[u8],
         177  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         178  +
        Self::deserialize(deserializer)
         179  +
    }
         180  +
}
  170    181   
impl WriteRecordsInput {
  171    182   
    /// Creates a new builder-style object to manufacture [`WriteRecordsInput`](crate::operation::write_records::WriteRecordsInput).
  172    183   
    pub fn builder() -> crate::operation::write_records::builders::WriteRecordsInputBuilder {
  173    184   
        crate::operation::write_records::builders::WriteRecordsInputBuilder::default()
  174    185   
    }
  175    186   
}
  176    187   
  177    188   
/// A builder for [`WriteRecordsInput`](crate::operation::write_records::WriteRecordsInput).
  178    189   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  179    190   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/operation/write_records/_write_records_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde.rs

@@ -1,1 +204,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_create_batch_load_task;
   27         -
   28         -
pub(crate) mod shape_create_database;
   29         -
   30         -
pub(crate) mod shape_create_table;
   31         -
   32         -
pub(crate) mod shape_delete_database;
   33         -
   34         -
pub(crate) mod shape_delete_table;
   35         -
   36         -
pub(crate) mod shape_describe_batch_load_task;
   37         -
   38         -
pub(crate) mod shape_describe_database;
   39         -
   40         -
pub(crate) mod shape_describe_endpoints;
   41         -
   42         -
pub(crate) mod shape_describe_table;
   43         -
   44         -
pub(crate) mod shape_list_batch_load_tasks;
   45         -
   46         -
pub(crate) mod shape_list_databases;
   47         -
   48         -
pub(crate) mod shape_list_tables;
   49         -
   50         -
pub(crate) mod shape_list_tags_for_resource;
   51         -
   52         -
pub(crate) mod shape_resume_batch_load_task;
   53         -
   54         -
pub(crate) mod shape_tag_resource;
   55         -
   56         -
pub(crate) mod shape_untag_resource;
   57         -
   58         -
pub(crate) mod shape_update_database;
   59         -
   60         -
pub(crate) mod shape_update_table;
   61         -
   62         -
pub(crate) mod shape_write_records;
   63         -
   64         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   65         -
    if data.is_empty() {
   66         -
        b"{}"
   67         -
    } else {
   68         -
        data
   69         -
    }
   70         -
}
   71         -
   72         -
pub(crate) mod shape_access_denied_exception;
   73         -
   74         -
pub(crate) mod shape_conflict_exception;
   75         -
   76         -
pub(crate) mod shape_create_batch_load_task_input;
   77         -
   78         -
pub(crate) mod shape_create_database_input;
   79         -
   80         -
pub(crate) mod shape_create_table_input;
   81         -
   82         -
pub(crate) mod shape_delete_database_input;
   83         -
   84         -
pub(crate) mod shape_delete_table_input;
   85         -
   86         -
pub(crate) mod shape_describe_batch_load_task_input;
   87         -
   88         -
pub(crate) mod shape_describe_database_input;
   89         -
   90         -
pub(crate) mod shape_describe_table_input;
   91         -
   92         -
pub(crate) mod shape_internal_server_exception;
   93         -
   94         -
pub(crate) mod shape_invalid_endpoint_exception;
   95         -
   96         -
pub(crate) mod shape_list_batch_load_tasks_input;
   97         -
   98         -
pub(crate) mod shape_list_databases_input;
   99         -
  100         -
pub(crate) mod shape_list_tables_input;
  101         -
  102         -
pub(crate) mod shape_list_tags_for_resource_input;
  103         -
  104         -
pub(crate) mod shape_rejected_records_exception;
  105         -
  106         -
pub(crate) mod shape_resource_not_found_exception;
  107         -
  108         -
pub(crate) mod shape_resume_batch_load_task_input;
  109         -
  110         -
pub(crate) mod shape_service_quota_exceeded_exception;
  111         -
  112         -
pub(crate) mod shape_tag_resource_input;
  113         -
  114         -
pub(crate) mod shape_throttling_exception;
  115         -
  116         -
pub(crate) mod shape_untag_resource_input;
  117         -
  118         -
pub(crate) mod shape_update_database_input;
  119         -
  120         -
pub(crate) mod shape_update_table_input;
  121         -
  122         -
pub(crate) mod shape_validation_exception;
  123         -
  124         -
pub(crate) mod shape_write_records_input;
  125         -
  126         -
pub(crate) mod shape_batch_load_task_description;
  127         -
  128         -
pub(crate) mod shape_batch_load_task_list;
  129         -
  130         -
pub(crate) mod shape_data_model_configuration;
  131         -
  132         -
pub(crate) mod shape_data_source_configuration;
  133         -
  134         -
pub(crate) mod shape_database;
  135         -
  136         -
pub(crate) mod shape_database_list;
  137         -
  138         -
pub(crate) mod shape_endpoints;
  139         -
  140         -
pub(crate) mod shape_magnetic_store_write_properties;
  141         -
  142         -
pub(crate) mod shape_record;
  143         -
  144         -
pub(crate) mod shape_records_ingested;
  145         -
  146         -
pub(crate) mod shape_rejected_records;
  147         -
  148         -
pub(crate) mod shape_report_configuration;
  149         -
  150         -
pub(crate) mod shape_retention_properties;
  151         -
  152         -
pub(crate) mod shape_schema;
  153         -
  154         -
pub(crate) mod shape_table;
  155         -
  156         -
pub(crate) mod shape_table_list;
  157         -
  158         -
pub(crate) mod shape_tag;
  159         -
  160         -
pub(crate) mod shape_tag_list;
  161         -
  162         -
pub(crate) mod shape_batch_load_progress_report;
  163         -
  164         -
pub(crate) mod shape_batch_load_task;
  165         -
  166         -
pub(crate) mod shape_csv_configuration;
  167         -
  168         -
pub(crate) mod shape_data_model;
  169         -
  170         -
pub(crate) mod shape_data_model_s3_configuration;
  171         -
  172         -
pub(crate) mod shape_data_source_s3_configuration;
  173         -
  174         -
pub(crate) mod shape_dimension;
  175         -
  176         -
pub(crate) mod shape_endpoint;
  177         -
  178         -
pub(crate) mod shape_magnetic_store_rejected_data_location;
  179         -
  180         -
pub(crate) mod shape_measure_value;
  181         -
  182         -
pub(crate) mod shape_partition_key;
  183         -
  184         -
pub(crate) mod shape_rejected_record;
  185         -
  186         -
pub(crate) mod shape_report_s3_configuration;
  187         -
  188         -
pub(crate) mod shape_dimension_mapping;
  189         -
  190         -
pub(crate) mod shape_mixed_measure_mapping;
  191         -
  192         -
pub(crate) mod shape_multi_measure_mappings;
  193         -
  194         -
pub(crate) mod shape_partition_key_list;
  195         -
  196         -
pub(crate) mod shape_s3_configuration;
  197         -
  198         -
pub(crate) mod shape_dimension_mappings;
  199         -
  200         -
pub(crate) mod shape_mixed_measure_mapping_list;
  201         -
  202         -
pub(crate) mod shape_multi_measure_attribute_mapping;
  203         -
  204         -
pub(crate) mod shape_multi_measure_attribute_mapping_list;

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_access_denied_exception.rs

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_access_denied_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::AccessDeniedExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::AccessDeniedExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "Message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/protocol_serde/shape_batch_load_progress_report.rs

@@ -1,0 +75,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_batch_load_progress_report<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::BatchLoadProgressReport>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::BatchLoadProgressReportBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "RecordsProcessed" => {
   19         -
                            builder = builder.set_records_processed(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   21         -
                                    .map(i64::try_from)
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "RecordsIngested" => {
   26         -
                            builder = builder.set_records_ingested(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   28         -
                                    .map(i64::try_from)
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "ParseFailures" => {
   33         -
                            builder = builder.set_parse_failures(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   35         -
                                    .map(i64::try_from)
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "RecordIngestionFailures" => {
   40         -
                            builder = builder.set_record_ingestion_failures(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42         -
                                    .map(i64::try_from)
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        "FileFailures" => {
   47         -
                            builder = builder.set_file_failures(
   48         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   49         -
                                    .map(i64::try_from)
   50         -
                                    .transpose()?,
   51         -
                            );
   52         -
                        }
   53         -
                        "BytesMetered" => {
   54         -
                            builder = builder.set_bytes_metered(
   55         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   56         -
                                    .map(i64::try_from)
   57         -
                                    .transpose()?,
   58         -
                            );
   59         -
                        }
   60         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   61         -
                    },
   62         -
                    other => {
   63         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   64         -
                            "expected object key or end object, found: {other:?}"
   65         -
                        )))
   66         -
                    }
   67         -
                }
   68         -
            }
   69         -
            Ok(Some(builder.build()))
   70         -
        }
   71         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   72         -
            "expected start object or null",
   73         -
        )),
   74         -
    }
   75         -
}