AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_key_policy/_get_key_policy_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_key_policy/_get_key_policy_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_key_rotation_status/_get_key_rotation_status_input.rs

@@ -15,15 +126,138 @@
   35     35   
    "com.amazonaws.kms.synthetic",
   36     36   
    "GetKeyRotationStatusInput",
   37     37   
);
   38     38   
static GETKEYROTATIONSTATUSINPUT_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#GetKeyRotationStatusInput$KeyId",
   41     41   
        "com.amazonaws.kms.synthetic",
   42     42   
        "GetKeyRotationStatusInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "key_id",
          45  +
    "KeyId",
   46     46   
    0,
   47     47   
);
   48     48   
static GETKEYROTATIONSTATUSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    GETKEYROTATIONSTATUSINPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&GETKEYROTATIONSTATUSINPUT_MEMBER_KEY_ID],
   52     52   
);
   53     53   
impl GetKeyRotationStatusInput {
   54     54   
    /// The schema for this shape.
   55     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETKEYROTATIONSTATUSINPUT_SCHEMA;
   56     56   
}
   57     57   
impl ::aws_smithy_schema::serde::SerializableStruct for GetKeyRotationStatusInput {
   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(&GETKEYROTATIONSTATUSINPUT_MEMBER_KEY_ID, val)?;
   65     65   
        }
   66     66   
        Ok(())
   67     67   
    }
   68     68   
}
   69     69   
impl GetKeyRotationStatusInput {
   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(&GETKEYROTATIONSTATUSINPUT_SCHEMA, (), |_, member, deser| {
          83  +
        deserializer.read_struct(&GETKEYROTATIONSTATUSINPUT_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 GetKeyRotationStatusInput {
          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 GetKeyRotationStatusInput {
   98    110   
    /// Creates a new builder-style object to manufacture [`GetKeyRotationStatusInput`](crate::operation::get_key_rotation_status::GetKeyRotationStatusInput).
   99    111   
    pub fn builder() -> crate::operation::get_key_rotation_status::builders::GetKeyRotationStatusInputBuilder {
  100    112   
        crate::operation::get_key_rotation_status::builders::GetKeyRotationStatusInputBuilder::default()
  101    113   
    }
  102    114   
}
  103    115   
  104    116   
/// A builder for [`GetKeyRotationStatusInput`](crate::operation::get_key_rotation_status::GetKeyRotationStatusInput).
  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/get_key_rotation_status/_get_key_rotation_status_output.rs

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_input.rs

@@ -65,65 +212,224 @@
   85     85   
    "com.amazonaws.kms.synthetic",
   86     86   
    "GetParametersForImportInput",
   87     87   
);
   88     88   
static GETPARAMETERSFORIMPORTINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.kms.synthetic#GetParametersForImportInput$KeyId",
   91     91   
        "com.amazonaws.kms.synthetic",
   92     92   
        "GetParametersForImportInput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::String,
   95         -
    "key_id",
          95  +
    "KeyId",
   96     96   
    0,
   97     97   
);
   98     98   
static GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "com.amazonaws.kms.synthetic#GetParametersForImportInput$WrappingAlgorithm",
  101    101   
        "com.amazonaws.kms.synthetic",
  102    102   
        "GetParametersForImportInput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::String,
  105         -
    "wrapping_algorithm",
         105  +
    "WrappingAlgorithm",
  106    106   
    1,
  107    107   
);
  108    108   
static GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_KEY_SPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.kms.synthetic#GetParametersForImportInput$WrappingKeySpec",
  111    111   
        "com.amazonaws.kms.synthetic",
  112    112   
        "GetParametersForImportInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "wrapping_key_spec",
         115  +
    "WrappingKeySpec",
  116    116   
    2,
  117    117   
);
  118    118   
static GETPARAMETERSFORIMPORTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  119    119   
    GETPARAMETERSFORIMPORTINPUT_SCHEMA_ID,
  120    120   
    ::aws_smithy_schema::ShapeType::Structure,
  121    121   
    &[
  122    122   
        &GETPARAMETERSFORIMPORTINPUT_MEMBER_KEY_ID,
  123    123   
        &GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_ALGORITHM,
  124    124   
        &GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_KEY_SPEC,
  125    125   
    ],
  126    126   
);
  127    127   
impl GetParametersForImportInput {
  128    128   
    /// The schema for this shape.
  129    129   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETPARAMETERSFORIMPORTINPUT_SCHEMA;
  130    130   
}
  131    131   
impl ::aws_smithy_schema::serde::SerializableStruct for GetParametersForImportInput {
  132    132   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  133    133   
    fn serialize_members(
  134    134   
        &self,
  135    135   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  136    136   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  137    137   
        if let Some(ref val) = self.key_id {
  138    138   
            ser.write_string(&GETPARAMETERSFORIMPORTINPUT_MEMBER_KEY_ID, val)?;
  139    139   
        }
  140    140   
        if let Some(ref val) = self.wrapping_algorithm {
  141    141   
            ser.write_string(&GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_ALGORITHM, val.as_str())?;
  142    142   
        }
  143    143   
        if let Some(ref val) = self.wrapping_key_spec {
  144    144   
            ser.write_string(&GETPARAMETERSFORIMPORTINPUT_MEMBER_WRAPPING_KEY_SPEC, val.as_str())?;
  145    145   
        }
  146    146   
        Ok(())
  147    147   
    }
  148    148   
}
  149    149   
impl GetParametersForImportInput {
  150    150   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  151         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  152         -
        deserializer: &mut D,
         151  +
    pub fn deserialize(
         152  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  153    153   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  154    154   
        #[allow(unused_variables, unused_mut)]
  155    155   
        let mut builder = Self::builder();
  156    156   
        #[allow(
  157    157   
            unused_variables,
  158    158   
            unreachable_code,
  159    159   
            clippy::single_match,
  160    160   
            clippy::match_single_binding,
  161    161   
            clippy::diverging_sub_expression
  162    162   
        )]
  163         -
        deserializer.read_struct(&GETPARAMETERSFORIMPORTINPUT_SCHEMA, (), |_, member, deser| {
         163  +
        deserializer.read_struct(&GETPARAMETERSFORIMPORTINPUT_SCHEMA, &mut |member, deser| {
  164    164   
            match member.member_index() {
  165    165   
                Some(0) => {
  166    166   
                    builder.key_id = Some(deser.read_string(member)?);
  167    167   
                }
  168    168   
                Some(1) => {
  169    169   
                    builder.wrapping_algorithm = Some(crate::types::AlgorithmSpec::from(deser.read_string(member)?.as_str()));
  170    170   
                }
  171    171   
                Some(2) => {
  172    172   
                    builder.wrapping_key_spec = Some(crate::types::WrappingKeySpec::from(deser.read_string(member)?.as_str()));
  173    173   
                }
  174    174   
                _ => {}
  175    175   
            }
  176    176   
            Ok(())
  177    177   
        })?;
         178  +
        builder.key_id = builder.key_id.or(Some(String::new()));
  178    179   
        builder
  179    180   
            .build()
  180    181   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  181    182   
    }
  182    183   
}
         184  +
impl GetParametersForImportInput {
         185  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         186  +
    pub fn deserialize_with_response(
         187  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         188  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         189  +
        _status: u16,
         190  +
        _body: &[u8],
         191  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         192  +
        Self::deserialize(deserializer)
         193  +
    }
         194  +
}
  183    195   
impl GetParametersForImportInput {
  184    196   
    /// Creates a new builder-style object to manufacture [`GetParametersForImportInput`](crate::operation::get_parameters_for_import::GetParametersForImportInput).
  185    197   
    pub fn builder() -> crate::operation::get_parameters_for_import::builders::GetParametersForImportInputBuilder {
  186    198   
        crate::operation::get_parameters_for_import::builders::GetParametersForImportInputBuilder::default()
  187    199   
    }
  188    200   
}
  189    201   
  190    202   
/// A builder for [`GetParametersForImportInput`](crate::operation::get_parameters_for_import::GetParametersForImportInput).
  191    203   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  192    204   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_parameters_for_import/_get_parameters_for_import_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/get_public_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 `GetPublicKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetPublicKey;
    6      6   
impl GetPublicKey {
    7      7   
    /// Creates a new `GetPublicKey`
    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::get_public_key::GetPublicKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_public_key::GetPublicKeyOutput::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::get_public_key::GetPublicKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_public_key::GetPublicKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_public_key::GetPublicKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,495 @@
  135    139   
                crate::operation::get_public_key::GetPublicKeyError,
  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 GetPublicKeyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetPublicKeyResponseDeserializer {
  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_get_public_key::de_get_public_key_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_get_public_key::de_get_public_key_http_response(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_public_key::GetPublicKeyError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "DependencyTimeoutException" => crate::operation::get_public_key::GetPublicKeyError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "DisabledException" => crate::operation::get_public_key::GetPublicKeyError::DisabledException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DisabledException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidArnException" => crate::operation::get_public_key::GetPublicKeyError::InvalidArnException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidGrantTokenException" => crate::operation::get_public_key::GetPublicKeyError::InvalidGrantTokenException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidGrantTokenException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidGrantTokenException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "InvalidKeyUsageException" => crate::operation::get_public_key::GetPublicKeyError::InvalidKeyUsageException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::InvalidKeyUsageException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::InvalidKeyUsageException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
  159    293   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                "KeyUnavailableException" => crate::operation::get_public_key::GetPublicKeyError::KeyUnavailableException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::KeyUnavailableException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::KeyUnavailableException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                "KMSInternalException" => crate::operation::get_public_key::GetPublicKeyError::KmsInternalException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                "KMSInvalidStateException" => crate::operation::get_public_key::GetPublicKeyError::KmsInvalidStateException({
         349  +
                    let mut tmp = match protocol
         350  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         351  +
                        .and_then(|mut deser| {
         352  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         353  +
                                &mut *deser,
         354  +
                                response.headers(),
         355  +
                                response.status().into(),
         356  +
                                body,
         357  +
                            )
         358  +
                        }) {
         359  +
                        ::std::result::Result::Ok(val) => val,
         360  +
                        ::std::result::Result::Err(e) => {
         361  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         362  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         363  +
                            ))
         364  +
                        }
         365  +
                    };
         366  +
                    tmp.meta = generic;
         367  +
                    if tmp.message.is_none() {
         368  +
                        tmp.message = _error_message;
         369  +
                    }
         370  +
                    tmp
         371  +
                }),
         372  +
                "NotFoundException" => crate::operation::get_public_key::GetPublicKeyError::NotFoundException({
         373  +
                    let mut tmp = match protocol
         374  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         375  +
                        .and_then(|mut deser| {
         376  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         377  +
                                &mut *deser,
         378  +
                                response.headers(),
         379  +
                                response.status().into(),
         380  +
                                body,
         381  +
                            )
         382  +
                        }) {
         383  +
                        ::std::result::Result::Ok(val) => val,
         384  +
                        ::std::result::Result::Err(e) => {
         385  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         386  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         387  +
                            ))
         388  +
                        }
         389  +
                    };
         390  +
                    tmp.meta = generic;
         391  +
                    if tmp.message.is_none() {
         392  +
                        tmp.message = _error_message;
         393  +
                    }
         394  +
                    tmp
         395  +
                }),
         396  +
                "UnsupportedOperationException" => crate::operation::get_public_key::GetPublicKeyError::UnsupportedOperationException({
         397  +
                    let mut tmp = match protocol
         398  +
                        .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         399  +
                        .and_then(|mut deser| {
         400  +
                            crate::types::error::UnsupportedOperationException::deserialize_with_response(
         401  +
                                &mut *deser,
         402  +
                                response.headers(),
         403  +
                                response.status().into(),
         404  +
                                body,
         405  +
                            )
         406  +
                        }) {
         407  +
                        ::std::result::Result::Ok(val) => val,
         408  +
                        ::std::result::Result::Err(e) => {
         409  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         410  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         411  +
                            ))
         412  +
                        }
         413  +
                    };
         414  +
                    tmp.meta = generic;
         415  +
                    if tmp.message.is_none() {
         416  +
                        tmp.message = _error_message;
         417  +
                    }
         418  +
                    tmp
         419  +
                }),
         420  +
                _ => crate::operation::get_public_key::GetPublicKeyError::generic(generic),
         421  +
            };
         422  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         423  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         424  +
            ))
         425  +
        } else {
         426  +
            let protocol = _cfg
         427  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         428  +
                .expect("a SharedClientProtocol is required");
         429  +
            let mut deser = protocol.deserialize_response(response, GetPublicKey::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         430  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         431  +
            })?;
         432  +
            let body = response.body().bytes().expect("body loaded");
         433  +
            let output = crate::operation::get_public_key::GetPublicKeyOutput::deserialize_with_response(
         434  +
                &mut *deser,
         435  +
                response.headers(),
         436  +
                response.status().into(),
         437  +
                body,
         438  +
            )
         439  +
            .map_err(|e| {
         440  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         441  +
            })?;
         442  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         443  +
        }
  161    444   
    }
  162    445   
}
  163    446   
#[derive(Debug)]
  164    447   
struct GetPublicKeyRequestSerializer;
  165    448   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetPublicKeyRequestSerializer {
  166    449   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    450   
    fn serialize_input(
  168    451   
        &self,
  169    452   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    453   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    454   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    455   
        let input = input
  173    456   
            .downcast::<crate::operation::get_public_key::GetPublicKeyInput>()
  174    457   
            .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::get_public_key::GetPublicKeyInput,
  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::get_public_key::GetPublicKeyInput,
  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.GetPublicKey",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_get_public_key::ser_get_public_key_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())
         458  +
        let protocol = _cfg
         459  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         460  +
            .expect("a SharedClientProtocol is required");
         461  +
        let mut request = protocol
         462  +
            .serialize_request(&input, GetPublicKey::INPUT_SCHEMA, "", _cfg)
         463  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         464  +
         465  +
        return ::std::result::Result::Ok(request);
  213    466   
    }
  214    467   
}
  215    468   
#[derive(Debug)]
  216    469   
struct GetPublicKeyEndpointParamsInterceptor;
  217    470   
  218    471   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetPublicKeyEndpointParamsInterceptor {
  219    472   
    fn name(&self) -> &'static str {
  220    473   
        "GetPublicKeyEndpointParamsInterceptor"
  221    474   
    }
  222    475