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