361 361 |
|
362 362 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
363 363 | }
|
364 364 | }
|
365 365 | #[derive(Debug)]
|
366 366 | struct AllQueryStringTypesEndpointParamsInterceptor;
|
367 367 |
|
368 368 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AllQueryStringTypesEndpointParamsInterceptor {
|
369 369 | fn name(&self) -> &'static str {
|
370 370 | "AllQueryStringTypesEndpointParamsInterceptor"
|
371 371 | }
|
372 372 |
|
373 373 | fn read_before_execution(
|
374 374 | &self,
|
375 375 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
376 376 | '_,
|
377 377 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
378 378 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
379 379 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
380 380 | >,
|
381 381 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
382 382 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
383 383 | let _input = context
|
384 384 | .input()
|
385 385 | .downcast_ref::<AllQueryStringTypesInput>()
|
386 386 | .ok_or("failed to downcast to AllQueryStringTypesInput")?;
|
387 387 |
|
388 388 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
389 389 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
390 390 | })?;
|
391 + |
|
391 392 | cfg.interceptor_state()
|
392 393 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
394 + |
|
393 395 | ::std::result::Result::Ok(())
|
394 396 | }
|
395 397 | }
|
396 398 |
|
397 399 | // The get_* functions below are generated from JMESPath expressions in the
|
398 400 | // operationContextParams trait. They target the operation's input shape.
|
399 401 |
|
400 402 | #[allow(unreachable_code, unused_variables)]
|
401 403 | #[cfg(test)]
|
402 404 | mod all_query_string_types_test {
|
403 405 |
|
404 406 | /// Serializes query string parameters with all supported types
|
405 407 | /// Test ID: RestJsonAllQueryStringTypes
|
406 408 | #[::tokio::test]
|
407 409 | #[::tracing_test::traced_test]
|
408 410 | async fn rest_json_all_query_string_types_request() {
|
409 411 | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
410 412 | let config_builder = crate::config::Config::builder()
|
411 413 | .with_test_defaults()
|
412 414 | .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
|
413 415 | .endpoint_url("https://example.com");
|
414 416 |
|
415 417 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
416 418 | let result = client
|
417 419 | .all_query_string_types()
|
418 420 | .set_query_string(::std::option::Option::Some("Hello there".to_owned()))
|
419 421 | .set_query_string_list(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
|
420 422 | .set_query_string_set(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
|
421 423 | .set_query_byte(::std::option::Option::Some(1))
|
422 424 | .set_query_short(::std::option::Option::Some(2))
|