AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/create_alias.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 `CreateAlias`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateAlias;
    6      6   
impl CreateAlias {
    7      7   
    /// Creates a new `CreateAlias`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_alias::CreateAliasInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_alias::CreateAliasOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::create_alias::CreateAliasInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_alias::CreateAliasOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_alias::CreateAliasError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,423 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct CreateAliasResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateAliasResponseDeserializer {
  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_create_alias::de_create_alias_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_create_alias::de_create_alias_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::create_alias::CreateAliasError::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  +
                "AlreadyExistsException" => crate::operation::create_alias::CreateAliasError::AlreadyExistsException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::AlreadyExistsException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::AlreadyExistsException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
  159    197   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "DependencyTimeoutException" => crate::operation::create_alias::CreateAliasError::DependencyTimeoutException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidAliasNameException" => crate::operation::create_alias::CreateAliasError::InvalidAliasNameException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidAliasNameException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidAliasNameException::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  +
                "KMSInternalException" => crate::operation::create_alias::CreateAliasError::KmsInternalException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidStateException" => crate::operation::create_alias::CreateAliasError::KmsInvalidStateException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         281  +
                                &mut *deser,
         282  +
                                response.headers(),
         283  +
                                response.status().into(),
         284  +
                                body,
         285  +
                            )
         286  +
                        }) {
         287  +
                        ::std::result::Result::Ok(val) => val,
         288  +
                        ::std::result::Result::Err(e) => {
         289  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         290  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         291  +
                            ))
         292  +
                        }
         293  +
                    };
         294  +
                    tmp.meta = generic;
         295  +
                    if tmp.message.is_none() {
         296  +
                        tmp.message = _error_message;
         297  +
                    }
         298  +
                    tmp
         299  +
                }),
         300  +
                "LimitExceededException" => crate::operation::create_alias::CreateAliasError::LimitExceededException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                "NotFoundException" => crate::operation::create_alias::CreateAliasError::NotFoundException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                _ => crate::operation::create_alias::CreateAliasError::generic(generic),
         349  +
            };
         350  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         351  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         352  +
            ))
         353  +
        } else {
         354  +
            let protocol = _cfg
         355  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         356  +
                .expect("a SharedClientProtocol is required");
         357  +
            let mut deser = protocol.deserialize_response(response, CreateAlias::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         358  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         359  +
            })?;
         360  +
            let body = response.body().bytes().expect("body loaded");
         361  +
            let output = crate::operation::create_alias::CreateAliasOutput::deserialize_with_response(
         362  +
                &mut *deser,
         363  +
                response.headers(),
         364  +
                response.status().into(),
         365  +
                body,
         366  +
            )
         367  +
            .map_err(|e| {
         368  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         369  +
            })?;
         370  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         371  +
        }
  161    372   
    }
  162    373   
}
  163    374   
#[derive(Debug)]
  164    375   
struct CreateAliasRequestSerializer;
  165    376   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateAliasRequestSerializer {
  166    377   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    378   
    fn serialize_input(
  168    379   
        &self,
  169    380   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    381   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    382   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    383   
        let input = input
  173    384   
            .downcast::<crate::operation::create_alias::CreateAliasInput>()
  174    385   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::create_alias::CreateAliasInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            #[allow(clippy::unnecessary_wraps)]
  190         -
            fn update_http_builder(
  191         -
                input: &crate::operation::create_alias::CreateAliasInput,
  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.CreateAlias",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_alias::ser_create_alias_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         386  +
        let protocol = _cfg
         387  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         388  +
            .expect("a SharedClientProtocol is required");
         389  +
        let mut request = protocol
         390  +
            .serialize_request(&input, CreateAlias::INPUT_SCHEMA, "", _cfg)
         391  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         392  +
         393  +
        return ::std::result::Result::Ok(request);
  213    394   
    }
  214    395   
}
  215    396   
#[derive(Debug)]
  216    397   
struct CreateAliasEndpointParamsInterceptor;
  217    398   
  218    399   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateAliasEndpointParamsInterceptor {
  219    400   
    fn name(&self) -> &'static str {
  220    401   
        "CreateAliasEndpointParamsInterceptor"
  221    402   
    }
  222    403   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/create_custom_key_store.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 `CreateCustomKeyStore`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateCustomKeyStore;
    6      6   
impl CreateCustomKeyStore {
    7      7   
    /// Creates a new `CreateCustomKeyStore`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_custom_key_store::CreateCustomKeyStoreInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_custom_key_store::CreateCustomKeyStoreOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::create_custom_key_store::CreateCustomKeyStoreInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_custom_key_store::CreateCustomKeyStoreOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_custom_key_store::CreateCustomKeyStoreError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +247,706 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateCustomKeyStoreResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateCustomKeyStoreResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_create_custom_key_store::de_create_custom_key_store_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_create_custom_key_store::de_create_custom_key_store_http_response(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         175  +
                            crate::operation::create_custom_key_store::CreateCustomKeyStoreError::unhandled(generic),
         176  +
                        ),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "CloudHsmClusterInUseException" => {
         186  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterInUseException({
         187  +
                        let mut tmp = match protocol
         188  +
                            .deserialize_response(response, crate::types::error::CloudHsmClusterInUseException::SCHEMA, _cfg)
         189  +
                            .and_then(|mut deser| {
         190  +
                                crate::types::error::CloudHsmClusterInUseException::deserialize_with_response(
         191  +
                                    &mut *deser,
         192  +
                                    response.headers(),
         193  +
                                    response.status().into(),
         194  +
                                    body,
         195  +
                                )
         196  +
                            }) {
         197  +
                            ::std::result::Result::Ok(val) => val,
         198  +
                            ::std::result::Result::Err(e) => {
         199  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                                ))
         202  +
                            }
         203  +
                        };
         204  +
                        tmp.meta = generic;
         205  +
                        if tmp.message.is_none() {
         206  +
                            tmp.message = _error_message;
         207  +
                        }
         208  +
                        tmp
         209  +
                    })
         210  +
                }
         211  +
                "CloudHsmClusterInvalidConfigurationException" => {
         212  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException({
         213  +
                        let mut tmp = match protocol
         214  +
                            .deserialize_response(response, crate::types::error::CloudHsmClusterInvalidConfigurationException::SCHEMA, _cfg)
         215  +
                            .and_then(|mut deser| {
         216  +
                                crate::types::error::CloudHsmClusterInvalidConfigurationException::deserialize_with_response(
         217  +
                                    &mut *deser,
         218  +
                                    response.headers(),
         219  +
                                    response.status().into(),
         220  +
                                    body,
         221  +
                                )
         222  +
                            }) {
         223  +
                            ::std::result::Result::Ok(val) => val,
         224  +
                            ::std::result::Result::Err(e) => {
         225  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                                ))
         228  +
                            }
         229  +
                        };
         230  +
                        tmp.meta = generic;
         231  +
                        if tmp.message.is_none() {
         232  +
                            tmp.message = _error_message;
         233  +
                        }
         234  +
                        tmp
         235  +
                    })
         236  +
                }
         237  +
                "CloudHsmClusterNotActiveException" => {
         238  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterNotActiveException({
         239  +
                        let mut tmp = match protocol
         240  +
                            .deserialize_response(response, crate::types::error::CloudHsmClusterNotActiveException::SCHEMA, _cfg)
         241  +
                            .and_then(|mut deser| {
         242  +
                                crate::types::error::CloudHsmClusterNotActiveException::deserialize_with_response(
         243  +
                                    &mut *deser,
         244  +
                                    response.headers(),
         245  +
                                    response.status().into(),
         246  +
                                    body,
         247  +
                                )
         248  +
                            }) {
         249  +
                            ::std::result::Result::Ok(val) => val,
         250  +
                            ::std::result::Result::Err(e) => {
         251  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         252  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         253  +
                                ))
         254  +
                            }
         255  +
                        };
         256  +
                        tmp.meta = generic;
         257  +
                        if tmp.message.is_none() {
         258  +
                            tmp.message = _error_message;
         259  +
                        }
         260  +
                        tmp
         261  +
                    })
         262  +
                }
         263  +
                "CloudHsmClusterNotFoundException" => {
         264  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::CloudHsmClusterNotFoundException({
         265  +
                        let mut tmp = match protocol
         266  +
                            .deserialize_response(response, crate::types::error::CloudHsmClusterNotFoundException::SCHEMA, _cfg)
         267  +
                            .and_then(|mut deser| {
         268  +
                                crate::types::error::CloudHsmClusterNotFoundException::deserialize_with_response(
         269  +
                                    &mut *deser,
         270  +
                                    response.headers(),
         271  +
                                    response.status().into(),
         272  +
                                    body,
         273  +
                                )
         274  +
                            }) {
         275  +
                            ::std::result::Result::Ok(val) => val,
         276  +
                            ::std::result::Result::Err(e) => {
         277  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         278  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         279  +
                                ))
         280  +
                            }
  162    281   
                        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         282  +
                        tmp.meta = generic;
         283  +
                        if tmp.message.is_none() {
         284  +
                            tmp.message = _error_message;
         285  +
                        }
         286  +
                        tmp
         287  +
                    })
         288  +
                }
         289  +
                "CustomKeyStoreNameInUseException" => {
         290  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::CustomKeyStoreNameInUseException({
         291  +
                        let mut tmp = match protocol
         292  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreNameInUseException::SCHEMA, _cfg)
         293  +
                            .and_then(|mut deser| {
         294  +
                                crate::types::error::CustomKeyStoreNameInUseException::deserialize_with_response(
         295  +
                                    &mut *deser,
         296  +
                                    response.headers(),
         297  +
                                    response.status().into(),
         298  +
                                    body,
         299  +
                                )
         300  +
                            }) {
         301  +
                            ::std::result::Result::Ok(val) => val,
         302  +
                            ::std::result::Result::Err(e) => {
         303  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         304  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         305  +
                                ))
         306  +
                            }
         307  +
                        };
         308  +
                        tmp.meta = generic;
         309  +
                        if tmp.message.is_none() {
         310  +
                            tmp.message = _error_message;
         311  +
                        }
         312  +
                        tmp
         313  +
                    })
         314  +
                }
         315  +
                "IncorrectTrustAnchorException" => {
         316  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::IncorrectTrustAnchorException({
         317  +
                        let mut tmp = match protocol
         318  +
                            .deserialize_response(response, crate::types::error::IncorrectTrustAnchorException::SCHEMA, _cfg)
         319  +
                            .and_then(|mut deser| {
         320  +
                                crate::types::error::IncorrectTrustAnchorException::deserialize_with_response(
         321  +
                                    &mut *deser,
         322  +
                                    response.headers(),
         323  +
                                    response.status().into(),
         324  +
                                    body,
         325  +
                                )
         326  +
                            }) {
         327  +
                            ::std::result::Result::Ok(val) => val,
         328  +
                            ::std::result::Result::Err(e) => {
         329  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         330  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         331  +
                                ))
         332  +
                            }
         333  +
                        };
         334  +
                        tmp.meta = generic;
         335  +
                        if tmp.message.is_none() {
         336  +
                            tmp.message = _error_message;
         337  +
                        }
         338  +
                        tmp
         339  +
                    })
         340  +
                }
         341  +
                "KMSInternalException" => crate::operation::create_custom_key_store::CreateCustomKeyStoreError::KmsInternalException({
         342  +
                    let mut tmp = match protocol
         343  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         344  +
                        .and_then(|mut deser| {
         345  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         346  +
                                &mut *deser,
         347  +
                                response.headers(),
         348  +
                                response.status().into(),
         349  +
                                body,
         350  +
                            )
         351  +
                        }) {
         352  +
                        ::std::result::Result::Ok(val) => val,
         353  +
                        ::std::result::Result::Err(e) => {
         354  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         355  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         356  +
                            ))
         357  +
                        }
         358  +
                    };
         359  +
                    tmp.meta = generic;
         360  +
                    if tmp.message.is_none() {
         361  +
                        tmp.message = _error_message;
         362  +
                    }
         363  +
                    tmp
         364  +
                }),
         365  +
                "LimitExceededException" => crate::operation::create_custom_key_store::CreateCustomKeyStoreError::LimitExceededException({
         366  +
                    let mut tmp = match protocol
         367  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         368  +
                        .and_then(|mut deser| {
         369  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         370  +
                                &mut *deser,
         371  +
                                response.headers(),
         372  +
                                response.status().into(),
         373  +
                                body,
         374  +
                            )
         375  +
                        }) {
         376  +
                        ::std::result::Result::Ok(val) => val,
         377  +
                        ::std::result::Result::Err(e) => {
         378  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         379  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         380  +
                            ))
         381  +
                        }
         382  +
                    };
         383  +
                    tmp.meta = generic;
         384  +
                    if tmp.message.is_none() {
         385  +
                        tmp.message = _error_message;
         386  +
                    }
         387  +
                    tmp
         388  +
                }),
         389  +
                "XksProxyIncorrectAuthenticationCredentialException" => {
         390  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyIncorrectAuthenticationCredentialException({
         391  +
                        let mut tmp = match protocol
         392  +
                            .deserialize_response(
         393  +
                                response,
         394  +
                                crate::types::error::XksProxyIncorrectAuthenticationCredentialException::SCHEMA,
         395  +
                                _cfg,
         396  +
                            )
         397  +
                            .and_then(|mut deser| {
         398  +
                                crate::types::error::XksProxyIncorrectAuthenticationCredentialException::deserialize_with_response(
         399  +
                                    &mut *deser,
         400  +
                                    response.headers(),
         401  +
                                    response.status().into(),
         402  +
                                    body,
         403  +
                                )
         404  +
                            }) {
         405  +
                            ::std::result::Result::Ok(val) => val,
         406  +
                            ::std::result::Result::Err(e) => {
         407  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         408  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         409  +
                                ))
         410  +
                            }
         411  +
                        };
         412  +
                        tmp.meta = generic;
         413  +
                        if tmp.message.is_none() {
         414  +
                            tmp.message = _error_message;
         415  +
                        }
         416  +
                        tmp
         417  +
                    })
         418  +
                }
         419  +
                "XksProxyInvalidConfigurationException" => {
         420  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyInvalidConfigurationException({
         421  +
                        let mut tmp = match protocol
         422  +
                            .deserialize_response(response, crate::types::error::XksProxyInvalidConfigurationException::SCHEMA, _cfg)
         423  +
                            .and_then(|mut deser| {
         424  +
                                crate::types::error::XksProxyInvalidConfigurationException::deserialize_with_response(
         425  +
                                    &mut *deser,
         426  +
                                    response.headers(),
         427  +
                                    response.status().into(),
         428  +
                                    body,
         429  +
                                )
         430  +
                            }) {
         431  +
                            ::std::result::Result::Ok(val) => val,
         432  +
                            ::std::result::Result::Err(e) => {
         433  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         434  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         435  +
                                ))
         436  +
                            }
         437  +
                        };
         438  +
                        tmp.meta = generic;
         439  +
                        if tmp.message.is_none() {
         440  +
                            tmp.message = _error_message;
         441  +
                        }
         442  +
                        tmp
         443  +
                    })
         444  +
                }
         445  +
                "XksProxyInvalidResponseException" => {
         446  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyInvalidResponseException({
         447  +
                        let mut tmp = match protocol
         448  +
                            .deserialize_response(response, crate::types::error::XksProxyInvalidResponseException::SCHEMA, _cfg)
         449  +
                            .and_then(|mut deser| {
         450  +
                                crate::types::error::XksProxyInvalidResponseException::deserialize_with_response(
         451  +
                                    &mut *deser,
         452  +
                                    response.headers(),
         453  +
                                    response.status().into(),
         454  +
                                    body,
         455  +
                                )
         456  +
                            }) {
         457  +
                            ::std::result::Result::Ok(val) => val,
         458  +
                            ::std::result::Result::Err(e) => {
         459  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         460  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         461  +
                                ))
         462  +
                            }
         463  +
                        };
         464  +
                        tmp.meta = generic;
         465  +
                        if tmp.message.is_none() {
         466  +
                            tmp.message = _error_message;
         467  +
                        }
         468  +
                        tmp
         469  +
                    })
         470  +
                }
         471  +
                "XksProxyUriEndpointInUseException" => {
         472  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriEndpointInUseException({
         473  +
                        let mut tmp = match protocol
         474  +
                            .deserialize_response(response, crate::types::error::XksProxyUriEndpointInUseException::SCHEMA, _cfg)
         475  +
                            .and_then(|mut deser| {
         476  +
                                crate::types::error::XksProxyUriEndpointInUseException::deserialize_with_response(
         477  +
                                    &mut *deser,
         478  +
                                    response.headers(),
         479  +
                                    response.status().into(),
         480  +
                                    body,
         481  +
                                )
         482  +
                            }) {
         483  +
                            ::std::result::Result::Ok(val) => val,
         484  +
                            ::std::result::Result::Err(e) => {
         485  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         486  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         487  +
                                ))
         488  +
                            }
         489  +
                        };
         490  +
                        tmp.meta = generic;
         491  +
                        if tmp.message.is_none() {
         492  +
                            tmp.message = _error_message;
         493  +
                        }
         494  +
                        tmp
         495  +
                    })
         496  +
                }
         497  +
                "XksProxyUriInUseException" => crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriInUseException({
         498  +
                    let mut tmp = match protocol
         499  +
                        .deserialize_response(response, crate::types::error::XksProxyUriInUseException::SCHEMA, _cfg)
         500  +
                        .and_then(|mut deser| {
         501  +
                            crate::types::error::XksProxyUriInUseException::deserialize_with_response(
         502  +
                                &mut *deser,
         503  +
                                response.headers(),
         504  +
                                response.status().into(),
         505  +
                                body,
         506  +
                            )
         507  +
                        }) {
         508  +
                        ::std::result::Result::Ok(val) => val,
         509  +
                        ::std::result::Result::Err(e) => {
         510  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         511  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         512  +
                            ))
         513  +
                        }
         514  +
                    };
         515  +
                    tmp.meta = generic;
         516  +
                    if tmp.message.is_none() {
         517  +
                        tmp.message = _error_message;
         518  +
                    }
         519  +
                    tmp
         520  +
                }),
         521  +
                "XksProxyUriUnreachableException" => {
         522  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyUriUnreachableException({
         523  +
                        let mut tmp = match protocol
         524  +
                            .deserialize_response(response, crate::types::error::XksProxyUriUnreachableException::SCHEMA, _cfg)
         525  +
                            .and_then(|mut deser| {
         526  +
                                crate::types::error::XksProxyUriUnreachableException::deserialize_with_response(
         527  +
                                    &mut *deser,
         528  +
                                    response.headers(),
         529  +
                                    response.status().into(),
         530  +
                                    body,
         531  +
                                )
         532  +
                            }) {
         533  +
                            ::std::result::Result::Ok(val) => val,
         534  +
                            ::std::result::Result::Err(e) => {
         535  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         536  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         537  +
                                ))
         538  +
                            }
         539  +
                        };
         540  +
                        tmp.meta = generic;
         541  +
                        if tmp.message.is_none() {
         542  +
                            tmp.message = _error_message;
         543  +
                        }
         544  +
                        tmp
         545  +
                    })
         546  +
                }
         547  +
                "XksProxyVpcEndpointServiceInUseException" => {
         548  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceInUseException({
         549  +
                        let mut tmp = match protocol
         550  +
                            .deserialize_response(response, crate::types::error::XksProxyVpcEndpointServiceInUseException::SCHEMA, _cfg)
         551  +
                            .and_then(|mut deser| {
         552  +
                                crate::types::error::XksProxyVpcEndpointServiceInUseException::deserialize_with_response(
         553  +
                                    &mut *deser,
         554  +
                                    response.headers(),
         555  +
                                    response.status().into(),
         556  +
                                    body,
         557  +
                                )
         558  +
                            }) {
         559  +
                            ::std::result::Result::Ok(val) => val,
         560  +
                            ::std::result::Result::Err(e) => {
         561  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         562  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         563  +
                                ))
         564  +
                            }
         565  +
                        };
         566  +
                        tmp.meta = generic;
         567  +
                        if tmp.message.is_none() {
         568  +
                            tmp.message = _error_message;
         569  +
                        }
         570  +
                        tmp
         571  +
                    })
         572  +
                }
         573  +
                "XksProxyVpcEndpointServiceInvalidConfigurationException" => {
         574  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceInvalidConfigurationException({
         575  +
                        let mut tmp = match protocol
         576  +
                            .deserialize_response(
         577  +
                                response,
         578  +
                                crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::SCHEMA,
         579  +
                                _cfg,
         580  +
                            )
         581  +
                            .and_then(|mut deser| {
         582  +
                                crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::deserialize_with_response(
         583  +
                                    &mut *deser,
         584  +
                                    response.headers(),
         585  +
                                    response.status().into(),
         586  +
                                    body,
         587  +
                                )
         588  +
                            }) {
         589  +
                            ::std::result::Result::Ok(val) => val,
         590  +
                            ::std::result::Result::Err(e) => {
         591  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         592  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         593  +
                                ))
         594  +
                            }
         595  +
                        };
         596  +
                        tmp.meta = generic;
         597  +
                        if tmp.message.is_none() {
         598  +
                            tmp.message = _error_message;
         599  +
                        }
         600  +
                        tmp
         601  +
                    })
         602  +
                }
         603  +
                "XksProxyVpcEndpointServiceNotFoundException" => {
         604  +
                    crate::operation::create_custom_key_store::CreateCustomKeyStoreError::XksProxyVpcEndpointServiceNotFoundException({
         605  +
                        let mut tmp = match protocol
         606  +
                            .deserialize_response(response, crate::types::error::XksProxyVpcEndpointServiceNotFoundException::SCHEMA, _cfg)
         607  +
                            .and_then(|mut deser| {
         608  +
                                crate::types::error::XksProxyVpcEndpointServiceNotFoundException::deserialize_with_response(
         609  +
                                    &mut *deser,
         610  +
                                    response.headers(),
         611  +
                                    response.status().into(),
         612  +
                                    body,
         613  +
                                )
         614  +
                            }) {
         615  +
                            ::std::result::Result::Ok(val) => val,
         616  +
                            ::std::result::Result::Err(e) => {
         617  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         618  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         619  +
                                ))
         620  +
                            }
         621  +
                        };
         622  +
                        tmp.meta = generic;
         623  +
                        if tmp.message.is_none() {
         624  +
                            tmp.message = _error_message;
         625  +
                        }
         626  +
                        tmp
         627  +
                    })
         628  +
                }
         629  +
                _ => crate::operation::create_custom_key_store::CreateCustomKeyStoreError::generic(generic),
         630  +
            };
         631  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         632  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         633  +
            ))
         634  +
        } else {
         635  +
            let protocol = _cfg
         636  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         637  +
                .expect("a SharedClientProtocol is required");
         638  +
            let mut deser = protocol
         639  +
                .deserialize_response(response, CreateCustomKeyStore::OUTPUT_SCHEMA, _cfg)
         640  +
                .map_err(|e| {
         641  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         642  +
                })?;
         643  +
            let body = response.body().bytes().expect("body loaded");
         644  +
            let output = crate::operation::create_custom_key_store::CreateCustomKeyStoreOutput::deserialize_with_response(
         645  +
                &mut *deser,
         646  +
                response.headers(),
         647  +
                response.status().into(),
         648  +
                body,
         649  +
            )
         650  +
            .map_err(|e| {
         651  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         652  +
            })?;
         653  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         654  +
        }
  164    655   
    }
  165    656   
}
  166    657   
#[derive(Debug)]
  167    658   
struct CreateCustomKeyStoreRequestSerializer;
  168    659   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateCustomKeyStoreRequestSerializer {
  169    660   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    661   
    fn serialize_input(
  171    662   
        &self,
  172    663   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    664   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    665   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    666   
        let input = input
  176    667   
            .downcast::<crate::operation::create_custom_key_store::CreateCustomKeyStoreInput>()
  177    668   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::create_custom_key_store::CreateCustomKeyStoreInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::create_custom_key_store::CreateCustomKeyStoreInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "TrentService.CreateCustomKeyStore",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_custom_key_store::ser_create_custom_key_store_input(
  211         -
            &input,
  212         -
        )?);
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         669  +
        let protocol = _cfg
         670  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         671  +
            .expect("a SharedClientProtocol is required");
         672  +
        let mut request = protocol
         673  +
            .serialize_request(&input, CreateCustomKeyStore::INPUT_SCHEMA, "", _cfg)
         674  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         675  +
         676  +
        return ::std::result::Result::Ok(request);
  218    677   
    }
  219    678   
}
  220    679   
#[derive(Debug)]
  221    680   
struct CreateCustomKeyStoreEndpointParamsInterceptor;
  222    681   
  223    682   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCustomKeyStoreEndpointParamsInterceptor {
  224    683   
    fn name(&self) -> &'static str {
  225    684   
        "CreateCustomKeyStoreEndpointParamsInterceptor"
  226    685   
    }
  227    686   

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

@@ -143,143 +293,293 @@
  163    163   
    "com.amazonaws.kms.synthetic",
  164    164   
    "CreateCustomKeyStoreInput",
  165    165   
);
  166    166   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$CustomKeyStoreName",
  169    169   
        "com.amazonaws.kms.synthetic",
  170    170   
        "CreateCustomKeyStoreInput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::String,
  173         -
    "custom_key_store_name",
         173  +
    "CustomKeyStoreName",
  174    174   
    0,
  175    175   
);
  176    176   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_CLOUD_HSM_CLUSTER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  177    177   
    ::aws_smithy_schema::ShapeId::from_static(
  178    178   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$CloudHsmClusterId",
  179    179   
        "com.amazonaws.kms.synthetic",
  180    180   
        "CreateCustomKeyStoreInput",
  181    181   
    ),
  182    182   
    ::aws_smithy_schema::ShapeType::String,
  183         -
    "cloud_hsm_cluster_id",
         183  +
    "CloudHsmClusterId",
  184    184   
    1,
  185    185   
);
  186    186   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_TRUST_ANCHOR_CERTIFICATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$TrustAnchorCertificate",
  189    189   
        "com.amazonaws.kms.synthetic",
  190    190   
        "CreateCustomKeyStoreInput",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::String,
  193         -
    "trust_anchor_certificate",
         193  +
    "TrustAnchorCertificate",
  194    194   
    2,
  195    195   
);
  196    196   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_KEY_STORE_PASSWORD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  197    197   
    ::aws_smithy_schema::ShapeId::from_static(
  198    198   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$KeyStorePassword",
  199    199   
        "com.amazonaws.kms.synthetic",
  200    200   
        "CreateCustomKeyStoreInput",
  201    201   
    ),
  202    202   
    ::aws_smithy_schema::ShapeType::String,
  203         -
    "key_store_password",
         203  +
    "KeyStorePassword",
  204    204   
    3,
  205    205   
);
  206    206   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  207    207   
    ::aws_smithy_schema::ShapeId::from_static(
  208    208   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$CustomKeyStoreType",
  209    209   
        "com.amazonaws.kms.synthetic",
  210    210   
        "CreateCustomKeyStoreInput",
  211    211   
    ),
  212    212   
    ::aws_smithy_schema::ShapeType::String,
  213         -
    "custom_key_store_type",
         213  +
    "CustomKeyStoreType",
  214    214   
    4,
  215    215   
);
  216    216   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_URI_ENDPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  217    217   
    ::aws_smithy_schema::ShapeId::from_static(
  218    218   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$XksProxyUriEndpoint",
  219    219   
        "com.amazonaws.kms.synthetic",
  220    220   
        "CreateCustomKeyStoreInput",
  221    221   
    ),
  222    222   
    ::aws_smithy_schema::ShapeType::String,
  223         -
    "xks_proxy_uri_endpoint",
         223  +
    "XksProxyUriEndpoint",
  224    224   
    5,
  225    225   
);
  226    226   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_URI_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  227    227   
    ::aws_smithy_schema::ShapeId::from_static(
  228    228   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$XksProxyUriPath",
  229    229   
        "com.amazonaws.kms.synthetic",
  230    230   
        "CreateCustomKeyStoreInput",
  231    231   
    ),
  232    232   
    ::aws_smithy_schema::ShapeType::String,
  233         -
    "xks_proxy_uri_path",
         233  +
    "XksProxyUriPath",
  234    234   
    6,
  235    235   
);
  236    236   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_VPC_ENDPOINT_SERVICE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  237    237   
    ::aws_smithy_schema::ShapeId::from_static(
  238    238   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$XksProxyVpcEndpointServiceName",
  239    239   
        "com.amazonaws.kms.synthetic",
  240    240   
        "CreateCustomKeyStoreInput",
  241    241   
    ),
  242    242   
    ::aws_smithy_schema::ShapeType::String,
  243         -
    "xks_proxy_vpc_endpoint_service_name",
         243  +
    "XksProxyVpcEndpointServiceName",
  244    244   
    7,
  245    245   
);
  246    246   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_AUTHENTICATION_CREDENTIAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  247    247   
    ::aws_smithy_schema::ShapeId::from_static(
  248    248   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$XksProxyAuthenticationCredential",
  249    249   
        "com.amazonaws.kms.synthetic",
  250    250   
        "CreateCustomKeyStoreInput",
  251    251   
    ),
  252    252   
    ::aws_smithy_schema::ShapeType::Structure,
  253         -
    "xks_proxy_authentication_credential",
         253  +
    "XksProxyAuthenticationCredential",
  254    254   
    8,
  255    255   
);
  256    256   
static CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_CONNECTIVITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  257    257   
    ::aws_smithy_schema::ShapeId::from_static(
  258    258   
        "com.amazonaws.kms.synthetic#CreateCustomKeyStoreInput$XksProxyConnectivity",
  259    259   
        "com.amazonaws.kms.synthetic",
  260    260   
        "CreateCustomKeyStoreInput",
  261    261   
    ),
  262    262   
    ::aws_smithy_schema::ShapeType::String,
  263         -
    "xks_proxy_connectivity",
         263  +
    "XksProxyConnectivity",
  264    264   
    9,
  265    265   
);
  266    266   
static CREATECUSTOMKEYSTOREINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  267    267   
    CREATECUSTOMKEYSTOREINPUT_SCHEMA_ID,
  268    268   
    ::aws_smithy_schema::ShapeType::Structure,
  269    269   
    &[
  270    270   
        &CREATECUSTOMKEYSTOREINPUT_MEMBER_CUSTOM_KEY_STORE_NAME,
  271    271   
        &CREATECUSTOMKEYSTOREINPUT_MEMBER_CLOUD_HSM_CLUSTER_ID,
  272    272   
        &CREATECUSTOMKEYSTOREINPUT_MEMBER_TRUST_ANCHOR_CERTIFICATE,
  273    273   
        &CREATECUSTOMKEYSTOREINPUT_MEMBER_KEY_STORE_PASSWORD,
@@ -297,297 +409,421 @@
  317    317   
            ser.write_struct(&CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_AUTHENTICATION_CREDENTIAL, val)?;
  318    318   
        }
  319    319   
        if let Some(ref val) = self.xks_proxy_connectivity {
  320    320   
            ser.write_string(&CREATECUSTOMKEYSTOREINPUT_MEMBER_XKS_PROXY_CONNECTIVITY, val.as_str())?;
  321    321   
        }
  322    322   
        Ok(())
  323    323   
    }
  324    324   
}
  325    325   
impl CreateCustomKeyStoreInput {
  326    326   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  327         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  328         -
        deserializer: &mut D,
         327  +
    pub fn deserialize(
         328  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  329    329   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  330    330   
        #[allow(unused_variables, unused_mut)]
  331    331   
        let mut builder = Self::builder();
  332    332   
        #[allow(
  333    333   
            unused_variables,
  334    334   
            unreachable_code,
  335    335   
            clippy::single_match,
  336    336   
            clippy::match_single_binding,
  337    337   
            clippy::diverging_sub_expression
  338    338   
        )]
  339         -
        deserializer.read_struct(&CREATECUSTOMKEYSTOREINPUT_SCHEMA, (), |_, member, deser| {
         339  +
        deserializer.read_struct(&CREATECUSTOMKEYSTOREINPUT_SCHEMA, &mut |member, deser| {
  340    340   
            match member.member_index() {
  341    341   
                Some(0) => {
  342    342   
                    builder.custom_key_store_name = Some(deser.read_string(member)?);
  343    343   
                }
  344    344   
                Some(1) => {
  345    345   
                    builder.cloud_hsm_cluster_id = Some(deser.read_string(member)?);
  346    346   
                }
  347    347   
                Some(2) => {
  348    348   
                    builder.trust_anchor_certificate = Some(deser.read_string(member)?);
  349    349   
                }
  350    350   
                Some(3) => {
  351    351   
                    builder.key_store_password = Some(deser.read_string(member)?);
  352    352   
                }
  353    353   
                Some(4) => {
  354    354   
                    builder.custom_key_store_type = Some(crate::types::CustomKeyStoreType::from(deser.read_string(member)?.as_str()));
  355    355   
                }
  356    356   
                Some(5) => {
  357    357   
                    builder.xks_proxy_uri_endpoint = Some(deser.read_string(member)?);
  358    358   
                }
  359    359   
                Some(6) => {
  360    360   
                    builder.xks_proxy_uri_path = Some(deser.read_string(member)?);
  361    361   
                }
  362    362   
                Some(7) => {
  363    363   
                    builder.xks_proxy_vpc_endpoint_service_name = Some(deser.read_string(member)?);
  364    364   
                }
  365    365   
                Some(8) => {
  366    366   
                    builder.xks_proxy_authentication_credential = Some(crate::types::XksProxyAuthenticationCredentialType::deserialize(deser)?);
  367    367   
                }
  368    368   
                Some(9) => {
  369    369   
                    builder.xks_proxy_connectivity = Some(crate::types::XksProxyConnectivityType::from(deser.read_string(member)?.as_str()));
  370    370   
                }
  371    371   
                _ => {}
  372    372   
            }
  373    373   
            Ok(())
  374    374   
        })?;
         375  +
        builder.custom_key_store_name = builder.custom_key_store_name.or(Some(String::new()));
  375    376   
        builder
  376    377   
            .build()
  377    378   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  378    379   
    }
  379    380   
}
         381  +
impl CreateCustomKeyStoreInput {
         382  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         383  +
    pub fn deserialize_with_response(
         384  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         385  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         386  +
        _status: u16,
         387  +
        _body: &[u8],
         388  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         389  +
        Self::deserialize(deserializer)
         390  +
    }
         391  +
}
  380    392   
impl CreateCustomKeyStoreInput {
  381    393   
    /// Creates a new builder-style object to manufacture [`CreateCustomKeyStoreInput`](crate::operation::create_custom_key_store::CreateCustomKeyStoreInput).
  382    394   
    pub fn builder() -> crate::operation::create_custom_key_store::builders::CreateCustomKeyStoreInputBuilder {
  383    395   
        crate::operation::create_custom_key_store::builders::CreateCustomKeyStoreInputBuilder::default()
  384    396   
    }
  385    397   
}
  386    398   
  387    399   
/// A builder for [`CreateCustomKeyStoreInput`](crate::operation::create_custom_key_store::CreateCustomKeyStoreInput).
  388    400   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  389    401   
#[non_exhaustive]

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

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