AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

@@ -10,10 +178,186 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "AddTagsToVaultInput",
   32     32   
);
   33     33   
static ADDTAGSTOVAULTINPUT_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#AddTagsToVaultInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "AddTagsToVaultInput",
   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 ADDTAGSTOVAULTINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   45     45   
    ::aws_smithy_schema::ShapeId::from_static(
   46     46   
        "com.amazonaws.glacier.synthetic#AddTagsToVaultInput$vaultName",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "AddTagsToVaultInput",
   49     49   
    ),
   50     50   
    ::aws_smithy_schema::ShapeType::String,
   51         -
    "vault_name",
          51  +
    "vaultName",
   52     52   
    1,
   53     53   
)
   54     54   
.with_http_label();
   55     55   
static ADDTAGSTOVAULTINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.glacier.synthetic#AddTagsToVaultInput$Tags",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "AddTagsToVaultInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Map,
   62         -
    "tags",
          62  +
    "Tags",
   63     63   
    2,
   64     64   
);
   65     65   
static ADDTAGSTOVAULTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   66     66   
    ADDTAGSTOVAULTINPUT_SCHEMA_ID,
   67     67   
    ::aws_smithy_schema::ShapeType::Structure,
   68     68   
    &[
   69     69   
        &ADDTAGSTOVAULTINPUT_MEMBER_ACCOUNT_ID,
   70     70   
        &ADDTAGSTOVAULTINPUT_MEMBER_VAULT_NAME,
   71     71   
        &ADDTAGSTOVAULTINPUT_MEMBER_TAGS,
   72     72   
    ],
   73         -
);
          73  +
)
          74  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          75  +
    "POST",
          76  +
    "/{accountId}/vaults/{vaultName}/tags?operation=add",
          77  +
    Some(204),
          78  +
));
   74     79   
impl AddTagsToVaultInput {
   75     80   
    /// The schema for this shape.
   76     81   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ADDTAGSTOVAULTINPUT_SCHEMA;
   77     82   
}
   78     83   
impl ::aws_smithy_schema::serde::SerializableStruct for AddTagsToVaultInput {
   79     84   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   80     85   
    fn serialize_members(
   81     86   
        &self,
   82     87   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   83     88   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   84     89   
        if let Some(ref val) = self.account_id {
   85     90   
            ser.write_string(&ADDTAGSTOVAULTINPUT_MEMBER_ACCOUNT_ID, val)?;
   86     91   
        }
   87     92   
        if let Some(ref val) = self.vault_name {
   88     93   
            ser.write_string(&ADDTAGSTOVAULTINPUT_MEMBER_VAULT_NAME, val)?;
   89     94   
        }
   90     95   
        if let Some(ref val) = self.tags {
   91     96   
            ser.write_map(
   92     97   
                &ADDTAGSTOVAULTINPUT_MEMBER_TAGS,
   93     98   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   94     99   
                    for (key, value) in val {
   95    100   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   96    101   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   97    102   
                    }
   98    103   
                    Ok(())
   99    104   
                },
  100    105   
            )?;
  101    106   
        }
  102    107   
        Ok(())
  103    108   
    }
  104    109   
}
  105    110   
impl AddTagsToVaultInput {
  106    111   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  107         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  108         -
        deserializer: &mut D,
         112  +
    pub fn deserialize(
         113  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  109    114   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  110    115   
        #[allow(unused_variables, unused_mut)]
  111    116   
        let mut builder = Self::builder();
  112    117   
        #[allow(
  113    118   
            unused_variables,
  114    119   
            unreachable_code,
  115    120   
            clippy::single_match,
  116    121   
            clippy::match_single_binding,
  117    122   
            clippy::diverging_sub_expression
  118    123   
        )]
  119         -
        deserializer.read_struct(&ADDTAGSTOVAULTINPUT_SCHEMA, (), |_, member, deser| {
         124  +
        deserializer.read_struct(&ADDTAGSTOVAULTINPUT_SCHEMA, &mut |member, deser| {
  120    125   
            match member.member_index() {
  121    126   
                Some(0) => {
  122    127   
                    builder.account_id = Some(deser.read_string(member)?);
  123    128   
                }
  124    129   
                Some(1) => {
  125    130   
                    builder.vault_name = Some(deser.read_string(member)?);
  126    131   
                }
  127    132   
                Some(2) => {
  128         -
                    builder.tags = Some({
  129         -
                        let container = if let Some(cap) = deser.container_size() {
  130         -
                            std::collections::HashMap::with_capacity(cap)
  131         -
                        } else {
  132         -
                            std::collections::HashMap::new()
  133         -
                        };
  134         -
                        deser.read_map(member, container, |mut map, key, deser| {
  135         -
                            map.insert(key, deser.read_string(member)?);
  136         -
                            Ok(map)
  137         -
                        })?
  138         -
                    });
         133  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  139    134   
                }
  140    135   
                _ => {}
  141    136   
            }
  142    137   
            Ok(())
  143    138   
        })?;
         139  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         140  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
  144    141   
        builder
  145    142   
            .build()
  146    143   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  147    144   
    }
  148    145   
}
         146  +
impl AddTagsToVaultInput {
         147  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         148  +
    pub fn deserialize_with_response(
         149  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         150  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         151  +
        _status: u16,
         152  +
        _body: &[u8],
         153  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         154  +
        Self::deserialize(deserializer)
         155  +
    }
         156  +
}
  149    157   
impl crate::glacier_interceptors::GlacierAccountId for AddTagsToVaultInput {
  150    158   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  151    159   
        &mut self.account_id
  152    160   
    }
  153    161   
}
  154    162   
impl AddTagsToVaultInput {
  155    163   
    /// Creates a new builder-style object to manufacture [`AddTagsToVaultInput`](crate::operation::add_tags_to_vault::AddTagsToVaultInput).
  156    164   
    pub fn builder() -> crate::operation::add_tags_to_vault::builders::AddTagsToVaultInputBuilder {
  157    165   
        crate::operation::add_tags_to_vault::builders::AddTagsToVaultInputBuilder::default()
  158    166   
    }

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

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

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

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

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

@@ -22,22 +203,258 @@
   42     42   
    "com.amazonaws.glacier.synthetic",
   43     43   
    "CompleteMultipartUploadInput",
   44     44   
);
   45     45   
static COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadInput$accountId",
   48     48   
        "com.amazonaws.glacier.synthetic",
   49     49   
        "CompleteMultipartUploadInput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "account_id",
          52  +
    "accountId",
   53     53   
    0,
   54     54   
)
   55     55   
.with_http_label();
   56     56   
static COMPLETEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadInput$vaultName",
   59     59   
        "com.amazonaws.glacier.synthetic",
   60     60   
        "CompleteMultipartUploadInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "vault_name",
          63  +
    "vaultName",
   64     64   
    1,
   65     65   
)
   66     66   
.with_http_label();
   67     67   
static COMPLETEMULTIPARTUPLOADINPUT_MEMBER_UPLOAD_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   68     68   
    ::aws_smithy_schema::ShapeId::from_static(
   69     69   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadInput$uploadId",
   70     70   
        "com.amazonaws.glacier.synthetic",
   71     71   
        "CompleteMultipartUploadInput",
   72     72   
    ),
   73     73   
    ::aws_smithy_schema::ShapeType::String,
   74         -
    "upload_id",
          74  +
    "uploadId",
   75     75   
    2,
   76     76   
)
   77     77   
.with_http_label();
   78     78   
static COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadInput$archiveSize",
   81     81   
        "com.amazonaws.glacier.synthetic",
   82     82   
        "CompleteMultipartUploadInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "archive_size",
          85  +
    "archiveSize",
   86     86   
    3,
   87     87   
)
   88     88   
.with_http_header("x-amz-archive-size");
   89     89   
static COMPLETEMULTIPARTUPLOADINPUT_MEMBER_CHECKSUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     90   
    ::aws_smithy_schema::ShapeId::from_static(
   91     91   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadInput$checksum",
   92     92   
        "com.amazonaws.glacier.synthetic",
   93     93   
        "CompleteMultipartUploadInput",
   94     94   
    ),
   95     95   
    ::aws_smithy_schema::ShapeType::String,
   96     96   
    "checksum",
   97     97   
    4,
   98     98   
)
   99     99   
.with_http_header("x-amz-sha256-tree-hash");
  100    100   
static COMPLETEMULTIPARTUPLOADINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  101    101   
    COMPLETEMULTIPARTUPLOADINPUT_SCHEMA_ID,
  102    102   
    ::aws_smithy_schema::ShapeType::Structure,
  103    103   
    &[
  104    104   
        &COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID,
  105    105   
        &COMPLETEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME,
  106    106   
        &COMPLETEMULTIPARTUPLOADINPUT_MEMBER_UPLOAD_ID,
  107    107   
        &COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_SIZE,
  108    108   
        &COMPLETEMULTIPARTUPLOADINPUT_MEMBER_CHECKSUM,
  109    109   
    ],
  110         -
);
         110  +
)
         111  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         112  +
    "POST",
         113  +
    "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
         114  +
    Some(201),
         115  +
));
  111    116   
impl CompleteMultipartUploadInput {
  112    117   
    /// The schema for this shape.
  113    118   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COMPLETEMULTIPARTUPLOADINPUT_SCHEMA;
  114    119   
}
  115    120   
impl ::aws_smithy_schema::serde::SerializableStruct for CompleteMultipartUploadInput {
  116    121   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  117    122   
    fn serialize_members(
  118    123   
        &self,
  119    124   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  120    125   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  121    126   
        if let Some(ref val) = self.account_id {
  122    127   
            ser.write_string(&COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ACCOUNT_ID, val)?;
  123    128   
        }
  124    129   
        if let Some(ref val) = self.vault_name {
  125    130   
            ser.write_string(&COMPLETEMULTIPARTUPLOADINPUT_MEMBER_VAULT_NAME, val)?;
  126    131   
        }
  127    132   
        if let Some(ref val) = self.upload_id {
  128    133   
            ser.write_string(&COMPLETEMULTIPARTUPLOADINPUT_MEMBER_UPLOAD_ID, val)?;
  129    134   
        }
  130    135   
        if let Some(ref val) = self.archive_size {
  131    136   
            ser.write_string(&COMPLETEMULTIPARTUPLOADINPUT_MEMBER_ARCHIVE_SIZE, val)?;
  132    137   
        }
  133    138   
        if let Some(ref val) = self.checksum {
  134    139   
            ser.write_string(&COMPLETEMULTIPARTUPLOADINPUT_MEMBER_CHECKSUM, val)?;
  135    140   
        }
  136    141   
        Ok(())
  137    142   
    }
  138    143   
}
  139    144   
impl CompleteMultipartUploadInput {
  140    145   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  141         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  142         -
        deserializer: &mut D,
         146  +
    pub fn deserialize(
         147  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  143    148   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  144    149   
        #[allow(unused_variables, unused_mut)]
  145    150   
        let mut builder = Self::builder();
  146    151   
        #[allow(
  147    152   
            unused_variables,
  148    153   
            unreachable_code,
  149    154   
            clippy::single_match,
  150    155   
            clippy::match_single_binding,
  151    156   
            clippy::diverging_sub_expression
  152    157   
        )]
  153         -
        deserializer.read_struct(&COMPLETEMULTIPARTUPLOADINPUT_SCHEMA, (), |_, member, deser| {
         158  +
        deserializer.read_struct(&COMPLETEMULTIPARTUPLOADINPUT_SCHEMA, &mut |member, deser| {
  154    159   
            match member.member_index() {
  155    160   
                Some(0) => {
  156    161   
                    builder.account_id = Some(deser.read_string(member)?);
  157    162   
                }
  158    163   
                Some(1) => {
  159    164   
                    builder.vault_name = Some(deser.read_string(member)?);
  160    165   
                }
  161    166   
                Some(2) => {
  162    167   
                    builder.upload_id = Some(deser.read_string(member)?);
  163    168   
                }
  164    169   
                Some(3) => {
  165    170   
                    builder.archive_size = Some(deser.read_string(member)?);
  166    171   
                }
  167    172   
                Some(4) => {
  168    173   
                    builder.checksum = Some(deser.read_string(member)?);
  169    174   
                }
  170    175   
                _ => {}
  171    176   
            }
  172    177   
            Ok(())
  173    178   
        })?;
         179  +
        builder.account_id = builder.account_id.or(Some(String::new()));
         180  +
        builder.vault_name = builder.vault_name.or(Some(String::new()));
         181  +
        builder.upload_id = builder.upload_id.or(Some(String::new()));
         182  +
        builder
         183  +
            .build()
         184  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         185  +
    }
         186  +
}
         187  +
impl CompleteMultipartUploadInput {
         188  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         189  +
    /// Header-bound members are read directly from headers, avoiding runtime
         190  +
    /// member iteration overhead. Body members are read via the deserializer.
         191  +
    pub fn deserialize_with_response(
         192  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         193  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         194  +
        _status: u16,
         195  +
        _body: &[u8],
         196  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         197  +
        #[allow(unused_variables, unused_mut)]
         198  +
        let mut builder = Self::builder();
         199  +
        if let Some(val) = headers.get("x-amz-archive-size") {
         200  +
            builder.archive_size = Some(val.to_string());
         201  +
        }
         202  +
        if let Some(val) = headers.get("x-amz-sha256-tree-hash") {
         203  +
            builder.checksum = Some(val.to_string());
         204  +
        }
         205  +
        #[allow(
         206  +
            unused_variables,
         207  +
            unreachable_code,
         208  +
            clippy::single_match,
         209  +
            clippy::match_single_binding,
         210  +
            clippy::diverging_sub_expression
         211  +
        )]
         212  +
        deserializer.read_struct(&COMPLETEMULTIPARTUPLOADINPUT_SCHEMA, &mut |member, deser| {
         213  +
            match member.member_index() {
         214  +
                Some(0) => {
         215  +
                    builder.account_id = Some(deser.read_string(member)?);
         216  +
                }
         217  +
                Some(1) => {
         218  +
                    builder.vault_name = Some(deser.read_string(member)?);
         219  +
                }
         220  +
                Some(2) => {
         221  +
                    builder.upload_id = Some(deser.read_string(member)?);
         222  +
                }
         223  +
                Some(3) => { /* read from headers above */ }
         224  +
                Some(4) => { /* read from headers above */ }
         225  +
                _ => {}
         226  +
            }
         227  +
            Ok(())
         228  +
        })?;
  174    229   
        builder
  175    230   
            .build()
  176    231   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  177    232   
    }
  178    233   
}
  179    234   
impl crate::glacier_interceptors::GlacierAccountId for CompleteMultipartUploadInput {
  180    235   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  181    236   
        &mut self.account_id
  182    237   
    }
  183    238   
}

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

@@ -34,34 +160,198 @@
   54     54   
    1,
   55     55   
)
   56     56   
.with_http_header("x-amz-sha256-tree-hash");
   57     57   
static COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_ARCHIVE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   58     58   
    ::aws_smithy_schema::ShapeId::from_static(
   59     59   
        "com.amazonaws.glacier.synthetic#CompleteMultipartUploadOutput$archiveId",
   60     60   
        "com.amazonaws.glacier.synthetic",
   61     61   
        "CompleteMultipartUploadOutput",
   62     62   
    ),
   63     63   
    ::aws_smithy_schema::ShapeType::String,
   64         -
    "archive_id",
          64  +
    "archiveId",
   65     65   
    2,
   66     66   
)
   67     67   
.with_http_header("x-amz-archive-id");
          68  +
static COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          70  +
    ::aws_smithy_schema::ShapeType::String,
          71  +
    "request_id",
          72  +
    3,
          73  +
)
          74  +
.with_http_header("x-amzn-requestid");
   68     75   
static COMPLETEMULTIPARTUPLOADOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   69     76   
    COMPLETEMULTIPARTUPLOADOUTPUT_SCHEMA_ID,
   70     77   
    ::aws_smithy_schema::ShapeType::Structure,
   71     78   
    &[
   72     79   
        &COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_LOCATION,
   73     80   
        &COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_CHECKSUM,
   74     81   
        &COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_ARCHIVE_ID,
          82  +
        &COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER__REQUEST_ID,
   75     83   
    ],
   76     84   
);
   77     85   
impl CompleteMultipartUploadOutput {
   78     86   
    /// The schema for this shape.
   79     87   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COMPLETEMULTIPARTUPLOADOUTPUT_SCHEMA;
   80     88   
}
   81     89   
impl ::aws_smithy_schema::serde::SerializableStruct for CompleteMultipartUploadOutput {
   82     90   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   83     91   
    fn serialize_members(
   84     92   
        &self,
   85     93   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   86     94   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   87     95   
        if let Some(ref val) = self.location {
   88     96   
            ser.write_string(&COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_LOCATION, val)?;
   89     97   
        }
   90     98   
        if let Some(ref val) = self.checksum {
   91     99   
            ser.write_string(&COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_CHECKSUM, val)?;
   92    100   
        }
   93    101   
        if let Some(ref val) = self.archive_id {
   94    102   
            ser.write_string(&COMPLETEMULTIPARTUPLOADOUTPUT_MEMBER_ARCHIVE_ID, val)?;
   95    103   
        }
   96    104   
        Ok(())
   97    105   
    }
   98    106   
}
   99    107   
impl CompleteMultipartUploadOutput {
  100    108   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  101         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  102         -
        deserializer: &mut D,
         109  +
    pub fn deserialize(
         110  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  103    111   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  104    112   
        #[allow(unused_variables, unused_mut)]
  105    113   
        let mut builder = Self::builder();
  106    114   
        #[allow(
  107    115   
            unused_variables,
  108    116   
            unreachable_code,
  109    117   
            clippy::single_match,
  110    118   
            clippy::match_single_binding,
  111    119   
            clippy::diverging_sub_expression
  112    120   
        )]
  113         -
        deserializer.read_struct(&COMPLETEMULTIPARTUPLOADOUTPUT_SCHEMA, (), |_, member, deser| {
         121  +
        deserializer.read_struct(&COMPLETEMULTIPARTUPLOADOUTPUT_SCHEMA, &mut |member, deser| {
  114    122   
            match member.member_index() {
  115    123   
                Some(0) => {
  116    124   
                    builder.location = Some(deser.read_string(member)?);
  117    125   
                }
  118    126   
                Some(1) => {
  119    127   
                    builder.checksum = Some(deser.read_string(member)?);
  120    128   
                }
  121    129   
                Some(2) => {
  122    130   
                    builder.archive_id = Some(deser.read_string(member)?);
  123    131   
                }
         132  +
                Some(3) => {
         133  +
                    builder._request_id = Some(deser.read_string(member)?);
         134  +
                }
  124    135   
                _ => {}
  125    136   
            }
  126    137   
            Ok(())
  127    138   
        })?;
  128    139   
        Ok(builder.build())
  129    140   
    }
  130    141   
}
         142  +
impl CompleteMultipartUploadOutput {
         143  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         144  +
    /// Header-bound members are read directly from headers, avoiding runtime
         145  +
    /// member iteration overhead. Body members are read via the deserializer.
         146  +
    pub fn deserialize_with_response(
         147  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         148  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         149  +
        _status: u16,
         150  +
        _body: &[u8],
         151  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         152  +
        #[allow(unused_variables, unused_mut)]
         153  +
        let mut builder = Self::builder();
         154  +
        if let Some(val) = headers.get("Location") {
         155  +
            builder.location = Some(val.to_string());
         156  +
        }
         157  +
        if let Some(val) = headers.get("x-amz-sha256-tree-hash") {
         158  +
            builder.checksum = Some(val.to_string());
         159  +
        }
         160  +
        if let Some(val) = headers.get("x-amz-archive-id") {
         161  +
            builder.archive_id = Some(val.to_string());
         162  +
        }
         163  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         164  +
            builder._request_id = Some(val.to_string());
         165  +
        }
         166  +
        Ok(builder.build())
         167  +
    }
         168  +
}
  131    169   
impl ::aws_types::request_id::RequestId for CompleteMultipartUploadOutput {
  132    170   
    fn request_id(&self) -> Option<&str> {
  133    171   
        self._request_id.as_deref()
  134    172   
    }
  135    173   
}
  136    174   
impl CompleteMultipartUploadOutput {
  137    175   
    /// Creates a new builder-style object to manufacture [`CompleteMultipartUploadOutput`](crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput).
  138    176   
    pub fn builder() -> crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadOutputBuilder {
  139    177   
        crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadOutputBuilder::default()
  140    178   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/complete_vault_lock.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 `CompleteVaultLock`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CompleteVaultLock;
    6      6   
impl CompleteVaultLock {
    7      7   
    /// Creates a new `CompleteVaultLock`
    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::complete_vault_lock::CompleteVaultLockInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::complete_vault_lock::CompleteVaultLockOutput::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::complete_vault_lock::CompleteVaultLockInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::complete_vault_lock::CompleteVaultLockOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::complete_vault_lock::CompleteVaultLockError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +279,397 @@
  144    148   
        ::std::borrow::Cow::Owned(rcb)
  145    149   
    }
  146    150   
}
  147    151   
  148    152   
#[derive(Debug)]
  149    153   
struct CompleteVaultLockResponseDeserializer;
  150    154   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CompleteVaultLockResponseDeserializer {
  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 != 204 || force_error {
  162         -
            crate::protocol_serde::shape_complete_vault_lock::de_complete_vault_lock_http_error(status, headers, body)
         164  +
        if !success && status != 204 || 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(
         178  +
                            crate::operation::complete_vault_lock::CompleteVaultLockError::unhandled(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::complete_vault_lock::CompleteVaultLockError::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::complete_vault_lock::CompleteVaultLockError::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::complete_vault_lock::CompleteVaultLockError::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::complete_vault_lock::CompleteVaultLockError::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::complete_vault_lock::CompleteVaultLockError::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_complete_vault_lock::de_complete_vault_lock_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, CompleteVaultLock::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::complete_vault_lock::CompleteVaultLockOutput::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 CompleteVaultLockRequestSerializer;
  171    314   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CompleteVaultLockRequestSerializer {
  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::complete_vault_lock::CompleteVaultLockInput>()
  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::complete_vault_lock::CompleteVaultLockInput,
  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, CompleteVaultLock::INPUT_SCHEMA, "", _cfg)
         330  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         331  +
            {
         332  +
                let mut uri = "/{accountId}/vaults/{vaultName}/lock-policy/{lockId}".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         -
                let input_3 = &_input.lock_id;
  215         -
                let input_3 = input_3
  216         -
                    .as_ref()
  217         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("lock_id", "cannot be empty or unset"))?;
  218         -
                let lock_id = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
  219         -
                if lock_id.is_empty() {
  220         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  221         -
                        "lock_id",
  222         -
                        "cannot be empty or unset",
  223         -
                    ));
         340  +
                if let Some(ref val) = input.lock_id {
         341  +
                    uri = uri.replace("{lockId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  224    342   
                }
  225         -
                ::std::write!(
  226         -
                    output,
  227         -
                    "/{accountId}/vaults/{vaultName}/lock-policy/{lockId}",
  228         -
                    accountId = account_id,
  229         -
                    vaultName = vault_name,
  230         -
                    lockId = lock_id
  231         -
                )
  232         -
                .expect("formatting should succeed");
  233         -
                ::std::result::Result::Ok(())
  234         -
            }
  235         -
            #[allow(clippy::unnecessary_wraps)]
  236         -
            fn update_http_builder(
  237         -
                input: &crate::operation::complete_vault_lock::CompleteVaultLockInput,
  238         -
                builder: ::http_1x::request::Builder,
  239         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  240         -
                let mut uri = ::std::string::String::new();
  241         -
                uri_base(input, &mut uri)?;
  242         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         343  +
                if !query_params.is_empty() {
         344  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         345  +
                    let pairs: Vec<String> = query_params
         346  +
                        .iter()
         347  +
                        .map(|(k, v)| {
         348  +
                            format!(
         349  +
                                "{}={}",
         350  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         351  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         352  +
                            )
         353  +
                        })
         354  +
                        .collect();
         355  +
                    uri.push_str(&pairs.join("&"));
         356  +
                }
         357  +
                request.set_uri(uri.as_str()).expect("valid URI");
  243    358   
            }
  244         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  245         -
            builder
  246         -
        };
  247         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  248    359   
  249         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         360  +
            return ::std::result::Result::Ok(request);
         361  +
        } else {
         362  +
            let mut request = protocol
         363  +
                .serialize_request(&input, CompleteVaultLock::INPUT_SCHEMA, "", _cfg)
         364  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         365  +
         366  +
            return ::std::result::Result::Ok(request);
         367  +
        }
  250    368   
    }
  251    369   
}
  252    370   
#[derive(Debug)]
  253    371   
struct CompleteVaultLockEndpointParamsInterceptor;
  254    372   
  255    373   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CompleteVaultLockEndpointParamsInterceptor {
  256    374   
    fn name(&self) -> &'static str {
  257    375   
        "CompleteVaultLockEndpointParamsInterceptor"
  258    376   
    }
  259    377   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/create_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 `CreateVault`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateVault;
    6      6   
impl CreateVault {
    7      7   
    /// Creates a new `CreateVault`
    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::create_vault::CreateVaultInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_vault::CreateVaultOutput::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::create_vault::CreateVaultInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_vault::CreateVaultOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_vault::CreateVaultError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +259,387 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateVaultResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateVaultResponseDeserializer {
  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 != 201 || force_error {
  159         -
            crate::protocol_serde::shape_create_vault::de_create_vault_http_error(status, headers, body)
         161  +
        if !success && status != 201 || 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::create_vault::CreateVaultError::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::create_vault::CreateVaultError::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  +
                "LimitExceededException" => crate::operation::create_vault::CreateVaultError::LimitExceededException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::LimitExceededException::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  +
                "MissingParameterValueException" => crate::operation::create_vault::CreateVaultError::MissingParameterValueException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::MissingParameterValueException::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::create_vault::CreateVaultError::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::create_vault::CreateVaultError::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_create_vault::de_create_vault_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, CreateVault::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::create_vault::CreateVaultOutput::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 CreateVaultRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateVaultRequestSerializer {
  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
  176    315   
            .downcast::<crate::operation::create_vault::CreateVaultInput>()
  177    316   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::create_vault::CreateVaultInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                let input_1 = &_input.account_id;
  190         -
                let input_1 = input_1
  191         -
                    .as_ref()
  192         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("account_id", "cannot be empty or unset"))?;
  193         -
                let account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  194         -
                if account_id.is_empty() {
  195         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  196         -
                        "account_id",
  197         -
                        "cannot be empty or unset",
  198         -
                    ));
         317  +
        let protocol = _cfg
         318  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         319  +
            .expect("a SharedClientProtocol is required");
         320  +
        if protocol.supports_http_bindings() {
         321  +
            let mut request = protocol
         322  +
                .serialize_body(&input, CreateVault::INPUT_SCHEMA, "", _cfg)
         323  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         324  +
            {
         325  +
                let mut uri = "/{accountId}/vaults/{vaultName}".to_string();
         326  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         327  +
                if let Some(ref val) = input.account_id {
         328  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  199    329   
                }
  200         -
                let input_2 = &_input.vault_name;
  201         -
                let input_2 = input_2
  202         -
                    .as_ref()
  203         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("vault_name", "cannot be empty or unset"))?;
  204         -
                let vault_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  205         -
                if vault_name.is_empty() {
  206         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  207         -
                        "vault_name",
  208         -
                        "cannot be empty or unset",
  209         -
                    ));
         330  +
                if let Some(ref val) = input.vault_name {
         331  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  210    332   
                }
  211         -
                ::std::write!(output, "/{accountId}/vaults/{vaultName}", accountId = account_id, vaultName = vault_name)
  212         -
                    .expect("formatting should succeed");
  213         -
                ::std::result::Result::Ok(())
  214         -
            }
  215         -
            #[allow(clippy::unnecessary_wraps)]
  216         -
            fn update_http_builder(
  217         -
                input: &crate::operation::create_vault::CreateVaultInput,
  218         -
                builder: ::http_1x::request::Builder,
  219         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  220         -
                let mut uri = ::std::string::String::new();
  221         -
                uri_base(input, &mut uri)?;
  222         -
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
         333  +
                if !query_params.is_empty() {
         334  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         335  +
                    let pairs: Vec<String> = query_params
         336  +
                        .iter()
         337  +
                        .map(|(k, v)| {
         338  +
                            format!(
         339  +
                                "{}={}",
         340  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         341  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         342  +
                            )
         343  +
                        })
         344  +
                        .collect();
         345  +
                    uri.push_str(&pairs.join("&"));
         346  +
                }
         347  +
                request.set_uri(uri.as_str()).expect("valid URI");
  223    348   
            }
  224         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  225         -
            builder
  226         -
        };
  227         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  228    349   
  229         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         350  +
            return ::std::result::Result::Ok(request);
         351  +
        } else {
         352  +
            let mut request = protocol
         353  +
                .serialize_request(&input, CreateVault::INPUT_SCHEMA, "", _cfg)
         354  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         355  +
         356  +
            return ::std::result::Result::Ok(request);
         357  +
        }
  230    358   
    }
  231    359   
}
  232    360   
#[derive(Debug)]
  233    361   
struct CreateVaultEndpointParamsInterceptor;
  234    362   
  235    363   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateVaultEndpointParamsInterceptor {
  236    364   
    fn name(&self) -> &'static str {
  237    365   
        "CreateVaultEndpointParamsInterceptor"
  238    366   
    }
  239    367