AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

@@ -3,3 +109,140 @@
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.glacier.synthetic#CreateVaultOutput$location",
   25     25   
        "com.amazonaws.glacier.synthetic",
   26     26   
        "CreateVaultOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::String,
   29     29   
    "location",
   30     30   
    0,
   31     31   
)
   32     32   
.with_http_header("Location");
          33  +
static CREATEVAULTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          35  +
    ::aws_smithy_schema::ShapeType::String,
          36  +
    "request_id",
          37  +
    1,
          38  +
)
          39  +
.with_http_header("x-amzn-requestid");
   33     40   
static CREATEVAULTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   34     41   
    CREATEVAULTOUTPUT_SCHEMA_ID,
   35     42   
    ::aws_smithy_schema::ShapeType::Structure,
   36         -
    &[&CREATEVAULTOUTPUT_MEMBER_LOCATION],
          43  +
    &[&CREATEVAULTOUTPUT_MEMBER_LOCATION, &CREATEVAULTOUTPUT_MEMBER__REQUEST_ID],
   37     44   
);
   38     45   
impl CreateVaultOutput {
   39     46   
    /// The schema for this shape.
   40     47   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEVAULTOUTPUT_SCHEMA;
   41     48   
}
   42     49   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateVaultOutput {
   43     50   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   44     51   
    fn serialize_members(
   45     52   
        &self,
   46     53   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   47     54   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   48     55   
        if let Some(ref val) = self.location {
   49     56   
            ser.write_string(&CREATEVAULTOUTPUT_MEMBER_LOCATION, val)?;
   50     57   
        }
   51     58   
        Ok(())
   52     59   
    }
   53     60   
}
   54     61   
impl CreateVaultOutput {
   55     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   56         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   57         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   58     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   59     66   
        #[allow(unused_variables, unused_mut)]
   60     67   
        let mut builder = Self::builder();
   61     68   
        #[allow(
   62     69   
            unused_variables,
   63     70   
            unreachable_code,
   64     71   
            clippy::single_match,
   65     72   
            clippy::match_single_binding,
   66     73   
            clippy::diverging_sub_expression
   67     74   
        )]
   68         -
        deserializer.read_struct(&CREATEVAULTOUTPUT_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&CREATEVAULTOUTPUT_SCHEMA, &mut |member, deser| {
   69     76   
            match member.member_index() {
   70     77   
                Some(0) => {
   71     78   
                    builder.location = Some(deser.read_string(member)?);
   72     79   
                }
          80  +
                Some(1) => {
          81  +
                    builder._request_id = Some(deser.read_string(member)?);
          82  +
                }
   73     83   
                _ => {}
   74     84   
            }
   75     85   
            Ok(())
   76     86   
        })?;
   77     87   
        Ok(builder.build())
   78     88   
    }
   79     89   
}
          90  +
impl CreateVaultOutput {
          91  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          92  +
    /// Header-bound members are read directly from headers, avoiding runtime
          93  +
    /// member iteration overhead. Body members are read via the deserializer.
          94  +
    pub fn deserialize_with_response(
          95  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          96  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          97  +
        _status: u16,
          98  +
        _body: &[u8],
          99  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         100  +
        #[allow(unused_variables, unused_mut)]
         101  +
        let mut builder = Self::builder();
         102  +
        if let Some(val) = headers.get("Location") {
         103  +
            builder.location = Some(val.to_string());
         104  +
        }
         105  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         106  +
            builder._request_id = Some(val.to_string());
         107  +
        }
         108  +
        Ok(builder.build())
         109  +
    }
         110  +
}
   80    111   
impl ::aws_types::request_id::RequestId for CreateVaultOutput {
   81    112   
    fn request_id(&self) -> Option<&str> {
   82    113   
        self._request_id.as_deref()
   83    114   
    }
   84    115   
}
   85    116   
impl CreateVaultOutput {
   86    117   
    /// Creates a new builder-style object to manufacture [`CreateVaultOutput`](crate::operation::create_vault::CreateVaultOutput).
   87    118   
    pub fn builder() -> crate::operation::create_vault::builders::CreateVaultOutputBuilder {
   88    119   
        crate::operation::create_vault::builders::CreateVaultOutputBuilder::default()
   89    120   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_archive.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 `DeleteArchive`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteArchive;
    6      6   
impl DeleteArchive {
    7      7   
    /// Creates a new `DeleteArchive`
    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::delete_archive::DeleteArchiveInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_archive::DeleteArchiveOutput::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::delete_archive::DeleteArchiveInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_archive::DeleteArchiveOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_archive::DeleteArchiveError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +276,390 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct DeleteArchiveResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteArchiveResponseDeserializer {
  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 != 204 || force_error {
  159         -
            crate::protocol_serde::shape_delete_archive::de_delete_archive_http_error(status, headers, body)
         161  +
        if !success && status != 204 || 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::delete_archive::DeleteArchiveError::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::delete_archive::DeleteArchiveError::InvalidParameterValueException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "MissingParameterValueException" => crate::operation::delete_archive::DeleteArchiveError::MissingParameterValueException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ResourceNotFoundException" => crate::operation::delete_archive::DeleteArchiveError::ResourceNotFoundException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ServiceUnavailableException" => crate::operation::delete_archive::DeleteArchiveError::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::delete_archive::DeleteArchiveError::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_delete_archive::de_delete_archive_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, DeleteArchive::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::delete_archive::DeleteArchiveOutput::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 DeleteArchiveRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteArchiveRequestSerializer {
  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::delete_archive::DeleteArchiveInput>()
  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::delete_archive::DeleteArchiveInput,
  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, DeleteArchive::INPUT_SCHEMA, "", _cfg)
         323  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         324  +
            {
         325  +
                let mut uri = "/{accountId}/vaults/{vaultName}/archives/{archiveId}".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         -
                let input_3 = &_input.archive_id;
  212         -
                let input_3 = input_3
  213         -
                    .as_ref()
  214         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("archive_id", "cannot be empty or unset"))?;
  215         -
                let archive_id = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
  216         -
                if archive_id.is_empty() {
  217         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  218         -
                        "archive_id",
  219         -
                        "cannot be empty or unset",
  220         -
                    ));
         333  +
                if let Some(ref val) = input.archive_id {
         334  +
                    uri = uri.replace("{archiveId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  221    335   
                }
  222         -
                ::std::write!(
  223         -
                    output,
  224         -
                    "/{accountId}/vaults/{vaultName}/archives/{archiveId}",
  225         -
                    accountId = account_id,
  226         -
                    vaultName = vault_name,
  227         -
                    archiveId = archive_id
  228         -
                )
  229         -
                .expect("formatting should succeed");
  230         -
                ::std::result::Result::Ok(())
  231         -
            }
  232         -
            #[allow(clippy::unnecessary_wraps)]
  233         -
            fn update_http_builder(
  234         -
                input: &crate::operation::delete_archive::DeleteArchiveInput,
  235         -
                builder: ::http_1x::request::Builder,
  236         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  237         -
                let mut uri = ::std::string::String::new();
  238         -
                uri_base(input, &mut uri)?;
  239         -
                ::std::result::Result::Ok(builder.method("DELETE").uri(uri))
         336  +
                if !query_params.is_empty() {
         337  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         338  +
                    let pairs: Vec<String> = query_params
         339  +
                        .iter()
         340  +
                        .map(|(k, v)| {
         341  +
                            format!(
         342  +
                                "{}={}",
         343  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         344  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         345  +
                            )
         346  +
                        })
         347  +
                        .collect();
         348  +
                    uri.push_str(&pairs.join("&"));
         349  +
                }
         350  +
                request.set_uri(uri.as_str()).expect("valid URI");
  240    351   
            }
  241         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  242         -
            builder
  243         -
        };
  244         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  245    352   
  246         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         353  +
            return ::std::result::Result::Ok(request);
         354  +
        } else {
         355  +
            let mut request = protocol
         356  +
                .serialize_request(&input, DeleteArchive::INPUT_SCHEMA, "", _cfg)
         357  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         358  +
         359  +
            return ::std::result::Result::Ok(request);
         360  +
        }
  247    361   
    }
  248    362   
}
  249    363   
#[derive(Debug)]
  250    364   
struct DeleteArchiveEndpointParamsInterceptor;
  251    365   
  252    366   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteArchiveEndpointParamsInterceptor {
  253    367   
    fn name(&self) -> &'static str {
  254    368   
        "DeleteArchiveEndpointParamsInterceptor"
  255    369   
    }
  256    370   

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

@@ -10,10 +160,179 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "DeleteArchiveInput",
   32     32   
);
   33     33   
static DELETEARCHIVEINPUT_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#DeleteArchiveInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "DeleteArchiveInput",
   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 DELETEARCHIVEINPUT_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#DeleteArchiveInput$vaultName",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "DeleteArchiveInput",
   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 DELETEARCHIVEINPUT_MEMBER_ARCHIVE_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#DeleteArchiveInput$archiveId",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "DeleteArchiveInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::String,
   62         -
    "archive_id",
          62  +
    "archiveId",
   63     63   
    2,
   64     64   
)
   65     65   
.with_http_label();
   66     66   
static DELETEARCHIVEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    DELETEARCHIVEINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &DELETEARCHIVEINPUT_MEMBER_ACCOUNT_ID,
   71     71   
        &DELETEARCHIVEINPUT_MEMBER_VAULT_NAME,
   72     72   
        &DELETEARCHIVEINPUT_MEMBER_ARCHIVE_ID,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "DELETE",
          77  +
    "/{accountId}/vaults/{vaultName}/archives/{archiveId}",
          78  +
    Some(204),
          79  +
));
   75     80   
impl DeleteArchiveInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEARCHIVEINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteArchiveInput {
   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(&DELETEARCHIVEINPUT_MEMBER_ACCOUNT_ID, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.vault_name {
   89     94   
            ser.write_string(&DELETEARCHIVEINPUT_MEMBER_VAULT_NAME, val)?;
   90     95   
        }
   91     96   
        if let Some(ref val) = self.archive_id {
   92     97   
            ser.write_string(&DELETEARCHIVEINPUT_MEMBER_ARCHIVE_ID, val)?;
   93     98   
        }
   94     99   
        Ok(())
   95    100   
    }
   96    101   
}
   97    102   
impl DeleteArchiveInput {
   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(&DELETEARCHIVEINPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&DELETEARCHIVEINPUT_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.archive_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.archive_id = builder.archive_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 DeleteArchiveInput {
         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 DeleteArchiveInput {
  132    151   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  133    152   
        &mut self.account_id
  134    153   
    }
  135    154   
}
  136    155   
impl DeleteArchiveInput {
  137    156   
    /// Creates a new builder-style object to manufacture [`DeleteArchiveInput`](crate::operation::delete_archive::DeleteArchiveInput).
  138    157   
    pub fn builder() -> crate::operation::delete_archive::builders::DeleteArchiveInputBuilder {
  139    158   
        crate::operation::delete_archive::builders::DeleteArchiveInputBuilder::default()
  140    159   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_archive/_delete_archive_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 DeleteArchiveOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETEARCHIVEOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.glacier.synthetic#DeleteArchiveOutput",
   10     10   
    "com.amazonaws.glacier.synthetic",
   11     11   
    "DeleteArchiveOutput",
   12     12   
);
   13         -
static DELETEARCHIVEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETEARCHIVEOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETEARCHIVEOUTPUT_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 DELETEARCHIVEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETEARCHIVEOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETEARCHIVEOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteArchiveOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEARCHIVEOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteArchiveOutput {
   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 DeleteArchiveOutput {
   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(&DELETEARCHIVEOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETEARCHIVEOUTPUT_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 DeleteArchiveOutput {
          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 DeleteArchiveOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteArchiveOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteArchiveOutput`](crate::operation::delete_archive::DeleteArchiveOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_archive::builders::DeleteArchiveOutputBuilder {
   59     90   
        crate::operation::delete_archive::builders::DeleteArchiveOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_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 `DeleteVault`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteVault;
    6      6   
impl DeleteVault {
    7      7   
    /// Creates a new `DeleteVault`
    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::delete_vault::DeleteVaultInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::delete_vault::DeleteVaultOutput::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::delete_vault::DeleteVaultInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::delete_vault::DeleteVaultOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::delete_vault::DeleteVaultError,
   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 DeleteVaultResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteVaultResponseDeserializer {
  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 != 204 || force_error {
  159         -
            crate::protocol_serde::shape_delete_vault::de_delete_vault_http_error(status, headers, body)
         161  +
        if !success && status != 204 || 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::delete_vault::DeleteVaultError::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::delete_vault::DeleteVaultError::InvalidParameterValueException({
         184  +
                    let mut tmp = match protocol
         185  +
                        .deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
         186  +
                        .and_then(|mut deser| {
         187  +
                            crate::types::error::InvalidParameterValueException::deserialize_with_response(
         188  +
                                &mut *deser,
         189  +
                                response.headers(),
         190  +
                                response.status().into(),
         191  +
                                body,
         192  +
                            )
         193  +
                        }) {
         194  +
                        ::std::result::Result::Ok(val) => val,
         195  +
                        ::std::result::Result::Err(e) => {
         196  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         197  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         198  +
                            ))
         199  +
                        }
         200  +
                    };
         201  +
                    tmp.meta = generic;
         202  +
                    if tmp.message.is_none() {
         203  +
                        tmp.message = _error_message;
         204  +
                    }
         205  +
                    tmp
         206  +
                }),
         207  +
                "MissingParameterValueException" => crate::operation::delete_vault::DeleteVaultError::MissingParameterValueException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::MissingParameterValueException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::MissingParameterValueException::deserialize_with_response(
         212  +
                                &mut *deser,
         213  +
                                response.headers(),
         214  +
                                response.status().into(),
         215  +
                                body,
         216  +
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                }),
         231  +
                "ResourceNotFoundException" => crate::operation::delete_vault::DeleteVaultError::ResourceNotFoundException({
         232  +
                    let mut tmp = match protocol
         233  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         234  +
                        .and_then(|mut deser| {
         235  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         236  +
                                &mut *deser,
         237  +
                                response.headers(),
         238  +
                                response.status().into(),
         239  +
                                body,
         240  +
                            )
         241  +
                        }) {
         242  +
                        ::std::result::Result::Ok(val) => val,
         243  +
                        ::std::result::Result::Err(e) => {
         244  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         245  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         246  +
                            ))
         247  +
                        }
         248  +
                    };
         249  +
                    tmp.meta = generic;
         250  +
                    if tmp.message.is_none() {
         251  +
                        tmp.message = _error_message;
         252  +
                    }
         253  +
                    tmp
         254  +
                }),
         255  +
                "ServiceUnavailableException" => crate::operation::delete_vault::DeleteVaultError::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::delete_vault::DeleteVaultError::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_delete_vault::de_delete_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, DeleteVault::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::delete_vault::DeleteVaultOutput::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 DeleteVaultRequestSerializer;
  168    307   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteVaultRequestSerializer {
  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::delete_vault::DeleteVaultInput>()
  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::delete_vault::DeleteVaultInput,
  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, DeleteVault::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::delete_vault::DeleteVaultInput,
  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("DELETE").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, DeleteVault::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 DeleteVaultEndpointParamsInterceptor;
  234    362   
  235    363   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteVaultEndpointParamsInterceptor {
  236    364   
    fn name(&self) -> &'static str {
  237    365   
        "DeleteVaultEndpointParamsInterceptor"
  238    366   
    }
  239    367   

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

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_vault/_delete_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 DeleteVaultOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETEVAULTOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.glacier.synthetic#DeleteVaultOutput",
   10     10   
    "com.amazonaws.glacier.synthetic",
   11     11   
    "DeleteVaultOutput",
   12     12   
);
   13         -
static DELETEVAULTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETEVAULTOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETEVAULTOUTPUT_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 DELETEVAULTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETEVAULTOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETEVAULTOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteVaultOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEVAULTOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteVaultOutput {
   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 DeleteVaultOutput {
   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(&DELETEVAULTOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETEVAULTOUTPUT_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 DeleteVaultOutput {
          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 DeleteVaultOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteVaultOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteVaultOutput`](crate::operation::delete_vault::DeleteVaultOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_vault::builders::DeleteVaultOutputBuilder {
   59     90   
        crate::operation::delete_vault::builders::DeleteVaultOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_vault_access_policy.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 `DeleteVaultAccessPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DeleteVaultAccessPolicy;
    6      6   
impl DeleteVaultAccessPolicy {
    7      7   
    /// Creates a new `DeleteVaultAccessPolicy`
    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::delete_vault_access_policy::DeleteVaultAccessPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::delete_vault_access_policy::DeleteVaultAccessPolicyOutput::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::delete_vault_access_policy::DeleteVaultAccessPolicyInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::delete_vault_access_policy::DeleteVaultAccessPolicyOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::delete_vault_access_policy::DeleteVaultAccessPolicyError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -124,129 +267,403 @@
  144    149   
        ::std::borrow::Cow::Owned(rcb)
  145    150   
    }
  146    151   
}
  147    152   
  148    153   
#[derive(Debug)]
  149    154   
struct DeleteVaultAccessPolicyResponseDeserializer;
  150    155   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteVaultAccessPolicyResponseDeserializer {
  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 != 204 || force_error {
  162         -
            crate::protocol_serde::shape_delete_vault_access_policy::de_delete_vault_access_policy_http_error(status, headers, body)
         165  +
        if !success && status != 204 || 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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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::delete_vault_access_policy::DeleteVaultAccessPolicyError::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_delete_vault_access_policy::de_delete_vault_access_policy_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, DeleteVaultAccessPolicy::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::delete_vault_access_policy::DeleteVaultAccessPolicyOutput::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 DeleteVaultAccessPolicyRequestSerializer;
  171    323   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteVaultAccessPolicyRequestSerializer {
  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::delete_vault_access_policy::DeleteVaultAccessPolicyInput>()
  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::delete_vault_access_policy::DeleteVaultAccessPolicyInput,
  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, DeleteVaultAccessPolicy::INPUT_SCHEMA, "", _cfg)
         339  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         340  +
            {
         341  +
                let mut uri = "/{accountId}/vaults/{vaultName}/access-policy".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         -
                ::std::write!(
  215         -
                    output,
  216         -
                    "/{accountId}/vaults/{vaultName}/access-policy",
  217         -
                    accountId = account_id,
  218         -
                    vaultName = vault_name
  219         -
                )
  220         -
                .expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
  222         -
            }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::delete_vault_access_policy::DeleteVaultAccessPolicyInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                ::std::result::Result::Ok(builder.method("DELETE").uri(uri))
         349  +
                if !query_params.is_empty() {
         350  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         351  +
                    let pairs: Vec<String> = query_params
         352  +
                        .iter()
         353  +
                        .map(|(k, v)| {
         354  +
                            format!(
         355  +
                                "{}={}",
         356  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         357  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         358  +
                            )
         359  +
                        })
         360  +
                        .collect();
         361  +
                    uri.push_str(&pairs.join("&"));
         362  +
                }
         363  +
                request.set_uri(uri.as_str()).expect("valid URI");
  231    364   
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder
  234         -
        };
  235         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  236    365   
  237         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         366  +
            return ::std::result::Result::Ok(request);
         367  +
        } else {
         368  +
            let mut request = protocol
         369  +
                .serialize_request(&input, DeleteVaultAccessPolicy::INPUT_SCHEMA, "", _cfg)
         370  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         371  +
         372  +
            return ::std::result::Result::Ok(request);
         373  +
        }
  238    374   
    }
  239    375   
}
  240    376   
#[derive(Debug)]
  241    377   
struct DeleteVaultAccessPolicyEndpointParamsInterceptor;
  242    378   
  243    379   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteVaultAccessPolicyEndpointParamsInterceptor {
  244    380   
    fn name(&self) -> &'static str {
  245    381   
        "DeleteVaultAccessPolicyEndpointParamsInterceptor"
  246    382   
    }
  247    383   

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

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/delete_vault_access_policy/_delete_vault_access_policy_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 DeleteVaultAccessPolicyOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.glacier.synthetic#DeleteVaultAccessPolicyOutput",
   10     10   
    "com.amazonaws.glacier.synthetic",
   11     11   
    "DeleteVaultAccessPolicyOutput",
   12     12   
);
   13         -
static DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static DELETEVAULTACCESSPOLICYOUTPUT_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 DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&DELETEVAULTACCESSPOLICYOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl DeleteVaultAccessPolicyOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteVaultAccessPolicyOutput {
   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 DeleteVaultAccessPolicyOutput {
   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(&DELETEVAULTACCESSPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&DELETEVAULTACCESSPOLICYOUTPUT_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 DeleteVaultAccessPolicyOutput {
          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 DeleteVaultAccessPolicyOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl DeleteVaultAccessPolicyOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`DeleteVaultAccessPolicyOutput`](crate::operation::delete_vault_access_policy::DeleteVaultAccessPolicyOutput).
   58     89   
    pub fn builder() -> crate::operation::delete_vault_access_policy::builders::DeleteVaultAccessPolicyOutputBuilder {
   59     90   
        crate::operation::delete_vault_access_policy::builders::DeleteVaultAccessPolicyOutputBuilder::default()
   60     91   
    }