223 223 |
|
224 224 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeVpcEndpointConnectionNotificationsEndpointParamsInterceptor {
|
225 225 | fn name(&self) -> &'static str {
|
226 226 | "DescribeVpcEndpointConnectionNotificationsEndpointParamsInterceptor"
|
227 227 | }
|
228 228 |
|
229 229 | fn read_before_execution(
|
230 230 | &self,
|
231 231 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
232 232 | '_,
|
233 233 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
234 234 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
235 235 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
236 236 | >,
|
237 237 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
238 238 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
239 239 | let _input = context
|
240 240 | .input()
|
241 241 | .downcast_ref::<DescribeVpcEndpointConnectionNotificationsInput>()
|
242 242 | .ok_or("failed to downcast to DescribeVpcEndpointConnectionNotificationsInput")?;
|
243 243 |
|
244 244 | let params = crate::config::endpoint::Params::builder()
|
245 245 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
246 246 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
247 247 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
248 248 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
249 249 | .build()
|
250 250 | .map_err(|err| {
|
251 251 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
252 252 | })?;
|
253 + |
|
253 254 | cfg.interceptor_state()
|
254 255 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
256 + |
|
255 257 | ::std::result::Result::Ok(())
|
256 258 | }
|
257 259 | }
|
258 260 |
|
259 261 | // The get_* functions below are generated from JMESPath expressions in the
|
260 262 | // operationContextParams trait. They target the operation's input shape.
|
261 263 |
|
262 264 | /// Error type for the `DescribeVpcEndpointConnectionNotificationsError` operation.
|
263 265 | #[non_exhaustive]
|
264 266 | #[derive(::std::fmt::Debug)]
|
265 267 | pub enum DescribeVpcEndpointConnectionNotificationsError {
|
266 268 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
267 269 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
268 270 | variable wildcard pattern and check `.code()`:
|
269 271 | \
|
270 272 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
271 273 | \
|
272 274 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DescribeVpcEndpointConnectionNotificationsError) for what information is available for the error.")]
|
273 275 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
274 276 | }
|
275 277 | impl DescribeVpcEndpointConnectionNotificationsError {
|
276 278 | /// Creates the `DescribeVpcEndpointConnectionNotificationsError::Unhandled` variant from any error type.
|
277 279 | pub fn unhandled(
|
278 280 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
279 281 | ) -> Self {
|
280 282 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
281 283 | source: err.into(),
|
282 284 | meta: ::std::default::Default::default(),
|
283 285 | })
|
284 286 | }
|