AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/retire_grant.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 `RetireGrant`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RetireGrant;
    6      6   
impl RetireGrant {
    7      7   
    /// Creates a new `RetireGrant`
    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::retire_grant::RetireGrantInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::retire_grant::RetireGrantOutput::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::retire_grant::RetireGrantInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::retire_grant::RetireGrantOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::retire_grant::RetireGrantError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,447 @@
  135    139   
                crate::operation::retire_grant::RetireGrantError,
  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 RetireGrantResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RetireGrantResponseDeserializer {
  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_retire_grant::de_retire_grant_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::retire_grant::RetireGrantError::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::retire_grant::RetireGrantError::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  +
                "DryRunOperationException" => crate::operation::retire_grant::RetireGrantError::DryRunOperationException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DryRunOperationException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DryRunOperationException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidArnException" => crate::operation::retire_grant::RetireGrantError::InvalidArnException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidGrantIdException" => crate::operation::retire_grant::RetireGrantError::InvalidGrantIdException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidGrantIdException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidGrantIdException::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  +
                "InvalidGrantTokenException" => crate::operation::retire_grant::RetireGrantError::InvalidGrantTokenException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::InvalidGrantTokenException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::InvalidGrantTokenException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                "KMSInternalException" => crate::operation::retire_grant::RetireGrantError::KmsInternalException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                "KMSInvalidStateException" => crate::operation::retire_grant::RetireGrantError::KmsInvalidStateException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                "NotFoundException" => crate::operation::retire_grant::RetireGrantError::NotFoundException({
         349  +
                    let mut tmp = match protocol
         350  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         351  +
                        .and_then(|mut deser| {
         352  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         353  +
                                &mut *deser,
         354  +
                                response.headers(),
         355  +
                                response.status().into(),
         356  +
                                body,
         357  +
                            )
         358  +
                        }) {
         359  +
                        ::std::result::Result::Ok(val) => val,
         360  +
                        ::std::result::Result::Err(e) => {
         361  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         362  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         363  +
                            ))
         364  +
                        }
         365  +
                    };
         366  +
                    tmp.meta = generic;
         367  +
                    if tmp.message.is_none() {
         368  +
                        tmp.message = _error_message;
         369  +
                    }
         370  +
                    tmp
         371  +
                }),
         372  +
                _ => crate::operation::retire_grant::RetireGrantError::generic(generic),
         373  +
            };
         374  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         375  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         376  +
            ))
  157    377   
        } else {
  158         -
            crate::protocol_serde::shape_retire_grant::de_retire_grant_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         378  +
            let protocol = _cfg
         379  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         380  +
                .expect("a SharedClientProtocol is required");
         381  +
            let mut deser = protocol.deserialize_response(response, RetireGrant::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         382  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         383  +
            })?;
         384  +
            let body = response.body().bytes().expect("body loaded");
         385  +
            let output = crate::operation::retire_grant::RetireGrantOutput::deserialize_with_response(
         386  +
                &mut *deser,
         387  +
                response.headers(),
         388  +
                response.status().into(),
         389  +
                body,
         390  +
            )
         391  +
            .map_err(|e| {
         392  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         393  +
            })?;
         394  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         395  +
        }
  161    396   
    }
  162    397   
}
  163    398   
#[derive(Debug)]
  164    399   
struct RetireGrantRequestSerializer;
  165    400   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RetireGrantRequestSerializer {
  166    401   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    402   
    fn serialize_input(
  168    403   
        &self,
  169    404   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    405   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    406   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    407   
        let input = input
  173    408   
            .downcast::<crate::operation::retire_grant::RetireGrantInput>()
  174    409   
            .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::retire_grant::RetireGrantInput,
  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::retire_grant::RetireGrantInput,
  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.RetireGrant",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_retire_grant::ser_retire_grant_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         410  +
        let protocol = _cfg
         411  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         412  +
            .expect("a SharedClientProtocol is required");
         413  +
        let mut request = protocol
         414  +
            .serialize_request(&input, RetireGrant::INPUT_SCHEMA, "", _cfg)
         415  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         416  +
         417  +
        return ::std::result::Result::Ok(request);
  213    418   
    }
  214    419   
}
  215    420   
#[derive(Debug)]
  216    421   
struct RetireGrantEndpointParamsInterceptor;
  217    422   
  218    423   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RetireGrantEndpointParamsInterceptor {
  219    424   
    fn name(&self) -> &'static str {
  220    425   
        "RetireGrantEndpointParamsInterceptor"
  221    426   
    }
  222    427   

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

@@ -29,29 +193,204 @@
   49     49   
    "com.amazonaws.kms.synthetic",
   50     50   
    "RetireGrantInput",
   51     51   
);
   52     52   
static RETIREGRANTINPUT_MEMBER_GRANT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.kms.synthetic#RetireGrantInput$GrantToken",
   55     55   
        "com.amazonaws.kms.synthetic",
   56     56   
        "RetireGrantInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::String,
   59         -
    "grant_token",
          59  +
    "GrantToken",
   60     60   
    0,
   61     61   
);
   62     62   
static RETIREGRANTINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.kms.synthetic#RetireGrantInput$KeyId",
   65     65   
        "com.amazonaws.kms.synthetic",
   66     66   
        "RetireGrantInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::String,
   69         -
    "key_id",
          69  +
    "KeyId",
   70     70   
    1,
   71     71   
);
   72     72   
static RETIREGRANTINPUT_MEMBER_GRANT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.kms.synthetic#RetireGrantInput$GrantId",
   75     75   
        "com.amazonaws.kms.synthetic",
   76     76   
        "RetireGrantInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "grant_id",
          79  +
    "GrantId",
   80     80   
    2,
   81     81   
);
   82     82   
static RETIREGRANTINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.kms.synthetic#RetireGrantInput$DryRun",
   85     85   
        "com.amazonaws.kms.synthetic",
   86     86   
        "RetireGrantInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::Boolean,
   89         -
    "dry_run",
          89  +
    "DryRun",
   90     90   
    3,
   91     91   
);
   92     92   
static RETIREGRANTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   93     93   
    RETIREGRANTINPUT_SCHEMA_ID,
   94     94   
    ::aws_smithy_schema::ShapeType::Structure,
   95     95   
    &[
   96     96   
        &RETIREGRANTINPUT_MEMBER_GRANT_TOKEN,
   97     97   
        &RETIREGRANTINPUT_MEMBER_KEY_ID,
   98     98   
        &RETIREGRANTINPUT_MEMBER_GRANT_ID,
   99     99   
        &RETIREGRANTINPUT_MEMBER_DRY_RUN,
  100    100   
    ],
  101    101   
);
  102    102   
impl RetireGrantInput {
  103    103   
    /// The schema for this shape.
  104    104   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &RETIREGRANTINPUT_SCHEMA;
  105    105   
}
  106    106   
impl ::aws_smithy_schema::serde::SerializableStruct for RetireGrantInput {
  107    107   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  108    108   
    fn serialize_members(
  109    109   
        &self,
  110    110   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  111    111   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  112    112   
        if let Some(ref val) = self.grant_token {
  113    113   
            ser.write_string(&RETIREGRANTINPUT_MEMBER_GRANT_TOKEN, val)?;
  114    114   
        }
  115    115   
        if let Some(ref val) = self.key_id {
  116    116   
            ser.write_string(&RETIREGRANTINPUT_MEMBER_KEY_ID, val)?;
  117    117   
        }
  118    118   
        if let Some(ref val) = self.grant_id {
  119    119   
            ser.write_string(&RETIREGRANTINPUT_MEMBER_GRANT_ID, val)?;
  120    120   
        }
  121    121   
        if let Some(ref val) = self.dry_run {
  122    122   
            ser.write_boolean(&RETIREGRANTINPUT_MEMBER_DRY_RUN, *val)?;
  123    123   
        }
  124    124   
        Ok(())
  125    125   
    }
  126    126   
}
  127    127   
impl RetireGrantInput {
  128    128   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  129         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  130         -
        deserializer: &mut D,
         129  +
    pub fn deserialize(
         130  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  131    131   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  132    132   
        #[allow(unused_variables, unused_mut)]
  133    133   
        let mut builder = Self::builder();
  134    134   
        #[allow(
  135    135   
            unused_variables,
  136    136   
            unreachable_code,
  137    137   
            clippy::single_match,
  138    138   
            clippy::match_single_binding,
  139    139   
            clippy::diverging_sub_expression
  140    140   
        )]
  141         -
        deserializer.read_struct(&RETIREGRANTINPUT_SCHEMA, (), |_, member, deser| {
         141  +
        deserializer.read_struct(&RETIREGRANTINPUT_SCHEMA, &mut |member, deser| {
  142    142   
            match member.member_index() {
  143    143   
                Some(0) => {
  144    144   
                    builder.grant_token = Some(deser.read_string(member)?);
  145    145   
                }
  146    146   
                Some(1) => {
  147    147   
                    builder.key_id = Some(deser.read_string(member)?);
  148    148   
                }
  149    149   
                Some(2) => {
  150    150   
                    builder.grant_id = Some(deser.read_string(member)?);
  151    151   
                }
  152    152   
                Some(3) => {
  153    153   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  154    154   
                }
  155    155   
                _ => {}
  156    156   
            }
  157    157   
            Ok(())
  158    158   
        })?;
  159    159   
        builder
  160    160   
            .build()
  161    161   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  162    162   
    }
  163    163   
}
         164  +
impl RetireGrantInput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         166  +
    pub fn deserialize_with_response(
         167  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         168  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         169  +
        _status: u16,
         170  +
        _body: &[u8],
         171  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         172  +
        Self::deserialize(deserializer)
         173  +
    }
         174  +
}
  164    175   
impl RetireGrantInput {
  165    176   
    /// Creates a new builder-style object to manufacture [`RetireGrantInput`](crate::operation::retire_grant::RetireGrantInput).
  166    177   
    pub fn builder() -> crate::operation::retire_grant::builders::RetireGrantInputBuilder {
  167    178   
        crate::operation::retire_grant::builders::RetireGrantInputBuilder::default()
  168    179   
    }
  169    180   
}
  170    181   
  171    182   
/// A builder for [`RetireGrantInput`](crate::operation::retire_grant::RetireGrantInput).
  172    183   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  173    184   
#[non_exhaustive]

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/revoke_grant.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 `RevokeGrant`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RevokeGrant;
    6      6   
impl RevokeGrant {
    7      7   
    /// Creates a new `RevokeGrant`
    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::revoke_grant::RevokeGrantInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::revoke_grant::RevokeGrantOutput::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::revoke_grant::RevokeGrantInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::revoke_grant::RevokeGrantOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::revoke_grant::RevokeGrantError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,423 @@
  135    139   
                crate::operation::revoke_grant::RevokeGrantError,
  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 RevokeGrantResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RevokeGrantResponseDeserializer {
  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_revoke_grant::de_revoke_grant_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::revoke_grant::RevokeGrantError::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::revoke_grant::RevokeGrantError::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  +
                "DryRunOperationException" => crate::operation::revoke_grant::RevokeGrantError::DryRunOperationException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DryRunOperationException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DryRunOperationException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidArnException" => crate::operation::revoke_grant::RevokeGrantError::InvalidArnException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidGrantIdException" => crate::operation::revoke_grant::RevokeGrantError::InvalidGrantIdException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidGrantIdException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidGrantIdException::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  +
                "KMSInternalException" => crate::operation::revoke_grant::RevokeGrantError::KmsInternalException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidStateException" => crate::operation::revoke_grant::RevokeGrantError::KmsInvalidStateException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::KmsInvalidStateException::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  +
                "NotFoundException" => crate::operation::revoke_grant::RevokeGrantError::NotFoundException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                _ => crate::operation::revoke_grant::RevokeGrantError::generic(generic),
         349  +
            };
         350  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         351  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         352  +
            ))
  157    353   
        } else {
  158         -
            crate::protocol_serde::shape_revoke_grant::de_revoke_grant_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         354  +
            let protocol = _cfg
         355  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         356  +
                .expect("a SharedClientProtocol is required");
         357  +
            let mut deser = protocol.deserialize_response(response, RevokeGrant::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         358  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         359  +
            })?;
         360  +
            let body = response.body().bytes().expect("body loaded");
         361  +
            let output = crate::operation::revoke_grant::RevokeGrantOutput::deserialize_with_response(
         362  +
                &mut *deser,
         363  +
                response.headers(),
         364  +
                response.status().into(),
         365  +
                body,
         366  +
            )
         367  +
            .map_err(|e| {
         368  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         369  +
            })?;
         370  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         371  +
        }
  161    372   
    }
  162    373   
}
  163    374   
#[derive(Debug)]
  164    375   
struct RevokeGrantRequestSerializer;
  165    376   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RevokeGrantRequestSerializer {
  166    377   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    378   
    fn serialize_input(
  168    379   
        &self,
  169    380   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    381   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    382   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    383   
        let input = input
  173    384   
            .downcast::<crate::operation::revoke_grant::RevokeGrantInput>()
  174    385   
            .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::revoke_grant::RevokeGrantInput,
  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::revoke_grant::RevokeGrantInput,
  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.RevokeGrant",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_revoke_grant::ser_revoke_grant_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         386  +
        let protocol = _cfg
         387  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         388  +
            .expect("a SharedClientProtocol is required");
         389  +
        let mut request = protocol
         390  +
            .serialize_request(&input, RevokeGrant::INPUT_SCHEMA, "", _cfg)
         391  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         392  +
         393  +
        return ::std::result::Result::Ok(request);
  213    394   
    }
  214    395   
}
  215    396   
#[derive(Debug)]
  216    397   
struct RevokeGrantEndpointParamsInterceptor;
  217    398   
  218    399   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RevokeGrantEndpointParamsInterceptor {
  219    400   
    fn name(&self) -> &'static str {
  220    401   
        "RevokeGrantEndpointParamsInterceptor"
  221    402   
    }
  222    403   

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/rotate_key_on_demand.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 `RotateKeyOnDemand`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RotateKeyOnDemand;
    6      6   
impl RotateKeyOnDemand {
    7      7   
    /// Creates a new `RotateKeyOnDemand`
    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::rotate_key_on_demand::RotateKeyOnDemandInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput::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::rotate_key_on_demand::RotateKeyOnDemandInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::rotate_key_on_demand::RotateKeyOnDemandError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +243,475 @@
  135    139   
                crate::operation::rotate_key_on_demand::RotateKeyOnDemandError,
  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 RotateKeyOnDemandResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RotateKeyOnDemandResponseDeserializer {
  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_rotate_key_on_demand::de_rotate_key_on_demand_http_error(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         172  +
                            crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::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  +
                "ConflictException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::ConflictException({
         183  +
                    let mut tmp = match protocol
         184  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         185  +
                        .and_then(|mut deser| {
         186  +
                            crate::types::error::ConflictException::deserialize_with_response(
         187  +
                                &mut *deser,
         188  +
                                response.headers(),
         189  +
                                response.status().into(),
         190  +
                                body,
         191  +
                            )
         192  +
                        }) {
         193  +
                        ::std::result::Result::Ok(val) => val,
         194  +
                        ::std::result::Result::Err(e) => {
         195  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         196  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         197  +
                            ))
         198  +
                        }
         199  +
                    };
         200  +
                    tmp.meta = generic;
         201  +
                    if tmp.message.is_none() {
         202  +
                        tmp.message = _error_message;
         203  +
                    }
         204  +
                    tmp
         205  +
                }),
         206  +
                "DependencyTimeoutException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::DependencyTimeoutException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::DependencyTimeoutException::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  +
                "DisabledException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::DisabledException({
         231  +
                    let mut tmp = match protocol
         232  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         233  +
                        .and_then(|mut deser| {
         234  +
                            crate::types::error::DisabledException::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  +
                "InvalidArnException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::InvalidArnException({
         255  +
                    let mut tmp = match protocol
         256  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         257  +
                        .and_then(|mut deser| {
         258  +
                            crate::types::error::InvalidArnException::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  +
                "KMSInternalException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInternalException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidStateException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::KmsInvalidStateException({
         303  +
                    let mut tmp = match protocol
         304  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         305  +
                        .and_then(|mut deser| {
         306  +
                            crate::types::error::KmsInvalidStateException::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  +
                "LimitExceededException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::LimitExceededException({
         327  +
                    let mut tmp = match protocol
         328  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         329  +
                        .and_then(|mut deser| {
         330  +
                            crate::types::error::LimitExceededException::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  +
                "NotFoundException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::NotFoundException({
         351  +
                    let mut tmp = match protocol
         352  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         353  +
                        .and_then(|mut deser| {
         354  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         355  +
                                &mut *deser,
         356  +
                                response.headers(),
         357  +
                                response.status().into(),
         358  +
                                body,
         359  +
                            )
         360  +
                        }) {
         361  +
                        ::std::result::Result::Ok(val) => val,
         362  +
                        ::std::result::Result::Err(e) => {
         363  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         364  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         365  +
                            ))
         366  +
                        }
         367  +
                    };
         368  +
                    tmp.meta = generic;
         369  +
                    if tmp.message.is_none() {
         370  +
                        tmp.message = _error_message;
         371  +
                    }
         372  +
                    tmp
         373  +
                }),
         374  +
                "UnsupportedOperationException" => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::UnsupportedOperationException({
         375  +
                    let mut tmp = match protocol
         376  +
                        .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         377  +
                        .and_then(|mut deser| {
         378  +
                            crate::types::error::UnsupportedOperationException::deserialize_with_response(
         379  +
                                &mut *deser,
         380  +
                                response.headers(),
         381  +
                                response.status().into(),
         382  +
                                body,
         383  +
                            )
         384  +
                        }) {
         385  +
                        ::std::result::Result::Ok(val) => val,
         386  +
                        ::std::result::Result::Err(e) => {
         387  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         388  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         389  +
                            ))
         390  +
                        }
         391  +
                    };
         392  +
                    tmp.meta = generic;
         393  +
                    if tmp.message.is_none() {
         394  +
                        tmp.message = _error_message;
         395  +
                    }
         396  +
                    tmp
         397  +
                }),
         398  +
                _ => crate::operation::rotate_key_on_demand::RotateKeyOnDemandError::generic(generic),
         399  +
            };
         400  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         401  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         402  +
            ))
  157    403   
        } else {
  158         -
            crate::protocol_serde::shape_rotate_key_on_demand::de_rotate_key_on_demand_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         404  +
            let protocol = _cfg
         405  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         406  +
                .expect("a SharedClientProtocol is required");
         407  +
            let mut deser = protocol
         408  +
                .deserialize_response(response, RotateKeyOnDemand::OUTPUT_SCHEMA, _cfg)
         409  +
                .map_err(|e| {
         410  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         411  +
                })?;
         412  +
            let body = response.body().bytes().expect("body loaded");
         413  +
            let output = crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput::deserialize_with_response(
         414  +
                &mut *deser,
         415  +
                response.headers(),
         416  +
                response.status().into(),
         417  +
                body,
         418  +
            )
         419  +
            .map_err(|e| {
         420  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         421  +
            })?;
         422  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         423  +
        }
  161    424   
    }
  162    425   
}
  163    426   
#[derive(Debug)]
  164    427   
struct RotateKeyOnDemandRequestSerializer;
  165    428   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RotateKeyOnDemandRequestSerializer {
  166    429   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    430   
    fn serialize_input(
  168    431   
        &self,
  169    432   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    433   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    434   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    435   
        let input = input
  173    436   
            .downcast::<crate::operation::rotate_key_on_demand::RotateKeyOnDemandInput>()
  174    437   
            .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::rotate_key_on_demand::RotateKeyOnDemandInput,
  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::rotate_key_on_demand::RotateKeyOnDemandInput,
  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.RotateKeyOnDemand",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body =
  208         -
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_rotate_key_on_demand::ser_rotate_key_on_demand_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())
         438  +
        let protocol = _cfg
         439  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         440  +
            .expect("a SharedClientProtocol is required");
         441  +
        let mut request = protocol
         442  +
            .serialize_request(&input, RotateKeyOnDemand::INPUT_SCHEMA, "", _cfg)
         443  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         444  +
         445  +
        return ::std::result::Result::Ok(request);
  214    446   
    }
  215    447   
}
  216    448   
#[derive(Debug)]
  217    449   
struct RotateKeyOnDemandEndpointParamsInterceptor;
  218    450   
  219    451   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RotateKeyOnDemandEndpointParamsInterceptor {
  220    452   
    fn name(&self) -> &'static str {
  221    453   
        "RotateKeyOnDemandEndpointParamsInterceptor"
  222    454   
    }
  223    455