219 219 | }
|
220 220 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
221 221 | }
|
222 222 | }
|
223 223 | #[derive(Debug)]
|
224 224 | struct CapturePokemonEndpointParamsInterceptor;
|
225 225 |
|
226 226 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CapturePokemonEndpointParamsInterceptor {
|
227 227 | fn name(&self) -> &'static str {
|
228 228 | "CapturePokemonEndpointParamsInterceptor"
|
229 229 | }
|
230 230 |
|
231 231 | fn read_before_execution(
|
232 232 | &self,
|
233 233 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
234 234 | '_,
|
235 235 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
236 236 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
237 237 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
238 238 | >,
|
239 239 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
240 240 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
241 241 | let _input = context
|
242 242 | .input()
|
243 243 | .downcast_ref::<CapturePokemonInput>()
|
244 244 | .ok_or("failed to downcast to CapturePokemonInput")?;
|
245 245 |
|
246 246 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
247 247 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
248 248 | })?;
|
249 + |
|
249 250 | cfg.interceptor_state()
|
250 251 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
252 + |
|
251 253 | ::std::result::Result::Ok(())
|
252 254 | }
|
253 255 | }
|
254 256 |
|
255 257 | // The get_* functions below are generated from JMESPath expressions in the
|
256 258 | // operationContextParams trait. They target the operation's input shape.
|
257 259 |
|
258 260 | /// Error type for the `CapturePokemonError` operation.
|
259 261 | #[non_exhaustive]
|
260 262 | #[derive(::std::fmt::Debug)]
|
261 263 | pub enum CapturePokemonError {
|
262 264 | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
263 265 | ValidationError(crate::types::error::ValidationError),
|
264 266 | #[allow(missing_docs)] // documentation missing in model
|
265 267 | MasterBallUnsuccessful(crate::types::error::MasterBallUnsuccessful),
|
266 268 | #[allow(missing_docs)] // documentation missing in model
|
267 269 | InvalidPokeballError(crate::types::error::InvalidPokeballError),
|
268 270 | #[allow(missing_docs)] // documentation missing in model
|
269 271 | ThrottlingError(crate::types::error::ThrottlingError),
|
270 272 | #[allow(missing_docs)] // documentation missing in model
|
271 273 | UnsupportedRegionError(crate::types::error::UnsupportedRegionError),
|
272 274 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
273 275 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
274 276 | variable wildcard pattern and check `.code()`:
|
275 277 | \
|
276 278 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
277 279 | \
|
278 280 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CapturePokemonError) for what information is available for the error.")]
|
279 281 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
280 282 | }
|