AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

@@ -75,75 +291,294 @@
   95     95   
    "com.amazonaws.kms.synthetic",
   96     96   
    "DeriveSharedSecretInput",
   97     97   
);
   98     98   
static DERIVESHAREDSECRETINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$KeyId",
  101    101   
        "com.amazonaws.kms.synthetic",
  102    102   
        "DeriveSharedSecretInput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::String,
  105         -
    "key_id",
         105  +
    "KeyId",
  106    106   
    0,
  107    107   
);
  108    108   
static DERIVESHAREDSECRETINPUT_MEMBER_KEY_AGREEMENT_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$KeyAgreementAlgorithm",
  111    111   
        "com.amazonaws.kms.synthetic",
  112    112   
        "DeriveSharedSecretInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "key_agreement_algorithm",
         115  +
    "KeyAgreementAlgorithm",
  116    116   
    1,
  117    117   
);
  118    118   
static DERIVESHAREDSECRETINPUT_MEMBER_PUBLIC_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$PublicKey",
  121    121   
        "com.amazonaws.kms.synthetic",
  122    122   
        "DeriveSharedSecretInput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::Blob,
  125         -
    "public_key",
         125  +
    "PublicKey",
  126    126   
    2,
  127    127   
);
  128    128   
static DERIVESHAREDSECRETINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$GrantTokens",
  131    131   
        "com.amazonaws.kms.synthetic",
  132    132   
        "DeriveSharedSecretInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::List,
  135         -
    "grant_tokens",
         135  +
    "GrantTokens",
  136    136   
    3,
  137    137   
);
  138    138   
static DERIVESHAREDSECRETINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$DryRun",
  141    141   
        "com.amazonaws.kms.synthetic",
  142    142   
        "DeriveSharedSecretInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::Boolean,
  145         -
    "dry_run",
         145  +
    "DryRun",
  146    146   
    4,
  147    147   
);
  148    148   
static DERIVESHAREDSECRETINPUT_MEMBER_RECIPIENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretInput$Recipient",
  151    151   
        "com.amazonaws.kms.synthetic",
  152    152   
        "DeriveSharedSecretInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::Structure,
  155         -
    "recipient",
         155  +
    "Recipient",
  156    156   
    5,
  157    157   
);
  158    158   
static DERIVESHAREDSECRETINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  159    159   
    DERIVESHAREDSECRETINPUT_SCHEMA_ID,
  160    160   
    ::aws_smithy_schema::ShapeType::Structure,
  161    161   
    &[
  162    162   
        &DERIVESHAREDSECRETINPUT_MEMBER_KEY_ID,
  163    163   
        &DERIVESHAREDSECRETINPUT_MEMBER_KEY_AGREEMENT_ALGORITHM,
  164    164   
        &DERIVESHAREDSECRETINPUT_MEMBER_PUBLIC_KEY,
  165    165   
        &DERIVESHAREDSECRETINPUT_MEMBER_GRANT_TOKENS,
  166    166   
        &DERIVESHAREDSECRETINPUT_MEMBER_DRY_RUN,
  167    167   
        &DERIVESHAREDSECRETINPUT_MEMBER_RECIPIENT,
  168    168   
    ],
  169    169   
);
  170    170   
impl DeriveSharedSecretInput {
  171    171   
    /// The schema for this shape.
  172    172   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DERIVESHAREDSECRETINPUT_SCHEMA;
  173    173   
}
  174    174   
impl ::aws_smithy_schema::serde::SerializableStruct for DeriveSharedSecretInput {
  175    175   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  176    176   
    fn serialize_members(
  177    177   
        &self,
  178    178   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  179    179   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  180    180   
        if let Some(ref val) = self.key_id {
  181    181   
            ser.write_string(&DERIVESHAREDSECRETINPUT_MEMBER_KEY_ID, val)?;
  182    182   
        }
  183    183   
        if let Some(ref val) = self.key_agreement_algorithm {
  184    184   
            ser.write_string(&DERIVESHAREDSECRETINPUT_MEMBER_KEY_AGREEMENT_ALGORITHM, val.as_str())?;
  185    185   
        }
  186    186   
        if let Some(ref val) = self.public_key {
  187    187   
            ser.write_blob(&DERIVESHAREDSECRETINPUT_MEMBER_PUBLIC_KEY, val)?;
  188    188   
        }
  189    189   
        if let Some(ref val) = self.grant_tokens {
  190    190   
            ser.write_list(
  191    191   
                &DERIVESHAREDSECRETINPUT_MEMBER_GRANT_TOKENS,
  192    192   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  193    193   
                    for item in val {
  194    194   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  195    195   
                    }
  196    196   
                    Ok(())
  197    197   
                },
  198    198   
            )?;
  199    199   
        }
  200    200   
        if let Some(ref val) = self.dry_run {
  201    201   
            ser.write_boolean(&DERIVESHAREDSECRETINPUT_MEMBER_DRY_RUN, *val)?;
  202    202   
        }
  203    203   
        if let Some(ref val) = self.recipient {
  204    204   
            ser.write_struct(&DERIVESHAREDSECRETINPUT_MEMBER_RECIPIENT, val)?;
  205    205   
        }
  206    206   
        Ok(())
  207    207   
    }
  208    208   
}
  209    209   
impl DeriveSharedSecretInput {
  210    210   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  211         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  212         -
        deserializer: &mut D,
         211  +
    pub fn deserialize(
         212  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  213    213   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  214    214   
        #[allow(unused_variables, unused_mut)]
  215    215   
        let mut builder = Self::builder();
  216    216   
        #[allow(
  217    217   
            unused_variables,
  218    218   
            unreachable_code,
  219    219   
            clippy::single_match,
  220    220   
            clippy::match_single_binding,
  221    221   
            clippy::diverging_sub_expression
  222    222   
        )]
  223         -
        deserializer.read_struct(&DERIVESHAREDSECRETINPUT_SCHEMA, (), |_, member, deser| {
         223  +
        deserializer.read_struct(&DERIVESHAREDSECRETINPUT_SCHEMA, &mut |member, deser| {
  224    224   
            match member.member_index() {
  225    225   
                Some(0) => {
  226    226   
                    builder.key_id = Some(deser.read_string(member)?);
  227    227   
                }
  228    228   
                Some(1) => {
  229    229   
                    builder.key_agreement_algorithm = Some(crate::types::KeyAgreementAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  230    230   
                }
  231    231   
                Some(2) => {
  232    232   
                    builder.public_key = Some(deser.read_blob(member)?);
  233    233   
                }
  234    234   
                Some(3) => {
  235         -
                    builder.grant_tokens = Some({
  236         -
                        let container = if let Some(cap) = deser.container_size() {
  237         -
                            Vec::with_capacity(cap)
  238         -
                        } else {
  239         -
                            Vec::new()
  240         -
                        };
  241         -
                        deser.read_list(member, container, |mut list, deser| {
  242         -
                            list.push(deser.read_string(member)?);
  243         -
                            Ok(list)
  244         -
                        })?
  245         -
                    });
         235  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  246    236   
                }
  247    237   
                Some(4) => {
  248    238   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  249    239   
                }
  250    240   
                Some(5) => {
  251    241   
                    builder.recipient = Some(crate::types::RecipientInfo::deserialize(deser)?);
  252    242   
                }
  253    243   
                _ => {}
  254    244   
            }
  255    245   
            Ok(())
  256    246   
        })?;
         247  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         248  +
        builder.public_key = builder.public_key.or(Some(::aws_smithy_types::Blob::new("")));
  257    249   
        builder
  258    250   
            .build()
  259    251   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  260    252   
    }
  261    253   
}
         254  +
impl DeriveSharedSecretInput {
         255  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         256  +
    pub fn deserialize_with_response(
         257  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         258  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         259  +
        _status: u16,
         260  +
        _body: &[u8],
         261  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         262  +
        Self::deserialize(deserializer)
         263  +
    }
         264  +
}
  262    265   
impl DeriveSharedSecretInput {
  263    266   
    /// Creates a new builder-style object to manufacture [`DeriveSharedSecretInput`](crate::operation::derive_shared_secret::DeriveSharedSecretInput).
  264    267   
    pub fn builder() -> crate::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder {
  265    268   
        crate::operation::derive_shared_secret::builders::DeriveSharedSecretInputBuilder::default()
  266    269   
    }
  267    270   
}
  268    271   
  269    272   
/// A builder for [`DeriveSharedSecretInput`](crate::operation::derive_shared_secret::DeriveSharedSecretInput).
  270    273   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  271    274   
#[non_exhaustive]

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

@@ -42,42 +198,255 @@
   62     62   
    "com.amazonaws.kms.synthetic",
   63     63   
    "DeriveSharedSecretOutput",
   64     64   
);
   65     65   
static DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   66     66   
    ::aws_smithy_schema::ShapeId::from_static(
   67     67   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretOutput$KeyId",
   68     68   
        "com.amazonaws.kms.synthetic",
   69     69   
        "DeriveSharedSecretOutput",
   70     70   
    ),
   71     71   
    ::aws_smithy_schema::ShapeType::String,
   72         -
    "key_id",
          72  +
    "KeyId",
   73     73   
    0,
   74     74   
);
   75     75   
static DERIVESHAREDSECRETOUTPUT_MEMBER_SHARED_SECRET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   76     76   
    ::aws_smithy_schema::ShapeId::from_static(
   77     77   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretOutput$SharedSecret",
   78     78   
        "com.amazonaws.kms.synthetic",
   79     79   
        "DeriveSharedSecretOutput",
   80     80   
    ),
   81     81   
    ::aws_smithy_schema::ShapeType::Blob,
   82         -
    "shared_secret",
          82  +
    "SharedSecret",
   83     83   
    1,
   84     84   
);
   85     85   
static DERIVESHAREDSECRETOUTPUT_MEMBER_CIPHERTEXT_FOR_RECIPIENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   86     86   
    ::aws_smithy_schema::ShapeId::from_static(
   87     87   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretOutput$CiphertextForRecipient",
   88     88   
        "com.amazonaws.kms.synthetic",
   89     89   
        "DeriveSharedSecretOutput",
   90     90   
    ),
   91     91   
    ::aws_smithy_schema::ShapeType::Blob,
   92         -
    "ciphertext_for_recipient",
          92  +
    "CiphertextForRecipient",
   93     93   
    2,
   94     94   
);
   95     95   
static DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_AGREEMENT_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   96     96   
    ::aws_smithy_schema::ShapeId::from_static(
   97     97   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretOutput$KeyAgreementAlgorithm",
   98     98   
        "com.amazonaws.kms.synthetic",
   99     99   
        "DeriveSharedSecretOutput",
  100    100   
    ),
  101    101   
    ::aws_smithy_schema::ShapeType::String,
  102         -
    "key_agreement_algorithm",
         102  +
    "KeyAgreementAlgorithm",
  103    103   
    3,
  104    104   
);
  105    105   
static DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ORIGIN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "com.amazonaws.kms.synthetic#DeriveSharedSecretOutput$KeyOrigin",
  108    108   
        "com.amazonaws.kms.synthetic",
  109    109   
        "DeriveSharedSecretOutput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::String,
  112         -
    "key_origin",
         112  +
    "KeyOrigin",
  113    113   
    4,
  114    114   
);
         115  +
static DERIVESHAREDSECRETOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         116  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         117  +
    ::aws_smithy_schema::ShapeType::String,
         118  +
    "request_id",
         119  +
    5,
         120  +
)
         121  +
.with_http_header("x-amzn-requestid");
  115    122   
static DERIVESHAREDSECRETOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  116    123   
    DERIVESHAREDSECRETOUTPUT_SCHEMA_ID,
  117    124   
    ::aws_smithy_schema::ShapeType::Structure,
  118    125   
    &[
  119    126   
        &DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ID,
  120    127   
        &DERIVESHAREDSECRETOUTPUT_MEMBER_SHARED_SECRET,
  121    128   
        &DERIVESHAREDSECRETOUTPUT_MEMBER_CIPHERTEXT_FOR_RECIPIENT,
  122    129   
        &DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_AGREEMENT_ALGORITHM,
  123    130   
        &DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ORIGIN,
         131  +
        &DERIVESHAREDSECRETOUTPUT_MEMBER__REQUEST_ID,
  124    132   
    ],
  125    133   
);
  126    134   
impl DeriveSharedSecretOutput {
  127    135   
    /// The schema for this shape.
  128    136   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DERIVESHAREDSECRETOUTPUT_SCHEMA;
  129    137   
}
  130    138   
impl ::aws_smithy_schema::serde::SerializableStruct for DeriveSharedSecretOutput {
  131    139   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  132    140   
    fn serialize_members(
  133    141   
        &self,
  134    142   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  135    143   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  136    144   
        if let Some(ref val) = self.key_id {
  137    145   
            ser.write_string(&DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ID, val)?;
  138    146   
        }
  139    147   
        if let Some(ref val) = self.shared_secret {
  140    148   
            ser.write_blob(&DERIVESHAREDSECRETOUTPUT_MEMBER_SHARED_SECRET, val)?;
  141    149   
        }
  142    150   
        if let Some(ref val) = self.ciphertext_for_recipient {
  143    151   
            ser.write_blob(&DERIVESHAREDSECRETOUTPUT_MEMBER_CIPHERTEXT_FOR_RECIPIENT, val)?;
  144    152   
        }
  145    153   
        if let Some(ref val) = self.key_agreement_algorithm {
  146    154   
            ser.write_string(&DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_AGREEMENT_ALGORITHM, val.as_str())?;
  147    155   
        }
  148    156   
        if let Some(ref val) = self.key_origin {
  149    157   
            ser.write_string(&DERIVESHAREDSECRETOUTPUT_MEMBER_KEY_ORIGIN, val.as_str())?;
  150    158   
        }
  151    159   
        Ok(())
  152    160   
    }
  153    161   
}
  154    162   
impl DeriveSharedSecretOutput {
  155    163   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  156         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  157         -
        deserializer: &mut D,
         164  +
    pub fn deserialize(
         165  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  158    166   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  159    167   
        #[allow(unused_variables, unused_mut)]
  160    168   
        let mut builder = Self::builder();
  161    169   
        #[allow(
  162    170   
            unused_variables,
  163    171   
            unreachable_code,
  164    172   
            clippy::single_match,
  165    173   
            clippy::match_single_binding,
  166    174   
            clippy::diverging_sub_expression
  167    175   
        )]
  168         -
        deserializer.read_struct(&DERIVESHAREDSECRETOUTPUT_SCHEMA, (), |_, member, deser| {
         176  +
        deserializer.read_struct(&DERIVESHAREDSECRETOUTPUT_SCHEMA, &mut |member, deser| {
         177  +
            match member.member_index() {
         178  +
                Some(0) => {
         179  +
                    builder.key_id = Some(deser.read_string(member)?);
         180  +
                }
         181  +
                Some(1) => {
         182  +
                    builder.shared_secret = Some(deser.read_blob(member)?);
         183  +
                }
         184  +
                Some(2) => {
         185  +
                    builder.ciphertext_for_recipient = Some(deser.read_blob(member)?);
         186  +
                }
         187  +
                Some(3) => {
         188  +
                    builder.key_agreement_algorithm = Some(crate::types::KeyAgreementAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         189  +
                }
         190  +
                Some(4) => {
         191  +
                    builder.key_origin = Some(crate::types::OriginType::from(deser.read_string(member)?.as_str()));
         192  +
                }
         193  +
                Some(5) => {
         194  +
                    builder._request_id = Some(deser.read_string(member)?);
         195  +
                }
         196  +
                _ => {}
         197  +
            }
         198  +
            Ok(())
         199  +
        })?;
         200  +
        Ok(builder.build())
         201  +
    }
         202  +
}
         203  +
impl DeriveSharedSecretOutput {
         204  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         205  +
    /// Header-bound members are read directly from headers, avoiding runtime
         206  +
    /// member iteration overhead. Body members are read via the deserializer.
         207  +
    pub fn deserialize_with_response(
         208  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         209  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         210  +
        _status: u16,
         211  +
        _body: &[u8],
         212  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         213  +
        #[allow(unused_variables, unused_mut)]
         214  +
        let mut builder = Self::builder();
         215  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         216  +
            builder._request_id = Some(val.to_string());
         217  +
        }
         218  +
        #[allow(
         219  +
            unused_variables,
         220  +
            unreachable_code,
         221  +
            clippy::single_match,
         222  +
            clippy::match_single_binding,
         223  +
            clippy::diverging_sub_expression
         224  +
        )]
         225  +
        deserializer.read_struct(&DERIVESHAREDSECRETOUTPUT_SCHEMA, &mut |member, deser| {
  169    226   
            match member.member_index() {
  170    227   
                Some(0) => {
  171    228   
                    builder.key_id = Some(deser.read_string(member)?);
  172    229   
                }
  173    230   
                Some(1) => {
  174    231   
                    builder.shared_secret = Some(deser.read_blob(member)?);
  175    232   
                }
  176    233   
                Some(2) => {
  177    234   
                    builder.ciphertext_for_recipient = Some(deser.read_blob(member)?);
  178    235   
                }

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

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

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

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

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

@@ -12,12 +161,216 @@
   32     32   
    "com.amazonaws.kms.synthetic",
   33     33   
    "DescribeCustomKeyStoresOutput",
   34     34   
);
   35     35   
static DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_CUSTOM_KEY_STORES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   36     36   
    ::aws_smithy_schema::ShapeId::from_static(
   37     37   
        "com.amazonaws.kms.synthetic#DescribeCustomKeyStoresOutput$CustomKeyStores",
   38     38   
        "com.amazonaws.kms.synthetic",
   39     39   
        "DescribeCustomKeyStoresOutput",
   40     40   
    ),
   41     41   
    ::aws_smithy_schema::ShapeType::List,
   42         -
    "custom_key_stores",
          42  +
    "CustomKeyStores",
   43     43   
    0,
   44     44   
);
   45     45   
static DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_NEXT_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.kms.synthetic#DescribeCustomKeyStoresOutput$NextMarker",
   48     48   
        "com.amazonaws.kms.synthetic",
   49     49   
        "DescribeCustomKeyStoresOutput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "next_marker",
          52  +
    "NextMarker",
   53     53   
    1,
   54     54   
);
   55     55   
static DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_TRUNCATED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.kms.synthetic#DescribeCustomKeyStoresOutput$Truncated",
   58     58   
        "com.amazonaws.kms.synthetic",
   59     59   
        "DescribeCustomKeyStoresOutput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Boolean,
   62         -
    "truncated",
          62  +
    "Truncated",
   63     63   
    2,
   64     64   
);
          65  +
static DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          66  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          67  +
    ::aws_smithy_schema::ShapeType::String,
          68  +
    "request_id",
          69  +
    3,
          70  +
)
          71  +
.with_http_header("x-amzn-requestid");
   65     72   
static DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   66     73   
    DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA_ID,
   67     74   
    ::aws_smithy_schema::ShapeType::Structure,
   68     75   
    &[
   69     76   
        &DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_CUSTOM_KEY_STORES,
   70     77   
        &DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_NEXT_MARKER,
   71     78   
        &DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_TRUNCATED,
          79  +
        &DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER__REQUEST_ID,
   72     80   
    ],
   73     81   
);
   74     82   
impl DescribeCustomKeyStoresOutput {
   75     83   
    /// The schema for this shape.
   76     84   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA;
   77     85   
}
   78     86   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeCustomKeyStoresOutput {
   79     87   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   80     88   
    fn serialize_members(
   81     89   
        &self,
   82     90   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   83     91   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   84     92   
        if let Some(ref val) = self.custom_key_stores {
   85     93   
            ser.write_list(
   86     94   
                &DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_CUSTOM_KEY_STORES,
   87     95   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   88     96   
                    for item in val {
   89     97   
                        ser.write_struct(crate::types::CustomKeyStoresListEntry::SCHEMA, item)?;
   90     98   
                    }
   91     99   
                    Ok(())
   92    100   
                },
   93    101   
            )?;
   94    102   
        }
   95    103   
        if let Some(ref val) = self.next_marker {
   96    104   
            ser.write_string(&DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_NEXT_MARKER, val)?;
   97    105   
        }
   98    106   
        {
   99    107   
            let val = &self.truncated;
  100    108   
            ser.write_boolean(&DESCRIBECUSTOMKEYSTORESOUTPUT_MEMBER_TRUNCATED, *val)?;
  101    109   
        }
  102    110   
        Ok(())
  103    111   
    }
  104    112   
}
  105    113   
impl DescribeCustomKeyStoresOutput {
  106    114   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  107         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  108         -
        deserializer: &mut D,
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         117  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         118  +
        #[allow(unused_variables, unused_mut)]
         119  +
        let mut builder = Self::builder();
         120  +
        #[allow(
         121  +
            unused_variables,
         122  +
            unreachable_code,
         123  +
            clippy::single_match,
         124  +
            clippy::match_single_binding,
         125  +
            clippy::diverging_sub_expression
         126  +
        )]
         127  +
        deserializer.read_struct(&DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA, &mut |member, deser| {
         128  +
            match member.member_index() {
         129  +
                Some(0) => {
         130  +
                    builder.custom_key_stores = Some({
         131  +
                        let mut container = Vec::new();
         132  +
                        deser.read_list(member, &mut |deser| {
         133  +
                            container.push(crate::types::CustomKeyStoresListEntry::deserialize(deser)?);
         134  +
                            Ok(())
         135  +
                        })?;
         136  +
                        container
         137  +
                    });
         138  +
                }
         139  +
                Some(1) => {
         140  +
                    builder.next_marker = Some(deser.read_string(member)?);
         141  +
                }
         142  +
                Some(2) => {
         143  +
                    builder.truncated = Some(deser.read_boolean(member)?);
         144  +
                }
         145  +
                Some(3) => {
         146  +
                    builder._request_id = Some(deser.read_string(member)?);
         147  +
                }
         148  +
                _ => {}
         149  +
            }
         150  +
            Ok(())
         151  +
        })?;
         152  +
        Ok(builder.build())
         153  +
    }
         154  +
}
         155  +
impl DescribeCustomKeyStoresOutput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         157  +
    /// Header-bound members are read directly from headers, avoiding runtime
         158  +
    /// member iteration overhead. Body members are read via the deserializer.
         159  +
    pub fn deserialize_with_response(
         160  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         161  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         162  +
        _status: u16,
         163  +
        _body: &[u8],
  109    164   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  110    165   
        #[allow(unused_variables, unused_mut)]
  111    166   
        let mut builder = Self::builder();
         167  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         168  +
            builder._request_id = Some(val.to_string());
         169  +
        }
  112    170   
        #[allow(
  113    171   
            unused_variables,
  114    172   
            unreachable_code,
  115    173   
            clippy::single_match,
  116    174   
            clippy::match_single_binding,
  117    175   
            clippy::diverging_sub_expression
  118    176   
        )]
  119         -
        deserializer.read_struct(&DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA, (), |_, member, deser| {
         177  +
        deserializer.read_struct(&DESCRIBECUSTOMKEYSTORESOUTPUT_SCHEMA, &mut |member, deser| {
  120    178   
            match member.member_index() {
  121    179   
                Some(0) => {
  122    180   
                    builder.custom_key_stores = Some({
  123         -
                        let container = if let Some(cap) = deser.container_size() {
  124         -
                            Vec::with_capacity(cap)
  125         -
                        } else {
  126         -
                            Vec::new()
  127         -
                        };
  128         -
                        deser.read_list(member, container, |mut list, deser| {
  129         -
                            list.push(crate::types::CustomKeyStoresListEntry::deserialize(deser)?);
  130         -
                            Ok(list)
  131         -
                        })?
         181  +
                        let mut container = Vec::new();
         182  +
                        deser.read_list(member, &mut |deser| {
         183  +
                            container.push(crate::types::CustomKeyStoresListEntry::deserialize(deser)?);
         184  +
                            Ok(())
         185  +
                        })?;
         186  +
                        container
  132    187   
                    });
  133    188   
                }
  134    189   
                Some(1) => {
  135    190   
                    builder.next_marker = Some(deser.read_string(member)?);
  136    191   
                }
  137    192   
                Some(2) => {
  138    193   
                    builder.truncated = Some(deser.read_boolean(member)?);
  139    194   
                }
  140    195   
                _ => {}
  141    196   
            }

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/describe_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 `DescribeKey`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DescribeKey;
    6      6   
impl DescribeKey {
    7      7   
    /// Creates a new `DescribeKey`
    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::describe_key::DescribeKeyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::describe_key::DescribeKeyOutput::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::describe_key::DescribeKeyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::describe_key::DescribeKeyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::describe_key::DescribeKeyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,351 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DescribeKeyResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeKeyResponseDeserializer {
  145    149   
    fn deserialize_nonstreaming(
  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_describe_key::de_describe_key_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_describe_key::de_describe_key_http_response(status, headers, body)
         158  +
        if !success && status != 200 || force_error {
         159  +
            let headers = response.headers();
         160  +
            let body = response.body().bytes().expect("body loaded");
         161  +
            #[allow(unused_mut)]
         162  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         163  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         164  +
            })?;
         165  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         166  +
            let generic = generic_builder.build();
         167  +
            let error_code = match generic.code() {
         168  +
                ::std::option::Option::Some(code) => code,
         169  +
                ::std::option::Option::None => {
         170  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         171  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::describe_key::DescribeKeyError::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::describe_key::DescribeKeyError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "InvalidArnException" => crate::operation::describe_key::DescribeKeyError::InvalidArnException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
  159    221   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "KMSInternalException" => crate::operation::describe_key::DescribeKeyError::KmsInternalException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "NotFoundException" => crate::operation::describe_key::DescribeKeyError::NotFoundException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::NotFoundException::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  +
                _ => crate::operation::describe_key::DescribeKeyError::generic(generic),
         277  +
            };
         278  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         279  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         280  +
            ))
         281  +
        } else {
         282  +
            let protocol = _cfg
         283  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         284  +
                .expect("a SharedClientProtocol is required");
         285  +
            let mut deser = protocol.deserialize_response(response, DescribeKey::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            let body = response.body().bytes().expect("body loaded");
         289  +
            let output = crate::operation::describe_key::DescribeKeyOutput::deserialize_with_response(
         290  +
                &mut *deser,
         291  +
                response.headers(),
         292  +
                response.status().into(),
         293  +
                body,
         294  +
            )
         295  +
            .map_err(|e| {
         296  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
            })?;
         298  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         299  +
        }
  161    300   
    }
  162    301   
}
  163    302   
#[derive(Debug)]
  164    303   
struct DescribeKeyRequestSerializer;
  165    304   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeKeyRequestSerializer {
  166    305   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    306   
    fn serialize_input(
  168    307   
        &self,
  169    308   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    309   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    310   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    311   
        let input = input
  173    312   
            .downcast::<crate::operation::describe_key::DescribeKeyInput>()
  174    313   
            .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::describe_key::DescribeKeyInput,
  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::describe_key::DescribeKeyInput,
  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.DescribeKey",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_key::ser_describe_key_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        let mut request = protocol
         318  +
            .serialize_request(&input, DescribeKey::INPUT_SCHEMA, "", _cfg)
         319  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         320  +
         321  +
        return ::std::result::Result::Ok(request);
  213    322   
    }
  214    323   
}
  215    324   
#[derive(Debug)]
  216    325   
struct DescribeKeyEndpointParamsInterceptor;
  217    326   
  218    327   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeKeyEndpointParamsInterceptor {
  219    328   
    fn name(&self) -> &'static str {
  220    329   
        "DescribeKeyEndpointParamsInterceptor"
  221    330   
    }
  222    331   

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

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

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

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.kms.synthetic",
   19     19   
    "DescribeKeyOutput",
   20     20   
);
   21     21   
static DESCRIBEKEYOUTPUT_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#DescribeKeyOutput$KeyMetadata",
   24     24   
        "com.amazonaws.kms.synthetic",
   25     25   
        "DescribeKeyOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "key_metadata",
          28  +
    "KeyMetadata",
   29     29   
    0,
   30     30   
);
          31  +
static DESCRIBEKEYOUTPUT_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 DESCRIBEKEYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    DESCRIBEKEYOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&DESCRIBEKEYOUTPUT_MEMBER_KEY_METADATA],
          41  +
    &[&DESCRIBEKEYOUTPUT_MEMBER_KEY_METADATA, &DESCRIBEKEYOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl DescribeKeyOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEKEYOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeKeyOutput {
   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(&DESCRIBEKEYOUTPUT_MEMBER_KEY_METADATA, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl DescribeKeyOutput {
   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(&DESCRIBEKEYOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&DESCRIBEKEYOUTPUT_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 DescribeKeyOutput {
          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(&DESCRIBEKEYOUTPUT_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   
    }