AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

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

@@ -78,78 +198,198 @@
   98     98   
}
   99     99   
static DECRYPTINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  100    100   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#DecryptInput", "com.amazonaws.kms.synthetic", "DecryptInput");
  101    101   
static DECRYPTINPUT_MEMBER_CIPHERTEXT_BLOB: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "com.amazonaws.kms.synthetic#DecryptInput$CiphertextBlob",
  104    104   
        "com.amazonaws.kms.synthetic",
  105    105   
        "DecryptInput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::Blob,
  108         -
    "ciphertext_blob",
         108  +
    "CiphertextBlob",
  109    109   
    0,
  110    110   
);
  111    111   
static DECRYPTINPUT_MEMBER_ENCRYPTION_CONTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  112    112   
    ::aws_smithy_schema::ShapeId::from_static(
  113    113   
        "com.amazonaws.kms.synthetic#DecryptInput$EncryptionContext",
  114    114   
        "com.amazonaws.kms.synthetic",
  115    115   
        "DecryptInput",
  116    116   
    ),
  117    117   
    ::aws_smithy_schema::ShapeType::Map,
  118         -
    "encryption_context",
         118  +
    "EncryptionContext",
  119    119   
    1,
  120    120   
);
  121    121   
static DECRYPTINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  122    122   
    ::aws_smithy_schema::ShapeId::from_static(
  123    123   
        "com.amazonaws.kms.synthetic#DecryptInput$GrantTokens",
  124    124   
        "com.amazonaws.kms.synthetic",
  125    125   
        "DecryptInput",
  126    126   
    ),
  127    127   
    ::aws_smithy_schema::ShapeType::List,
  128         -
    "grant_tokens",
         128  +
    "GrantTokens",
  129    129   
    2,
  130    130   
);
  131    131   
static DECRYPTINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  132    132   
    ::aws_smithy_schema::ShapeId::from_static(
  133    133   
        "com.amazonaws.kms.synthetic#DecryptInput$KeyId",
  134    134   
        "com.amazonaws.kms.synthetic",
  135    135   
        "DecryptInput",
  136    136   
    ),
  137    137   
    ::aws_smithy_schema::ShapeType::String,
  138         -
    "key_id",
         138  +
    "KeyId",
  139    139   
    3,
  140    140   
);
  141    141   
static DECRYPTINPUT_MEMBER_ENCRYPTION_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  142    142   
    ::aws_smithy_schema::ShapeId::from_static(
  143    143   
        "com.amazonaws.kms.synthetic#DecryptInput$EncryptionAlgorithm",
  144    144   
        "com.amazonaws.kms.synthetic",
  145    145   
        "DecryptInput",
  146    146   
    ),
  147    147   
    ::aws_smithy_schema::ShapeType::String,
  148         -
    "encryption_algorithm",
         148  +
    "EncryptionAlgorithm",
  149    149   
    4,
  150    150   
);
  151    151   
static DECRYPTINPUT_MEMBER_RECIPIENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  152    152   
    ::aws_smithy_schema::ShapeId::from_static(
  153    153   
        "com.amazonaws.kms.synthetic#DecryptInput$Recipient",
  154    154   
        "com.amazonaws.kms.synthetic",
  155    155   
        "DecryptInput",
  156    156   
    ),
  157    157   
    ::aws_smithy_schema::ShapeType::Structure,
  158         -
    "recipient",
         158  +
    "Recipient",
  159    159   
    5,
  160    160   
);
  161    161   
static DECRYPTINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  162    162   
    ::aws_smithy_schema::ShapeId::from_static(
  163    163   
        "com.amazonaws.kms.synthetic#DecryptInput$DryRun",
  164    164   
        "com.amazonaws.kms.synthetic",
  165    165   
        "DecryptInput",
  166    166   
    ),
  167    167   
    ::aws_smithy_schema::ShapeType::Boolean,
  168         -
    "dry_run",
         168  +
    "DryRun",
  169    169   
    6,
  170    170   
);
  171    171   
static DECRYPTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  172    172   
    DECRYPTINPUT_SCHEMA_ID,
  173    173   
    ::aws_smithy_schema::ShapeType::Structure,
  174    174   
    &[
  175    175   
        &DECRYPTINPUT_MEMBER_CIPHERTEXT_BLOB,
  176    176   
        &DECRYPTINPUT_MEMBER_ENCRYPTION_CONTEXT,
  177    177   
        &DECRYPTINPUT_MEMBER_GRANT_TOKENS,
  178    178   
        &DECRYPTINPUT_MEMBER_KEY_ID,
@@ -207,207 +330,322 @@
  227    227   
            ser.write_struct(&DECRYPTINPUT_MEMBER_RECIPIENT, val)?;
  228    228   
        }
  229    229   
        if let Some(ref val) = self.dry_run {
  230    230   
            ser.write_boolean(&DECRYPTINPUT_MEMBER_DRY_RUN, *val)?;
  231    231   
        }
  232    232   
        Ok(())
  233    233   
    }
  234    234   
}
  235    235   
impl DecryptInput {
  236    236   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  237         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  238         -
        deserializer: &mut D,
         237  +
    pub fn deserialize(
         238  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  239    239   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  240    240   
        #[allow(unused_variables, unused_mut)]
  241    241   
        let mut builder = Self::builder();
  242    242   
        #[allow(
  243    243   
            unused_variables,
  244    244   
            unreachable_code,
  245    245   
            clippy::single_match,
  246    246   
            clippy::match_single_binding,
  247    247   
            clippy::diverging_sub_expression
  248    248   
        )]
  249         -
        deserializer.read_struct(&DECRYPTINPUT_SCHEMA, (), |_, member, deser| {
         249  +
        deserializer.read_struct(&DECRYPTINPUT_SCHEMA, &mut |member, deser| {
  250    250   
            match member.member_index() {
  251    251   
                Some(0) => {
  252    252   
                    builder.ciphertext_blob = Some(deser.read_blob(member)?);
  253    253   
                }
  254    254   
                Some(1) => {
  255         -
                    builder.encryption_context = Some({
  256         -
                        let container = if let Some(cap) = deser.container_size() {
  257         -
                            std::collections::HashMap::with_capacity(cap)
  258         -
                        } else {
  259         -
                            std::collections::HashMap::new()
  260         -
                        };
  261         -
                        deser.read_map(member, container, |mut map, key, deser| {
  262         -
                            map.insert(key, deser.read_string(member)?);
  263         -
                            Ok(map)
  264         -
                        })?
  265         -
                    });
         255  +
                    builder.encryption_context = Some(deser.read_string_string_map(member)?);
  266    256   
                }
  267    257   
                Some(2) => {
  268         -
                    builder.grant_tokens = Some({
  269         -
                        let container = if let Some(cap) = deser.container_size() {
  270         -
                            Vec::with_capacity(cap)
  271         -
                        } else {
  272         -
                            Vec::new()
  273         -
                        };
  274         -
                        deser.read_list(member, container, |mut list, deser| {
  275         -
                            list.push(deser.read_string(member)?);
  276         -
                            Ok(list)
  277         -
                        })?
  278         -
                    });
         258  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  279    259   
                }
  280    260   
                Some(3) => {
  281    261   
                    builder.key_id = Some(deser.read_string(member)?);
  282    262   
                }
  283    263   
                Some(4) => {
  284    264   
                    builder.encryption_algorithm = Some(crate::types::EncryptionAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  285    265   
                }
  286    266   
                Some(5) => {
  287    267   
                    builder.recipient = Some(crate::types::RecipientInfo::deserialize(deser)?);
  288    268   
                }
  289    269   
                Some(6) => {
  290    270   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  291    271   
                }
  292    272   
                _ => {}
  293    273   
            }
  294    274   
            Ok(())
  295    275   
        })?;
         276  +
        builder.ciphertext_blob = builder.ciphertext_blob.or(Some(::aws_smithy_types::Blob::new("")));
  296    277   
        builder
  297    278   
            .build()
  298    279   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  299    280   
    }
  300    281   
}
         282  +
impl DecryptInput {
         283  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         284  +
    pub fn deserialize_with_response(
         285  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         286  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         287  +
        _status: u16,
         288  +
        _body: &[u8],
         289  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         290  +
        Self::deserialize(deserializer)
         291  +
    }
         292  +
}
  301    293   
impl DecryptInput {
  302    294   
    /// Creates a new builder-style object to manufacture [`DecryptInput`](crate::operation::decrypt::DecryptInput).
  303    295   
    pub fn builder() -> crate::operation::decrypt::builders::DecryptInputBuilder {
  304    296   
        crate::operation::decrypt::builders::DecryptInputBuilder::default()
  305    297   
    }
  306    298   
}
  307    299   
  308    300   
/// A builder for [`DecryptInput`](crate::operation::decrypt::DecryptInput).
  309    301   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  310    302   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/delete_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 `DeleteAlias`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteAlias;
    6      6   
impl DeleteAlias {
    7      7   
    /// Creates a new `DeleteAlias`
    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::delete_alias::DeleteAliasInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_alias::DeleteAliasOutput::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::delete_alias::DeleteAliasInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_alias::DeleteAliasOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_alias::DeleteAliasError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,351 @@
  135    139   
                crate::operation::delete_alias::DeleteAliasError,
  136    140   
            >::new());
  137    141   
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct DeleteAliasResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteAliasResponseDeserializer {
  145         -
    fn deserialize_nonstreaming(
         149  +
    fn deserialize_nonstreaming_with_config(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_delete_alias::de_delete_alias_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_delete_alias::de_delete_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::delete_alias::DeleteAliasError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "DependencyTimeoutException" => crate::operation::delete_alias::DeleteAliasError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "KMSInternalException" => crate::operation::delete_alias::DeleteAliasError::KmsInternalException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
  159    221   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "KMSInvalidStateException" => crate::operation::delete_alias::DeleteAliasError::KmsInvalidStateException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "NotFoundException" => crate::operation::delete_alias::DeleteAliasError::NotFoundException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                _ => crate::operation::delete_alias::DeleteAliasError::generic(generic),
         277  +
            };
         278  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         279  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         280  +
            ))
         281  +
        } else {
         282  +
            let protocol = _cfg
         283  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         284  +
                .expect("a SharedClientProtocol is required");
         285  +
            let mut deser = protocol.deserialize_response(response, DeleteAlias::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         286  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         287  +
            })?;
         288  +
            let body = response.body().bytes().expect("body loaded");
         289  +
            let output = crate::operation::delete_alias::DeleteAliasOutput::deserialize_with_response(
         290  +
                &mut *deser,
         291  +
                response.headers(),
         292  +
                response.status().into(),
         293  +
                body,
         294  +
            )
         295  +
            .map_err(|e| {
         296  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
            })?;
         298  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         299  +
        }
  161    300   
    }
  162    301   
}
  163    302   
#[derive(Debug)]
  164    303   
struct DeleteAliasRequestSerializer;
  165    304   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteAliasRequestSerializer {
  166    305   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    306   
    fn serialize_input(
  168    307   
        &self,
  169    308   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    309   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    310   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    311   
        let input = input
  173    312   
            .downcast::<crate::operation::delete_alias::DeleteAliasInput>()
  174    313   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::delete_alias::DeleteAliasInput,
  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::delete_alias::DeleteAliasInput,
  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.DeleteAlias",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_alias::ser_delete_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())
         314  +
        let protocol = _cfg
         315  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         316  +
            .expect("a SharedClientProtocol is required");
         317  +
        let mut request = protocol
         318  +
            .serialize_request(&input, DeleteAlias::INPUT_SCHEMA, "", _cfg)
         319  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         320  +
         321  +
        return ::std::result::Result::Ok(request);
  213    322   
    }
  214    323   
}
  215    324   
#[derive(Debug)]
  216    325   
struct DeleteAliasEndpointParamsInterceptor;
  217    326   
  218    327   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteAliasEndpointParamsInterceptor {
  219    328   
    fn name(&self) -> &'static str {
  220    329   
        "DeleteAliasEndpointParamsInterceptor"
  221    330   
    }
  222    331   

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/delete_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 `DeleteCustomKeyStore`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteCustomKeyStore;
    6      6   
impl DeleteCustomKeyStore {
    7      7   
    /// Creates a new `DeleteCustomKeyStore`
    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::delete_custom_key_store::DeleteCustomKeyStoreInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput::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::delete_custom_key_store::DeleteCustomKeyStoreInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +247,364 @@
  138    142   
                crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct DeleteCustomKeyStoreResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteCustomKeyStoreResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  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_delete_custom_key_store::de_delete_custom_key_store_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_delete_custom_key_store::de_delete_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::delete_custom_key_store::DeleteCustomKeyStoreError::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  +
                "CustomKeyStoreHasCMKsException" => {
         186  +
                    crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreHasCmKsException({
         187  +
                        let mut tmp = match protocol
         188  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreHasCmKsException::SCHEMA, _cfg)
         189  +
                            .and_then(|mut deser| {
         190  +
                                crate::types::error::CustomKeyStoreHasCmKsException::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  +
                "CustomKeyStoreInvalidStateException" => {
         212  +
                    crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreInvalidStateException({
         213  +
                        let mut tmp = match protocol
         214  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreInvalidStateException::SCHEMA, _cfg)
         215  +
                            .and_then(|mut deser| {
         216  +
                                crate::types::error::CustomKeyStoreInvalidStateException::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  +
                            }
  162    229   
                        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         230  +
                        tmp.meta = generic;
         231  +
                        if tmp.message.is_none() {
         232  +
                            tmp.message = _error_message;
         233  +
                        }
         234  +
                        tmp
         235  +
                    })
         236  +
                }
         237  +
                "CustomKeyStoreNotFoundException" => {
         238  +
                    crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError::CustomKeyStoreNotFoundException({
         239  +
                        let mut tmp = match protocol
         240  +
                            .deserialize_response(response, crate::types::error::CustomKeyStoreNotFoundException::SCHEMA, _cfg)
         241  +
                            .and_then(|mut deser| {
         242  +
                                crate::types::error::CustomKeyStoreNotFoundException::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  +
                "KMSInternalException" => crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError::KmsInternalException({
         264  +
                    let mut tmp = match protocol
         265  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         266  +
                        .and_then(|mut deser| {
         267  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         268  +
                                &mut *deser,
         269  +
                                response.headers(),
         270  +
                                response.status().into(),
         271  +
                                body,
         272  +
                            )
         273  +
                        }) {
         274  +
                        ::std::result::Result::Ok(val) => val,
         275  +
                        ::std::result::Result::Err(e) => {
         276  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         277  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         278  +
                            ))
         279  +
                        }
         280  +
                    };
         281  +
                    tmp.meta = generic;
         282  +
                    if tmp.message.is_none() {
         283  +
                        tmp.message = _error_message;
         284  +
                    }
         285  +
                    tmp
         286  +
                }),
         287  +
                _ => crate::operation::delete_custom_key_store::DeleteCustomKeyStoreError::generic(generic),
         288  +
            };
         289  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         290  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         291  +
            ))
         292  +
        } else {
         293  +
            let protocol = _cfg
         294  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         295  +
                .expect("a SharedClientProtocol is required");
         296  +
            let mut deser = protocol
         297  +
                .deserialize_response(response, DeleteCustomKeyStore::OUTPUT_SCHEMA, _cfg)
         298  +
                .map_err(|e| {
         299  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
                })?;
         301  +
            let body = response.body().bytes().expect("body loaded");
         302  +
            let output = crate::operation::delete_custom_key_store::DeleteCustomKeyStoreOutput::deserialize_with_response(
         303  +
                &mut *deser,
         304  +
                response.headers(),
         305  +
                response.status().into(),
         306  +
                body,
         307  +
            )
         308  +
            .map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         312  +
        }
  164    313   
    }
  165    314   
}
  166    315   
#[derive(Debug)]
  167    316   
struct DeleteCustomKeyStoreRequestSerializer;
  168    317   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteCustomKeyStoreRequestSerializer {
  169    318   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    319   
    fn serialize_input(
  171    320   
        &self,
  172    321   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    322   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    323   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    324   
        let input = input
  176    325   
            .downcast::<crate::operation::delete_custom_key_store::DeleteCustomKeyStoreInput>()
  177    326   
            .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::delete_custom_key_store::DeleteCustomKeyStoreInput,
  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::delete_custom_key_store::DeleteCustomKeyStoreInput,
  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.DeleteCustomKeyStore",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_custom_key_store::ser_delete_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())
         327  +
        let protocol = _cfg
         328  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         329  +
            .expect("a SharedClientProtocol is required");
         330  +
        let mut request = protocol
         331  +
            .serialize_request(&input, DeleteCustomKeyStore::INPUT_SCHEMA, "", _cfg)
         332  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         333  +
         334  +
        return ::std::result::Result::Ok(request);
  218    335   
    }
  219    336   
}
  220    337   
#[derive(Debug)]
  221    338   
struct DeleteCustomKeyStoreEndpointParamsInterceptor;
  222    339   
  223    340   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteCustomKeyStoreEndpointParamsInterceptor {
  224    341   
    fn name(&self) -> &'static str {
  225    342   
        "DeleteCustomKeyStoreEndpointParamsInterceptor"
  226    343   
    }
  227    344   

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

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

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

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `DeleteImportedKeyMaterial`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteImportedKeyMaterial;
    6      6   
impl DeleteImportedKeyMaterial {
    7      7   
    /// Creates a new `DeleteImportedKeyMaterial`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -118,124 +247,414 @@
  138    144   
                crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError,
  139    145   
            >::new());
  140    146   
  141    147   
        ::std::borrow::Cow::Owned(rcb)
  142    148   
    }
  143    149   
}
  144    150   
  145    151   
#[derive(Debug)]
  146    152   
struct DeleteImportedKeyMaterialResponseDeserializer;
  147    153   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteImportedKeyMaterialResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         154  +
    fn deserialize_nonstreaming_with_config(
  149    155   
        &self,
  150    156   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         157  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    158   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    159   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    160   
        #[allow(unused_mut)]
  156    161   
        let mut force_error = false;
  157    162   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_delete_imported_key_material::de_delete_imported_key_material_http_error(status, headers, body)
  160         -
        } else {
  161         -
            crate::protocol_serde::shape_delete_imported_key_material::de_delete_imported_key_material_http_response(status, headers, body)
         163  +
        if !success && status != 200 || force_error {
         164  +
            let headers = response.headers();
         165  +
            let body = response.body().bytes().expect("body loaded");
         166  +
            #[allow(unused_mut)]
         167  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         168  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
            })?;
         170  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         171  +
            let generic = generic_builder.build();
         172  +
            let error_code = match generic.code() {
         173  +
                ::std::option::Option::Some(code) => code,
         174  +
                ::std::option::Option::None => {
         175  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         176  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         177  +
                            crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::unhandled(generic),
         178  +
                        ),
         179  +
                    ))
         180  +
                }
         181  +
            };
         182  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         183  +
            let protocol = _cfg
         184  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         185  +
                .expect("a SharedClientProtocol is required");
         186  +
            let err = match error_code {
         187  +
                "DependencyTimeoutException" => {
         188  +
                    crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::DependencyTimeoutException({
         189  +
                        let mut tmp = match protocol
         190  +
                            .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         191  +
                            .and_then(|mut deser| {
         192  +
                                crate::types::error::DependencyTimeoutException::deserialize_with_response(
         193  +
                                    &mut *deser,
         194  +
                                    response.headers(),
         195  +
                                    response.status().into(),
         196  +
                                    body,
         197  +
                                )
         198  +
                            }) {
         199  +
                            ::std::result::Result::Ok(val) => val,
         200  +
                            ::std::result::Result::Err(e) => {
         201  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                                ))
         204  +
                            }
         205  +
                        };
         206  +
                        tmp.meta = generic;
         207  +
                        if tmp.message.is_none() {
         208  +
                            tmp.message = _error_message;
         209  +
                        }
         210  +
                        tmp
         211  +
                    })
         212  +
                }
         213  +
                "InvalidArnException" => crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::InvalidArnException({
         214  +
                    let mut tmp = match protocol
         215  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         216  +
                        .and_then(|mut deser| {
         217  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         218  +
                                &mut *deser,
         219  +
                                response.headers(),
         220  +
                                response.status().into(),
         221  +
                                body,
         222  +
                            )
         223  +
                        }) {
         224  +
                        ::std::result::Result::Ok(val) => val,
         225  +
                        ::std::result::Result::Err(e) => {
         226  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         227  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         228  +
                            ))
         229  +
                        }
         230  +
                    };
         231  +
                    tmp.meta = generic;
         232  +
                    if tmp.message.is_none() {
         233  +
                        tmp.message = _error_message;
         234  +
                    }
         235  +
                    tmp
         236  +
                }),
         237  +
                "KMSInternalException" => crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::KmsInternalException({
         238  +
                    let mut tmp = match protocol
         239  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         240  +
                        .and_then(|mut deser| {
         241  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         242  +
                                &mut *deser,
         243  +
                                response.headers(),
         244  +
                                response.status().into(),
         245  +
                                body,
         246  +
                            )
         247  +
                        }) {
         248  +
                        ::std::result::Result::Ok(val) => val,
         249  +
                        ::std::result::Result::Err(e) => {
         250  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         251  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         252  +
                            ))
         253  +
                        }
         254  +
                    };
         255  +
                    tmp.meta = generic;
         256  +
                    if tmp.message.is_none() {
         257  +
                        tmp.message = _error_message;
         258  +
                    }
         259  +
                    tmp
         260  +
                }),
         261  +
                "KMSInvalidStateException" => {
         262  +
                    crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::KmsInvalidStateException({
         263  +
                        let mut tmp = match protocol
         264  +
                            .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         265  +
                            .and_then(|mut deser| {
         266  +
                                crate::types::error::KmsInvalidStateException::deserialize_with_response(
         267  +
                                    &mut *deser,
         268  +
                                    response.headers(),
         269  +
                                    response.status().into(),
         270  +
                                    body,
         271  +
                                )
         272  +
                            }) {
         273  +
                            ::std::result::Result::Ok(val) => val,
         274  +
                            ::std::result::Result::Err(e) => {
         275  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         276  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         277  +
                                ))
         278  +
                            }
         279  +
                        };
         280  +
                        tmp.meta = generic;
         281  +
                        if tmp.message.is_none() {
         282  +
                            tmp.message = _error_message;
         283  +
                        }
         284  +
                        tmp
         285  +
                    })
         286  +
                }
         287  +
                "NotFoundException" => crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::NotFoundException({
         288  +
                    let mut tmp = match protocol
         289  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         290  +
                        .and_then(|mut deser| {
         291  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         292  +
                                &mut *deser,
         293  +
                                response.headers(),
         294  +
                                response.status().into(),
         295  +
                                body,
         296  +
                            )
         297  +
                        }) {
         298  +
                        ::std::result::Result::Ok(val) => val,
         299  +
                        ::std::result::Result::Err(e) => {
         300  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         301  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         302  +
                            ))
         303  +
                        }
  162    304   
                    };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         305  +
                    tmp.meta = generic;
         306  +
                    if tmp.message.is_none() {
         307  +
                        tmp.message = _error_message;
         308  +
                    }
         309  +
                    tmp
         310  +
                }),
         311  +
                "UnsupportedOperationException" => {
         312  +
                    crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::UnsupportedOperationException({
         313  +
                        let mut tmp = match protocol
         314  +
                            .deserialize_response(response, crate::types::error::UnsupportedOperationException::SCHEMA, _cfg)
         315  +
                            .and_then(|mut deser| {
         316  +
                                crate::types::error::UnsupportedOperationException::deserialize_with_response(
         317  +
                                    &mut *deser,
         318  +
                                    response.headers(),
         319  +
                                    response.status().into(),
         320  +
                                    body,
         321  +
                                )
         322  +
                            }) {
         323  +
                            ::std::result::Result::Ok(val) => val,
         324  +
                            ::std::result::Result::Err(e) => {
         325  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         326  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         327  +
                                ))
         328  +
                            }
         329  +
                        };
         330  +
                        tmp.meta = generic;
         331  +
                        if tmp.message.is_none() {
         332  +
                            tmp.message = _error_message;
         333  +
                        }
         334  +
                        tmp
         335  +
                    })
         336  +
                }
         337  +
                _ => crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialError::generic(generic),
         338  +
            };
         339  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         340  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         341  +
            ))
         342  +
        } else {
         343  +
            let protocol = _cfg
         344  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         345  +
                .expect("a SharedClientProtocol is required");
         346  +
            let mut deser = protocol
         347  +
                .deserialize_response(response, DeleteImportedKeyMaterial::OUTPUT_SCHEMA, _cfg)
         348  +
                .map_err(|e| {
         349  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         350  +
                })?;
         351  +
            let body = response.body().bytes().expect("body loaded");
         352  +
            let output = crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialOutput::deserialize_with_response(
         353  +
                &mut *deser,
         354  +
                response.headers(),
         355  +
                response.status().into(),
         356  +
                body,
         357  +
            )
         358  +
            .map_err(|e| {
         359  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         360  +
            })?;
         361  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         362  +
        }
  164    363   
    }
  165    364   
}
  166    365   
#[derive(Debug)]
  167    366   
struct DeleteImportedKeyMaterialRequestSerializer;
  168    367   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteImportedKeyMaterialRequestSerializer {
  169    368   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    369   
    fn serialize_input(
  171    370   
        &self,
  172    371   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    372   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    373   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    374   
        let input = input
  176    375   
            .downcast::<crate::operation::delete_imported_key_material::DeleteImportedKeyMaterialInput>()
  177    376   
            .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::delete_imported_key_material::DeleteImportedKeyMaterialInput,
  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::delete_imported_key_material::DeleteImportedKeyMaterialInput,
  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.DeleteImportedKeyMaterial",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  211         -
            crate::protocol_serde::shape_delete_imported_key_material::ser_delete_imported_key_material_input(&input)?,
  212         -
        );
  213         -
        if let Some(content_length) = body.content_length() {
  214         -
            let content_length = content_length.to_string();
  215         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  216         -
        }
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         377  +
        let protocol = _cfg
         378  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         379  +
            .expect("a SharedClientProtocol is required");
         380  +
        let mut request = protocol
         381  +
            .serialize_request(&input, DeleteImportedKeyMaterial::INPUT_SCHEMA, "", _cfg)
         382  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         383  +
         384  +
        return ::std::result::Result::Ok(request);
  218    385   
    }
  219    386   
}
  220    387   
#[derive(Debug)]
  221    388   
struct DeleteImportedKeyMaterialEndpointParamsInterceptor;
  222    389   
  223    390   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteImportedKeyMaterialEndpointParamsInterceptor {
  224    391   
    fn name(&self) -> &'static str {
  225    392   
        "DeleteImportedKeyMaterialEndpointParamsInterceptor"
  226    393   
    }
  227    394   

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

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

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

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