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