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