AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -10,10 +155,182 @@
   30     30   
    "com.amazonaws.glacier.synthetic",
   31     31   
    "SetVaultAccessPolicyInput",
   32     32   
);
   33     33   
static SETVAULTACCESSPOLICYINPUT_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#SetVaultAccessPolicyInput$accountId",
   36     36   
        "com.amazonaws.glacier.synthetic",
   37     37   
        "SetVaultAccessPolicyInput",
   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 SETVAULTACCESSPOLICYINPUT_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#SetVaultAccessPolicyInput$vaultName",
   47     47   
        "com.amazonaws.glacier.synthetic",
   48     48   
        "SetVaultAccessPolicyInput",
   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 SETVAULTACCESSPOLICYINPUT_MEMBER_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   56     56   
    ::aws_smithy_schema::ShapeId::from_static(
   57     57   
        "com.amazonaws.glacier.synthetic#SetVaultAccessPolicyInput$policy",
   58     58   
        "com.amazonaws.glacier.synthetic",
   59     59   
        "SetVaultAccessPolicyInput",
   60     60   
    ),
   61     61   
    ::aws_smithy_schema::ShapeType::Structure,
   62     62   
    "policy",
   63     63   
    2,
   64     64   
)
   65     65   
.with_http_payload();
   66     66   
static SETVAULTACCESSPOLICYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   67     67   
    SETVAULTACCESSPOLICYINPUT_SCHEMA_ID,
   68     68   
    ::aws_smithy_schema::ShapeType::Structure,
   69     69   
    &[
   70     70   
        &SETVAULTACCESSPOLICYINPUT_MEMBER_ACCOUNT_ID,
   71     71   
        &SETVAULTACCESSPOLICYINPUT_MEMBER_VAULT_NAME,
   72     72   
        &SETVAULTACCESSPOLICYINPUT_MEMBER_POLICY,
   73     73   
    ],
   74         -
);
          74  +
)
          75  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          76  +
    "PUT",
          77  +
    "/{accountId}/vaults/{vaultName}/access-policy",
          78  +
    Some(204),
          79  +
));
   75     80   
impl SetVaultAccessPolicyInput {
   76     81   
    /// The schema for this shape.
   77     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SETVAULTACCESSPOLICYINPUT_SCHEMA;
   78     83   
}
   79     84   
impl ::aws_smithy_schema::serde::SerializableStruct for SetVaultAccessPolicyInput {
   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(&SETVAULTACCESSPOLICYINPUT_MEMBER_ACCOUNT_ID, val)?;
   87     92   
        }
   88     93   
        if let Some(ref val) = self.vault_name {
   89     94   
            ser.write_string(&SETVAULTACCESSPOLICYINPUT_MEMBER_VAULT_NAME, val)?;
   90     95   
        }
   91     96   
        if let Some(ref val) = self.policy {
   92     97   
            ser.write_struct(&SETVAULTACCESSPOLICYINPUT_MEMBER_POLICY, val)?;
   93     98   
        }
   94     99   
        Ok(())
   95    100   
    }
   96    101   
}
   97    102   
impl SetVaultAccessPolicyInput {
   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(&SETVAULTACCESSPOLICYINPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&SETVAULTACCESSPOLICYINPUT_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.policy = Some(crate::types::VaultAccessPolicy::deserialize(deser)?);
  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
         134  +
            .build()
         135  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         136  +
    }
         137  +
}
         138  +
impl SetVaultAccessPolicyInput {
         139  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         140  +
    /// Header-bound members are read directly from headers, avoiding runtime
         141  +
    /// member iteration overhead. Body members are read via the deserializer.
         142  +
    pub fn deserialize_with_response(
         143  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         144  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         145  +
        _status: u16,
         146  +
        body: &[u8],
         147  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         148  +
        #[allow(unused_variables, unused_mut)]
         149  +
        let mut builder = Self::builder();
         150  +
        if !body.is_empty() {
         151  +
            builder.policy = Some(crate::types::VaultAccessPolicy::deserialize(deserializer)?);
         152  +
        }
  126    153   
        builder
  127    154   
            .build()
  128    155   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  129    156   
    }
  130    157   
}
  131    158   
impl crate::glacier_interceptors::GlacierAccountId for SetVaultAccessPolicyInput {
  132    159   
    fn account_id_mut(&mut self) -> &mut Option<String> {
  133    160   
        &mut self.account_id
  134    161   
    }
  135    162   
}