AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

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

@@ -77,77 +237,237 @@
   97     97   
    "com.amazonaws.dynamodb.synthetic",
   98     98   
    "ExportTableToPointInTimeInput",
   99     99   
);
  100    100   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_TABLE_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$TableArn",
  103    103   
        "com.amazonaws.dynamodb.synthetic",
  104    104   
        "ExportTableToPointInTimeInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "table_arn",
         107  +
    "TableArn",
  108    108   
    0,
  109    109   
);
  110    110   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_EXPORT_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$ExportTime",
  113    113   
        "com.amazonaws.dynamodb.synthetic",
  114    114   
        "ExportTableToPointInTimeInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::Timestamp,
  117         -
    "export_time",
         117  +
    "ExportTime",
  118    118   
    1,
  119    119   
);
  120    120   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$ClientToken",
  123    123   
        "com.amazonaws.dynamodb.synthetic",
  124    124   
        "ExportTableToPointInTimeInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::String,
  127         -
    "client_token",
         127  +
    "ClientToken",
  128    128   
    2,
  129    129   
);
  130    130   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$S3Bucket",
  133    133   
        "com.amazonaws.dynamodb.synthetic",
  134    134   
        "ExportTableToPointInTimeInput",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::String,
  137         -
    "s3_bucket",
         137  +
    "S3Bucket",
  138    138   
    3,
  139    139   
);
  140    140   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  141    141   
    ::aws_smithy_schema::ShapeId::from_static(
  142    142   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$S3BucketOwner",
  143    143   
        "com.amazonaws.dynamodb.synthetic",
  144    144   
        "ExportTableToPointInTimeInput",
  145    145   
    ),
  146    146   
    ::aws_smithy_schema::ShapeType::String,
  147         -
    "s3_bucket_owner",
         147  +
    "S3BucketOwner",
  148    148   
    4,
  149    149   
);
  150    150   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$S3Prefix",
  153    153   
        "com.amazonaws.dynamodb.synthetic",
  154    154   
        "ExportTableToPointInTimeInput",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::String,
  157         -
    "s3_prefix",
         157  +
    "S3Prefix",
  158    158   
    5,
  159    159   
);
  160    160   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_SSE_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  161    161   
    ::aws_smithy_schema::ShapeId::from_static(
  162    162   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$S3SseAlgorithm",
  163    163   
        "com.amazonaws.dynamodb.synthetic",
  164    164   
        "ExportTableToPointInTimeInput",
  165    165   
    ),
  166    166   
    ::aws_smithy_schema::ShapeType::String,
  167         -
    "s3_sse_algorithm",
         167  +
    "S3SseAlgorithm",
  168    168   
    6,
  169    169   
);
  170    170   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_SSE_KMS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  171    171   
    ::aws_smithy_schema::ShapeId::from_static(
  172    172   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$S3SseKmsKeyId",
  173    173   
        "com.amazonaws.dynamodb.synthetic",
  174    174   
        "ExportTableToPointInTimeInput",
  175    175   
    ),
  176    176   
    ::aws_smithy_schema::ShapeType::String,
  177         -
    "s3_sse_kms_key_id",
         177  +
    "S3SseKmsKeyId",
  178    178   
    7,
  179    179   
);
  180    180   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_EXPORT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  181    181   
    ::aws_smithy_schema::ShapeId::from_static(
  182    182   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$ExportFormat",
  183    183   
        "com.amazonaws.dynamodb.synthetic",
  184    184   
        "ExportTableToPointInTimeInput",
  185    185   
    ),
  186    186   
    ::aws_smithy_schema::ShapeType::String,
  187         -
    "export_format",
         187  +
    "ExportFormat",
  188    188   
    8,
  189    189   
);
  190    190   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_EXPORT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  191    191   
    ::aws_smithy_schema::ShapeId::from_static(
  192    192   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$ExportType",
  193    193   
        "com.amazonaws.dynamodb.synthetic",
  194    194   
        "ExportTableToPointInTimeInput",
  195    195   
    ),
  196    196   
    ::aws_smithy_schema::ShapeType::String,
  197         -
    "export_type",
         197  +
    "ExportType",
  198    198   
    9,
  199    199   
);
  200    200   
static EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_INCREMENTAL_EXPORT_SPECIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  201    201   
    ::aws_smithy_schema::ShapeId::from_static(
  202    202   
        "com.amazonaws.dynamodb.synthetic#ExportTableToPointInTimeInput$IncrementalExportSpecification",
  203    203   
        "com.amazonaws.dynamodb.synthetic",
  204    204   
        "ExportTableToPointInTimeInput",
  205    205   
    ),
  206    206   
    ::aws_smithy_schema::ShapeType::Structure,
  207         -
    "incremental_export_specification",
         207  +
    "IncrementalExportSpecification",
  208    208   
    10,
  209    209   
);
  210    210   
static EXPORTTABLETOPOINTINTIMEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  211    211   
    EXPORTTABLETOPOINTINTIMEINPUT_SCHEMA_ID,
  212    212   
    ::aws_smithy_schema::ShapeType::Structure,
  213    213   
    &[
  214    214   
        &EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_TABLE_ARN,
  215    215   
        &EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_EXPORT_TIME,
  216    216   
        &EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_CLIENT_TOKEN,
  217    217   
        &EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_S3_BUCKET,
@@ -245,245 +360,373 @@
  265    265   
            ser.write_string(&EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_EXPORT_TYPE, val.as_str())?;
  266    266   
        }
  267    267   
        if let Some(ref val) = self.incremental_export_specification {
  268    268   
            ser.write_struct(&EXPORTTABLETOPOINTINTIMEINPUT_MEMBER_INCREMENTAL_EXPORT_SPECIFICATION, val)?;
  269    269   
        }
  270    270   
        Ok(())
  271    271   
    }
  272    272   
}
  273    273   
impl ExportTableToPointInTimeInput {
  274    274   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  275         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  276         -
        deserializer: &mut D,
         275  +
    pub fn deserialize(
         276  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  277    277   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  278    278   
        #[allow(unused_variables, unused_mut)]
  279    279   
        let mut builder = Self::builder();
  280    280   
        #[allow(
  281    281   
            unused_variables,
  282    282   
            unreachable_code,
  283    283   
            clippy::single_match,
  284    284   
            clippy::match_single_binding,
  285    285   
            clippy::diverging_sub_expression
  286    286   
        )]
  287         -
        deserializer.read_struct(&EXPORTTABLETOPOINTINTIMEINPUT_SCHEMA, (), |_, member, deser| {
         287  +
        deserializer.read_struct(&EXPORTTABLETOPOINTINTIMEINPUT_SCHEMA, &mut |member, deser| {
  288    288   
            match member.member_index() {
  289    289   
                Some(0) => {
  290    290   
                    builder.table_arn = Some(deser.read_string(member)?);
  291    291   
                }
  292    292   
                Some(1) => {
  293    293   
                    builder.export_time = Some(deser.read_timestamp(member)?);
  294    294   
                }
  295    295   
                Some(2) => {
  296    296   
                    builder.client_token = Some(deser.read_string(member)?);
  297    297   
                }
  298    298   
                Some(3) => {
  299    299   
                    builder.s3_bucket = Some(deser.read_string(member)?);
  300    300   
                }
  301    301   
                Some(4) => {
  302    302   
                    builder.s3_bucket_owner = Some(deser.read_string(member)?);
  303    303   
                }
  304    304   
                Some(5) => {
  305    305   
                    builder.s3_prefix = Some(deser.read_string(member)?);
  306    306   
                }
  307    307   
                Some(6) => {
  308    308   
                    builder.s3_sse_algorithm = Some(crate::types::S3SseAlgorithm::from(deser.read_string(member)?.as_str()));
  309    309   
                }
  310    310   
                Some(7) => {
  311    311   
                    builder.s3_sse_kms_key_id = Some(deser.read_string(member)?);
  312    312   
                }
  313    313   
                Some(8) => {
  314    314   
                    builder.export_format = Some(crate::types::ExportFormat::from(deser.read_string(member)?.as_str()));
  315    315   
                }
  316    316   
                Some(9) => {
  317    317   
                    builder.export_type = Some(crate::types::ExportType::from(deser.read_string(member)?.as_str()));
  318    318   
                }
  319    319   
                Some(10) => {
  320    320   
                    builder.incremental_export_specification = Some(crate::types::IncrementalExportSpecification::deserialize(deser)?);
  321    321   
                }
  322    322   
                _ => {}
  323    323   
            }
  324    324   
            Ok(())
  325    325   
        })?;
         326  +
        builder.table_arn = builder.table_arn.or(Some(String::new()));
         327  +
        builder.s3_bucket = builder.s3_bucket.or(Some(String::new()));
  326    328   
        builder
  327    329   
            .build()
  328    330   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  329    331   
    }
  330    332   
}
         333  +
impl ExportTableToPointInTimeInput {
         334  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         335  +
    pub fn deserialize_with_response(
         336  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         337  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         338  +
        _status: u16,
         339  +
        _body: &[u8],
         340  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         341  +
        Self::deserialize(deserializer)
         342  +
    }
         343  +
}
  331    344   
impl ExportTableToPointInTimeInput {
  332    345   
    /// Creates a new builder-style object to manufacture [`ExportTableToPointInTimeInput`](crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeInput).
  333    346   
    pub fn builder() -> crate::operation::export_table_to_point_in_time::builders::ExportTableToPointInTimeInputBuilder {
  334    347   
        crate::operation::export_table_to_point_in_time::builders::ExportTableToPointInTimeInputBuilder::default()
  335    348   
    }
  336    349   
}
  337    350   
  338    351   
/// A builder for [`ExportTableToPointInTimeInput`](crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeInput).
  339    352   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  340    353   
#[non_exhaustive]

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

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

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

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

@@ -112,112 +380,370 @@
  132    132   
    "com.amazonaws.dynamodb.synthetic",
  133    133   
    "GetItemInput",
  134    134   
);
  135    135   
static GETITEMINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$TableName",
  138    138   
        "com.amazonaws.dynamodb.synthetic",
  139    139   
        "GetItemInput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::String,
  142         -
    "table_name",
         142  +
    "TableName",
  143    143   
    0,
  144    144   
);
  145    145   
static GETITEMINPUT_MEMBER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$Key",
  148    148   
        "com.amazonaws.dynamodb.synthetic",
  149    149   
        "GetItemInput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::Map,
  152         -
    "key",
         152  +
    "Key",
  153    153   
    1,
  154    154   
);
  155    155   
static GETITEMINPUT_MEMBER_ATTRIBUTES_TO_GET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$AttributesToGet",
  158    158   
        "com.amazonaws.dynamodb.synthetic",
  159    159   
        "GetItemInput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::List,
  162         -
    "attributes_to_get",
         162  +
    "AttributesToGet",
  163    163   
    2,
  164    164   
);
  165    165   
static GETITEMINPUT_MEMBER_CONSISTENT_READ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  166    166   
    ::aws_smithy_schema::ShapeId::from_static(
  167    167   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$ConsistentRead",
  168    168   
        "com.amazonaws.dynamodb.synthetic",
  169    169   
        "GetItemInput",
  170    170   
    ),
  171    171   
    ::aws_smithy_schema::ShapeType::Boolean,
  172         -
    "consistent_read",
         172  +
    "ConsistentRead",
  173    173   
    3,
  174    174   
);
  175    175   
static GETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  176    176   
    ::aws_smithy_schema::ShapeId::from_static(
  177    177   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$ReturnConsumedCapacity",
  178    178   
        "com.amazonaws.dynamodb.synthetic",
  179    179   
        "GetItemInput",
  180    180   
    ),
  181    181   
    ::aws_smithy_schema::ShapeType::String,
  182         -
    "return_consumed_capacity",
         182  +
    "ReturnConsumedCapacity",
  183    183   
    4,
  184    184   
);
  185    185   
static GETITEMINPUT_MEMBER_PROJECTION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  186    186   
    ::aws_smithy_schema::ShapeId::from_static(
  187    187   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$ProjectionExpression",
  188    188   
        "com.amazonaws.dynamodb.synthetic",
  189    189   
        "GetItemInput",
  190    190   
    ),
  191    191   
    ::aws_smithy_schema::ShapeType::String,
  192         -
    "projection_expression",
         192  +
    "ProjectionExpression",
  193    193   
    5,
  194    194   
);
  195    195   
static GETITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  196    196   
    ::aws_smithy_schema::ShapeId::from_static(
  197    197   
        "com.amazonaws.dynamodb.synthetic#GetItemInput$ExpressionAttributeNames",
  198    198   
        "com.amazonaws.dynamodb.synthetic",
  199    199   
        "GetItemInput",
  200    200   
    ),
  201    201   
    ::aws_smithy_schema::ShapeType::Map,
  202         -
    "expression_attribute_names",
         202  +
    "ExpressionAttributeNames",
  203    203   
    6,
  204    204   
);
  205    205   
static GETITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  206    206   
    GETITEMINPUT_SCHEMA_ID,
  207    207   
    ::aws_smithy_schema::ShapeType::Structure,
  208    208   
    &[
  209    209   
        &GETITEMINPUT_MEMBER_TABLE_NAME,
  210    210   
        &GETITEMINPUT_MEMBER_KEY,
  211    211   
        &GETITEMINPUT_MEMBER_ATTRIBUTES_TO_GET,
  212    212   
        &GETITEMINPUT_MEMBER_CONSISTENT_READ,
  213    213   
        &GETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY,
  214    214   
        &GETITEMINPUT_MEMBER_PROJECTION_EXPRESSION,
  215    215   
        &GETITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  216    216   
    ],
  217    217   
);
  218    218   
impl GetItemInput {
  219    219   
    /// The schema for this shape.
  220    220   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETITEMINPUT_SCHEMA;
  221    221   
}
  222    222   
impl ::aws_smithy_schema::serde::SerializableStruct for GetItemInput {
  223    223   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  224    224   
    fn serialize_members(
  225    225   
        &self,
  226    226   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  227    227   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  228    228   
        if let Some(ref val) = self.table_name {
  229    229   
            ser.write_string(&GETITEMINPUT_MEMBER_TABLE_NAME, val)?;
  230    230   
        }
  231    231   
        if let Some(ref val) = self.key {
  232    232   
            ser.write_map(&GETITEMINPUT_MEMBER_KEY, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  233    233   
                for (key, value) in val {
  234    234   
                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  235         -
                    todo!("schema: unsupported map value type");
         235  +
                    ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
  236    236   
                }
  237    237   
                Ok(())
  238    238   
            })?;
  239    239   
        }
  240    240   
        if let Some(ref val) = self.attributes_to_get {
  241    241   
            ser.write_list(
  242    242   
                &GETITEMINPUT_MEMBER_ATTRIBUTES_TO_GET,
  243    243   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  244    244   
                    for item in val {
  245    245   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  246    246   
                    }
  247    247   
                    Ok(())
  248    248   
                },
  249    249   
            )?;
  250    250   
        }
  251    251   
        if let Some(ref val) = self.consistent_read {
  252    252   
            ser.write_boolean(&GETITEMINPUT_MEMBER_CONSISTENT_READ, *val)?;
  253    253   
        }
  254    254   
        if let Some(ref val) = self.return_consumed_capacity {
  255    255   
            ser.write_string(&GETITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
  256    256   
        }
  257    257   
        if let Some(ref val) = self.projection_expression {
  258    258   
            ser.write_string(&GETITEMINPUT_MEMBER_PROJECTION_EXPRESSION, val)?;
  259    259   
        }
  260    260   
        if let Some(ref val) = self.expression_attribute_names {
  261    261   
            ser.write_map(
  262    262   
                &GETITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES,
  263    263   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  264    264   
                    for (key, value) in val {
  265    265   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  266    266   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  267    267   
                    }
  268    268   
                    Ok(())
  269    269   
                },
  270    270   
            )?;
  271    271   
        }
  272    272   
        Ok(())
  273    273   
    }
  274    274   
}
  275    275   
impl GetItemInput {
  276    276   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  277         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  278         -
        deserializer: &mut D,
         277  +
    pub fn deserialize(
         278  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  279    279   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  280    280   
        #[allow(unused_variables, unused_mut)]
  281    281   
        let mut builder = Self::builder();
  282    282   
        #[allow(
  283    283   
            unused_variables,
  284    284   
            unreachable_code,
  285    285   
            clippy::single_match,
  286    286   
            clippy::match_single_binding,
  287    287   
            clippy::diverging_sub_expression
  288    288   
        )]
  289         -
        deserializer.read_struct(&GETITEMINPUT_SCHEMA, (), |_, member, deser| {
         289  +
        deserializer.read_struct(&GETITEMINPUT_SCHEMA, &mut |member, deser| {
  290    290   
            match member.member_index() {
  291    291   
                Some(0) => {
  292    292   
                    builder.table_name = Some(deser.read_string(member)?);
  293    293   
                }
  294    294   
                Some(1) => {
  295    295   
                    builder.key = Some({
  296         -
                        let container = if let Some(cap) = deser.container_size() {
  297         -
                            std::collections::HashMap::with_capacity(cap)
  298         -
                        } else {
  299         -
                            std::collections::HashMap::new()
  300         -
                        };
  301         -
                        deser.read_map(member, container, |mut map, key, deser| {
  302         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  303         -
                            Ok(map)
  304         -
                        })?
         296  +
                        let mut container = std::collections::HashMap::new();
         297  +
                        deser.read_map(member, &mut |key, deser| {
         298  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         299  +
                            Ok(())
         300  +
                        })?;
         301  +
                        container
  305    302   
                    });
  306    303   
                }
  307    304   
                Some(2) => {
  308         -
                    builder.attributes_to_get = Some({
  309         -
                        let container = if let Some(cap) = deser.container_size() {
  310         -
                            Vec::with_capacity(cap)
  311         -
                        } else {
  312         -
                            Vec::new()
  313         -
                        };
  314         -
                        deser.read_list(member, container, |mut list, deser| {
  315         -
                            list.push(deser.read_string(member)?);
  316         -
                            Ok(list)
  317         -
                        })?
  318         -
                    });
         305  +
                    builder.attributes_to_get = Some(deser.read_string_list(member)?);
  319    306   
                }
  320    307   
                Some(3) => {
  321    308   
                    builder.consistent_read = Some(deser.read_boolean(member)?);
  322    309   
                }
  323    310   
                Some(4) => {
  324    311   
                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
  325    312   
                }
  326    313   
                Some(5) => {
  327    314   
                    builder.projection_expression = Some(deser.read_string(member)?);
  328    315   
                }
  329    316   
                Some(6) => {
  330         -
                    builder.expression_attribute_names = Some({
  331         -
                        let container = if let Some(cap) = deser.container_size() {
  332         -
                            std::collections::HashMap::with_capacity(cap)
  333         -
                        } else {
  334         -
                            std::collections::HashMap::new()
  335         -
                        };
  336         -
                        deser.read_map(member, container, |mut map, key, deser| {
  337         -
                            map.insert(key, deser.read_string(member)?);
  338         -
                            Ok(map)
  339         -
                        })?
  340         -
                    });
         317  +
                    builder.expression_attribute_names = Some(deser.read_string_string_map(member)?);
  341    318   
                }
  342    319   
                _ => {}
  343    320   
            }
  344    321   
            Ok(())
  345    322   
        })?;
         323  +
        builder.table_name = builder.table_name.or(Some(String::new()));
         324  +
        builder.key = builder.key.or(Some(::std::collections::HashMap::new()));
  346    325   
        builder
  347    326   
            .build()
  348    327   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  349    328   
    }
  350    329   
}
         330  +
impl GetItemInput {
         331  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         332  +
    pub fn deserialize_with_response(
         333  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         334  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         335  +
        _status: u16,
         336  +
        _body: &[u8],
         337  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         338  +
        Self::deserialize(deserializer)
         339  +
    }
         340  +
}
  351    341   
impl GetItemInput {
  352    342   
    /// Creates a new builder-style object to manufacture [`GetItemInput`](crate::operation::get_item::GetItemInput).
  353    343   
    pub fn builder() -> crate::operation::get_item::builders::GetItemInputBuilder {
  354    344   
        crate::operation::get_item::builders::GetItemInputBuilder::default()
  355    345   
    }
  356    346   
}
  357    347   
  358    348   
/// A builder for [`GetItemInput`](crate::operation::get_item::GetItemInput).
  359    349   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  360    350   
#[non_exhaustive]

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

@@ -5,5 +137,192 @@
   25     25   
    "com.amazonaws.dynamodb.synthetic",
   26     26   
    "GetItemOutput",
   27     27   
);
   28     28   
static GETITEMOUTPUT_MEMBER_ITEM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   29     29   
    ::aws_smithy_schema::ShapeId::from_static(
   30     30   
        "com.amazonaws.dynamodb.synthetic#GetItemOutput$Item",
   31     31   
        "com.amazonaws.dynamodb.synthetic",
   32     32   
        "GetItemOutput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::Map,
   35         -
    "item",
          35  +
    "Item",
   36     36   
    0,
   37     37   
);
   38     38   
static GETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.dynamodb.synthetic#GetItemOutput$ConsumedCapacity",
   41     41   
        "com.amazonaws.dynamodb.synthetic",
   42     42   
        "GetItemOutput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::Structure,
   45         -
    "consumed_capacity",
          45  +
    "ConsumedCapacity",
   46     46   
    1,
   47     47   
);
          48  +
static GETITEMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          50  +
    ::aws_smithy_schema::ShapeType::String,
          51  +
    "request_id",
          52  +
    2,
          53  +
)
          54  +
.with_http_header("x-amzn-requestid");
   48     55   
static GETITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     56   
    GETITEMOUTPUT_SCHEMA_ID,
   50     57   
    ::aws_smithy_schema::ShapeType::Structure,
   51         -
    &[&GETITEMOUTPUT_MEMBER_ITEM, &GETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY],
          58  +
    &[
          59  +
        &GETITEMOUTPUT_MEMBER_ITEM,
          60  +
        &GETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY,
          61  +
        &GETITEMOUTPUT_MEMBER__REQUEST_ID,
          62  +
    ],
   52     63   
);
   53     64   
impl GetItemOutput {
   54     65   
    /// The schema for this shape.
   55     66   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETITEMOUTPUT_SCHEMA;
   56     67   
}
   57     68   
impl ::aws_smithy_schema::serde::SerializableStruct for GetItemOutput {
   58     69   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     70   
    fn serialize_members(
   60     71   
        &self,
   61     72   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     73   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     74   
        if let Some(ref val) = self.item {
   64     75   
            ser.write_map(
   65     76   
                &GETITEMOUTPUT_MEMBER_ITEM,
   66     77   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   67     78   
                    for (key, value) in val {
   68     79   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   69         -
                        todo!("schema: unsupported map value type");
          80  +
                        ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
   70     81   
                    }
   71     82   
                    Ok(())
   72     83   
                },
   73     84   
            )?;
   74     85   
        }
   75     86   
        if let Some(ref val) = self.consumed_capacity {
   76     87   
            ser.write_struct(&GETITEMOUTPUT_MEMBER_CONSUMED_CAPACITY, val)?;
   77     88   
        }
   78     89   
        Ok(())
   79     90   
    }
   80     91   
}
   81     92   
impl GetItemOutput {
   82     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   83         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   84         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   85     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   86     97   
        #[allow(unused_variables, unused_mut)]
   87     98   
        let mut builder = Self::builder();
   88     99   
        #[allow(
   89    100   
            unused_variables,
   90    101   
            unreachable_code,
   91    102   
            clippy::single_match,
   92    103   
            clippy::match_single_binding,
   93    104   
            clippy::diverging_sub_expression
   94    105   
        )]
   95         -
        deserializer.read_struct(&GETITEMOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&GETITEMOUTPUT_SCHEMA, &mut |member, deser| {
   96    107   
            match member.member_index() {
   97    108   
                Some(0) => {
   98    109   
                    builder.item = Some({
   99         -
                        let container = if let Some(cap) = deser.container_size() {
  100         -
                            std::collections::HashMap::with_capacity(cap)
  101         -
                        } else {
  102         -
                            std::collections::HashMap::new()
  103         -
                        };
  104         -
                        deser.read_map(member, container, |mut map, key, deser| {
  105         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  106         -
                            Ok(map)
  107         -
                        })?
         110  +
                        let mut container = std::collections::HashMap::new();
         111  +
                        deser.read_map(member, &mut |key, deser| {
         112  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         113  +
                            Ok(())
         114  +
                        })?;
         115  +
                        container
         116  +
                    });
         117  +
                }
         118  +
                Some(1) => {
         119  +
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl GetItemOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&GETITEMOUTPUT_SCHEMA, &mut |member, deser| {
         154  +
            match member.member_index() {
         155  +
                Some(0) => {
         156  +
                    builder.item = Some({
         157  +
                        let mut container = std::collections::HashMap::new();
         158  +
                        deser.read_map(member, &mut |key, deser| {
         159  +
                            container.insert(key, crate::types::AttributeValue::deserialize(deser)?);
         160  +
                            Ok(())
         161  +
                        })?;
         162  +
                        container
  108    163   
                    });
  109    164   
                }
  110    165   
                Some(1) => {
  111    166   
                    builder.consumed_capacity = Some(crate::types::ConsumedCapacity::deserialize(deser)?);
  112    167   
                }
  113    168   
                _ => {}
  114    169   
            }
  115    170   
            Ok(())
  116    171   
        })?;
  117    172   
        Ok(builder.build())

tmp-codegen-diff/aws-sdk/sdk/dynamodb/src/operation/get_resource_policy.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 `GetResourcePolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetResourcePolicy;
    6      6   
impl GetResourcePolicy {
    7      7   
    /// Creates a new `GetResourcePolicy`
    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::get_resource_policy::GetResourcePolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_resource_policy::GetResourcePolicyOutput::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::get_resource_policy::GetResourcePolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_resource_policy::GetResourcePolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_resource_policy::GetResourcePolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,358 @@
  138    142   
                crate::operation::get_resource_policy::GetResourcePolicyError,
  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 GetResourcePolicyResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetResourcePolicyResponseDeserializer {
  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_get_resource_policy::de_get_resource_policy_http_error(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(
         175  +
                            crate::operation::get_resource_policy::GetResourcePolicyError::unhandled(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  +
                "InternalServerError" => crate::operation::get_resource_policy::GetResourcePolicyError::InternalServerError({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::get_resource_policy::GetResourcePolicyError::InvalidEndpointException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::InvalidEndpointException::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  +
                "PolicyNotFoundException" => crate::operation::get_resource_policy::GetResourcePolicyError::PolicyNotFoundException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::PolicyNotFoundException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::PolicyNotFoundException::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  +
                "ResourceNotFoundException" => crate::operation::get_resource_policy::GetResourcePolicyError::ResourceNotFoundException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                _ => crate::operation::get_resource_policy::GetResourcePolicyError::generic(generic),
         282  +
            };
         283  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         284  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         285  +
            ))
  160    286   
        } else {
  161         -
            crate::protocol_serde::shape_get_resource_policy::de_get_resource_policy_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         287  +
            let protocol = _cfg
         288  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         289  +
                .expect("a SharedClientProtocol is required");
         290  +
            let mut deser = protocol
         291  +
                .deserialize_response(response, GetResourcePolicy::OUTPUT_SCHEMA, _cfg)
         292  +
                .map_err(|e| {
         293  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
                })?;
         295  +
            let body = response.body().bytes().expect("body loaded");
         296  +
            let output = crate::operation::get_resource_policy::GetResourcePolicyOutput::deserialize_with_response(
         297  +
                &mut *deser,
         298  +
                response.headers(),
         299  +
                response.status().into(),
         300  +
                body,
         301  +
            )
         302  +
            .map_err(|e| {
         303  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         304  +
            })?;
         305  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         306  +
        }
  164    307   
    }
  165    308   
}
  166    309   
#[derive(Debug)]
  167    310   
struct GetResourcePolicyRequestSerializer;
  168    311   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetResourcePolicyRequestSerializer {
  169    312   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    313   
    fn serialize_input(
  171    314   
        &self,
  172    315   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    316   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    317   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    318   
        let input = input
  176    319   
            .downcast::<crate::operation::get_resource_policy::GetResourcePolicyInput>()
  177    320   
            .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::get_resource_policy::GetResourcePolicyInput,
  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::get_resource_policy::GetResourcePolicyInput,
  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.GetResourcePolicy",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_get_resource_policy::ser_get_resource_policy_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())
         321  +
        let protocol = _cfg
         322  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
            .expect("a SharedClientProtocol is required");
         324  +
        let mut request = protocol
         325  +
            .serialize_request(&input, GetResourcePolicy::INPUT_SCHEMA, "", _cfg)
         326  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         327  +
         328  +
        return ::std::result::Result::Ok(request);
  216    329   
    }
  217    330   
}
  218    331   
#[derive(Debug)]
  219    332   
struct GetResourcePolicyEndpointParamsInterceptor;
  220    333   
  221    334   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetResourcePolicyEndpointParamsInterceptor {
  222    335   
    fn name(&self) -> &'static str {
  223    336   
        "GetResourcePolicyEndpointParamsInterceptor"
  224    337   
    }
  225    338   

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

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

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

@@ -4,4 +115,166 @@
   24     24   
    "com.amazonaws.dynamodb.synthetic",
   25     25   
    "GetResourcePolicyOutput",
   26     26   
);
   27     27   
static GETRESOURCEPOLICYOUTPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.dynamodb.synthetic#GetResourcePolicyOutput$Policy",
   30     30   
        "com.amazonaws.dynamodb.synthetic",
   31     31   
        "GetResourcePolicyOutput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "policy",
          34  +
    "Policy",
   35     35   
    0,
   36     36   
);
   37     37   
static GETRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "com.amazonaws.dynamodb.synthetic#GetResourcePolicyOutput$RevisionId",
   40     40   
        "com.amazonaws.dynamodb.synthetic",
   41     41   
        "GetResourcePolicyOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44         -
    "revision_id",
          44  +
    "RevisionId",
   45     45   
    1,
   46     46   
);
          47  +
static GETRESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "request_id",
          51  +
    2,
          52  +
)
          53  +
.with_http_header("x-amzn-requestid");
   47     54   
static GETRESOURCEPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     55   
    GETRESOURCEPOLICYOUTPUT_SCHEMA_ID,
   49     56   
    ::aws_smithy_schema::ShapeType::Structure,
   50         -
    &[&GETRESOURCEPOLICYOUTPUT_MEMBER_POLICY, &GETRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID],
          57  +
    &[
          58  +
        &GETRESOURCEPOLICYOUTPUT_MEMBER_POLICY,
          59  +
        &GETRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID,
          60  +
        &GETRESOURCEPOLICYOUTPUT_MEMBER__REQUEST_ID,
          61  +
    ],
   51     62   
);
   52     63   
impl GetResourcePolicyOutput {
   53     64   
    /// The schema for this shape.
   54     65   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETRESOURCEPOLICYOUTPUT_SCHEMA;
   55     66   
}
   56     67   
impl ::aws_smithy_schema::serde::SerializableStruct for GetResourcePolicyOutput {
   57     68   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     69   
    fn serialize_members(
   59     70   
        &self,
   60     71   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     72   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     73   
        if let Some(ref val) = self.policy {
   63     74   
            ser.write_string(&GETRESOURCEPOLICYOUTPUT_MEMBER_POLICY, val)?;
   64     75   
        }
   65     76   
        if let Some(ref val) = self.revision_id {
   66     77   
            ser.write_string(&GETRESOURCEPOLICYOUTPUT_MEMBER_REVISION_ID, val)?;
   67     78   
        }
   68     79   
        Ok(())
   69     80   
    }
   70     81   
}
   71     82   
impl GetResourcePolicyOutput {
   72     83   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   73         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   74         -
        deserializer: &mut D,
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        #[allow(unused_variables, unused_mut)]
          88  +
        let mut builder = Self::builder();
          89  +
        #[allow(
          90  +
            unused_variables,
          91  +
            unreachable_code,
          92  +
            clippy::single_match,
          93  +
            clippy::match_single_binding,
          94  +
            clippy::diverging_sub_expression
          95  +
        )]
          96  +
        deserializer.read_struct(&GETRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    builder.policy = Some(deser.read_string(member)?);
         100  +
                }
         101  +
                Some(1) => {
         102  +
                    builder.revision_id = Some(deser.read_string(member)?);
         103  +
                }
         104  +
                Some(2) => {
         105  +
                    builder._request_id = Some(deser.read_string(member)?);
         106  +
                }
         107  +
                _ => {}
         108  +
            }
         109  +
            Ok(())
         110  +
        })?;
         111  +
        Ok(builder.build())
         112  +
    }
         113  +
}
         114  +
impl GetResourcePolicyOutput {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         116  +
    /// Header-bound members are read directly from headers, avoiding runtime
         117  +
    /// member iteration overhead. Body members are read via the deserializer.
         118  +
    pub fn deserialize_with_response(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         121  +
        _status: u16,
         122  +
        _body: &[u8],
   75    123   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   76    124   
        #[allow(unused_variables, unused_mut)]
   77    125   
        let mut builder = Self::builder();
         126  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         127  +
            builder._request_id = Some(val.to_string());
         128  +
        }
   78    129   
        #[allow(
   79    130   
            unused_variables,
   80    131   
            unreachable_code,
   81    132   
            clippy::single_match,
   82    133   
            clippy::match_single_binding,
   83    134   
            clippy::diverging_sub_expression
   84    135   
        )]
   85         -
        deserializer.read_struct(&GETRESOURCEPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
         136  +
        deserializer.read_struct(&GETRESOURCEPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   86    137   
            match member.member_index() {
   87    138   
                Some(0) => {
   88    139   
                    builder.policy = Some(deser.read_string(member)?);
   89    140   
                }
   90    141   
                Some(1) => {
   91    142   
                    builder.revision_id = Some(deser.read_string(member)?);
   92    143   
                }
   93    144   
                _ => {}
   94    145   
            }
   95    146   
            Ok(())