AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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

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

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

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

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

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

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/glacier/src/operation/get_vault_notifications.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 `GetVaultNotifications`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GetVaultNotifications;
    6      6   
impl GetVaultNotifications {
    7      7   
    /// Creates a new `GetVaultNotifications`
    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::get_vault_notifications::GetVaultNotificationsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::get_vault_notifications::GetVaultNotificationsOutput::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::get_vault_notifications::GetVaultNotificationsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::get_vault_notifications::GetVaultNotificationsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::get_vault_notifications::GetVaultNotificationsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -124,128 +267,400 @@
  144    148   
        ::std::borrow::Cow::Owned(rcb)
  145    149   
    }
  146    150   
}
  147    151   
  148    152   
#[derive(Debug)]
  149    153   
struct GetVaultNotificationsResponseDeserializer;
  150    154   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetVaultNotificationsResponseDeserializer {
  151    155   
    fn deserialize_nonstreaming(
  152    156   
        &self,
  153    157   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         158  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  154    159   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  155    160   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  156         -
        let headers = response.headers();
  157         -
        let body = response.body().bytes().expect("body loaded");
  158    161   
        #[allow(unused_mut)]
  159    162   
        let mut force_error = false;
  160    163   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  161         -
        let parse_result = if !success && status != 200 || force_error {
  162         -
            crate::protocol_serde::shape_get_vault_notifications::de_get_vault_notifications_http_error(status, headers, body)
         164  +
        if !success && status != 200 || force_error {
         165  +
            let headers = response.headers();
         166  +
            let body = response.body().bytes().expect("body loaded");
         167  +
            #[allow(unused_mut)]
         168  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         169  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         170  +
            })?;
         171  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         172  +
            let generic = generic_builder.build();
         173  +
            let error_code = match generic.code() {
         174  +
                ::std::option::Option::Some(code) => code,
         175  +
                ::std::option::Option::None => {
         176  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         177  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         178  +
                            crate::operation::get_vault_notifications::GetVaultNotificationsError::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::get_vault_notifications::GetVaultNotificationsError::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::get_vault_notifications::GetVaultNotificationsError::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::get_vault_notifications::GetVaultNotificationsError::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" => {
         265  +
                    crate::operation::get_vault_notifications::GetVaultNotificationsError::ServiceUnavailableException({
         266  +
                        let mut tmp = match protocol
         267  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         268  +
                            .and_then(|mut deser| {
         269  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         270  +
                                    &mut *deser,
         271  +
                                    response.headers(),
         272  +
                                    response.status().into(),
         273  +
                                    body,
         274  +
                                )
         275  +
                            }) {
         276  +
                            ::std::result::Result::Ok(val) => val,
         277  +
                            ::std::result::Result::Err(e) => {
         278  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         279  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         280  +
                                ))
         281  +
                            }
         282  +
                        };
         283  +
                        tmp.meta = generic;
         284  +
                        if tmp.message.is_none() {
         285  +
                            tmp.message = _error_message;
         286  +
                        }
         287  +
                        tmp
         288  +
                    })
         289  +
                }
         290  +
                _ => crate::operation::get_vault_notifications::GetVaultNotificationsError::generic(generic),
         291  +
            };
         292  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         293  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         294  +
            ))
  163    295   
        } else {
  164         -
            crate::protocol_serde::shape_get_vault_notifications::de_get_vault_notifications_http_response(status, headers, body)
  165         -
        };
  166         -
        crate::protocol_serde::type_erase_result(parse_result)
         296  +
            let protocol = _cfg
         297  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         298  +
                .expect("a SharedClientProtocol is required");
         299  +
            let mut deser = protocol
         300  +
                .deserialize_response(response, GetVaultNotifications::OUTPUT_SCHEMA, _cfg)
         301  +
                .map_err(|e| {
         302  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         303  +
                })?;
         304  +
            let body = response.body().bytes().expect("body loaded");
         305  +
            let output = crate::operation::get_vault_notifications::GetVaultNotificationsOutput::deserialize_with_response(
         306  +
                &mut *deser,
         307  +
                response.headers(),
         308  +
                response.status().into(),
         309  +
                body,
         310  +
            )
         311  +
            .map_err(|e| {
         312  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         313  +
            })?;
         314  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         315  +
        }
  167    316   
    }
  168    317   
}
  169    318   
#[derive(Debug)]
  170    319   
struct GetVaultNotificationsRequestSerializer;
  171    320   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetVaultNotificationsRequestSerializer {
  172    321   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  173    322   
    fn serialize_input(
  174    323   
        &self,
  175    324   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  176    325   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  177    326   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  178    327   
        let input = input
  179    328   
            .downcast::<crate::operation::get_vault_notifications::GetVaultNotificationsInput>()
  180    329   
            .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::get_vault_notifications::GetVaultNotificationsInput,
  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         -
                    ));
         330  +
        let protocol = _cfg
         331  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         332  +
            .expect("a SharedClientProtocol is required");
         333  +
        if protocol.supports_http_bindings() {
         334  +
            let mut request = protocol
         335  +
                .serialize_body(&input, GetVaultNotifications::INPUT_SCHEMA, "", _cfg)
         336  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         337  +
            {
         338  +
                let mut uri = "/{accountId}/vaults/{vaultName}/notification-configuration".to_string();
         339  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         340  +
                if let Some(ref val) = input.account_id {
         341  +
                    uri = uri.replace("{accountId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  202    342   
                }
  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         -
                    ));
         343  +
                if let Some(ref val) = input.vault_name {
         344  +
                    uri = uri.replace("{vaultName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  213    345   
                }
  214         -
                ::std::write!(
  215         -
                    output,
  216         -
                    "/{accountId}/vaults/{vaultName}/notification-configuration",
  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::get_vault_notifications::GetVaultNotificationsInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
         346  +
                if !query_params.is_empty() {
         347  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         348  +
                    let pairs: Vec<String> = query_params
         349  +
                        .iter()
         350  +
                        .map(|(k, v)| {
         351  +
                            format!(
         352  +
                                "{}={}",
         353  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         354  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         355  +
                            )
         356  +
                        })
         357  +
                        .collect();
         358  +
                    uri.push_str(&pairs.join("&"));
         359  +
                }
         360  +
                request.set_uri(uri.as_str()).expect("valid URI");
  231    361   
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder
  234         -
        };
  235         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  236    362   
  237         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         363  +
            return ::std::result::Result::Ok(request);
         364  +
        } else {
         365  +
            let mut request = protocol
         366  +
                .serialize_request(&input, GetVaultNotifications::INPUT_SCHEMA, "", _cfg)
         367  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         368  +
         369  +
            return ::std::result::Result::Ok(request);
         370  +
        }
  238    371   
    }
  239    372   
}
  240    373   
#[derive(Debug)]
  241    374   
struct GetVaultNotificationsEndpointParamsInterceptor;
  242    375   
  243    376   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetVaultNotificationsEndpointParamsInterceptor {
  244    377   
    fn name(&self) -> &'static str {
  245    378   
        "GetVaultNotificationsEndpointParamsInterceptor"
  246    379   
    }
  247    380   

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

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

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

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

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