AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/create_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 `CreateGrant`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateGrant;
    6      6   
impl CreateGrant {
    7      7   
    /// Creates a new `CreateGrant`
    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::create_grant::CreateGrantInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_grant::CreateGrantOutput::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::create_grant::CreateGrantInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_grant::CreateGrantOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_grant::CreateGrantError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,471 @@
  135    139   
                crate::operation::create_grant::CreateGrantError,
  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 CreateGrantResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateGrantResponseDeserializer {
  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_create_grant::de_create_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::create_grant::CreateGrantError::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::create_grant::CreateGrantError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "DisabledException" => crate::operation::create_grant::CreateGrantError::DisabledException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DisabledException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "DryRunOperationException" => crate::operation::create_grant::CreateGrantError::DryRunOperationException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::DryRunOperationException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::DryRunOperationException::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  +
                "InvalidArnException" => crate::operation::create_grant::CreateGrantError::InvalidArnException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidArnException::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::create_grant::CreateGrantError::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::create_grant::CreateGrantError::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::create_grant::CreateGrantError::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  +
                "LimitExceededException" => crate::operation::create_grant::CreateGrantError::LimitExceededException({
         349  +
                    let mut tmp = match protocol
         350  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         351  +
                        .and_then(|mut deser| {
         352  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         353  +
                                &mut *deser,
         354  +
                                response.headers(),
         355  +
                                response.status().into(),
         356  +
                                body,
         357  +
                            )
         358  +
                        }) {
         359  +
                        ::std::result::Result::Ok(val) => val,
         360  +
                        ::std::result::Result::Err(e) => {
         361  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         362  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         363  +
                            ))
         364  +
                        }
         365  +
                    };
         366  +
                    tmp.meta = generic;
         367  +
                    if tmp.message.is_none() {
         368  +
                        tmp.message = _error_message;
         369  +
                    }
         370  +
                    tmp
         371  +
                }),
         372  +
                "NotFoundException" => crate::operation::create_grant::CreateGrantError::NotFoundException({
         373  +
                    let mut tmp = match protocol
         374  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         375  +
                        .and_then(|mut deser| {
         376  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         377  +
                                &mut *deser,
         378  +
                                response.headers(),
         379  +
                                response.status().into(),
         380  +
                                body,
         381  +
                            )
         382  +
                        }) {
         383  +
                        ::std::result::Result::Ok(val) => val,
         384  +
                        ::std::result::Result::Err(e) => {
         385  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         386  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         387  +
                            ))
         388  +
                        }
         389  +
                    };
         390  +
                    tmp.meta = generic;
         391  +
                    if tmp.message.is_none() {
         392  +
                        tmp.message = _error_message;
         393  +
                    }
         394  +
                    tmp
         395  +
                }),
         396  +
                _ => crate::operation::create_grant::CreateGrantError::generic(generic),
         397  +
            };
         398  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         399  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         400  +
            ))
  157    401   
        } else {
  158         -
            crate::protocol_serde::shape_create_grant::de_create_grant_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         402  +
            let protocol = _cfg
         403  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         404  +
                .expect("a SharedClientProtocol is required");
         405  +
            let mut deser = protocol.deserialize_response(response, CreateGrant::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         406  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         407  +
            })?;
         408  +
            let body = response.body().bytes().expect("body loaded");
         409  +
            let output = crate::operation::create_grant::CreateGrantOutput::deserialize_with_response(
         410  +
                &mut *deser,
         411  +
                response.headers(),
         412  +
                response.status().into(),
         413  +
                body,
         414  +
            )
         415  +
            .map_err(|e| {
         416  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         417  +
            })?;
         418  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         419  +
        }
  161    420   
    }
  162    421   
}
  163    422   
#[derive(Debug)]
  164    423   
struct CreateGrantRequestSerializer;
  165    424   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateGrantRequestSerializer {
  166    425   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    426   
    fn serialize_input(
  168    427   
        &self,
  169    428   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    429   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    430   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    431   
        let input = input
  173    432   
            .downcast::<crate::operation::create_grant::CreateGrantInput>()
  174    433   
            .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::create_grant::CreateGrantInput,
  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::create_grant::CreateGrantInput,
  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.CreateGrant",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_grant::ser_create_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())
         434  +
        let protocol = _cfg
         435  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         436  +
            .expect("a SharedClientProtocol is required");
         437  +
        let mut request = protocol
         438  +
            .serialize_request(&input, CreateGrant::INPUT_SCHEMA, "", _cfg)
         439  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         440  +
         441  +
        return ::std::result::Result::Ok(request);
  213    442   
    }
  214    443   
}
  215    444   
#[derive(Debug)]
  216    445   
struct CreateGrantEndpointParamsInterceptor;
  217    446   
  218    447   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateGrantEndpointParamsInterceptor {
  219    448   
    fn name(&self) -> &'static str {
  220    449   
        "CreateGrantEndpointParamsInterceptor"
  221    450   
    }
  222    451   

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

@@ -93,93 +223,223 @@
  113    113   
    "com.amazonaws.kms.synthetic",
  114    114   
    "CreateGrantInput",
  115    115   
);
  116    116   
static CREATEGRANTINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  117    117   
    ::aws_smithy_schema::ShapeId::from_static(
  118    118   
        "com.amazonaws.kms.synthetic#CreateGrantInput$KeyId",
  119    119   
        "com.amazonaws.kms.synthetic",
  120    120   
        "CreateGrantInput",
  121    121   
    ),
  122    122   
    ::aws_smithy_schema::ShapeType::String,
  123         -
    "key_id",
         123  +
    "KeyId",
  124    124   
    0,
  125    125   
);
  126    126   
static CREATEGRANTINPUT_MEMBER_GRANTEE_PRINCIPAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  127    127   
    ::aws_smithy_schema::ShapeId::from_static(
  128    128   
        "com.amazonaws.kms.synthetic#CreateGrantInput$GranteePrincipal",
  129    129   
        "com.amazonaws.kms.synthetic",
  130    130   
        "CreateGrantInput",
  131    131   
    ),
  132    132   
    ::aws_smithy_schema::ShapeType::String,
  133         -
    "grantee_principal",
         133  +
    "GranteePrincipal",
  134    134   
    1,
  135    135   
);
  136    136   
static CREATEGRANTINPUT_MEMBER_RETIRING_PRINCIPAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  137    137   
    ::aws_smithy_schema::ShapeId::from_static(
  138    138   
        "com.amazonaws.kms.synthetic#CreateGrantInput$RetiringPrincipal",
  139    139   
        "com.amazonaws.kms.synthetic",
  140    140   
        "CreateGrantInput",
  141    141   
    ),
  142    142   
    ::aws_smithy_schema::ShapeType::String,
  143         -
    "retiring_principal",
         143  +
    "RetiringPrincipal",
  144    144   
    2,
  145    145   
);
  146    146   
static CREATEGRANTINPUT_MEMBER_OPERATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  147    147   
    ::aws_smithy_schema::ShapeId::from_static(
  148    148   
        "com.amazonaws.kms.synthetic#CreateGrantInput$Operations",
  149    149   
        "com.amazonaws.kms.synthetic",
  150    150   
        "CreateGrantInput",
  151    151   
    ),
  152    152   
    ::aws_smithy_schema::ShapeType::List,
  153         -
    "operations",
         153  +
    "Operations",
  154    154   
    3,
  155    155   
);
  156    156   
static CREATEGRANTINPUT_MEMBER_CONSTRAINTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  157    157   
    ::aws_smithy_schema::ShapeId::from_static(
  158    158   
        "com.amazonaws.kms.synthetic#CreateGrantInput$Constraints",
  159    159   
        "com.amazonaws.kms.synthetic",
  160    160   
        "CreateGrantInput",
  161    161   
    ),
  162    162   
    ::aws_smithy_schema::ShapeType::Structure,
  163         -
    "constraints",
         163  +
    "Constraints",
  164    164   
    4,
  165    165   
);
  166    166   
static CREATEGRANTINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "com.amazonaws.kms.synthetic#CreateGrantInput$GrantTokens",
  169    169   
        "com.amazonaws.kms.synthetic",
  170    170   
        "CreateGrantInput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::List,
  173         -
    "grant_tokens",
         173  +
    "GrantTokens",
  174    174   
    5,
  175    175   
);
  176    176   
static CREATEGRANTINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  177    177   
    ::aws_smithy_schema::ShapeId::from_static(
  178    178   
        "com.amazonaws.kms.synthetic#CreateGrantInput$Name",
  179    179   
        "com.amazonaws.kms.synthetic",
  180    180   
        "CreateGrantInput",
  181    181   
    ),
  182    182   
    ::aws_smithy_schema::ShapeType::String,
  183         -
    "name",
         183  +
    "Name",
  184    184   
    6,
  185    185   
);
  186    186   
static CREATEGRANTINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.kms.synthetic#CreateGrantInput$DryRun",
  189    189   
        "com.amazonaws.kms.synthetic",
  190    190   
        "CreateGrantInput",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::Boolean,
  193         -
    "dry_run",
         193  +
    "DryRun",
  194    194   
    7,
  195    195   
);
  196    196   
static CREATEGRANTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  197    197   
    CREATEGRANTINPUT_SCHEMA_ID,
  198    198   
    ::aws_smithy_schema::ShapeType::Structure,
  199    199   
    &[
  200    200   
        &CREATEGRANTINPUT_MEMBER_KEY_ID,
  201    201   
        &CREATEGRANTINPUT_MEMBER_GRANTEE_PRINCIPAL,
  202    202   
        &CREATEGRANTINPUT_MEMBER_RETIRING_PRINCIPAL,
  203    203   
        &CREATEGRANTINPUT_MEMBER_OPERATIONS,
@@ -235,235 +361,362 @@
  255    255   
            ser.write_string(&CREATEGRANTINPUT_MEMBER_NAME, val)?;
  256    256   
        }
  257    257   
        if let Some(ref val) = self.dry_run {
  258    258   
            ser.write_boolean(&CREATEGRANTINPUT_MEMBER_DRY_RUN, *val)?;
  259    259   
        }
  260    260   
        Ok(())
  261    261   
    }
  262    262   
}
  263    263   
impl CreateGrantInput {
  264    264   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  265         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  266         -
        deserializer: &mut D,
         265  +
    pub fn deserialize(
         266  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  267    267   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  268    268   
        #[allow(unused_variables, unused_mut)]
  269    269   
        let mut builder = Self::builder();
  270    270   
        #[allow(
  271    271   
            unused_variables,
  272    272   
            unreachable_code,
  273    273   
            clippy::single_match,
  274    274   
            clippy::match_single_binding,
  275    275   
            clippy::diverging_sub_expression
  276    276   
        )]
  277         -
        deserializer.read_struct(&CREATEGRANTINPUT_SCHEMA, (), |_, member, deser| {
         277  +
        deserializer.read_struct(&CREATEGRANTINPUT_SCHEMA, &mut |member, deser| {
  278    278   
            match member.member_index() {
  279    279   
                Some(0) => {
  280    280   
                    builder.key_id = Some(deser.read_string(member)?);
  281    281   
                }
  282    282   
                Some(1) => {
  283    283   
                    builder.grantee_principal = Some(deser.read_string(member)?);
  284    284   
                }
  285    285   
                Some(2) => {
  286    286   
                    builder.retiring_principal = Some(deser.read_string(member)?);
  287    287   
                }
  288    288   
                Some(3) => {
  289    289   
                    builder.operations = Some({
  290         -
                        let container = if let Some(cap) = deser.container_size() {
  291         -
                            Vec::with_capacity(cap)
  292         -
                        } else {
  293         -
                            Vec::new()
  294         -
                        };
  295         -
                        deser.read_list(member, container, |mut list, deser| {
  296         -
                            list.push(crate::types::GrantOperation::from(deser.read_string(member)?.as_str()));
  297         -
                            Ok(list)
  298         -
                        })?
         290  +
                        let mut container = Vec::new();
         291  +
                        deser.read_list(member, &mut |deser| {
         292  +
                            container.push(crate::types::GrantOperation::from(deser.read_string(member)?.as_str()));
         293  +
                            Ok(())
         294  +
                        })?;
         295  +
                        container
  299    296   
                    });
  300    297   
                }
  301    298   
                Some(4) => {
  302    299   
                    builder.constraints = Some(crate::types::GrantConstraints::deserialize(deser)?);
  303    300   
                }
  304    301   
                Some(5) => {
  305         -
                    builder.grant_tokens = Some({
  306         -
                        let container = if let Some(cap) = deser.container_size() {
  307         -
                            Vec::with_capacity(cap)
  308         -
                        } else {
  309         -
                            Vec::new()
  310         -
                        };
  311         -
                        deser.read_list(member, container, |mut list, deser| {
  312         -
                            list.push(deser.read_string(member)?);
  313         -
                            Ok(list)
  314         -
                        })?
  315         -
                    });
         302  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  316    303   
                }
  317    304   
                Some(6) => {
  318    305   
                    builder.name = Some(deser.read_string(member)?);
  319    306   
                }
  320    307   
                Some(7) => {
  321    308   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  322    309   
                }
  323    310   
                _ => {}
  324    311   
            }
  325    312   
            Ok(())
  326    313   
        })?;
         314  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         315  +
        builder.grantee_principal = builder.grantee_principal.or(Some(String::new()));
         316  +
        builder.operations = builder.operations.or(Some(Vec::new()));
  327    317   
        builder
  328    318   
            .build()
  329    319   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  330    320   
    }
  331    321   
}
         322  +
impl CreateGrantInput {
         323  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         324  +
    pub fn deserialize_with_response(
         325  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         326  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         327  +
        _status: u16,
         328  +
        _body: &[u8],
         329  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         330  +
        Self::deserialize(deserializer)
         331  +
    }
         332  +
}
  332    333   
impl CreateGrantInput {
  333    334   
    /// Creates a new builder-style object to manufacture [`CreateGrantInput`](crate::operation::create_grant::CreateGrantInput).
  334    335   
    pub fn builder() -> crate::operation::create_grant::builders::CreateGrantInputBuilder {
  335    336   
        crate::operation::create_grant::builders::CreateGrantInputBuilder::default()
  336    337   
    }
  337    338   
}
  338    339   
  339    340   
/// A builder for [`CreateGrantInput`](crate::operation::create_grant::CreateGrantInput).
  340    341   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  341    342   
#[non_exhaustive]

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

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `CreateKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateKey;
    6      6   
impl CreateKey {
    7      7   
    /// Creates a new `CreateKey`
    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::create_key::CreateKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_key::CreateKeyOutput::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::create_key::CreateKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_key::CreateKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_key::CreateKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,567 @@
  135    139   
                crate::operation::create_key::CreateKeyError,
  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 CreateKeyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateKeyResponseDeserializer {
  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_create_key::de_create_key_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::create_key::CreateKeyError::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  +
                "CloudHsmClusterInvalidConfigurationException" => {
         181  +
                    crate::operation::create_key::CreateKeyError::CloudHsmClusterInvalidConfigurationException({
         182  +
                        let mut tmp = match protocol
         183  +
                            .deserialize_response(response, crate::types::error::CloudHsmClusterInvalidConfigurationException::SCHEMA, _cfg)
         184  +
                            .and_then(|mut deser| {
         185  +
                                crate::types::error::CloudHsmClusterInvalidConfigurationException::deserialize_with_response(
         186  +
                                    &mut *deser,
         187  +
                                    response.headers(),
         188  +
                                    response.status().into(),
         189  +
                                    body,
         190  +
                                )
         191  +
                            }) {
         192  +
                            ::std::result::Result::Ok(val) => val,
         193  +
                            ::std::result::Result::Err(e) => {
         194  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         196  +
                                ))
         197  +
                            }
         198  +
                        };
         199  +
                        tmp.meta = generic;
         200  +
                        if tmp.message.is_none() {
         201  +
                            tmp.message = _error_message;
         202  +
                        }
         203  +
                        tmp
         204  +
                    })
         205  +
                }
         206  +
                "CustomKeyStoreInvalidStateException" => crate::operation::create_key::CreateKeyError::CustomKeyStoreInvalidStateException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::CustomKeyStoreInvalidStateException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::CustomKeyStoreInvalidStateException::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  +
                "CustomKeyStoreNotFoundException" => crate::operation::create_key::CreateKeyError::CustomKeyStoreNotFoundException({
         231  +
                    let mut tmp = match protocol
         232  +
                        .deserialize_response(response, crate::types::error::CustomKeyStoreNotFoundException::SCHEMA, _cfg)
         233  +
                        .and_then(|mut deser| {
         234  +
                            crate::types::error::CustomKeyStoreNotFoundException::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  +
                "DependencyTimeoutException" => crate::operation::create_key::CreateKeyError::DependencyTimeoutException({
         255  +
                    let mut tmp = match protocol
         256  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         257  +
                        .and_then(|mut deser| {
         258  +
                            crate::types::error::DependencyTimeoutException::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  +
                "InvalidArnException" => crate::operation::create_key::CreateKeyError::InvalidArnException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::InvalidArnException::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  +
                "KMSInternalException" => crate::operation::create_key::CreateKeyError::KmsInternalException({
         303  +
                    let mut tmp = match protocol
         304  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         305  +
                        .and_then(|mut deser| {
         306  +
                            crate::types::error::KmsInternalException::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::create_key::CreateKeyError::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  +
                "MalformedPolicyDocumentException" => crate::operation::create_key::CreateKeyError::MalformedPolicyDocumentException({
         351  +
                    let mut tmp = match protocol
         352  +
                        .deserialize_response(response, crate::types::error::MalformedPolicyDocumentException::SCHEMA, _cfg)
         353  +
                        .and_then(|mut deser| {
         354  +
                            crate::types::error::MalformedPolicyDocumentException::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  +
                "TagException" => crate::operation::create_key::CreateKeyError::TagException({
         375  +
                    let mut tmp = match protocol
         376  +
                        .deserialize_response(response, crate::types::error::TagException::SCHEMA, _cfg)
         377  +
                        .and_then(|mut deser| {
         378  +
                            crate::types::error::TagException::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  +
                "UnsupportedOperationException" => crate::operation::create_key::CreateKeyError::UnsupportedOperationException({
         399  +
                    let mut tmp = match protocol
         400  +
                        .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         401  +
                        .and_then(|mut deser| {
         402  +
                            crate::types::error::UnsupportedOperationException::deserialize_with_response(
         403  +
                                &mut *deser,
         404  +
                                response.headers(),
         405  +
                                response.status().into(),
         406  +
                                body,
         407  +
                            )
         408  +
                        }) {
         409  +
                        ::std::result::Result::Ok(val) => val,
         410  +
                        ::std::result::Result::Err(e) => {
         411  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         412  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         413  +
                            ))
         414  +
                        }
         415  +
                    };
         416  +
                    tmp.meta = generic;
         417  +
                    if tmp.message.is_none() {
         418  +
                        tmp.message = _error_message;
         419  +
                    }
         420  +
                    tmp
         421  +
                }),
         422  +
                "XksKeyAlreadyInUseException" => crate::operation::create_key::CreateKeyError::XksKeyAlreadyInUseException({
         423  +
                    let mut tmp = match protocol
         424  +
                        .deserialize_response(response, crate::types::error::XksKeyAlreadyInUseException::SCHEMA, _cfg)
         425  +
                        .and_then(|mut deser| {
         426  +
                            crate::types::error::XksKeyAlreadyInUseException::deserialize_with_response(
         427  +
                                &mut *deser,
         428  +
                                response.headers(),
         429  +
                                response.status().into(),
         430  +
                                body,
         431  +
                            )
         432  +
                        }) {
         433  +
                        ::std::result::Result::Ok(val) => val,
         434  +
                        ::std::result::Result::Err(e) => {
         435  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         436  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         437  +
                            ))
         438  +
                        }
         439  +
                    };
         440  +
                    tmp.meta = generic;
         441  +
                    if tmp.message.is_none() {
         442  +
                        tmp.message = _error_message;
         443  +
                    }
         444  +
                    tmp
         445  +
                }),
         446  +
                "XksKeyInvalidConfigurationException" => crate::operation::create_key::CreateKeyError::XksKeyInvalidConfigurationException({
         447  +
                    let mut tmp = match protocol
         448  +
                        .deserialize_response(response, crate::types::error::XksKeyInvalidConfigurationException::SCHEMA, _cfg)
         449  +
                        .and_then(|mut deser| {
         450  +
                            crate::types::error::XksKeyInvalidConfigurationException::deserialize_with_response(
         451  +
                                &mut *deser,
         452  +
                                response.headers(),
         453  +
                                response.status().into(),
         454  +
                                body,
         455  +
                            )
         456  +
                        }) {
         457  +
                        ::std::result::Result::Ok(val) => val,
         458  +
                        ::std::result::Result::Err(e) => {
         459  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         460  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         461  +
                            ))
         462  +
                        }
         463  +
                    };
         464  +
                    tmp.meta = generic;
         465  +
                    if tmp.message.is_none() {
         466  +
                        tmp.message = _error_message;
         467  +
                    }
         468  +
                    tmp
         469  +
                }),
         470  +
                "XksKeyNotFoundException" => crate::operation::create_key::CreateKeyError::XksKeyNotFoundException({
         471  +
                    let mut tmp = match protocol
         472  +
                        .deserialize_response(response, crate::types::error::XksKeyNotFoundException::SCHEMA, _cfg)
         473  +
                        .and_then(|mut deser| {
         474  +
                            crate::types::error::XksKeyNotFoundException::deserialize_with_response(
         475  +
                                &mut *deser,
         476  +
                                response.headers(),
         477  +
                                response.status().into(),
         478  +
                                body,
         479  +
                            )
         480  +
                        }) {
         481  +
                        ::std::result::Result::Ok(val) => val,
         482  +
                        ::std::result::Result::Err(e) => {
         483  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         484  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         485  +
                            ))
         486  +
                        }
         487  +
                    };
         488  +
                    tmp.meta = generic;
         489  +
                    if tmp.message.is_none() {
         490  +
                        tmp.message = _error_message;
         491  +
                    }
         492  +
                    tmp
         493  +
                }),
         494  +
                _ => crate::operation::create_key::CreateKeyError::generic(generic),
         495  +
            };
         496  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         497  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         498  +
            ))
  157    499   
        } else {
  158         -
            crate::protocol_serde::shape_create_key::de_create_key_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         500  +
            let protocol = _cfg
         501  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         502  +
                .expect("a SharedClientProtocol is required");
         503  +
            let mut deser = protocol.deserialize_response(response, CreateKey::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         504  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         505  +
            })?;
         506  +
            let body = response.body().bytes().expect("body loaded");
         507  +
            let output = crate::operation::create_key::CreateKeyOutput::deserialize_with_response(
         508  +
                &mut *deser,
         509  +
                response.headers(),
         510  +
                response.status().into(),
         511  +
                body,
         512  +
            )
         513  +
            .map_err(|e| {
         514  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         515  +
            })?;
         516  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         517  +
        }
  161    518   
    }
  162    519   
}
  163    520   
#[derive(Debug)]
  164    521   
struct CreateKeyRequestSerializer;
  165    522   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateKeyRequestSerializer {
  166    523   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    524   
    fn serialize_input(
  168    525   
        &self,
  169    526   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    527   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    528   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    529   
        let input = input.downcast::<crate::operation::create_key::CreateKeyInput>().expect("correct type");
  173         -
        let _header_serialization_settings = _cfg
  174         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175         -
            .cloned()
  176         -
            .unwrap_or_default();
  177         -
        let mut request_builder = {
  178         -
            #[allow(clippy::uninlined_format_args)]
  179         -
            fn uri_base(
  180         -
                _input: &crate::operation::create_key::CreateKeyInput,
  181         -
                output: &mut ::std::string::String,
  182         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  183         -
                use ::std::fmt::Write as _;
  184         -
                ::std::write!(output, "/").expect("formatting should succeed");
  185         -
                ::std::result::Result::Ok(())
  186         -
            }
  187         -
            #[allow(clippy::unnecessary_wraps)]
  188         -
            fn update_http_builder(
  189         -
                input: &crate::operation::create_key::CreateKeyInput,
  190         -
                builder: ::http_1x::request::Builder,
  191         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192         -
                let mut uri = ::std::string::String::new();
  193         -
                uri_base(input, &mut uri)?;
  194         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195         -
            }
  196         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  198         -
            builder = _header_serialization_settings.set_default_header(
  199         -
                builder,
  200         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  201         -
                "TrentService.CreateKey",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_key::ser_create_key_input(&input)?);
  206         -
        if let Some(content_length) = body.content_length() {
  207         -
            let content_length = content_length.to_string();
  208         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  209         -
        }
  210         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         530  +
        let protocol = _cfg
         531  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         532  +
            .expect("a SharedClientProtocol is required");
         533  +
        let mut request = protocol
         534  +
            .serialize_request(&input, CreateKey::INPUT_SCHEMA, "", _cfg)
         535  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         536  +
         537  +
        return ::std::result::Result::Ok(request);
  211    538   
    }
  212    539   
}
  213    540   
#[derive(Debug)]
  214    541   
struct CreateKeyEndpointParamsInterceptor;
  215    542   
  216    543   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateKeyEndpointParamsInterceptor {
  217    544   
    fn name(&self) -> &'static str {
  218    545   
        "CreateKeyEndpointParamsInterceptor"
  219    546   
    }
  220    547   

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

@@ -309,309 +469,469 @@
  329    329   
    "com.amazonaws.kms.synthetic",
  330    330   
    "CreateKeyInput",
  331    331   
);
  332    332   
static CREATEKEYINPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  333    333   
    ::aws_smithy_schema::ShapeId::from_static(
  334    334   
        "com.amazonaws.kms.synthetic#CreateKeyInput$Policy",
  335    335   
        "com.amazonaws.kms.synthetic",
  336    336   
        "CreateKeyInput",
  337    337   
    ),
  338    338   
    ::aws_smithy_schema::ShapeType::String,
  339         -
    "policy",
         339  +
    "Policy",
  340    340   
    0,
  341    341   
);
  342    342   
static CREATEKEYINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  343    343   
    ::aws_smithy_schema::ShapeId::from_static(
  344    344   
        "com.amazonaws.kms.synthetic#CreateKeyInput$Description",
  345    345   
        "com.amazonaws.kms.synthetic",
  346    346   
        "CreateKeyInput",
  347    347   
    ),
  348    348   
    ::aws_smithy_schema::ShapeType::String,
  349         -
    "description",
         349  +
    "Description",
  350    350   
    1,
  351    351   
);
  352    352   
static CREATEKEYINPUT_MEMBER_KEY_USAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  353    353   
    ::aws_smithy_schema::ShapeId::from_static(
  354    354   
        "com.amazonaws.kms.synthetic#CreateKeyInput$KeyUsage",
  355    355   
        "com.amazonaws.kms.synthetic",
  356    356   
        "CreateKeyInput",
  357    357   
    ),
  358    358   
    ::aws_smithy_schema::ShapeType::String,
  359         -
    "key_usage",
         359  +
    "KeyUsage",
  360    360   
    2,
  361    361   
);
  362    362   
static CREATEKEYINPUT_MEMBER_CUSTOMER_MASTER_KEY_SPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  363    363   
    ::aws_smithy_schema::ShapeId::from_static(
  364    364   
        "com.amazonaws.kms.synthetic#CreateKeyInput$CustomerMasterKeySpec",
  365    365   
        "com.amazonaws.kms.synthetic",
  366    366   
        "CreateKeyInput",
  367    367   
    ),
  368    368   
    ::aws_smithy_schema::ShapeType::String,
  369         -
    "customer_master_key_spec",
         369  +
    "CustomerMasterKeySpec",
  370    370   
    3,
  371    371   
);
  372    372   
static CREATEKEYINPUT_MEMBER_KEY_SPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  373    373   
    ::aws_smithy_schema::ShapeId::from_static(
  374    374   
        "com.amazonaws.kms.synthetic#CreateKeyInput$KeySpec",
  375    375   
        "com.amazonaws.kms.synthetic",
  376    376   
        "CreateKeyInput",
  377    377   
    ),
  378    378   
    ::aws_smithy_schema::ShapeType::String,
  379         -
    "key_spec",
         379  +
    "KeySpec",
  380    380   
    4,
  381    381   
);
  382    382   
static CREATEKEYINPUT_MEMBER_ORIGIN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  383    383   
    ::aws_smithy_schema::ShapeId::from_static(
  384    384   
        "com.amazonaws.kms.synthetic#CreateKeyInput$Origin",
  385    385   
        "com.amazonaws.kms.synthetic",
  386    386   
        "CreateKeyInput",
  387    387   
    ),
  388    388   
    ::aws_smithy_schema::ShapeType::String,
  389         -
    "origin",
         389  +
    "Origin",
  390    390   
    5,
  391    391   
);
  392    392   
static CREATEKEYINPUT_MEMBER_CUSTOM_KEY_STORE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  393    393   
    ::aws_smithy_schema::ShapeId::from_static(
  394    394   
        "com.amazonaws.kms.synthetic#CreateKeyInput$CustomKeyStoreId",
  395    395   
        "com.amazonaws.kms.synthetic",
  396    396   
        "CreateKeyInput",
  397    397   
    ),
  398    398   
    ::aws_smithy_schema::ShapeType::String,
  399         -
    "custom_key_store_id",
         399  +
    "CustomKeyStoreId",
  400    400   
    6,
  401    401   
);
  402    402   
static CREATEKEYINPUT_MEMBER_BYPASS_POLICY_LOCKOUT_SAFETY_CHECK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  403    403   
    ::aws_smithy_schema::ShapeId::from_static(
  404    404   
        "com.amazonaws.kms.synthetic#CreateKeyInput$BypassPolicyLockoutSafetyCheck",
  405    405   
        "com.amazonaws.kms.synthetic",
  406    406   
        "CreateKeyInput",
  407    407   
    ),
  408    408   
    ::aws_smithy_schema::ShapeType::Boolean,
  409         -
    "bypass_policy_lockout_safety_check",
         409  +
    "BypassPolicyLockoutSafetyCheck",
  410    410   
    7,
  411    411   
);
  412    412   
static CREATEKEYINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  413    413   
    ::aws_smithy_schema::ShapeId::from_static(
  414    414   
        "com.amazonaws.kms.synthetic#CreateKeyInput$Tags",
  415    415   
        "com.amazonaws.kms.synthetic",
  416    416   
        "CreateKeyInput",
  417    417   
    ),
  418    418   
    ::aws_smithy_schema::ShapeType::List,
  419         -
    "tags",
         419  +
    "Tags",
  420    420   
    8,
  421    421   
);
  422    422   
static CREATEKEYINPUT_MEMBER_MULTI_REGION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  423    423   
    ::aws_smithy_schema::ShapeId::from_static(
  424    424   
        "com.amazonaws.kms.synthetic#CreateKeyInput$MultiRegion",
  425    425   
        "com.amazonaws.kms.synthetic",
  426    426   
        "CreateKeyInput",
  427    427   
    ),
  428    428   
    ::aws_smithy_schema::ShapeType::Boolean,
  429         -
    "multi_region",
         429  +
    "MultiRegion",
  430    430   
    9,
  431    431   
);
  432    432   
static CREATEKEYINPUT_MEMBER_XKS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  433    433   
    ::aws_smithy_schema::ShapeId::from_static(
  434    434   
        "com.amazonaws.kms.synthetic#CreateKeyInput$XksKeyId",
  435    435   
        "com.amazonaws.kms.synthetic",
  436    436   
        "CreateKeyInput",
  437    437   
    ),
  438    438   
    ::aws_smithy_schema::ShapeType::String,
  439         -
    "xks_key_id",
         439  +
    "XksKeyId",
  440    440   
    10,
  441    441   
);
  442    442   
static CREATEKEYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  443    443   
    CREATEKEYINPUT_SCHEMA_ID,
  444    444   
    ::aws_smithy_schema::ShapeType::Structure,
  445    445   
    &[
  446    446   
        &CREATEKEYINPUT_MEMBER_POLICY,
  447    447   
        &CREATEKEYINPUT_MEMBER_DESCRIPTION,
  448    448   
        &CREATEKEYINPUT_MEMBER_KEY_USAGE,
  449    449   
        &CREATEKEYINPUT_MEMBER_CUSTOMER_MASTER_KEY_SPEC,
@@ -485,485 +610,618 @@
  505    505   
            ser.write_boolean(&CREATEKEYINPUT_MEMBER_MULTI_REGION, *val)?;
  506    506   
        }
  507    507   
        if let Some(ref val) = self.xks_key_id {
  508    508   
            ser.write_string(&CREATEKEYINPUT_MEMBER_XKS_KEY_ID, val)?;
  509    509   
        }
  510    510   
        Ok(())
  511    511   
    }
  512    512   
}
  513    513   
impl CreateKeyInput {
  514    514   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  515         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  516         -
        deserializer: &mut D,
         515  +
    pub fn deserialize(
         516  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  517    517   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  518    518   
        #[allow(unused_variables, unused_mut)]
  519    519   
        let mut builder = Self::builder();
  520    520   
        #[allow(
  521    521   
            unused_variables,
  522    522   
            unreachable_code,
  523    523   
            clippy::single_match,
  524    524   
            clippy::match_single_binding,
  525    525   
            clippy::diverging_sub_expression
  526    526   
        )]
  527         -
        deserializer.read_struct(&CREATEKEYINPUT_SCHEMA, (), |_, member, deser| {
         527  +
        deserializer.read_struct(&CREATEKEYINPUT_SCHEMA, &mut |member, deser| {
  528    528   
            match member.member_index() {
  529    529   
                Some(0) => {
  530    530   
                    builder.policy = Some(deser.read_string(member)?);
  531    531   
                }
  532    532   
                Some(1) => {
  533    533   
                    builder.description = Some(deser.read_string(member)?);
  534    534   
                }
  535    535   
                Some(2) => {
  536    536   
                    builder.key_usage = Some(crate::types::KeyUsageType::from(deser.read_string(member)?.as_str()));
  537    537   
                }
  538    538   
                Some(3) => {
  539    539   
                    builder.customer_master_key_spec = Some(crate::types::CustomerMasterKeySpec::from(deser.read_string(member)?.as_str()));
  540    540   
                }
  541    541   
                Some(4) => {
  542    542   
                    builder.key_spec = Some(crate::types::KeySpec::from(deser.read_string(member)?.as_str()));
  543    543   
                }
  544    544   
                Some(5) => {
  545    545   
                    builder.origin = Some(crate::types::OriginType::from(deser.read_string(member)?.as_str()));
  546    546   
                }
  547    547   
                Some(6) => {
  548    548   
                    builder.custom_key_store_id = Some(deser.read_string(member)?);
  549    549   
                }
  550    550   
                Some(7) => {
  551    551   
                    builder.bypass_policy_lockout_safety_check = Some(deser.read_boolean(member)?);
  552    552   
                }
  553    553   
                Some(8) => {
  554    554   
                    builder.tags = Some({
  555         -
                        let container = if let Some(cap) = deser.container_size() {
  556         -
                            Vec::with_capacity(cap)
  557         -
                        } else {
  558         -
                            Vec::new()
  559         -
                        };
  560         -
                        deser.read_list(member, container, |mut list, deser| {
  561         -
                            list.push(crate::types::Tag::deserialize(deser)?);
  562         -
                            Ok(list)
  563         -
                        })?
         555  +
                        let mut container = Vec::new();
         556  +
                        deser.read_list(member, &mut |deser| {
         557  +
                            container.push(crate::types::Tag::deserialize(deser)?);
         558  +
                            Ok(())
         559  +
                        })?;
         560  +
                        container
  564    561   
                    });
  565    562   
                }
  566    563   
                Some(9) => {
  567    564   
                    builder.multi_region = Some(deser.read_boolean(member)?);
  568    565   
                }
  569    566   
                Some(10) => {
  570    567   
                    builder.xks_key_id = Some(deser.read_string(member)?);
  571    568   
                }
  572    569   
                _ => {}
  573    570   
            }
  574    571   
            Ok(())
  575    572   
        })?;
  576    573   
        builder
  577    574   
            .build()
  578    575   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  579    576   
    }
  580    577   
}
         578  +
impl CreateKeyInput {
         579  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         580  +
    pub fn deserialize_with_response(
         581  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         582  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         583  +
        _status: u16,
         584  +
        _body: &[u8],
         585  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         586  +
        Self::deserialize(deserializer)
         587  +
    }
         588  +
}
  581    589   
impl CreateKeyInput {
  582    590   
    /// Creates a new builder-style object to manufacture [`CreateKeyInput`](crate::operation::create_key::CreateKeyInput).
  583    591   
    pub fn builder() -> crate::operation::create_key::builders::CreateKeyInputBuilder {
  584    592   
        crate::operation::create_key::builders::CreateKeyInputBuilder::default()
  585    593   
    }
  586    594   
}
  587    595   
  588    596   
/// A builder for [`CreateKeyInput`](crate::operation::create_key::CreateKeyInput).
  589    597   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  590    598   
#[non_exhaustive]

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

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

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