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