AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/enable_key/_enable_key_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/enable_key/_enable_key_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 EnableKeyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static ENABLEKEYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.kms.synthetic#EnableKeyOutput",
   10     10   
    "com.amazonaws.kms.synthetic",
   11     11   
    "EnableKeyOutput",
   12     12   
);
   13         -
static ENABLEKEYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(ENABLEKEYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static ENABLEKEYOUTPUT_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 ENABLEKEYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    ENABLEKEYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&ENABLEKEYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl EnableKeyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ENABLEKEYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for EnableKeyOutput {
   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 EnableKeyOutput {
   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(&ENABLEKEYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&ENABLEKEYOUTPUT_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 EnableKeyOutput {
          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 EnableKeyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl EnableKeyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`EnableKeyOutput`](crate::operation::enable_key::EnableKeyOutput).
   58     89   
    pub fn builder() -> crate::operation::enable_key::builders::EnableKeyOutputBuilder {
   59     90   
        crate::operation::enable_key::builders::EnableKeyOutputBuilder::default()
   60     91   
    }

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/enable_key_rotation/_enable_key_rotation_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/enable_key_rotation/_enable_key_rotation_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 EnableKeyRotationOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static ENABLEKEYROTATIONOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.kms.synthetic#EnableKeyRotationOutput",
   10     10   
    "com.amazonaws.kms.synthetic",
   11     11   
    "EnableKeyRotationOutput",
   12     12   
);
   13         -
static ENABLEKEYROTATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(ENABLEKEYROTATIONOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static ENABLEKEYROTATIONOUTPUT_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 ENABLEKEYROTATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    ENABLEKEYROTATIONOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&ENABLEKEYROTATIONOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl EnableKeyRotationOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ENABLEKEYROTATIONOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for EnableKeyRotationOutput {
   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 EnableKeyRotationOutput {
   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(&ENABLEKEYROTATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&ENABLEKEYROTATIONOUTPUT_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 EnableKeyRotationOutput {
          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 EnableKeyRotationOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl EnableKeyRotationOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`EnableKeyRotationOutput`](crate::operation::enable_key_rotation::EnableKeyRotationOutput).
   58     89   
    pub fn builder() -> crate::operation::enable_key_rotation::builders::EnableKeyRotationOutputBuilder {
   59     90   
        crate::operation::enable_key_rotation::builders::EnableKeyRotationOutputBuilder::default()
   60     91   
    }

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/encrypt/_encrypt_input.rs

@@ -80,80 +190,190 @@
  100    100   
}
  101    101   
static ENCRYPTINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  102    102   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#EncryptInput", "com.amazonaws.kms.synthetic", "EncryptInput");
  103    103   
static ENCRYPTINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.kms.synthetic#EncryptInput$KeyId",
  106    106   
        "com.amazonaws.kms.synthetic",
  107    107   
        "EncryptInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::String,
  110         -
    "key_id",
         110  +
    "KeyId",
  111    111   
    0,
  112    112   
);
  113    113   
static ENCRYPTINPUT_MEMBER_PLAINTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  114    114   
    ::aws_smithy_schema::ShapeId::from_static(
  115    115   
        "com.amazonaws.kms.synthetic#EncryptInput$Plaintext",
  116    116   
        "com.amazonaws.kms.synthetic",
  117    117   
        "EncryptInput",
  118    118   
    ),
  119    119   
    ::aws_smithy_schema::ShapeType::Blob,
  120         -
    "plaintext",
         120  +
    "Plaintext",
  121    121   
    1,
  122    122   
);
  123    123   
static ENCRYPTINPUT_MEMBER_ENCRYPTION_CONTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  124    124   
    ::aws_smithy_schema::ShapeId::from_static(
  125    125   
        "com.amazonaws.kms.synthetic#EncryptInput$EncryptionContext",
  126    126   
        "com.amazonaws.kms.synthetic",
  127    127   
        "EncryptInput",
  128    128   
    ),
  129    129   
    ::aws_smithy_schema::ShapeType::Map,
  130         -
    "encryption_context",
         130  +
    "EncryptionContext",
  131    131   
    2,
  132    132   
);
  133    133   
static ENCRYPTINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "com.amazonaws.kms.synthetic#EncryptInput$GrantTokens",
  136    136   
        "com.amazonaws.kms.synthetic",
  137    137   
        "EncryptInput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::List,
  140         -
    "grant_tokens",
         140  +
    "GrantTokens",
  141    141   
    3,
  142    142   
);
  143    143   
static ENCRYPTINPUT_MEMBER_ENCRYPTION_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  144    144   
    ::aws_smithy_schema::ShapeId::from_static(
  145    145   
        "com.amazonaws.kms.synthetic#EncryptInput$EncryptionAlgorithm",
  146    146   
        "com.amazonaws.kms.synthetic",
  147    147   
        "EncryptInput",
  148    148   
    ),
  149    149   
    ::aws_smithy_schema::ShapeType::String,
  150         -
    "encryption_algorithm",
         150  +
    "EncryptionAlgorithm",
  151    151   
    4,
  152    152   
);
  153    153   
static ENCRYPTINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  154    154   
    ::aws_smithy_schema::ShapeId::from_static(
  155    155   
        "com.amazonaws.kms.synthetic#EncryptInput$DryRun",
  156    156   
        "com.amazonaws.kms.synthetic",
  157    157   
        "EncryptInput",
  158    158   
    ),
  159    159   
    ::aws_smithy_schema::ShapeType::Boolean,
  160         -
    "dry_run",
         160  +
    "DryRun",
  161    161   
    5,
  162    162   
);
  163    163   
static ENCRYPTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  164    164   
    ENCRYPTINPUT_SCHEMA_ID,
  165    165   
    ::aws_smithy_schema::ShapeType::Structure,
  166    166   
    &[
  167    167   
        &ENCRYPTINPUT_MEMBER_KEY_ID,
  168    168   
        &ENCRYPTINPUT_MEMBER_PLAINTEXT,
  169    169   
        &ENCRYPTINPUT_MEMBER_ENCRYPTION_CONTEXT,
  170    170   
        &ENCRYPTINPUT_MEMBER_GRANT_TOKENS,
@@ -195,195 +315,308 @@
  215    215   
            ser.write_string(&ENCRYPTINPUT_MEMBER_ENCRYPTION_ALGORITHM, val.as_str())?;
  216    216   
        }
  217    217   
        if let Some(ref val) = self.dry_run {
  218    218   
            ser.write_boolean(&ENCRYPTINPUT_MEMBER_DRY_RUN, *val)?;
  219    219   
        }
  220    220   
        Ok(())
  221    221   
    }
  222    222   
}
  223    223   
impl EncryptInput {
  224    224   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  225         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  226         -
        deserializer: &mut D,
         225  +
    pub fn deserialize(
         226  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  227    227   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  228    228   
        #[allow(unused_variables, unused_mut)]
  229    229   
        let mut builder = Self::builder();
  230    230   
        #[allow(
  231    231   
            unused_variables,
  232    232   
            unreachable_code,
  233    233   
            clippy::single_match,
  234    234   
            clippy::match_single_binding,
  235    235   
            clippy::diverging_sub_expression
  236    236   
        )]
  237         -
        deserializer.read_struct(&ENCRYPTINPUT_SCHEMA, (), |_, member, deser| {
         237  +
        deserializer.read_struct(&ENCRYPTINPUT_SCHEMA, &mut |member, deser| {
  238    238   
            match member.member_index() {
  239    239   
                Some(0) => {
  240    240   
                    builder.key_id = Some(deser.read_string(member)?);
  241    241   
                }
  242    242   
                Some(1) => {
  243    243   
                    builder.plaintext = Some(deser.read_blob(member)?);
  244    244   
                }
  245    245   
                Some(2) => {
  246         -
                    builder.encryption_context = Some({
  247         -
                        let container = if let Some(cap) = deser.container_size() {
  248         -
                            std::collections::HashMap::with_capacity(cap)
  249         -
                        } else {
  250         -
                            std::collections::HashMap::new()
  251         -
                        };
  252         -
                        deser.read_map(member, container, |mut map, key, deser| {
  253         -
                            map.insert(key, deser.read_string(member)?);
  254         -
                            Ok(map)
  255         -
                        })?
  256         -
                    });
         246  +
                    builder.encryption_context = Some(deser.read_string_string_map(member)?);
  257    247   
                }
  258    248   
                Some(3) => {
  259         -
                    builder.grant_tokens = Some({
  260         -
                        let container = if let Some(cap) = deser.container_size() {
  261         -
                            Vec::with_capacity(cap)
  262         -
                        } else {
  263         -
                            Vec::new()
  264         -
                        };
  265         -
                        deser.read_list(member, container, |mut list, deser| {
  266         -
                            list.push(deser.read_string(member)?);
  267         -
                            Ok(list)
  268         -
                        })?
  269         -
                    });
         249  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  270    250   
                }
  271    251   
                Some(4) => {
  272    252   
                    builder.encryption_algorithm = Some(crate::types::EncryptionAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  273    253   
                }
  274    254   
                Some(5) => {
  275    255   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  276    256   
                }
  277    257   
                _ => {}
  278    258   
            }
  279    259   
            Ok(())
  280    260   
        })?;
         261  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         262  +
        builder.plaintext = builder.plaintext.or(Some(::aws_smithy_types::Blob::new("")));
  281    263   
        builder
  282    264   
            .build()
  283    265   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  284    266   
    }
  285    267   
}
         268  +
impl EncryptInput {
         269  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         270  +
    pub fn deserialize_with_response(
         271  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         272  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         273  +
        _status: u16,
         274  +
        _body: &[u8],
         275  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         276  +
        Self::deserialize(deserializer)
         277  +
    }
         278  +
}
  286    279   
impl EncryptInput {
  287    280   
    /// Creates a new builder-style object to manufacture [`EncryptInput`](crate::operation::encrypt::EncryptInput).
  288    281   
    pub fn builder() -> crate::operation::encrypt::builders::EncryptInputBuilder {
  289    282   
        crate::operation::encrypt::builders::EncryptInputBuilder::default()
  290    283   
    }
  291    284   
}
  292    285   
  293    286   
/// A builder for [`EncryptInput`](crate::operation::encrypt::EncryptInput).
  294    287   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  295    288   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/encrypt/_encrypt_output.rs

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

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