259 259 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
260 260 | >,
|
261 261 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
262 262 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
263 263 | let _input = context
|
264 264 | .input()
|
265 265 | .downcast_ref::<ListBucketMetricsConfigurationsInput>()
|
266 266 | .ok_or("failed to downcast to ListBucketMetricsConfigurationsInput")?;
|
267 267 |
|
268 268 | let params = crate::config::endpoint::Params::builder()
|
269 269 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
270 270 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
271 271 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
272 272 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
273 273 | .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
|
274 274 | .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
|
275 275 | .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
|
276 276 | .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
|
277 277 | .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
|
278 278 | .set_bucket(Some(
|
279 279 | _input
|
280 280 | .bucket
|
281 281 | .clone()
|
282 282 | .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
|
283 283 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
|
284 284 | ))
|
285 285 | .build()
|
286 286 | .map_err(|err| {
|
287 287 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
288 288 | })?;
|
289 + |
|
289 290 | cfg.interceptor_state()
|
290 291 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
292 + |
|
291 293 | ::std::result::Result::Ok(())
|
292 294 | }
|
293 295 | }
|
294 296 |
|
295 297 | // The get_* functions below are generated from JMESPath expressions in the
|
296 298 | // operationContextParams trait. They target the operation's input shape.
|
297 299 |
|
298 300 | /// Error type for the `ListBucketMetricsConfigurationsError` operation.
|
299 301 | #[non_exhaustive]
|
300 302 | #[derive(::std::fmt::Debug)]
|
301 303 | pub enum ListBucketMetricsConfigurationsError {
|
302 304 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
303 305 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
304 306 | variable wildcard pattern and check `.code()`:
|
305 307 | \
|
306 308 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
307 309 | \
|
308 310 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListBucketMetricsConfigurationsError) for what information is available for the error.")]
|
309 311 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
310 312 | }
|
311 313 | impl ListBucketMetricsConfigurationsError {
|
312 314 | /// Creates the `ListBucketMetricsConfigurationsError::Unhandled` variant from any error type.
|
313 315 | pub fn unhandled(
|
314 316 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
315 317 | ) -> Self {
|
316 318 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
317 319 | source: err.into(),
|
318 320 | meta: ::std::default::Default::default(),
|
319 321 | })
|
320 322 | }
|