AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

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

@@ -58,58 +269,322 @@
   78     78   
    "com.amazonaws.dynamodb.synthetic",
   79     79   
    "DescribeContributorInsightsOutput",
   80     80   
);
   81     81   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$TableName",
   84     84   
        "com.amazonaws.dynamodb.synthetic",
   85     85   
        "DescribeContributorInsightsOutput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::String,
   88         -
    "table_name",
          88  +
    "TableName",
   89     89   
    0,
   90     90   
);
   91     91   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$IndexName",
   94     94   
        "com.amazonaws.dynamodb.synthetic",
   95     95   
        "DescribeContributorInsightsOutput",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::String,
   98         -
    "index_name",
          98  +
    "IndexName",
   99     99   
    1,
  100    100   
);
  101    101   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$ContributorInsightsRuleList",
  104    104   
        "com.amazonaws.dynamodb.synthetic",
  105    105   
        "DescribeContributorInsightsOutput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::List,
  108         -
    "contributor_insights_rule_list",
         108  +
    "ContributorInsightsRuleList",
  109    109   
    2,
  110    110   
);
  111    111   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  112    112   
    ::aws_smithy_schema::ShapeId::from_static(
  113    113   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$ContributorInsightsStatus",
  114    114   
        "com.amazonaws.dynamodb.synthetic",
  115    115   
        "DescribeContributorInsightsOutput",
  116    116   
    ),
  117    117   
    ::aws_smithy_schema::ShapeType::String,
  118         -
    "contributor_insights_status",
         118  +
    "ContributorInsightsStatus",
  119    119   
    3,
  120    120   
);
  121    121   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  122    122   
    ::aws_smithy_schema::ShapeId::from_static(
  123    123   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$LastUpdateDateTime",
  124    124   
        "com.amazonaws.dynamodb.synthetic",
  125    125   
        "DescribeContributorInsightsOutput",
  126    126   
    ),
  127    127   
    ::aws_smithy_schema::ShapeType::Timestamp,
  128         -
    "last_update_date_time",
         128  +
    "LastUpdateDateTime",
  129    129   
    4,
  130    130   
);
  131    131   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  132    132   
    ::aws_smithy_schema::ShapeId::from_static(
  133    133   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$FailureException",
  134    134   
        "com.amazonaws.dynamodb.synthetic",
  135    135   
        "DescribeContributorInsightsOutput",
  136    136   
    ),
  137    137   
    ::aws_smithy_schema::ShapeType::Structure,
  138         -
    "failure_exception",
         138  +
    "FailureException",
  139    139   
    5,
  140    140   
);
  141    141   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_MODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  142    142   
    ::aws_smithy_schema::ShapeId::from_static(
  143    143   
        "com.amazonaws.dynamodb.synthetic#DescribeContributorInsightsOutput$ContributorInsightsMode",
  144    144   
        "com.amazonaws.dynamodb.synthetic",
  145    145   
        "DescribeContributorInsightsOutput",
  146    146   
    ),
  147    147   
    ::aws_smithy_schema::ShapeType::String,
  148         -
    "contributor_insights_mode",
         148  +
    "ContributorInsightsMode",
  149    149   
    6,
  150    150   
);
         151  +
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         152  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         153  +
    ::aws_smithy_schema::ShapeType::String,
         154  +
    "request_id",
         155  +
    7,
         156  +
)
         157  +
.with_http_header("x-amzn-requestid");
  151    158   
static DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  152    159   
    DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA_ID,
  153    160   
    ::aws_smithy_schema::ShapeType::Structure,
  154    161   
    &[
  155    162   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME,
  156    163   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME,
  157    164   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST,
  158    165   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS,
  159    166   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME,
  160    167   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION,
  161    168   
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_MODE,
         169  +
        &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER__REQUEST_ID,
  162    170   
    ],
  163    171   
);
  164    172   
impl DescribeContributorInsightsOutput {
  165    173   
    /// The schema for this shape.
  166    174   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA;
  167    175   
}
  168    176   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeContributorInsightsOutput {
  169    177   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  170    178   
    fn serialize_members(
  171    179   
        &self,
  172    180   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  173    181   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  174    182   
        if let Some(ref val) = self.table_name {
  175    183   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_TABLE_NAME, val)?;
  176    184   
        }
  177    185   
        if let Some(ref val) = self.index_name {
  178    186   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_INDEX_NAME, val)?;
  179    187   
        }
  180    188   
        if let Some(ref val) = self.contributor_insights_rule_list {
  181    189   
            ser.write_list(
  182    190   
                &DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_RULE_LIST,
  183    191   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  184    192   
                    for item in val {
  185    193   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  186    194   
                    }
  187    195   
                    Ok(())
  188    196   
                },
  189    197   
            )?;
  190    198   
        }
  191    199   
        if let Some(ref val) = self.contributor_insights_status {
  192    200   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_STATUS, val.as_str())?;
  193    201   
        }
  194    202   
        if let Some(ref val) = self.last_update_date_time {
  195    203   
            ser.write_timestamp(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_LAST_UPDATE_DATE_TIME, val)?;
  196    204   
        }
  197    205   
        if let Some(ref val) = self.failure_exception {
  198    206   
            ser.write_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_FAILURE_EXCEPTION, val)?;
  199    207   
        }
  200    208   
        if let Some(ref val) = self.contributor_insights_mode {
  201    209   
            ser.write_string(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_MEMBER_CONTRIBUTOR_INSIGHTS_MODE, val.as_str())?;
  202    210   
        }
  203    211   
        Ok(())
  204    212   
    }
  205    213   
}
  206    214   
impl DescribeContributorInsightsOutput {
  207    215   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  208         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  209         -
        deserializer: &mut D,
         216  +
    pub fn deserialize(
         217  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         218  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         219  +
        #[allow(unused_variables, unused_mut)]
         220  +
        let mut builder = Self::builder();
         221  +
        #[allow(
         222  +
            unused_variables,
         223  +
            unreachable_code,
         224  +
            clippy::single_match,
         225  +
            clippy::match_single_binding,
         226  +
            clippy::diverging_sub_expression
         227  +
        )]
         228  +
        deserializer.read_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, &mut |member, deser| {
         229  +
            match member.member_index() {
         230  +
                Some(0) => {
         231  +
                    builder.table_name = Some(deser.read_string(member)?);
         232  +
                }
         233  +
                Some(1) => {
         234  +
                    builder.index_name = Some(deser.read_string(member)?);
         235  +
                }
         236  +
                Some(2) => {
         237  +
                    builder.contributor_insights_rule_list = Some(deser.read_string_list(member)?);
         238  +
                }
         239  +
                Some(3) => {
         240  +
                    builder.contributor_insights_status = Some(crate::types::ContributorInsightsStatus::from(deser.read_string(member)?.as_str()));
         241  +
                }
         242  +
                Some(4) => {
         243  +
                    builder.last_update_date_time = Some(deser.read_timestamp(member)?);
         244  +
                }
         245  +
                Some(5) => {
         246  +
                    builder.failure_exception = Some(crate::types::FailureException::deserialize(deser)?);
         247  +
                }
         248  +
                Some(6) => {
         249  +
                    builder.contributor_insights_mode = Some(crate::types::ContributorInsightsMode::from(deser.read_string(member)?.as_str()));
         250  +
                }
         251  +
                Some(7) => {
         252  +
                    builder._request_id = Some(deser.read_string(member)?);
         253  +
                }
         254  +
                _ => {}
         255  +
            }
         256  +
            Ok(())
         257  +
        })?;
         258  +
        Ok(builder.build())
         259  +
    }
         260  +
}
         261  +
impl DescribeContributorInsightsOutput {
         262  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         263  +
    /// Header-bound members are read directly from headers, avoiding runtime
         264  +
    /// member iteration overhead. Body members are read via the deserializer.
         265  +
    pub fn deserialize_with_response(
         266  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         267  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         268  +
        _status: u16,
         269  +
        _body: &[u8],
  210    270   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  211    271   
        #[allow(unused_variables, unused_mut)]
  212    272   
        let mut builder = Self::builder();
         273  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         274  +
            builder._request_id = Some(val.to_string());
         275  +
        }
  213    276   
        #[allow(
  214    277   
            unused_variables,
  215    278   
            unreachable_code,
  216    279   
            clippy::single_match,
  217    280   
            clippy::match_single_binding,
  218    281   
            clippy::diverging_sub_expression
  219    282   
        )]
  220         -
        deserializer.read_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, (), |_, member, deser| {
         283  +
        deserializer.read_struct(&DESCRIBECONTRIBUTORINSIGHTSOUTPUT_SCHEMA, &mut |member, deser| {
  221    284   
            match member.member_index() {
  222    285   
                Some(0) => {
  223    286   
                    builder.table_name = Some(deser.read_string(member)?);
  224    287   
                }
  225    288   
                Some(1) => {
  226    289   
                    builder.index_name = Some(deser.read_string(member)?);
  227    290   
                }
  228    291   
                Some(2) => {
  229         -
                    builder.contributor_insights_rule_list = Some({
  230         -
                        let container = if let Some(cap) = deser.container_size() {
  231         -
                            Vec::with_capacity(cap)
  232         -
                        } else {
  233         -
                            Vec::new()
  234         -
                        };
  235         -
                        deser.read_list(member, container, |mut list, deser| {
  236         -
                            list.push(deser.read_string(member)?);
  237         -
                            Ok(list)
  238         -
                        })?
  239         -
                    });
         292  +
                    builder.contributor_insights_rule_list = Some(deser.read_string_list(member)?);
  240    293   
                }
  241    294   
                Some(3) => {
  242    295   
                    builder.contributor_insights_status = Some(crate::types::ContributorInsightsStatus::from(deser.read_string(member)?.as_str()));
  243    296   
                }
  244    297   
                Some(4) => {
  245    298   
                    builder.last_update_date_time = Some(deser.read_timestamp(member)?);
  246    299   
                }
  247    300   
                Some(5) => {
  248    301   
                    builder.failure_exception = Some(crate::types::FailureException::deserialize(deser)?);
  249    302   
                }

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeEndpoints`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeEndpoints;
    6      6   
impl DescribeEndpoints {
    7      7   
    /// Creates a new `DescribeEndpoints`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_endpoints::DescribeEndpointsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_endpoints::DescribeEndpointsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_endpoints::DescribeEndpointsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_endpoints::DescribeEndpointsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_endpoints::DescribeEndpointsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,247 @@
  138    142   
                crate::operation::describe_endpoints::DescribeEndpointsError,
  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 DescribeEndpointsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeEndpointsResponseDeserializer {
  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_describe_endpoints::de_describe_endpoints_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  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         171  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         172  +
                    crate::operation::describe_endpoints::DescribeEndpointsError::generic(generic),
         173  +
                ),
         174  +
            ))
  160    175   
        } else {
  161         -
            crate::protocol_serde::shape_describe_endpoints::de_describe_endpoints_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let mut deser = protocol
         180  +
                .deserialize_response(response, DescribeEndpoints::OUTPUT_SCHEMA, _cfg)
         181  +
                .map_err(|e| {
         182  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         183  +
                })?;
         184  +
            let body = response.body().bytes().expect("body loaded");
         185  +
            let output = crate::operation::describe_endpoints::DescribeEndpointsOutput::deserialize_with_response(
         186  +
                &mut *deser,
         187  +
                response.headers(),
         188  +
                response.status().into(),
         189  +
                body,
         190  +
            )
         191  +
            .map_err(|e| {
         192  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         193  +
            })?;
         194  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         195  +
        }
  164    196   
    }
  165    197   
}
  166    198   
#[derive(Debug)]
  167    199   
struct DescribeEndpointsRequestSerializer;
  168    200   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeEndpointsRequestSerializer {
  169    201   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    202   
    fn serialize_input(
  171    203   
        &self,
  172    204   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    205   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    206   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    207   
        let input = input
  176    208   
            .downcast::<crate::operation::describe_endpoints::DescribeEndpointsInput>()
  177    209   
            .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::describe_endpoints::DescribeEndpointsInput,
  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::describe_endpoints::DescribeEndpointsInput,
  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.DescribeEndpoints",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_endpoints::ser_describe_endpoints_input(&input)?);
         210  +
        let protocol = _cfg
         211  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         212  +
            .expect("a SharedClientProtocol is required");
         213  +
        let mut request = protocol
         214  +
            .serialize_request(&input, DescribeEndpoints::INPUT_SCHEMA, "", _cfg)
         215  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  211    216   
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         217  +
        return ::std::result::Result::Ok(request);
  213    218   
    }
  214    219   
}
  215    220   
#[derive(Debug)]
  216    221   
struct DescribeEndpointsEndpointParamsInterceptor;
  217    222   
  218    223   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeEndpointsEndpointParamsInterceptor {
  219    224   
    fn name(&self) -> &'static str {
  220    225   
        "DescribeEndpointsEndpointParamsInterceptor"
  221    226   
    }
  222    227   

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

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

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeExport`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeExport;
    6      6   
impl DescribeExport {
    7      7   
    /// Creates a new `DescribeExport`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_export::DescribeExportInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_export::DescribeExportOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_export::DescribeExportInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_export::DescribeExportOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_export::DescribeExportError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,334 @@
  138    142   
                crate::operation::describe_export::DescribeExportError,
  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 DescribeExportResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeExportResponseDeserializer {
  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_describe_export::de_describe_export_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(crate::operation::describe_export::DescribeExportError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "ExportNotFoundException" => crate::operation::describe_export::DescribeExportError::ExportNotFoundException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ExportNotFoundException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ExportNotFoundException::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  +
                "InternalServerError" => crate::operation::describe_export::DescribeExportError::InternalServerError({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::InternalServerError::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  +
                "LimitExceededException" => crate::operation::describe_export::DescribeExportError::LimitExceededException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::LimitExceededException::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  +
                _ => crate::operation::describe_export::DescribeExportError::generic(generic),
         258  +
            };
         259  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         260  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         261  +
            ))
  160    262   
        } else {
  161         -
            crate::protocol_serde::shape_describe_export::de_describe_export_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         263  +
            let protocol = _cfg
         264  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         265  +
                .expect("a SharedClientProtocol is required");
         266  +
            let mut deser = protocol
         267  +
                .deserialize_response(response, DescribeExport::OUTPUT_SCHEMA, _cfg)
         268  +
                .map_err(|e| {
         269  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         270  +
                })?;
         271  +
            let body = response.body().bytes().expect("body loaded");
         272  +
            let output = crate::operation::describe_export::DescribeExportOutput::deserialize_with_response(
         273  +
                &mut *deser,
         274  +
                response.headers(),
         275  +
                response.status().into(),
         276  +
                body,
         277  +
            )
         278  +
            .map_err(|e| {
         279  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         280  +
            })?;
         281  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         282  +
        }
  164    283   
    }
  165    284   
}
  166    285   
#[derive(Debug)]
  167    286   
struct DescribeExportRequestSerializer;
  168    287   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeExportRequestSerializer {
  169    288   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    289   
    fn serialize_input(
  171    290   
        &self,
  172    291   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    292   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    293   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    294   
        let input = input
  176    295   
            .downcast::<crate::operation::describe_export::DescribeExportInput>()
  177    296   
            .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::describe_export::DescribeExportInput,
  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::describe_export::DescribeExportInput,
  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.DescribeExport",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_export::ser_describe_export_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())
         297  +
        let protocol = _cfg
         298  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         299  +
            .expect("a SharedClientProtocol is required");
         300  +
        let mut request = protocol
         301  +
            .serialize_request(&input, DescribeExport::INPUT_SCHEMA, "", _cfg)
         302  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         303  +
         304  +
        return ::std::result::Result::Ok(request);
  216    305   
    }
  217    306   
}
  218    307   
#[derive(Debug)]
  219    308   
struct DescribeExportEndpointParamsInterceptor;
  220    309   
  221    310   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeExportEndpointParamsInterceptor {
  222    311   
    fn name(&self) -> &'static str {
  223    312   
        "DescribeExportEndpointParamsInterceptor"
  224    313   
    }
  225    314   

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

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

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DescribeGlobalTable`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeGlobalTable;
    6      6   
impl DescribeGlobalTable {
    7      7   
    /// Creates a new `DescribeGlobalTable`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_global_table::DescribeGlobalTableInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_global_table::DescribeGlobalTableOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::describe_global_table::DescribeGlobalTableInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_global_table::DescribeGlobalTableOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_global_table::DescribeGlobalTableError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,334 @@
  138    142   
                crate::operation::describe_global_table::DescribeGlobalTableError,
  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 DescribeGlobalTableResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeGlobalTableResponseDeserializer {
  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_describe_global_table::de_describe_global_table_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::describe_global_table::DescribeGlobalTableError::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  +
                "GlobalTableNotFoundException" => crate::operation::describe_global_table::DescribeGlobalTableError::GlobalTableNotFoundException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::GlobalTableNotFoundException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::GlobalTableNotFoundException::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  +
                "InternalServerError" => crate::operation::describe_global_table::DescribeGlobalTableError::InternalServerError({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::InternalServerError::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  +
                "InvalidEndpointException" => crate::operation::describe_global_table::DescribeGlobalTableError::InvalidEndpointException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::InvalidEndpointException::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  +
                _ => crate::operation::describe_global_table::DescribeGlobalTableError::generic(generic),
         258  +
            };
         259  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         260  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         261  +
            ))
  160    262   
        } else {
  161         -
            crate::protocol_serde::shape_describe_global_table::de_describe_global_table_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         263  +
            let protocol = _cfg
         264  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         265  +
                .expect("a SharedClientProtocol is required");
         266  +
            let mut deser = protocol
         267  +
                .deserialize_response(response, DescribeGlobalTable::OUTPUT_SCHEMA, _cfg)
         268  +
                .map_err(|e| {
         269  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         270  +
                })?;
         271  +
            let body = response.body().bytes().expect("body loaded");
         272  +
            let output = crate::operation::describe_global_table::DescribeGlobalTableOutput::deserialize_with_response(
         273  +
                &mut *deser,
         274  +
                response.headers(),
         275  +
                response.status().into(),
         276  +
                body,
         277  +
            )
         278  +
            .map_err(|e| {
         279  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         280  +
            })?;
         281  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         282  +
        }
  164    283   
    }
  165    284   
}
  166    285   
#[derive(Debug)]
  167    286   
struct DescribeGlobalTableRequestSerializer;
  168    287   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeGlobalTableRequestSerializer {
  169    288   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    289   
    fn serialize_input(
  171    290   
        &self,
  172    291   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    292   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    293   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    294   
        let input = input
  176    295   
            .downcast::<crate::operation::describe_global_table::DescribeGlobalTableInput>()
  177    296   
            .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::describe_global_table::DescribeGlobalTableInput,
  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::describe_global_table::DescribeGlobalTableInput,
  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.DescribeGlobalTable",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_global_table::ser_describe_global_table_input(
  211         -
            &input,
  212         -
        )?);
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         297  +
        let protocol = _cfg
         298  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         299  +
            .expect("a SharedClientProtocol is required");
         300  +
        let mut request = protocol
         301  +
            .serialize_request(&input, DescribeGlobalTable::INPUT_SCHEMA, "", _cfg)
         302  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         303  +
         304  +
        return ::std::result::Result::Ok(request);
  218    305   
    }
  219    306   
}
  220    307   
#[derive(Debug)]
  221    308   
struct DescribeGlobalTableEndpointParamsInterceptor;
  222    309   
  223    310   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeGlobalTableEndpointParamsInterceptor {
  224    311   
    fn name(&self) -> &'static str {
  225    312   
        "DescribeGlobalTableEndpointParamsInterceptor"
  226    313   
    }
  227    314   

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

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.dynamodb.synthetic",
   18     18   
    "DescribeGlobalTableInput",
   19     19   
);
   20     20   
static DESCRIBEGLOBALTABLEINPUT_MEMBER_GLOBAL_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.dynamodb.synthetic#DescribeGlobalTableInput$GlobalTableName",
   23     23   
        "com.amazonaws.dynamodb.synthetic",
   24     24   
        "DescribeGlobalTableInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "global_table_name",
          27  +
    "GlobalTableName",
   28     28   
    0,
   29     29   
);
   30     30   
static DESCRIBEGLOBALTABLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DESCRIBEGLOBALTABLEINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DESCRIBEGLOBALTABLEINPUT_MEMBER_GLOBAL_TABLE_NAME],
   34     34   
);
   35     35   
impl DescribeGlobalTableInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEGLOBALTABLEINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeGlobalTableInput {
   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.global_table_name {
   46     46   
            ser.write_string(&DESCRIBEGLOBALTABLEINPUT_MEMBER_GLOBAL_TABLE_NAME, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DescribeGlobalTableInput {
   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(&DESCRIBEGLOBALTABLEINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DESCRIBEGLOBALTABLEINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.global_table_name = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.global_table_name = builder.global_table_name.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl DescribeGlobalTableInput {
          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 DescribeGlobalTableInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DescribeGlobalTableInput`](crate::operation::describe_global_table::DescribeGlobalTableInput).
   81     93   
    pub fn builder() -> crate::operation::describe_global_table::builders::DescribeGlobalTableInputBuilder {
   82     94   
        crate::operation::describe_global_table::builders::DescribeGlobalTableInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DescribeGlobalTableInput`](crate::operation::describe_global_table::DescribeGlobalTableInput).
   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/describe_global_table/_describe_global_table_output.rs

@@ -1,1 +96,143 @@
   18     18   
    "com.amazonaws.dynamodb.synthetic",
   19     19   
    "DescribeGlobalTableOutput",
   20     20   
);
   21     21   
static DESCRIBEGLOBALTABLEOUTPUT_MEMBER_GLOBAL_TABLE_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#DescribeGlobalTableOutput$GlobalTableDescription",
   24     24   
        "com.amazonaws.dynamodb.synthetic",
   25     25   
        "DescribeGlobalTableOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "global_table_description",
          28  +
    "GlobalTableDescription",
   29     29   
    0,
   30     30   
);
          31  +
static DESCRIBEGLOBALTABLEOUTPUT_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 DESCRIBEGLOBALTABLEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DESCRIBEGLOBALTABLEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DESCRIBEGLOBALTABLEOUTPUT_MEMBER_GLOBAL_TABLE_DESCRIPTION],
          41  +
    &[
          42  +
        &DESCRIBEGLOBALTABLEOUTPUT_MEMBER_GLOBAL_TABLE_DESCRIPTION,
          43  +
        &DESCRIBEGLOBALTABLEOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
   35     45   
);
   36     46   
impl DescribeGlobalTableOutput {
   37     47   
    /// The schema for this shape.
   38     48   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEGLOBALTABLEOUTPUT_SCHEMA;
   39     49   
}
   40     50   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeGlobalTableOutput {
   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.global_table_description {
   47     57   
            ser.write_struct(&DESCRIBEGLOBALTABLEOUTPUT_MEMBER_GLOBAL_TABLE_DESCRIPTION, val)?;
   48     58   
        }
   49     59   
        Ok(())
   50     60   
    }
   51     61   
}
   52     62   
impl DescribeGlobalTableOutput {
   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(&DESCRIBEGLOBALTABLEOUTPUT_SCHEMA, (), |_, member, deser| {
          76  +
        deserializer.read_struct(&DESCRIBEGLOBALTABLEOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.global_table_description = Some(crate::types::GlobalTableDescription::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 DescribeGlobalTableOutput {
          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(&DESCRIBEGLOBALTABLEOUTPUT_SCHEMA, &mut |member, deser| {
   67    114   
            match member.member_index() {
   68    115   
                Some(0) => {
   69    116   
                    builder.global_table_description = Some(crate::types::GlobalTableDescription::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/describe_global_table_settings.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 `DescribeGlobalTableSettings`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeGlobalTableSettings;
    6      6   
impl DescribeGlobalTableSettings {
    7      7   
    /// Creates a new `DescribeGlobalTableSettings`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -124,130 +253,346 @@
  144    150   
                crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError,
  145    151   
            >::new());
  146    152   
  147    153   
        ::std::borrow::Cow::Owned(rcb)
  148    154   
    }
  149    155   
}
  150    156   
  151    157   
#[derive(Debug)]
  152    158   
struct DescribeGlobalTableSettingsResponseDeserializer;
  153    159   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeGlobalTableSettingsResponseDeserializer {
  154         -
    fn deserialize_nonstreaming(
         160  +
    fn deserialize_nonstreaming_with_config(
  155    161   
        &self,
  156    162   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         163  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    166   
        #[allow(unused_mut)]
  162    167   
        let mut force_error = false;
  163    168   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_describe_global_table_settings::de_describe_global_table_settings_http_error(status, headers, body)
         169  +
        if !success && status != 200 || force_error {
         170  +
            let headers = response.headers();
         171  +
            let body = response.body().bytes().expect("body loaded");
         172  +
            #[allow(unused_mut)]
         173  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         174  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
            })?;
         176  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         177  +
            let generic = generic_builder.build();
         178  +
            let error_code = match generic.code() {
         179  +
                ::std::option::Option::Some(code) => code,
         180  +
                ::std::option::Option::None => {
         181  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         182  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         183  +
                            crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::unhandled(generic),
         184  +
                        ),
         185  +
                    ))
         186  +
                }
         187  +
            };
         188  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         189  +
            let protocol = _cfg
         190  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         191  +
                .expect("a SharedClientProtocol is required");
         192  +
            let err = match error_code {
         193  +
                "GlobalTableNotFoundException" => {
         194  +
                    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::GlobalTableNotFoundException({
         195  +
                        let mut tmp = match protocol
         196  +
                            .deserialize_response(response, crate::types::error::GlobalTableNotFoundException::SCHEMA, _cfg)
         197  +
                            .and_then(|mut deser| {
         198  +
                                crate::types::error::GlobalTableNotFoundException::deserialize_with_response(
         199  +
                                    &mut *deser,
         200  +
                                    response.headers(),
         201  +
                                    response.status().into(),
         202  +
                                    body,
         203  +
                                )
         204  +
                            }) {
         205  +
                            ::std::result::Result::Ok(val) => val,
         206  +
                            ::std::result::Result::Err(e) => {
         207  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                                ))
         210  +
                            }
         211  +
                        };
         212  +
                        tmp.meta = generic;
         213  +
                        if tmp.message.is_none() {
         214  +
                            tmp.message = _error_message;
         215  +
                        }
         216  +
                        tmp
         217  +
                    })
         218  +
                }
         219  +
                "InternalServerError" => crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InternalServerError({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                "InvalidEndpointException" => {
         244  +
                    crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::InvalidEndpointException({
         245  +
                        let mut tmp = match protocol
         246  +
                            .deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
         247  +
                            .and_then(|mut deser| {
         248  +
                                crate::types::error::InvalidEndpointException::deserialize_with_response(
         249  +
                                    &mut *deser,
         250  +
                                    response.headers(),
         251  +
                                    response.status().into(),
         252  +
                                    body,
         253  +
                                )
         254  +
                            }) {
         255  +
                            ::std::result::Result::Ok(val) => val,
         256  +
                            ::std::result::Result::Err(e) => {
         257  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         258  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         259  +
                                ))
         260  +
                            }
         261  +
                        };
         262  +
                        tmp.meta = generic;
         263  +
                        if tmp.message.is_none() {
         264  +
                            tmp.message = _error_message;
         265  +
                        }
         266  +
                        tmp
         267  +
                    })
         268  +
                }
         269  +
                _ => crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsError::generic(generic),
         270  +
            };
         271  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         272  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         273  +
            ))
  166    274   
        } else {
  167         -
            crate::protocol_serde::shape_describe_global_table_settings::de_describe_global_table_settings_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         275  +
            let protocol = _cfg
         276  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         277  +
                .expect("a SharedClientProtocol is required");
         278  +
            let mut deser = protocol
         279  +
                .deserialize_response(response, DescribeGlobalTableSettings::OUTPUT_SCHEMA, _cfg)
         280  +
                .map_err(|e| {
         281  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         282  +
                })?;
         283  +
            let body = response.body().bytes().expect("body loaded");
         284  +
            let output = crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput::deserialize_with_response(
         285  +
                &mut *deser,
         286  +
                response.headers(),
         287  +
                response.status().into(),
         288  +
                body,
         289  +
            )
         290  +
            .map_err(|e| {
         291  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         292  +
            })?;
         293  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         294  +
        }
  170    295   
    }
  171    296   
}
  172    297   
#[derive(Debug)]
  173    298   
struct DescribeGlobalTableSettingsRequestSerializer;
  174    299   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeGlobalTableSettingsRequestSerializer {
  175    300   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    301   
    fn serialize_input(
  177    302   
        &self,
  178    303   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    304   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    305   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    306   
        let input = input
  182    307   
            .downcast::<crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput>()
  183    308   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "DynamoDB_20120810.DescribeGlobalTableSettings",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_describe_global_table_settings::ser_describe_global_table_settings_input(&input)?,
  218         -
        );
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         309  +
        let protocol = _cfg
         310  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         311  +
            .expect("a SharedClientProtocol is required");
         312  +
        let mut request = protocol
         313  +
            .serialize_request(&input, DescribeGlobalTableSettings::INPUT_SCHEMA, "", _cfg)
         314  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         315  +
         316  +
        return ::std::result::Result::Ok(request);
  224    317   
    }
  225    318   
}
  226    319   
#[derive(Debug)]
  227    320   
struct DescribeGlobalTableSettingsEndpointParamsInterceptor;
  228    321   
  229    322   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeGlobalTableSettingsEndpointParamsInterceptor {
  230    323   
    fn name(&self) -> &'static str {
  231    324   
        "DescribeGlobalTableSettingsEndpointParamsInterceptor"
  232    325   
    }
  233    326