AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

@@ -115,115 +348,352 @@
  135    135   
}
  136    136   
static VERIFYINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
  137    137   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.kms.synthetic#VerifyInput", "com.amazonaws.kms.synthetic", "VerifyInput");
  138    138   
static VERIFYINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.kms.synthetic#VerifyInput$KeyId",
  141    141   
        "com.amazonaws.kms.synthetic",
  142    142   
        "VerifyInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::String,
  145         -
    "key_id",
         145  +
    "KeyId",
  146    146   
    0,
  147    147   
);
  148    148   
static VERIFYINPUT_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "com.amazonaws.kms.synthetic#VerifyInput$Message",
  151    151   
        "com.amazonaws.kms.synthetic",
  152    152   
        "VerifyInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::Blob,
  155         -
    "message",
         155  +
    "Message",
  156    156   
    1,
  157    157   
);
  158    158   
static VERIFYINPUT_MEMBER_MESSAGE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  159    159   
    ::aws_smithy_schema::ShapeId::from_static(
  160    160   
        "com.amazonaws.kms.synthetic#VerifyInput$MessageType",
  161    161   
        "com.amazonaws.kms.synthetic",
  162    162   
        "VerifyInput",
  163    163   
    ),
  164    164   
    ::aws_smithy_schema::ShapeType::String,
  165         -
    "message_type",
         165  +
    "MessageType",
  166    166   
    2,
  167    167   
);
  168    168   
static VERIFYINPUT_MEMBER_SIGNATURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  169    169   
    ::aws_smithy_schema::ShapeId::from_static(
  170    170   
        "com.amazonaws.kms.synthetic#VerifyInput$Signature",
  171    171   
        "com.amazonaws.kms.synthetic",
  172    172   
        "VerifyInput",
  173    173   
    ),
  174    174   
    ::aws_smithy_schema::ShapeType::Blob,
  175         -
    "signature",
         175  +
    "Signature",
  176    176   
    3,
  177    177   
);
  178    178   
static VERIFYINPUT_MEMBER_SIGNING_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  179    179   
    ::aws_smithy_schema::ShapeId::from_static(
  180    180   
        "com.amazonaws.kms.synthetic#VerifyInput$SigningAlgorithm",
  181    181   
        "com.amazonaws.kms.synthetic",
  182    182   
        "VerifyInput",
  183    183   
    ),
  184    184   
    ::aws_smithy_schema::ShapeType::String,
  185         -
    "signing_algorithm",
         185  +
    "SigningAlgorithm",
  186    186   
    4,
  187    187   
);
  188    188   
static VERIFYINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "com.amazonaws.kms.synthetic#VerifyInput$GrantTokens",
  191    191   
        "com.amazonaws.kms.synthetic",
  192    192   
        "VerifyInput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::List,
  195         -
    "grant_tokens",
         195  +
    "GrantTokens",
  196    196   
    5,
  197    197   
);
  198    198   
static VERIFYINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  199    199   
    ::aws_smithy_schema::ShapeId::from_static(
  200    200   
        "com.amazonaws.kms.synthetic#VerifyInput$DryRun",
  201    201   
        "com.amazonaws.kms.synthetic",
  202    202   
        "VerifyInput",
  203    203   
    ),
  204    204   
    ::aws_smithy_schema::ShapeType::Boolean,
  205         -
    "dry_run",
         205  +
    "DryRun",
  206    206   
    6,
  207    207   
);
  208    208   
static VERIFYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  209    209   
    VERIFYINPUT_SCHEMA_ID,
  210    210   
    ::aws_smithy_schema::ShapeType::Structure,
  211    211   
    &[
  212    212   
        &VERIFYINPUT_MEMBER_KEY_ID,
  213    213   
        &VERIFYINPUT_MEMBER_MESSAGE,
  214    214   
        &VERIFYINPUT_MEMBER_MESSAGE_TYPE,
  215    215   
        &VERIFYINPUT_MEMBER_SIGNATURE,
  216    216   
        &VERIFYINPUT_MEMBER_SIGNING_ALGORITHM,
  217    217   
        &VERIFYINPUT_MEMBER_GRANT_TOKENS,
  218    218   
        &VERIFYINPUT_MEMBER_DRY_RUN,
  219    219   
    ],
  220    220   
);
  221    221   
impl VerifyInput {
  222    222   
    /// The schema for this shape.
  223    223   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VERIFYINPUT_SCHEMA;
  224    224   
}
  225    225   
impl ::aws_smithy_schema::serde::SerializableStruct for VerifyInput {
  226    226   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  227    227   
    fn serialize_members(
  228    228   
        &self,
  229    229   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  230    230   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  231    231   
        if let Some(ref val) = self.key_id {
  232    232   
            ser.write_string(&VERIFYINPUT_MEMBER_KEY_ID, val)?;
  233    233   
        }
  234    234   
        if let Some(ref val) = self.message {
  235    235   
            ser.write_blob(&VERIFYINPUT_MEMBER_MESSAGE, val)?;
  236    236   
        }
  237    237   
        if let Some(ref val) = self.message_type {
  238    238   
            ser.write_string(&VERIFYINPUT_MEMBER_MESSAGE_TYPE, val.as_str())?;
  239    239   
        }
  240    240   
        if let Some(ref val) = self.signature {
  241    241   
            ser.write_blob(&VERIFYINPUT_MEMBER_SIGNATURE, val)?;
  242    242   
        }
  243    243   
        if let Some(ref val) = self.signing_algorithm {
  244    244   
            ser.write_string(&VERIFYINPUT_MEMBER_SIGNING_ALGORITHM, val.as_str())?;
  245    245   
        }
  246    246   
        if let Some(ref val) = self.grant_tokens {
  247    247   
            ser.write_list(
  248    248   
                &VERIFYINPUT_MEMBER_GRANT_TOKENS,
  249    249   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  250    250   
                    for item in val {
  251    251   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  252    252   
                    }
  253    253   
                    Ok(())
  254    254   
                },
  255    255   
            )?;
  256    256   
        }
  257    257   
        if let Some(ref val) = self.dry_run {
  258    258   
            ser.write_boolean(&VERIFYINPUT_MEMBER_DRY_RUN, *val)?;
  259    259   
        }
  260    260   
        Ok(())
  261    261   
    }
  262    262   
}
  263    263   
impl VerifyInput {
  264    264   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  265         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  266         -
        deserializer: &mut D,
         265  +
    pub fn deserialize(
         266  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  267    267   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  268    268   
        #[allow(unused_variables, unused_mut)]
  269    269   
        let mut builder = Self::builder();
  270    270   
        #[allow(
  271    271   
            unused_variables,
  272    272   
            unreachable_code,
  273    273   
            clippy::single_match,
  274    274   
            clippy::match_single_binding,
  275    275   
            clippy::diverging_sub_expression
  276    276   
        )]
  277         -
        deserializer.read_struct(&VERIFYINPUT_SCHEMA, (), |_, member, deser| {
         277  +
        deserializer.read_struct(&VERIFYINPUT_SCHEMA, &mut |member, deser| {
  278    278   
            match member.member_index() {
  279    279   
                Some(0) => {
  280    280   
                    builder.key_id = Some(deser.read_string(member)?);
  281    281   
                }
  282    282   
                Some(1) => {
  283    283   
                    builder.message = Some(deser.read_blob(member)?);
  284    284   
                }
  285    285   
                Some(2) => {
  286    286   
                    builder.message_type = Some(crate::types::MessageType::from(deser.read_string(member)?.as_str()));
  287    287   
                }
  288    288   
                Some(3) => {
  289    289   
                    builder.signature = Some(deser.read_blob(member)?);
  290    290   
                }
  291    291   
                Some(4) => {
  292    292   
                    builder.signing_algorithm = Some(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  293    293   
                }
  294    294   
                Some(5) => {
  295         -
                    builder.grant_tokens = Some({
  296         -
                        let container = if let Some(cap) = deser.container_size() {
  297         -
                            Vec::with_capacity(cap)
  298         -
                        } else {
  299         -
                            Vec::new()
  300         -
                        };
  301         -
                        deser.read_list(member, container, |mut list, deser| {
  302         -
                            list.push(deser.read_string(member)?);
  303         -
                            Ok(list)
  304         -
                        })?
  305         -
                    });
         295  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  306    296   
                }
  307    297   
                Some(6) => {
  308    298   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  309    299   
                }
  310    300   
                _ => {}
  311    301   
            }
  312    302   
            Ok(())
  313    303   
        })?;
         304  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         305  +
        builder.message = builder.message.or(Some(::aws_smithy_types::Blob::new("")));
         306  +
        builder.signature = builder.signature.or(Some(::aws_smithy_types::Blob::new("")));
  314    307   
        builder
  315    308   
            .build()
  316    309   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  317    310   
    }
  318    311   
}
         312  +
impl VerifyInput {
         313  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         314  +
    pub fn deserialize_with_response(
         315  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         316  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         317  +
        _status: u16,
         318  +
        _body: &[u8],
         319  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         320  +
        Self::deserialize(deserializer)
         321  +
    }
         322  +
}
  319    323   
impl VerifyInput {
  320    324   
    /// Creates a new builder-style object to manufacture [`VerifyInput`](crate::operation::verify::VerifyInput).
  321    325   
    pub fn builder() -> crate::operation::verify::builders::VerifyInputBuilder {
  322    326   
        crate::operation::verify::builders::VerifyInputBuilder::default()
  323    327   
    }
  324    328   
}
  325    329   
  326    330   
/// A builder for [`VerifyInput`](crate::operation::verify::VerifyInput).
  327    331   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  328    332   
#[non_exhaustive]

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

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

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

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

@@ -49,49 +265,269 @@
   69     69   
    "com.amazonaws.kms.synthetic",
   70     70   
    "VerifyMacInput",
   71     71   
);
   72     72   
static VERIFYMACINPUT_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.kms.synthetic#VerifyMacInput$Message",
   75     75   
        "com.amazonaws.kms.synthetic",
   76     76   
        "VerifyMacInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::Blob,
   79         -
    "message",
          79  +
    "Message",
   80     80   
    0,
   81     81   
);
   82     82   
static VERIFYMACINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.kms.synthetic#VerifyMacInput$KeyId",
   85     85   
        "com.amazonaws.kms.synthetic",
   86     86   
        "VerifyMacInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "key_id",
          89  +
    "KeyId",
   90     90   
    1,
   91     91   
);
   92     92   
static VERIFYMACINPUT_MEMBER_MAC_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.kms.synthetic#VerifyMacInput$MacAlgorithm",
   95     95   
        "com.amazonaws.kms.synthetic",
   96     96   
        "VerifyMacInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "mac_algorithm",
          99  +
    "MacAlgorithm",
  100    100   
    2,
  101    101   
);
  102    102   
static VERIFYMACINPUT_MEMBER_MAC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.kms.synthetic#VerifyMacInput$Mac",
  105    105   
        "com.amazonaws.kms.synthetic",
  106    106   
        "VerifyMacInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::Blob,
  109         -
    "mac",
         109  +
    "Mac",
  110    110   
    3,
  111    111   
);
  112    112   
static VERIFYMACINPUT_MEMBER_GRANT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.kms.synthetic#VerifyMacInput$GrantTokens",
  115    115   
        "com.amazonaws.kms.synthetic",
  116    116   
        "VerifyMacInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::List,
  119         -
    "grant_tokens",
         119  +
    "GrantTokens",
  120    120   
    4,
  121    121   
);
  122    122   
static VERIFYMACINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.kms.synthetic#VerifyMacInput$DryRun",
  125    125   
        "com.amazonaws.kms.synthetic",
  126    126   
        "VerifyMacInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::Boolean,
  129         -
    "dry_run",
         129  +
    "DryRun",
  130    130   
    5,
  131    131   
);
  132    132   
static VERIFYMACINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  133    133   
    VERIFYMACINPUT_SCHEMA_ID,
  134    134   
    ::aws_smithy_schema::ShapeType::Structure,
  135    135   
    &[
  136    136   
        &VERIFYMACINPUT_MEMBER_MESSAGE,
  137    137   
        &VERIFYMACINPUT_MEMBER_KEY_ID,
  138    138   
        &VERIFYMACINPUT_MEMBER_MAC_ALGORITHM,
  139    139   
        &VERIFYMACINPUT_MEMBER_MAC,
  140    140   
        &VERIFYMACINPUT_MEMBER_GRANT_TOKENS,
  141    141   
        &VERIFYMACINPUT_MEMBER_DRY_RUN,
  142    142   
    ],
  143    143   
);
  144    144   
impl VerifyMacInput {
  145    145   
    /// The schema for this shape.
  146    146   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VERIFYMACINPUT_SCHEMA;
  147    147   
}
  148    148   
impl ::aws_smithy_schema::serde::SerializableStruct for VerifyMacInput {
  149    149   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  150    150   
    fn serialize_members(
  151    151   
        &self,
  152    152   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  153    153   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  154    154   
        if let Some(ref val) = self.message {
  155    155   
            ser.write_blob(&VERIFYMACINPUT_MEMBER_MESSAGE, val)?;
  156    156   
        }
  157    157   
        if let Some(ref val) = self.key_id {
  158    158   
            ser.write_string(&VERIFYMACINPUT_MEMBER_KEY_ID, val)?;
  159    159   
        }
  160    160   
        if let Some(ref val) = self.mac_algorithm {
  161    161   
            ser.write_string(&VERIFYMACINPUT_MEMBER_MAC_ALGORITHM, val.as_str())?;
  162    162   
        }
  163    163   
        if let Some(ref val) = self.mac {
  164    164   
            ser.write_blob(&VERIFYMACINPUT_MEMBER_MAC, val)?;
  165    165   
        }
  166    166   
        if let Some(ref val) = self.grant_tokens {
  167    167   
            ser.write_list(
  168    168   
                &VERIFYMACINPUT_MEMBER_GRANT_TOKENS,
  169    169   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  170    170   
                    for item in val {
  171    171   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  172    172   
                    }
  173    173   
                    Ok(())
  174    174   
                },
  175    175   
            )?;
  176    176   
        }
  177    177   
        if let Some(ref val) = self.dry_run {
  178    178   
            ser.write_boolean(&VERIFYMACINPUT_MEMBER_DRY_RUN, *val)?;
  179    179   
        }
  180    180   
        Ok(())
  181    181   
    }
  182    182   
}
  183    183   
impl VerifyMacInput {
  184    184   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  185         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  186         -
        deserializer: &mut D,
         185  +
    pub fn deserialize(
         186  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  187    187   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  188    188   
        #[allow(unused_variables, unused_mut)]
  189    189   
        let mut builder = Self::builder();
  190    190   
        #[allow(
  191    191   
            unused_variables,
  192    192   
            unreachable_code,
  193    193   
            clippy::single_match,
  194    194   
            clippy::match_single_binding,
  195    195   
            clippy::diverging_sub_expression
  196    196   
        )]
  197         -
        deserializer.read_struct(&VERIFYMACINPUT_SCHEMA, (), |_, member, deser| {
         197  +
        deserializer.read_struct(&VERIFYMACINPUT_SCHEMA, &mut |member, deser| {
  198    198   
            match member.member_index() {
  199    199   
                Some(0) => {
  200    200   
                    builder.message = Some(deser.read_blob(member)?);
  201    201   
                }
  202    202   
                Some(1) => {
  203    203   
                    builder.key_id = Some(deser.read_string(member)?);
  204    204   
                }
  205    205   
                Some(2) => {
  206    206   
                    builder.mac_algorithm = Some(crate::types::MacAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  207    207   
                }
  208    208   
                Some(3) => {
  209    209   
                    builder.mac = Some(deser.read_blob(member)?);
  210    210   
                }
  211    211   
                Some(4) => {
  212         -
                    builder.grant_tokens = Some({
  213         -
                        let container = if let Some(cap) = deser.container_size() {
  214         -
                            Vec::with_capacity(cap)
  215         -
                        } else {
  216         -
                            Vec::new()
  217         -
                        };
  218         -
                        deser.read_list(member, container, |mut list, deser| {
  219         -
                            list.push(deser.read_string(member)?);
  220         -
                            Ok(list)
  221         -
                        })?
  222         -
                    });
         212  +
                    builder.grant_tokens = Some(deser.read_string_list(member)?);
  223    213   
                }
  224    214   
                Some(5) => {
  225    215   
                    builder.dry_run = Some(deser.read_boolean(member)?);
  226    216   
                }
  227    217   
                _ => {}
  228    218   
            }
  229    219   
            Ok(())
  230    220   
        })?;
         221  +
        builder.message = builder.message.or(Some(::aws_smithy_types::Blob::new("")));
         222  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         223  +
        builder.mac = builder.mac.or(Some(::aws_smithy_types::Blob::new("")));
  231    224   
        builder
  232    225   
            .build()
  233    226   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  234    227   
    }
  235    228   
}
         229  +
impl VerifyMacInput {
         230  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         231  +
    pub fn deserialize_with_response(
         232  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         233  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         234  +
        _status: u16,
         235  +
        _body: &[u8],
         236  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         237  +
        Self::deserialize(deserializer)
         238  +
    }
         239  +
}
  236    240   
impl VerifyMacInput {
  237    241   
    /// Creates a new builder-style object to manufacture [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
  238    242   
    pub fn builder() -> crate::operation::verify_mac::builders::VerifyMacInputBuilder {
  239    243   
        crate::operation::verify_mac::builders::VerifyMacInputBuilder::default()
  240    244   
    }
  241    245   
}
  242    246   
  243    247   
/// A builder for [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
  244    248   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  245    249   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde.rs

@@ -1,1 +396,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_cancel_key_deletion;
   27         -
   28         -
pub(crate) mod shape_connect_custom_key_store;
   29         -
   30         -
pub(crate) mod shape_create_alias;
   31         -
   32         -
pub(crate) mod shape_create_custom_key_store;
   33         -
   34         -
pub(crate) mod shape_create_grant;
   35         -
   36         -
pub(crate) mod shape_create_key;
   37         -
   38         -
pub(crate) mod shape_decrypt;
   39         -
   40         -
pub(crate) mod shape_delete_alias;
   41         -
   42         -
pub(crate) mod shape_delete_custom_key_store;
   43         -
   44         -
pub(crate) mod shape_delete_imported_key_material;
   45         -
   46         -
pub(crate) mod shape_derive_shared_secret;
   47         -
   48         -
pub(crate) mod shape_describe_custom_key_stores;
   49         -
   50         -
pub(crate) mod shape_describe_key;
   51         -
   52         -
pub(crate) mod shape_disable_key;
   53         -
   54         -
pub(crate) mod shape_disable_key_rotation;
   55         -
   56         -
pub(crate) mod shape_disconnect_custom_key_store;
   57         -
   58         -
pub(crate) mod shape_enable_key;
   59         -
   60         -
pub(crate) mod shape_enable_key_rotation;
   61         -
   62         -
pub(crate) mod shape_encrypt;
   63         -
   64         -
pub(crate) mod shape_generate_data_key;
   65         -
   66         -
pub(crate) mod shape_generate_data_key_pair;
   67         -
   68         -
pub(crate) mod shape_generate_data_key_pair_without_plaintext;
   69         -
   70         -
pub(crate) mod shape_generate_data_key_without_plaintext;
   71         -
   72         -
pub(crate) mod shape_generate_mac;
   73         -
   74         -
pub(crate) mod shape_generate_random;
   75         -
   76         -
pub(crate) mod shape_get_key_policy;
   77         -
   78         -
pub(crate) mod shape_get_key_rotation_status;
   79         -
   80         -
pub(crate) mod shape_get_parameters_for_import;
   81         -
   82         -
pub(crate) mod shape_get_public_key;
   83         -
   84         -
pub(crate) mod shape_import_key_material;
   85         -
   86         -
pub(crate) mod shape_list_aliases;
   87         -
   88         -
pub(crate) mod shape_list_grants;
   89         -
   90         -
pub(crate) mod shape_list_key_policies;
   91         -
   92         -
pub(crate) mod shape_list_key_rotations;
   93         -
   94         -
pub(crate) mod shape_list_keys;
   95         -
   96         -
pub(crate) mod shape_list_resource_tags;
   97         -
   98         -
pub(crate) mod shape_list_retirable_grants;
   99         -
  100         -
pub(crate) mod shape_put_key_policy;
  101         -
  102         -
pub(crate) mod shape_re_encrypt;
  103         -
  104         -
pub(crate) mod shape_replicate_key;
  105         -
  106         -
pub(crate) mod shape_retire_grant;
  107         -
  108         -
pub(crate) mod shape_revoke_grant;
  109         -
  110         -
pub(crate) mod shape_rotate_key_on_demand;
  111         -
  112         -
pub(crate) mod shape_schedule_key_deletion;
  113         -
  114         -
pub(crate) mod shape_sign;
  115         -
  116         -
pub(crate) mod shape_tag_resource;
  117         -
  118         -
pub(crate) mod shape_untag_resource;
  119         -
  120         -
pub(crate) mod shape_update_alias;
  121         -
  122         -
pub(crate) mod shape_update_custom_key_store;
  123         -
  124         -
pub(crate) mod shape_update_key_description;
  125         -
  126         -
pub(crate) mod shape_update_primary_region;
  127         -
  128         -
pub(crate) mod shape_verify;
  129         -
  130         -
pub(crate) mod shape_verify_mac;
  131         -
  132         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
  133         -
    if data.is_empty() {
  134         -
        b"{}"
  135         -
    } else {
  136         -
        data
  137         -
    }
  138         -
}
  139         -
  140         -
pub(crate) mod shape_already_exists_exception;
  141         -
  142         -
pub(crate) mod shape_cancel_key_deletion_input;
  143         -
  144         -
pub(crate) mod shape_cloud_hsm_cluster_in_use_exception;
  145         -
  146         -
pub(crate) mod shape_cloud_hsm_cluster_invalid_configuration_exception;
  147         -
  148         -
pub(crate) mod shape_cloud_hsm_cluster_not_active_exception;
  149         -
  150         -
pub(crate) mod shape_cloud_hsm_cluster_not_found_exception;
  151         -
  152         -
pub(crate) mod shape_cloud_hsm_cluster_not_related_exception;
  153         -
  154         -
pub(crate) mod shape_conflict_exception;
  155         -
  156         -
pub(crate) mod shape_connect_custom_key_store_input;
  157         -
  158         -
pub(crate) mod shape_create_alias_input;
  159         -
  160         -
pub(crate) mod shape_create_custom_key_store_input;
  161         -
  162         -
pub(crate) mod shape_create_grant_input;
  163         -
  164         -
pub(crate) mod shape_create_key_input;
  165         -
  166         -
pub(crate) mod shape_custom_key_store_has_cmks_exception;
  167         -
  168         -
pub(crate) mod shape_custom_key_store_invalid_state_exception;
  169         -
  170         -
pub(crate) mod shape_custom_key_store_name_in_use_exception;
  171         -
  172         -
pub(crate) mod shape_custom_key_store_not_found_exception;
  173         -
  174         -
pub(crate) mod shape_decrypt_input;
  175         -
  176         -
pub(crate) mod shape_delete_alias_input;
  177         -
  178         -
pub(crate) mod shape_delete_custom_key_store_input;
  179         -
  180         -
pub(crate) mod shape_delete_imported_key_material_input;
  181         -
  182         -
pub(crate) mod shape_dependency_timeout_exception;
  183         -
  184         -
pub(crate) mod shape_derive_shared_secret_input;
  185         -
  186         -
pub(crate) mod shape_describe_custom_key_stores_input;
  187         -
  188         -
pub(crate) mod shape_describe_key_input;
  189         -
  190         -
pub(crate) mod shape_disable_key_input;
  191         -
  192         -
pub(crate) mod shape_disable_key_rotation_input;
  193         -
  194         -
pub(crate) mod shape_disabled_exception;
  195         -
  196         -
pub(crate) mod shape_disconnect_custom_key_store_input;
  197         -
  198         -
pub(crate) mod shape_dry_run_operation_exception;
  199         -
  200         -
pub(crate) mod shape_enable_key_input;
  201         -
  202         -
pub(crate) mod shape_enable_key_rotation_input;
  203         -
  204         -
pub(crate) mod shape_encrypt_input;
  205         -
  206         -
pub(crate) mod shape_expired_import_token_exception;
  207         -
  208         -
pub(crate) mod shape_generate_data_key_input;
  209         -
  210         -
pub(crate) mod shape_generate_data_key_pair_input;
  211         -
  212         -
pub(crate) mod shape_generate_data_key_pair_without_plaintext_input;
  213         -
  214         -
pub(crate) mod shape_generate_data_key_without_plaintext_input;
  215         -
  216         -
pub(crate) mod shape_generate_mac_input;
  217         -
  218         -
pub(crate) mod shape_generate_random_input;
  219         -
  220         -
pub(crate) mod shape_get_key_policy_input;
  221         -
  222         -
pub(crate) mod shape_get_key_rotation_status_input;
  223         -
  224         -
pub(crate) mod shape_get_parameters_for_import_input;
  225         -
  226         -
pub(crate) mod shape_get_public_key_input;
  227         -
  228         -
pub(crate) mod shape_import_key_material_input;
  229         -
  230         -
pub(crate) mod shape_incorrect_key_exception;
  231         -
  232         -
pub(crate) mod shape_incorrect_key_material_exception;
  233         -
  234         -
pub(crate) mod shape_incorrect_trust_anchor_exception;
  235         -
  236         -
pub(crate) mod shape_invalid_alias_name_exception;
  237         -
  238         -
pub(crate) mod shape_invalid_arn_exception;
  239         -
  240         -
pub(crate) mod shape_invalid_ciphertext_exception;
  241         -
  242         -
pub(crate) mod shape_invalid_grant_id_exception;
  243         -
  244         -
pub(crate) mod shape_invalid_grant_token_exception;
  245         -
  246         -
pub(crate) mod shape_invalid_import_token_exception;
  247         -
  248         -
pub(crate) mod shape_invalid_key_usage_exception;
  249         -
  250         -
pub(crate) mod shape_invalid_marker_exception;
  251         -
  252         -
pub(crate) mod shape_key_unavailable_exception;
  253         -
  254         -
pub(crate) mod shape_kms_internal_exception;
  255         -
  256         -
pub(crate) mod shape_kms_invalid_mac_exception;
  257         -
  258         -
pub(crate) mod shape_kms_invalid_signature_exception;
  259         -
  260         -
pub(crate) mod shape_kms_invalid_state_exception;
  261         -
  262         -
pub(crate) mod shape_limit_exceeded_exception;
  263         -
  264         -
pub(crate) mod shape_list_aliases_input;
  265         -
  266         -
pub(crate) mod shape_list_grants_input;
  267         -
  268         -
pub(crate) mod shape_list_key_policies_input;
  269         -
  270         -
pub(crate) mod shape_list_key_rotations_input;
  271         -
  272         -
pub(crate) mod shape_list_keys_input;
  273         -
  274         -
pub(crate) mod shape_list_resource_tags_input;
  275         -
  276         -
pub(crate) mod shape_list_retirable_grants_input;
  277         -
  278         -
pub(crate) mod shape_malformed_policy_document_exception;
  279         -
  280         -
pub(crate) mod shape_not_found_exception;
  281         -
  282         -
pub(crate) mod shape_put_key_policy_input;
  283         -
  284         -
pub(crate) mod shape_re_encrypt_input;
  285         -
  286         -
pub(crate) mod shape_replicate_key_input;
  287         -
  288         -
pub(crate) mod shape_retire_grant_input;
  289         -
  290         -
pub(crate) mod shape_revoke_grant_input;
  291         -
  292         -
pub(crate) mod shape_rotate_key_on_demand_input;
  293         -
  294         -
pub(crate) mod shape_schedule_key_deletion_input;
  295         -
  296         -
pub(crate) mod shape_sign_input;
  297         -
  298         -
pub(crate) mod shape_tag_exception;
  299         -
  300         -
pub(crate) mod shape_tag_resource_input;
  301         -
  302         -
pub(crate) mod shape_unsupported_operation_exception;
  303         -
  304         -
pub(crate) mod shape_untag_resource_input;
  305         -
  306         -
pub(crate) mod shape_update_alias_input;
  307         -
  308         -
pub(crate) mod shape_update_custom_key_store_input;
  309         -
  310         -
pub(crate) mod shape_update_key_description_input;
  311         -
  312         -
pub(crate) mod shape_update_primary_region_input;
  313         -
  314         -
pub(crate) mod shape_verify_input;
  315         -
  316         -
pub(crate) mod shape_verify_mac_input;
  317         -
  318         -
pub(crate) mod shape_xks_key_already_in_use_exception;
  319         -
  320         -
pub(crate) mod shape_xks_key_invalid_configuration_exception;
  321         -
  322         -
pub(crate) mod shape_xks_key_not_found_exception;
  323         -
  324         -
pub(crate) mod shape_xks_proxy_incorrect_authentication_credential_exception;
  325         -
  326         -
pub(crate) mod shape_xks_proxy_invalid_configuration_exception;
  327         -
  328         -
pub(crate) mod shape_xks_proxy_invalid_response_exception;
  329         -
  330         -
pub(crate) mod shape_xks_proxy_uri_endpoint_in_use_exception;
  331         -
  332         -
pub(crate) mod shape_xks_proxy_uri_in_use_exception;
  333         -
  334         -
pub(crate) mod shape_xks_proxy_uri_unreachable_exception;
  335         -
  336         -
pub(crate) mod shape_xks_proxy_vpc_endpoint_service_in_use_exception;
  337         -
  338         -
pub(crate) mod shape_xks_proxy_vpc_endpoint_service_invalid_configuration_exception;
  339         -
  340         -
pub(crate) mod shape_xks_proxy_vpc_endpoint_service_not_found_exception;
  341         -
  342         -
pub(crate) mod shape_alias_list;
  343         -
  344         -
pub(crate) mod shape_custom_key_stores_list;
  345         -
  346         -
pub(crate) mod shape_encryption_algorithm_spec_list;
  347         -
  348         -
pub(crate) mod shape_grant_constraints;
  349         -
  350         -
pub(crate) mod shape_grant_list;
  351         -
  352         -
pub(crate) mod shape_key_agreement_algorithm_spec_list;
  353         -
  354         -
pub(crate) mod shape_key_list;
  355         -
  356         -
pub(crate) mod shape_key_metadata;
  357         -
  358         -
pub(crate) mod shape_policy_name_list;
  359         -
  360         -
pub(crate) mod shape_recipient_info;
  361         -
  362         -
pub(crate) mod shape_rotations_list;
  363         -
  364         -
pub(crate) mod shape_signing_algorithm_spec_list;
  365         -
  366         -
pub(crate) mod shape_tag;
  367         -
  368         -
pub(crate) mod shape_tag_list;
  369         -
  370         -
pub(crate) mod shape_xks_proxy_authentication_credential_type;
  371         -
  372         -
pub(crate) mod shape_alias_list_entry;
  373         -
  374         -
pub(crate) mod shape_custom_key_stores_list_entry;
  375         -
  376         -
pub(crate) mod shape_grant_list_entry;
  377         -
  378         -
pub(crate) mod shape_key_list_entry;
  379         -
  380         -
pub(crate) mod shape_mac_algorithm_spec_list;
  381         -
  382         -
pub(crate) mod shape_multi_region_configuration;
  383         -
  384         -
pub(crate) mod shape_rotations_list_entry;
  385         -
  386         -
pub(crate) mod shape_xks_key_configuration_type;
  387         -
  388         -
pub(crate) mod shape_grant_operation_list;
  389         -
  390         -
pub(crate) mod shape_multi_region_key;
  391         -
  392         -
pub(crate) mod shape_multi_region_key_list;
  393         -
  394         -
pub(crate) mod shape_xks_proxy_configuration_type;
  395         -
  396         -
pub(crate) mod shape_encryption_context_type;

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_alias_list.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_alias_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::AliasListEntry>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_alias_list_entry::de_alias_list_entry(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/aws-sdk/sdk/kms/src/protocol_serde/shape_alias_list_entry.rs

@@ -1,0 +66,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_alias_list_entry<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AliasListEntry>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::AliasListEntryBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "AliasName" => {
   19         -
                            builder = builder.set_alias_name(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "AliasArn" => {
   26         -
                            builder = builder.set_alias_arn(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "TargetKeyId" => {
   33         -
                            builder = builder.set_target_key_id(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "CreationDate" => {
   40         -
                            builder = builder.set_creation_date(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   41         -
                                tokens.next(),
   42         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   43         -
                            )?);
   44         -
                        }
   45         -
                        "LastUpdatedDate" => {
   46         -
                            builder = builder.set_last_updated_date(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   47         -
                                tokens.next(),
   48         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   49         -
                            )?);
   50         -
                        }
   51         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   52         -
                    },
   53         -
                    other => {
   54         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   55         -
                            "expected object key or end object, found: {other:?}"
   56         -
                        )))
   57         -
                    }
   58         -
                }
   59         -
            }
   60         -
            Ok(Some(builder.build()))
   61         -
        }
   62         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63         -
            "expected start object or null",
   64         -
        )),
   65         -
    }
   66         -
}