AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_grants/_list_grants_input.rs

@@ -41,41 +222,234 @@
   61     61   
    "com.amazonaws.kms.synthetic",
   62     62   
    "ListGrantsInput",
   63     63   
);
   64     64   
static LISTGRANTSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.kms.synthetic#ListGrantsInput$Limit",
   67     67   
        "com.amazonaws.kms.synthetic",
   68     68   
        "ListGrantsInput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::Integer,
   71         -
    "limit",
          71  +
    "Limit",
   72     72   
    0,
   73     73   
);
   74     74   
static LISTGRANTSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.kms.synthetic#ListGrantsInput$Marker",
   77     77   
        "com.amazonaws.kms.synthetic",
   78     78   
        "ListGrantsInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "marker",
          81  +
    "Marker",
   82     82   
    1,
   83     83   
);
   84     84   
static LISTGRANTSINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.kms.synthetic#ListGrantsInput$KeyId",
   87     87   
        "com.amazonaws.kms.synthetic",
   88     88   
        "ListGrantsInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "key_id",
          91  +
    "KeyId",
   92     92   
    2,
   93     93   
);
   94     94   
static LISTGRANTSINPUT_MEMBER_GRANT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.kms.synthetic#ListGrantsInput$GrantId",
   97     97   
        "com.amazonaws.kms.synthetic",
   98     98   
        "ListGrantsInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101         -
    "grant_id",
         101  +
    "GrantId",
  102    102   
    3,
  103    103   
);
  104    104   
static LISTGRANTSINPUT_MEMBER_GRANTEE_PRINCIPAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "com.amazonaws.kms.synthetic#ListGrantsInput$GranteePrincipal",
  107    107   
        "com.amazonaws.kms.synthetic",
  108    108   
        "ListGrantsInput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::String,
  111         -
    "grantee_principal",
         111  +
    "GranteePrincipal",
  112    112   
    4,
  113    113   
);
  114    114   
static LISTGRANTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  115    115   
    LISTGRANTSINPUT_SCHEMA_ID,
  116    116   
    ::aws_smithy_schema::ShapeType::Structure,
  117    117   
    &[
  118    118   
        &LISTGRANTSINPUT_MEMBER_LIMIT,
  119    119   
        &LISTGRANTSINPUT_MEMBER_MARKER,
  120    120   
        &LISTGRANTSINPUT_MEMBER_KEY_ID,
  121    121   
        &LISTGRANTSINPUT_MEMBER_GRANT_ID,
  122    122   
        &LISTGRANTSINPUT_MEMBER_GRANTEE_PRINCIPAL,
  123    123   
    ],
  124    124   
);
  125    125   
impl ListGrantsInput {
  126    126   
    /// The schema for this shape.
  127    127   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTGRANTSINPUT_SCHEMA;
  128    128   
}
  129    129   
impl ::aws_smithy_schema::serde::SerializableStruct for ListGrantsInput {
  130    130   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  131    131   
    fn serialize_members(
  132    132   
        &self,
  133    133   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  134    134   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  135    135   
        if let Some(ref val) = self.limit {
  136    136   
            ser.write_integer(&LISTGRANTSINPUT_MEMBER_LIMIT, *val)?;
  137    137   
        }
  138    138   
        if let Some(ref val) = self.marker {
  139    139   
            ser.write_string(&LISTGRANTSINPUT_MEMBER_MARKER, val)?;
  140    140   
        }
  141    141   
        if let Some(ref val) = self.key_id {
  142    142   
            ser.write_string(&LISTGRANTSINPUT_MEMBER_KEY_ID, val)?;
  143    143   
        }
  144    144   
        if let Some(ref val) = self.grant_id {
  145    145   
            ser.write_string(&LISTGRANTSINPUT_MEMBER_GRANT_ID, val)?;
  146    146   
        }
  147    147   
        if let Some(ref val) = self.grantee_principal {
  148    148   
            ser.write_string(&LISTGRANTSINPUT_MEMBER_GRANTEE_PRINCIPAL, val)?;
  149    149   
        }
  150    150   
        Ok(())
  151    151   
    }
  152    152   
}
  153    153   
impl ListGrantsInput {
  154    154   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  155         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  156         -
        deserializer: &mut D,
         155  +
    pub fn deserialize(
         156  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  157    157   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  158    158   
        #[allow(unused_variables, unused_mut)]
  159    159   
        let mut builder = Self::builder();
  160    160   
        #[allow(
  161    161   
            unused_variables,
  162    162   
            unreachable_code,
  163    163   
            clippy::single_match,
  164    164   
            clippy::match_single_binding,
  165    165   
            clippy::diverging_sub_expression
  166    166   
        )]
  167         -
        deserializer.read_struct(&LISTGRANTSINPUT_SCHEMA, (), |_, member, deser| {
         167  +
        deserializer.read_struct(&LISTGRANTSINPUT_SCHEMA, &mut |member, deser| {
  168    168   
            match member.member_index() {
  169    169   
                Some(0) => {
  170    170   
                    builder.limit = Some(deser.read_integer(member)?);
  171    171   
                }
  172    172   
                Some(1) => {
  173    173   
                    builder.marker = Some(deser.read_string(member)?);
  174    174   
                }
  175    175   
                Some(2) => {
  176    176   
                    builder.key_id = Some(deser.read_string(member)?);
  177    177   
                }
  178    178   
                Some(3) => {
  179    179   
                    builder.grant_id = Some(deser.read_string(member)?);
  180    180   
                }
  181    181   
                Some(4) => {
  182    182   
                    builder.grantee_principal = Some(deser.read_string(member)?);
  183    183   
                }
  184    184   
                _ => {}
  185    185   
            }
  186    186   
            Ok(())
  187    187   
        })?;
         188  +
        builder.key_id = builder.key_id.or(Some(String::new()));
  188    189   
        builder
  189    190   
            .build()
  190    191   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  191    192   
    }
  192    193   
}
         194  +
impl ListGrantsInput {
         195  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         196  +
    pub fn deserialize_with_response(
         197  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         198  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         199  +
        _status: u16,
         200  +
        _body: &[u8],
         201  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         202  +
        Self::deserialize(deserializer)
         203  +
    }
         204  +
}
  193    205   
impl ListGrantsInput {
  194    206   
    /// Creates a new builder-style object to manufacture [`ListGrantsInput`](crate::operation::list_grants::ListGrantsInput).
  195    207   
    pub fn builder() -> crate::operation::list_grants::builders::ListGrantsInputBuilder {
  196    208   
        crate::operation::list_grants::builders::ListGrantsInputBuilder::default()
  197    209   
    }
  198    210   
}
  199    211   
  200    212   
/// A builder for [`ListGrantsInput`](crate::operation::list_grants::ListGrantsInput).
  201    213   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  202    214   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_grants/_list_grants_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_key_policies/_list_key_policies_input.rs

@@ -31,31 +178,190 @@
   51     51   
    "com.amazonaws.kms.synthetic",
   52     52   
    "ListKeyPoliciesInput",
   53     53   
);
   54     54   
static LISTKEYPOLICIESINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.kms.synthetic#ListKeyPoliciesInput$KeyId",
   57     57   
        "com.amazonaws.kms.synthetic",
   58     58   
        "ListKeyPoliciesInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::String,
   61         -
    "key_id",
          61  +
    "KeyId",
   62     62   
    0,
   63     63   
);
   64     64   
static LISTKEYPOLICIESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.kms.synthetic#ListKeyPoliciesInput$Limit",
   67     67   
        "com.amazonaws.kms.synthetic",
   68     68   
        "ListKeyPoliciesInput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::Integer,
   71         -
    "limit",
          71  +
    "Limit",
   72     72   
    1,
   73     73   
);
   74     74   
static LISTKEYPOLICIESINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.kms.synthetic#ListKeyPoliciesInput$Marker",
   77     77   
        "com.amazonaws.kms.synthetic",
   78     78   
        "ListKeyPoliciesInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "marker",
          81  +
    "Marker",
   82     82   
    2,
   83     83   
);
   84     84   
static LISTKEYPOLICIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   85     85   
    LISTKEYPOLICIESINPUT_SCHEMA_ID,
   86     86   
    ::aws_smithy_schema::ShapeType::Structure,
   87     87   
    &[
   88     88   
        &LISTKEYPOLICIESINPUT_MEMBER_KEY_ID,
   89     89   
        &LISTKEYPOLICIESINPUT_MEMBER_LIMIT,
   90     90   
        &LISTKEYPOLICIESINPUT_MEMBER_MARKER,
   91     91   
    ],
   92     92   
);
   93     93   
impl ListKeyPoliciesInput {
   94     94   
    /// The schema for this shape.
   95     95   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTKEYPOLICIESINPUT_SCHEMA;
   96     96   
}
   97     97   
impl ::aws_smithy_schema::serde::SerializableStruct for ListKeyPoliciesInput {
   98     98   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   99     99   
    fn serialize_members(
  100    100   
        &self,
  101    101   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  102    102   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  103    103   
        if let Some(ref val) = self.key_id {
  104    104   
            ser.write_string(&LISTKEYPOLICIESINPUT_MEMBER_KEY_ID, val)?;
  105    105   
        }
  106    106   
        if let Some(ref val) = self.limit {
  107    107   
            ser.write_integer(&LISTKEYPOLICIESINPUT_MEMBER_LIMIT, *val)?;
  108    108   
        }
  109    109   
        if let Some(ref val) = self.marker {
  110    110   
            ser.write_string(&LISTKEYPOLICIESINPUT_MEMBER_MARKER, val)?;
  111    111   
        }
  112    112   
        Ok(())
  113    113   
    }
  114    114   
}
  115    115   
impl ListKeyPoliciesInput {
  116    116   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  117         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  118         -
        deserializer: &mut D,
         117  +
    pub fn deserialize(
         118  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  119    119   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  120    120   
        #[allow(unused_variables, unused_mut)]
  121    121   
        let mut builder = Self::builder();
  122    122   
        #[allow(
  123    123   
            unused_variables,
  124    124   
            unreachable_code,
  125    125   
            clippy::single_match,
  126    126   
            clippy::match_single_binding,
  127    127   
            clippy::diverging_sub_expression
  128    128   
        )]
  129         -
        deserializer.read_struct(&LISTKEYPOLICIESINPUT_SCHEMA, (), |_, member, deser| {
         129  +
        deserializer.read_struct(&LISTKEYPOLICIESINPUT_SCHEMA, &mut |member, deser| {
  130    130   
            match member.member_index() {
  131    131   
                Some(0) => {
  132    132   
                    builder.key_id = Some(deser.read_string(member)?);
  133    133   
                }
  134    134   
                Some(1) => {
  135    135   
                    builder.limit = Some(deser.read_integer(member)?);
  136    136   
                }
  137    137   
                Some(2) => {
  138    138   
                    builder.marker = Some(deser.read_string(member)?);
  139    139   
                }
  140    140   
                _ => {}
  141    141   
            }
  142    142   
            Ok(())
  143    143   
        })?;
         144  +
        builder.key_id = builder.key_id.or(Some(String::new()));
  144    145   
        builder
  145    146   
            .build()
  146    147   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  147    148   
    }
  148    149   
}
         150  +
impl ListKeyPoliciesInput {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        _body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        Self::deserialize(deserializer)
         159  +
    }
         160  +
}
  149    161   
impl ListKeyPoliciesInput {
  150    162   
    /// Creates a new builder-style object to manufacture [`ListKeyPoliciesInput`](crate::operation::list_key_policies::ListKeyPoliciesInput).
  151    163   
    pub fn builder() -> crate::operation::list_key_policies::builders::ListKeyPoliciesInputBuilder {
  152    164   
        crate::operation::list_key_policies::builders::ListKeyPoliciesInputBuilder::default()
  153    165   
    }
  154    166   
}
  155    167   
  156    168   
/// A builder for [`ListKeyPoliciesInput`](crate::operation::list_key_policies::ListKeyPoliciesInput).
  157    169   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  158    170   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_key_policies/_list_key_policies_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_key_rotations/_list_key_rotations_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_key_rotations/_list_key_rotations_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_keys.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 `ListKeys`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListKeys;
    6      6   
impl ListKeys {
    7      7   
    /// Creates a new `ListKeys`
    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::list_keys::ListKeysInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_keys::ListKeysOutput::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::list_keys::ListKeysInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_keys::ListKeysOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_keys::ListKeysError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -111,115 +236,321 @@
  131    135   
                crate::operation::list_keys::ListKeysError,
  132    136   
            >::new());
  133    137   
  134    138   
        ::std::borrow::Cow::Owned(rcb)
  135    139   
    }
  136    140   
}
  137    141   
  138    142   
#[derive(Debug)]
  139    143   
struct ListKeysResponseDeserializer;
  140    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListKeysResponseDeserializer {
  141         -
    fn deserialize_nonstreaming(
         145  +
    fn deserialize_nonstreaming_with_config(
  142    146   
        &self,
  143    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         148  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  144    149   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    150   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146         -
        let headers = response.headers();
  147         -
        let body = response.body().bytes().expect("body loaded");
  148    151   
        #[allow(unused_mut)]
  149    152   
        let mut force_error = false;
  150    153   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  151         -
        let parse_result = if !success && status != 200 || force_error {
  152         -
            crate::protocol_serde::shape_list_keys::de_list_keys_http_error(status, headers, body)
  153         -
        } else {
  154         -
            crate::protocol_serde::shape_list_keys::de_list_keys_http_response(status, headers, body)
         154  +
        if !success && status != 200 || force_error {
         155  +
            let headers = response.headers();
         156  +
            let body = response.body().bytes().expect("body loaded");
         157  +
            #[allow(unused_mut)]
         158  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         159  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         160  +
            })?;
         161  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         162  +
            let generic = generic_builder.build();
         163  +
            let error_code = match generic.code() {
         164  +
                ::std::option::Option::Some(code) => code,
         165  +
                ::std::option::Option::None => {
         166  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         167  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_keys::ListKeysError::unhandled(generic)),
         168  +
                    ))
         169  +
                }
  155    170   
            };
  156         -
        crate::protocol_serde::type_erase_result(parse_result)
         171  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         172  +
            let protocol = _cfg
         173  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         174  +
                .expect("a SharedClientProtocol is required");
         175  +
            let err = match error_code {
         176  +
                "DependencyTimeoutException" => crate::operation::list_keys::ListKeysError::DependencyTimeoutException({
         177  +
                    let mut tmp = match protocol
         178  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         179  +
                        .and_then(|mut deser| {
         180  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         181  +
                                &mut *deser,
         182  +
                                response.headers(),
         183  +
                                response.status().into(),
         184  +
                                body,
         185  +
                            )
         186  +
                        }) {
         187  +
                        ::std::result::Result::Ok(val) => val,
         188  +
                        ::std::result::Result::Err(e) => {
         189  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         190  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         191  +
                            ))
         192  +
                        }
         193  +
                    };
         194  +
                    tmp.meta = generic;
         195  +
                    if tmp.message.is_none() {
         196  +
                        tmp.message = _error_message;
         197  +
                    }
         198  +
                    tmp
         199  +
                }),
         200  +
                "InvalidMarkerException" => crate::operation::list_keys::ListKeysError::InvalidMarkerException({
         201  +
                    let mut tmp = match protocol
         202  +
                        .deserialize_response(response, crate::types::error::InvalidMarkerException::SCHEMA, _cfg)
         203  +
                        .and_then(|mut deser| {
         204  +
                            crate::types::error::InvalidMarkerException::deserialize_with_response(
         205  +
                                &mut *deser,
         206  +
                                response.headers(),
         207  +
                                response.status().into(),
         208  +
                                body,
         209  +
                            )
         210  +
                        }) {
         211  +
                        ::std::result::Result::Ok(val) => val,
         212  +
                        ::std::result::Result::Err(e) => {
         213  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         214  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         215  +
                            ))
         216  +
                        }
         217  +
                    };
         218  +
                    tmp.meta = generic;
         219  +
                    if tmp.message.is_none() {
         220  +
                        tmp.message = _error_message;
         221  +
                    }
         222  +
                    tmp
         223  +
                }),
         224  +
                "KMSInternalException" => crate::operation::list_keys::ListKeysError::KmsInternalException({
         225  +
                    let mut tmp = match protocol
         226  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         227  +
                        .and_then(|mut deser| {
         228  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         229  +
                                &mut *deser,
         230  +
                                response.headers(),
         231  +
                                response.status().into(),
         232  +
                                body,
         233  +
                            )
         234  +
                        }) {
         235  +
                        ::std::result::Result::Ok(val) => val,
         236  +
                        ::std::result::Result::Err(e) => {
         237  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         238  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         239  +
                            ))
         240  +
                        }
         241  +
                    };
         242  +
                    tmp.meta = generic;
         243  +
                    if tmp.message.is_none() {
         244  +
                        tmp.message = _error_message;
         245  +
                    }
         246  +
                    tmp
         247  +
                }),
         248  +
                _ => crate::operation::list_keys::ListKeysError::generic(generic),
         249  +
            };
         250  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         251  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         252  +
            ))
         253  +
        } else {
         254  +
            let protocol = _cfg
         255  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         256  +
                .expect("a SharedClientProtocol is required");
         257  +
            let mut deser = protocol.deserialize_response(response, ListKeys::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         258  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         259  +
            })?;
         260  +
            let body = response.body().bytes().expect("body loaded");
         261  +
            let output = crate::operation::list_keys::ListKeysOutput::deserialize_with_response(
         262  +
                &mut *deser,
         263  +
                response.headers(),
         264  +
                response.status().into(),
         265  +
                body,
         266  +
            )
         267  +
            .map_err(|e| {
         268  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         269  +
            })?;
         270  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         271  +
        }
  157    272   
    }
  158    273   
}
  159    274   
#[derive(Debug)]
  160    275   
struct ListKeysRequestSerializer;
  161    276   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListKeysRequestSerializer {
  162    277   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    278   
    fn serialize_input(
  164    279   
        &self,
  165    280   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    281   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    282   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    283   
        let input = input.downcast::<crate::operation::list_keys::ListKeysInput>().expect("correct type");
  169         -
        let _header_serialization_settings = _cfg
  170         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171         -
            .cloned()
  172         -
            .unwrap_or_default();
  173         -
        let mut request_builder = {
  174         -
            #[allow(clippy::uninlined_format_args)]
  175         -
            fn uri_base(
  176         -
                _input: &crate::operation::list_keys::ListKeysInput,
  177         -
                output: &mut ::std::string::String,
  178         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  179         -
                use ::std::fmt::Write as _;
  180         -
                ::std::write!(output, "/").expect("formatting should succeed");
  181         -
                ::std::result::Result::Ok(())
  182         -
            }
  183         -
            #[allow(clippy::unnecessary_wraps)]
  184         -
            fn update_http_builder(
  185         -
                input: &crate::operation::list_keys::ListKeysInput,
  186         -
                builder: ::http_1x::request::Builder,
  187         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  188         -
                let mut uri = ::std::string::String::new();
  189         -
                uri_base(input, &mut uri)?;
  190         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191         -
            }
  192         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  193         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  194         -
            builder = _header_serialization_settings.set_default_header(
  195         -
                builder,
  196         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  197         -
                "TrentService.ListKeys",
  198         -
            );
  199         -
            builder
  200         -
        };
  201         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_keys::ser_list_keys_input(&input)?);
  202         -
        if let Some(content_length) = body.content_length() {
  203         -
            let content_length = content_length.to_string();
  204         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  205         -
        }
  206         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         284  +
        let protocol = _cfg
         285  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         286  +
            .expect("a SharedClientProtocol is required");
         287  +
        let mut request = protocol
         288  +
            .serialize_request(&input, ListKeys::INPUT_SCHEMA, "", _cfg)
         289  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         290  +
         291  +
        return ::std::result::Result::Ok(request);
  207    292   
    }
  208    293   
}
  209    294   
#[derive(Debug)]
  210    295   
struct ListKeysEndpointParamsInterceptor;
  211    296   
  212    297   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListKeysEndpointParamsInterceptor {
  213    298   
    fn name(&self) -> &'static str {
  214    299   
        "ListKeysEndpointParamsInterceptor"
  215    300   
    }
  216    301   

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_keys/_list_keys_input.rs

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