AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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         -
}

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_already_exists_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::AlreadyExistsExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::AlreadyExistsExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}

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

@@ -1,0 +163,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_cancel_key_deletion_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::cancel_key_deletion::CancelKeyDeletionOutput, crate::operation::cancel_key_deletion::CancelKeyDeletionError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    let error_code = match generic.code() {
   15         -
        Some(code) => code,
   16         -
        None => return Err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "DependencyTimeoutException" => crate::operation::cancel_key_deletion::CancelKeyDeletionError::DependencyTimeoutException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::DependencyTimeoutExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_dependency_timeout_exception::de_dependency_timeout_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   28         -
                let output = output.meta(generic);
   29         -
                output.build()
   30         -
            };
   31         -
            if tmp.message.is_none() {
   32         -
                tmp.message = _error_message;
   33         -
            }
   34         -
            tmp
   35         -
        }),
   36         -
        "InvalidArnException" => crate::operation::cancel_key_deletion::CancelKeyDeletionError::InvalidArnException({
   37         -
            #[allow(unused_mut)]
   38         -
            let mut tmp = {
   39         -
                #[allow(unused_mut)]
   40         -
                let mut output = crate::types::error::builders::InvalidArnExceptionBuilder::default();
   41         -
                output = crate::protocol_serde::shape_invalid_arn_exception::de_invalid_arn_exception_json_err(_response_body, output)
   42         -
                    .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   43         -
                let output = output.meta(generic);
   44         -
                output.build()
   45         -
            };
   46         -
            if tmp.message.is_none() {
   47         -
                tmp.message = _error_message;
   48         -
            }
   49         -
            tmp
   50         -
        }),
   51         -
        "KMSInternalException" => crate::operation::cancel_key_deletion::CancelKeyDeletionError::KmsInternalException({
   52         -
            #[allow(unused_mut)]
   53         -
            let mut tmp = {
   54         -
                #[allow(unused_mut)]
   55         -
                let mut output = crate::types::error::builders::KmsInternalExceptionBuilder::default();
   56         -
                output = crate::protocol_serde::shape_kms_internal_exception::de_kms_internal_exception_json_err(_response_body, output)
   57         -
                    .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                output.build()
   60         -
            };
   61         -
            if tmp.message.is_none() {
   62         -
                tmp.message = _error_message;
   63         -
            }
   64         -
            tmp
   65         -
        }),
   66         -
        "KMSInvalidStateException" => crate::operation::cancel_key_deletion::CancelKeyDeletionError::KmsInvalidStateException({
   67         -
            #[allow(unused_mut)]
   68         -
            let mut tmp = {
   69         -
                #[allow(unused_mut)]
   70         -
                let mut output = crate::types::error::builders::KmsInvalidStateExceptionBuilder::default();
   71         -
                output = crate::protocol_serde::shape_kms_invalid_state_exception::de_kms_invalid_state_exception_json_err(_response_body, output)
   72         -
                    .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                output.build()
   75         -
            };
   76         -
            if tmp.message.is_none() {
   77         -
                tmp.message = _error_message;
   78         -
            }
   79         -
            tmp
   80         -
        }),
   81         -
        "NotFoundException" => crate::operation::cancel_key_deletion::CancelKeyDeletionError::NotFoundException({
   82         -
            #[allow(unused_mut)]
   83         -
            let mut tmp = {
   84         -
                #[allow(unused_mut)]
   85         -
                let mut output = crate::types::error::builders::NotFoundExceptionBuilder::default();
   86         -
                output = crate::protocol_serde::shape_not_found_exception::de_not_found_exception_json_err(_response_body, output)
   87         -
                    .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
   88         -
                let output = output.meta(generic);
   89         -
                output.build()
   90         -
            };
   91         -
            if tmp.message.is_none() {
   92         -
                tmp.message = _error_message;
   93         -
            }
   94         -
            tmp
   95         -
        }),
   96         -
        _ => crate::operation::cancel_key_deletion::CancelKeyDeletionError::generic(generic),
   97         -
    })
   98         -
}
   99         -
  100         -
#[allow(clippy::unnecessary_wraps)]
  101         -
pub fn de_cancel_key_deletion_http_response(
  102         -
    _response_status: u16,
  103         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  104         -
    _response_body: &[u8],
  105         -
) -> std::result::Result<crate::operation::cancel_key_deletion::CancelKeyDeletionOutput, crate::operation::cancel_key_deletion::CancelKeyDeletionError>
  106         -
{
  107         -
    Ok({
  108         -
        #[allow(unused_mut)]
  109         -
        let mut output = crate::operation::cancel_key_deletion::builders::CancelKeyDeletionOutputBuilder::default();
  110         -
        output = crate::protocol_serde::shape_cancel_key_deletion::de_cancel_key_deletion(_response_body, output)
  111         -
            .map_err(crate::operation::cancel_key_deletion::CancelKeyDeletionError::unhandled)?;
  112         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  113         -
        output.build()
  114         -
    })
  115         -
}
  116         -
  117         -
pub fn ser_cancel_key_deletion_input(
  118         -
    input: &crate::operation::cancel_key_deletion::CancelKeyDeletionInput,
  119         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  120         -
    let mut out = String::new();
  121         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  122         -
    crate::protocol_serde::shape_cancel_key_deletion_input::ser_cancel_key_deletion_input_input(&mut object, input)?;
  123         -
    object.finish();
  124         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  125         -
}
  126         -
  127         -
pub(crate) fn de_cancel_key_deletion(
  128         -
    _value: &[u8],
  129         -
    mut builder: crate::operation::cancel_key_deletion::builders::CancelKeyDeletionOutputBuilder,
  130         -
) -> ::std::result::Result<
  131         -
    crate::operation::cancel_key_deletion::builders::CancelKeyDeletionOutputBuilder,
  132         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  133         -
> {
  134         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  135         -
    let tokens = &mut tokens_owned;
  136         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  137         -
    loop {
  138         -
        match tokens.next().transpose()? {
  139         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  140         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  141         -
                "KeyId" => {
  142         -
                    builder = builder.set_key_id(
  143         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  144         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  145         -
                            .transpose()?,
  146         -
                    );
  147         -
                }
  148         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  149         -
            },
  150         -
            other => {
  151         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  152         -
                    "expected object key or end object, found: {other:?}"
  153         -
                )))
  154         -
            }
  155         -
        }
  156         -
    }
  157         -
    if tokens.next().is_some() {
  158         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  159         -
            "found more JSON tokens after completing parsing",
  160         -
        ));
  161         -
    }
  162         -
    Ok(builder)
  163         -
}

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

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_cancel_key_deletion_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::cancel_key_deletion::CancelKeyDeletionInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.key_id {
    7         -
        object.key("KeyId").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

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

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cloud_hsm_cluster_in_use_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::CloudHsmClusterInUseExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::CloudHsmClusterInUseExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
{
    7         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    8         -
    let tokens = &mut tokens_owned;
    9         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   10         -
    loop {
   11         -
        match tokens.next().transpose()? {
   12         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   13         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   14         -
                "message" => {
   15         -
                    builder = builder.set_message(
   16         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   17         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   18         -
                            .transpose()?,
   19         -
                    );
   20         -
                }
   21         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
            },
   23         -
            other => {
   24         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25         -
                    "expected object key or end object, found: {other:?}"
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cloud_hsm_cluster_invalid_configuration_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::CloudHsmClusterInvalidConfigurationExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::CloudHsmClusterInvalidConfigurationExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cloud_hsm_cluster_not_active_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::CloudHsmClusterNotActiveExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::CloudHsmClusterNotActiveExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cloud_hsm_cluster_not_found_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::CloudHsmClusterNotFoundExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::CloudHsmClusterNotFoundExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +38,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_cloud_hsm_cluster_not_related_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::CloudHsmClusterNotRelatedExceptionBuilder,
    5         -
) -> ::std::result::Result<
    6         -
    crate::types::error::builders::CloudHsmClusterNotRelatedExceptionBuilder,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
> {
    9         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   10         -
    let tokens = &mut tokens_owned;
   11         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   12         -
    loop {
   13         -
        match tokens.next().transpose()? {
   14         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   15         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   16         -
                "message" => {
   17         -
                    builder = builder.set_message(
   18         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   19         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   20         -
                            .transpose()?,
   21         -
                    );
   22         -
                }
   23         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   24         -
            },
   25         -
            other => {
   26         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   27         -
                    "expected object key or end object, found: {other:?}"
   28         -
                )))
   29         -
            }
   30         -
        }
   31         -
    }
   32         -
    if tokens.next().is_some() {
   33         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "found more JSON tokens after completing parsing",
   35         -
        ));
   36         -
    }
   37         -
    Ok(builder)
   38         -
}

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

@@ -1,0 +35,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_conflict_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ConflictExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ConflictExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {other:?}"
   25         -
                )))
   26         -
            }
   27         -
        }
   28         -
    }
   29         -
    if tokens.next().is_some() {
   30         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31         -
            "found more JSON tokens after completing parsing",
   32         -
        ));
   33         -
    }
   34         -
    Ok(builder)
   35         -
}