AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/rotate_key_on_demand/_rotate_key_on_demand_input.rs

@@ -15,15 +126,138 @@
   35     35   
    "com.amazonaws.kms.synthetic",
   36     36   
    "RotateKeyOnDemandInput",
   37     37   
);
   38     38   
static ROTATEKEYONDEMANDINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.kms.synthetic#RotateKeyOnDemandInput$KeyId",
   41     41   
        "com.amazonaws.kms.synthetic",
   42     42   
        "RotateKeyOnDemandInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "key_id",
          45  +
    "KeyId",
   46     46   
    0,
   47     47   
);
   48     48   
static ROTATEKEYONDEMANDINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    ROTATEKEYONDEMANDINPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&ROTATEKEYONDEMANDINPUT_MEMBER_KEY_ID],
   52     52   
);
   53     53   
impl RotateKeyOnDemandInput {
   54     54   
    /// The schema for this shape.
   55     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ROTATEKEYONDEMANDINPUT_SCHEMA;
   56     56   
}
   57     57   
impl ::aws_smithy_schema::serde::SerializableStruct for RotateKeyOnDemandInput {
   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.key_id {
   64     64   
            ser.write_string(&ROTATEKEYONDEMANDINPUT_MEMBER_KEY_ID, val)?;
   65     65   
        }
   66     66   
        Ok(())
   67     67   
    }
   68     68   
}
   69     69   
impl RotateKeyOnDemandInput {
   70     70   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   71         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   72         -
        deserializer: &mut D,
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   73     73   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   74     74   
        #[allow(unused_variables, unused_mut)]
   75     75   
        let mut builder = Self::builder();
   76     76   
        #[allow(
   77     77   
            unused_variables,
   78     78   
            unreachable_code,
   79     79   
            clippy::single_match,
   80     80   
            clippy::match_single_binding,
   81     81   
            clippy::diverging_sub_expression
   82     82   
        )]
   83         -
        deserializer.read_struct(&ROTATEKEYONDEMANDINPUT_SCHEMA, (), |_, member, deser| {
          83  +
        deserializer.read_struct(&ROTATEKEYONDEMANDINPUT_SCHEMA, &mut |member, deser| {
   84     84   
            match member.member_index() {
   85     85   
                Some(0) => {
   86     86   
                    builder.key_id = Some(deser.read_string(member)?);
   87     87   
                }
   88     88   
                _ => {}
   89     89   
            }
   90     90   
            Ok(())
   91     91   
        })?;
          92  +
        builder.key_id = builder.key_id.or(Some(String::new()));
   92     93   
        builder
   93     94   
            .build()
   94     95   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   95     96   
    }
   96     97   
}
          98  +
impl RotateKeyOnDemandInput {
          99  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         100  +
    pub fn deserialize_with_response(
         101  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         102  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         103  +
        _status: u16,
         104  +
        _body: &[u8],
         105  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         106  +
        Self::deserialize(deserializer)
         107  +
    }
         108  +
}
   97    109   
impl RotateKeyOnDemandInput {
   98    110   
    /// Creates a new builder-style object to manufacture [`RotateKeyOnDemandInput`](crate::operation::rotate_key_on_demand::RotateKeyOnDemandInput).
   99    111   
    pub fn builder() -> crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandInputBuilder {
  100    112   
        crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandInputBuilder::default()
  101    113   
    }
  102    114   
}
  103    115   
  104    116   
/// A builder for [`RotateKeyOnDemandInput`](crate::operation::rotate_key_on_demand::RotateKeyOnDemandInput).
  105    117   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  106    118   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/rotate_key_on_demand/_rotate_key_on_demand_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/schedule_key_deletion/_schedule_key_deletion_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/schedule_key_deletion/_schedule_key_deletion_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/sign/_sign_input.rs

@@ -106,106 +318,321 @@
  126    126   
        formatter.field("signing_algorithm", &self.signing_algorithm);
  127    127   
        formatter.field("dry_run", &self.dry_run);
  128    128   
        formatter.finish()
  129    129   
    }
  130    130   
}
  131    131   
static SIGNINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  132    132   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#SignInput", "com.amazonaws.kms.synthetic", "SignInput");
  133    133   
static SIGNINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#SignInput$KeyId", "com.amazonaws.kms.synthetic", "SignInput"),
  135    135   
    ::aws_smithy_schema::ShapeType::String,
  136         -
    "key_id",
         136  +
    "KeyId",
  137    137   
    0,
  138    138   
);
  139    139   
static SIGNINPUT_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  140    140   
    ::aws_smithy_schema::ShapeId::from_static(
  141    141   
        "com.amazonaws.kms.synthetic#SignInput$Message",
  142    142   
        "com.amazonaws.kms.synthetic",
  143    143   
        "SignInput",
  144    144   
    ),
  145    145   
    ::aws_smithy_schema::ShapeType::Blob,
  146         -
    "message",
         146  +
    "Message",
  147    147   
    1,
  148    148   
);
  149    149   
static SIGNINPUT_MEMBER_MESSAGE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  150    150   
    ::aws_smithy_schema::ShapeId::from_static(
  151    151   
        "com.amazonaws.kms.synthetic#SignInput$MessageType",
  152    152   
        "com.amazonaws.kms.synthetic",
  153    153   
        "SignInput",
  154    154   
    ),
  155    155   
    ::aws_smithy_schema::ShapeType::String,
  156         -
    "message_type",
         156  +
    "MessageType",
  157    157   
    2,
  158    158   
);
  159    159   
static SIGNINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  160    160   
    ::aws_smithy_schema::ShapeId::from_static(
  161    161   
        "com.amazonaws.kms.synthetic#SignInput$GrantTokens",
  162    162   
        "com.amazonaws.kms.synthetic",
  163    163   
        "SignInput",
  164    164   
    ),
  165    165   
    ::aws_smithy_schema::ShapeType::List,
  166         -
    "grant_tokens",
         166  +
    "GrantTokens",
  167    167   
    3,
  168    168   
);
  169    169   
static SIGNINPUT_MEMBER_SIGNING_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  170    170   
    ::aws_smithy_schema::ShapeId::from_static(
  171    171   
        "com.amazonaws.kms.synthetic#SignInput$SigningAlgorithm",
  172    172   
        "com.amazonaws.kms.synthetic",
  173    173   
        "SignInput",
  174    174   
    ),
  175    175   
    ::aws_smithy_schema::ShapeType::String,
  176         -
    "signing_algorithm",
         176  +
    "SigningAlgorithm",
  177    177   
    4,
  178    178   
);
  179    179   
static SIGNINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  180    180   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#SignInput$DryRun", "com.amazonaws.kms.synthetic", "SignInput"),
  181    181   
    ::aws_smithy_schema::ShapeType::Boolean,
  182         -
    "dry_run",
         182  +
    "DryRun",
  183    183   
    5,
  184    184   
);
  185    185   
static SIGNINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  186    186   
    SIGNINPUT_SCHEMA_ID,
  187    187   
    ::aws_smithy_schema::ShapeType::Structure,
  188    188   
    &[
  189    189   
        &SIGNINPUT_MEMBER_KEY_ID,
  190    190   
        &SIGNINPUT_MEMBER_MESSAGE,
  191    191   
        &SIGNINPUT_MEMBER_MESSAGE_TYPE,
  192    192   
        &SIGNINPUT_MEMBER_GRANT_TOKENS,
  193    193   
        &SIGNINPUT_MEMBER_SIGNING_ALGORITHM,
  194    194   
        &SIGNINPUT_MEMBER_DRY_RUN,
  195    195   
    ],
  196    196   
);
  197    197   
impl SignInput {
  198    198   
    /// The schema for this shape.
  199    199   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIGNINPUT_SCHEMA;
  200    200   
}
  201    201   
impl ::aws_smithy_schema::serde::SerializableStruct for SignInput {
  202    202   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  203    203   
    fn serialize_members(
  204    204   
        &self,
  205    205   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  206    206   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  207    207   
        if let Some(ref val) = self.key_id {
  208    208   
            ser.write_string(&SIGNINPUT_MEMBER_KEY_ID, val)?;
  209    209   
        }
  210    210   
        if let Some(ref val) = self.message {
  211    211   
            ser.write_blob(&SIGNINPUT_MEMBER_MESSAGE, val)?;
  212    212   
        }
  213    213   
        if let Some(ref val) = self.message_type {
  214    214   
            ser.write_string(&SIGNINPUT_MEMBER_MESSAGE_TYPE, val.as_str())?;
  215    215   
        }
  216    216   
        if let Some(ref val) = self.grant_tokens {
  217    217   
            ser.write_list(
  218    218   
                &SIGNINPUT_MEMBER_GRANT_TOKENS,
  219    219   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  220    220   
                    for item in val {
  221    221   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  222    222   
                    }
  223    223   
                    Ok(())
  224    224   
                },
  225    225   
            )?;
  226    226   
        }
  227    227   
        if let Some(ref val) = self.signing_algorithm {
  228    228   
            ser.write_string(&SIGNINPUT_MEMBER_SIGNING_ALGORITHM, val.as_str())?;
  229    229   
        }
  230    230   
        if let Some(ref val) = self.dry_run {
  231    231   
            ser.write_boolean(&SIGNINPUT_MEMBER_DRY_RUN, *val)?;
  232    232   
        }
  233    233   
        Ok(())
  234    234   
    }
  235    235   
}
  236    236   
impl SignInput {
  237    237   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  238         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  239         -
        deserializer: &mut D,
         238  +
    pub fn deserialize(
         239  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  240    240   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  241    241   
        #[allow(unused_variables, unused_mut)]
  242    242   
        let mut builder = Self::builder();
  243    243   
        #[allow(
  244    244   
            unused_variables,
  245    245   
            unreachable_code,
  246    246   
            clippy::single_match,
  247    247   
            clippy::match_single_binding,
  248    248   
            clippy::diverging_sub_expression
  249    249   
        )]
  250         -
        deserializer.read_struct(&SIGNINPUT_SCHEMA, (), |_, member, deser| {
         250  +
        deserializer.read_struct(&SIGNINPUT_SCHEMA, &mut |member, deser| {
  251    251   
            match member.member_index() {
  252    252   
                Some(0) => {
  253    253   
                    builder.key_id = Some(deser.read_string(member)?);
  254    254   
                }
  255    255   
                Some(1) => {
  256    256   
                    builder.message = Some(deser.read_blob(member)?);
  257    257   
                }
  258    258   
                Some(2) => {
  259    259   
                    builder.message_type = Some(crate::types::MessageType::from(deser.read_string(member)?.as_str()));
  260    260   
                }
  261    261   
                Some(3) => {
  262         -
                    builder.grant_tokens = Some({
  263         -
                        let container = if let Some(cap) = deser.container_size() {
  264         -
                            Vec::with_capacity(cap)
  265         -
                        } else {
  266         -
                            Vec::new()
  267         -
                        };
  268         -
                        deser.read_list(member, container, |mut list, deser| {
  269         -
                            list.push(deser.read_string(member)?);
  270         -
                            Ok(list)
  271         -
                        })?
  272         -
                    });
         262  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  273    263   
                }
  274    264   
                Some(4) => {
  275    265   
                    builder.signing_algorithm = Some(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  276    266   
                }
  277    267   
                Some(5) => {
  278    268   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  279    269   
                }
  280    270   
                _ => {}
  281    271   
            }
  282    272   
            Ok(())
  283    273   
        })?;
         274  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         275  +
        builder.message = builder.message.or(Some(::aws_smithy_types::Blob::new("")));
  284    276   
        builder
  285    277   
            .build()
  286    278   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  287    279   
    }
  288    280   
}
         281  +
impl SignInput {
         282  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         283  +
    pub fn deserialize_with_response(
         284  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         285  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         286  +
        _status: u16,
         287  +
        _body: &[u8],
         288  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         289  +
        Self::deserialize(deserializer)
         290  +
    }
         291  +
}
  289    292   
impl SignInput {
  290    293   
    /// Creates a new builder-style object to manufacture [`SignInput`](crate::operation::sign::SignInput).
  291    294   
    pub fn builder() -> crate::operation::sign::builders::SignInputBuilder {
  292    295   
        crate::operation::sign::builders::SignInputBuilder::default()
  293    296   
    }
  294    297   
}
  295    298   
  296    299   
/// A builder for [`SignInput`](crate::operation::sign::SignInput).
  297    300   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  298    301   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/sign/_sign_output.rs

@@ -21,21 +149,200 @@
   41     41   
}
   42     42   
static SIGNOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   43     43   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#SignOutput", "com.amazonaws.kms.synthetic", "SignOutput");
   44     44   
static SIGNOUTPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.kms.synthetic#SignOutput$KeyId",
   47     47   
        "com.amazonaws.kms.synthetic",
   48     48   
        "SignOutput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "key_id",
          51  +
    "KeyId",
   52     52   
    0,
   53     53   
);
   54     54   
static SIGNOUTPUT_MEMBER_SIGNATURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.kms.synthetic#SignOutput$Signature",
   57     57   
        "com.amazonaws.kms.synthetic",
   58     58   
        "SignOutput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::Blob,
   61         -
    "signature",
          61  +
    "Signature",
   62     62   
    1,
   63     63   
);
   64     64   
static SIGNOUTPUT_MEMBER_SIGNING_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.kms.synthetic#SignOutput$SigningAlgorithm",
   67     67   
        "com.amazonaws.kms.synthetic",
   68     68   
        "SignOutput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::String,
   71         -
    "signing_algorithm",
          71  +
    "SigningAlgorithm",
   72     72   
    2,
   73     73   
);
          74  +
static SIGNOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          76  +
    ::aws_smithy_schema::ShapeType::String,
          77  +
    "request_id",
          78  +
    3,
          79  +
)
          80  +
.with_http_header("x-amzn-requestid");
   74     81   
static SIGNOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   75     82   
    SIGNOUTPUT_SCHEMA_ID,
   76     83   
    ::aws_smithy_schema::ShapeType::Structure,
   77     84   
    &[
   78     85   
        &SIGNOUTPUT_MEMBER_KEY_ID,
   79     86   
        &SIGNOUTPUT_MEMBER_SIGNATURE,
   80     87   
        &SIGNOUTPUT_MEMBER_SIGNING_ALGORITHM,
          88  +
        &SIGNOUTPUT_MEMBER__REQUEST_ID,
   81     89   
    ],
   82     90   
);
   83     91   
impl SignOutput {
   84     92   
    /// The schema for this shape.
   85     93   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIGNOUTPUT_SCHEMA;
   86     94   
}
   87     95   
impl ::aws_smithy_schema::serde::SerializableStruct for SignOutput {
   88     96   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   89     97   
    fn serialize_members(
   90     98   
        &self,
   91     99   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   92    100   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   93    101   
        if let Some(ref val) = self.key_id {
   94    102   
            ser.write_string(&SIGNOUTPUT_MEMBER_KEY_ID, val)?;
   95    103   
        }
   96    104   
        if let Some(ref val) = self.signature {
   97    105   
            ser.write_blob(&SIGNOUTPUT_MEMBER_SIGNATURE, val)?;
   98    106   
        }
   99    107   
        if let Some(ref val) = self.signing_algorithm {
  100    108   
            ser.write_string(&SIGNOUTPUT_MEMBER_SIGNING_ALGORITHM, val.as_str())?;
  101    109   
        }
  102    110   
        Ok(())
  103    111   
    }
  104    112   
}
  105    113   
impl SignOutput {
  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,
  109    117   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  110    118   
        #[allow(unused_variables, unused_mut)]
  111    119   
        let mut builder = Self::builder();
  112    120   
        #[allow(
  113    121   
            unused_variables,
  114    122   
            unreachable_code,
  115    123   
            clippy::single_match,
  116    124   
            clippy::match_single_binding,
  117    125   
            clippy::diverging_sub_expression
  118    126   
        )]
  119         -
        deserializer.read_struct(&SIGNOUTPUT_SCHEMA, (), |_, member, deser| {
         127  +
        deserializer.read_struct(&SIGNOUTPUT_SCHEMA, &mut |member, deser| {
         128  +
            match member.member_index() {
         129  +
                Some(0) => {
         130  +
                    builder.key_id = Some(deser.read_string(member)?);
         131  +
                }
         132  +
                Some(1) => {
         133  +
                    builder.signature = Some(deser.read_blob(member)?);
         134  +
                }
         135  +
                Some(2) => {
         136  +
                    builder.signing_algorithm = Some(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         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 SignOutput {
         149  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         150  +
    /// Header-bound members are read directly from headers, avoiding runtime
         151  +
    /// member iteration overhead. Body members are read via the deserializer.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        _body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        #[allow(unused_variables, unused_mut)]
         159  +
        let mut builder = Self::builder();
         160  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         161  +
            builder._request_id = Some(val.to_string());
         162  +
        }
         163  +
        #[allow(
         164  +
            unused_variables,
         165  +
            unreachable_code,
         166  +
            clippy::single_match,
         167  +
            clippy::match_single_binding,
         168  +
            clippy::diverging_sub_expression
         169  +
        )]
         170  +
        deserializer.read_struct(&SIGNOUTPUT_SCHEMA, &mut |member, deser| {
  120    171   
            match member.member_index() {
  121    172   
                Some(0) => {
  122    173   
                    builder.key_id = Some(deser.read_string(member)?);
  123    174   
                }
  124    175   
                Some(1) => {
  125    176   
                    builder.signature = Some(deser.read_blob(member)?);
  126    177   
                }
  127    178   
                Some(2) => {
  128    179   
                    builder.signing_algorithm = Some(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  129    180   
                }

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/tag_resource.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 `TagResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TagResource;
    6      6   
impl TagResource {
    7      7   
    /// Creates a new `TagResource`
    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::tag_resource::TagResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::tag_resource::TagResourceOutput::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::tag_resource::TagResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::tag_resource::TagResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::tag_resource::TagResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,399 @@
  135    139   
                crate::operation::tag_resource::TagResourceError,
  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 TagResourceResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TagResourceResponseDeserializer {
  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_tag_resource::de_tag_resource_http_error(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::tag_resource::TagResourceError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "InvalidArnException" => crate::operation::tag_resource::TagResourceError::InvalidArnException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "KMSInternalException" => crate::operation::tag_resource::TagResourceError::KmsInternalException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "KMSInvalidStateException" => crate::operation::tag_resource::TagResourceError::KmsInvalidStateException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "LimitExceededException" => crate::operation::tag_resource::TagResourceError::LimitExceededException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "NotFoundException" => crate::operation::tag_resource::TagResourceError::NotFoundException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                "TagException" => crate::operation::tag_resource::TagResourceError::TagException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::TagException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::TagException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                _ => crate::operation::tag_resource::TagResourceError::generic(generic),
         325  +
            };
         326  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         327  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         328  +
            ))
  157    329   
        } else {
  158         -
            crate::protocol_serde::shape_tag_resource::de_tag_resource_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         330  +
            let protocol = _cfg
         331  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         332  +
                .expect("a SharedClientProtocol is required");
         333  +
            let mut deser = protocol.deserialize_response(response, TagResource::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         334  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         335  +
            })?;
         336  +
            let body = response.body().bytes().expect("body loaded");
         337  +
            let output = crate::operation::tag_resource::TagResourceOutput::deserialize_with_response(
         338  +
                &mut *deser,
         339  +
                response.headers(),
         340  +
                response.status().into(),
         341  +
                body,
         342  +
            )
         343  +
            .map_err(|e| {
         344  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         345  +
            })?;
         346  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         347  +
        }
  161    348   
    }
  162    349   
}
  163    350   
#[derive(Debug)]
  164    351   
struct TagResourceRequestSerializer;
  165    352   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TagResourceRequestSerializer {
  166    353   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    354   
    fn serialize_input(
  168    355   
        &self,
  169    356   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    357   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    358   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    359   
        let input = input
  173    360   
            .downcast::<crate::operation::tag_resource::TagResourceInput>()
  174    361   
            .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::tag_resource::TagResourceInput,
  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::tag_resource::TagResourceInput,
  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.TagResource",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_tag_resource::ser_tag_resource_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())
         362  +
        let protocol = _cfg
         363  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         364  +
            .expect("a SharedClientProtocol is required");
         365  +
        let mut request = protocol
         366  +
            .serialize_request(&input, TagResource::INPUT_SCHEMA, "", _cfg)
         367  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         368  +
         369  +
        return ::std::result::Result::Ok(request);
  213    370   
    }
  214    371   
}
  215    372   
#[derive(Debug)]
  216    373   
struct TagResourceEndpointParamsInterceptor;
  217    374   
  218    375   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TagResourceEndpointParamsInterceptor {
  219    376   
    fn name(&self) -> &'static str {
  220    377   
        "TagResourceEndpointParamsInterceptor"
  221    378   
    }
  222    379