AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/disable_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 `DisableKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisableKey;
    6      6   
impl DisableKey {
    7      7   
    /// Creates a new `DisableKey`
    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::disable_key::DisableKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::disable_key::DisableKeyOutput::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::disable_key::DisableKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::disable_key::DisableKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::disable_key::DisableKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,373 @@
  135    139   
                crate::operation::disable_key::DisableKeyError,
  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 DisableKeyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisableKeyResponseDeserializer {
  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_disable_key::de_disable_key_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_disable_key::de_disable_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::disable_key::DisableKeyError::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::disable_key::DisableKeyError::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  +
                        }
  159    197   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "InvalidArnException" => crate::operation::disable_key::DisableKeyError::InvalidArnException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InvalidArnException::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  +
                "KMSInternalException" => crate::operation::disable_key::DisableKeyError::KmsInternalException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidStateException" => crate::operation::disable_key::DisableKeyError::KmsInvalidStateException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "NotFoundException" => crate::operation::disable_key::DisableKeyError::NotFoundException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                _ => crate::operation::disable_key::DisableKeyError::generic(generic),
         301  +
            };
         302  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         303  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         304  +
            ))
         305  +
        } else {
         306  +
            let protocol = _cfg
         307  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         308  +
                .expect("a SharedClientProtocol is required");
         309  +
            let mut deser = protocol.deserialize_response(response, DisableKey::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         310  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         311  +
            })?;
         312  +
            let body = response.body().bytes().expect("body loaded");
         313  +
            let output = crate::operation::disable_key::DisableKeyOutput::deserialize_with_response(
         314  +
                &mut *deser,
         315  +
                response.headers(),
         316  +
                response.status().into(),
         317  +
                body,
         318  +
            )
         319  +
            .map_err(|e| {
         320  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         321  +
            })?;
         322  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         323  +
        }
  161    324   
    }
  162    325   
}
  163    326   
#[derive(Debug)]
  164    327   
struct DisableKeyRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisableKeyRequestSerializer {
  166    329   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    330   
    fn serialize_input(
  168    331   
        &self,
  169    332   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    333   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    334   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    335   
        let input = input.downcast::<crate::operation::disable_key::DisableKeyInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::disable_key::DisableKeyInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                ::std::write!(output, "/").expect("formatting should succeed");
  185         -
                ::std::result::Result::Ok(())
  186         -
            }
  187         -
            #[allow(clippy::unnecessary_wraps)]
  188         -
            fn update_http_builder(
  189         -
                input: &crate::operation::disable_key::DisableKeyInput,
  190         -
                builder: ::http_1x::request::Builder,
  191         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192         -
                let mut uri = ::std::string::String::new();
  193         -
                uri_base(input, &mut uri)?;
  194         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195         -
            }
  196         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  198         -
            builder = _header_serialization_settings.set_default_header(
  199         -
                builder,
  200         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  201         -
                "TrentService.DisableKey",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_disable_key::ser_disable_key_input(&input)?);
  206         -
        if let Some(content_length) = body.content_length() {
  207         -
            let content_length = content_length.to_string();
  208         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  209         -
        }
  210         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         336  +
        let protocol = _cfg
         337  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         338  +
            .expect("a SharedClientProtocol is required");
         339  +
        let mut request = protocol
         340  +
            .serialize_request(&input, DisableKey::INPUT_SCHEMA, "", _cfg)
         341  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         342  +
         343  +
        return ::std::result::Result::Ok(request);
  211    344   
    }
  212    345   
}
  213    346   
#[derive(Debug)]
  214    347   
struct DisableKeyEndpointParamsInterceptor;
  215    348   
  216    349   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisableKeyEndpointParamsInterceptor {
  217    350   
    fn name(&self) -> &'static str {
  218    351   
        "DisableKeyEndpointParamsInterceptor"
  219    352   
    }
  220    353   

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/disable_key/_disable_key_input.rs

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DisableKeyRotation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisableKeyRotation;
    6      6   
impl DisableKeyRotation {
    7      7   
    /// Creates a new `DisableKeyRotation`
    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::disable_key_rotation::DisableKeyRotationInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::disable_key_rotation::DisableKeyRotationOutput::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::disable_key_rotation::DisableKeyRotationInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::disable_key_rotation::DisableKeyRotationOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::disable_key_rotation::DisableKeyRotationError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +243,427 @@
  135    139   
                crate::operation::disable_key_rotation::DisableKeyRotationError,
  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 DisableKeyRotationResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisableKeyRotationResponseDeserializer {
  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_disable_key_rotation::de_disable_key_rotation_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_disable_key_rotation::de_disable_key_rotation_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(
         172  +
                            crate::operation::disable_key_rotation::DisableKeyRotationError::unhandled(generic),
         173  +
                        ),
         174  +
                    ))
         175  +
                }
         176  +
            };
         177  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         178  +
            let protocol = _cfg
         179  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         180  +
                .expect("a SharedClientProtocol is required");
         181  +
            let err = match error_code {
         182  +
                "DependencyTimeoutException" => crate::operation::disable_key_rotation::DisableKeyRotationError::DependencyTimeoutException({
         183  +
                    let mut tmp = match protocol
         184  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         185  +
                        .and_then(|mut deser| {
         186  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         187  +
                                &mut *deser,
         188  +
                                response.headers(),
         189  +
                                response.status().into(),
         190  +
                                body,
         191  +
                            )
         192  +
                        }) {
         193  +
                        ::std::result::Result::Ok(val) => val,
         194  +
                        ::std::result::Result::Err(e) => {
         195  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         196  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         197  +
                            ))
         198  +
                        }
  159    199   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         200  +
                    tmp.meta = generic;
         201  +
                    if tmp.message.is_none() {
         202  +
                        tmp.message = _error_message;
         203  +
                    }
         204  +
                    tmp
         205  +
                }),
         206  +
                "DisabledException" => crate::operation::disable_key_rotation::DisableKeyRotationError::DisabledException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::DisabledException::deserialize_with_response(
         211  +
                                &mut *deser,
         212  +
                                response.headers(),
         213  +
                                response.status().into(),
         214  +
                                body,
         215  +
                            )
         216  +
                        }) {
         217  +
                        ::std::result::Result::Ok(val) => val,
         218  +
                        ::std::result::Result::Err(e) => {
         219  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                            ))
         222  +
                        }
         223  +
                    };
         224  +
                    tmp.meta = generic;
         225  +
                    if tmp.message.is_none() {
         226  +
                        tmp.message = _error_message;
         227  +
                    }
         228  +
                    tmp
         229  +
                }),
         230  +
                "InvalidArnException" => crate::operation::disable_key_rotation::DisableKeyRotationError::InvalidArnException({
         231  +
                    let mut tmp = match protocol
         232  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         233  +
                        .and_then(|mut deser| {
         234  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         235  +
                                &mut *deser,
         236  +
                                response.headers(),
         237  +
                                response.status().into(),
         238  +
                                body,
         239  +
                            )
         240  +
                        }) {
         241  +
                        ::std::result::Result::Ok(val) => val,
         242  +
                        ::std::result::Result::Err(e) => {
         243  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         244  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         245  +
                            ))
         246  +
                        }
         247  +
                    };
         248  +
                    tmp.meta = generic;
         249  +
                    if tmp.message.is_none() {
         250  +
                        tmp.message = _error_message;
         251  +
                    }
         252  +
                    tmp
         253  +
                }),
         254  +
                "KMSInternalException" => crate::operation::disable_key_rotation::DisableKeyRotationError::KmsInternalException({
         255  +
                    let mut tmp = match protocol
         256  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         257  +
                        .and_then(|mut deser| {
         258  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         259  +
                                &mut *deser,
         260  +
                                response.headers(),
         261  +
                                response.status().into(),
         262  +
                                body,
         263  +
                            )
         264  +
                        }) {
         265  +
                        ::std::result::Result::Ok(val) => val,
         266  +
                        ::std::result::Result::Err(e) => {
         267  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         268  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         269  +
                            ))
         270  +
                        }
         271  +
                    };
         272  +
                    tmp.meta = generic;
         273  +
                    if tmp.message.is_none() {
         274  +
                        tmp.message = _error_message;
         275  +
                    }
         276  +
                    tmp
         277  +
                }),
         278  +
                "KMSInvalidStateException" => crate::operation::disable_key_rotation::DisableKeyRotationError::KmsInvalidStateException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         283  +
                                &mut *deser,
         284  +
                                response.headers(),
         285  +
                                response.status().into(),
         286  +
                                body,
         287  +
                            )
         288  +
                        }) {
         289  +
                        ::std::result::Result::Ok(val) => val,
         290  +
                        ::std::result::Result::Err(e) => {
         291  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                            ))
         294  +
                        }
         295  +
                    };
         296  +
                    tmp.meta = generic;
         297  +
                    if tmp.message.is_none() {
         298  +
                        tmp.message = _error_message;
         299  +
                    }
         300  +
                    tmp
         301  +
                }),
         302  +
                "NotFoundException" => crate::operation::disable_key_rotation::DisableKeyRotationError::NotFoundException({
         303  +
                    let mut tmp = match protocol
         304  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         305  +
                        .and_then(|mut deser| {
         306  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         307  +
                                &mut *deser,
         308  +
                                response.headers(),
         309  +
                                response.status().into(),
         310  +
                                body,
         311  +
                            )
         312  +
                        }) {
         313  +
                        ::std::result::Result::Ok(val) => val,
         314  +
                        ::std::result::Result::Err(e) => {
         315  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         316  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         317  +
                            ))
         318  +
                        }
         319  +
                    };
         320  +
                    tmp.meta = generic;
         321  +
                    if tmp.message.is_none() {
         322  +
                        tmp.message = _error_message;
         323  +
                    }
         324  +
                    tmp
         325  +
                }),
         326  +
                "UnsupportedOperationException" => crate::operation::disable_key_rotation::DisableKeyRotationError::UnsupportedOperationException({
         327  +
                    let mut tmp = match protocol
         328  +
                        .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         329  +
                        .and_then(|mut deser| {
         330  +
                            crate::types::error::UnsupportedOperationException::deserialize_with_response(
         331  +
                                &mut *deser,
         332  +
                                response.headers(),
         333  +
                                response.status().into(),
         334  +
                                body,
         335  +
                            )
         336  +
                        }) {
         337  +
                        ::std::result::Result::Ok(val) => val,
         338  +
                        ::std::result::Result::Err(e) => {
         339  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         340  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         341  +
                            ))
         342  +
                        }
         343  +
                    };
         344  +
                    tmp.meta = generic;
         345  +
                    if tmp.message.is_none() {
         346  +
                        tmp.message = _error_message;
         347  +
                    }
         348  +
                    tmp
         349  +
                }),
         350  +
                _ => crate::operation::disable_key_rotation::DisableKeyRotationError::generic(generic),
         351  +
            };
         352  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         353  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         354  +
            ))
         355  +
        } else {
         356  +
            let protocol = _cfg
         357  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         358  +
                .expect("a SharedClientProtocol is required");
         359  +
            let mut deser = protocol
         360  +
                .deserialize_response(response, DisableKeyRotation::OUTPUT_SCHEMA, _cfg)
         361  +
                .map_err(|e| {
         362  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         363  +
                })?;
         364  +
            let body = response.body().bytes().expect("body loaded");
         365  +
            let output = crate::operation::disable_key_rotation::DisableKeyRotationOutput::deserialize_with_response(
         366  +
                &mut *deser,
         367  +
                response.headers(),
         368  +
                response.status().into(),
         369  +
                body,
         370  +
            )
         371  +
            .map_err(|e| {
         372  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         373  +
            })?;
         374  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         375  +
        }
  161    376   
    }
  162    377   
}
  163    378   
#[derive(Debug)]
  164    379   
struct DisableKeyRotationRequestSerializer;
  165    380   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisableKeyRotationRequestSerializer {
  166    381   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    382   
    fn serialize_input(
  168    383   
        &self,
  169    384   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    385   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    386   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    387   
        let input = input
  173    388   
            .downcast::<crate::operation::disable_key_rotation::DisableKeyRotationInput>()
  174    389   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::disable_key_rotation::DisableKeyRotationInput,
  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::disable_key_rotation::DisableKeyRotationInput,
  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.DisableKeyRotation",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body =
  208         -
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_disable_key_rotation::ser_disable_key_rotation_input(&input)?);
  209         -
        if let Some(content_length) = body.content_length() {
  210         -
            let content_length = content_length.to_string();
  211         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  212         -
        }
  213         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         390  +
        let protocol = _cfg
         391  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         392  +
            .expect("a SharedClientProtocol is required");
         393  +
        let mut request = protocol
         394  +
            .serialize_request(&input, DisableKeyRotation::INPUT_SCHEMA, "", _cfg)
         395  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         396  +
         397  +
        return ::std::result::Result::Ok(request);
  214    398   
    }
  215    399   
}
  216    400   
#[derive(Debug)]
  217    401   
struct DisableKeyRotationEndpointParamsInterceptor;
  218    402   
  219    403   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisableKeyRotationEndpointParamsInterceptor {
  220    404   
    fn name(&self) -> &'static str {
  221    405   
        "DisableKeyRotationEndpointParamsInterceptor"
  222    406   
    }
  223    407   

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/disable_key_rotation/_disable_key_rotation_input.rs

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

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

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DisconnectCustomKeyStore`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DisconnectCustomKeyStore;
    6      6   
impl DisconnectCustomKeyStore {
    7      7   
    /// Creates a new `DisconnectCustomKeyStore`
    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 =
          13  +
        crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +247,340 @@
  138    144   
                crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct DisconnectCustomKeyStoreResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DisconnectCustomKeyStoreResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        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    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::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_disconnect_custom_key_store::de_disconnect_custom_key_store_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_disconnect_custom_key_store::de_disconnect_custom_key_store_http_response(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "CustomKeyStoreInvalidStateException" => {
         188  +
                    crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::CustomKeyStoreInvalidStateException({
         189  +
                        let mut tmp = match protocol
         190  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreInvalidStateException::SCHEMA, _cfg)
         191  +
                            .and_then(|mut deser| {
         192  +
                                crate::types::error::CustomKeyStoreInvalidStateException::deserialize_with_response(
         193  +
                                    &mut *deser,
         194  +
                                    response.headers(),
         195  +
                                    response.status().into(),
         196  +
                                    body,
         197  +
                                )
         198  +
                            }) {
         199  +
                            ::std::result::Result::Ok(val) => val,
         200  +
                            ::std::result::Result::Err(e) => {
         201  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                                ))
         204  +
                            }
         205  +
                        };
         206  +
                        tmp.meta = generic;
         207  +
                        if tmp.message.is_none() {
         208  +
                            tmp.message = _error_message;
         209  +
                        }
         210  +
                        tmp
         211  +
                    })
         212  +
                }
         213  +
                "CustomKeyStoreNotFoundException" => {
         214  +
                    crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::CustomKeyStoreNotFoundException({
         215  +
                        let mut tmp = match protocol
         216  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreNotFoundException::SCHEMA, _cfg)
         217  +
                            .and_then(|mut deser| {
         218  +
                                crate::types::error::CustomKeyStoreNotFoundException::deserialize_with_response(
         219  +
                                    &mut *deser,
         220  +
                                    response.headers(),
         221  +
                                    response.status().into(),
         222  +
                                    body,
         223  +
                                )
         224  +
                            }) {
         225  +
                            ::std::result::Result::Ok(val) => val,
         226  +
                            ::std::result::Result::Err(e) => {
         227  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         228  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         229  +
                                ))
         230  +
                            }
  162    231   
                        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         232  +
                        tmp.meta = generic;
         233  +
                        if tmp.message.is_none() {
         234  +
                            tmp.message = _error_message;
         235  +
                        }
         236  +
                        tmp
         237  +
                    })
         238  +
                }
         239  +
                "KMSInternalException" => crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::KmsInternalException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                _ => crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreError::generic(generic),
         264  +
            };
         265  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         266  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         267  +
            ))
         268  +
        } else {
         269  +
            let protocol = _cfg
         270  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         271  +
                .expect("a SharedClientProtocol is required");
         272  +
            let mut deser = protocol
         273  +
                .deserialize_response(response, DisconnectCustomKeyStore::OUTPUT_SCHEMA, _cfg)
         274  +
                .map_err(|e| {
         275  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         276  +
                })?;
         277  +
            let body = response.body().bytes().expect("body loaded");
         278  +
            let output = crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreOutput::deserialize_with_response(
         279  +
                &mut *deser,
         280  +
                response.headers(),
         281  +
                response.status().into(),
         282  +
                body,
         283  +
            )
         284  +
            .map_err(|e| {
         285  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         286  +
            })?;
         287  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         288  +
        }
  164    289   
    }
  165    290   
}
  166    291   
#[derive(Debug)]
  167    292   
struct DisconnectCustomKeyStoreRequestSerializer;
  168    293   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DisconnectCustomKeyStoreRequestSerializer {
  169    294   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    295   
    fn serialize_input(
  171    296   
        &self,
  172    297   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    298   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    299   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    300   
        let input = input
  176    301   
            .downcast::<crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput>()
  177    302   
            .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::disconnect_custom_key_store::DisconnectCustomKeyStoreInput,
  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::disconnect_custom_key_store::DisconnectCustomKeyStoreInput,
  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.DisconnectCustomKeyStore",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_disconnect_custom_key_store::ser_disconnect_custom_key_store_input(&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())
         303  +
        let protocol = _cfg
         304  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         305  +
            .expect("a SharedClientProtocol is required");
         306  +
        let mut request = protocol
         307  +
            .serialize_request(&input, DisconnectCustomKeyStore::INPUT_SCHEMA, "", _cfg)
         308  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         309  +
         310  +
        return ::std::result::Result::Ok(request);
  218    311   
    }
  219    312   
}
  220    313   
#[derive(Debug)]
  221    314   
struct DisconnectCustomKeyStoreEndpointParamsInterceptor;
  222    315   
  223    316   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DisconnectCustomKeyStoreEndpointParamsInterceptor {
  224    317   
    fn name(&self) -> &'static str {
  225    318   
        "DisconnectCustomKeyStoreEndpointParamsInterceptor"
  226    319   
    }
  227    320   

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/disconnect_custom_key_store/_disconnect_custom_key_store_input.rs

@@ -1,1 +108,120 @@
   17     17   
    "com.amazonaws.kms.synthetic",
   18     18   
    "DisconnectCustomKeyStoreInput",
   19     19   
);
   20     20   
static DISCONNECTCUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.kms.synthetic#DisconnectCustomKeyStoreInput$CustomKeyStoreId",
   23     23   
        "com.amazonaws.kms.synthetic",
   24     24   
        "DisconnectCustomKeyStoreInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "custom_key_store_id",
          27  +
    "CustomKeyStoreId",
   28     28   
    0,
   29     29   
);
   30     30   
static DISCONNECTCUSTOMKEYSTOREINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    DISCONNECTCUSTOMKEYSTOREINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&DISCONNECTCUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_ID],
   34     34   
);
   35     35   
impl DisconnectCustomKeyStoreInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DISCONNECTCUSTOMKEYSTOREINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for DisconnectCustomKeyStoreInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.custom_key_store_id {
   46     46   
            ser.write_string(&DISCONNECTCUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_ID, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl DisconnectCustomKeyStoreInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&DISCONNECTCUSTOMKEYSTOREINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&DISCONNECTCUSTOMKEYSTOREINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.custom_key_store_id = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
          74  +
        builder.custom_key_store_id = builder.custom_key_store_id.or(Some(String::new()));
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl DisconnectCustomKeyStoreInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl DisconnectCustomKeyStoreInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`DisconnectCustomKeyStoreInput`](crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput).
   81     93   
    pub fn builder() -> crate::operation::disconnect_custom_key_store::builders::DisconnectCustomKeyStoreInputBuilder {
   82     94   
        crate::operation::disconnect_custom_key_store::builders::DisconnectCustomKeyStoreInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`DisconnectCustomKeyStoreInput`](crate::operation::disconnect_custom_key_store::DisconnectCustomKeyStoreInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/disconnect_custom_key_store/_disconnect_custom_key_store_output.rs

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

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