206 206 | }
|
207 207 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
208 208 | }
|
209 209 | }
|
210 210 | #[derive(Debug)]
|
211 211 | struct RecursiveUnionOperationEndpointParamsInterceptor;
|
212 212 |
|
213 213 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RecursiveUnionOperationEndpointParamsInterceptor {
|
214 214 | fn name(&self) -> &'static str {
|
215 215 | "RecursiveUnionOperationEndpointParamsInterceptor"
|
216 216 | }
|
217 217 |
|
218 218 | fn read_before_execution(
|
219 219 | &self,
|
220 220 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
221 221 | '_,
|
222 222 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
223 223 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
224 224 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
225 225 | >,
|
226 226 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
227 227 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
228 228 | let _input = context
|
229 229 | .input()
|
230 230 | .downcast_ref::<RecursiveUnionOperationInput>()
|
231 231 | .ok_or("failed to downcast to RecursiveUnionOperationInput")?;
|
232 232 |
|
233 233 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
234 234 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
235 235 | })?;
|
236 + |
|
236 237 | cfg.interceptor_state()
|
237 238 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
239 + |
|
238 240 | ::std::result::Result::Ok(())
|
239 241 | }
|
240 242 | }
|
241 243 |
|
242 244 | // The get_* functions below are generated from JMESPath expressions in the
|
243 245 | // operationContextParams trait. They target the operation's input shape.
|
244 246 |
|
245 247 | #[allow(unreachable_code, unused_variables)]
|
246 248 | #[cfg(test)]
|
247 249 | mod recursive_union_operation_test {
|
248 250 |
|
249 251 | /// Serializes recursive structures with union
|
250 252 | /// Test ID: RpcV2CborRecursiveShapesWithUnion
|
251 253 | #[::tokio::test]
|
252 254 | #[::tracing_test::traced_test]
|
253 255 | async fn rpc_v2_cbor_recursive_shapes_with_union_response() {
|
254 256 | let expected_output = crate::operation::recursive_union_operation::RecursiveUnionOperationOutput::builder()
|
255 257 | .set_nested(::std::option::Option::Some(
|
256 258 | crate::types::RecursiveOperationInputOutputNested1::builder()
|
257 259 | .set_foo(::std::option::Option::Some("Foo1".to_owned()))
|
258 260 | .set_variant(::std::option::Option::Some(crate::types::FooChoice::Choice1("OuterChoice".to_owned())))
|
259 261 | .set_nested(::std::option::Option::Some(::std::boxed::Box::new(
|
260 262 | crate::types::RecursiveOperationInputOutputNested2::builder()
|
261 263 | .set_bar(::std::option::Option::Some("Bar1".to_owned()))
|
262 264 | .set_recursive_member(::std::option::Option::Some(
|
263 265 | crate::types::RecursiveOperationInputOutputNested1::builder()
|
264 266 | .set_foo(::std::option::Option::Some("Foo2".to_owned()))
|
265 267 | .set_variant(::std::option::Option::Some(crate::types::FooChoice::Choice2(::std::boxed::Box::new(
|
266 268 | crate::types::RecursiveOperationInputOutputNested1::builder()
|
267 269 | .set_foo(::std::option::Option::Some("Foo3".to_owned()))
|