AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_provisioned_capacity/_list_provisioned_capacity_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_provisioned_capacity/_list_provisioned_capacity_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_tags_for_vault.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 `ListTagsForVault`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTagsForVault;
    6      6   
impl ListTagsForVault {
    7      7   
    /// Creates a new `ListTagsForVault`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_for_vault::ListTagsForVaultInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_for_vault::ListTagsForVaultOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_tags_for_vault::ListTagsForVaultInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tags_for_vault::ListTagsForVaultOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tags_for_vault::ListTagsForVaultError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +267,394 @@
  144    148   
        ::std::borrow::Cow::Owned(rcb)
  145    149   
    }
  146    150   
}
  147    151   
  148    152   
#[derive(Debug)]
  149    153   
struct ListTagsForVaultResponseDeserializer;
  150    154   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsForVaultResponseDeserializer {
  151    155   
    fn deserialize_nonstreaming(
  152    156   
        &self,
  153    157   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         158  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  154    159   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  155    160   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  156         -
        let headers = response.headers();
  157         -
        let body = response.body().bytes().expect("body loaded");
  158    161   
        #[allow(unused_mut)]
  159    162   
        let mut force_error = false;
  160    163   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  161         -
        let parse_result = if !success && status != 200 || force_error {
  162         -
            crate::protocol_serde::shape_list_tags_for_vault::de_list_tags_for_vault_http_error(status, headers, body)
         164  +
        if !success && status != 200 || force_error {
         165  +
            let headers = response.headers();
         166  +
            let body = response.body().bytes().expect("body loaded");
         167  +
            #[allow(unused_mut)]
         168  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         169  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         170  +
            })?;
         171  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         172  +
            let generic = generic_builder.build();
         173  +
            let error_code = match generic.code() {
         174  +
                ::std::option::Option::Some(code) => code,
         175  +
                ::std::option::Option::None => {
         176  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         177  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_tags_for_vault::ListTagsForVaultError::unhandled(
         178  +
                            generic,
         179  +
                        )),
         180  +
                    ))
         181  +
                }
         182  +
            };
         183  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         184  +
            let protocol = _cfg
         185  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         186  +
                .expect("a SharedClientProtocol is required");
         187  +
            let err = match error_code {
         188  +
                "InvalidParameterValueException" => crate::operation::list_tags_for_vault::ListTagsForVaultError::InvalidParameterValueException({
         189  +
                    let mut tmp = match protocol
         190  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         191  +
                        .and_then(|mut deser| {
         192  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         193  +
                                &mut *deser,
         194  +
                                response.headers(),
         195  +
                                response.status().into(),
         196  +
                                body,
         197  +
                            )
         198  +
                        }) {
         199  +
                        ::std::result::Result::Ok(val) => val,
         200  +
                        ::std::result::Result::Err(e) => {
         201  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         202  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         203  +
                            ))
         204  +
                        }
         205  +
                    };
         206  +
                    tmp.meta = generic;
         207  +
                    if tmp.message.is_none() {
         208  +
                        tmp.message = _error_message;
         209  +
                    }
         210  +
                    tmp
         211  +
                }),
         212  +
                "MissingParameterValueException" => crate::operation::list_tags_for_vault::ListTagsForVaultError::MissingParameterValueException({
         213  +
                    let mut tmp = match protocol
         214  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         215  +
                        .and_then(|mut deser| {
         216  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         217  +
                                &mut *deser,
         218  +
                                response.headers(),
         219  +
                                response.status().into(),
         220  +
                                body,
         221  +
                            )
         222  +
                        }) {
         223  +
                        ::std::result::Result::Ok(val) => val,
         224  +
                        ::std::result::Result::Err(e) => {
         225  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         226  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         227  +
                            ))
         228  +
                        }
         229  +
                    };
         230  +
                    tmp.meta = generic;
         231  +
                    if tmp.message.is_none() {
         232  +
                        tmp.message = _error_message;
         233  +
                    }
         234  +
                    tmp
         235  +
                }),
         236  +
                "ResourceNotFoundException" => crate::operation::list_tags_for_vault::ListTagsForVaultError::ResourceNotFoundException({
         237  +
                    let mut tmp = match protocol
         238  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         239  +
                        .and_then(|mut deser| {
         240  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         241  +
                                &mut *deser,
         242  +
                                response.headers(),
         243  +
                                response.status().into(),
         244  +
                                body,
         245  +
                            )
         246  +
                        }) {
         247  +
                        ::std::result::Result::Ok(val) => val,
         248  +
                        ::std::result::Result::Err(e) => {
         249  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                            ))
         252  +
                        }
         253  +
                    };
         254  +
                    tmp.meta = generic;
         255  +
                    if tmp.message.is_none() {
         256  +
                        tmp.message = _error_message;
         257  +
                    }
         258  +
                    tmp
         259  +
                }),
         260  +
                "ServiceUnavailableException" => crate::operation::list_tags_for_vault::ListTagsForVaultError::ServiceUnavailableException({
         261  +
                    let mut tmp = match protocol
         262  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         263  +
                        .and_then(|mut deser| {
         264  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         265  +
                                &mut *deser,
         266  +
                                response.headers(),
         267  +
                                response.status().into(),
         268  +
                                body,
         269  +
                            )
         270  +
                        }) {
         271  +
                        ::std::result::Result::Ok(val) => val,
         272  +
                        ::std::result::Result::Err(e) => {
         273  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         274  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         275  +
                            ))
         276  +
                        }
         277  +
                    };
         278  +
                    tmp.meta = generic;
         279  +
                    if tmp.message.is_none() {
         280  +
                        tmp.message = _error_message;
         281  +
                    }
         282  +
                    tmp
         283  +
                }),
         284  +
                _ => crate::operation::list_tags_for_vault::ListTagsForVaultError::generic(generic),
         285  +
            };
         286  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         287  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         288  +
            ))
  163    289   
        } else {
  164         -
            crate::protocol_serde::shape_list_tags_for_vault::de_list_tags_for_vault_http_response(status, headers, body)
  165         -
        };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         290  +
            let protocol = _cfg
         291  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         292  +
                .expect("a SharedClientProtocol is required");
         293  +
            let mut deser = protocol
         294  +
                .deserialize_response(response, ListTagsForVault::OUTPUT_SCHEMA, _cfg)
         295  +
                .map_err(|e| {
         296  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         297  +
                })?;
         298  +
            let body = response.body().bytes().expect("body loaded");
         299  +
            let output = crate::operation::list_tags_for_vault::ListTagsForVaultOutput::deserialize_with_response(
         300  +
                &mut *deser,
         301  +
                response.headers(),
         302  +
                response.status().into(),
         303  +
                body,
         304  +
            )
         305  +
            .map_err(|e| {
         306  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         307  +
            })?;
         308  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         309  +
        }
  167    310   
    }
  168    311   
}
  169    312   
#[derive(Debug)]
  170    313   
struct ListTagsForVaultRequestSerializer;
  171    314   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsForVaultRequestSerializer {
  172    315   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    316   
    fn serialize_input(
  174    317   
        &self,
  175    318   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    319   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    320   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    321   
        let input = input
  179    322   
            .downcast::<crate::operation::list_tags_for_vault::ListTagsForVaultInput>()
  180    323   
            .expect("correct type");
  181         -
        let _header_serialization_settings = _cfg
  182         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  183         -
            .cloned()
  184         -
            .unwrap_or_default();
  185         -
        let mut request_builder = {
  186         -
            #[allow(clippy::uninlined_format_args)]
  187         -
            fn uri_base(
  188         -
                _input: &crate::operation::list_tags_for_vault::ListTagsForVaultInput,
  189         -
                output: &mut ::std::string::String,
  190         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  191         -
                use ::std::fmt::Write as _;
  192         -
                let input_1 = &_input.account_id;
  193         -
                let input_1 = input_1
  194         -
                    .as_ref()
  195         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  196         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  197         -
                if account_id.is_empty() {
  198         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  199         -
                        "account_id",
  200         -
                        "cannot be empty or unset",
  201         -
                    ));
         324  +
        let protocol = _cfg
         325  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         326  +
            .expect("a SharedClientProtocol is required");
         327  +
        if protocol.supports_http_bindings() {
         328  +
            let mut request = protocol
         329  +
                .serialize_body(&input, ListTagsForVault::INPUT_SCHEMA, "", _cfg)
         330  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         331  +
            {
         332  +
                let mut uri = "/{accountId}/vaults/{vaultName}/tags".to_string();
         333  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         334  +
                if let Some(ref val) = input.account_id {
         335  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  202    336   
                }
  203         -
                let input_2 = &_input.vault_name;
  204         -
                let input_2 = input_2
  205         -
                    .as_ref()
  206         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("vault_name", "cannot be empty or unset"))?;
  207         -
                let vault_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  208         -
                if vault_name.is_empty() {
  209         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  210         -
                        "vault_name",
  211         -
                        "cannot be empty or unset",
  212         -
                    ));
         337  +
                if let Some(ref val) = input.vault_name {
         338  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  213    339   
                }
  214         -
                ::std::write!(
  215         -
                    output,
  216         -
                    "/{accountId}/vaults/{vaultName}/tags",
  217         -
                    accountId = account_id,
  218         -
                    vaultName = vault_name
  219         -
                )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
  222         -
            }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::list_tags_for_vault::ListTagsForVaultInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         340  +
                if !query_params.is_empty() {
         341  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         342  +
                    let pairs: Vec<String> = query_params
         343  +
                        .iter()
         344  +
                        .map(|(k, v)| {
         345  +
                            format!(
         346  +
                                "{}={}",
         347  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         348  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         349  +
                            )
         350  +
                        })
         351  +
                        .collect();
         352  +
                    uri.push_str(&pairs.join("&"));
         353  +
                }
         354  +
                request.set_uri(uri.as_str()).expect("valid URI");
  231    355   
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder
  234         -
        };
  235         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  236    356   
  237         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         357  +
            return ::std::result::Result::Ok(request);
         358  +
        } else {
         359  +
            let mut request = protocol
         360  +
                .serialize_request(&input, ListTagsForVault::INPUT_SCHEMA, "", _cfg)
         361  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         362  +
         363  +
            return ::std::result::Result::Ok(request);
         364  +
        }
  238    365   
    }
  239    366   
}
  240    367   
#[derive(Debug)]
  241    368   
struct ListTagsForVaultEndpointParamsInterceptor;
  242    369   
  243    370   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForVaultEndpointParamsInterceptor {
  244    371   
    fn name(&self) -> &'static str {
  245    372   
        "ListTagsForVaultEndpointParamsInterceptor"
  246    373   
    }
  247    374   

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_tags_for_vault/_list_tags_for_vault_input.rs

@@ -4,4 +133,151 @@
   24     24   
    "com.amazonaws.glacier.synthetic",
   25     25   
    "ListTagsForVaultInput",
   26     26   
);
   27     27   
static LISTTAGSFORVAULTINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "com.amazonaws.glacier.synthetic#ListTagsForVaultInput$accountId",
   30     30   
        "com.amazonaws.glacier.synthetic",
   31     31   
        "ListTagsForVaultInput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "account_id",
          34  +
    "accountId",
   35     35   
    0,
   36     36   
)
   37     37   
.with_http_label();
   38     38   
static LISTTAGSFORVAULTINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.glacier.synthetic#ListTagsForVaultInput$vaultName",
   41     41   
        "com.amazonaws.glacier.synthetic",
   42     42   
        "ListTagsForVaultInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "vault_name",
          45  +
    "vaultName",
   46     46   
    1,
   47     47   
)
   48     48   
.with_http_label();
   49     49   
static LISTTAGSFORVAULTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     50   
    LISTTAGSFORVAULTINPUT_SCHEMA_ID,
   51     51   
    ::aws_smithy_schema::ShapeType::Structure,
   52     52   
    &[&LISTTAGSFORVAULTINPUT_MEMBER_ACCOUNT_ID, &LISTTAGSFORVAULTINPUT_MEMBER_VAULT_NAME],
   53         -
);
          53  +
)
          54  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          55  +
    "GET",
          56  +
    "/{accountId}/vaults/{vaultName}/tags",
          57  +
    None,
          58  +
));
   54     59   
impl ListTagsForVaultInput {
   55     60   
    /// The schema for this shape.
   56     61   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORVAULTINPUT_SCHEMA;
   57     62   
}
   58     63   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForVaultInput {
   59     64   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     65   
    fn serialize_members(
   61     66   
        &self,
   62     67   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     68   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     69   
        if let Some(ref val) = self.account_id {
   65     70   
            ser.write_string(&LISTTAGSFORVAULTINPUT_MEMBER_ACCOUNT_ID, val)?;
   66     71   
        }
   67     72   
        if let Some(ref val) = self.vault_name {
   68     73   
            ser.write_string(&LISTTAGSFORVAULTINPUT_MEMBER_VAULT_NAME, val)?;
   69     74   
        }
   70     75   
        Ok(())
   71     76   
    }
   72     77   
}
   73     78   
impl ListTagsForVaultInput {
   74     79   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   75         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   76         -
        deserializer: &mut D,
          80  +
    pub fn deserialize(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   77     82   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   78     83   
        #[allow(unused_variables, unused_mut)]
   79     84   
        let mut builder = Self::builder();
   80     85   
        #[allow(
   81     86   
            unused_variables,
   82     87   
            unreachable_code,
   83     88   
            clippy::single_match,
   84     89   
            clippy::match_single_binding,
   85     90   
            clippy::diverging_sub_expression
   86     91   
        )]
   87         -
        deserializer.read_struct(&LISTTAGSFORVAULTINPUT_SCHEMA, (), |_, member, deser| {
          92  +
        deserializer.read_struct(&LISTTAGSFORVAULTINPUT_SCHEMA, &mut |member, deser| {
   88     93   
            match member.member_index() {
   89     94   
                Some(0) => {
   90     95   
                    builder.account_id = Some(deser.read_string(member)?);
   91     96   
                }
   92     97   
                Some(1) => {
   93     98   
                    builder.vault_name = Some(deser.read_string(member)?);
   94     99   
                }
   95    100   
                _ => {}
   96    101   
            }
   97    102   
            Ok(())
   98    103   
        })?;
         104  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         105  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
   99    106   
        builder
  100    107   
            .build()
  101    108   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  102    109   
    }
  103    110   
}
         111  +
impl ListTagsForVaultInput {
         112  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         113  +
    pub fn deserialize_with_response(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         116  +
        _status: u16,
         117  +
        _body: &[u8],
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        Self::deserialize(deserializer)
         120  +
    }
         121  +
}
  104    122   
impl crate::glacier_interceptors::GlacierAccountId for ListTagsForVaultInput {
  105    123   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  106    124   
        &mut self.account_id
  107    125   
    }
  108    126   
}
  109    127   
impl ListTagsForVaultInput {
  110    128   
    /// Creates a new builder-style object to manufacture [`ListTagsForVaultInput`](crate::operation::list_tags_for_vault::ListTagsForVaultInput).
  111    129   
    pub fn builder() -> crate::operation::list_tags_for_vault::builders::ListTagsForVaultInputBuilder {
  112    130   
        crate::operation::list_tags_for_vault::builders::ListTagsForVaultInputBuilder::default()
  113    131   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_tags_for_vault/_list_tags_for_vault_output.rs

@@ -1,1 +119,153 @@
   19     19   
    "com.amazonaws.glacier.synthetic",
   20     20   
    "ListTagsForVaultOutput",
   21     21   
);
   22     22   
static LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.glacier.synthetic#ListTagsForVaultOutput$Tags",
   25     25   
        "com.amazonaws.glacier.synthetic",
   26     26   
        "ListTagsForVaultOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::Map,
   29         -
    "tags",
          29  +
    "Tags",
   30     30   
    0,
   31     31   
);
          32  +
static LISTTAGSFORVAULTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "request_id",
          36  +
    1,
          37  +
)
          38  +
.with_http_header("x-amzn-requestid");
   32     39   
static LISTTAGSFORVAULTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     40   
    LISTTAGSFORVAULTOUTPUT_SCHEMA_ID,
   34     41   
    ::aws_smithy_schema::ShapeType::Structure,
   35         -
    &[&LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS],
          42  +
    &[&LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS, &LISTTAGSFORVAULTOUTPUT_MEMBER__REQUEST_ID],
   36     43   
);
   37     44   
impl ListTagsForVaultOutput {
   38     45   
    /// The schema for this shape.
   39     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORVAULTOUTPUT_SCHEMA;
   40     47   
}
   41     48   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForVaultOutput {
   42     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     50   
    fn serialize_members(
   44     51   
        &self,
   45     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     54   
        if let Some(ref val) = self.tags {
   48     55   
            ser.write_map(
   49     56   
                &LISTTAGSFORVAULTOUTPUT_MEMBER_TAGS,
   50     57   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   51     58   
                    for (key, value) in val {
   52     59   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   53     60   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   54     61   
                    }
   55     62   
                    Ok(())
   56     63   
                },
   57     64   
            )?;
   58     65   
        }
   59     66   
        Ok(())
   60     67   
    }
   61     68   
}
   62     69   
impl ListTagsForVaultOutput {
   63     70   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   64         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   65         -
        deserializer: &mut D,
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   66     73   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   67     74   
        #[allow(unused_variables, unused_mut)]
   68     75   
        let mut builder = Self::builder();
   69     76   
        #[allow(
   70     77   
            unused_variables,
   71     78   
            unreachable_code,
   72     79   
            clippy::single_match,
   73     80   
            clippy::match_single_binding,
   74     81   
            clippy::diverging_sub_expression
   75     82   
        )]
   76         -
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, (), |_, member, deser| {
          83  +
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, &mut |member, deser| {
   77     84   
            match member.member_index() {
   78     85   
                Some(0) => {
   79         -
                    builder.tags = Some({
   80         -
                        let container = if let Some(cap) = deser.container_size() {
   81         -
                            std::collections::HashMap::with_capacity(cap)
   82         -
                        } else {
   83         -
                            std::collections::HashMap::new()
   84         -
                        };
   85         -
                        deser.read_map(member, container, |mut map, key, deser| {
   86         -
                            map.insert(key, deser.read_string(member)?);
   87         -
                            Ok(map)
   88         -
                        })?
   89         -
                    });
          86  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
          87  +
                }
          88  +
                Some(1) => {
          89  +
                    builder._request_id = Some(deser.read_string(member)?);
          90  +
                }
          91  +
                _ => {}
          92  +
            }
          93  +
            Ok(())
          94  +
        })?;
          95  +
        Ok(builder.build())
          96  +
    }
          97  +
}
          98  +
impl ListTagsForVaultOutput {
          99  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         100  +
    /// Header-bound members are read directly from headers, avoiding runtime
         101  +
    /// member iteration overhead. Body members are read via the deserializer.
         102  +
    pub fn deserialize_with_response(
         103  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         104  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         105  +
        _status: u16,
         106  +
        _body: &[u8],
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         111  +
            builder._request_id = Some(val.to_string());
         112  +
        }
         113  +
        #[allow(
         114  +
            unused_variables,
         115  +
            unreachable_code,
         116  +
            clippy::single_match,
         117  +
            clippy::match_single_binding,
         118  +
            clippy::diverging_sub_expression
         119  +
        )]
         120  +
        deserializer.read_struct(&LISTTAGSFORVAULTOUTPUT_SCHEMA, &mut |member, deser| {
         121  +
            match member.member_index() {
         122  +
                Some(0) => {
         123  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
   90    124   
                }
   91    125   
                _ => {}
   92    126   
            }
   93    127   
            Ok(())
   94    128   
        })?;
   95    129   
        Ok(builder.build())
   96    130   
    }
   97    131   
}
   98    132   
impl ::aws_types::request_id::RequestId for ListTagsForVaultOutput {
   99    133   
    fn request_id(&self) -> Option<&str> {

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_vaults.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 `ListVaults`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListVaults;
    6      6   
impl ListVaults {
    7      7   
    /// Creates a new `ListVaults`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_vaults::ListVaultsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_vaults::ListVaultsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_vaults::ListVaultsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_vaults::ListVaultsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_vaults::ListVaultsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +263,388 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListVaultsResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListVaultsResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_vaults::de_list_vaults_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_vaults::ListVaultsError::unhandled(generic)),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "InvalidParameterValueException" => crate::operation::list_vaults::ListVaultsError::InvalidParameterValueException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "MissingParameterValueException" => crate::operation::list_vaults::ListVaultsError::MissingParameterValueException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ResourceNotFoundException" => crate::operation::list_vaults::ListVaultsError::ResourceNotFoundException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ServiceUnavailableException" => crate::operation::list_vaults::ListVaultsError::ServiceUnavailableException({
         256  +
                    let mut tmp = match protocol
         257  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         258  +
                        .and_then(|mut deser| {
         259  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         260  +
                                &mut *deser,
         261  +
                                response.headers(),
         262  +
                                response.status().into(),
         263  +
                                body,
         264  +
                            )
         265  +
                        }) {
         266  +
                        ::std::result::Result::Ok(val) => val,
         267  +
                        ::std::result::Result::Err(e) => {
         268  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         269  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         270  +
                            ))
         271  +
                        }
         272  +
                    };
         273  +
                    tmp.meta = generic;
         274  +
                    if tmp.message.is_none() {
         275  +
                        tmp.message = _error_message;
         276  +
                    }
         277  +
                    tmp
         278  +
                }),
         279  +
                _ => crate::operation::list_vaults::ListVaultsError::generic(generic),
         280  +
            };
         281  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         282  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         283  +
            ))
  160    284   
        } else {
  161         -
            crate::protocol_serde::shape_list_vaults::de_list_vaults_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         285  +
            let protocol = _cfg
         286  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         287  +
                .expect("a SharedClientProtocol is required");
         288  +
            let mut deser = protocol.deserialize_response(response, ListVaults::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         289  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         290  +
            })?;
         291  +
            let body = response.body().bytes().expect("body loaded");
         292  +
            let output = crate::operation::list_vaults::ListVaultsOutput::deserialize_with_response(
         293  +
                &mut *deser,
         294  +
                response.headers(),
         295  +
                response.status().into(),
         296  +
                body,
         297  +
            )
         298  +
            .map_err(|e| {
         299  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         300  +
            })?;
         301  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         302  +
        }
  164    303   
    }
  165    304   
}
  166    305   
#[derive(Debug)]
  167    306   
struct ListVaultsRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListVaultsRequestSerializer {
  169    308   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    309   
    fn serialize_input(
  171    310   
        &self,
  172    311   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    312   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    313   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    314   
        let input = input.downcast::<crate::operation::list_vaults::ListVaultsInput>().expect("correct type");
  176         -
        let _header_serialization_settings = _cfg
  177         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  178         -
            .cloned()
  179         -
            .unwrap_or_default();
  180         -
        let mut request_builder = {
  181         -
            #[allow(clippy::uninlined_format_args)]
  182         -
            fn uri_base(
  183         -
                _input: &crate::operation::list_vaults::ListVaultsInput,
  184         -
                output: &mut ::std::string::String,
  185         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  186         -
                use ::std::fmt::Write as _;
  187         -
                let input_1 = &_input.account_id;
  188         -
                let input_1 = input_1
  189         -
                    .as_ref()
  190         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  191         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  192         -
                if account_id.is_empty() {
  193         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  194         -
                        "account_id",
  195         -
                        "cannot be empty or unset",
  196         -
                    ));
         315  +
        let protocol = _cfg
         316  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
            .expect("a SharedClientProtocol is required");
         318  +
        if protocol.supports_http_bindings() {
         319  +
            let mut request = protocol
         320  +
                .serialize_body(&input, ListVaults::INPUT_SCHEMA, "", _cfg)
         321  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         322  +
            {
         323  +
                let mut uri = "/{accountId}/vaults".to_string();
         324  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         325  +
                if let Some(ref val) = input.account_id {
         326  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  197    327   
                }
  198         -
                ::std::write!(output, "/{accountId}/vaults", accountId = account_id).expect("formatting should succeed");
  199         -
                ::std::result::Result::Ok(())
  200         -
            }
  201         -
            fn uri_query(
  202         -
                _input: &crate::operation::list_vaults::ListVaultsInput,
  203         -
                mut output: &mut ::std::string::String,
  204         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  205         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  206         -
                if let ::std::option::Option::Some(inner_2) = &_input.marker {
  207         -
                    {
  208         -
                        query.push_kv("marker", &::aws_smithy_http::query::fmt_string(inner_2));
  209         -
                    }
         328  +
                if let Some(ref val) = input.marker {
         329  +
                    query_params.push(("marker".to_string(), val.to_string()));
  210    330   
                }
  211         -
                if let ::std::option::Option::Some(inner_3) = &_input.limit {
  212         -
                    {
  213         -
                        query.push_kv("limit", ::aws_smithy_types::primitive::Encoder::from(*inner_3).encode());
  214         -
                    }
         331  +
                if let Some(ref val) = input.limit {
         332  +
                    query_params.push(("limit".to_string(), val.to_string()));
  215    333   
                }
  216         -
                ::std::result::Result::Ok(())
  217         -
            }
  218         -
            #[allow(clippy::unnecessary_wraps)]
  219         -
            fn update_http_builder(
  220         -
                input: &crate::operation::list_vaults::ListVaultsInput,
  221         -
                builder: ::http_1x::request::Builder,
  222         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  223         -
                let mut uri = ::std::string::String::new();
  224         -
                uri_base(input, &mut uri)?;
  225         -
                uri_query(input, &mut uri)?;
  226         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         334  +
                if !query_params.is_empty() {
         335  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         336  +
                    let pairs: Vec<String> = query_params
         337  +
                        .iter()
         338  +
                        .map(|(k, v)| {
         339  +
                            format!(
         340  +
                                "{}={}",
         341  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         342  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         343  +
                            )
         344  +
                        })
         345  +
                        .collect();
         346  +
                    uri.push_str(&pairs.join("&"));
         347  +
                }
         348  +
                request.set_uri(uri.as_str()).expect("valid URI");
  227    349   
            }
  228         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  229         -
            builder
  230         -
        };
  231         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  232    350   
  233         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         351  +
            return ::std::result::Result::Ok(request);
         352  +
        } else {
         353  +
            let mut request = protocol
         354  +
                .serialize_request(&input, ListVaults::INPUT_SCHEMA, "", _cfg)
         355  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         356  +
         357  +
            return ::std::result::Result::Ok(request);
         358  +
        }
  234    359   
    }
  235    360   
}
  236    361   
#[derive(Debug)]
  237    362   
struct ListVaultsEndpointParamsInterceptor;
  238    363   
  239    364   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListVaultsEndpointParamsInterceptor {
  240    365   
    fn name(&self) -> &'static str {
  241    366   
        "ListVaultsEndpointParamsInterceptor"
  242    367   
    }
  243    368   

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_vaults/_list_vaults_input.rs

@@ -10,10 +160,173 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "ListVaultsInput",
   32     32   
);
   33     33   
static LISTVAULTSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   34     34   
    ::aws_smithy_schema::ShapeId::from_static(
   35     35   
        "com.amazonaws.glacier.synthetic#ListVaultsInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "ListVaultsInput",
   38     38   
    ),
   39     39   
    ::aws_smithy_schema::ShapeType::String,
   40         -
    "account_id",
          40  +
    "accountId",
   41     41   
    0,
   42     42   
)
   43     43   
.with_http_label();
   44     44   
static LISTVAULTSINPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.glacier.synthetic#ListVaultsInput$marker",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "ListVaultsInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51     51   
    "marker",
   52     52   
    1,
   53     53   
)
   54     54   
.with_http_query("marker");
   55     55   
static LISTVAULTSINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.glacier.synthetic#ListVaultsInput$limit",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "ListVaultsInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Integer,
   62     62   
    "limit",
   63     63   
    2,
   64     64   
)
   65     65   
.with_http_query("limit");
   66     66   
static LISTVAULTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    LISTVAULTSINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &LISTVAULTSINPUT_MEMBER_ACCOUNT_ID,
   71     71   
        &LISTVAULTSINPUT_MEMBER_MARKER,
   72     72   
        &LISTVAULTSINPUT_MEMBER_LIMIT,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/{accountId}/vaults", None));
   75     76   
impl ListVaultsInput {
   76     77   
    /// The schema for this shape.
   77     78   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTVAULTSINPUT_SCHEMA;
   78     79   
}
   79     80   
impl ::aws_smithy_schema::serde::SerializableStruct for ListVaultsInput {
   80     81   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   81     82   
    fn serialize_members(
   82     83   
        &self,
   83     84   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   84     85   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   85     86   
        if let Some(ref val) = self.account_id {
   86     87   
            ser.write_string(&LISTVAULTSINPUT_MEMBER_ACCOUNT_ID, val)?;
   87     88   
        }
   88     89   
        if let Some(ref val) = self.marker {
   89     90   
            ser.write_string(&LISTVAULTSINPUT_MEMBER_MARKER, val)?;
   90     91   
        }
   91     92   
        if let Some(ref val) = self.limit {
   92     93   
            ser.write_integer(&LISTVAULTSINPUT_MEMBER_LIMIT, *val)?;
   93     94   
        }
   94     95   
        Ok(())
   95     96   
    }
   96     97   
}
   97     98   
impl ListVaultsInput {
   98     99   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   99         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  100         -
        deserializer: &mut D,
         100  +
    pub fn deserialize(
         101  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  101    102   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  102    103   
        #[allow(unused_variables, unused_mut)]
  103    104   
        let mut builder = Self::builder();
  104    105   
        #[allow(
  105    106   
            unused_variables,
  106    107   
            unreachable_code,
  107    108   
            clippy::single_match,
  108    109   
            clippy::match_single_binding,
  109    110   
            clippy::diverging_sub_expression
  110    111   
        )]
  111         -
        deserializer.read_struct(&LISTVAULTSINPUT_SCHEMA, (), |_, member, deser| {
         112  +
        deserializer.read_struct(&LISTVAULTSINPUT_SCHEMA, &mut |member, deser| {
  112    113   
            match member.member_index() {
  113    114   
                Some(0) => {
  114    115   
                    builder.account_id = Some(deser.read_string(member)?);
  115    116   
                }
  116    117   
                Some(1) => {
  117    118   
                    builder.marker = Some(deser.read_string(member)?);
  118    119   
                }
  119    120   
                Some(2) => {
  120    121   
                    builder.limit = Some(deser.read_integer(member)?);
  121    122   
                }
  122    123   
                _ => {}
  123    124   
            }
  124    125   
            Ok(())
  125    126   
        })?;
         127  +
        builder.account_id = builder.account_id.or(Some(String::new()));
  126    128   
        builder
  127    129   
            .build()
  128    130   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  129    131   
    }
  130    132   
}
         133  +
impl ListVaultsInput {
         134  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        Self::deserialize(deserializer)
         142  +
    }
         143  +
}
  131    144   
impl crate::glacier_interceptors::GlacierAccountId for ListVaultsInput {
  132    145   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  133    146   
        &mut self.account_id
  134    147   
    }
  135    148   
}
  136    149   
impl ListVaultsInput {
  137    150   
    /// Creates a new builder-style object to manufacture [`ListVaultsInput`](crate::operation::list_vaults::ListVaultsInput).
  138    151   
    pub fn builder() -> crate::operation::list_vaults::builders::ListVaultsInputBuilder {
  139    152   
        crate::operation::list_vaults::builders::ListVaultsInputBuilder::default()
  140    153   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/list_vaults/_list_vaults_output.rs

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/purchase_provisioned_capacity.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PurchaseProvisionedCapacity`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PurchaseProvisionedCapacity;
    6      6   
impl PurchaseProvisionedCapacity {
    7      7   
    /// Creates a new `PurchaseProvisionedCapacity`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -130,136 +256,407 @@
  150    156   
        ::std::borrow::Cow::Owned(rcb)
  151    157   
    }
  152    158   
}
  153    159   
  154    160   
#[derive(Debug)]
  155    161   
struct PurchaseProvisionedCapacityResponseDeserializer;
  156    162   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PurchaseProvisionedCapacityResponseDeserializer {
  157    163   
    fn deserialize_nonstreaming(
  158    164   
        &self,
  159    165   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         166  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  160    167   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  161    168   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  162         -
        let headers = response.headers();
  163         -
        let body = response.body().bytes().expect("body loaded");
  164    169   
        #[allow(unused_mut)]
  165    170   
        let mut force_error = false;
  166    171   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  167         -
        let parse_result = if !success && status != 201 || force_error {
  168         -
            crate::protocol_serde::shape_purchase_provisioned_capacity::de_purchase_provisioned_capacity_http_error(status, headers, body)
         172  +
        if !success && status != 201 || force_error {
         173  +
            let headers = response.headers();
         174  +
            let body = response.body().bytes().expect("body loaded");
         175  +
            #[allow(unused_mut)]
         176  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         177  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         178  +
            })?;
         179  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         180  +
            let generic = generic_builder.build();
         181  +
            let error_code = match generic.code() {
         182  +
                ::std::option::Option::Some(code) => code,
         183  +
                ::std::option::Option::None => {
         184  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         185  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         186  +
                            crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::unhandled(generic),
         187  +
                        ),
         188  +
                    ))
         189  +
                }
         190  +
            };
         191  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         192  +
            let protocol = _cfg
         193  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         194  +
                .expect("a SharedClientProtocol is required");
         195  +
            let err = match error_code {
         196  +
                "InvalidParameterValueException" => {
         197  +
                    crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::InvalidParameterValueException({
         198  +
                        let mut tmp = match protocol
         199  +
                            .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         200  +
                            .and_then(|mut deser| {
         201  +
                                crate::types::error::InvalidParameterValueException::deserialize_with_response(
         202  +
                                    &mut *deser,
         203  +
                                    response.headers(),
         204  +
                                    response.status().into(),
         205  +
                                    body,
         206  +
                                )
         207  +
                            }) {
         208  +
                            ::std::result::Result::Ok(val) => val,
         209  +
                            ::std::result::Result::Err(e) => {
         210  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         211  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         212  +
                                ))
         213  +
                            }
         214  +
                        };
         215  +
                        tmp.meta = generic;
         216  +
                        if tmp.message.is_none() {
         217  +
                            tmp.message = _error_message;
         218  +
                        }
         219  +
                        tmp
         220  +
                    })
         221  +
                }
         222  +
                "LimitExceededException" => {
         223  +
                    crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::LimitExceededException({
         224  +
                        let mut tmp = match protocol
         225  +
                            .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         226  +
                            .and_then(|mut deser| {
         227  +
                                crate::types::error::LimitExceededException::deserialize_with_response(
         228  +
                                    &mut *deser,
         229  +
                                    response.headers(),
         230  +
                                    response.status().into(),
         231  +
                                    body,
         232  +
                                )
         233  +
                            }) {
         234  +
                            ::std::result::Result::Ok(val) => val,
         235  +
                            ::std::result::Result::Err(e) => {
         236  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         237  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         238  +
                                ))
         239  +
                            }
         240  +
                        };
         241  +
                        tmp.meta = generic;
         242  +
                        if tmp.message.is_none() {
         243  +
                            tmp.message = _error_message;
         244  +
                        }
         245  +
                        tmp
         246  +
                    })
         247  +
                }
         248  +
                "MissingParameterValueException" => {
         249  +
                    crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::MissingParameterValueException({
         250  +
                        let mut tmp = match protocol
         251  +
                            .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         252  +
                            .and_then(|mut deser| {
         253  +
                                crate::types::error::MissingParameterValueException::deserialize_with_response(
         254  +
                                    &mut *deser,
         255  +
                                    response.headers(),
         256  +
                                    response.status().into(),
         257  +
                                    body,
         258  +
                                )
         259  +
                            }) {
         260  +
                            ::std::result::Result::Ok(val) => val,
         261  +
                            ::std::result::Result::Err(e) => {
         262  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         263  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         264  +
                                ))
         265  +
                            }
         266  +
                        };
         267  +
                        tmp.meta = generic;
         268  +
                        if tmp.message.is_none() {
         269  +
                            tmp.message = _error_message;
         270  +
                        }
         271  +
                        tmp
         272  +
                    })
         273  +
                }
         274  +
                "ServiceUnavailableException" => {
         275  +
                    crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::ServiceUnavailableException({
         276  +
                        let mut tmp = match protocol
         277  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         278  +
                            .and_then(|mut deser| {
         279  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         280  +
                                    &mut *deser,
         281  +
                                    response.headers(),
         282  +
                                    response.status().into(),
         283  +
                                    body,
         284  +
                                )
         285  +
                            }) {
         286  +
                            ::std::result::Result::Ok(val) => val,
         287  +
                            ::std::result::Result::Err(e) => {
         288  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         289  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         290  +
                                ))
         291  +
                            }
         292  +
                        };
         293  +
                        tmp.meta = generic;
         294  +
                        if tmp.message.is_none() {
         295  +
                            tmp.message = _error_message;
         296  +
                        }
         297  +
                        tmp
         298  +
                    })
         299  +
                }
         300  +
                _ => crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityError::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  +
            ))
  169    305   
        } else {
  170         -
            crate::protocol_serde::shape_purchase_provisioned_capacity::de_purchase_provisioned_capacity_http_response(status, headers, body)
  171         -
        };
  172         -
        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
         310  +
                .deserialize_response(response, PurchaseProvisionedCapacity::OUTPUT_SCHEMA, _cfg)
         311  +
                .map_err(|e| {
         312  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         313  +
                })?;
         314  +
            let body = response.body().bytes().expect("body loaded");
         315  +
            let output = crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityOutput::deserialize_with_response(
         316  +
                &mut *deser,
         317  +
                response.headers(),
         318  +
                response.status().into(),
         319  +
                body,
         320  +
            )
         321  +
            .map_err(|e| {
         322  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         323  +
            })?;
         324  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         325  +
        }
  173    326   
    }
  174    327   
}
  175    328   
#[derive(Debug)]
  176    329   
struct PurchaseProvisionedCapacityRequestSerializer;
  177    330   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PurchaseProvisionedCapacityRequestSerializer {
  178    331   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  179    332   
    fn serialize_input(
  180    333   
        &self,
  181    334   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  182    335   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  183    336   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  184    337   
        let input = input
  185    338   
            .downcast::<crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityInput>()
  186    339   
            .expect("correct type");
  187         -
        let _header_serialization_settings = _cfg
  188         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  189         -
            .cloned()
  190         -
            .unwrap_or_default();
  191         -
        let mut request_builder = {
  192         -
            #[allow(clippy::uninlined_format_args)]
  193         -
            fn uri_base(
  194         -
                _input: &crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityInput,
  195         -
                output: &mut ::std::string::String,
  196         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  197         -
                use ::std::fmt::Write as _;
  198         -
                let input_1 = &_input.account_id;
  199         -
                let input_1 = input_1
  200         -
                    .as_ref()
  201         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  202         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  203         -
                if account_id.is_empty() {
  204         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  205         -
                        "account_id",
  206         -
                        "cannot be empty or unset",
  207         -
                    ));
         340  +
        let protocol = _cfg
         341  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         342  +
            .expect("a SharedClientProtocol is required");
         343  +
        if protocol.supports_http_bindings() {
         344  +
            let mut request = protocol
         345  +
                .serialize_body(&input, PurchaseProvisionedCapacity::INPUT_SCHEMA, "", _cfg)
         346  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         347  +
            {
         348  +
                let mut uri = "/{accountId}/provisioned-capacity".to_string();
         349  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         350  +
                if let Some(ref val) = input.account_id {
         351  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  208    352   
                }
  209         -
                ::std::write!(output, "/{accountId}/provisioned-capacity", accountId = account_id).expect("formatting should succeed");
  210         -
                ::std::result::Result::Ok(())
  211         -
            }
  212         -
            #[allow(clippy::unnecessary_wraps)]
  213         -
            fn update_http_builder(
  214         -
                input: &crate::operation::purchase_provisioned_capacity::PurchaseProvisionedCapacityInput,
  215         -
                builder: ::http_1x::request::Builder,
  216         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  217         -
                let mut uri = ::std::string::String::new();
  218         -
                uri_base(input, &mut uri)?;
  219         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         353  +
                if !query_params.is_empty() {
         354  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         355  +
                    let pairs: Vec<String> = query_params
         356  +
                        .iter()
         357  +
                        .map(|(k, v)| {
         358  +
                            format!(
         359  +
                                "{}={}",
         360  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         361  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         362  +
                            )
         363  +
                        })
         364  +
                        .collect();
         365  +
                    uri.push_str(&pairs.join("&"));
         366  +
                }
         367  +
                request.set_uri(uri.as_str()).expect("valid URI");
  220    368   
            }
  221         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  222         -
            builder
  223         -
        };
  224         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  225    369   
  226         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         370  +
            return ::std::result::Result::Ok(request);
         371  +
        } else {
         372  +
            let mut request = protocol
         373  +
                .serialize_request(&input, PurchaseProvisionedCapacity::INPUT_SCHEMA, "", _cfg)
         374  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         375  +
         376  +
            return ::std::result::Result::Ok(request);
         377  +
        }
  227    378   
    }
  228    379   
}
  229    380   
#[derive(Debug)]
  230    381   
struct PurchaseProvisionedCapacityEndpointParamsInterceptor;
  231    382   
  232    383   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PurchaseProvisionedCapacityEndpointParamsInterceptor {
  233    384   
    fn name(&self) -> &'static str {
  234    385   
        "PurchaseProvisionedCapacityEndpointParamsInterceptor"
  235    386   
    }
  236    387