213 213 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
214 214 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
215 215 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
216 216 | >,
|
217 217 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
218 218 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
219 219 | let _input = context
|
220 220 | .input()
|
221 221 | .downcast_ref::<NullInNonSparseInput>()
|
222 222 | .ok_or("failed to downcast to NullInNonSparseInput")?;
|
223 223 |
|
224 224 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
225 225 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
226 226 | })?;
|
227 227 | cfg.interceptor_state()
|
228 228 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
229 229 | ::std::result::Result::Ok(())
|
230 230 | }
|
231 231 | }
|
232 232 |
|
233 233 | // The get_* functions below are generated from JMESPath expressions in the
|
234 234 | // operationContextParams trait. They target the operation's input shape.
|
235 235 |
|
236 236 | #[allow(unreachable_code, unused_variables)]
|
237 237 | #[cfg(test)]
|
238 238 | mod null_in_non_sparse_test {
|
239 239 |
|
240 240 | /// Test ID: NullInNonSparse
|
241 241 | #[::tokio::test]
|
242 242 | #[::tracing_test::traced_test]
|
243 + | #[should_panic]
|
243 244 | async fn null_in_non_sparse_response() {
|
244 245 | let expected_output = crate::operation::null_in_non_sparse::NullInNonSparseOutput::builder()
|
245 246 | .set_list(::std::option::Option::Some(vec!["one".to_owned(), "two".to_owned()]))
|
246 247 | .set_map(::std::option::Option::Some({
|
247 248 | let mut ret = ::std::collections::HashMap::new();
|
248 249 | ret.insert("one".to_owned(), "1".to_owned());
|
249 250 | ret
|
250 251 | }))
|
251 252 | .build();
|
252 253 | let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
|
253 254 | ::http_1x::response::Builder::new()
|
254 255 | .status(200)
|
255 256 | .body(::aws_smithy_types::body::SdkBody::from(
|
256 257 | "{\"list\":[null,\"one\",null,\"two\",null],\"map\":{\"zero\":null,\"one\":\"1\"}}",
|
257 258 | ))
|
258 259 | .unwrap(),
|
259 260 | )
|
260 261 | .unwrap();
|
261 262 | use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
|
262 263 | use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
|
263 264 |
|
264 265 | let op = crate::operation::null_in_non_sparse::NullInNonSparse::new();
|
265 266 | let config = op.config().expect("the operation has config");
|
266 267 | let de = config
|
267 268 | .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
|
268 269 | .expect("the config must have a deserializer");
|
269 270 |
|
270 271 | let parsed = de.deserialize_streaming(&mut http_response);
|
271 272 | let parsed = parsed.unwrap_or_else(|| {
|
272 273 | let http_response = http_response.map(|body| {
|