AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/enable_kinesis_streaming_destination/_enable_kinesis_streaming_destination_output.rs

@@ -16,16 +162,216 @@
   36     36   
    "com.amazonaws.dynamodb.synthetic",
   37     37   
    "EnableKinesisStreamingDestinationOutput",
   38     38   
);
   39     39   
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.dynamodb.synthetic#EnableKinesisStreamingDestinationOutput$TableName",
   42     42   
        "com.amazonaws.dynamodb.synthetic",
   43     43   
        "EnableKinesisStreamingDestinationOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "table_name",
          46  +
    "TableName",
   47     47   
    0,
   48     48   
);
   49     49   
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.dynamodb.synthetic#EnableKinesisStreamingDestinationOutput$StreamArn",
   52     52   
        "com.amazonaws.dynamodb.synthetic",
   53     53   
        "EnableKinesisStreamingDestinationOutput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "stream_arn",
          56  +
    "StreamArn",
   57     57   
    1,
   58     58   
);
   59     59   
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.dynamodb.synthetic#EnableKinesisStreamingDestinationOutput$DestinationStatus",
   62     62   
        "com.amazonaws.dynamodb.synthetic",
   63     63   
        "EnableKinesisStreamingDestinationOutput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::String,
   66         -
    "destination_status",
          66  +
    "DestinationStatus",
   67     67   
    2,
   68     68   
);
   69     69   
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_ENABLE_KINESIS_STREAMING_CONFIGURATION: ::aws_smithy_schema::Schema =
   70     70   
    ::aws_smithy_schema::Schema::new_member(
   71     71   
        ::aws_smithy_schema::ShapeId::from_static(
   72     72   
            "com.amazonaws.dynamodb.synthetic#EnableKinesisStreamingDestinationOutput$EnableKinesisStreamingConfiguration",
   73     73   
            "com.amazonaws.dynamodb.synthetic",
   74     74   
            "EnableKinesisStreamingDestinationOutput",
   75     75   
        ),
   76     76   
        ::aws_smithy_schema::ShapeType::Structure,
   77         -
        "enable_kinesis_streaming_configuration",
          77  +
        "EnableKinesisStreamingConfiguration",
   78     78   
        3,
   79     79   
    );
          80  +
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "request_id",
          84  +
    4,
          85  +
)
          86  +
.with_http_header("x-amzn-requestid");
   80     87   
static ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     88   
    ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA_ID,
   82     89   
    ::aws_smithy_schema::ShapeType::Structure,
   83     90   
    &[
   84     91   
        &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME,
   85     92   
        &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN,
   86     93   
        &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS,
   87     94   
        &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_ENABLE_KINESIS_STREAMING_CONFIGURATION,
          95  +
        &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER__REQUEST_ID,
   88     96   
    ],
   89     97   
);
   90     98   
impl EnableKinesisStreamingDestinationOutput {
   91     99   
    /// The schema for this shape.
   92    100   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA;
   93    101   
}
   94    102   
impl ::aws_smithy_schema::serde::SerializableStruct for EnableKinesisStreamingDestinationOutput {
   95    103   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   96    104   
    fn serialize_members(
   97    105   
        &self,
   98    106   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   99    107   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  100    108   
        if let Some(ref val) = self.table_name {
  101    109   
            ser.write_string(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_TABLE_NAME, val)?;
  102    110   
        }
  103    111   
        if let Some(ref val) = self.stream_arn {
  104    112   
            ser.write_string(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_STREAM_ARN, val)?;
  105    113   
        }
  106    114   
        if let Some(ref val) = self.destination_status {
  107    115   
            ser.write_string(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_DESTINATION_STATUS, val.as_str())?;
  108    116   
        }
  109    117   
        if let Some(ref val) = self.enable_kinesis_streaming_configuration {
  110    118   
            ser.write_struct(
  111    119   
                &ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_MEMBER_ENABLE_KINESIS_STREAMING_CONFIGURATION,
  112    120   
                val,
  113    121   
            )?;
  114    122   
        }
  115    123   
        Ok(())
  116    124   
    }
  117    125   
}
  118    126   
impl EnableKinesisStreamingDestinationOutput {
  119    127   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  120         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  121         -
        deserializer: &mut D,
         128  +
    pub fn deserialize(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         130  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         131  +
        #[allow(unused_variables, unused_mut)]
         132  +
        let mut builder = Self::builder();
         133  +
        #[allow(
         134  +
            unused_variables,
         135  +
            unreachable_code,
         136  +
            clippy::single_match,
         137  +
            clippy::match_single_binding,
         138  +
            clippy::diverging_sub_expression
         139  +
        )]
         140  +
        deserializer.read_struct(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, &mut |member, deser| {
         141  +
            match member.member_index() {
         142  +
                Some(0) => {
         143  +
                    builder.table_name = Some(deser.read_string(member)?);
         144  +
                }
         145  +
                Some(1) => {
         146  +
                    builder.stream_arn = Some(deser.read_string(member)?);
         147  +
                }
         148  +
                Some(2) => {
         149  +
                    builder.destination_status = Some(crate::types::DestinationStatus::from(deser.read_string(member)?.as_str()));
         150  +
                }
         151  +
                Some(3) => {
         152  +
                    builder.enable_kinesis_streaming_configuration = Some(crate::types::EnableKinesisStreamingConfiguration::deserialize(deser)?);
         153  +
                }
         154  +
                Some(4) => {
         155  +
                    builder._request_id = Some(deser.read_string(member)?);
         156  +
                }
         157  +
                _ => {}
         158  +
            }
         159  +
            Ok(())
         160  +
        })?;
         161  +
        Ok(builder.build())
         162  +
    }
         163  +
}
         164  +
impl EnableKinesisStreamingDestinationOutput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         166  +
    /// Header-bound members are read directly from headers, avoiding runtime
         167  +
    /// member iteration overhead. Body members are read via the deserializer.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
  122    173   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  123    174   
        #[allow(unused_variables, unused_mut)]
  124    175   
        let mut builder = Self::builder();
         176  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         177  +
            builder._request_id = Some(val.to_string());
         178  +
        }
  125    179   
        #[allow(
  126    180   
            unused_variables,
  127    181   
            unreachable_code,
  128    182   
            clippy::single_match,
  129    183   
            clippy::match_single_binding,
  130    184   
            clippy::diverging_sub_expression
  131    185   
        )]
  132         -
        deserializer.read_struct(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, (), |_, member, deser| {
         186  +
        deserializer.read_struct(&ENABLEKINESISSTREAMINGDESTINATIONOUTPUT_SCHEMA, &mut |member, deser| {
  133    187   
            match member.member_index() {
  134    188   
                Some(0) => {
  135    189   
                    builder.table_name = Some(deser.read_string(member)?);
  136    190   
                }
  137    191   
                Some(1) => {
  138    192   
                    builder.stream_arn = Some(deser.read_string(member)?);
  139    193   
                }
  140    194   
                Some(2) => {
  141    195   
                    builder.destination_status = Some(crate::types::DestinationStatus::from(deser.read_string(member)?.as_str()));
  142    196   
                }

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/execute_statement.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ExecuteStatement`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ExecuteStatement;
    6      6   
impl ExecuteStatement {
    7      7   
    /// Creates a new `ExecuteStatement`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::execute_statement::ExecuteStatementInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::execute_statement::ExecuteStatementOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::execute_statement::ExecuteStatementInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::execute_statement::ExecuteStatementOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::execute_statement::ExecuteStatementError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,482 @@
  138    142   
                crate::operation::execute_statement::ExecuteStatementError,
  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 ExecuteStatementResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ExecuteStatementResponseDeserializer {
  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_execute_statement::de_execute_statement_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_execute_statement::de_execute_statement_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::execute_statement::ExecuteStatementError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "ConditionalCheckFailedException" => crate::operation::execute_statement::ExecuteStatementError::ConditionalCheckFailedException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ConditionalCheckFailedException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ConditionalCheckFailedException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "DuplicateItemException" => crate::operation::execute_statement::ExecuteStatementError::DuplicateItemException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::DuplicateItemException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::DuplicateItemException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "InternalServerError" => crate::operation::execute_statement::ExecuteStatementError::InternalServerError({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ItemCollectionSizeLimitExceededException" => {
         258  +
                    crate::operation::execute_statement::ExecuteStatementError::ItemCollectionSizeLimitExceededException({
         259  +
                        let mut tmp = match protocol
         260  +
                            .deserialize_response(response, crate::types::error::ItemCollectionSizeLimitExceededException::SCHEMA, _cfg)
         261  +
                            .and_then(|mut deser| {
         262  +
                                crate::types::error::ItemCollectionSizeLimitExceededException::deserialize_with_response(
         263  +
                                    &mut *deser,
         264  +
                                    response.headers(),
         265  +
                                    response.status().into(),
         266  +
                                    body,
         267  +
                                )
         268  +
                            }) {
         269  +
                            ::std::result::Result::Ok(val) => val,
         270  +
                            ::std::result::Result::Err(e) => {
         271  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                                ))
         274  +
                            }
         275  +
                        };
         276  +
                        tmp.meta = generic;
         277  +
                        if tmp.message.is_none() {
         278  +
                            tmp.message = _error_message;
         279  +
                        }
         280  +
                        tmp
         281  +
                    })
         282  +
                }
         283  +
                "ProvisionedThroughputExceededException" => {
         284  +
                    crate::operation::execute_statement::ExecuteStatementError::ProvisionedThroughputExceededException({
         285  +
                        let mut tmp = match protocol
         286  +
                            .deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
         287  +
                            .and_then(|mut deser| {
         288  +
                                crate::types::error::ProvisionedThroughputExceededException::deserialize_with_response(
         289  +
                                    &mut *deser,
         290  +
                                    response.headers(),
         291  +
                                    response.status().into(),
         292  +
                                    body,
         293  +
                                )
         294  +
                            }) {
         295  +
                            ::std::result::Result::Ok(val) => val,
         296  +
                            ::std::result::Result::Err(e) => {
         297  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         298  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         299  +
                                ))
         300  +
                            }
         301  +
                        };
         302  +
                        tmp.meta = generic;
         303  +
                        if tmp.message.is_none() {
         304  +
                            tmp.message = _error_message;
         305  +
                        }
         306  +
                        tmp
         307  +
                    })
         308  +
                }
         309  +
                "RequestLimitExceeded" => crate::operation::execute_statement::ExecuteStatementError::RequestLimitExceeded({
         310  +
                    let mut tmp = match protocol
         311  +
                        .deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
         312  +
                        .and_then(|mut deser| {
         313  +
                            crate::types::error::RequestLimitExceeded::deserialize_with_response(
         314  +
                                &mut *deser,
         315  +
                                response.headers(),
         316  +
                                response.status().into(),
         317  +
                                body,
         318  +
                            )
         319  +
                        }) {
         320  +
                        ::std::result::Result::Ok(val) => val,
         321  +
                        ::std::result::Result::Err(e) => {
         322  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         323  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         324  +
                            ))
         325  +
                        }
  162    326   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         327  +
                    tmp.meta = generic;
         328  +
                    if tmp.message.is_none() {
         329  +
                        tmp.message = _error_message;
         330  +
                    }
         331  +
                    tmp
         332  +
                }),
         333  +
                "ResourceNotFoundException" => crate::operation::execute_statement::ExecuteStatementError::ResourceNotFoundException({
         334  +
                    let mut tmp = match protocol
         335  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         336  +
                        .and_then(|mut deser| {
         337  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         338  +
                                &mut *deser,
         339  +
                                response.headers(),
         340  +
                                response.status().into(),
         341  +
                                body,
         342  +
                            )
         343  +
                        }) {
         344  +
                        ::std::result::Result::Ok(val) => val,
         345  +
                        ::std::result::Result::Err(e) => {
         346  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         347  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         348  +
                            ))
         349  +
                        }
         350  +
                    };
         351  +
                    tmp.meta = generic;
         352  +
                    if tmp.message.is_none() {
         353  +
                        tmp.message = _error_message;
         354  +
                    }
         355  +
                    tmp
         356  +
                }),
         357  +
                "ThrottlingException" => crate::operation::execute_statement::ExecuteStatementError::ThrottlingException({
         358  +
                    let mut tmp = match protocol
         359  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         360  +
                        .and_then(|mut deser| {
         361  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         362  +
                                &mut *deser,
         363  +
                                response.headers(),
         364  +
                                response.status().into(),
         365  +
                                body,
         366  +
                            )
         367  +
                        }) {
         368  +
                        ::std::result::Result::Ok(val) => val,
         369  +
                        ::std::result::Result::Err(e) => {
         370  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         371  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         372  +
                            ))
         373  +
                        }
         374  +
                    };
         375  +
                    tmp.meta = generic;
         376  +
                    if tmp.message.is_none() {
         377  +
                        tmp.message = _error_message;
         378  +
                    }
         379  +
                    tmp
         380  +
                }),
         381  +
                "TransactionConflictException" => crate::operation::execute_statement::ExecuteStatementError::TransactionConflictException({
         382  +
                    let mut tmp = match protocol
         383  +
                        .deserialize_response(response, crate::types::error::TransactionConflictException::SCHEMA, _cfg)
         384  +
                        .and_then(|mut deser| {
         385  +
                            crate::types::error::TransactionConflictException::deserialize_with_response(
         386  +
                                &mut *deser,
         387  +
                                response.headers(),
         388  +
                                response.status().into(),
         389  +
                                body,
         390  +
                            )
         391  +
                        }) {
         392  +
                        ::std::result::Result::Ok(val) => val,
         393  +
                        ::std::result::Result::Err(e) => {
         394  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         395  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         396  +
                            ))
         397  +
                        }
         398  +
                    };
         399  +
                    tmp.meta = generic;
         400  +
                    if tmp.message.is_none() {
         401  +
                        tmp.message = _error_message;
         402  +
                    }
         403  +
                    tmp
         404  +
                }),
         405  +
                _ => crate::operation::execute_statement::ExecuteStatementError::generic(generic),
         406  +
            };
         407  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         408  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         409  +
            ))
         410  +
        } else {
         411  +
            let protocol = _cfg
         412  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         413  +
                .expect("a SharedClientProtocol is required");
         414  +
            let mut deser = protocol
         415  +
                .deserialize_response(response, ExecuteStatement::OUTPUT_SCHEMA, _cfg)
         416  +
                .map_err(|e| {
         417  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         418  +
                })?;
         419  +
            let body = response.body().bytes().expect("body loaded");
         420  +
            let output = crate::operation::execute_statement::ExecuteStatementOutput::deserialize_with_response(
         421  +
                &mut *deser,
         422  +
                response.headers(),
         423  +
                response.status().into(),
         424  +
                body,
         425  +
            )
         426  +
            .map_err(|e| {
         427  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         428  +
            })?;
         429  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         430  +
        }
  164    431   
    }
  165    432   
}
  166    433   
#[derive(Debug)]
  167    434   
struct ExecuteStatementRequestSerializer;
  168    435   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ExecuteStatementRequestSerializer {
  169    436   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    437   
    fn serialize_input(
  171    438   
        &self,
  172    439   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    440   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    441   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    442   
        let input = input
  176    443   
            .downcast::<crate::operation::execute_statement::ExecuteStatementInput>()
  177    444   
            .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::execute_statement::ExecuteStatementInput,
  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::execute_statement::ExecuteStatementInput,
  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         -
                "DynamoDB_20120810.ExecuteStatement",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_execute_statement::ser_execute_statement_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())
         445  +
        let protocol = _cfg
         446  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         447  +
            .expect("a SharedClientProtocol is required");
         448  +
        let mut request = protocol
         449  +
            .serialize_request(&input, ExecuteStatement::INPUT_SCHEMA, "", _cfg)
         450  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         451  +
         452  +
        return ::std::result::Result::Ok(request);
  216    453   
    }
  217    454   
}
  218    455   
#[derive(Debug)]
  219    456   
struct ExecuteStatementEndpointParamsInterceptor;
  220    457   
  221    458   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ExecuteStatementEndpointParamsInterceptor {
  222    459   
    fn name(&self) -> &'static str {
  223    460   
        "ExecuteStatementEndpointParamsInterceptor"
  224    461   
    }
  225    462   

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/execute_statement/_execute_statement_input.rs

@@ -55,55 +290,299 @@
   75     75   
    "com.amazonaws.dynamodb.synthetic",
   76     76   
    "ExecuteStatementInput",
   77     77   
);
   78     78   
static EXECUTESTATEMENTINPUT_MEMBER_STATEMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$Statement",
   81     81   
        "com.amazonaws.dynamodb.synthetic",
   82     82   
        "ExecuteStatementInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "statement",
          85  +
    "Statement",
   86     86   
    0,
   87     87   
);
   88     88   
static EXECUTESTATEMENTINPUT_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$Parameters",
   91     91   
        "com.amazonaws.dynamodb.synthetic",
   92     92   
        "ExecuteStatementInput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::List,
   95         -
    "parameters",
          95  +
    "Parameters",
   96     96   
    1,
   97     97   
);
   98     98   
static EXECUTESTATEMENTINPUT_MEMBER_CONSISTENT_READ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$ConsistentRead",
  101    101   
        "com.amazonaws.dynamodb.synthetic",
  102    102   
        "ExecuteStatementInput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::Boolean,
  105         -
    "consistent_read",
         105  +
    "ConsistentRead",
  106    106   
    2,
  107    107   
);
  108    108   
static EXECUTESTATEMENTINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$NextToken",
  111    111   
        "com.amazonaws.dynamodb.synthetic",
  112    112   
        "ExecuteStatementInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "next_token",
         115  +
    "NextToken",
  116    116   
    3,
  117    117   
);
  118    118   
static EXECUTESTATEMENTINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$ReturnConsumedCapacity",
  121    121   
        "com.amazonaws.dynamodb.synthetic",
  122    122   
        "ExecuteStatementInput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::String,
  125         -
    "return_consumed_capacity",
         125  +
    "ReturnConsumedCapacity",
  126    126   
    4,
  127    127   
);
  128    128   
static EXECUTESTATEMENTINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$Limit",
  131    131   
        "com.amazonaws.dynamodb.synthetic",
  132    132   
        "ExecuteStatementInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::Integer,
  135         -
    "limit",
         135  +
    "Limit",
  136    136   
    5,
  137    137   
);
  138    138   
static EXECUTESTATEMENTINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementInput$ReturnValuesOnConditionCheckFailure",
  141    141   
        "com.amazonaws.dynamodb.synthetic",
  142    142   
        "ExecuteStatementInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::String,
  145         -
    "return_values_on_condition_check_failure",
         145  +
    "ReturnValuesOnConditionCheckFailure",
  146    146   
    6,
  147    147   
);
  148    148   
static EXECUTESTATEMENTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  149    149   
    EXECUTESTATEMENTINPUT_SCHEMA_ID,
  150    150   
    ::aws_smithy_schema::ShapeType::Structure,
  151    151   
    &[
  152    152   
        &EXECUTESTATEMENTINPUT_MEMBER_STATEMENT,
  153    153   
        &EXECUTESTATEMENTINPUT_MEMBER_PARAMETERS,
  154    154   
        &EXECUTESTATEMENTINPUT_MEMBER_CONSISTENT_READ,
  155    155   
        &EXECUTESTATEMENTINPUT_MEMBER_NEXT_TOKEN,
  156    156   
        &EXECUTESTATEMENTINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  157    157   
        &EXECUTESTATEMENTINPUT_MEMBER_LIMIT,
  158    158   
        &EXECUTESTATEMENTINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE,
  159    159   
    ],
  160    160   
);
  161    161   
impl ExecuteStatementInput {
  162    162   
    /// The schema for this shape.
  163    163   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTESTATEMENTINPUT_SCHEMA;
  164    164   
}
  165    165   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteStatementInput {
  166    166   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  167    167   
    fn serialize_members(
  168    168   
        &self,
  169    169   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  170    170   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  171    171   
        if let Some(ref val) = self.statement {
  172    172   
            ser.write_string(&EXECUTESTATEMENTINPUT_MEMBER_STATEMENT, val)?;
  173    173   
        }
  174    174   
        if let Some(ref val) = self.parameters {
  175    175   
            ser.write_list(
  176    176   
                &EXECUTESTATEMENTINPUT_MEMBER_PARAMETERS,
  177    177   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  178    178   
                    for item in val {
  179         -
                        todo!("schema: unsupported list element type");
         179  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, item)?;
  180    180   
                    }
  181    181   
                    Ok(())
  182    182   
                },
  183    183   
            )?;
  184    184   
        }
  185    185   
        if let Some(ref val) = self.consistent_read {
  186    186   
            ser.write_boolean(&EXECUTESTATEMENTINPUT_MEMBER_CONSISTENT_READ, *val)?;
  187    187   
        }
  188    188   
        if let Some(ref val) = self.next_token {
  189    189   
            ser.write_string(&EXECUTESTATEMENTINPUT_MEMBER_NEXT_TOKEN, val)?;
  190    190   
        }
  191    191   
        if let Some(ref val) = self.return_consumed_capacity {
  192    192   
            ser.write_string(&EXECUTESTATEMENTINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  193    193   
        }
  194    194   
        if let Some(ref val) = self.limit {
  195    195   
            ser.write_integer(&EXECUTESTATEMENTINPUT_MEMBER_LIMIT, *val)?;
  196    196   
        }
  197    197   
        if let Some(ref val) = self.return_values_on_condition_check_failure {
  198    198   
            ser.write_string(&EXECUTESTATEMENTINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE, val.as_str())?;
  199    199   
        }
  200    200   
        Ok(())
  201    201   
    }
  202    202   
}
  203    203   
impl ExecuteStatementInput {
  204    204   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  205         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  206         -
        deserializer: &mut D,
         205  +
    pub fn deserialize(
         206  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  207    207   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  208    208   
        #[allow(unused_variables, unused_mut)]
  209    209   
        let mut builder = Self::builder();
  210    210   
        #[allow(
  211    211   
            unused_variables,
  212    212   
            unreachable_code,
  213    213   
            clippy::single_match,
  214    214   
            clippy::match_single_binding,
  215    215   
            clippy::diverging_sub_expression
  216    216   
        )]
  217         -
        deserializer.read_struct(&EXECUTESTATEMENTINPUT_SCHEMA, (), |_, member, deser| {
         217  +
        deserializer.read_struct(&EXECUTESTATEMENTINPUT_SCHEMA, &mut |member, deser| {
  218    218   
            match member.member_index() {
  219    219   
                Some(0) => {
  220    220   
                    builder.statement = Some(deser.read_string(member)?);
  221    221   
                }
  222    222   
                Some(1) => {
  223    223   
                    builder.parameters = Some({
  224         -
                        let container = if let Some(cap) = deser.container_size() {
  225         -
                            Vec::with_capacity(cap)
  226         -
                        } else {
  227         -
                            Vec::new()
  228         -
                        };
  229         -
                        deser.read_list(member, container, |mut list, deser| {
  230         -
                            list.push(todo!("deserialize nested aggregate"));
  231         -
                            Ok(list)
  232         -
                        })?
         224  +
                        let mut container = Vec::new();
         225  +
                        deser.read_list(member, &mut |deser| {
         226  +
                            container.push(crate::types::AttributeValue::deserialize(deser)?);
         227  +
                            Ok(())
         228  +
                        })?;
         229  +
                        container
  233    230   
                    });
  234    231   
                }
  235    232   
                Some(2) => {
  236    233   
                    builder.consistent_read = Some(deser.read_boolean(member)?);
  237    234   
                }
  238    235   
                Some(3) => {
  239    236   
                    builder.next_token = Some(deser.read_string(member)?);
  240    237   
                }
  241    238   
                Some(4) => {
  242    239   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  243    240   
                }
  244    241   
                Some(5) => {
  245    242   
                    builder.limit = Some(deser.read_integer(member)?);
  246    243   
                }
  247    244   
                Some(6) => {
  248    245   
                    builder.return_values_on_condition_check_failure = Some(crate::types::ReturnValuesOnConditionCheckFailure::from(
  249    246   
                        deser.read_string(member)?.as_str(),
  250    247   
                    ));
  251    248   
                }
  252    249   
                _ => {}
  253    250   
            }
  254    251   
            Ok(())
  255    252   
        })?;
         253  +
        builder.statement = builder.statement.or(Some(String::new()));
  256    254   
        builder
  257    255   
            .build()
  258    256   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  259    257   
    }
  260    258   
}
         259  +
impl ExecuteStatementInput {
         260  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         261  +
    pub fn deserialize_with_response(
         262  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         263  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         264  +
        _status: u16,
         265  +
        _body: &[u8],
         266  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         267  +
        Self::deserialize(deserializer)
         268  +
    }
         269  +
}
  261    270   
impl ExecuteStatementInput {
  262    271   
    /// Creates a new builder-style object to manufacture [`ExecuteStatementInput`](crate::operation::execute_statement::ExecuteStatementInput).
  263    272   
    pub fn builder() -> crate::operation::execute_statement::builders::ExecuteStatementInputBuilder {
  264    273   
        crate::operation::execute_statement::builders::ExecuteStatementInputBuilder::default()
  265    274   
    }
  266    275   
}
  267    276   
  268    277   
/// A builder for [`ExecuteStatementInput`](crate::operation::execute_statement::ExecuteStatementInput).
  269    278   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  270    279   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/execute_statement/_execute_statement_output.rs

@@ -18,18 +208,295 @@
   38     38   
    "com.amazonaws.dynamodb.synthetic",
   39     39   
    "ExecuteStatementOutput",
   40     40   
);
   41     41   
static EXECUTESTATEMENTOUTPUT_MEMBER_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementOutput$Items",
   44     44   
        "com.amazonaws.dynamodb.synthetic",
   45     45   
        "ExecuteStatementOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::List,
   48         -
    "items",
          48  +
    "Items",
   49     49   
    0,
   50     50   
);
   51     51   
static EXECUTESTATEMENTOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   52     52   
    ::aws_smithy_schema::ShapeId::from_static(
   53     53   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementOutput$NextToken",
   54     54   
        "com.amazonaws.dynamodb.synthetic",
   55     55   
        "ExecuteStatementOutput",
   56     56   
    ),
   57     57   
    ::aws_smithy_schema::ShapeType::String,
   58         -
    "next_token",
          58  +
    "NextToken",
   59     59   
    1,
   60     60   
);
   61     61   
static EXECUTESTATEMENTOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementOutput$ConsumedCapacity",
   64     64   
        "com.amazonaws.dynamodb.synthetic",
   65     65   
        "ExecuteStatementOutput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::Structure,
   68         -
    "consumed_capacity",
          68  +
    "ConsumedCapacity",
   69     69   
    2,
   70     70   
);
   71     71   
static EXECUTESTATEMENTOUTPUT_MEMBER_LAST_EVALUATED_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.dynamodb.synthetic#ExecuteStatementOutput$LastEvaluatedKey",
   74     74   
        "com.amazonaws.dynamodb.synthetic",
   75     75   
        "ExecuteStatementOutput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::Map,
   78         -
    "last_evaluated_key",
          78  +
    "LastEvaluatedKey",
   79     79   
    3,
   80     80   
);
          81  +
static EXECUTESTATEMENTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          82  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          83  +
    ::aws_smithy_schema::ShapeType::String,
          84  +
    "request_id",
          85  +
    4,
          86  +
)
          87  +
.with_http_header("x-amzn-requestid");
   81     88   
static EXECUTESTATEMENTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   82     89   
    EXECUTESTATEMENTOUTPUT_SCHEMA_ID,
   83     90   
    ::aws_smithy_schema::ShapeType::Structure,
   84     91   
    &[
   85     92   
        &EXECUTESTATEMENTOUTPUT_MEMBER_ITEMS,
   86     93   
        &EXECUTESTATEMENTOUTPUT_MEMBER_NEXT_TOKEN,
   87     94   
        &EXECUTESTATEMENTOUTPUT_MEMBER_CONSUMED_CAPACITY,
   88     95   
        &EXECUTESTATEMENTOUTPUT_MEMBER_LAST_EVALUATED_KEY,
          96  +
        &EXECUTESTATEMENTOUTPUT_MEMBER__REQUEST_ID,
   89     97   
    ],
   90     98   
);
   91     99   
impl ExecuteStatementOutput {
   92    100   
    /// The schema for this shape.
   93    101   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTESTATEMENTOUTPUT_SCHEMA;
   94    102   
}
   95    103   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteStatementOutput {
   96    104   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97    105   
    fn serialize_members(
   98    106   
        &self,
   99    107   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    108   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    109   
        if let Some(ref val) = self.items {
  102    110   
            ser.write_list(
  103    111   
                &EXECUTESTATEMENTOUTPUT_MEMBER_ITEMS,
  104    112   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  105    113   
                    for item in val {
  106         -
                        todo!("schema: unsupported list element type");
         114  +
                        ser.write_map(
         115  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         116  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         117  +
                                for (key, value) in item {
         118  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         119  +
                                    ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
         120  +
                                }
         121  +
                                Ok(())
         122  +
                            },
         123  +
                        )?;
  107    124   
                    }
  108    125   
                    Ok(())
  109    126   
                },
  110    127   
            )?;
  111    128   
        }
  112    129   
        if let Some(ref val) = self.next_token {
  113    130   
            ser.write_string(&EXECUTESTATEMENTOUTPUT_MEMBER_NEXT_TOKEN, val)?;
  114    131   
        }
  115    132   
        if let Some(ref val) = self.consumed_capacity {
  116    133   
            ser.write_struct(&EXECUTESTATEMENTOUTPUT_MEMBER_CONSUMED_CAPACITY, val)?;
  117    134   
        }
  118    135   
        if let Some(ref val) = self.last_evaluated_key {
  119    136   
            ser.write_map(
  120    137   
                &EXECUTESTATEMENTOUTPUT_MEMBER_LAST_EVALUATED_KEY,
  121    138   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  122    139   
                    for (key, value) in val {
  123    140   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  124         -
                        todo!("schema: unsupported map value type");
         141  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  125    142   
                    }
  126    143   
                    Ok(())
  127    144   
                },
  128    145   
            )?;
  129    146   
        }
  130    147   
        Ok(())
  131    148   
    }
  132    149   
}
  133    150   
impl ExecuteStatementOutput {
  134    151   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  135         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  136         -
        deserializer: &mut D,
         152  +
    pub fn deserialize(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  137    154   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  138    155   
        #[allow(unused_variables, unused_mut)]
  139    156   
        let mut builder = Self::builder();
  140    157   
        #[allow(
  141    158   
            unused_variables,
  142    159   
            unreachable_code,
  143    160   
            clippy::single_match,
  144    161   
            clippy::match_single_binding,
  145    162   
            clippy::diverging_sub_expression
  146    163   
        )]
  147         -
        deserializer.read_struct(&EXECUTESTATEMENTOUTPUT_SCHEMA, (), |_, member, deser| {
         164  +
        deserializer.read_struct(&EXECUTESTATEMENTOUTPUT_SCHEMA, &mut |member, deser| {
  148    165   
            match member.member_index() {
  149    166   
                Some(0) => {
  150    167   
                    builder.items = Some({
  151         -
                        let container = if let Some(cap) = deser.container_size() {
  152         -
                            Vec::with_capacity(cap)
  153         -
                        } else {
  154         -
                            Vec::new()
  155         -
                        };
  156         -
                        deser.read_list(member, container, |mut list, deser| {
  157         -
                            list.push(todo!("deserialize nested aggregate"));
  158         -
                            Ok(list)
  159         -
                        })?
         168  +
                        let mut container = Vec::new();
         169  +
                        deser.read_list(member, &mut |deser| {
         170  +
                            container.push({
         171  +
                                let mut map = ::std::collections::HashMap::new();
         172  +
                                deser.read_map(member, &mut |key, deser| {
         173  +
                                    let value = crate::types::AttributeValue::deserialize(deser)?;
         174  +
                                    map.insert(key, value);
         175  +
                                    Ok(())
         176  +
                                })?;
         177  +
                                map
         178  +
                            });
         179  +
                            Ok(())
         180  +
                        })?;
         181  +
                        container
  160    182   
                    });
  161    183   
                }
  162    184   
                Some(1) => {
  163    185   
                    builder.next_token = Some(deser.read_string(member)?);
  164    186   
                }
  165    187   
                Some(2) => {
  166    188   
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
  167    189   
                }
  168    190   
                Some(3) => {
  169    191   
                    builder.last_evaluated_key = Some({
  170         -
                        let container = if let Some(cap) = deser.container_size() {
  171         -
                            std::collections::HashMap::with_capacity(cap)
  172         -
                        } else {
  173         -
                            std::collections::HashMap::new()
  174         -
                        };
  175         -
                        deser.read_map(member, container, |mut map, key, deser| {
  176         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  177         -
                            Ok(map)
  178         -
                        })?
         192  +
                        let mut container = std::collections::HashMap::new();
         193  +
                        deser.read_map(member, &mut |key, deser| {
         194  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         195  +
                            Ok(())
         196  +
                        })?;
         197  +
                        container
         198  +
                    });
         199  +
                }
         200  +
                Some(4) => {
         201  +
                    builder._request_id = Some(deser.read_string(member)?);
         202  +
                }
         203  +
                _ => {}
         204  +
            }
         205  +
            Ok(())
         206  +
        })?;
         207  +
        Ok(builder.build())
         208  +
    }
         209  +
}
         210  +
impl ExecuteStatementOutput {
         211  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         212  +
    /// Header-bound members are read directly from headers, avoiding runtime
         213  +
    /// member iteration overhead. Body members are read via the deserializer.
         214  +
    pub fn deserialize_with_response(
         215  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         216  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         217  +
        _status: u16,
         218  +
        _body: &[u8],
         219  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         220  +
        #[allow(unused_variables, unused_mut)]
         221  +
        let mut builder = Self::builder();
         222  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         223  +
            builder._request_id = Some(val.to_string());
         224  +
        }
         225  +
        #[allow(
         226  +
            unused_variables,
         227  +
            unreachable_code,
         228  +
            clippy::single_match,
         229  +
            clippy::match_single_binding,
         230  +
            clippy::diverging_sub_expression
         231  +
        )]
         232  +
        deserializer.read_struct(&EXECUTESTATEMENTOUTPUT_SCHEMA, &mut |member, deser| {
         233  +
            match member.member_index() {
         234  +
                Some(0) => {
         235  +
                    builder.items = Some({
         236  +
                        let mut container = Vec::new();
         237  +
                        deser.read_list(member, &mut |deser| {
         238  +
                            container.push({
         239  +
                                let mut map = ::std::collections::HashMap::new();
         240  +
                                deser.read_map(member, &mut |key, deser| {
         241  +
                                    let value = crate::types::AttributeValue::deserialize(deser)?;
         242  +
                                    map.insert(key, value);
         243  +
                                    Ok(())
         244  +
                                })?;
         245  +
                                map
         246  +
                            });
         247  +
                            Ok(())
         248  +
                        })?;
         249  +
                        container
         250  +
                    });
         251  +
                }
         252  +
                Some(1) => {
         253  +
                    builder.next_token = Some(deser.read_string(member)?);
         254  +
                }
         255  +
                Some(2) => {
         256  +
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
         257  +
                }
         258  +
                Some(3) => {
         259  +
                    builder.last_evaluated_key = Some({
         260  +
                        let mut container = std::collections::HashMap::new();
         261  +
                        deser.read_map(member, &mut |key, deser| {
         262  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         263  +
                            Ok(())
         264  +
                        })?;
         265  +
                        container
  179    266   
                    });
  180    267   
                }
  181    268   
                _ => {}
  182    269   
            }
  183    270   
            Ok(())
  184    271   
        })?;
  185    272   
        Ok(builder.build())
  186    273   
    }
  187    274   
}
  188    275   
impl ::aws_types::request_id::RequestId for ExecuteStatementOutput {

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

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/execute_transaction/_execute_transaction_input.rs

@@ -11,11 +176,185 @@
   31     31   
    "com.amazonaws.dynamodb.synthetic",
   32     32   
    "ExecuteTransactionInput",
   33     33   
);
   34     34   
static EXECUTETRANSACTIONINPUT_MEMBER_TRANSACT_STATEMENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   35     35   
    ::aws_smithy_schema::ShapeId::from_static(
   36     36   
        "com.amazonaws.dynamodb.synthetic#ExecuteTransactionInput$TransactStatements",
   37     37   
        "com.amazonaws.dynamodb.synthetic",
   38     38   
        "ExecuteTransactionInput",
   39     39   
    ),
   40     40   
    ::aws_smithy_schema::ShapeType::List,
   41         -
    "transact_statements",
          41  +
    "TransactStatements",
   42     42   
    0,
   43     43   
);
   44     44   
static EXECUTETRANSACTIONINPUT_MEMBER_CLIENT_REQUEST_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.dynamodb.synthetic#ExecuteTransactionInput$ClientRequestToken",
   47     47   
        "com.amazonaws.dynamodb.synthetic",
   48     48   
        "ExecuteTransactionInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "client_request_token",
          51  +
    "ClientRequestToken",
   52     52   
    1,
   53     53   
);
   54     54   
static EXECUTETRANSACTIONINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.dynamodb.synthetic#ExecuteTransactionInput$ReturnConsumedCapacity",
   57     57   
        "com.amazonaws.dynamodb.synthetic",
   58     58   
        "ExecuteTransactionInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::String,
   61         -
    "return_consumed_capacity",
          61  +
    "ReturnConsumedCapacity",
   62     62   
    2,
   63     63   
);
   64     64   
static EXECUTETRANSACTIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   65     65   
    EXECUTETRANSACTIONINPUT_SCHEMA_ID,
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67     67   
    &[
   68     68   
        &EXECUTETRANSACTIONINPUT_MEMBER_TRANSACT_STATEMENTS,
   69     69   
        &EXECUTETRANSACTIONINPUT_MEMBER_CLIENT_REQUEST_TOKEN,
   70     70   
        &EXECUTETRANSACTIONINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
   71     71   
    ],
   72     72   
);
   73     73   
impl ExecuteTransactionInput {
   74     74   
    /// The schema for this shape.
   75     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTETRANSACTIONINPUT_SCHEMA;
   76     76   
}
   77     77   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteTransactionInput {
   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.transact_statements {
   84     84   
            ser.write_list(
   85     85   
                &EXECUTETRANSACTIONINPUT_MEMBER_TRANSACT_STATEMENTS,
   86     86   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   87     87   
                    for item in val {
   88     88   
                        ser.write_struct(crate::types::ParameterizedStatement::SCHEMA, item)?;
   89     89   
                    }
   90     90   
                    Ok(())
   91     91   
                },
   92     92   
            )?;
   93     93   
        }
   94     94   
        if let Some(ref val) = self.client_request_token {
   95     95   
            ser.write_string(&EXECUTETRANSACTIONINPUT_MEMBER_CLIENT_REQUEST_TOKEN, val)?;
   96     96   
        }
   97     97   
        if let Some(ref val) = self.return_consumed_capacity {
   98     98   
            ser.write_string(&EXECUTETRANSACTIONINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
   99     99   
        }
  100    100   
        Ok(())
  101    101   
    }
  102    102   
}
  103    103   
impl ExecuteTransactionInput {
  104    104   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  105         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  106         -
        deserializer: &mut D,
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  107    107   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  108    108   
        #[allow(unused_variables, unused_mut)]
  109    109   
        let mut builder = Self::builder();
  110    110   
        #[allow(
  111    111   
            unused_variables,
  112    112   
            unreachable_code,
  113    113   
            clippy::single_match,
  114    114   
            clippy::match_single_binding,
  115    115   
            clippy::diverging_sub_expression
  116    116   
        )]
  117         -
        deserializer.read_struct(&EXECUTETRANSACTIONINPUT_SCHEMA, (), |_, member, deser| {
         117  +
        deserializer.read_struct(&EXECUTETRANSACTIONINPUT_SCHEMA, &mut |member, deser| {
  118    118   
            match member.member_index() {
  119    119   
                Some(0) => {
  120    120   
                    builder.transact_statements = Some({
  121         -
                        let container = if let Some(cap) = deser.container_size() {
  122         -
                            Vec::with_capacity(cap)
  123         -
                        } else {
  124         -
                            Vec::new()
  125         -
                        };
  126         -
                        deser.read_list(member, container, |mut list, deser| {
  127         -
                            list.push(crate::types::ParameterizedStatement::deserialize(deser)?);
  128         -
                            Ok(list)
  129         -
                        })?
         121  +
                        let mut container = Vec::new();
         122  +
                        deser.read_list(member, &mut |deser| {
         123  +
                            container.push(crate::types::ParameterizedStatement::deserialize(deser)?);
         124  +
                            Ok(())
         125  +
                        })?;
         126  +
                        container
  130    127   
                    });
  131    128   
                }
  132    129   
                Some(1) => {
  133    130   
                    builder.client_request_token = Some(deser.read_string(member)?);
  134    131   
                }
  135    132   
                Some(2) => {
  136    133   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  137    134   
                }
  138    135   
                _ => {}
  139    136   
            }
  140    137   
            Ok(())
  141    138   
        })?;
         139  +
        builder.transact_statements = builder.transact_statements.or(Some(Vec::new()));
  142    140   
        builder
  143    141   
            .build()
  144    142   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  145    143   
    }
  146    144   
}
         145  +
impl ExecuteTransactionInput {
         146  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         147  +
    pub fn deserialize_with_response(
         148  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         149  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         150  +
        _status: u16,
         151  +
        _body: &[u8],
         152  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         153  +
        Self::deserialize(deserializer)
         154  +
    }
         155  +
}
  147    156   
impl ExecuteTransactionInput {
  148    157   
    /// Creates a new builder-style object to manufacture [`ExecuteTransactionInput`](crate::operation::execute_transaction::ExecuteTransactionInput).
  149    158   
    pub fn builder() -> crate::operation::execute_transaction::builders::ExecuteTransactionInputBuilder {
  150    159   
        crate::operation::execute_transaction::builders::ExecuteTransactionInputBuilder::default()
  151    160   
    }
  152    161   
}
  153    162   
  154    163   
/// A builder for [`ExecuteTransactionInput`](crate::operation::execute_transaction::ExecuteTransactionInput).
  155    164   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  156    165   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/execute_transaction/_execute_transaction_output.rs

@@ -8,8 +163,219 @@
   28     28   
    "com.amazonaws.dynamodb.synthetic",
   29     29   
    "ExecuteTransactionOutput",
   30     30   
);
   31     31   
static EXECUTETRANSACTIONOUTPUT_MEMBER_RESPONSES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   32     32   
    ::aws_smithy_schema::ShapeId::from_static(
   33     33   
        "com.amazonaws.dynamodb.synthetic#ExecuteTransactionOutput$Responses",
   34     34   
        "com.amazonaws.dynamodb.synthetic",
   35     35   
        "ExecuteTransactionOutput",
   36     36   
    ),
   37     37   
    ::aws_smithy_schema::ShapeType::List,
   38         -
    "responses",
          38  +
    "Responses",
   39     39   
    0,
   40     40   
);
   41     41   
static EXECUTETRANSACTIONOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static(
   43     43   
        "com.amazonaws.dynamodb.synthetic#ExecuteTransactionOutput$ConsumedCapacity",
   44     44   
        "com.amazonaws.dynamodb.synthetic",
   45     45   
        "ExecuteTransactionOutput",
   46     46   
    ),
   47     47   
    ::aws_smithy_schema::ShapeType::List,
   48         -
    "consumed_capacity",
          48  +
    "ConsumedCapacity",
   49     49   
    1,
   50     50   
);
          51  +
static EXECUTETRANSACTIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "request_id",
          55  +
    2,
          56  +
)
          57  +
.with_http_header("x-amzn-requestid");
   51     58   
static EXECUTETRANSACTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   52     59   
    EXECUTETRANSACTIONOUTPUT_SCHEMA_ID,
   53     60   
    ::aws_smithy_schema::ShapeType::Structure,
   54     61   
    &[
   55     62   
        &EXECUTETRANSACTIONOUTPUT_MEMBER_RESPONSES,
   56     63   
        &EXECUTETRANSACTIONOUTPUT_MEMBER_CONSUMED_CAPACITY,
          64  +
        &EXECUTETRANSACTIONOUTPUT_MEMBER__REQUEST_ID,
   57     65   
    ],
   58     66   
);
   59     67   
impl ExecuteTransactionOutput {
   60     68   
    /// The schema for this shape.
   61     69   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EXECUTETRANSACTIONOUTPUT_SCHEMA;
   62     70   
}
   63     71   
impl ::aws_smithy_schema::serde::SerializableStruct for ExecuteTransactionOutput {
   64     72   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   65     73   
    fn serialize_members(
   66     74   
        &self,
   67     75   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   68     76   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   69     77   
        if let Some(ref val) = self.responses {
   70     78   
            ser.write_list(
   71     79   
                &EXECUTETRANSACTIONOUTPUT_MEMBER_RESPONSES,
   72     80   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   73     81   
                    for item in val {
   74     82   
                        ser.write_struct(crate::types::ItemResponse::SCHEMA, item)?;
   75     83   
                    }
   76     84   
                    Ok(())
   77     85   
                },
   78     86   
            )?;
   79     87   
        }
   80     88   
        if let Some(ref val) = self.consumed_capacity {
   81     89   
            ser.write_list(
   82     90   
                &EXECUTETRANSACTIONOUTPUT_MEMBER_CONSUMED_CAPACITY,
   83     91   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   84     92   
                    for item in val {
   85     93   
                        ser.write_struct(crate::types::ConsumedCapacity::SCHEMA, item)?;
   86     94   
                    }
   87     95   
                    Ok(())
   88     96   
                },
   89     97   
            )?;
   90     98   
        }
   91     99   
        Ok(())
   92    100   
    }
   93    101   
}
   94    102   
impl ExecuteTransactionOutput {
   95    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        #[allow(unused_variables, unused_mut)]
  100    108   
        let mut builder = Self::builder();
  101    109   
        #[allow(
  102    110   
            unused_variables,
  103    111   
            unreachable_code,
  104    112   
            clippy::single_match,
  105    113   
            clippy::match_single_binding,
  106    114   
            clippy::diverging_sub_expression
  107    115   
        )]
  108         -
        deserializer.read_struct(&EXECUTETRANSACTIONOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&EXECUTETRANSACTIONOUTPUT_SCHEMA, &mut |member, deser| {
  109    117   
            match member.member_index() {
  110    118   
                Some(0) => {
  111    119   
                    builder.responses = Some({
  112         -
                        let container = if let Some(cap) = deser.container_size() {
  113         -
                            Vec::with_capacity(cap)
  114         -
                        } else {
  115         -
                            Vec::new()
  116         -
                        };
  117         -
                        deser.read_list(member, container, |mut list, deser| {
  118         -
                            list.push(crate::types::ItemResponse::deserialize(deser)?);
  119         -
                            Ok(list)
  120         -
                        })?
         120  +
                        let mut container = Vec::new();
         121  +
                        deser.read_list(member, &mut |deser| {
         122  +
                            container.push(crate::types::ItemResponse::deserialize(deser)?);
         123  +
                            Ok(())
         124  +
                        })?;
         125  +
                        container
  121    126   
                    });
  122    127   
                }
  123    128   
                Some(1) => {
  124    129   
                    builder.consumed_capacity = Some({
  125         -
                        let container = if let Some(cap) = deser.container_size() {
  126         -
                            Vec::with_capacity(cap)
  127         -
                        } else {
  128         -
                            Vec::new()
  129         -
                        };
  130         -
                        deser.read_list(member, container, |mut list, deser| {
  131         -
                            list.push(crate::types::ConsumedCapacity::deserialize(deser)?);
  132         -
                            Ok(list)
  133         -
                        })?
         130  +
                        let mut container = Vec::new();
         131  +
                        deser.read_list(member, &mut |deser| {
         132  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         133  +
                            Ok(())
         134  +
                        })?;
         135  +
                        container
         136  +
                    });
         137  +
                }
         138  +
                Some(2) => {
         139  +
                    builder._request_id = Some(deser.read_string(member)?);
         140  +
                }
         141  +
                _ => {}
         142  +
            }
         143  +
            Ok(())
         144  +
        })?;
         145  +
        Ok(builder.build())
         146  +
    }
         147  +
}
         148  +
impl ExecuteTransactionOutput {
         149  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         150  +
    /// Header-bound members are read directly from headers, avoiding runtime
         151  +
    /// member iteration overhead. Body members are read via the deserializer.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        _body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        #[allow(unused_variables, unused_mut)]
         159  +
        let mut builder = Self::builder();
         160  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         161  +
            builder._request_id = Some(val.to_string());
         162  +
        }
         163  +
        #[allow(
         164  +
            unused_variables,
         165  +
            unreachable_code,
         166  +
            clippy::single_match,
         167  +
            clippy::match_single_binding,
         168  +
            clippy::diverging_sub_expression
         169  +
        )]
         170  +
        deserializer.read_struct(&EXECUTETRANSACTIONOUTPUT_SCHEMA, &mut |member, deser| {
         171  +
            match member.member_index() {
         172  +
                Some(0) => {
         173  +
                    builder.responses = Some({
         174  +
                        let mut container = Vec::new();
         175  +
                        deser.read_list(member, &mut |deser| {
         176  +
                            container.push(crate::types::ItemResponse::deserialize(deser)?);
         177  +
                            Ok(())
         178  +
                        })?;
         179  +
                        container
         180  +
                    });
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.consumed_capacity = Some({
         184  +
                        let mut container = Vec::new();
         185  +
                        deser.read_list(member, &mut |deser| {
         186  +
                            container.push(crate::types::ConsumedCapacity::deserialize(deser)?);
         187  +
                            Ok(())
         188  +
                        })?;
         189  +
                        container
  134    190   
                    });
  135    191   
                }
  136    192   
                _ => {}
  137    193   
            }
  138    194   
            Ok(())
  139    195   
        })?;
  140    196   
        Ok(builder.build())
  141    197   
    }
  142    198   
}
  143    199   
impl ::aws_types::request_id::RequestId for ExecuteTransactionOutput {