240 240 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
241 241 | let input = input
|
242 242 | .downcast::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput>(
|
243 243 | )
|
244 244 | .expect("correct type");
|
245 245 | let _header_serialization_settings = _cfg
|
246 246 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
247 247 | .cloned()
|
248 248 | .unwrap_or_default();
|
249 249 | let mut request_builder = {
|
250 250 | #[allow(clippy::uninlined_format_args)]
|
251 251 | fn uri_base(
|
252 252 | _input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
|
253 253 | output: &mut ::std::string::String,
|
254 254 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
255 255 | use ::std::fmt::Write as _;
|
256 256 | ::std::write!(output, "/").expect("formatting should succeed");
|
257 257 | ::std::result::Result::Ok(())
|
258 258 | }
|
259 259 | fn uri_query(
|
260 260 | _input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
|
261 261 | mut output: &mut ::std::string::String,
|
262 262 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
263 263 | let mut query = ::aws_smithy_http::query::Writer::new(output);
|
264 264 | query.push_v("metadataInventoryTable");
|
265 265 | ::std::result::Result::Ok(())
|
266 266 | }
|
267 267 | #[allow(clippy::unnecessary_wraps)]
|
268 268 | fn update_http_builder(
|
269 269 | input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
|
270 - | builder: ::http::request::Builder,
|
271 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
270 + | builder: ::http_1x::request::Builder,
|
271 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
272 272 | let mut uri = ::std::string::String::new();
|
273 273 | uri_base(input, &mut uri)?;
|
274 274 | uri_query(input, &mut uri)?;
|
275 275 | let builder = crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration::ser_update_bucket_metadata_inventory_table_configuration_headers(input, builder)?;
|
276 276 | ::std::result::Result::Ok(builder.method("PUT").uri(uri))
|
277 277 | }
|
278 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
279 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
|
278 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
279 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
|
280 280 | builder
|
281 281 | };
|
282 282 | let body = ::aws_smithy_types::body::SdkBody::from(
|
283 283 | crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration_input::ser_inventory_table_configuration_http_payload(
|
284 284 | &input.inventory_table_configuration,
|
285 285 | )?,
|
286 286 | );
|
287 287 | if let Some(content_length) = body.content_length() {
|
288 288 | let content_length = content_length.to_string();
|
289 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
289 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
290 290 | }
|
291 291 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
292 292 | }
|
293 293 | }
|
294 294 | #[derive(Debug)]
|
295 295 | struct UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor;
|
296 296 |
|
297 297 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor {
|
298 298 | fn name(&self) -> &'static str {
|
299 299 | "UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor"
|
300 300 | }
|
301 301 |
|
302 302 | fn read_before_execution(
|
303 303 | &self,
|
304 304 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
305 305 | '_,
|
306 306 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
307 307 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
308 308 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
309 309 | >,
|
310 310 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
311 311 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
312 312 | let _input = context
|
313 313 | .input()
|
314 314 | .downcast_ref::<UpdateBucketMetadataInventoryTableConfigurationInput>()
|
315 315 | .ok_or("failed to downcast to UpdateBucketMetadataInventoryTableConfigurationInput")?;
|
316 316 |
|
317 317 | let params = crate::config::endpoint::Params::builder()
|
318 318 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
319 319 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|