AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/update_key_description/_update_key_description_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/update_key_description/_update_key_description_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct UpdateKeyDescriptionOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.kms.synthetic#UpdateKeyDescriptionOutput",
   10     10   
    "com.amazonaws.kms.synthetic",
   11     11   
    "UpdateKeyDescriptionOutput",
   12     12   
);
   13         -
static UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static UPDATEKEYDESCRIPTIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&UPDATEKEYDESCRIPTIONOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl UpdateKeyDescriptionOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateKeyDescriptionOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl UpdateKeyDescriptionOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&UPDATEKEYDESCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl UpdateKeyDescriptionOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for UpdateKeyDescriptionOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl UpdateKeyDescriptionOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`UpdateKeyDescriptionOutput`](crate::operation::update_key_description::UpdateKeyDescriptionOutput).
   58     89   
    pub fn builder() -> crate::operation::update_key_description::builders::UpdateKeyDescriptionOutputBuilder {
   59     90   
        crate::operation::update_key_description::builders::UpdateKeyDescriptionOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/update_primary_region.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 `UpdatePrimaryRegion`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdatePrimaryRegion;
    6      6   
impl UpdatePrimaryRegion {
    7      7   
    /// Creates a new `UpdatePrimaryRegion`
    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::update_primary_region::UpdatePrimaryRegionInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_primary_region::UpdatePrimaryRegionOutput::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::update_primary_region::UpdatePrimaryRegionInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_primary_region::UpdatePrimaryRegionOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_primary_region::UpdatePrimaryRegionError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +247,408 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct UpdatePrimaryRegionResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdatePrimaryRegionResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  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_update_primary_region::de_update_primary_region_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_update_primary_region::de_update_primary_region_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::update_primary_region::UpdatePrimaryRegionError::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  +
                "DisabledException" => crate::operation::update_primary_region::UpdatePrimaryRegionError::DisabledException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::DisabledException::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::update_primary_region::UpdatePrimaryRegionError::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::update_primary_region::UpdatePrimaryRegionError::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::update_primary_region::UpdatePrimaryRegionError::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::update_primary_region::UpdatePrimaryRegionError::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  +
                "UnsupportedOperationException" => {
         306  +
                    crate::operation::update_primary_region::UpdatePrimaryRegionError::UnsupportedOperationException({
         307  +
                        let mut tmp = match protocol
         308  +
                            .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         309  +
                            .and_then(|mut deser| {
         310  +
                                crate::types::error::UnsupportedOperationException::deserialize_with_response(
         311  +
                                    &mut *deser,
         312  +
                                    response.headers(),
         313  +
                                    response.status().into(),
         314  +
                                    body,
         315  +
                                )
         316  +
                            }) {
         317  +
                            ::std::result::Result::Ok(val) => val,
         318  +
                            ::std::result::Result::Err(e) => {
         319  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         320  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         321  +
                                ))
         322  +
                            }
         323  +
                        };
         324  +
                        tmp.meta = generic;
         325  +
                        if tmp.message.is_none() {
         326  +
                            tmp.message = _error_message;
         327  +
                        }
         328  +
                        tmp
         329  +
                    })
         330  +
                }
         331  +
                _ => crate::operation::update_primary_region::UpdatePrimaryRegionError::generic(generic),
  162    332   
            };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         333  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         334  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         335  +
            ))
         336  +
        } else {
         337  +
            let protocol = _cfg
         338  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
                .expect("a SharedClientProtocol is required");
         340  +
            let mut deser = protocol
         341  +
                .deserialize_response(response, UpdatePrimaryRegion::OUTPUT_SCHEMA, _cfg)
         342  +
                .map_err(|e| {
         343  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         344  +
                })?;
         345  +
            let body = response.body().bytes().expect("body loaded");
         346  +
            let output = crate::operation::update_primary_region::UpdatePrimaryRegionOutput::deserialize_with_response(
         347  +
                &mut *deser,
         348  +
                response.headers(),
         349  +
                response.status().into(),
         350  +
                body,
         351  +
            )
         352  +
            .map_err(|e| {
         353  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         354  +
            })?;
         355  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         356  +
        }
  164    357   
    }
  165    358   
}
  166    359   
#[derive(Debug)]
  167    360   
struct UpdatePrimaryRegionRequestSerializer;
  168    361   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdatePrimaryRegionRequestSerializer {
  169    362   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    363   
    fn serialize_input(
  171    364   
        &self,
  172    365   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    366   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    367   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    368   
        let input = input
  176    369   
            .downcast::<crate::operation::update_primary_region::UpdatePrimaryRegionInput>()
  177    370   
            .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::update_primary_region::UpdatePrimaryRegionInput,
  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::update_primary_region::UpdatePrimaryRegionInput,
  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.UpdatePrimaryRegion",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_primary_region::ser_update_primary_region_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())
         371  +
        let protocol = _cfg
         372  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         373  +
            .expect("a SharedClientProtocol is required");
         374  +
        let mut request = protocol
         375  +
            .serialize_request(&input, UpdatePrimaryRegion::INPUT_SCHEMA, "", _cfg)
         376  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         377  +
         378  +
        return ::std::result::Result::Ok(request);
  218    379   
    }
  219    380   
}
  220    381   
#[derive(Debug)]
  221    382   
struct UpdatePrimaryRegionEndpointParamsInterceptor;
  222    383   
  223    384   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdatePrimaryRegionEndpointParamsInterceptor {
  224    385   
    fn name(&self) -> &'static str {
  225    386   
        "UpdatePrimaryRegionEndpointParamsInterceptor"
  226    387   
    }
  227    388   

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/update_primary_region/_update_primary_region_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/update_primary_region/_update_primary_region_output.rs

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct UpdatePrimaryRegionOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static UPDATEPRIMARYREGIONOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.kms.synthetic#UpdatePrimaryRegionOutput",
   10     10   
    "com.amazonaws.kms.synthetic",
   11     11   
    "UpdatePrimaryRegionOutput",
   12     12   
);
   13         -
static UPDATEPRIMARYREGIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(UPDATEPRIMARYREGIONOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static UPDATEPRIMARYREGIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static UPDATEPRIMARYREGIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    UPDATEPRIMARYREGIONOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&UPDATEPRIMARYREGIONOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl UpdatePrimaryRegionOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEPRIMARYREGIONOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdatePrimaryRegionOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl UpdatePrimaryRegionOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&UPDATEPRIMARYREGIONOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&UPDATEPRIMARYREGIONOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl UpdatePrimaryRegionOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for UpdatePrimaryRegionOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl UpdatePrimaryRegionOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`UpdatePrimaryRegionOutput`](crate::operation::update_primary_region::UpdatePrimaryRegionOutput).
   58     89   
    pub fn builder() -> crate::operation::update_primary_region::builders::UpdatePrimaryRegionOutputBuilder {
   59     90   
        crate::operation::update_primary_region::builders::UpdatePrimaryRegionOutputBuilder::default()
   60     91   
    }

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/verify/_verify_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/verify/_verify_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/verify_mac.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 `VerifyMac`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct VerifyMac;
    6      6   
impl VerifyMac {
    7      7   
    /// Creates a new `VerifyMac`
    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::verify_mac::VerifyMacInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::verify_mac::VerifyMacOutput::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::verify_mac::VerifyMacInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::verify_mac::VerifyMacOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::verify_mac::VerifyMacError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +240,469 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct VerifyMacResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for VerifyMacResponseDeserializer {
  145    149   
    fn deserialize_nonstreaming(
  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_verify_mac::de_verify_mac_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_verify_mac::de_verify_mac_http_response(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::verify_mac::VerifyMacError::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  +
                "DisabledException" => crate::operation::verify_mac::VerifyMacError::DisabledException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DisabledException::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  +
                "DryRunOperationException" => crate::operation::verify_mac::VerifyMacError::DryRunOperationException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DryRunOperationException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DryRunOperationException::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  +
                "InvalidGrantTokenException" => crate::operation::verify_mac::VerifyMacError::InvalidGrantTokenException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidGrantTokenException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidGrantTokenException::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  +
                        }
  159    245   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidKeyUsageException" => crate::operation::verify_mac::VerifyMacError::InvalidKeyUsageException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidKeyUsageException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidKeyUsageException::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  +
                "KeyUnavailableException" => crate::operation::verify_mac::VerifyMacError::KeyUnavailableException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::KeyUnavailableException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::KeyUnavailableException::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  +
                "KMSInternalException" => crate::operation::verify_mac::VerifyMacError::KmsInternalException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidMacException" => crate::operation::verify_mac::VerifyMacError::KmsInvalidMacException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::KmsInvalidMacException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::KmsInvalidMacException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                "KMSInvalidStateException" => crate::operation::verify_mac::VerifyMacError::KmsInvalidStateException({
         349  +
                    let mut tmp = match protocol
         350  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         351  +
                        .and_then(|mut deser| {
         352  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         353  +
                                &mut *deser,
         354  +
                                response.headers(),
         355  +
                                response.status().into(),
         356  +
                                body,
         357  +
                            )
         358  +
                        }) {
         359  +
                        ::std::result::Result::Ok(val) => val,
         360  +
                        ::std::result::Result::Err(e) => {
         361  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         362  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         363  +
                            ))
         364  +
                        }
         365  +
                    };
         366  +
                    tmp.meta = generic;
         367  +
                    if tmp.message.is_none() {
         368  +
                        tmp.message = _error_message;
         369  +
                    }
         370  +
                    tmp
         371  +
                }),
         372  +
                "NotFoundException" => crate::operation::verify_mac::VerifyMacError::NotFoundException({
         373  +
                    let mut tmp = match protocol
         374  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         375  +
                        .and_then(|mut deser| {
         376  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         377  +
                                &mut *deser,
         378  +
                                response.headers(),
         379  +
                                response.status().into(),
         380  +
                                body,
         381  +
                            )
         382  +
                        }) {
         383  +
                        ::std::result::Result::Ok(val) => val,
         384  +
                        ::std::result::Result::Err(e) => {
         385  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         386  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         387  +
                            ))
         388  +
                        }
         389  +
                    };
         390  +
                    tmp.meta = generic;
         391  +
                    if tmp.message.is_none() {
         392  +
                        tmp.message = _error_message;
         393  +
                    }
         394  +
                    tmp
         395  +
                }),
         396  +
                _ => crate::operation::verify_mac::VerifyMacError::generic(generic),
         397  +
            };
         398  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         399  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         400  +
            ))
         401  +
        } else {
         402  +
            let protocol = _cfg
         403  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         404  +
                .expect("a SharedClientProtocol is required");
         405  +
            let mut deser = protocol.deserialize_response(response, VerifyMac::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         406  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         407  +
            })?;
         408  +
            let body = response.body().bytes().expect("body loaded");
         409  +
            let output = crate::operation::verify_mac::VerifyMacOutput::deserialize_with_response(
         410  +
                &mut *deser,
         411  +
                response.headers(),
         412  +
                response.status().into(),
         413  +
                body,
         414  +
            )
         415  +
            .map_err(|e| {
         416  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         417  +
            })?;
         418  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         419  +
        }
  161    420   
    }
  162    421   
}
  163    422   
#[derive(Debug)]
  164    423   
struct VerifyMacRequestSerializer;
  165    424   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for VerifyMacRequestSerializer {
  166    425   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    426   
    fn serialize_input(
  168    427   
        &self,
  169    428   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    429   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    430   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    431   
        let input = input.downcast::<crate::operation::verify_mac::VerifyMacInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::verify_mac::VerifyMacInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                ::std::write!(output, "/").expect("formatting should succeed");
  185         -
                ::std::result::Result::Ok(())
  186         -
            }
  187         -
            #[allow(clippy::unnecessary_wraps)]
  188         -
            fn update_http_builder(
  189         -
                input: &crate::operation::verify_mac::VerifyMacInput,
  190         -
                builder: ::http_1x::request::Builder,
  191         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192         -
                let mut uri = ::std::string::String::new();
  193         -
                uri_base(input, &mut uri)?;
  194         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195         -
            }
  196         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  198         -
            builder = _header_serialization_settings.set_default_header(
  199         -
                builder,
  200         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  201         -
                "TrentService.VerifyMac",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_verify_mac::ser_verify_mac_input(&input)?);
  206         -
        if let Some(content_length) = body.content_length() {
  207         -
            let content_length = content_length.to_string();
  208         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  209         -
        }
  210         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         432  +
        let protocol = _cfg
         433  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         434  +
            .expect("a SharedClientProtocol is required");
         435  +
        let mut request = protocol
         436  +
            .serialize_request(&input, VerifyMac::INPUT_SCHEMA, "", _cfg)
         437  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         438  +
         439  +
        return ::std::result::Result::Ok(request);
  211    440   
    }
  212    441   
}
  213    442   
#[derive(Debug)]
  214    443   
struct VerifyMacEndpointParamsInterceptor;
  215    444   
  216    445   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for VerifyMacEndpointParamsInterceptor {
  217    446   
    fn name(&self) -> &'static str {
  218    447   
        "VerifyMacEndpointParamsInterceptor"
  219    448   
    }
  220    449