AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

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

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

@@ -62,62 +206,214 @@
   82     82   
    "com.amazonaws.kms.synthetic",
   83     83   
    "GetPublicKeyOutput",
   84     84   
);
   85     85   
static GETPUBLICKEYOUTPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   86     86   
    ::aws_smithy_schema::ShapeId::from_static(
   87     87   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$KeyId",
   88     88   
        "com.amazonaws.kms.synthetic",
   89     89   
        "GetPublicKeyOutput",
   90     90   
    ),
   91     91   
    ::aws_smithy_schema::ShapeType::String,
   92         -
    "key_id",
          92  +
    "KeyId",
   93     93   
    0,
   94     94   
);
   95     95   
static GETPUBLICKEYOUTPUT_MEMBER_PUBLIC_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   96     96   
    ::aws_smithy_schema::ShapeId::from_static(
   97     97   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$PublicKey",
   98     98   
        "com.amazonaws.kms.synthetic",
   99     99   
        "GetPublicKeyOutput",
  100    100   
    ),
  101    101   
    ::aws_smithy_schema::ShapeType::Blob,
  102         -
    "public_key",
         102  +
    "PublicKey",
  103    103   
    1,
  104    104   
);
  105    105   
static GETPUBLICKEYOUTPUT_MEMBER_CUSTOMER_MASTER_KEY_SPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$CustomerMasterKeySpec",
  108    108   
        "com.amazonaws.kms.synthetic",
  109    109   
        "GetPublicKeyOutput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::String,
  112         -
    "customer_master_key_spec",
         112  +
    "CustomerMasterKeySpec",
  113    113   
    2,
  114    114   
);
  115    115   
static GETPUBLICKEYOUTPUT_MEMBER_KEY_SPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$KeySpec",
  118    118   
        "com.amazonaws.kms.synthetic",
  119    119   
        "GetPublicKeyOutput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::String,
  122         -
    "key_spec",
         122  +
    "KeySpec",
  123    123   
    3,
  124    124   
);
  125    125   
static GETPUBLICKEYOUTPUT_MEMBER_KEY_USAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$KeyUsage",
  128    128   
        "com.amazonaws.kms.synthetic",
  129    129   
        "GetPublicKeyOutput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::String,
  132         -
    "key_usage",
         132  +
    "KeyUsage",
  133    133   
    4,
  134    134   
);
  135    135   
static GETPUBLICKEYOUTPUT_MEMBER_ENCRYPTION_ALGORITHMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$EncryptionAlgorithms",
  138    138   
        "com.amazonaws.kms.synthetic",
  139    139   
        "GetPublicKeyOutput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::List,
  142         -
    "encryption_algorithms",
         142  +
    "EncryptionAlgorithms",
  143    143   
    5,
  144    144   
);
  145    145   
static GETPUBLICKEYOUTPUT_MEMBER_SIGNING_ALGORITHMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$SigningAlgorithms",
  148    148   
        "com.amazonaws.kms.synthetic",
  149    149   
        "GetPublicKeyOutput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::List,
  152         -
    "signing_algorithms",
         152  +
    "SigningAlgorithms",
  153    153   
    6,
  154    154   
);
  155    155   
static GETPUBLICKEYOUTPUT_MEMBER_KEY_AGREEMENT_ALGORITHMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "com.amazonaws.kms.synthetic#GetPublicKeyOutput$KeyAgreementAlgorithms",
  158    158   
        "com.amazonaws.kms.synthetic",
  159    159   
        "GetPublicKeyOutput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::List,
  162         -
    "key_agreement_algorithms",
         162  +
    "KeyAgreementAlgorithms",
  163    163   
    7,
  164    164   
);
         165  +
static GETPUBLICKEYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         166  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         167  +
    ::aws_smithy_schema::ShapeType::String,
         168  +
    "request_id",
         169  +
    8,
         170  +
)
         171  +
.with_http_header("x-amzn-requestid");
  165    172   
static GETPUBLICKEYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  166    173   
    GETPUBLICKEYOUTPUT_SCHEMA_ID,
  167    174   
    ::aws_smithy_schema::ShapeType::Structure,
  168    175   
    &[
  169    176   
        &GETPUBLICKEYOUTPUT_MEMBER_KEY_ID,
  170    177   
        &GETPUBLICKEYOUTPUT_MEMBER_PUBLIC_KEY,
  171    178   
        &GETPUBLICKEYOUTPUT_MEMBER_CUSTOMER_MASTER_KEY_SPEC,
  172    179   
        &GETPUBLICKEYOUTPUT_MEMBER_KEY_SPEC,
  173    180   
        &GETPUBLICKEYOUTPUT_MEMBER_KEY_USAGE,
  174    181   
        &GETPUBLICKEYOUTPUT_MEMBER_ENCRYPTION_ALGORITHMS,
  175    182   
        &GETPUBLICKEYOUTPUT_MEMBER_SIGNING_ALGORITHMS,
  176    183   
        &GETPUBLICKEYOUTPUT_MEMBER_KEY_AGREEMENT_ALGORITHMS,
         184  +
        &GETPUBLICKEYOUTPUT_MEMBER__REQUEST_ID,
  177    185   
    ],
  178    186   
);
  179    187   
impl GetPublicKeyOutput {
  180    188   
    /// The schema for this shape.
  181    189   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETPUBLICKEYOUTPUT_SCHEMA;
  182    190   
}
  183    191   
impl ::aws_smithy_schema::serde::SerializableStruct for GetPublicKeyOutput {
  184    192   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  185    193   
    fn serialize_members(
  186    194   
        &self,
@@ -212,220 +337,415 @@
  232    240   
                    }
  233    241   
                    Ok(())
  234    242   
                },
  235    243   
            )?;
  236    244   
        }
  237    245   
        Ok(())
  238    246   
    }
  239    247   
}
  240    248   
impl GetPublicKeyOutput {
  241    249   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  242         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  243         -
        deserializer: &mut D,
         250  +
    pub fn deserialize(
         251  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  244    252   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  245    253   
        #[allow(unused_variables, unused_mut)]
  246    254   
        let mut builder = Self::builder();
  247    255   
        #[allow(
  248    256   
            unused_variables,
  249    257   
            unreachable_code,
  250    258   
            clippy::single_match,
  251    259   
            clippy::match_single_binding,
  252    260   
            clippy::diverging_sub_expression
  253    261   
        )]
  254         -
        deserializer.read_struct(&GETPUBLICKEYOUTPUT_SCHEMA, (), |_, member, deser| {
         262  +
        deserializer.read_struct(&GETPUBLICKEYOUTPUT_SCHEMA, &mut |member, deser| {
  255    263   
            match member.member_index() {
  256    264   
                Some(0) => {
  257    265   
                    builder.key_id = Some(deser.read_string(member)?);
  258    266   
                }
  259    267   
                Some(1) => {
  260    268   
                    builder.public_key = Some(deser.read_blob(member)?);
  261    269   
                }
  262    270   
                Some(2) => {
  263    271   
                    builder.customer_master_key_spec = Some(crate::types::CustomerMasterKeySpec::from(deser.read_string(member)?.as_str()));
  264    272   
                }
  265    273   
                Some(3) => {
  266    274   
                    builder.key_spec = Some(crate::types::KeySpec::from(deser.read_string(member)?.as_str()));
  267    275   
                }
  268    276   
                Some(4) => {
  269    277   
                    builder.key_usage = Some(crate::types::KeyUsageType::from(deser.read_string(member)?.as_str()));
  270    278   
                }
  271    279   
                Some(5) => {
  272    280   
                    builder.encryption_algorithms = Some({
  273         -
                        let container = if let Some(cap) = deser.container_size() {
  274         -
                            Vec::with_capacity(cap)
  275         -
                        } else {
  276         -
                            Vec::new()
  277         -
                        };
  278         -
                        deser.read_list(member, container, |mut list, deser| {
  279         -
                            list.push(crate::types::EncryptionAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  280         -
                            Ok(list)
  281         -
                        })?
         281  +
                        let mut container = Vec::new();
         282  +
                        deser.read_list(member, &mut |deser| {
         283  +
                            container.push(crate::types::EncryptionAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         284  +
                            Ok(())
         285  +
                        })?;
         286  +
                        container
  282    287   
                    });
  283    288   
                }
  284    289   
                Some(6) => {
  285    290   
                    builder.signing_algorithms = Some({
  286         -
                        let container = if let Some(cap) = deser.container_size() {
  287         -
                            Vec::with_capacity(cap)
  288         -
                        } else {
  289         -
                            Vec::new()
  290         -
                        };
  291         -
                        deser.read_list(member, container, |mut list, deser| {
  292         -
                            list.push(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  293         -
                            Ok(list)
  294         -
                        })?
         291  +
                        let mut container = Vec::new();
         292  +
                        deser.read_list(member, &mut |deser| {
         293  +
                            container.push(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         294  +
                            Ok(())
         295  +
                        })?;
         296  +
                        container
  295    297   
                    });
  296    298   
                }
  297    299   
                Some(7) => {
  298    300   
                    builder.key_agreement_algorithms = Some({
  299         -
                        let container = if let Some(cap) = deser.container_size() {
  300         -
                            Vec::with_capacity(cap)
  301         -
                        } else {
  302         -
                            Vec::new()
  303         -
                        };
  304         -
                        deser.read_list(member, container, |mut list, deser| {
  305         -
                            list.push(crate::types::KeyAgreementAlgorithmSpec::from(deser.read_string(member)?.as_str()));
  306         -
                            Ok(list)
  307         -
                        })?
         301  +
                        let mut container = Vec::new();
         302  +
                        deser.read_list(member, &mut |deser| {
         303  +
                            container.push(crate::types::KeyAgreementAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         304  +
                            Ok(())
         305  +
                        })?;
         306  +
                        container
         307  +
                    });
         308  +
                }
         309  +
                Some(8) => {
         310  +
                    builder._request_id = Some(deser.read_string(member)?);
         311  +
                }
         312  +
                _ => {}
         313  +
            }
         314  +
            Ok(())
         315  +
        })?;
         316  +
        Ok(builder.build())
         317  +
    }
         318  +
}
         319  +
impl GetPublicKeyOutput {
         320  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         321  +
    /// Header-bound members are read directly from headers, avoiding runtime
         322  +
    /// member iteration overhead. Body members are read via the deserializer.
         323  +
    pub fn deserialize_with_response(
         324  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         325  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         326  +
        _status: u16,
         327  +
        _body: &[u8],
         328  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         329  +
        #[allow(unused_variables, unused_mut)]
         330  +
        let mut builder = Self::builder();
         331  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         332  +
            builder._request_id = Some(val.to_string());
         333  +
        }
         334  +
        #[allow(
         335  +
            unused_variables,
         336  +
            unreachable_code,
         337  +
            clippy::single_match,
         338  +
            clippy::match_single_binding,
         339  +
            clippy::diverging_sub_expression
         340  +
        )]
         341  +
        deserializer.read_struct(&GETPUBLICKEYOUTPUT_SCHEMA, &mut |member, deser| {
         342  +
            match member.member_index() {
         343  +
                Some(0) => {
         344  +
                    builder.key_id = Some(deser.read_string(member)?);
         345  +
                }
         346  +
                Some(1) => {
         347  +
                    builder.public_key = Some(deser.read_blob(member)?);
         348  +
                }
         349  +
                Some(2) => {
         350  +
                    builder.customer_master_key_spec = Some(crate::types::CustomerMasterKeySpec::from(deser.read_string(member)?.as_str()));
         351  +
                }
         352  +
                Some(3) => {
         353  +
                    builder.key_spec = Some(crate::types::KeySpec::from(deser.read_string(member)?.as_str()));
         354  +
                }
         355  +
                Some(4) => {
         356  +
                    builder.key_usage = Some(crate::types::KeyUsageType::from(deser.read_string(member)?.as_str()));
         357  +
                }
         358  +
                Some(5) => {
         359  +
                    builder.encryption_algorithms = Some({
         360  +
                        let mut container = Vec::new();
         361  +
                        deser.read_list(member, &mut |deser| {
         362  +
                            container.push(crate::types::EncryptionAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         363  +
                            Ok(())
         364  +
                        })?;
         365  +
                        container
         366  +
                    });
         367  +
                }
         368  +
                Some(6) => {
         369  +
                    builder.signing_algorithms = Some({
         370  +
                        let mut container = Vec::new();
         371  +
                        deser.read_list(member, &mut |deser| {
         372  +
                            container.push(crate::types::SigningAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         373  +
                            Ok(())
         374  +
                        })?;
         375  +
                        container
         376  +
                    });
         377  +
                }
         378  +
                Some(7) => {
         379  +
                    builder.key_agreement_algorithms = Some({
         380  +
                        let mut container = Vec::new();
         381  +
                        deser.read_list(member, &mut |deser| {
         382  +
                            container.push(crate::types::KeyAgreementAlgorithmSpec::from(deser.read_string(member)?.as_str()));
         383  +
                            Ok(())
         384  +
                        })?;
         385  +
                        container
  308    386   
                    });
  309    387   
                }
  310    388   
                _ => {}
  311    389   
            }
  312    390   
            Ok(())
  313    391   
        })?;
  314    392   
        Ok(builder.build())
  315    393   
    }
  316    394   
}
  317    395   
impl ::aws_types::request_id::RequestId for GetPublicKeyOutput {

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

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

@@ -87,87 +319,333 @@
  107    107   
    "com.amazonaws.kms.synthetic",
  108    108   
    "ImportKeyMaterialInput",
  109    109   
);
  110    110   
static IMPORTKEYMATERIALINPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$KeyId",
  113    113   
        "com.amazonaws.kms.synthetic",
  114    114   
        "ImportKeyMaterialInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::String,
  117         -
    "key_id",
         117  +
    "KeyId",
  118    118   
    0,
  119    119   
);
  120    120   
static IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$ImportToken",
  123    123   
        "com.amazonaws.kms.synthetic",
  124    124   
        "ImportKeyMaterialInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::Blob,
  127         -
    "import_token",
         127  +
    "ImportToken",
  128    128   
    1,
  129    129   
);
  130    130   
static IMPORTKEYMATERIALINPUT_MEMBER_ENCRYPTED_KEY_MATERIAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$EncryptedKeyMaterial",
  133    133   
        "com.amazonaws.kms.synthetic",
  134    134   
        "ImportKeyMaterialInput",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::Blob,
  137         -
    "encrypted_key_material",
         137  +
    "EncryptedKeyMaterial",
  138    138   
    2,
  139    139   
);
  140    140   
static IMPORTKEYMATERIALINPUT_MEMBER_VALID_TO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  141    141   
    ::aws_smithy_schema::ShapeId::from_static(
  142    142   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$ValidTo",
  143    143   
        "com.amazonaws.kms.synthetic",
  144    144   
        "ImportKeyMaterialInput",
  145    145   
    ),
  146    146   
    ::aws_smithy_schema::ShapeType::Timestamp,
  147         -
    "valid_to",
         147  +
    "ValidTo",
  148    148   
    3,
  149    149   
);
  150    150   
static IMPORTKEYMATERIALINPUT_MEMBER_EXPIRATION_MODEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$ExpirationModel",
  153    153   
        "com.amazonaws.kms.synthetic",
  154    154   
        "ImportKeyMaterialInput",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::String,
  157         -
    "expiration_model",
         157  +
    "ExpirationModel",
  158    158   
    4,
  159    159   
);
  160    160   
static IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  161    161   
    ::aws_smithy_schema::ShapeId::from_static(
  162    162   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$ImportType",
  163    163   
        "com.amazonaws.kms.synthetic",
  164    164   
        "ImportKeyMaterialInput",
  165    165   
    ),
  166    166   
    ::aws_smithy_schema::ShapeType::String,
  167         -
    "import_type",
         167  +
    "ImportType",
  168    168   
    5,
  169    169   
);
  170    170   
static IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  171    171   
    ::aws_smithy_schema::ShapeId::from_static(
  172    172   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$KeyMaterialDescription",
  173    173   
        "com.amazonaws.kms.synthetic",
  174    174   
        "ImportKeyMaterialInput",
  175    175   
    ),
  176    176   
    ::aws_smithy_schema::ShapeType::String,
  177         -
    "key_material_description",
         177  +
    "KeyMaterialDescription",
  178    178   
    6,
  179    179   
);
  180    180   
static IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  181    181   
    ::aws_smithy_schema::ShapeId::from_static(
  182    182   
        "com.amazonaws.kms.synthetic#ImportKeyMaterialInput$KeyMaterialId",
  183    183   
        "com.amazonaws.kms.synthetic",
  184    184   
        "ImportKeyMaterialInput",
  185    185   
    ),
  186    186   
    ::aws_smithy_schema::ShapeType::String,
  187         -
    "key_material_id",
         187  +
    "KeyMaterialId",
  188    188   
    7,
  189    189   
);
  190    190   
static IMPORTKEYMATERIALINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  191    191   
    IMPORTKEYMATERIALINPUT_SCHEMA_ID,
  192    192   
    ::aws_smithy_schema::ShapeType::Structure,
  193    193   
    &[
  194    194   
        &IMPORTKEYMATERIALINPUT_MEMBER_KEY_ID,
  195    195   
        &IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TOKEN,
  196    196   
        &IMPORTKEYMATERIALINPUT_MEMBER_ENCRYPTED_KEY_MATERIAL,
  197    197   
        &IMPORTKEYMATERIALINPUT_MEMBER_VALID_TO,
  198    198   
        &IMPORTKEYMATERIALINPUT_MEMBER_EXPIRATION_MODEL,
  199    199   
        &IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TYPE,
  200    200   
        &IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_DESCRIPTION,
  201    201   
        &IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_ID,
  202    202   
    ],
  203    203   
);
  204    204   
impl ImportKeyMaterialInput {
  205    205   
    /// The schema for this shape.
  206    206   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &IMPORTKEYMATERIALINPUT_SCHEMA;
  207    207   
}
  208    208   
impl ::aws_smithy_schema::serde::SerializableStruct for ImportKeyMaterialInput {
  209    209   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  210    210   
    fn serialize_members(
  211    211   
        &self,
  212    212   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  213    213   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  214    214   
        if let Some(ref val) = self.key_id {
  215    215   
            ser.write_string(&IMPORTKEYMATERIALINPUT_MEMBER_KEY_ID, val)?;
  216    216   
        }
  217    217   
        if let Some(ref val) = self.import_token {
  218    218   
            ser.write_blob(&IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TOKEN, val)?;
  219    219   
        }
  220    220   
        if let Some(ref val) = self.encrypted_key_material {
  221    221   
            ser.write_blob(&IMPORTKEYMATERIALINPUT_MEMBER_ENCRYPTED_KEY_MATERIAL, val)?;
  222    222   
        }
  223    223   
        if let Some(ref val) = self.valid_to {
  224    224   
            ser.write_timestamp(&IMPORTKEYMATERIALINPUT_MEMBER_VALID_TO, val)?;
  225    225   
        }
  226    226   
        if let Some(ref val) = self.expiration_model {
  227    227   
            ser.write_string(&IMPORTKEYMATERIALINPUT_MEMBER_EXPIRATION_MODEL, val.as_str())?;
  228    228   
        }
  229    229   
        if let Some(ref val) = self.import_type {
  230    230   
            ser.write_string(&IMPORTKEYMATERIALINPUT_MEMBER_IMPORT_TYPE, val.as_str())?;
  231    231   
        }
  232    232   
        if let Some(ref val) = self.key_material_description {
  233    233   
            ser.write_string(&IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_DESCRIPTION, val)?;
  234    234   
        }
  235    235   
        if let Some(ref val) = self.key_material_id {
  236    236   
            ser.write_string(&IMPORTKEYMATERIALINPUT_MEMBER_KEY_MATERIAL_ID, val)?;
  237    237   
        }
  238    238   
        Ok(())
  239    239   
    }
  240    240   
}
  241    241   
impl ImportKeyMaterialInput {
  242    242   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  243         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  244         -
        deserializer: &mut D,
         243  +
    pub fn deserialize(
         244  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  245    245   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  246    246   
        #[allow(unused_variables, unused_mut)]
  247    247   
        let mut builder = Self::builder();
  248    248   
        #[allow(
  249    249   
            unused_variables,
  250    250   
            unreachable_code,
  251    251   
            clippy::single_match,
  252    252   
            clippy::match_single_binding,
  253    253   
            clippy::diverging_sub_expression
  254    254   
        )]
  255         -
        deserializer.read_struct(&IMPORTKEYMATERIALINPUT_SCHEMA, (), |_, member, deser| {
         255  +
        deserializer.read_struct(&IMPORTKEYMATERIALINPUT_SCHEMA, &mut |member, deser| {
  256    256   
            match member.member_index() {
  257    257   
                Some(0) => {
  258    258   
                    builder.key_id = Some(deser.read_string(member)?);
  259    259   
                }
  260    260   
                Some(1) => {
  261    261   
                    builder.import_token = Some(deser.read_blob(member)?);
  262    262   
                }
  263    263   
                Some(2) => {
  264    264   
                    builder.encrypted_key_material = Some(deser.read_blob(member)?);
  265    265   
                }
  266    266   
                Some(3) => {
  267    267   
                    builder.valid_to = Some(deser.read_timestamp(member)?);
  268    268   
                }
  269    269   
                Some(4) => {
  270    270   
                    builder.expiration_model = Some(crate::types::ExpirationModelType::from(deser.read_string(member)?.as_str()));
  271    271   
                }
  272    272   
                Some(5) => {
  273    273   
                    builder.import_type = Some(crate::types::ImportType::from(deser.read_string(member)?.as_str()));
  274    274   
                }
  275    275   
                Some(6) => {
  276    276   
                    builder.key_material_description = Some(deser.read_string(member)?);
  277    277   
                }
  278    278   
                Some(7) => {
  279    279   
                    builder.key_material_id = Some(deser.read_string(member)?);
  280    280   
                }
  281    281   
                _ => {}
  282    282   
            }
  283    283   
            Ok(())
  284    284   
        })?;
         285  +
        builder.key_id = builder.key_id.or(Some(String::new()));
         286  +
        builder.import_token = builder.import_token.or(Some(::aws_smithy_types::Blob::new("")));
         287  +
        builder.encrypted_key_material = builder.encrypted_key_material.or(Some(::aws_smithy_types::Blob::new("")));
  285    288   
        builder
  286    289   
            .build()
  287    290   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  288    291   
    }
  289    292   
}
         293  +
impl ImportKeyMaterialInput {
         294  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         295  +
    pub fn deserialize_with_response(
         296  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         297  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         298  +
        _status: u16,
         299  +
        _body: &[u8],
         300  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         301  +
        Self::deserialize(deserializer)
         302  +
    }
         303  +
}
  290    304   
impl ImportKeyMaterialInput {
  291    305   
    /// Creates a new builder-style object to manufacture [`ImportKeyMaterialInput`](crate::operation::import_key_material::ImportKeyMaterialInput).
  292    306   
    pub fn builder() -> crate::operation::import_key_material::builders::ImportKeyMaterialInputBuilder {
  293    307   
        crate::operation::import_key_material::builders::ImportKeyMaterialInputBuilder::default()
  294    308   
    }
  295    309   
}
  296    310   
  297    311   
/// A builder for [`ImportKeyMaterialInput`](crate::operation::import_key_material::ImportKeyMaterialInput).
  298    312   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  299    313   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_aliases.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 `ListAliases`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListAliases;
    6      6   
impl ListAliases {
    7      7   
    /// Creates a new `ListAliases`
    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::list_aliases::ListAliasesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_aliases::ListAliasesOutput::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::list_aliases::ListAliasesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_aliases::ListAliasesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_aliases::ListAliasesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +242,375 @@
  135    139   
                crate::operation::list_aliases::ListAliasesError,
  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 ListAliasesResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListAliasesResponseDeserializer {
  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_list_aliases::de_list_aliases_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_list_aliases::de_list_aliases_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::list_aliases::ListAliasesError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "DependencyTimeoutException" => crate::operation::list_aliases::ListAliasesError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
  159    197   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "InvalidArnException" => crate::operation::list_aliases::ListAliasesError::InvalidArnException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidMarkerException" => crate::operation::list_aliases::ListAliasesError::InvalidMarkerException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidMarkerException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidMarkerException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "KMSInternalException" => crate::operation::list_aliases::ListAliasesError::KmsInternalException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "NotFoundException" => crate::operation::list_aliases::ListAliasesError::NotFoundException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::NotFoundException::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  +
                _ => crate::operation::list_aliases::ListAliasesError::generic(generic),
         301  +
            };
         302  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         303  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         304  +
            ))
         305  +
        } else {
         306  +
            let protocol = _cfg
         307  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         308  +
                .expect("a SharedClientProtocol is required");
         309  +
            let mut deser = protocol.deserialize_response(response, ListAliases::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         310  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         311  +
            })?;
         312  +
            let body = response.body().bytes().expect("body loaded");
         313  +
            let output = crate::operation::list_aliases::ListAliasesOutput::deserialize_with_response(
         314  +
                &mut *deser,
         315  +
                response.headers(),
         316  +
                response.status().into(),
         317  +
                body,
         318  +
            )
         319  +
            .map_err(|e| {
         320  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         321  +
            })?;
         322  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         323  +
        }
  161    324   
    }
  162    325   
}
  163    326   
#[derive(Debug)]
  164    327   
struct ListAliasesRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListAliasesRequestSerializer {
  166    329   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    330   
    fn serialize_input(
  168    331   
        &self,
  169    332   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    333   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    334   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    335   
        let input = input
  173    336   
            .downcast::<crate::operation::list_aliases::ListAliasesInput>()
  174    337   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::list_aliases::ListAliasesInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            #[allow(clippy::unnecessary_wraps)]
  190         -
            fn update_http_builder(
  191         -
                input: &crate::operation::list_aliases::ListAliasesInput,
  192         -
                builder: ::http_1x::request::Builder,
  193         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  194         -
                let mut uri = ::std::string::String::new();
  195         -
                uri_base(input, &mut uri)?;
  196         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  197         -
            }
  198         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  199         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  200         -
            builder = _header_serialization_settings.set_default_header(
  201         -
                builder,
  202         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  203         -
                "TrentService.ListAliases",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_aliases::ser_list_aliases_input(&input)?);
  208         -
        if let Some(content_length) = body.content_length() {
  209         -
            let content_length = content_length.to_string();
  210         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  211         -
        }
  212         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         338  +
        let protocol = _cfg
         339  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         340  +
            .expect("a SharedClientProtocol is required");
         341  +
        let mut request = protocol
         342  +
            .serialize_request(&input, ListAliases::INPUT_SCHEMA, "", _cfg)
         343  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         344  +
         345  +
        return ::std::result::Result::Ok(request);
  213    346   
    }
  214    347   
}
  215    348   
#[derive(Debug)]
  216    349   
struct ListAliasesEndpointParamsInterceptor;
  217    350   
  218    351   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAliasesEndpointParamsInterceptor {
  219    352   
    fn name(&self) -> &'static str {
  220    353   
        "ListAliasesEndpointParamsInterceptor"
  221    354   
    }
  222    355   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/list_grants.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 `ListGrants`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListGrants;
    6      6   
impl ListGrants {
    7      7   
    /// Creates a new `ListGrants`
    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::list_grants::ListGrantsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_grants::ListGrantsOutput::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::list_grants::ListGrantsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_grants::ListGrantsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_grants::ListGrantsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -115,119 +240,421 @@
  135    139   
                crate::operation::list_grants::ListGrantsError,
  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 ListGrantsResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListGrantsResponseDeserializer {
  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_list_grants::de_list_grants_http_error(status, headers, body)
  157         -
        } else {
  158         -
            crate::protocol_serde::shape_list_grants::de_list_grants_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::list_grants::ListGrantsError::unhandled(generic)),
         172  +
                    ))
         173  +
                }
         174  +
            };
         175  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         176  +
            let protocol = _cfg
         177  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         178  +
                .expect("a SharedClientProtocol is required");
         179  +
            let err = match error_code {
         180  +
                "DependencyTimeoutException" => crate::operation::list_grants::ListGrantsError::DependencyTimeoutException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
  159    197   
                    };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "InvalidArnException" => crate::operation::list_grants::ListGrantsError::InvalidArnException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "InvalidGrantIdException" => crate::operation::list_grants::ListGrantsError::InvalidGrantIdException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::InvalidGrantIdException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::InvalidGrantIdException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidMarkerException" => crate::operation::list_grants::ListGrantsError::InvalidMarkerException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::InvalidMarkerException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::InvalidMarkerException::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  +
                "KMSInternalException" => crate::operation::list_grants::ListGrantsError::KmsInternalException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::KmsInternalException::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  +
                "KMSInvalidStateException" => crate::operation::list_grants::ListGrantsError::KmsInvalidStateException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         305  +
                                &mut *deser,
         306  +
                                response.headers(),
         307  +
                                response.status().into(),
         308  +
                                body,
         309  +
                            )
         310  +
                        }) {
         311  +
                        ::std::result::Result::Ok(val) => val,
         312  +
                        ::std::result::Result::Err(e) => {
         313  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         314  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         315  +
                            ))
         316  +
                        }
         317  +
                    };
         318  +
                    tmp.meta = generic;
         319  +
                    if tmp.message.is_none() {
         320  +
                        tmp.message = _error_message;
         321  +
                    }
         322  +
                    tmp
         323  +
                }),
         324  +
                "NotFoundException" => crate::operation::list_grants::ListGrantsError::NotFoundException({
         325  +
                    let mut tmp = match protocol
         326  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         327  +
                        .and_then(|mut deser| {
         328  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         329  +
                                &mut *deser,
         330  +
                                response.headers(),
         331  +
                                response.status().into(),
         332  +
                                body,
         333  +
                            )
         334  +
                        }) {
         335  +
                        ::std::result::Result::Ok(val) => val,
         336  +
                        ::std::result::Result::Err(e) => {
         337  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         338  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         339  +
                            ))
         340  +
                        }
         341  +
                    };
         342  +
                    tmp.meta = generic;
         343  +
                    if tmp.message.is_none() {
         344  +
                        tmp.message = _error_message;
         345  +
                    }
         346  +
                    tmp
         347  +
                }),
         348  +
                _ => crate::operation::list_grants::ListGrantsError::generic(generic),
         349  +
            };
         350  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         351  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         352  +
            ))
         353  +
        } else {
         354  +
            let protocol = _cfg
         355  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         356  +
                .expect("a SharedClientProtocol is required");
         357  +
            let mut deser = protocol.deserialize_response(response, ListGrants::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         358  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         359  +
            })?;
         360  +
            let body = response.body().bytes().expect("body loaded");
         361  +
            let output = crate::operation::list_grants::ListGrantsOutput::deserialize_with_response(
         362  +
                &mut *deser,
         363  +
                response.headers(),
         364  +
                response.status().into(),
         365  +
                body,
         366  +
            )
         367  +
            .map_err(|e| {
         368  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         369  +
            })?;
         370  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         371  +
        }
  161    372   
    }
  162    373   
}
  163    374   
#[derive(Debug)]
  164    375   
struct ListGrantsRequestSerializer;
  165    376   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListGrantsRequestSerializer {
  166    377   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    378   
    fn serialize_input(
  168    379   
        &self,
  169    380   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    381   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    382   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    383   
        let input = input.downcast::<crate::operation::list_grants::ListGrantsInput>().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::list_grants::ListGrantsInput,
  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::list_grants::ListGrantsInput,
  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.ListGrants",
  202         -
            );
  203         -
            builder
  204         -
        };
  205         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_grants::ser_list_grants_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())
         384  +
        let protocol = _cfg
         385  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         386  +
            .expect("a SharedClientProtocol is required");
         387  +
        let mut request = protocol
         388  +
            .serialize_request(&input, ListGrants::INPUT_SCHEMA, "", _cfg)
         389  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         390  +
         391  +
        return ::std::result::Result::Ok(request);
  211    392   
    }
  212    393   
}
  213    394   
#[derive(Debug)]
  214    395   
struct ListGrantsEndpointParamsInterceptor;
  215    396   
  216    397   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListGrantsEndpointParamsInterceptor {
  217    398   
    fn name(&self) -> &'static str {
  218    399   
        "ListGrantsEndpointParamsInterceptor"
  219    400   
    }
  220    401