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