AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -22,22 +164,218 @@
   42     42   
    "com.amazonaws.kms.synthetic",
   43     43   
    "ScheduleKeyDeletionOutput",
   44     44   
);
   45     45   
static SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.kms.synthetic#ScheduleKeyDeletionOutput$KeyId",
   48     48   
        "com.amazonaws.kms.synthetic",
   49     49   
        "ScheduleKeyDeletionOutput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "key_id",
          52  +
    "KeyId",
   53     53   
    0,
   54     54   
);
   55     55   
static SCHEDULEKEYDELETIONOUTPUT_MEMBER_DELETION_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.kms.synthetic#ScheduleKeyDeletionOutput$DeletionDate",
   58     58   
        "com.amazonaws.kms.synthetic",
   59     59   
        "ScheduleKeyDeletionOutput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Timestamp,
   62         -
    "deletion_date",
          62  +
    "DeletionDate",
   63     63   
    1,
   64     64   
);
   65     65   
static SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_STATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   66     66   
    ::aws_smithy_schema::ShapeId::from_static(
   67     67   
        "com.amazonaws.kms.synthetic#ScheduleKeyDeletionOutput$KeyState",
   68     68   
        "com.amazonaws.kms.synthetic",
   69     69   
        "ScheduleKeyDeletionOutput",
   70     70   
    ),
   71     71   
    ::aws_smithy_schema::ShapeType::String,
   72         -
    "key_state",
          72  +
    "KeyState",
   73     73   
    2,
   74     74   
);
   75     75   
static SCHEDULEKEYDELETIONOUTPUT_MEMBER_PENDING_WINDOW_IN_DAYS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   76     76   
    ::aws_smithy_schema::ShapeId::from_static(
   77     77   
        "com.amazonaws.kms.synthetic#ScheduleKeyDeletionOutput$PendingWindowInDays",
   78     78   
        "com.amazonaws.kms.synthetic",
   79     79   
        "ScheduleKeyDeletionOutput",
   80     80   
    ),
   81     81   
    ::aws_smithy_schema::ShapeType::Integer,
   82         -
    "pending_window_in_days",
          82  +
    "PendingWindowInDays",
   83     83   
    3,
   84     84   
);
          85  +
static SCHEDULEKEYDELETIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          86  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          87  +
    ::aws_smithy_schema::ShapeType::String,
          88  +
    "request_id",
          89  +
    4,
          90  +
)
          91  +
.with_http_header("x-amzn-requestid");
   85     92   
static SCHEDULEKEYDELETIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   86     93   
    SCHEDULEKEYDELETIONOUTPUT_SCHEMA_ID,
   87     94   
    ::aws_smithy_schema::ShapeType::Structure,
   88     95   
    &[
   89     96   
        &SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_ID,
   90     97   
        &SCHEDULEKEYDELETIONOUTPUT_MEMBER_DELETION_DATE,
   91     98   
        &SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_STATE,
   92     99   
        &SCHEDULEKEYDELETIONOUTPUT_MEMBER_PENDING_WINDOW_IN_DAYS,
         100  +
        &SCHEDULEKEYDELETIONOUTPUT_MEMBER__REQUEST_ID,
   93    101   
    ],
   94    102   
);
   95    103   
impl ScheduleKeyDeletionOutput {
   96    104   
    /// The schema for this shape.
   97    105   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SCHEDULEKEYDELETIONOUTPUT_SCHEMA;
   98    106   
}
   99    107   
impl ::aws_smithy_schema::serde::SerializableStruct for ScheduleKeyDeletionOutput {
  100    108   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  101    109   
    fn serialize_members(
  102    110   
        &self,
  103    111   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  104    112   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  105    113   
        if let Some(ref val) = self.key_id {
  106    114   
            ser.write_string(&SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_ID, val)?;
  107    115   
        }
  108    116   
        if let Some(ref val) = self.deletion_date {
  109    117   
            ser.write_timestamp(&SCHEDULEKEYDELETIONOUTPUT_MEMBER_DELETION_DATE, val)?;
  110    118   
        }
  111    119   
        if let Some(ref val) = self.key_state {
  112    120   
            ser.write_string(&SCHEDULEKEYDELETIONOUTPUT_MEMBER_KEY_STATE, val.as_str())?;
  113    121   
        }
  114    122   
        if let Some(ref val) = self.pending_window_in_days {
  115    123   
            ser.write_integer(&SCHEDULEKEYDELETIONOUTPUT_MEMBER_PENDING_WINDOW_IN_DAYS, *val)?;
  116    124   
        }
  117    125   
        Ok(())
  118    126   
    }
  119    127   
}
  120    128   
impl ScheduleKeyDeletionOutput {
  121    129   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  122         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  123         -
        deserializer: &mut D,
         130  +
    pub fn deserialize(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         133  +
        #[allow(unused_variables, unused_mut)]
         134  +
        let mut builder = Self::builder();
         135  +
        #[allow(
         136  +
            unused_variables,
         137  +
            unreachable_code,
         138  +
            clippy::single_match,
         139  +
            clippy::match_single_binding,
         140  +
            clippy::diverging_sub_expression
         141  +
        )]
         142  +
        deserializer.read_struct(&SCHEDULEKEYDELETIONOUTPUT_SCHEMA, &mut |member, deser| {
         143  +
            match member.member_index() {
         144  +
                Some(0) => {
         145  +
                    builder.key_id = Some(deser.read_string(member)?);
         146  +
                }
         147  +
                Some(1) => {
         148  +
                    builder.deletion_date = Some(deser.read_timestamp(member)?);
         149  +
                }
         150  +
                Some(2) => {
         151  +
                    builder.key_state = Some(crate::types::KeyState::from(deser.read_string(member)?.as_str()));
         152  +
                }
         153  +
                Some(3) => {
         154  +
                    builder.pending_window_in_days = Some(deser.read_integer(member)?);
         155  +
                }
         156  +
                Some(4) => {
         157  +
                    builder._request_id = Some(deser.read_string(member)?);
         158  +
                }
         159  +
                _ => {}
         160  +
            }
         161  +
            Ok(())
         162  +
        })?;
         163  +
        Ok(builder.build())
         164  +
    }
         165  +
}
         166  +
impl ScheduleKeyDeletionOutput {
         167  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         168  +
    /// Header-bound members are read directly from headers, avoiding runtime
         169  +
    /// member iteration overhead. Body members are read via the deserializer.
         170  +
    pub fn deserialize_with_response(
         171  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         172  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         173  +
        _status: u16,
         174  +
        _body: &[u8],
  124    175   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  125    176   
        #[allow(unused_variables, unused_mut)]
  126    177   
        let mut builder = Self::builder();
         178  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         179  +
            builder._request_id = Some(val.to_string());
         180  +
        }
  127    181   
        #[allow(
  128    182   
            unused_variables,
  129    183   
            unreachable_code,
  130    184   
            clippy::single_match,
  131    185   
            clippy::match_single_binding,
  132    186   
            clippy::diverging_sub_expression
  133    187   
        )]
  134         -
        deserializer.read_struct(&SCHEDULEKEYDELETIONOUTPUT_SCHEMA, (), |_, member, deser| {
         188  +
        deserializer.read_struct(&SCHEDULEKEYDELETIONOUTPUT_SCHEMA, &mut |member, deser| {
  135    189   
            match member.member_index() {
  136    190   
                Some(0) => {
  137    191   
                    builder.key_id = Some(deser.read_string(member)?);
  138    192   
                }
  139    193   
                Some(1) => {
  140    194   
                    builder.deletion_date = Some(deser.read_timestamp(member)?);
  141    195   
                }
  142    196   
                Some(2) => {
  143    197   
                    builder.key_state = Some(crate::types::KeyState::from(deser.read_string(member)?.as_str()));
  144    198   
                }

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/sign.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 `Sign`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct Sign;
    6      6   
impl Sign {
    7      7   
    /// Creates a new `Sign`
    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::sign::SignInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::sign::SignOutput::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::sign::SignInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::sign::SignOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::sign::SignError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -109,113 +231,458 @@
  129    133   
        ::std::borrow::Cow::Owned(rcb)
  130    134   
    }
  131    135   
}
  132    136   
  133    137   
#[derive(Debug)]
  134    138   
struct SignResponseDeserializer;
  135    139   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SignResponseDeserializer {
  136    140   
    fn deserialize_nonstreaming(
  137    141   
        &self,
  138    142   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         143  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  139    144   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  140    145   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  141         -
        let headers = response.headers();
  142         -
        let body = response.body().bytes().expect("body loaded");
  143    146   
        #[allow(unused_mut)]
  144    147   
        let mut force_error = false;
  145    148   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  146         -
        let parse_result = if !success && status != 200 || force_error {
  147         -
            crate::protocol_serde::shape_sign::de_sign_http_error(status, headers, body)
         149  +
        if !success && status != 200 || force_error {
         150  +
            let headers = response.headers();
         151  +
            let body = response.body().bytes().expect("body loaded");
         152  +
            #[allow(unused_mut)]
         153  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         154  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         155  +
            })?;
         156  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         157  +
            let generic = generic_builder.build();
         158  +
            let error_code = match generic.code() {
         159  +
                ::std::option::Option::Some(code) => code,
         160  +
                ::std::option::Option::None => {
         161  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         162  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::sign::SignError::unhandled(generic)),
         163  +
                    ))
         164  +
                }
         165  +
            };
         166  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         167  +
            let protocol = _cfg
         168  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         169  +
                .expect("a SharedClientProtocol is required");
         170  +
            let err = match error_code {
         171  +
                "DependencyTimeoutException" => crate::operation::sign::SignError::DependencyTimeoutException({
         172  +
                    let mut tmp = match protocol
         173  +
                        .deserialize_response(response, crate::types::error::DependencyTimeoutException::SCHEMA, _cfg)
         174  +
                        .and_then(|mut deser| {
         175  +
                            crate::types::error::DependencyTimeoutException::deserialize_with_response(
         176  +
                                &mut *deser,
         177  +
                                response.headers(),
         178  +
                                response.status().into(),
         179  +
                                body,
         180  +
                            )
         181  +
                        }) {
         182  +
                        ::std::result::Result::Ok(val) => val,
         183  +
                        ::std::result::Result::Err(e) => {
         184  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         185  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         186  +
                            ))
         187  +
                        }
         188  +
                    };
         189  +
                    tmp.meta = generic;
         190  +
                    if tmp.message.is_none() {
         191  +
                        tmp.message = _error_message;
         192  +
                    }
         193  +
                    tmp
         194  +
                }),
         195  +
                "DisabledException" => crate::operation::sign::SignError::DisabledException({
         196  +
                    let mut tmp = match protocol
         197  +
                        .deserialize_response(response, crate::types::error::DisabledException::SCHEMA, _cfg)
         198  +
                        .and_then(|mut deser| {
         199  +
                            crate::types::error::DisabledException::deserialize_with_response(
         200  +
                                &mut *deser,
         201  +
                                response.headers(),
         202  +
                                response.status().into(),
         203  +
                                body,
         204  +
                            )
         205  +
                        }) {
         206  +
                        ::std::result::Result::Ok(val) => val,
         207  +
                        ::std::result::Result::Err(e) => {
         208  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         209  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         210  +
                            ))
         211  +
                        }
         212  +
                    };
         213  +
                    tmp.meta = generic;
         214  +
                    if tmp.message.is_none() {
         215  +
                        tmp.message = _error_message;
         216  +
                    }
         217  +
                    tmp
         218  +
                }),
         219  +
                "DryRunOperationException" => crate::operation::sign::SignError::DryRunOperationException({
         220  +
                    let mut tmp = match protocol
         221  +
                        .deserialize_response(response, crate::types::error::DryRunOperationException::SCHEMA, _cfg)
         222  +
                        .and_then(|mut deser| {
         223  +
                            crate::types::error::DryRunOperationException::deserialize_with_response(
         224  +
                                &mut *deser,
         225  +
                                response.headers(),
         226  +
                                response.status().into(),
         227  +
                                body,
         228  +
                            )
         229  +
                        }) {
         230  +
                        ::std::result::Result::Ok(val) => val,
         231  +
                        ::std::result::Result::Err(e) => {
         232  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         233  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         234  +
                            ))
         235  +
                        }
         236  +
                    };
         237  +
                    tmp.meta = generic;
         238  +
                    if tmp.message.is_none() {
         239  +
                        tmp.message = _error_message;
         240  +
                    }
         241  +
                    tmp
         242  +
                }),
         243  +
                "InvalidGrantTokenException" => crate::operation::sign::SignError::InvalidGrantTokenException({
         244  +
                    let mut tmp = match protocol
         245  +
                        .deserialize_response(response, crate::types::error::InvalidGrantTokenException::SCHEMA, _cfg)
         246  +
                        .and_then(|mut deser| {
         247  +
                            crate::types::error::InvalidGrantTokenException::deserialize_with_response(
         248  +
                                &mut *deser,
         249  +
                                response.headers(),
         250  +
                                response.status().into(),
         251  +
                                body,
         252  +
                            )
         253  +
                        }) {
         254  +
                        ::std::result::Result::Ok(val) => val,
         255  +
                        ::std::result::Result::Err(e) => {
         256  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                            ))
         259  +
                        }
         260  +
                    };
         261  +
                    tmp.meta = generic;
         262  +
                    if tmp.message.is_none() {
         263  +
                        tmp.message = _error_message;
         264  +
                    }
         265  +
                    tmp
         266  +
                }),
         267  +
                "InvalidKeyUsageException" => crate::operation::sign::SignError::InvalidKeyUsageException({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::InvalidKeyUsageException::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::InvalidKeyUsageException::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    if tmp.message.is_none() {
         287  +
                        tmp.message = _error_message;
         288  +
                    }
         289  +
                    tmp
         290  +
                }),
         291  +
                "KeyUnavailableException" => crate::operation::sign::SignError::KeyUnavailableException({
         292  +
                    let mut tmp = match protocol
         293  +
                        .deserialize_response(response, crate::types::error::KeyUnavailableException::SCHEMA, _cfg)
         294  +
                        .and_then(|mut deser| {
         295  +
                            crate::types::error::KeyUnavailableException::deserialize_with_response(
         296  +
                                &mut *deser,
         297  +
                                response.headers(),
         298  +
                                response.status().into(),
         299  +
                                body,
         300  +
                            )
         301  +
                        }) {
         302  +
                        ::std::result::Result::Ok(val) => val,
         303  +
                        ::std::result::Result::Err(e) => {
         304  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         305  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         306  +
                            ))
         307  +
                        }
         308  +
                    };
         309  +
                    tmp.meta = generic;
         310  +
                    if tmp.message.is_none() {
         311  +
                        tmp.message = _error_message;
         312  +
                    }
         313  +
                    tmp
         314  +
                }),
         315  +
                "KMSInternalException" => crate::operation::sign::SignError::KmsInternalException({
         316  +
                    let mut tmp = match protocol
         317  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         318  +
                        .and_then(|mut deser| {
         319  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         320  +
                                &mut *deser,
         321  +
                                response.headers(),
         322  +
                                response.status().into(),
         323  +
                                body,
         324  +
                            )
         325  +
                        }) {
         326  +
                        ::std::result::Result::Ok(val) => val,
         327  +
                        ::std::result::Result::Err(e) => {
         328  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         329  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         330  +
                            ))
         331  +
                        }
         332  +
                    };
         333  +
                    tmp.meta = generic;
         334  +
                    if tmp.message.is_none() {
         335  +
                        tmp.message = _error_message;
         336  +
                    }
         337  +
                    tmp
         338  +
                }),
         339  +
                "KMSInvalidStateException" => crate::operation::sign::SignError::KmsInvalidStateException({
         340  +
                    let mut tmp = match protocol
         341  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         342  +
                        .and_then(|mut deser| {
         343  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         344  +
                                &mut *deser,
         345  +
                                response.headers(),
         346  +
                                response.status().into(),
         347  +
                                body,
         348  +
                            )
         349  +
                        }) {
         350  +
                        ::std::result::Result::Ok(val) => val,
         351  +
                        ::std::result::Result::Err(e) => {
         352  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         353  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         354  +
                            ))
         355  +
                        }
         356  +
                    };
         357  +
                    tmp.meta = generic;
         358  +
                    if tmp.message.is_none() {
         359  +
                        tmp.message = _error_message;
         360  +
                    }
         361  +
                    tmp
         362  +
                }),
         363  +
                "NotFoundException" => crate::operation::sign::SignError::NotFoundException({
         364  +
                    let mut tmp = match protocol
         365  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         366  +
                        .and_then(|mut deser| {
         367  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         368  +
                                &mut *deser,
         369  +
                                response.headers(),
         370  +
                                response.status().into(),
         371  +
                                body,
         372  +
                            )
         373  +
                        }) {
         374  +
                        ::std::result::Result::Ok(val) => val,
         375  +
                        ::std::result::Result::Err(e) => {
         376  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         377  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         378  +
                            ))
         379  +
                        }
         380  +
                    };
         381  +
                    tmp.meta = generic;
         382  +
                    if tmp.message.is_none() {
         383  +
                        tmp.message = _error_message;
         384  +
                    }
         385  +
                    tmp
         386  +
                }),
         387  +
                _ => crate::operation::sign::SignError::generic(generic),
         388  +
            };
         389  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         390  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         391  +
            ))
  148    392   
        } else {
  149         -
            crate::protocol_serde::shape_sign::de_sign_http_response(status, headers, body)
  150         -
        };
  151         -
        crate::protocol_serde::type_erase_result(parse_result)
         393  +
            let protocol = _cfg
         394  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         395  +
                .expect("a SharedClientProtocol is required");
         396  +
            let mut deser = protocol.deserialize_response(response, Sign::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         397  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         398  +
            })?;
         399  +
            let body = response.body().bytes().expect("body loaded");
         400  +
            let output =
         401  +
                crate::operation::sign::SignOutput::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
         402  +
                    .map_err(|e| {
         403  +
                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
         404  +
                            e,
         405  +
                        ))
         406  +
                    })?;
         407  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         408  +
        }
  152    409   
    }
  153    410   
}
  154    411   
#[derive(Debug)]
  155    412   
struct SignRequestSerializer;
  156    413   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SignRequestSerializer {
  157    414   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  158    415   
    fn serialize_input(
  159    416   
        &self,
  160    417   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  161    418   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  162    419   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  163    420   
        let input = input.downcast::<crate::operation::sign::SignInput>().expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::sign::SignInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                ::std::write!(output, "/").expect("formatting should succeed");
  176         -
                ::std::result::Result::Ok(())
  177         -
            }
  178         -
            #[allow(clippy::unnecessary_wraps)]
  179         -
            fn update_http_builder(
  180         -
                input: &crate::operation::sign::SignInput,
  181         -
                builder: ::http_1x::request::Builder,
  182         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183         -
                let mut uri = ::std::string::String::new();
  184         -
                uri_base(input, &mut uri)?;
  185         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186         -
            }
  187         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189         -
            builder = _header_serialization_settings.set_default_header(
  190         -
                builder,
  191         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192         -
                "TrentService.Sign",
  193         -
            );
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_sign::ser_sign_input(&input)?);
  197         -
        if let Some(content_length) = body.content_length() {
  198         -
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200         -
        }
  201         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         421  +
        let protocol = _cfg
         422  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         423  +
            .expect("a SharedClientProtocol is required");
         424  +
        let mut request = protocol
         425  +
            .serialize_request(&input, Sign::INPUT_SCHEMA, "", _cfg)
         426  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         427  +
         428  +
        return ::std::result::Result::Ok(request);
  202    429   
    }
  203    430   
}
  204    431   
#[derive(Debug)]
  205    432   
struct SignEndpointParamsInterceptor;
  206    433   
  207    434   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SignEndpointParamsInterceptor {
  208    435   
    fn name(&self) -> &'static str {
  209    436   
        "SignEndpointParamsInterceptor"
  210    437   
    }
  211    438   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/tag_resource.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 `TagResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TagResource;
    6      6   
impl TagResource {
    7      7   
    /// Creates a new `TagResource`
    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::tag_resource::TagResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::tag_resource::TagResourceOutput::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::tag_resource::TagResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::tag_resource::TagResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::tag_resource::TagResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,399 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct TagResourceResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TagResourceResponseDeserializer {
  145    149   
    fn deserialize_nonstreaming(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_tag_resource::de_tag_resource_http_error(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::tag_resource::TagResourceError::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  +
                "InvalidArnException" => crate::operation::tag_resource::TagResourceError::InvalidArnException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "KMSInternalException" => crate::operation::tag_resource::TagResourceError::KmsInternalException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "KMSInvalidStateException" => crate::operation::tag_resource::TagResourceError::KmsInvalidStateException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "LimitExceededException" => crate::operation::tag_resource::TagResourceError::LimitExceededException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::LimitExceededException::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::tag_resource::TagResourceError::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  +
                "TagException" => crate::operation::tag_resource::TagResourceError::TagException({
         301  +
                    let mut tmp = match protocol
         302  +
                        .deserialize_response(response, crate::types::error::TagException::SCHEMA, _cfg)
         303  +
                        .and_then(|mut deser| {
         304  +
                            crate::types::error::TagException::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  +
                _ => crate::operation::tag_resource::TagResourceError::generic(generic),
         325  +
            };
         326  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         327  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         328  +
            ))
  157    329   
        } else {
  158         -
            crate::protocol_serde::shape_tag_resource::de_tag_resource_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         330  +
            let protocol = _cfg
         331  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         332  +
                .expect("a SharedClientProtocol is required");
         333  +
            let mut deser = protocol.deserialize_response(response, TagResource::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         334  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         335  +
            })?;
         336  +
            let body = response.body().bytes().expect("body loaded");
         337  +
            let output = crate::operation::tag_resource::TagResourceOutput::deserialize_with_response(
         338  +
                &mut *deser,
         339  +
                response.headers(),
         340  +
                response.status().into(),
         341  +
                body,
         342  +
            )
         343  +
            .map_err(|e| {
         344  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         345  +
            })?;
         346  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         347  +
        }
  161    348   
    }
  162    349   
}
  163    350   
#[derive(Debug)]
  164    351   
struct TagResourceRequestSerializer;
  165    352   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TagResourceRequestSerializer {
  166    353   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    354   
    fn serialize_input(
  168    355   
        &self,
  169    356   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    357   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    358   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    359   
        let input = input
  173    360   
            .downcast::<crate::operation::tag_resource::TagResourceInput>()
  174    361   
            .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::tag_resource::TagResourceInput,
  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::tag_resource::TagResourceInput,
  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.TagResource",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_tag_resource::ser_tag_resource_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())
         362  +
        let protocol = _cfg
         363  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         364  +
            .expect("a SharedClientProtocol is required");
         365  +
        let mut request = protocol
         366  +
            .serialize_request(&input, TagResource::INPUT_SCHEMA, "", _cfg)
         367  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         368  +
         369  +
        return ::std::result::Result::Ok(request);
  213    370   
    }
  214    371   
}
  215    372   
#[derive(Debug)]
  216    373   
struct TagResourceEndpointParamsInterceptor;
  217    374   
  218    375   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TagResourceEndpointParamsInterceptor {
  219    376   
    fn name(&self) -> &'static str {
  220    377   
        "TagResourceEndpointParamsInterceptor"
  221    378   
    }
  222    379   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/kms/src/operation/untag_resource.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 `UntagResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UntagResource;
    6      6   
impl UntagResource {
    7      7   
    /// Creates a new `UntagResource`
    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::untag_resource::UntagResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::untag_resource::UntagResourceOutput::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::untag_resource::UntagResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::untag_resource::UntagResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::untag_resource::UntagResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +242,375 @@
  138    142   
        ::std::borrow::Cow::Owned(rcb)
  139    143   
    }
  140    144   
}
  141    145   
  142    146   
#[derive(Debug)]
  143    147   
struct UntagResourceResponseDeserializer;
  144    148   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UntagResourceResponseDeserializer {
  145    149   
    fn deserialize_nonstreaming(
  146    150   
        &self,
  147    151   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         152  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    153   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    154   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
  151         -
        let body = response.body().bytes().expect("body loaded");
  152    155   
        #[allow(unused_mut)]
  153    156   
        let mut force_error = false;
  154    157   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_untag_resource::de_untag_resource_http_error(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::untag_resource::UntagResourceError::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  +
                "InvalidArnException" => crate::operation::untag_resource::UntagResourceError::InvalidArnException({
         181  +
                    let mut tmp = match protocol
         182  +
                        .deserialize_response(response, crate::types::error::InvalidArnException::SCHEMA, _cfg)
         183  +
                        .and_then(|mut deser| {
         184  +
                            crate::types::error::InvalidArnException::deserialize_with_response(
         185  +
                                &mut *deser,
         186  +
                                response.headers(),
         187  +
                                response.status().into(),
         188  +
                                body,
         189  +
                            )
         190  +
                        }) {
         191  +
                        ::std::result::Result::Ok(val) => val,
         192  +
                        ::std::result::Result::Err(e) => {
         193  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         194  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         195  +
                            ))
         196  +
                        }
         197  +
                    };
         198  +
                    tmp.meta = generic;
         199  +
                    if tmp.message.is_none() {
         200  +
                        tmp.message = _error_message;
         201  +
                    }
         202  +
                    tmp
         203  +
                }),
         204  +
                "KMSInternalException" => crate::operation::untag_resource::UntagResourceError::KmsInternalException({
         205  +
                    let mut tmp = match protocol
         206  +
                        .deserialize_response(response, crate::types::error::KmsInternalException::SCHEMA, _cfg)
         207  +
                        .and_then(|mut deser| {
         208  +
                            crate::types::error::KmsInternalException::deserialize_with_response(
         209  +
                                &mut *deser,
         210  +
                                response.headers(),
         211  +
                                response.status().into(),
         212  +
                                body,
         213  +
                            )
         214  +
                        }) {
         215  +
                        ::std::result::Result::Ok(val) => val,
         216  +
                        ::std::result::Result::Err(e) => {
         217  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         218  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         219  +
                            ))
         220  +
                        }
         221  +
                    };
         222  +
                    tmp.meta = generic;
         223  +
                    if tmp.message.is_none() {
         224  +
                        tmp.message = _error_message;
         225  +
                    }
         226  +
                    tmp
         227  +
                }),
         228  +
                "KMSInvalidStateException" => crate::operation::untag_resource::UntagResourceError::KmsInvalidStateException({
         229  +
                    let mut tmp = match protocol
         230  +
                        .deserialize_response(response, crate::types::error::KmsInvalidStateException::SCHEMA, _cfg)
         231  +
                        .and_then(|mut deser| {
         232  +
                            crate::types::error::KmsInvalidStateException::deserialize_with_response(
         233  +
                                &mut *deser,
         234  +
                                response.headers(),
         235  +
                                response.status().into(),
         236  +
                                body,
         237  +
                            )
         238  +
                        }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "NotFoundException" => crate::operation::untag_resource::UntagResourceError::NotFoundException({
         253  +
                    let mut tmp = match protocol
         254  +
                        .deserialize_response(response, crate::types::error::NotFoundException::SCHEMA, _cfg)
         255  +
                        .and_then(|mut deser| {
         256  +
                            crate::types::error::NotFoundException::deserialize_with_response(
         257  +
                                &mut *deser,
         258  +
                                response.headers(),
         259  +
                                response.status().into(),
         260  +
                                body,
         261  +
                            )
         262  +
                        }) {
         263  +
                        ::std::result::Result::Ok(val) => val,
         264  +
                        ::std::result::Result::Err(e) => {
         265  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         266  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         267  +
                            ))
         268  +
                        }
         269  +
                    };
         270  +
                    tmp.meta = generic;
         271  +
                    if tmp.message.is_none() {
         272  +
                        tmp.message = _error_message;
         273  +
                    }
         274  +
                    tmp
         275  +
                }),
         276  +
                "TagException" => crate::operation::untag_resource::UntagResourceError::TagException({
         277  +
                    let mut tmp = match protocol
         278  +
                        .deserialize_response(response, crate::types::error::TagException::SCHEMA, _cfg)
         279  +
                        .and_then(|mut deser| {
         280  +
                            crate::types::error::TagException::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::untag_resource::UntagResourceError::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  +
            ))
  157    305   
        } else {
  158         -
            crate::protocol_serde::shape_untag_resource::de_untag_resource_http_response(status, headers, body)
  159         -
        };
  160         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, UntagResource::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::untag_resource::UntagResourceOutput::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 UntagResourceRequestSerializer;
  165    328   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UntagResourceRequestSerializer {
  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::untag_resource::UntagResourceInput>()
  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::untag_resource::UntagResourceInput,
  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::untag_resource::UntagResourceInput,
  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.UntagResource",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_untag_resource::ser_untag_resource_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, UntagResource::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 UntagResourceEndpointParamsInterceptor;
  217    350   
  218    351   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UntagResourceEndpointParamsInterceptor {
  219    352   
    fn name(&self) -> &'static str {
  220    353   
        "UntagResourceEndpointParamsInterceptor"
  221    354   
    }
  222    355