Server Test

Server Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb

Files changed:

tmp-codegen-diff/codegen-server-test/json_rpc10-http0x/rust-server-codegen/src/types.rs

@@ -0,1 +0,5 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
           3  +
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
           4  +
pub use ::aws_smithy_types::Blob;
           5  +
pub use ::aws_smithy_types::DateTime;

tmp-codegen-diff/codegen-server-test/json_rpc10-http0x/rust-server-codegen/src/unconstrained.rs

@@ -0,1 +0,74 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
impl crate::constrained::Constrained for crate::model::MyUnion {
           4  +
    type Unconstrained = crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained;
           5  +
}
           6  +
           7  +
impl From<crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained>
           8  +
    for crate::constrained::MaybeConstrained<crate::model::MyUnion>
           9  +
{
          10  +
    fn from(value: crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained) -> Self {
          11  +
        Self::Unconstrained(value)
          12  +
    }
          13  +
}
          14  +
pub(crate) mod my_union_unconstrained {
          15  +
          16  +
    #[allow(clippy::enum_variant_names)]
          17  +
    #[derive(Debug, Clone)]
          18  +
    pub(crate) enum MyUnionUnconstrained {
          19  +
        BlobValue(::aws_smithy_types::Blob),
          20  +
        BooleanValue(bool),
          21  +
        EnumValue(::std::string::String),
          22  +
        IntEnumValue(i32),
          23  +
        ListValue(::std::vec::Vec<::std::string::String>),
          24  +
        MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
          25  +
        NumberValue(i32),
          26  +
        StringValue(::std::string::String),
          27  +
        StructureValue(crate::model::GreetingStruct),
          28  +
        TimestampValue(::aws_smithy_types::DateTime),
          29  +
    }
          30  +
    impl ::std::convert::TryFrom<MyUnionUnconstrained> for crate::model::MyUnion {
          31  +
        type Error = crate::model::my_union::ConstraintViolation;
          32  +
          33  +
        fn try_from(value: MyUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
          34  +
            Ok(
          35  +
        match value {
          36  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(unconstrained) => Self::BlobValue(
          37  +
                unconstrained
          38  +
            ),
          39  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(unconstrained) => Self::BooleanValue(
          40  +
                unconstrained
          41  +
            ),
          42  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(unconstrained) => Self::EnumValue(
          43  +
                unconstrained
          44  +
                                        .try_into()
          45  +
                                        
          46  +
                                        
          47  +
                                        .map_err(Self::Error::EnumValue)?
          48  +
            ),
          49  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::IntEnumValue(unconstrained) => Self::IntEnumValue(
          50  +
                unconstrained
          51  +
            ),
          52  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(unconstrained) => Self::ListValue(
          53  +
                unconstrained
          54  +
            ),
          55  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(unconstrained) => Self::MapValue(
          56  +
                unconstrained
          57  +
            ),
          58  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(unconstrained) => Self::NumberValue(
          59  +
                unconstrained
          60  +
            ),
          61  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(unconstrained) => Self::StringValue(
          62  +
                unconstrained
          63  +
            ),
          64  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(unconstrained) => Self::StructureValue(
          65  +
                unconstrained
          66  +
            ),
          67  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(unconstrained) => Self::TimestampValue(
          68  +
                unconstrained
          69  +
            ),
          70  +
        }
          71  +
    )
          72  +
        }
          73  +
    }
          74  +
}

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/Cargo.toml

@@ -1,1 +56,60 @@
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#awsJson1_0"
   12     12   
[dependencies.aws-smithy-http]
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   14     14   
[dependencies.aws-smithy-http-server]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server"
   16     16   
[dependencies.aws-smithy-json]
   17     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   18     18   
[dependencies.aws-smithy-runtime-api]
   19     19   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          20  +
features = ["http-1x"]
   20     21   
[dependencies.aws-smithy-types]
   21     22   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          23  +
features = ["http-body-1-x"]
   22     24   
[dependencies.futures-util]
   23     25   
version = "0.3"
   24         -
[dependencies.http]
   25         -
version = "0.2.9"
   26         -
[dependencies.hyper]
   27         -
version = "0.14.26"
          26  +
[dependencies.http-1x]
          27  +
version = "1"
          28  +
package = "http"
          29  +
[dependencies.http-body-util]
          30  +
version = "0.1.3"
   28     31   
[dependencies.mime]
   29     32   
version = "0.3"
   30     33   
[dependencies.pin-project-lite]
   31     34   
version = "0.2"
   32     35   
[dependencies.tower]
   33     36   
version = "0.4"
   34     37   
[dependencies.tracing]
   35     38   
version = "0.1"
   36     39   
[dev-dependencies.aws-smithy-protocol-test]
   37     40   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
          41  +
features = ["http-1x"]
   38     42   
[dev-dependencies.bytes]
   39     43   
version = "1.4.0"
   40     44   
[dev-dependencies.hyper]
   41         -
version = "0.14.12"
          45  +
version = "1"
   42     46   
[dev-dependencies.pretty_assertions]
   43     47   
version = "1.3.0"
   44     48   
[dev-dependencies.tokio]
   45     49   
version = "1.23.1"
   46     50   
features = ["macros", "test-util", "rt-multi-thread"]
   47     51   
[dev-dependencies.tracing-test]
   48     52   
version = "0.2.5"
   49     53   
features = ["no-env-filter"]
   50     54   
[features]
   51     55   
rt-tokio = ["aws-smithy-types/rt-tokio"]

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/src/lib.rs

@@ -19,19 +128,131 @@
   39     39   
)]
   40     40   
//! The [`crate::input`], [`crate::output`], and [`crate::error`]
   41     41   
//! modules provide the types used in each operation.
   42     42   
//!
   43     43   
//! ### Running on Hyper
   44     44   
//!
   45     45   
//! ```rust,no_run
   46     46   
//! # use std::net::SocketAddr;
   47     47   
//! # async fn dummy() {
   48     48   
//! use json_rpc10::{JsonRpc10, JsonRpc10Config};
          49  +
//! use json_rpc10::serve;
          50  +
//! use ::tokio::net::TcpListener;
   49     51   
//!
   50     52   
//! # let app = JsonRpc10::builder(
   51     53   
//! #     JsonRpc10Config::builder()
   52     54   
//! #         .build()
   53     55   
//! # ).build_unchecked();
   54         -
//! let server = app.into_make_service();
   55     56   
//! let bind: SocketAddr = "127.0.0.1:6969".parse()
   56     57   
//!     .expect("unable to parse the server bind address and port");
   57         -
//! ::hyper::Server::bind(&bind).serve(server).await.unwrap();
          58  +
//! let listener = TcpListener::bind(bind).await
          59  +
//!     .expect("failed to bind TCP listener");
          60  +
//! serve(listener, app.into_make_service()).await.unwrap();
   58     61   
//! # }
   59     62   
//! ```
   60     63   
//!
   61     64   
//! ### Running on Lambda
   62     65   
//!
   63     66   
//! ```rust,ignore
   64     67   
//! use json_rpc10::server::routing::LambdaHandler;
   65     68   
//! use json_rpc10::JsonRpc10;
   66     69   
//!
   67     70   
//! # async fn dummy() {
   68     71   
//! # let app = JsonRpc10::builder(
   69     72   
//! #     JsonRpc10Config::builder()
   70     73   
//! #         .build()
   71     74   
//! # ).build_unchecked();
   72     75   
//! let handler = LambdaHandler::new(app);
   73     76   
//! lambda_http::run(handler).await.unwrap();
   74     77   
//! # }
   75     78   
//! ```
   76     79   
//!
   77     80   
//! # Building the JsonRpc10
   78     81   
//!
   79     82   
//! To construct [`JsonRpc10`] we use [`JsonRpc10Builder`] returned by [`JsonRpc10::builder`].
   80     83   
//!
   81     84   
//! ## Plugins
   82     85   
//!
   83     86   
//! The [`JsonRpc10::builder`] method, returning [`JsonRpc10Builder`],
   84     87   
//! accepts a config object on which plugins can be registered.
   85     88   
//! Plugins allow you to build middleware which is aware of the operation it is being applied to.
   86     89   
//!
   87     90   
//! ```rust,no_run
   88     91   
//! # use json_rpc10::server::plugin::IdentityPlugin as LoggingPlugin;
   89     92   
//! # use json_rpc10::server::plugin::IdentityPlugin as MetricsPlugin;
   90         -
//! # use ::hyper::Body;
          93  +
//! # use ::hyper::body::Incoming;
   91     94   
//! use json_rpc10::server::plugin::HttpPlugins;
   92     95   
//! use json_rpc10::{JsonRpc10, JsonRpc10Config, JsonRpc10Builder};
   93     96   
//!
   94     97   
//! let http_plugins = HttpPlugins::new()
   95     98   
//!         .push(LoggingPlugin)
   96     99   
//!         .push(MetricsPlugin);
   97    100   
//! let config = JsonRpc10Config::builder().build();
   98         -
//! let builder: JsonRpc10Builder<Body, _, _, _> = JsonRpc10::builder(config);
         101  +
//! let builder: JsonRpc10Builder<::hyper::body::Incoming, _, _, _> = JsonRpc10::builder(config);
   99    102   
//! ```
  100    103   
//!
  101    104   
//! Check out [`crate::server::plugin`] to learn more about plugins.
  102    105   
//!
  103    106   
//! ## Handlers
  104    107   
//!
  105    108   
//! [`JsonRpc10Builder`] provides a setter method for each operation in your Smithy model. The setter methods expect an async function as input, matching the signature for the corresponding operation in your Smithy model.
  106    109   
//! We call these async functions **handlers**. This is where your application business logic lives.
  107    110   
//!
  108    111   
//! Every handler must take an `Input`, and optional [`extractor arguments`](crate::server::request), while returning:
@@ -135,138 +225,231 @@
  155    158   
//! [`JsonRpc10Builder::build`] requires you to provide a handler for every single operation in your Smithy model. It will return an error if that is not the case.
  156    159   
//!
  157    160   
//! [`JsonRpc10Builder::build_unchecked`], instead, does not require exhaustiveness. The server will automatically return 500 Internal Server Error to all requests for operations that do not have a registered handler.
  158    161   
//! [`JsonRpc10Builder::build_unchecked`] is particularly useful if you are deploying your Smithy service as a collection of Lambda functions, where each Lambda is only responsible for a subset of the operations in the Smithy service (or even a single one!).
  159    162   
//!
  160    163   
//! # Example
  161    164   
//!
  162    165   
//! ```rust,no_run
  163    166   
//! # use std::net::SocketAddr;
  164    167   
//! use json_rpc10::{JsonRpc10, JsonRpc10Config};
         168  +
//! use json_rpc10::serve;
         169  +
//! use ::tokio::net::TcpListener;
  165    170   
//!
  166    171   
//! #[::tokio::main]
  167    172   
//! pub async fn main() {
  168    173   
//!    let config = JsonRpc10Config::builder().build();
  169    174   
//!    let app = JsonRpc10::builder(config)
  170    175   
//!        .content_type_parameters(content_type_parameters)
  171    176   
//!        .empty_input_and_empty_output(empty_input_and_empty_output)
  172    177   
//!        .endpoint_operation(endpoint_operation)
  173    178   
//!        .endpoint_with_host_label_operation(endpoint_with_host_label_operation)
  174    179   
//!        .greeting_with_errors(greeting_with_errors)
  175    180   
//!        .host_with_path_operation(host_with_path_operation)
  176    181   
//!        .json_unions(json_unions)
  177    182   
//!        .no_input_and_no_output(no_input_and_no_output)
  178    183   
//!        .no_input_and_output(no_input_and_output)
  179    184   
//!        .operation_with_defaults(operation_with_defaults)
  180    185   
//!        .operation_with_nested_structure(operation_with_nested_structure)
  181    186   
//!        .operation_with_required_members(operation_with_required_members)
  182    187   
//!        .operation_with_required_members_with_defaults(operation_with_required_members_with_defaults)
  183    188   
//!        .put_with_content_encoding(put_with_content_encoding)
  184    189   
//!        .query_incompatible_operation(query_incompatible_operation)
  185    190   
//!        .simple_scalar_properties(simple_scalar_properties)
  186    191   
//!        .build()
  187    192   
//!        .expect("failed to build an instance of JsonRpc10");
  188    193   
//!
  189    194   
//!    let bind: SocketAddr = "127.0.0.1:6969".parse()
  190    195   
//!        .expect("unable to parse the server bind address and port");
  191         -
//!    let server = ::hyper::Server::bind(&bind).serve(app.into_make_service());
         196  +
//!    let listener = TcpListener::bind(bind).await
         197  +
//!        .expect("failed to bind TCP listener");
  192    198   
//!    # let server = async { Ok::<_, ()>(()) };
  193    199   
//!
  194    200   
//!    // Run your service!
  195         -
//!    if let Err(err) = server.await {
         201  +
//!    if let Err(err) = serve(listener, app.into_make_service()).await {
  196    202   
//!        eprintln!("server error: {:?}", err);
  197    203   
//!    }
  198    204   
//! }
  199    205   
//!
  200    206   
//! use json_rpc10::{input, output, error};
  201    207   
//!
  202    208   
//! async fn content_type_parameters(input: input::ContentTypeParametersInput) -> output::ContentTypeParametersOutput {
  203    209   
//!     todo!()
  204    210   
//! }
  205    211   
//!
@@ -238,244 +303,310 @@
  258    264   
//! async fn query_incompatible_operation(input: input::QueryIncompatibleOperationInput) -> output::QueryIncompatibleOperationOutput {
  259    265   
//!     todo!()
  260    266   
//! }
  261    267   
//!
  262    268   
//! async fn simple_scalar_properties(input: input::SimpleScalarPropertiesInput) -> output::SimpleScalarPropertiesOutput {
  263    269   
//!     todo!()
  264    270   
//! }
  265    271   
//!
  266    272   
//! ```
  267    273   
//!
  268         -
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
         274  +
//! [`serve`]: crate::serve
         275  +
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  269    276   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  270    277   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  271    278   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  272         -
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  273    279   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
         280  +
pub use crate::server::serve::serve;
  274    281   
pub use crate::service::{
  275    282   
    JsonRpc10, JsonRpc10Builder, JsonRpc10Config, JsonRpc10ConfigBuilder, MissingOperationsError,
  276    283   
};
  277    284   
  278    285   
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  279    286   
pub mod server {
  280    287   
    // Re-export all types from the `aws-smithy-http-server` crate.
  281    288   
    pub use ::aws_smithy_http_server::*;
  282    289   
}
  283    290   

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/src/operation.rs

@@ -11,11 +135,140 @@
   31     31   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35     35   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   36     36   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38     38   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
   39     39   
    type Future = QueryIncompatibleOperationInputFuture;
   40     40   
   41         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
          41  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
   42     42   
        let fut = async move {
   43     43   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   44     44   
                request.headers(),
   45     45   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
   46     46   
            ) {
   47     47   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
   48     48   
            }
   49     49   
            crate::protocol_serde::shape_query_incompatible_operation::de_query_incompatible_operation_http_request(request)
   50     50   
                            .await
   51     51   
        };
   52     52   
        use ::futures_util::future::TryFutureExt;
   53     53   
        let fut = fut.map_err(
   54     54   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
   55     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   56     56   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
   57     57   
            },
   58     58   
        );
   59     59   
        QueryIncompatibleOperationInputFuture {
   60     60   
            inner: Box::pin(fut),
   61     61   
        }
   62     62   
    }
   63     63   
}
   64     64   
impl
   65     65   
    ::aws_smithy_http_server::response::IntoResponse<
   66     66   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
   67     67   
    > for crate::output::QueryIncompatibleOperationOutput
   68     68   
{
   69     69   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   70     70   
        match crate::protocol_serde::shape_query_incompatible_operation::ser_query_incompatible_operation_http_response(self) {
   71     71   
                        Ok(response) => response,
   72     72   
                        Err(e) => {
   73     73   
                            ::tracing::error!(error = %e, "failed to serialize response");
   74     74   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
   75     75   
                        }
   76     76   
                    }
   77     77   
    }
   78     78   
}
   79     79   
   80     80   
#[allow(unreachable_code, unused_variables)]
   81     81   
#[cfg(test)]
   82     82   
mod query_incompatible_operation_test {
   83     83   
   84     84   
    /// The query mode header MUST NOT be set on non-query-compatible services.
   85     85   
    /// Test ID: NonQueryCompatibleAwsJson10ForbidsQueryModeHeader
   86     86   
    #[::tokio::test]
   87     87   
    #[::tracing_test::traced_test]
   88     88   
    async fn non_query_compatible_aws_json10_forbids_query_mode_header_request() {
   89     89   
        #[allow(unused_mut)]
   90         -
        let mut http_request = http::Request::builder()
          90  +
        let mut http_request = ::http_1x::Request::builder()
   91     91   
            .uri("/")
   92     92   
            .method("POST")
   93     93   
            .header("Content-Type", "application/x-amz-json-1.0")
   94     94   
            .header("X-Amz-Target", "JsonRpc10.QueryIncompatibleOperation")
   95         -
            .body(::aws_smithy_http_server::body::Body::from(
   96         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
   97         -
                    "{}".as_bytes(),
   98         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
          95  +
            .body(::aws_smithy_http_server::body::boxed(
          96  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
          97  +
                    &::aws_smithy_protocol_test::decode_body_data(
          98  +
                        "{}".as_bytes(),
          99  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
         100  +
                    ),
   99    101   
                )),
  100    102   
            ))
  101    103   
            .unwrap();
  102    104   
        #[allow(unused_mut)]
  103    105   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  104    106   
        let config = crate::service::JsonRpc10Config::builder().build();
  105         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
         107  +
        let service =
         108  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
         109  +
                config,
         110  +
            )
  106    111   
            .query_incompatible_operation(
  107    112   
                move |input: crate::input::QueryIncompatibleOperationInput| {
  108    113   
                    let sender = sender.clone();
  109    114   
                    async move {
  110    115   
                        let result = {
  111    116   
                            let expected = crate::input::QueryIncompatibleOperationInput {};
  112    117   
                            ::pretty_assertions::assert_eq!(input, expected);
  113    118   
                            let output = crate::output::QueryIncompatibleOperationOutput {};
  114    119   
                            output
  115    120   
                        };
@@ -141,146 +201,206 @@
  161    166   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  162    167   
    B: 'static,
  163    168   
  164    169   
    B::Data: Send,
  165    170   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  166    171   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  167    172   
{
  168    173   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  169    174   
    type Future = OperationWithRequiredMembersWithDefaultsInputFuture;
  170    175   
  171         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
         176  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  172    177   
        let fut = async move {
  173    178   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  174    179   
                request.headers(),
  175    180   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  176    181   
            ) {
  177    182   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  178    183   
            }
  179    184   
            crate::protocol_serde::shape_operation_with_required_members_with_defaults::de_operation_with_required_members_with_defaults_http_request(request)
  180    185   
                            .await
  181    186   
        };
@@ -219,224 +279,284 @@
  239    244   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  240    245   
    B: 'static,
  241    246   
  242    247   
    B::Data: Send,
  243    248   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  244    249   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  245    250   
{
  246    251   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  247    252   
    type Future = OperationWithNestedStructureInputFuture;
  248    253   
  249         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
         254  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  250    255   
        let fut = async move {
  251    256   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  252    257   
                request.headers(),
  253    258   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  254    259   
            ) {
  255    260   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  256    261   
            }
  257    262   
            crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure_http_request(request)
  258    263   
                            .await
  259    264   
        };
@@ -287,292 +454,462 @@
  307    312   
#[cfg(test)]
  308    313   
mod operation_with_nested_structure_test {
  309    314   
  310    315   
    /// Server populates nested default values when missing in request body.
  311    316   
    /// Test ID: AwsJson10ServerPopulatesNestedDefaultsWhenMissingInRequestBody
  312    317   
    #[::tokio::test]
  313    318   
    #[::tracing_test::traced_test]
  314    319   
    #[should_panic]
  315    320   
    async fn aws_json10_server_populates_nested_defaults_when_missing_in_request_body_request() {
  316    321   
        #[allow(unused_mut)]
  317         -
                    let mut http_request = http::Request::builder()
         322  +
                    let mut http_request = ::http_1x::Request::builder()
  318    323   
                        .uri("/")
  319    324   
                        .method("POST")
  320    325   
        .header("Content-Type", "application/x-amz-json-1.0")
  321         -
        .body(::aws_smithy_http_server::body::Body::from(
  322         -
                                ::bytes::Bytes::copy_from_slice(
  323         -
                                    &::aws_smithy_protocol_test::decode_body_data("{\n    \"topLevel\": {\n        \"dialog\": {\n            \"language\": \"en\"\n        },\n        \"dialogList\": [\n            {\n            },\n            {\n                \"farewell\": {}\n            },\n            {\n                \"language\": \"it\",\n                \"greeting\": \"ciao\",\n                \"farewell\": {\n                    \"phrase\": \"arrivederci\"\n                }\n            }\n        ],\n        \"dialogMap\": {\n            \"emptyDialog\": {\n            },\n            \"partialEmptyDialog\": {\n                \"language\": \"en\",\n                \"farewell\": {}\n            },\n            \"nonEmptyDialog\": {\n                \"greeting\": \"konnichiwa\",\n                \"farewell\": {\n                    \"phrase\": \"sayonara\"\n                }\n            }\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
  324         -
                                )
  325         -
                                )).unwrap();
         326  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
         327  +
                        ::bytes::Bytes::copy_from_slice(
         328  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"topLevel\": {\n        \"dialog\": {\n            \"language\": \"en\"\n        },\n        \"dialogList\": [\n            {\n            },\n            {\n                \"farewell\": {}\n            },\n            {\n                \"language\": \"it\",\n                \"greeting\": \"ciao\",\n                \"farewell\": {\n                    \"phrase\": \"arrivederci\"\n                }\n            }\n        ],\n        \"dialogMap\": {\n            \"emptyDialog\": {\n            },\n            \"partialEmptyDialog\": {\n                \"language\": \"en\",\n                \"farewell\": {}\n            },\n            \"nonEmptyDialog\": {\n                \"greeting\": \"konnichiwa\",\n                \"farewell\": {\n                    \"phrase\": \"sayonara\"\n                }\n            }\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
         329  +
                        )
         330  +
                        ))).unwrap();
  326    331   
        #[allow(unused_mut)]
  327    332   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  328    333   
        let config = crate::service::JsonRpc10Config::builder().build();
  329         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
  330         -
            .operation_with_nested_structure(
  331         -
                move |input: crate::input::OperationWithNestedStructureInput| {
  332         -
                    let sender = sender.clone();
  333         -
                    async move {
  334         -
                        let result = {
  335         -
                            let expected = crate::input::OperationWithNestedStructureInput {
  336         -
                                top_level: crate::model::TopLevel {
  337         -
                                    dialog: crate::model::Dialog {
  338         -
                                        language: ::std::option::Option::Some("en".to_owned()),
         334  +
        let service = crate::service::JsonRpc10::builder::<
         335  +
            ::aws_smithy_http_server::body::BoxBody,
         336  +
            _,
         337  +
            _,
         338  +
            _,
         339  +
        >(config)
         340  +
        .operation_with_nested_structure(
         341  +
            move |input: crate::input::OperationWithNestedStructureInput| {
         342  +
                let sender = sender.clone();
         343  +
                async move {
         344  +
                    let result = {
         345  +
                        let expected = crate::input::OperationWithNestedStructureInput {
         346  +
                            top_level: crate::model::TopLevel {
         347  +
                                dialog: crate::model::Dialog {
         348  +
                                    language: ::std::option::Option::Some("en".to_owned()),
         349  +
                                    greeting: "hi".to_owned(),
         350  +
                                    farewell: ::std::option::Option::None,
         351  +
                                },
         352  +
                                dialog_list: vec![
         353  +
                                    crate::model::Dialog {
  339    354   
                                        greeting: "hi".to_owned(),
         355  +
                                        language: ::std::option::Option::None,
  340    356   
                                        farewell: ::std::option::Option::None,
  341    357   
                                    },
  342         -
                                    dialog_list: vec![
         358  +
                                    crate::model::Dialog {
         359  +
                                        greeting: "hi".to_owned(),
         360  +
                                        farewell: ::std::option::Option::Some(
         361  +
                                            crate::model::Farewell {
         362  +
                                                phrase: "bye".to_owned(),
         363  +
                                            },
         364  +
                                        ),
         365  +
                                        language: ::std::option::Option::None,
         366  +
                                    },
         367  +
                                    crate::model::Dialog {
         368  +
                                        language: ::std::option::Option::Some("it".to_owned()),
         369  +
                                        greeting: "ciao".to_owned(),
         370  +
                                        farewell: ::std::option::Option::Some(
         371  +
                                            crate::model::Farewell {
         372  +
                                                phrase: "arrivederci".to_owned(),
         373  +
                                            },
         374  +
                                        ),
         375  +
                                    },
         376  +
                                ],
         377  +
                                dialog_map: {
         378  +
                                    let mut ret = ::std::collections::HashMap::new();
         379  +
                                    ret.insert(
         380  +
                                        "emptyDialog".to_owned(),
  343    381   
                                        crate::model::Dialog {
  344    382   
                                            greeting: "hi".to_owned(),
  345    383   
                                            language: ::std::option::Option::None,
  346    384   
                                            farewell: ::std::option::Option::None,
  347    385   
                                        },
         386  +
                                    );
         387  +
                                    ret.insert(
         388  +
                                        "partialEmptyDialog".to_owned(),
  348    389   
                                        crate::model::Dialog {
         390  +
                                            language: ::std::option::Option::Some("en".to_owned()),
  349    391   
                                            greeting: "hi".to_owned(),
  350    392   
                                            farewell: ::std::option::Option::Some(
  351    393   
                                                crate::model::Farewell {
  352    394   
                                                    phrase: "bye".to_owned(),
  353    395   
                                                },
  354    396   
                                            ),
  355         -
                                            language: ::std::option::Option::None,
  356    397   
                                        },
         398  +
                                    );
         399  +
                                    ret.insert(
         400  +
                                        "nonEmptyDialog".to_owned(),
  357    401   
                                        crate::model::Dialog {
  358         -
                                            language: ::std::option::Option::Some("it".to_owned()),
  359         -
                                            greeting: "ciao".to_owned(),
         402  +
                                            greeting: "konnichiwa".to_owned(),
  360    403   
                                            farewell: ::std::option::Option::Some(
  361    404   
                                                crate::model::Farewell {
  362         -
                                                    phrase: "arrivederci".to_owned(),
         405  +
                                                    phrase: "sayonara".to_owned(),
  363    406   
                                                },
  364    407   
                                            ),
         408  +
                                            language: ::std::option::Option::None,
  365    409   
                                        },
  366         -
                                    ],
  367         -
                                    dialog_map: {
  368         -
                                        let mut ret = ::std::collections::HashMap::new();
  369         -
                                        ret.insert(
  370         -
                                            "emptyDialog".to_owned(),
  371         -
                                            crate::model::Dialog {
  372         -
                                                greeting: "hi".to_owned(),
  373         -
                                                language: ::std::option::Option::None,
  374         -
                                                farewell: ::std::option::Option::None,
  375         -
                                            },
  376         -
                                        );
  377         -
                                        ret.insert(
  378         -
                                            "partialEmptyDialog".to_owned(),
  379         -
                                            crate::model::Dialog {
  380         -
                                                language: ::std::option::Option::Some(
  381         -
                                                    "en".to_owned(),
  382         -
                                                ),
  383         -
                                                greeting: "hi".to_owned(),
  384         -
                                                farewell: ::std::option::Option::Some(
  385         -
                                                    crate::model::Farewell {
  386         -
                                                        phrase: "bye".to_owned(),
  387         -
                                                    },
  388         -
                                                ),
  389         -
                                            },
  390         -
                                        );
  391         -
                                        ret.insert(
  392         -
                                            "nonEmptyDialog".to_owned(),
  393         -
                                            crate::model::Dialog {
  394         -
                                                greeting: "konnichiwa".to_owned(),
  395         -
                                                farewell: ::std::option::Option::Some(
  396         -
                                                    crate::model::Farewell {
  397         -
                                                        phrase: "sayonara".to_owned(),
  398         -
                                                    },
  399         -
                                                ),
  400         -
                                                language: ::std::option::Option::None,
  401         -
                                            },
  402         -
                                        );
  403         -
                                        ret
  404         -
                                    },
  405         -
                                },
  406         -
                            };
  407         -
                            ::pretty_assertions::assert_eq!(input, expected);
  408         -
                            let output = crate::output::OperationWithNestedStructureOutput {
  409         -
                                dialog: crate::model::Dialog {
  410         -
                                    greeting: "".to_owned(),
  411         -
                                    language: ::std::option::Option::None,
  412         -
                                    farewell: ::std::option::Option::None,
         410  +
                                    );
         411  +
                                    ret
  413    412   
                                },
  414         -
                                dialog_list: vec![],
  415         -
                                dialog_map: ::std::collections::HashMap::new(),
  416         -
                            };
  417         -
                            Ok(output)
         413  +
                            },
  418    414   
                        };
  419         -
                        sender.send(()).await.expect("receiver dropped early");
  420         -
                        result
  421         -
                    }
  422         -
                },
  423         -
            )
  424         -
            .build_unchecked();
         415  +
                        ::pretty_assertions::assert_eq!(input, expected);
         416  +
                        let output = crate::output::OperationWithNestedStructureOutput {
         417  +
                            dialog: crate::model::Dialog {
         418  +
                                greeting: "".to_owned(),
         419  +
                                language: ::std::option::Option::None,
         420  +
                                farewell: ::std::option::Option::None,
         421  +
                            },
         422  +
                            dialog_list: vec![],
         423  +
                            dialog_map: ::std::collections::HashMap::new(),
         424  +
                        };
         425  +
                        Ok(output)
         426  +
                    };
         427  +
                    sender.send(()).await.expect("receiver dropped early");
         428  +
                    result
         429  +
                }
         430  +
            },
         431  +
        )
         432  +
        .build_unchecked();
  425    433   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
  426    434   
            .await
  427    435   
            .expect("unable to make an HTTP request");
  428    436   
        assert!(
  429    437   
            receiver.recv().await.is_some(),
  430    438   
            "we expected operation handler to be invoked but it was not entered"
  431    439   
        );
  432    440   
    }
  433    441   
  434    442   
    /// Server populates nested default values when missing in response params.
@@ -474,482 +590,602 @@
  494    502   
                        }),
  495    503   
                        language: ::std::option::Option::None,
  496    504   
                    },
  497    505   
                );
  498    506   
                ret
  499    507   
            },
  500    508   
        };
  501    509   
        use ::aws_smithy_http_server::response::IntoResponse;
  502    510   
        let http_response = output.into_response();
  503    511   
        ::pretty_assertions::assert_eq!(
  504         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
         512  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
  505    513   
            http_response.status()
  506    514   
        );
  507    515   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
  508    516   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  509    517   
            http_response.headers(),
  510    518   
            expected_headers,
  511    519   
        ));
  512         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
         520  +
        use ::http_body_util::BodyExt;
         521  +
        let body = http_response
         522  +
            .into_body()
         523  +
            .collect()
  513    524   
            .await
  514         -
            .expect("unable to extract body to bytes");
         525  +
            .expect("unable to collect body")
         526  +
            .to_bytes();
  515    527   
        ::aws_smithy_protocol_test::assert_ok(
  516    528   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"dialog\": {\n        \"language\": \"en\",\n        \"greeting\": \"hi\"\n    },\n    \"dialogList\": [\n        {\n            \"greeting\": \"hi\"\n        },\n        {\n            \"greeting\": \"hi\",\n            \"farewell\": {\n                \"phrase\": \"bye\"\n            }\n        },\n        {\n            \"language\": \"it\",\n            \"greeting\": \"ciao\",\n            \"farewell\": {\n                \"phrase\": \"arrivederci\"\n            }\n        }\n    ],\n    \"dialogMap\": {\n        \"emptyDialog\": {\n            \"greeting\": \"hi\"\n        },\n        \"partialEmptyDialog\": {\n            \"language\": \"en\",\n            \"greeting\": \"hi\",\n            \"farewell\": {\n                \"phrase\": \"bye\"\n            }\n        },\n        \"nonEmptyDialog\": {\n            \"greeting\": \"konnichiwa\",\n            \"farewell\": {\n                \"phrase\": \"sayonara\"\n            }\n        }\n    }\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
  517    529   
        );
  518    530   
    }
  519    531   
}
  520    532   
  521    533   
::pin_project_lite::pin_project! {
  522    534   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  523    535   
    /// [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput) using modelled bindings.
  524    536   
    pub struct OperationWithRequiredMembersInputFuture {
  525    537   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OperationWithRequiredMembersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  526    538   
    }
  527    539   
}
  528    540   
  529    541   
impl std::future::Future for OperationWithRequiredMembersInputFuture {
  530    542   
    type Output = Result<
  531    543   
        crate::input::OperationWithRequiredMembersInput,
  532    544   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  533    545   
    >;
  534    546   
  535    547   
    fn poll(
  536    548   
        self: std::pin::Pin<&mut Self>,
  537    549   
        cx: &mut std::task::Context<'_>,
  538    550   
    ) -> std::task::Poll<Self::Output> {
  539    551   
        let this = self.project();
  540    552   
        this.inner.as_mut().poll(cx)
  541    553   
    }
  542    554   
}
  543    555   
  544    556   
impl<B>
  545    557   
    ::aws_smithy_http_server::request::FromRequest<
  546    558   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  547    559   
        B,
  548    560   
    > for crate::input::OperationWithRequiredMembersInput
  549    561   
where
  550    562   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  551    563   
    B: 'static,
  552    564   
  553    565   
    B::Data: Send,
  554    566   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  555    567   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  556    568   
{
  557    569   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  558    570   
    type Future = OperationWithRequiredMembersInputFuture;
  559    571   
  560         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
         572  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  561    573   
        let fut = async move {
  562    574   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  563    575   
                request.headers(),
  564    576   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  565    577   
            ) {
  566    578   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  567    579   
            }
  568    580   
            crate::protocol_serde::shape_operation_with_required_members::de_operation_with_required_members_http_request(request)
  569    581   
                            .await
  570    582   
        };
@@ -608,620 +668,680 @@
  628    640   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  629    641   
    B: 'static,
  630    642   
  631    643   
    B::Data: Send,
  632    644   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  633    645   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  634    646   
{
  635    647   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  636    648   
    type Future = OperationWithDefaultsInputFuture;
  637    649   
  638         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
         650  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  639    651   
        let fut = async move {
  640    652   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  641    653   
                request.headers(),
  642    654   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  643    655   
            ) {
  644    656   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  645    657   
            }
  646    658   
            crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults_http_request(request)
  647    659   
                            .await
  648    660   
        };
@@ -676,688 +914,924 @@
  696    708   
#[cfg(test)]
  697    709   
mod operation_with_defaults_test {
  698    710   
  699    711   
    /// Server populates default values when missing in request body.
  700    712   
    /// Test ID: AwsJson10ServerPopulatesDefaultsWhenMissingInRequestBody
  701    713   
    #[::tokio::test]
  702    714   
    #[::tracing_test::traced_test]
  703    715   
    #[should_panic]
  704    716   
    async fn aws_json10_server_populates_defaults_when_missing_in_request_body_request() {
  705    717   
        #[allow(unused_mut)]
  706         -
        let mut http_request = http::Request::builder()
         718  +
        let mut http_request = ::http_1x::Request::builder()
  707    719   
            .uri("/")
  708    720   
            .method("POST")
  709    721   
            .header("Content-Type", "application/x-amz-json-1.0")
  710         -
            .body(::aws_smithy_http_server::body::Body::from(
  711         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  712         -
                    "{\n\"defaults\": {}\n}".as_bytes(),
  713         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
         722  +
            .body(::aws_smithy_http_server::body::boxed(
         723  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
         724  +
                    &::aws_smithy_protocol_test::decode_body_data(
         725  +
                        "{\n\"defaults\": {}\n}".as_bytes(),
         726  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
         727  +
                    ),
  714    728   
                )),
  715    729   
            ))
  716    730   
            .unwrap();
  717    731   
        #[allow(unused_mut)]
  718    732   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  719    733   
        let config = crate::service::JsonRpc10Config::builder().build();
  720         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
  721         -
            .operation_with_defaults(move |input: crate::input::OperationWithDefaultsInput| {
  722         -
                let sender = sender.clone();
  723         -
                async move {
  724         -
                    let result = {
  725         -
                        let expected = crate::input::OperationWithDefaultsInput {
  726         -
                            defaults: ::std::option::Option::Some(crate::model::Defaults {
  727         -
                                default_string: "hi".to_owned(),
  728         -
                                default_boolean: true,
  729         -
                                default_list: vec![],
  730         -
                                default_document_map: {
  731         -
                                    let json_bytes = br#"{}"#;
  732         -
                                    let mut tokens =
  733         -
                                        ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  734         -
                                            .peekable();
  735         -
                                    ::aws_smithy_json::deserialize::token::expect_document(
  736         -
                                        &mut tokens,
  737         -
                                    )
  738         -
                                    .expect("well formed json")
  739         -
                                },
  740         -
                                default_document_string: {
  741         -
                                    let json_bytes = br#""hi""#;
  742         -
                                    let mut tokens =
  743         -
                                        ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  744         -
                                            .peekable();
  745         -
                                    ::aws_smithy_json::deserialize::token::expect_document(
  746         -
                                        &mut tokens,
  747         -
                                    )
  748         -
                                    .expect("well formed json")
  749         -
                                },
  750         -
                                default_document_boolean: {
  751         -
                                    let json_bytes = br#"true"#;
  752         -
                                    let mut tokens =
  753         -
                                        ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  754         -
                                            .peekable();
  755         -
                                    ::aws_smithy_json::deserialize::token::expect_document(
  756         -
                                        &mut tokens,
  757         -
                                    )
  758         -
                                    .expect("well formed json")
  759         -
                                },
  760         -
                                default_document_list: {
  761         -
                                    let json_bytes = br#"[]"#;
  762         -
                                    let mut tokens =
  763         -
                                        ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  764         -
                                            .peekable();
  765         -
                                    ::aws_smithy_json::deserialize::token::expect_document(
  766         -
                                        &mut tokens,
  767         -
                                    )
  768         -
                                    .expect("well formed json")
  769         -
                                },
  770         -
                                default_timestamp:
  771         -
                                    ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
  772         -
                                default_blob: ::aws_smithy_types::Blob::new("abc"),
  773         -
                                default_byte: 1,
  774         -
                                default_short: 1,
  775         -
                                default_integer: 10,
  776         -
                                default_long: 100,
  777         -
                                default_float: 1.0_f32,
  778         -
                                default_double: 1.0_f64,
  779         -
                                default_map: ::std::collections::HashMap::new(),
  780         -
                                default_enum: "FOO"
  781         -
                                    .parse::<crate::model::TestEnum>()
  782         -
                                    .expect("static value validated to member"),
  783         -
                                default_int_enum: 1,
  784         -
                                empty_string: "".to_owned(),
  785         -
                                false_boolean: false,
  786         -
                                empty_blob: ::aws_smithy_types::Blob::new(""),
  787         -
                                zero_byte: 0,
  788         -
                                zero_short: 0,
  789         -
                                zero_integer: 0,
  790         -
                                zero_long: 0,
  791         -
                                zero_float: 0.0_f32,
  792         -
                                zero_double: 0.0_f64,
  793         -
                                default_null_document: ::std::option::Option::Some({
  794         -
                                    let json_bytes = br#"null"#;
  795         -
                                    let mut tokens =
  796         -
                                        ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  797         -
                                            .peekable();
  798         -
                                    ::aws_smithy_json::deserialize::token::expect_document(
  799         -
                                        &mut tokens,
  800         -
                                    )
  801         -
                                    .expect("well formed json")
  802         -
                                }),
  803         -
                            }),
  804         -
                            top_level_default: "hi".to_owned(),
  805         -
                            other_top_level_default: 0,
  806         -
                            client_optional_defaults: ::std::option::Option::None,
  807         -
                        };
  808         -
                        ::pretty_assertions::assert_eq!(input, expected);
  809         -
                        let output = crate::output::OperationWithDefaultsOutput {
  810         -
                            default_string: "".to_owned(),
  811         -
                            default_boolean: false,
         734  +
        let service = crate::service::JsonRpc10::builder::<
         735  +
            ::aws_smithy_http_server::body::BoxBody,
         736  +
            _,
         737  +
            _,
         738  +
            _,
         739  +
        >(config)
         740  +
        .operation_with_defaults(move |input: crate::input::OperationWithDefaultsInput| {
         741  +
            let sender = sender.clone();
         742  +
            async move {
         743  +
                let result = {
         744  +
                    let expected = crate::input::OperationWithDefaultsInput {
         745  +
                        defaults: ::std::option::Option::Some(crate::model::Defaults {
         746  +
                            default_string: "hi".to_owned(),
         747  +
                            default_boolean: true,
  812    748   
                            default_list: vec![],
  813    749   
                            default_document_map: {
  814    750   
                                let json_bytes = br#"{}"#;
  815    751   
                                let mut tokens =
  816    752   
                                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  817    753   
                                        .peekable();
  818    754   
                                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  819    755   
                                    .expect("well formed json")
  820    756   
                            },
  821    757   
                            default_document_string: {
  822         -
                                let json_bytes = br#"{}"#;
         758  +
                                let json_bytes = br#""hi""#;
  823    759   
                                let mut tokens =
  824    760   
                                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  825    761   
                                        .peekable();
  826    762   
                                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  827    763   
                                    .expect("well formed json")
  828    764   
                            },
  829    765   
                            default_document_boolean: {
  830         -
                                let json_bytes = br#"{}"#;
         766  +
                                let json_bytes = br#"true"#;
  831    767   
                                let mut tokens =
  832    768   
                                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  833    769   
                                        .peekable();
  834    770   
                                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  835    771   
                                    .expect("well formed json")
  836    772   
                            },
  837    773   
                            default_document_list: {
  838         -
                                let json_bytes = br#"{}"#;
         774  +
                                let json_bytes = br#"[]"#;
  839    775   
                                let mut tokens =
  840    776   
                                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  841    777   
                                        .peekable();
  842    778   
                                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  843    779   
                                    .expect("well formed json")
  844    780   
                            },
  845    781   
                            default_timestamp: ::aws_smithy_types::DateTime::from_fractional_secs(
  846    782   
                                0, 0_f64,
  847    783   
                            ),
  848         -
                            default_blob: ::aws_smithy_types::Blob::new(""),
  849         -
                            default_byte: 0,
  850         -
                            default_short: 0,
  851         -
                            default_integer: 0,
  852         -
                            default_long: 0,
  853         -
                            default_float: 0_f32,
  854         -
                            default_double: 0_f64,
         784  +
                            default_blob: ::aws_smithy_types::Blob::new("abc"),
         785  +
                            default_byte: 1,
         786  +
                            default_short: 1,
         787  +
                            default_integer: 10,
         788  +
                            default_long: 100,
         789  +
                            default_float: 1.0_f32,
         790  +
                            default_double: 1.0_f64,
  855    791   
                            default_map: ::std::collections::HashMap::new(),
  856         -
                            default_enum: ""
         792  +
                            default_enum: "FOO"
  857    793   
                                .parse::<crate::model::TestEnum>()
  858    794   
                                .expect("static value validated to member"),
  859         -
                            default_int_enum: 0,
         795  +
                            default_int_enum: 1,
  860    796   
                            empty_string: "".to_owned(),
  861    797   
                            false_boolean: false,
  862    798   
                            empty_blob: ::aws_smithy_types::Blob::new(""),
  863    799   
                            zero_byte: 0,
  864    800   
                            zero_short: 0,
  865    801   
                            zero_integer: 0,
  866    802   
                            zero_long: 0,
  867         -
                            zero_float: 0_f32,
  868         -
                            zero_double: 0_f64,
         803  +
                            zero_float: 0.0_f32,
         804  +
                            zero_double: 0.0_f64,
  869    805   
                            default_null_document: ::std::option::Option::Some({
  870    806   
                                let json_bytes = br#"null"#;
  871    807   
                                let mut tokens =
  872    808   
                                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
  873    809   
                                        .peekable();
  874    810   
                                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  875    811   
                                    .expect("well formed json")
  876    812   
                            }),
  877         -
                        };
  878         -
                        Ok(output)
         813  +
                        }),
         814  +
                        top_level_default: "hi".to_owned(),
         815  +
                        other_top_level_default: 0,
         816  +
                        client_optional_defaults: ::std::option::Option::None,
  879    817   
                    };
  880         -
                    sender.send(()).await.expect("receiver dropped early");
  881         -
                    result
  882         -
                }
  883         -
            })
  884         -
            .build_unchecked();
         818  +
                    ::pretty_assertions::assert_eq!(input, expected);
         819  +
                    let output = crate::output::OperationWithDefaultsOutput {
         820  +
                        default_string: "".to_owned(),
         821  +
                        default_boolean: false,
         822  +
                        default_list: vec![],
         823  +
                        default_document_map: {
         824  +
                            let json_bytes = br#"{}"#;
         825  +
                            let mut tokens =
         826  +
                                ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
         827  +
                                    .peekable();
         828  +
                            ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
         829  +
                                .expect("well formed json")
         830  +
                        },
         831  +
                        default_document_string: {
         832  +
                            let json_bytes = br#"{}"#;
         833  +
                            let mut tokens =
         834  +
                                ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
         835  +
                                    .peekable();
         836  +
                            ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
         837  +
                                .expect("well formed json")
         838  +
                        },
         839  +
                        default_document_boolean: {
         840  +
                            let json_bytes = br#"{}"#;
         841  +
                            let mut tokens =
         842  +
                                ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
         843  +
                                    .peekable();
         844  +
                            ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
         845  +
                                .expect("well formed json")
         846  +
                        },
         847  +
                        default_document_list: {
         848  +
                            let json_bytes = br#"{}"#;
         849  +
                            let mut tokens =
         850  +
                                ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
         851  +
                                    .peekable();
         852  +
                            ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
         853  +
                                .expect("well formed json")
         854  +
                        },
         855  +
                        default_timestamp: ::aws_smithy_types::DateTime::from_fractional_secs(
         856  +
                            0, 0_f64,
         857  +
                        ),
         858  +
                        default_blob: ::aws_smithy_types::Blob::new(""),
         859  +
                        default_byte: 0,
         860  +
                        default_short: 0,
         861  +
                        default_integer: 0,
         862  +
                        default_long: 0,
         863  +
                        default_float: 0_f32,
         864  +
                        default_double: 0_f64,
         865  +
                        default_map: ::std::collections::HashMap::new(),
         866  +
                        default_enum: ""
         867  +
                            .parse::<crate::model::TestEnum>()
         868  +
                            .expect("static value validated to member"),
         869  +
                        default_int_enum: 0,
         870  +
                        empty_string: "".to_owned(),
         871  +
                        false_boolean: false,
         872  +
                        empty_blob: ::aws_smithy_types::Blob::new(""),
         873  +
                        zero_byte: 0,
         874  +
                        zero_short: 0,
         875  +
                        zero_integer: 0,
         876  +
                        zero_long: 0,
         877  +
                        zero_float: 0_f32,
         878  +
                        zero_double: 0_f64,
         879  +
                        default_null_document: ::std::option::Option::Some({
         880  +
                            let json_bytes = br#"null"#;
         881  +
                            let mut tokens =
         882  +
                                ::aws_smithy_json::deserialize::json_token_iter(json_bytes)
         883  +
                                    .peekable();
         884  +
                            ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
         885  +
                                .expect("well formed json")
         886  +
                        }),
         887  +
                    };
         888  +
                    Ok(output)
         889  +
                };
         890  +
                sender.send(()).await.expect("receiver dropped early");
         891  +
                result
         892  +
            }
         893  +
        })
         894  +
        .build_unchecked();
  885    895   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
  886    896   
            .await
  887    897   
            .expect("unable to make an HTTP request");
  888    898   
        assert!(
  889    899   
            receiver.recv().await.is_some(),
  890    900   
            "we expected operation handler to be invoked but it was not entered"
  891    901   
        );
  892    902   
    }
  893    903   
  894    904   
    /// Server populates default values in response when missing in params.
@@ -935,945 +1115,1134 @@
  955    965   
                let json_bytes = br#"null"#;
  956    966   
                let mut tokens =
  957    967   
                    ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  958    968   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens)
  959    969   
                    .expect("well formed json")
  960    970   
            }),
  961    971   
        };
  962    972   
        use ::aws_smithy_http_server::response::IntoResponse;
  963    973   
        let http_response = output.into_response();
  964    974   
        ::pretty_assertions::assert_eq!(
  965         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
         975  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
  966    976   
            http_response.status()
  967    977   
        );
  968    978   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
  969    979   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  970    980   
            http_response.headers(),
  971    981   
            expected_headers,
  972    982   
        ));
  973         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
         983  +
        use ::http_body_util::BodyExt;
         984  +
        let body = http_response
         985  +
            .into_body()
         986  +
            .collect()
  974    987   
            .await
  975         -
            .expect("unable to extract body to bytes");
         988  +
            .expect("unable to collect body")
         989  +
            .to_bytes();
  976    990   
        ::aws_smithy_protocol_test::assert_ok(
  977    991   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"defaultString\": \"hi\",\n    \"defaultBoolean\": true,\n    \"defaultList\": [],\n    \"defaultDocumentMap\": {},\n    \"defaultDocumentString\": \"hi\",\n    \"defaultDocumentBoolean\": true,\n    \"defaultDocumentList\": [],\n    \"defaultTimestamp\": 0,\n    \"defaultBlob\": \"YWJj\",\n    \"defaultByte\": 1,\n    \"defaultShort\": 1,\n    \"defaultInteger\": 10,\n    \"defaultLong\": 100,\n    \"defaultFloat\": 1.0,\n    \"defaultDouble\": 1.0,\n    \"defaultMap\": {},\n    \"defaultEnum\": \"FOO\",\n    \"defaultIntEnum\": 1,\n    \"emptyString\": \"\",\n    \"falseBoolean\": false,\n    \"emptyBlob\": \"\",\n    \"zeroByte\": 0,\n    \"zeroShort\": 0,\n    \"zeroInteger\": 0,\n    \"zeroLong\": 0,\n    \"zeroFloat\": 0.0,\n    \"zeroDouble\": 0.0\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
  978    992   
        );
  979    993   
    }
  980    994   
}
  981    995   
  982    996   
::pin_project_lite::pin_project! {
  983    997   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  984    998   
    /// [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput) using modelled bindings.
  985    999   
    pub struct ContentTypeParametersInputFuture {
  986   1000   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ContentTypeParametersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  987   1001   
    }
  988   1002   
}
  989   1003   
  990   1004   
impl std::future::Future for ContentTypeParametersInputFuture {
  991   1005   
    type Output = Result<
  992   1006   
        crate::input::ContentTypeParametersInput,
  993   1007   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  994   1008   
    >;
  995   1009   
  996   1010   
    fn poll(
  997   1011   
        self: std::pin::Pin<&mut Self>,
  998   1012   
        cx: &mut std::task::Context<'_>,
  999   1013   
    ) -> std::task::Poll<Self::Output> {
 1000   1014   
        let this = self.project();
 1001   1015   
        this.inner.as_mut().poll(cx)
 1002   1016   
    }
 1003   1017   
}
 1004   1018   
 1005   1019   
impl<B>
 1006   1020   
    ::aws_smithy_http_server::request::FromRequest<
 1007   1021   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 1008   1022   
        B,
 1009   1023   
    > for crate::input::ContentTypeParametersInput
 1010   1024   
where
 1011   1025   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1012   1026   
    B: 'static,
 1013   1027   
 1014   1028   
    B::Data: Send,
 1015   1029   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1016   1030   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1017   1031   
{
 1018   1032   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1019   1033   
    type Future = ContentTypeParametersInputFuture;
 1020   1034   
 1021         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1035  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1022   1036   
        let fut = async move {
 1023   1037   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1024   1038   
                request.headers(),
 1025   1039   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1026   1040   
            ) {
 1027   1041   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1028   1042   
            }
 1029   1043   
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_request(request)
 1030   1044   
                            .await
 1031   1045   
        };
 1032   1046   
        use ::futures_util::future::TryFutureExt;
 1033   1047   
        let fut = fut.map_err(
 1034   1048   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 1035   1049   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1036   1050   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 1037   1051   
            },
 1038   1052   
        );
 1039   1053   
        ContentTypeParametersInputFuture {
 1040   1054   
            inner: Box::pin(fut),
 1041   1055   
        }
 1042   1056   
    }
 1043   1057   
}
 1044   1058   
impl
 1045   1059   
    ::aws_smithy_http_server::response::IntoResponse<
 1046   1060   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 1047   1061   
    > for crate::output::ContentTypeParametersOutput
 1048   1062   
{
 1049   1063   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1050   1064   
        match crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_http_response(self) {
 1051   1065   
                        Ok(response) => response,
 1052   1066   
                        Err(e) => {
 1053   1067   
                            ::tracing::error!(error = %e, "failed to serialize response");
 1054   1068   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
 1055   1069   
                        }
 1056   1070   
                    }
 1057   1071   
    }
 1058   1072   
}
 1059   1073   
 1060   1074   
#[allow(unreachable_code, unused_variables)]
 1061   1075   
#[cfg(test)]
 1062   1076   
mod content_type_parameters_test {
 1063   1077   
 1064   1078   
    /// A server should ignore parameters added to the content type
 1065   1079   
    /// Test ID: AwsJson10MustSupportParametersInContentType
 1066   1080   
    #[::tokio::test]
 1067   1081   
    #[::tracing_test::traced_test]
 1068   1082   
    async fn aws_json10_must_support_parameters_in_content_type_request() {
 1069   1083   
        #[allow(unused_mut)]
 1070         -
        let mut http_request = http::Request::builder()
        1084  +
        let mut http_request = ::http_1x::Request::builder()
 1071   1085   
            .uri("/")
 1072   1086   
            .method("POST")
 1073   1087   
            .header("Content-Type", "application/x-amz-json-1.0; charset=utf-8")
 1074   1088   
            .header("X-Amz-Target", "JsonRpc10.ContentTypeParameters")
 1075         -
            .body(::aws_smithy_http_server::body::Body::from(
 1076         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1077         -
                    "{\"value\":5}".as_bytes(),
 1078         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1089  +
            .body(::aws_smithy_http_server::body::boxed(
        1090  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1091  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1092  +
                        "{\"value\":5}".as_bytes(),
        1093  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1094  +
                    ),
 1079   1095   
                )),
 1080   1096   
            ))
 1081   1097   
            .unwrap();
 1082   1098   
        #[allow(unused_mut)]
 1083   1099   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1084   1100   
        let config = crate::service::JsonRpc10Config::builder().build();
 1085         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1101  +
        let service =
        1102  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1103  +
                config,
        1104  +
            )
 1086   1105   
            .content_type_parameters(move |input: crate::input::ContentTypeParametersInput| {
 1087   1106   
                let sender = sender.clone();
 1088   1107   
                async move {
 1089   1108   
                    let result = {
 1090   1109   
                        let expected = crate::input::ContentTypeParametersInput {
 1091   1110   
                            value: ::std::option::Option::Some(5),
 1092   1111   
                        };
 1093   1112   
                        ::pretty_assertions::assert_eq!(input, expected);
 1094   1113   
                        let output = crate::output::ContentTypeParametersOutput {};
 1095   1114   
                        output
@@ -1121,1140 +1181,1200 @@
 1141   1160   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1142   1161   
    B: 'static,
 1143   1162   
 1144   1163   
    B::Data: Send,
 1145   1164   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1146   1165   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1147   1166   
{
 1148   1167   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1149   1168   
    type Future = PutWithContentEncodingInputFuture;
 1150   1169   
 1151         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1170  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1152   1171   
        let fut = async move {
 1153   1172   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1154   1173   
                request.headers(),
 1155   1174   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1156   1175   
            ) {
 1157   1176   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1158   1177   
            }
 1159   1178   
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_request(request)
 1160   1179   
                            .await
 1161   1180   
        };
@@ -1199,1218 +1259,1278 @@
 1219   1238   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1220   1239   
    B: 'static,
 1221   1240   
 1222   1241   
    B::Data: Send,
 1223   1242   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1224   1243   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1225   1244   
{
 1226   1245   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1227   1246   
    type Future = HostWithPathOperationInputFuture;
 1228   1247   
 1229         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1248  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1230   1249   
        let fut = async move {
 1231   1250   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1232   1251   
                request.headers(),
 1233   1252   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1234   1253   
            ) {
 1235   1254   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1236   1255   
            }
 1237   1256   
            crate::protocol_serde::shape_host_with_path_operation::de_host_with_path_operation_http_request(request)
 1238   1257   
                            .await
 1239   1258   
        };
@@ -1277,1296 +1337,1356 @@
 1297   1316   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1298   1317   
    B: 'static,
 1299   1318   
 1300   1319   
    B::Data: Send,
 1301   1320   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1302   1321   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1303   1322   
{
 1304   1323   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1305   1324   
    type Future = EndpointWithHostLabelOperationInputFuture;
 1306   1325   
 1307         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1326  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1308   1327   
        let fut = async move {
 1309   1328   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1310   1329   
                request.headers(),
 1311   1330   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1312   1331   
            ) {
 1313   1332   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1314   1333   
            }
 1315   1334   
            crate::protocol_serde::shape_endpoint_with_host_label_operation::de_endpoint_with_host_label_operation_http_request(request)
 1316   1335   
                            .await
 1317   1336   
        };
@@ -1347,1366 +1421,1445 @@
 1367   1386   
 1368   1387   
    /// Operations can prepend to the given host if they define the
 1369   1388   
    /// endpoint trait, and can use the host label trait to define
 1370   1389   
    /// further customization based on user input.
 1371   1390   
    /// Test ID: AwsJson10EndpointTraitWithHostLabel
 1372   1391   
    #[::tokio::test]
 1373   1392   
    #[::tracing_test::traced_test]
 1374   1393   
    #[should_panic]
 1375   1394   
    async fn aws_json10_endpoint_trait_with_host_label_request() {
 1376   1395   
        #[allow(unused_mut)]
 1377         -
        let mut http_request = http::Request::builder()
        1396  +
        let mut http_request = ::http_1x::Request::builder()
 1378   1397   
            .uri("/")
 1379   1398   
            .method("POST")
 1380         -
            .body(::aws_smithy_http_server::body::Body::from(
 1381         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1382         -
                    "{\"label\": \"bar\"}".as_bytes(),
 1383         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1399  +
            .body(::aws_smithy_http_server::body::boxed(
        1400  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1401  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1402  +
                        "{\"label\": \"bar\"}".as_bytes(),
        1403  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1404  +
                    ),
 1384   1405   
                )),
 1385   1406   
            ))
 1386   1407   
            .unwrap();
 1387   1408   
        todo!("endpoint trait not supported yet");
 1388   1409   
        #[allow(unused_mut)]
 1389   1410   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1390   1411   
        let config = crate::service::JsonRpc10Config::builder().build();
 1391         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1412  +
        let service =
        1413  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1414  +
                config,
        1415  +
            )
 1392   1416   
            .endpoint_with_host_label_operation(
 1393   1417   
                move |input: crate::input::EndpointWithHostLabelOperationInput| {
 1394   1418   
                    let sender = sender.clone();
 1395   1419   
                    async move {
 1396   1420   
                        let result = {
 1397   1421   
                            let expected = crate::input::EndpointWithHostLabelOperationInput {
 1398   1422   
                                label: "bar".to_owned(),
 1399   1423   
                            };
 1400   1424   
                            ::pretty_assertions::assert_eq!(input, expected);
 1401   1425   
                            let output = crate::output::EndpointWithHostLabelOperationOutput {};
@@ -1429,1453 +1564,1593 @@
 1449   1473   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1450   1474   
    B: 'static,
 1451   1475   
 1452   1476   
    B::Data: Send,
 1453   1477   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1454   1478   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1455   1479   
{
 1456   1480   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1457   1481   
    type Future = EndpointOperationInputFuture;
 1458   1482   
 1459         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1483  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1460   1484   
        let fut = async move {
 1461   1485   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1462   1486   
                request.headers(),
 1463   1487   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1464   1488   
            ) {
 1465   1489   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1466   1490   
            }
 1467   1491   
            crate::protocol_serde::shape_endpoint_operation::de_endpoint_operation_http_request(
 1468   1492   
                request,
 1469   1493   
            )
 1470   1494   
            .await
 1471   1495   
        };
 1472   1496   
        use ::futures_util::future::TryFutureExt;
 1473   1497   
        let fut = fut.map_err(
 1474   1498   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 1475   1499   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1476   1500   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 1477   1501   
            },
 1478   1502   
        );
 1479   1503   
        EndpointOperationInputFuture {
 1480   1504   
            inner: Box::pin(fut),
 1481   1505   
        }
 1482   1506   
    }
 1483   1507   
}
 1484   1508   
impl
 1485   1509   
    ::aws_smithy_http_server::response::IntoResponse<
 1486   1510   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 1487   1511   
    > for crate::output::EndpointOperationOutput
 1488   1512   
{
 1489   1513   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1490   1514   
        match crate::protocol_serde::shape_endpoint_operation::ser_endpoint_operation_http_response(
 1491   1515   
            self,
 1492   1516   
        ) {
 1493   1517   
            Ok(response) => response,
 1494   1518   
            Err(e) => {
 1495   1519   
                ::tracing::error!(error = %e, "failed to serialize response");
 1496   1520   
                ::aws_smithy_http_server::response::IntoResponse::<
 1497   1521   
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 1498   1522   
                >::into_response(
 1499   1523   
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
 1500   1524   
                        e,
 1501   1525   
                    ),
 1502   1526   
                )
 1503   1527   
            }
 1504   1528   
        }
 1505   1529   
    }
 1506   1530   
}
 1507   1531   
 1508   1532   
#[allow(unreachable_code, unused_variables)]
 1509   1533   
#[cfg(test)]
 1510   1534   
mod endpoint_operation_test {
 1511   1535   
 1512   1536   
    /// Operations can prepend to the given host if they define the
 1513   1537   
    /// endpoint trait.
 1514   1538   
    /// Test ID: AwsJson10EndpointTrait
 1515   1539   
    #[::tokio::test]
 1516   1540   
    #[::tracing_test::traced_test]
 1517   1541   
    #[should_panic]
 1518   1542   
    async fn aws_json10_endpoint_trait_request() {
 1519   1543   
        #[allow(unused_mut)]
 1520         -
        let mut http_request = http::Request::builder()
        1544  +
        let mut http_request = ::http_1x::Request::builder()
 1521   1545   
            .uri("/")
 1522   1546   
            .method("POST")
 1523         -
            .body(::aws_smithy_http_server::body::Body::from(
 1524         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1525         -
                    "{}".as_bytes(),
 1526         -
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
        1547  +
            .body(::aws_smithy_http_server::body::boxed(
        1548  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1549  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1550  +
                        "{}".as_bytes(),
        1551  +
                        ::aws_smithy_protocol_test::MediaType::from("unknown"),
        1552  +
                    ),
 1527   1553   
                )),
 1528   1554   
            ))
 1529   1555   
            .unwrap();
 1530   1556   
        todo!("endpoint trait not supported yet");
 1531   1557   
        #[allow(unused_mut)]
 1532   1558   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1533   1559   
        let config = crate::service::JsonRpc10Config::builder().build();
 1534         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1560  +
        let service =
        1561  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1562  +
                config,
        1563  +
            )
 1535   1564   
            .endpoint_operation(move |input: crate::input::EndpointOperationInput| {
 1536   1565   
                let sender = sender.clone();
 1537   1566   
                async move {
 1538   1567   
                    let result = {
 1539   1568   
                        let expected = crate::input::EndpointOperationInput {};
 1540   1569   
                        ::pretty_assertions::assert_eq!(input, expected);
 1541   1570   
                        let output = crate::output::EndpointOperationOutput {};
 1542   1571   
                        output
 1543   1572   
                    };
 1544   1573   
                    sender.send(()).await.expect("receiver dropped early");
@@ -1568,1597 +1628,1657 @@
 1588   1617   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 1589   1618   
    B: 'static,
 1590   1619   
 1591   1620   
    B::Data: Send,
 1592   1621   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 1593   1622   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 1594   1623   
{
 1595   1624   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 1596   1625   
    type Future = JsonUnionsInputFuture;
 1597   1626   
 1598         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1627  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 1599   1628   
        let fut = async move {
 1600   1629   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1601   1630   
                request.headers(),
 1602   1631   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 1603   1632   
            ) {
 1604   1633   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 1605   1634   
            }
 1606   1635   
            crate::protocol_serde::shape_json_unions::de_json_unions_http_request(request).await
 1607   1636   
        };
 1608   1637   
        use ::futures_util::future::TryFutureExt;
@@ -1648,1677 +2580,2693 @@
 1668   1697   
#[allow(unreachable_code, unused_variables)]
 1669   1698   
#[cfg(test)]
 1670   1699   
mod json_unions_test {
 1671   1700   
 1672   1701   
    /// Serializes a string union value
 1673   1702   
    /// Test ID: AwsJson10SerializeStringUnionValue
 1674   1703   
    #[::tokio::test]
 1675   1704   
    #[::tracing_test::traced_test]
 1676   1705   
    async fn aws_json10_serialize_string_union_value_request() {
 1677   1706   
        #[allow(unused_mut)]
 1678         -
        let mut http_request = http::Request::builder()
        1707  +
        let mut http_request = ::http_1x::Request::builder()
 1679   1708   
            .uri("/")
 1680   1709   
            .method("POST")
 1681   1710   
            .header("Content-Type", "application/x-amz-json-1.0")
 1682   1711   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1683         -
            .body(::aws_smithy_http_server::body::Body::from(
 1684         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1685         -
                    "{\n    \"contents\": {\n        \"stringValue\": \"foo\"\n    }\n}".as_bytes(),
 1686         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1712  +
            .body(::aws_smithy_http_server::body::boxed(
        1713  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1714  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1715  +
                        "{\n    \"contents\": {\n        \"stringValue\": \"foo\"\n    }\n}"
        1716  +
                            .as_bytes(),
        1717  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1718  +
                    ),
 1687   1719   
                )),
 1688   1720   
            ))
 1689   1721   
            .unwrap();
 1690   1722   
        #[allow(unused_mut)]
 1691   1723   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1692   1724   
        let config = crate::service::JsonRpc10Config::builder().build();
 1693         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1725  +
        let service =
        1726  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1727  +
                config,
        1728  +
            )
 1694   1729   
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1695   1730   
                let sender = sender.clone();
 1696   1731   
                async move {
 1697   1732   
                    let result = {
 1698   1733   
                        let expected = crate::input::JsonUnionsInput {
 1699   1734   
                            contents: ::std::option::Option::Some(
 1700   1735   
                                crate::model::MyUnion::StringValue("foo".to_owned()),
 1701   1736   
                            ),
 1702   1737   
                        };
 1703   1738   
                        ::pretty_assertions::assert_eq!(input, expected);
 1704   1739   
                        let output = crate::output::JsonUnionsOutput {
 1705   1740   
                            contents: ::std::option::Option::None,
 1706   1741   
                        };
 1707   1742   
                        Ok(output)
 1708   1743   
                    };
 1709   1744   
                    sender.send(()).await.expect("receiver dropped early");
 1710   1745   
                    result
 1711   1746   
                }
 1712   1747   
            })
 1713   1748   
            .build_unchecked();
 1714   1749   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1715   1750   
            .await
 1716   1751   
            .expect("unable to make an HTTP request");
 1717   1752   
        assert!(
 1718   1753   
            receiver.recv().await.is_some(),
 1719   1754   
            "we expected operation handler to be invoked but it was not entered"
 1720   1755   
        );
 1721   1756   
    }
 1722   1757   
 1723   1758   
    /// Serializes a boolean union value
 1724   1759   
    /// Test ID: AwsJson10SerializeBooleanUnionValue
 1725   1760   
    #[::tokio::test]
 1726   1761   
    #[::tracing_test::traced_test]
 1727   1762   
    async fn aws_json10_serialize_boolean_union_value_request() {
 1728   1763   
        #[allow(unused_mut)]
 1729         -
        let mut http_request = http::Request::builder()
        1764  +
        let mut http_request = ::http_1x::Request::builder()
 1730   1765   
            .uri("/")
 1731   1766   
            .method("POST")
 1732   1767   
            .header("Content-Type", "application/x-amz-json-1.0")
 1733   1768   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1734         -
            .body(::aws_smithy_http_server::body::Body::from(
 1735         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1736         -
                    "{\n    \"contents\": {\n        \"booleanValue\": true\n    }\n}".as_bytes(),
 1737         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1769  +
            .body(::aws_smithy_http_server::body::boxed(
        1770  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1771  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1772  +
                        "{\n    \"contents\": {\n        \"booleanValue\": true\n    }\n}"
        1773  +
                            .as_bytes(),
        1774  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1775  +
                    ),
 1738   1776   
                )),
 1739   1777   
            ))
 1740   1778   
            .unwrap();
 1741   1779   
        #[allow(unused_mut)]
 1742   1780   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1743   1781   
        let config = crate::service::JsonRpc10Config::builder().build();
 1744         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1782  +
        let service =
        1783  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1784  +
                config,
        1785  +
            )
 1745   1786   
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1746   1787   
                let sender = sender.clone();
 1747   1788   
                async move {
 1748   1789   
                    let result = {
 1749   1790   
                        let expected = crate::input::JsonUnionsInput {
 1750   1791   
                            contents: ::std::option::Option::Some(
 1751   1792   
                                crate::model::MyUnion::BooleanValue(true),
 1752   1793   
                            ),
 1753   1794   
                        };
 1754   1795   
                        ::pretty_assertions::assert_eq!(input, expected);
 1755   1796   
                        let output = crate::output::JsonUnionsOutput {
 1756   1797   
                            contents: ::std::option::Option::None,
 1757   1798   
                        };
 1758   1799   
                        Ok(output)
 1759   1800   
                    };
 1760   1801   
                    sender.send(()).await.expect("receiver dropped early");
 1761   1802   
                    result
 1762   1803   
                }
 1763   1804   
            })
 1764   1805   
            .build_unchecked();
 1765   1806   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1766   1807   
            .await
 1767   1808   
            .expect("unable to make an HTTP request");
 1768   1809   
        assert!(
 1769   1810   
            receiver.recv().await.is_some(),
 1770   1811   
            "we expected operation handler to be invoked but it was not entered"
 1771   1812   
        );
 1772   1813   
    }
 1773   1814   
 1774   1815   
    /// Serializes a number union value
 1775   1816   
    /// Test ID: AwsJson10SerializeNumberUnionValue
 1776   1817   
    #[::tokio::test]
 1777   1818   
    #[::tracing_test::traced_test]
 1778   1819   
    async fn aws_json10_serialize_number_union_value_request() {
 1779   1820   
        #[allow(unused_mut)]
 1780         -
        let mut http_request = http::Request::builder()
        1821  +
        let mut http_request = ::http_1x::Request::builder()
 1781   1822   
            .uri("/")
 1782   1823   
            .method("POST")
 1783   1824   
            .header("Content-Type", "application/x-amz-json-1.0")
 1784   1825   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1785         -
            .body(::aws_smithy_http_server::body::Body::from(
 1786         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1787         -
                    "{\n    \"contents\": {\n        \"numberValue\": 1\n    }\n}".as_bytes(),
 1788         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1826  +
            .body(::aws_smithy_http_server::body::boxed(
        1827  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1828  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1829  +
                        "{\n    \"contents\": {\n        \"numberValue\": 1\n    }\n}".as_bytes(),
        1830  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1831  +
                    ),
 1789   1832   
                )),
 1790   1833   
            ))
 1791   1834   
            .unwrap();
 1792   1835   
        #[allow(unused_mut)]
 1793   1836   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1794   1837   
        let config = crate::service::JsonRpc10Config::builder().build();
 1795         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1838  +
        let service =
        1839  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1840  +
                config,
        1841  +
            )
 1796   1842   
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1797   1843   
                let sender = sender.clone();
 1798   1844   
                async move {
 1799   1845   
                    let result = {
 1800   1846   
                        let expected = crate::input::JsonUnionsInput {
 1801   1847   
                            contents: ::std::option::Option::Some(
 1802   1848   
                                crate::model::MyUnion::NumberValue(1),
 1803   1849   
                            ),
 1804   1850   
                        };
 1805   1851   
                        ::pretty_assertions::assert_eq!(input, expected);
 1806   1852   
                        let output = crate::output::JsonUnionsOutput {
 1807   1853   
                            contents: ::std::option::Option::None,
 1808   1854   
                        };
 1809   1855   
                        Ok(output)
 1810   1856   
                    };
 1811   1857   
                    sender.send(()).await.expect("receiver dropped early");
 1812   1858   
                    result
 1813   1859   
                }
 1814   1860   
            })
 1815   1861   
            .build_unchecked();
 1816   1862   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1817   1863   
            .await
 1818   1864   
            .expect("unable to make an HTTP request");
 1819   1865   
        assert!(
 1820   1866   
            receiver.recv().await.is_some(),
 1821   1867   
            "we expected operation handler to be invoked but it was not entered"
 1822   1868   
        );
 1823   1869   
    }
 1824   1870   
 1825   1871   
    /// Serializes a blob union value
 1826   1872   
    /// Test ID: AwsJson10SerializeBlobUnionValue
 1827   1873   
    #[::tokio::test]
 1828   1874   
    #[::tracing_test::traced_test]
 1829   1875   
    async fn aws_json10_serialize_blob_union_value_request() {
 1830   1876   
        #[allow(unused_mut)]
 1831         -
        let mut http_request = http::Request::builder()
        1877  +
        let mut http_request = ::http_1x::Request::builder()
 1832   1878   
            .uri("/")
 1833   1879   
            .method("POST")
 1834   1880   
            .header("Content-Type", "application/x-amz-json-1.0")
 1835   1881   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1836         -
            .body(::aws_smithy_http_server::body::Body::from(
 1837         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1838         -
                    "{\n    \"contents\": {\n        \"blobValue\": \"Zm9v\"\n    }\n}".as_bytes(),
 1839         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1882  +
            .body(::aws_smithy_http_server::body::boxed(
        1883  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1884  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1885  +
                        "{\n    \"contents\": {\n        \"blobValue\": \"Zm9v\"\n    }\n}"
        1886  +
                            .as_bytes(),
        1887  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1888  +
                    ),
 1840   1889   
                )),
 1841   1890   
            ))
 1842   1891   
            .unwrap();
 1843   1892   
        #[allow(unused_mut)]
 1844   1893   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1845   1894   
        let config = crate::service::JsonRpc10Config::builder().build();
 1846         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 1847         -
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1848         -
                let sender = sender.clone();
 1849         -
                async move {
 1850         -
                    let result = {
 1851         -
                        let expected = crate::input::JsonUnionsInput {
 1852         -
                            contents: ::std::option::Option::Some(
 1853         -
                                crate::model::MyUnion::BlobValue(::aws_smithy_types::Blob::new(
 1854         -
                                    "foo",
 1855         -
                                )),
 1856         -
                            ),
 1857         -
                        };
 1858         -
                        ::pretty_assertions::assert_eq!(input, expected);
 1859         -
                        let output = crate::output::JsonUnionsOutput {
 1860         -
                            contents: ::std::option::Option::None,
 1861         -
                        };
 1862         -
                        Ok(output)
        1895  +
        let service = crate::service::JsonRpc10::builder::<
        1896  +
            ::aws_smithy_http_server::body::BoxBody,
        1897  +
            _,
        1898  +
            _,
        1899  +
            _,
        1900  +
        >(config)
        1901  +
        .json_unions(move |input: crate::input::JsonUnionsInput| {
        1902  +
            let sender = sender.clone();
        1903  +
            async move {
        1904  +
                let result = {
        1905  +
                    let expected = crate::input::JsonUnionsInput {
        1906  +
                        contents: ::std::option::Option::Some(crate::model::MyUnion::BlobValue(
        1907  +
                            ::aws_smithy_types::Blob::new("foo"),
        1908  +
                        )),
 1863   1909   
                    };
 1864         -
                    sender.send(()).await.expect("receiver dropped early");
 1865         -
                    result
 1866         -
                }
 1867         -
            })
 1868         -
            .build_unchecked();
        1910  +
                    ::pretty_assertions::assert_eq!(input, expected);
        1911  +
                    let output = crate::output::JsonUnionsOutput {
        1912  +
                        contents: ::std::option::Option::None,
        1913  +
                    };
        1914  +
                    Ok(output)
        1915  +
                };
        1916  +
                sender.send(()).await.expect("receiver dropped early");
        1917  +
                result
        1918  +
            }
        1919  +
        })
        1920  +
        .build_unchecked();
 1869   1921   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1870   1922   
            .await
 1871   1923   
            .expect("unable to make an HTTP request");
 1872   1924   
        assert!(
 1873   1925   
            receiver.recv().await.is_some(),
 1874   1926   
            "we expected operation handler to be invoked but it was not entered"
 1875   1927   
        );
 1876   1928   
    }
 1877   1929   
 1878   1930   
    /// Serializes a timestamp union value
 1879   1931   
    /// Test ID: AwsJson10SerializeTimestampUnionValue
 1880   1932   
    #[::tokio::test]
 1881   1933   
    #[::tracing_test::traced_test]
 1882   1934   
    async fn aws_json10_serialize_timestamp_union_value_request() {
 1883   1935   
        #[allow(unused_mut)]
 1884         -
        let mut http_request = http::Request::builder()
        1936  +
        let mut http_request = ::http_1x::Request::builder()
 1885   1937   
            .uri("/")
 1886   1938   
            .method("POST")
 1887   1939   
            .header("Content-Type", "application/x-amz-json-1.0")
 1888   1940   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1889         -
            .body(::aws_smithy_http_server::body::Body::from(
 1890         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1891         -
                    "{\n    \"contents\": {\n        \"timestampValue\": 1398796238\n    }\n}"
 1892         -
                        .as_bytes(),
 1893         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1941  +
            .body(::aws_smithy_http_server::body::boxed(
        1942  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        1943  +
                    &::aws_smithy_protocol_test::decode_body_data(
        1944  +
                        "{\n    \"contents\": {\n        \"timestampValue\": 1398796238\n    }\n}"
        1945  +
                            .as_bytes(),
        1946  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        1947  +
                    ),
 1894   1948   
                )),
 1895   1949   
            ))
 1896   1950   
            .unwrap();
 1897   1951   
        #[allow(unused_mut)]
 1898   1952   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1899   1953   
        let config = crate::service::JsonRpc10Config::builder().build();
 1900         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        1954  +
        let service =
        1955  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        1956  +
                config,
        1957  +
            )
 1901   1958   
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1902   1959   
                let sender = sender.clone();
 1903   1960   
                async move {
 1904   1961   
                    let result = {
 1905   1962   
                        let expected = crate::input::JsonUnionsInput {
 1906   1963   
                            contents: ::std::option::Option::Some(
 1907   1964   
                                crate::model::MyUnion::TimestampValue(
 1908   1965   
                                    ::aws_smithy_types::DateTime::from_fractional_secs(
 1909   1966   
                                        1398796238, 0_f64,
 1910   1967   
                                    ),
 1911   1968   
                                ),
 1912   1969   
                            ),
 1913   1970   
                        };
 1914   1971   
                        ::pretty_assertions::assert_eq!(input, expected);
 1915   1972   
                        let output = crate::output::JsonUnionsOutput {
 1916   1973   
                            contents: ::std::option::Option::None,
 1917   1974   
                        };
 1918   1975   
                        Ok(output)
 1919   1976   
                    };
 1920   1977   
                    sender.send(()).await.expect("receiver dropped early");
 1921   1978   
                    result
 1922   1979   
                }
 1923   1980   
            })
 1924   1981   
            .build_unchecked();
 1925   1982   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1926   1983   
            .await
 1927   1984   
            .expect("unable to make an HTTP request");
 1928   1985   
        assert!(
 1929   1986   
            receiver.recv().await.is_some(),
 1930   1987   
            "we expected operation handler to be invoked but it was not entered"
 1931   1988   
        );
 1932   1989   
    }
 1933   1990   
 1934   1991   
    /// Serializes an enum union value
 1935   1992   
    /// Test ID: AwsJson10SerializeEnumUnionValue
 1936   1993   
    #[::tokio::test]
 1937   1994   
    #[::tracing_test::traced_test]
 1938   1995   
    async fn aws_json10_serialize_enum_union_value_request() {
 1939   1996   
        #[allow(unused_mut)]
 1940         -
        let mut http_request = http::Request::builder()
        1997  +
        let mut http_request = ::http_1x::Request::builder()
 1941   1998   
            .uri("/")
 1942   1999   
            .method("POST")
 1943   2000   
            .header("Content-Type", "application/x-amz-json-1.0")
 1944   2001   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 1945         -
            .body(::aws_smithy_http_server::body::Body::from(
 1946         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1947         -
                    "{\n    \"contents\": {\n        \"enumValue\": \"Foo\"\n    }\n}".as_bytes(),
 1948         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2002  +
            .body(::aws_smithy_http_server::body::boxed(
        2003  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        2004  +
                    &::aws_smithy_protocol_test::decode_body_data(
        2005  +
                        "{\n    \"contents\": {\n        \"enumValue\": \"Foo\"\n    }\n}"
        2006  +
                            .as_bytes(),
        2007  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2008  +
                    ),
 1949   2009   
                )),
 1950   2010   
            ))
 1951   2011   
            .unwrap();
 1952   2012   
        #[allow(unused_mut)]
 1953   2013   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 1954   2014   
        let config = crate::service::JsonRpc10Config::builder().build();
 1955         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 1956         -
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 1957         -
                let sender = sender.clone();
 1958         -
                async move {
 1959         -
                    let result = {
 1960         -
                        let expected = crate::input::JsonUnionsInput {
 1961         -
                            contents: ::std::option::Option::Some(
 1962         -
                                crate::model::MyUnion::EnumValue(
 1963         -
                                    "Foo"
 1964         -
                                        .parse::<crate::model::FooEnum>()
 1965         -
                                        .expect("static value validated to member"),
 1966         -
                                ),
 1967         -
                            ),
 1968         -
                        };
 1969         -
                        ::pretty_assertions::assert_eq!(input, expected);
 1970         -
                        let output = crate::output::JsonUnionsOutput {
 1971         -
                            contents: ::std::option::Option::None,
 1972         -
                        };
 1973         -
                        Ok(output)
        2015  +
        let service = crate::service::JsonRpc10::builder::<
        2016  +
            ::aws_smithy_http_server::body::BoxBody,
        2017  +
            _,
        2018  +
            _,
        2019  +
            _,
        2020  +
        >(config)
        2021  +
        .json_unions(move |input: crate::input::JsonUnionsInput| {
        2022  +
            let sender = sender.clone();
        2023  +
            async move {
        2024  +
                let result = {
        2025  +
                    let expected = crate::input::JsonUnionsInput {
        2026  +
                        contents: ::std::option::Option::Some(crate::model::MyUnion::EnumValue(
        2027  +
                            "Foo"
        2028  +
                                .parse::<crate::model::FooEnum>()
        2029  +
                                .expect("static value validated to member"),
        2030  +
                        )),
 1974   2031   
                    };
 1975         -
                    sender.send(()).await.expect("receiver dropped early");
 1976         -
                    result
 1977         -
                }
 1978         -
            })
 1979         -
            .build_unchecked();
        2032  +
                    ::pretty_assertions::assert_eq!(input, expected);
        2033  +
                    let output = crate::output::JsonUnionsOutput {
        2034  +
                        contents: ::std::option::Option::None,
        2035  +
                    };
        2036  +
                    Ok(output)
        2037  +
                };
        2038  +
                sender.send(()).await.expect("receiver dropped early");
        2039  +
                result
        2040  +
            }
        2041  +
        })
        2042  +
        .build_unchecked();
 1980   2043   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 1981   2044   
            .await
 1982   2045   
            .expect("unable to make an HTTP request");
 1983   2046   
        assert!(
 1984   2047   
            receiver.recv().await.is_some(),
 1985   2048   
            "we expected operation handler to be invoked but it was not entered"
 1986   2049   
        );
 1987   2050   
    }
 1988   2051   
 1989   2052   
    /// Serializes an intEnum union value
 1990   2053   
    /// Test ID: AwsJson10SerializeIntEnumUnionValue
 1991   2054   
    #[::tokio::test]
 1992   2055   
    #[::tracing_test::traced_test]
 1993   2056   
    async fn aws_json10_serialize_int_enum_union_value_request() {
 1994   2057   
        #[allow(unused_mut)]
 1995         -
        let mut http_request = http::Request::builder()
        2058  +
        let mut http_request = ::http_1x::Request::builder()
 1996   2059   
            .uri("/")
 1997   2060   
            .method("POST")
 1998   2061   
            .header("Content-Type", "application/x-amz-json-1.0")
 1999   2062   
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 2000         -
            .body(::aws_smithy_http_server::body::Body::from(
 2001         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2002         -
                    "{\n    \"contents\": {\n        \"intEnumValue\": 1\n    }\n}".as_bytes(),
 2003         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2063  +
            .body(::aws_smithy_http_server::body::boxed(
        2064  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        2065  +
                    &::aws_smithy_protocol_test::decode_body_data(
        2066  +
                        "{\n    \"contents\": {\n        \"intEnumValue\": 1\n    }\n}".as_bytes(),
        2067  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2068  +
                    ),
 2004   2069   
                )),
 2005   2070   
            ))
 2006   2071   
            .unwrap();
 2007   2072   
        #[allow(unused_mut)]
 2008   2073   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2009   2074   
        let config = crate::service::JsonRpc10Config::builder().build();
 2010         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        2075  +
        let service =
        2076  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        2077  +
                config,
        2078  +
            )
 2011   2079   
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 2012   2080   
                let sender = sender.clone();
 2013   2081   
                async move {
 2014   2082   
                    let result = {
 2015   2083   
                        let expected = crate::input::JsonUnionsInput {
 2016   2084   
                            contents: ::std::option::Option::Some(
 2017   2085   
                                crate::model::MyUnion::IntEnumValue(1),
 2018   2086   
                            ),
 2019   2087   
                        };
 2020   2088   
                        ::pretty_assertions::assert_eq!(input, expected);
 2021   2089   
                        let output = crate::output::JsonUnionsOutput {
 2022   2090   
                            contents: ::std::option::Option::None,
 2023   2091   
                        };
 2024   2092   
                        Ok(output)
 2025   2093   
                    };
 2026   2094   
                    sender.send(()).await.expect("receiver dropped early");
 2027   2095   
                    result
 2028   2096   
                }
 2029   2097   
            })
 2030   2098   
            .build_unchecked();
 2031   2099   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2032   2100   
            .await
 2033   2101   
            .expect("unable to make an HTTP request");
 2034   2102   
        assert!(
 2035   2103   
            receiver.recv().await.is_some(),
 2036   2104   
            "we expected operation handler to be invoked but it was not entered"
 2037   2105   
        );
 2038   2106   
    }
 2039   2107   
 2040   2108   
    /// Serializes a list union value
 2041   2109   
    /// Test ID: AwsJson10SerializeListUnionValue
 2042   2110   
    #[::tokio::test]
 2043   2111   
    #[::tracing_test::traced_test]
 2044   2112   
    async fn aws_json10_serialize_list_union_value_request() {
 2045   2113   
        #[allow(unused_mut)]
 2046         -
        let mut http_request = http::Request::builder()
 2047         -
            .uri("/")
 2048         -
            .method("POST")
 2049         -
            .header("Content-Type", "application/x-amz-json-1.0")
 2050         -
            .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 2051         -
            .body(::aws_smithy_http_server::body::Body::from(
 2052         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2053         -
                    "{\n    \"contents\": {\n        \"listValue\": [\"foo\", \"bar\"]\n    }\n}"
 2054         -
                        .as_bytes(),
 2055         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2056         -
                )),
 2057         -
            ))
 2058         -
            .unwrap();
        2114  +
                    let mut http_request = ::http_1x::Request::builder()
        2115  +
                        .uri("/")
        2116  +
                        .method("POST")
        2117  +
        .header("Content-Type", "application/x-amz-json-1.0")
        2118  +
        .header("X-Amz-Target", "JsonRpc10.JsonUnions")
        2119  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
        2120  +
                        ::bytes::Bytes::copy_from_slice(
        2121  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"contents\": {\n        \"listValue\": [\"foo\", \"bar\"]\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
        2122  +
                        )
        2123  +
                        ))).unwrap();
 2059   2124   
        #[allow(unused_mut)]
 2060   2125   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2061   2126   
        let config = crate::service::JsonRpc10Config::builder().build();
 2062         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2063         -
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 2064         -
                let sender = sender.clone();
 2065         -
                async move {
 2066         -
                    let result = {
 2067         -
                        let expected = crate::input::JsonUnionsInput {
 2068         -
                            contents: ::std::option::Option::Some(
 2069         -
                                crate::model::MyUnion::ListValue(vec![
 2070         -
                                    "foo".to_owned(),
 2071         -
                                    "bar".to_owned(),
 2072         -
                                ]),
 2073         -
                            ),
 2074         -
                        };
 2075         -
                        ::pretty_assertions::assert_eq!(input, expected);
 2076         -
                        let output = crate::output::JsonUnionsOutput {
 2077         -
                            contents: ::std::option::Option::None,
 2078         -
                        };
 2079         -
                        Ok(output)
        2127  +
        let service = crate::service::JsonRpc10::builder::<
        2128  +
            ::aws_smithy_http_server::body::BoxBody,
        2129  +
            _,
        2130  +
            _,
        2131  +
            _,
        2132  +
        >(config)
        2133  +
        .json_unions(move |input: crate::input::JsonUnionsInput| {
        2134  +
            let sender = sender.clone();
        2135  +
            async move {
        2136  +
                let result = {
        2137  +
                    let expected = crate::input::JsonUnionsInput {
        2138  +
                        contents: ::std::option::Option::Some(crate::model::MyUnion::ListValue(
        2139  +
                            vec!["foo".to_owned(), "bar".to_owned()],
        2140  +
                        )),
 2080   2141   
                    };
 2081         -
                    sender.send(()).await.expect("receiver dropped early");
 2082         -
                    result
 2083         -
                }
 2084         -
            })
 2085         -
            .build_unchecked();
        2142  +
                    ::pretty_assertions::assert_eq!(input, expected);
        2143  +
                    let output = crate::output::JsonUnionsOutput {
        2144  +
                        contents: ::std::option::Option::None,
        2145  +
                    };
        2146  +
                    Ok(output)
        2147  +
                };
        2148  +
                sender.send(()).await.expect("receiver dropped early");
        2149  +
                result
        2150  +
            }
        2151  +
        })
        2152  +
        .build_unchecked();
 2086   2153   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2087   2154   
            .await
 2088   2155   
            .expect("unable to make an HTTP request");
 2089   2156   
        assert!(
 2090   2157   
            receiver.recv().await.is_some(),
 2091   2158   
            "we expected operation handler to be invoked but it was not entered"
 2092   2159   
        );
 2093   2160   
    }
 2094   2161   
 2095   2162   
    /// Serializes a map union value
 2096   2163   
    /// Test ID: AwsJson10SerializeMapUnionValue
 2097   2164   
    #[::tokio::test]
 2098   2165   
    #[::tracing_test::traced_test]
 2099   2166   
    async fn aws_json10_serialize_map_union_value_request() {
 2100   2167   
        #[allow(unused_mut)]
 2101         -
                    let mut http_request = http::Request::builder()
        2168  +
                    let mut http_request = ::http_1x::Request::builder()
 2102   2169   
                        .uri("/")
 2103   2170   
                        .method("POST")
 2104   2171   
        .header("Content-Type", "application/x-amz-json-1.0")
 2105   2172   
        .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 2106         -
        .body(::aws_smithy_http_server::body::Body::from(
 2107         -
                                ::bytes::Bytes::copy_from_slice(
 2108         -
                                    &::aws_smithy_protocol_test::decode_body_data("{\n    \"contents\": {\n        \"mapValue\": {\n            \"foo\": \"bar\",\n            \"spam\": \"eggs\"\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2109         -
                                )
 2110         -
                                )).unwrap();
        2173  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
        2174  +
                        ::bytes::Bytes::copy_from_slice(
        2175  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"contents\": {\n        \"mapValue\": {\n            \"foo\": \"bar\",\n            \"spam\": \"eggs\"\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
        2176  +
                        )
        2177  +
                        ))).unwrap();
 2111   2178   
        #[allow(unused_mut)]
 2112   2179   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2113   2180   
        let config = crate::service::JsonRpc10Config::builder().build();
 2114         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2115         -
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 2116         -
                let sender = sender.clone();
 2117         -
                async move {
 2118         -
                    let result = {
 2119         -
                        let expected = crate::input::JsonUnionsInput {
 2120         -
                            contents: ::std::option::Option::Some(crate::model::MyUnion::MapValue(
 2121         -
                                {
 2122         -
                                    let mut ret = ::std::collections::HashMap::new();
 2123         -
                                    ret.insert("foo".to_owned(), "bar".to_owned());
 2124         -
                                    ret.insert("spam".to_owned(), "eggs".to_owned());
 2125         -
                                    ret
 2126         -
                                },
 2127         -
                            )),
 2128         -
                        };
 2129         -
                        ::pretty_assertions::assert_eq!(input, expected);
 2130         -
                        let output = crate::output::JsonUnionsOutput {
 2131         -
                            contents: ::std::option::Option::None,
 2132         -
                        };
 2133         -
                        Ok(output)
        2181  +
        let service = crate::service::JsonRpc10::builder::<
        2182  +
            ::aws_smithy_http_server::body::BoxBody,
        2183  +
            _,
        2184  +
            _,
        2185  +
            _,
        2186  +
        >(config)
        2187  +
        .json_unions(move |input: crate::input::JsonUnionsInput| {
        2188  +
            let sender = sender.clone();
        2189  +
            async move {
        2190  +
                let result = {
        2191  +
                    let expected = crate::input::JsonUnionsInput {
        2192  +
                        contents: ::std::option::Option::Some(crate::model::MyUnion::MapValue({
        2193  +
                            let mut ret = ::std::collections::HashMap::new();
        2194  +
                            ret.insert("foo".to_owned(), "bar".to_owned());
        2195  +
                            ret.insert("spam".to_owned(), "eggs".to_owned());
        2196  +
                            ret
        2197  +
                        })),
 2134   2198   
                    };
 2135         -
                    sender.send(()).await.expect("receiver dropped early");
 2136         -
                    result
 2137         -
                }
 2138         -
            })
 2139         -
            .build_unchecked();
        2199  +
                    ::pretty_assertions::assert_eq!(input, expected);
        2200  +
                    let output = crate::output::JsonUnionsOutput {
        2201  +
                        contents: ::std::option::Option::None,
        2202  +
                    };
        2203  +
                    Ok(output)
        2204  +
                };
        2205  +
                sender.send(()).await.expect("receiver dropped early");
        2206  +
                result
        2207  +
            }
        2208  +
        })
        2209  +
        .build_unchecked();
 2140   2210   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2141   2211   
            .await
 2142   2212   
            .expect("unable to make an HTTP request");
 2143   2213   
        assert!(
 2144   2214   
            receiver.recv().await.is_some(),
 2145   2215   
            "we expected operation handler to be invoked but it was not entered"
 2146   2216   
        );
 2147   2217   
    }
 2148   2218   
 2149   2219   
    /// Serializes a structure union value
 2150   2220   
    /// Test ID: AwsJson10SerializeStructureUnionValue
 2151   2221   
    #[::tokio::test]
 2152   2222   
    #[::tracing_test::traced_test]
 2153   2223   
    async fn aws_json10_serialize_structure_union_value_request() {
 2154   2224   
        #[allow(unused_mut)]
 2155         -
                    let mut http_request = http::Request::builder()
        2225  +
                    let mut http_request = ::http_1x::Request::builder()
 2156   2226   
                        .uri("/")
 2157   2227   
                        .method("POST")
 2158   2228   
        .header("Content-Type", "application/x-amz-json-1.0")
 2159   2229   
        .header("X-Amz-Target", "JsonRpc10.JsonUnions")
 2160         -
        .body(::aws_smithy_http_server::body::Body::from(
 2161         -
                                ::bytes::Bytes::copy_from_slice(
 2162         -
                                    &::aws_smithy_protocol_test::decode_body_data("{\n    \"contents\": {\n        \"structureValue\": {\n            \"hi\": \"hello\"\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2163         -
                                )
 2164         -
                                )).unwrap();
        2230  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
        2231  +
                        ::bytes::Bytes::copy_from_slice(
        2232  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"contents\": {\n        \"structureValue\": {\n            \"hi\": \"hello\"\n        }\n    }\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
        2233  +
                        )
        2234  +
                        ))).unwrap();
 2165   2235   
        #[allow(unused_mut)]
 2166   2236   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2167   2237   
        let config = crate::service::JsonRpc10Config::builder().build();
 2168         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2169         -
            .json_unions(move |input: crate::input::JsonUnionsInput| {
 2170         -
                let sender = sender.clone();
 2171         -
                async move {
 2172         -
                    let result = {
 2173         -
                        let expected = crate::input::JsonUnionsInput {
 2174         -
                            contents: ::std::option::Option::Some(
 2175         -
                                crate::model::MyUnion::StructureValue(
 2176         -
                                    crate::model::GreetingStruct {
 2177         -
                                        hi: ::std::option::Option::Some("hello".to_owned()),
 2178         -
                                    },
 2179         -
                                ),
 2180         -
                            ),
 2181         -
                        };
 2182         -
                        ::pretty_assertions::assert_eq!(input, expected);
 2183         -
                        let output = crate::output::JsonUnionsOutput {
 2184         -
                            contents: ::std::option::Option::None,
 2185         -
                        };
 2186         -
                        Ok(output)
        2238  +
        let service = crate::service::JsonRpc10::builder::<
        2239  +
            ::aws_smithy_http_server::body::BoxBody,
        2240  +
            _,
        2241  +
            _,
        2242  +
            _,
        2243  +
        >(config)
        2244  +
        .json_unions(move |input: crate::input::JsonUnionsInput| {
        2245  +
            let sender = sender.clone();
        2246  +
            async move {
        2247  +
                let result = {
        2248  +
                    let expected = crate::input::JsonUnionsInput {
        2249  +
                        contents: ::std::option::Option::Some(
        2250  +
                            crate::model::MyUnion::StructureValue(crate::model::GreetingStruct {
        2251  +
                                hi: ::std::option::Option::Some("hello".to_owned()),
        2252  +
                            }),
        2253  +
                        ),
 2187   2254   
                    };
 2188         -
                    sender.send(()).await.expect("receiver dropped early");
 2189         -
                    result
 2190         -
                }
 2191         -
            })
 2192         -
            .build_unchecked();
        2255  +
                    ::pretty_assertions::assert_eq!(input, expected);
        2256  +
                    let output = crate::output::JsonUnionsOutput {
        2257  +
                        contents: ::std::option::Option::None,
        2258  +
                    };
        2259  +
                    Ok(output)
        2260  +
                };
        2261  +
                sender.send(()).await.expect("receiver dropped early");
        2262  +
                result
        2263  +
            }
        2264  +
        })
        2265  +
        .build_unchecked();
 2193   2266   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2194   2267   
            .await
 2195   2268   
            .expect("unable to make an HTTP request");
 2196   2269   
        assert!(
 2197   2270   
            receiver.recv().await.is_some(),
 2198   2271   
            "we expected operation handler to be invoked but it was not entered"
 2199   2272   
        );
 2200   2273   
    }
 2201   2274   
 2202   2275   
    /// Deserializes a string union value
 2203   2276   
    /// Test ID: AwsJson10DeserializeStringUnionValue
 2204   2277   
    #[::tokio::test]
 2205   2278   
    #[::tracing_test::traced_test]
 2206   2279   
    async fn aws_json10_deserialize_string_union_value_response() {
 2207   2280   
        let output = crate::output::JsonUnionsOutput {
 2208   2281   
            contents: ::std::option::Option::Some(crate::model::MyUnion::StringValue(
 2209   2282   
                "foo".to_owned(),
 2210   2283   
            )),
 2211   2284   
        };
 2212   2285   
        use ::aws_smithy_http_server::response::IntoResponse;
 2213   2286   
        let http_response = output.into_response();
 2214   2287   
        ::pretty_assertions::assert_eq!(
 2215         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2288  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2216   2289   
            http_response.status()
 2217   2290   
        );
 2218   2291   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2219   2292   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2220   2293   
            http_response.headers(),
 2221   2294   
            expected_headers,
 2222   2295   
        ));
 2223         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2296  +
        use ::http_body_util::BodyExt;
        2297  +
        let body = http_response
        2298  +
            .into_body()
        2299  +
            .collect()
 2224   2300   
            .await
 2225         -
            .expect("unable to extract body to bytes");
        2301  +
            .expect("unable to collect body")
        2302  +
            .to_bytes();
 2226   2303   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2227   2304   
            &body,
 2228   2305   
            "{\n    \"contents\": {\n        \"stringValue\": \"foo\"\n    }\n}",
 2229   2306   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2230   2307   
        ));
 2231   2308   
    }
 2232   2309   
 2233   2310   
    /// Deserializes a boolean union value
 2234   2311   
    /// Test ID: AwsJson10DeserializeBooleanUnionValue
 2235   2312   
    #[::tokio::test]
 2236   2313   
    #[::tracing_test::traced_test]
 2237   2314   
    async fn aws_json10_deserialize_boolean_union_value_response() {
 2238   2315   
        let output = crate::output::JsonUnionsOutput {
 2239   2316   
            contents: ::std::option::Option::Some(crate::model::MyUnion::BooleanValue(true)),
 2240   2317   
        };
 2241   2318   
        use ::aws_smithy_http_server::response::IntoResponse;
 2242   2319   
        let http_response = output.into_response();
 2243   2320   
        ::pretty_assertions::assert_eq!(
 2244         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2321  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2245   2322   
            http_response.status()
 2246   2323   
        );
 2247   2324   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2248   2325   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2249   2326   
            http_response.headers(),
 2250   2327   
            expected_headers,
 2251   2328   
        ));
 2252         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2329  +
        use ::http_body_util::BodyExt;
        2330  +
        let body = http_response
        2331  +
            .into_body()
        2332  +
            .collect()
 2253   2333   
            .await
 2254         -
            .expect("unable to extract body to bytes");
        2334  +
            .expect("unable to collect body")
        2335  +
            .to_bytes();
 2255   2336   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2256   2337   
            &body,
 2257   2338   
            "{\n    \"contents\": {\n        \"booleanValue\": true\n    }\n}",
 2258   2339   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2259   2340   
        ));
 2260   2341   
    }
 2261   2342   
 2262   2343   
    /// Deserializes a number union value
 2263   2344   
    /// Test ID: AwsJson10DeserializeNumberUnionValue
 2264   2345   
    #[::tokio::test]
 2265   2346   
    #[::tracing_test::traced_test]
 2266   2347   
    async fn aws_json10_deserialize_number_union_value_response() {
 2267   2348   
        let output = crate::output::JsonUnionsOutput {
 2268   2349   
            contents: ::std::option::Option::Some(crate::model::MyUnion::NumberValue(1)),
 2269   2350   
        };
 2270   2351   
        use ::aws_smithy_http_server::response::IntoResponse;
 2271   2352   
        let http_response = output.into_response();
 2272   2353   
        ::pretty_assertions::assert_eq!(
 2273         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2354  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2274   2355   
            http_response.status()
 2275   2356   
        );
 2276   2357   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2277   2358   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2278   2359   
            http_response.headers(),
 2279   2360   
            expected_headers,
 2280   2361   
        ));
 2281         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2362  +
        use ::http_body_util::BodyExt;
        2363  +
        let body = http_response
        2364  +
            .into_body()
        2365  +
            .collect()
 2282   2366   
            .await
 2283         -
            .expect("unable to extract body to bytes");
        2367  +
            .expect("unable to collect body")
        2368  +
            .to_bytes();
 2284   2369   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2285   2370   
            &body,
 2286   2371   
            "{\n    \"contents\": {\n        \"numberValue\": 1\n    }\n}",
 2287   2372   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2288   2373   
        ));
 2289   2374   
    }
 2290   2375   
 2291   2376   
    /// Deserializes a blob union value
 2292   2377   
    /// Test ID: AwsJson10DeserializeBlobUnionValue
 2293   2378   
    #[::tokio::test]
 2294   2379   
    #[::tracing_test::traced_test]
 2295   2380   
    async fn aws_json10_deserialize_blob_union_value_response() {
 2296   2381   
        let output = crate::output::JsonUnionsOutput {
 2297   2382   
            contents: ::std::option::Option::Some(crate::model::MyUnion::BlobValue(
 2298   2383   
                ::aws_smithy_types::Blob::new("foo"),
 2299   2384   
            )),
 2300   2385   
        };
 2301   2386   
        use ::aws_smithy_http_server::response::IntoResponse;
 2302   2387   
        let http_response = output.into_response();
 2303   2388   
        ::pretty_assertions::assert_eq!(
 2304         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2389  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2305   2390   
            http_response.status()
 2306   2391   
        );
 2307   2392   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2308   2393   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2309   2394   
            http_response.headers(),
 2310   2395   
            expected_headers,
 2311   2396   
        ));
 2312         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2397  +
        use ::http_body_util::BodyExt;
        2398  +
        let body = http_response
        2399  +
            .into_body()
        2400  +
            .collect()
 2313   2401   
            .await
 2314         -
            .expect("unable to extract body to bytes");
        2402  +
            .expect("unable to collect body")
        2403  +
            .to_bytes();
 2315   2404   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2316   2405   
            &body,
 2317   2406   
            "{\n    \"contents\": {\n        \"blobValue\": \"Zm9v\"\n    }\n}",
 2318   2407   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2319   2408   
        ));
 2320   2409   
    }
 2321   2410   
 2322   2411   
    /// Deserializes a timestamp union value
 2323   2412   
    /// Test ID: AwsJson10DeserializeTimestampUnionValue
 2324   2413   
    #[::tokio::test]
 2325   2414   
    #[::tracing_test::traced_test]
 2326   2415   
    async fn aws_json10_deserialize_timestamp_union_value_response() {
 2327   2416   
        let output = crate::output::JsonUnionsOutput {
 2328   2417   
            contents: ::std::option::Option::Some(crate::model::MyUnion::TimestampValue(
 2329   2418   
                ::aws_smithy_types::DateTime::from_fractional_secs(1398796238, 0_f64),
 2330   2419   
            )),
 2331   2420   
        };
 2332   2421   
        use ::aws_smithy_http_server::response::IntoResponse;
 2333   2422   
        let http_response = output.into_response();
 2334   2423   
        ::pretty_assertions::assert_eq!(
 2335         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2424  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2336   2425   
            http_response.status()
 2337   2426   
        );
 2338   2427   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2339   2428   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2340   2429   
            http_response.headers(),
 2341   2430   
            expected_headers,
 2342   2431   
        ));
 2343         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2432  +
        use ::http_body_util::BodyExt;
        2433  +
        let body = http_response
        2434  +
            .into_body()
        2435  +
            .collect()
 2344   2436   
            .await
 2345         -
            .expect("unable to extract body to bytes");
        2437  +
            .expect("unable to collect body")
        2438  +
            .to_bytes();
 2346   2439   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2347   2440   
            &body,
 2348   2441   
            "{\n    \"contents\": {\n        \"timestampValue\": 1398796238\n    }\n}",
 2349   2442   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2350   2443   
        ));
 2351   2444   
    }
 2352   2445   
 2353   2446   
    /// Deserializes an enum union value
 2354   2447   
    /// Test ID: AwsJson10DeserializeEnumUnionValue
 2355   2448   
    #[::tokio::test]
 2356   2449   
    #[::tracing_test::traced_test]
 2357   2450   
    async fn aws_json10_deserialize_enum_union_value_response() {
 2358   2451   
        let output = crate::output::JsonUnionsOutput {
 2359   2452   
            contents: ::std::option::Option::Some(crate::model::MyUnion::EnumValue(
 2360   2453   
                "Foo"
 2361   2454   
                    .parse::<crate::model::FooEnum>()
 2362   2455   
                    .expect("static value validated to member"),
 2363   2456   
            )),
 2364   2457   
        };
 2365   2458   
        use ::aws_smithy_http_server::response::IntoResponse;
 2366   2459   
        let http_response = output.into_response();
 2367   2460   
        ::pretty_assertions::assert_eq!(
 2368         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2461  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2369   2462   
            http_response.status()
 2370   2463   
        );
 2371   2464   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2372   2465   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2373   2466   
            http_response.headers(),
 2374   2467   
            expected_headers,
 2375   2468   
        ));
 2376         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2469  +
        use ::http_body_util::BodyExt;
        2470  +
        let body = http_response
        2471  +
            .into_body()
        2472  +
            .collect()
 2377   2473   
            .await
 2378         -
            .expect("unable to extract body to bytes");
        2474  +
            .expect("unable to collect body")
        2475  +
            .to_bytes();
 2379   2476   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2380   2477   
            &body,
 2381   2478   
            "{\n    \"contents\": {\n        \"enumValue\": \"Foo\"\n    }\n}",
 2382   2479   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2383   2480   
        ));
 2384   2481   
    }
 2385   2482   
 2386   2483   
    /// Deserializes an intEnum union value
 2387   2484   
    /// Test ID: AwsJson10DeserializeIntEnumUnionValue
 2388   2485   
    #[::tokio::test]
 2389   2486   
    #[::tracing_test::traced_test]
 2390   2487   
    async fn aws_json10_deserialize_int_enum_union_value_response() {
 2391   2488   
        let output = crate::output::JsonUnionsOutput {
 2392   2489   
            contents: ::std::option::Option::Some(crate::model::MyUnion::IntEnumValue(1)),
 2393   2490   
        };
 2394   2491   
        use ::aws_smithy_http_server::response::IntoResponse;
 2395   2492   
        let http_response = output.into_response();
 2396   2493   
        ::pretty_assertions::assert_eq!(
 2397         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2494  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2398   2495   
            http_response.status()
 2399   2496   
        );
 2400   2497   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2401   2498   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2402   2499   
            http_response.headers(),
 2403   2500   
            expected_headers,
 2404   2501   
        ));
 2405         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2502  +
        use ::http_body_util::BodyExt;
        2503  +
        let body = http_response
        2504  +
            .into_body()
        2505  +
            .collect()
 2406   2506   
            .await
 2407         -
            .expect("unable to extract body to bytes");
        2507  +
            .expect("unable to collect body")
        2508  +
            .to_bytes();
 2408   2509   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2409   2510   
            &body,
 2410   2511   
            "{\n    \"contents\": {\n        \"intEnumValue\": 1\n    }\n}",
 2411   2512   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2412   2513   
        ));
 2413   2514   
    }
 2414   2515   
 2415   2516   
    /// Deserializes a list union value
 2416   2517   
    /// Test ID: AwsJson10DeserializeListUnionValue
 2417   2518   
    #[::tokio::test]
 2418   2519   
    #[::tracing_test::traced_test]
 2419   2520   
    async fn aws_json10_deserialize_list_union_value_response() {
 2420   2521   
        let output = crate::output::JsonUnionsOutput {
 2421   2522   
            contents: ::std::option::Option::Some(crate::model::MyUnion::ListValue(vec![
 2422   2523   
                "foo".to_owned(),
 2423   2524   
                "bar".to_owned(),
 2424   2525   
            ])),
 2425   2526   
        };
 2426   2527   
        use ::aws_smithy_http_server::response::IntoResponse;
 2427   2528   
        let http_response = output.into_response();
 2428   2529   
        ::pretty_assertions::assert_eq!(
 2429         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2530  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2430   2531   
            http_response.status()
 2431   2532   
        );
 2432   2533   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2433   2534   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2434   2535   
            http_response.headers(),
 2435   2536   
            expected_headers,
 2436   2537   
        ));
 2437         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2538  +
        use ::http_body_util::BodyExt;
        2539  +
        let body = http_response
        2540  +
            .into_body()
        2541  +
            .collect()
 2438   2542   
            .await
 2439         -
            .expect("unable to extract body to bytes");
        2543  +
            .expect("unable to collect body")
        2544  +
            .to_bytes();
 2440   2545   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2441   2546   
            &body,
 2442   2547   
            "{\n    \"contents\": {\n        \"listValue\": [\"foo\", \"bar\"]\n    }\n}",
 2443   2548   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2444   2549   
        ));
 2445   2550   
    }
 2446   2551   
 2447   2552   
    /// Deserializes a map union value
 2448   2553   
    /// Test ID: AwsJson10DeserializeMapUnionValue
 2449   2554   
    #[::tokio::test]
 2450   2555   
    #[::tracing_test::traced_test]
 2451   2556   
    async fn aws_json10_deserialize_map_union_value_response() {
 2452   2557   
        let output = crate::output::JsonUnionsOutput {
 2453   2558   
            contents: ::std::option::Option::Some(crate::model::MyUnion::MapValue({
 2454   2559   
                let mut ret = ::std::collections::HashMap::new();
 2455   2560   
                ret.insert("foo".to_owned(), "bar".to_owned());
 2456   2561   
                ret.insert("spam".to_owned(), "eggs".to_owned());
 2457   2562   
                ret
 2458   2563   
            })),
 2459   2564   
        };
 2460   2565   
        use ::aws_smithy_http_server::response::IntoResponse;
 2461   2566   
        let http_response = output.into_response();
 2462   2567   
        ::pretty_assertions::assert_eq!(
 2463         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2568  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2464   2569   
            http_response.status()
 2465   2570   
        );
 2466   2571   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2467   2572   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2468   2573   
            http_response.headers(),
 2469   2574   
            expected_headers,
 2470   2575   
        ));
 2471         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2576  +
        use ::http_body_util::BodyExt;
        2577  +
        let body = http_response
        2578  +
            .into_body()
        2579  +
            .collect()
 2472   2580   
            .await
 2473         -
            .expect("unable to extract body to bytes");
        2581  +
            .expect("unable to collect body")
        2582  +
            .to_bytes();
 2474   2583   
        ::aws_smithy_protocol_test::assert_ok(
 2475   2584   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"contents\": {\n        \"mapValue\": {\n            \"foo\": \"bar\",\n            \"spam\": \"eggs\"\n        }\n    }\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2476   2585   
        );
 2477   2586   
    }
 2478   2587   
 2479   2588   
    /// Deserializes a structure union value
 2480   2589   
    /// Test ID: AwsJson10DeserializeStructureUnionValue
 2481   2590   
    #[::tokio::test]
 2482   2591   
    #[::tracing_test::traced_test]
 2483   2592   
    async fn aws_json10_deserialize_structure_union_value_response() {
 2484   2593   
        let output = crate::output::JsonUnionsOutput {
 2485   2594   
            contents: ::std::option::Option::Some(crate::model::MyUnion::StructureValue(
 2486   2595   
                crate::model::GreetingStruct {
 2487   2596   
                    hi: ::std::option::Option::Some("hello".to_owned()),
 2488   2597   
                },
 2489   2598   
            )),
 2490   2599   
        };
 2491   2600   
        use ::aws_smithy_http_server::response::IntoResponse;
 2492   2601   
        let http_response = output.into_response();
 2493   2602   
        ::pretty_assertions::assert_eq!(
 2494         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        2603  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 2495   2604   
            http_response.status()
 2496   2605   
        );
 2497   2606   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2498   2607   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2499   2608   
            http_response.headers(),
 2500   2609   
            expected_headers,
 2501   2610   
        ));
 2502         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2611  +
        use ::http_body_util::BodyExt;
        2612  +
        let body = http_response
        2613  +
            .into_body()
        2614  +
            .collect()
 2503   2615   
            .await
 2504         -
            .expect("unable to extract body to bytes");
        2616  +
            .expect("unable to collect body")
        2617  +
            .to_bytes();
 2505   2618   
        ::aws_smithy_protocol_test::assert_ok(
 2506   2619   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"contents\": {\n        \"structureValue\": {\n            \"hi\": \"hello\"\n        }\n    }\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2507   2620   
        );
 2508   2621   
    }
 2509   2622   
}
 2510   2623   
 2511   2624   
::pin_project_lite::pin_project! {
 2512   2625   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 2513   2626   
    /// [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput) using modelled bindings.
 2514   2627   
    pub struct GreetingWithErrorsInputFuture {
 2515   2628   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GreetingWithErrorsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
 2516   2629   
    }
 2517   2630   
}
 2518   2631   
 2519   2632   
impl std::future::Future for GreetingWithErrorsInputFuture {
 2520   2633   
    type Output = Result<
 2521   2634   
        crate::input::GreetingWithErrorsInput,
 2522   2635   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
 2523   2636   
    >;
 2524   2637   
 2525   2638   
    fn poll(
 2526   2639   
        self: std::pin::Pin<&mut Self>,
 2527   2640   
        cx: &mut std::task::Context<'_>,
 2528   2641   
    ) -> std::task::Poll<Self::Output> {
 2529   2642   
        let this = self.project();
 2530   2643   
        this.inner.as_mut().poll(cx)
 2531   2644   
    }
 2532   2645   
}
 2533   2646   
 2534   2647   
impl<B>
 2535   2648   
    ::aws_smithy_http_server::request::FromRequest<
 2536   2649   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 2537   2650   
        B,
 2538   2651   
    > for crate::input::GreetingWithErrorsInput
 2539   2652   
where
 2540   2653   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 2541   2654   
    B: 'static,
 2542   2655   
 2543   2656   
    B::Data: Send,
 2544   2657   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 2545   2658   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 2546   2659   
{
 2547   2660   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 2548   2661   
    type Future = GreetingWithErrorsInputFuture;
 2549   2662   
 2550         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        2663  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 2551   2664   
        let fut = async move {
 2552   2665   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 2553   2666   
                request.headers(),
 2554   2667   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 2555   2668   
            ) {
 2556   2669   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 2557   2670   
            }
 2558   2671   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_request(
 2559   2672   
                request,
 2560   2673   
            )
@@ -2605,2718 +3636,3829 @@
 2625   2738   
    #[::tokio::test]
 2626   2739   
    #[::tracing_test::traced_test]
 2627   2740   
    async fn aws_json10_invalid_greeting_error_response() {
 2628   2741   
        let output = crate::error::InvalidGreeting {
 2629   2742   
            message: ::std::option::Option::Some("Hi".to_owned()),
 2630   2743   
        };
 2631   2744   
        let output = crate::error::GreetingWithErrorsError::InvalidGreeting(output);
 2632   2745   
        use ::aws_smithy_http_server::response::IntoResponse;
 2633   2746   
        let http_response = output.into_response();
 2634   2747   
        ::pretty_assertions::assert_eq!(
 2635         -
            http::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
        2748  +
            ::http_1x::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
 2636   2749   
            http_response.status()
 2637   2750   
        );
 2638   2751   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2639   2752   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2640   2753   
            http_response.headers(),
 2641   2754   
            expected_headers,
 2642   2755   
        ));
 2643         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2756  +
        use ::http_body_util::BodyExt;
        2757  +
        let body = http_response
        2758  +
            .into_body()
        2759  +
            .collect()
 2644   2760   
            .await
 2645         -
            .expect("unable to extract body to bytes");
        2761  +
            .expect("unable to collect body")
        2762  +
            .to_bytes();
 2646   2763   
        ::aws_smithy_protocol_test::assert_ok(
 2647   2764   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"__type\": \"aws.protocoltests.json10#InvalidGreeting\",\n    \"Message\": \"Hi\"\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2648   2765   
        );
 2649   2766   
    }
 2650   2767   
 2651   2768   
    /// Parses a complex error with no message member
 2652   2769   
    /// Test ID: AwsJson10ComplexError
 2653   2770   
    #[::tokio::test]
 2654   2771   
    #[::tracing_test::traced_test]
 2655   2772   
    async fn aws_json10_complex_error_response() {
 2656   2773   
        let output = crate::error::ComplexError {
 2657   2774   
            top_level: ::std::option::Option::Some("Top level".to_owned()),
 2658   2775   
            nested: ::std::option::Option::Some(crate::model::ComplexNestedErrorData {
 2659   2776   
                foo: ::std::option::Option::Some("bar".to_owned()),
 2660   2777   
            }),
 2661   2778   
        };
 2662   2779   
        let output = crate::error::GreetingWithErrorsError::ComplexError(output);
 2663   2780   
        use ::aws_smithy_http_server::response::IntoResponse;
 2664   2781   
        let http_response = output.into_response();
 2665   2782   
        ::pretty_assertions::assert_eq!(
 2666         -
            http::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
        2783  +
            ::http_1x::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
 2667   2784   
            http_response.status()
 2668   2785   
        );
 2669   2786   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2670   2787   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2671   2788   
            http_response.headers(),
 2672   2789   
            expected_headers,
 2673   2790   
        ));
 2674         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2791  +
        use ::http_body_util::BodyExt;
        2792  +
        let body = http_response
        2793  +
            .into_body()
        2794  +
            .collect()
 2675   2795   
            .await
 2676         -
            .expect("unable to extract body to bytes");
        2796  +
            .expect("unable to collect body")
        2797  +
            .to_bytes();
 2677   2798   
        ::aws_smithy_protocol_test::assert_ok(
 2678   2799   
        ::aws_smithy_protocol_test::validate_body(&body, "{\n    \"__type\": \"aws.protocoltests.json10#ComplexError\",\n    \"TopLevel\": \"Top level\",\n    \"Nested\": {\n        \"Foo\": \"bar\"\n    }\n}", ::aws_smithy_protocol_test::MediaType::from("application/json"))
 2679   2800   
        );
 2680   2801   
    }
 2681   2802   
 2682   2803   
    /// Parses a complex error with an empty body
 2683   2804   
    /// Test ID: AwsJson10EmptyComplexError
 2684   2805   
    #[::tokio::test]
 2685   2806   
    #[::tracing_test::traced_test]
 2686   2807   
    async fn aws_json10_empty_complex_error_response() {
 2687   2808   
        let output = crate::error::ComplexError {
 2688   2809   
            top_level: ::std::option::Option::None,
 2689   2810   
            nested: ::std::option::Option::None,
 2690   2811   
        };
 2691   2812   
        let output = crate::error::GreetingWithErrorsError::ComplexError(output);
 2692   2813   
        use ::aws_smithy_http_server::response::IntoResponse;
 2693   2814   
        let http_response = output.into_response();
 2694   2815   
        ::pretty_assertions::assert_eq!(
 2695         -
            http::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
        2816  +
            ::http_1x::StatusCode::from_u16(400).expect("invalid expected HTTP status code"),
 2696   2817   
            http_response.status()
 2697   2818   
        );
 2698   2819   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 2699   2820   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 2700   2821   
            http_response.headers(),
 2701   2822   
            expected_headers,
 2702   2823   
        ));
 2703         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        2824  +
        use ::http_body_util::BodyExt;
        2825  +
        let body = http_response
        2826  +
            .into_body()
        2827  +
            .collect()
 2704   2828   
            .await
 2705         -
            .expect("unable to extract body to bytes");
        2829  +
            .expect("unable to collect body")
        2830  +
            .to_bytes();
 2706   2831   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 2707   2832   
            &body,
 2708   2833   
            "{\n    \"__type\": \"aws.protocoltests.json10#ComplexError\"\n}",
 2709   2834   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2710   2835   
        ));
 2711   2836   
    }
 2712   2837   
}
 2713   2838   
 2714   2839   
::pin_project_lite::pin_project! {
 2715   2840   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 2716   2841   
    /// [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput) using modelled bindings.
 2717   2842   
    pub struct SimpleScalarPropertiesInputFuture {
 2718   2843   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SimpleScalarPropertiesInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
 2719   2844   
    }
 2720   2845   
}
 2721   2846   
 2722   2847   
impl std::future::Future for SimpleScalarPropertiesInputFuture {
 2723   2848   
    type Output = Result<
 2724   2849   
        crate::input::SimpleScalarPropertiesInput,
 2725   2850   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
 2726   2851   
    >;
 2727   2852   
 2728   2853   
    fn poll(
 2729   2854   
        self: std::pin::Pin<&mut Self>,
 2730   2855   
        cx: &mut std::task::Context<'_>,
 2731   2856   
    ) -> std::task::Poll<Self::Output> {
 2732   2857   
        let this = self.project();
 2733   2858   
        this.inner.as_mut().poll(cx)
 2734   2859   
    }
 2735   2860   
}
 2736   2861   
 2737   2862   
impl<B>
 2738   2863   
    ::aws_smithy_http_server::request::FromRequest<
 2739   2864   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 2740   2865   
        B,
 2741   2866   
    > for crate::input::SimpleScalarPropertiesInput
 2742   2867   
where
 2743   2868   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 2744   2869   
    B: 'static,
 2745   2870   
 2746   2871   
    B::Data: Send,
 2747   2872   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 2748   2873   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 2749   2874   
{
 2750   2875   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 2751   2876   
    type Future = SimpleScalarPropertiesInputFuture;
 2752   2877   
 2753         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        2878  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 2754   2879   
        let fut = async move {
 2755   2880   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 2756   2881   
                request.headers(),
 2757   2882   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 2758   2883   
            ) {
 2759   2884   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 2760   2885   
            }
 2761   2886   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_request(request)
 2762   2887   
                            .await
 2763   2888   
        };
 2764   2889   
        use ::futures_util::future::TryFutureExt;
 2765   2890   
        let fut = fut.map_err(
 2766   2891   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 2767   2892   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 2768   2893   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 2769   2894   
            },
 2770   2895   
        );
 2771   2896   
        SimpleScalarPropertiesInputFuture {
 2772   2897   
            inner: Box::pin(fut),
 2773   2898   
        }
 2774   2899   
    }
 2775   2900   
}
 2776   2901   
impl
 2777   2902   
    ::aws_smithy_http_server::response::IntoResponse<
 2778   2903   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 2779   2904   
    > for crate::output::SimpleScalarPropertiesOutput
 2780   2905   
{
 2781   2906   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 2782   2907   
        match crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_http_response(self) {
 2783   2908   
                        Ok(response) => response,
 2784   2909   
                        Err(e) => {
 2785   2910   
                            ::tracing::error!(error = %e, "failed to serialize response");
 2786   2911   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
 2787   2912   
                        }
 2788   2913   
                    }
 2789   2914   
    }
 2790   2915   
}
 2791   2916   
 2792   2917   
#[allow(unreachable_code, unused_variables)]
 2793   2918   
#[cfg(test)]
 2794   2919   
mod simple_scalar_properties_test {
 2795   2920   
 2796   2921   
    /// Supports handling NaN float values.
 2797   2922   
    /// Test ID: AwsJson10SupportsNaNFloatInputs
 2798   2923   
    #[::tokio::test]
 2799   2924   
    #[::tracing_test::traced_test]
 2800   2925   
    async fn aws_json10_supports_na_n_float_inputs_request() {
 2801   2926   
        #[allow(unused_mut)]
 2802         -
        let mut http_request = http::Request::builder()
        2927  +
        let mut http_request = ::http_1x::Request::builder()
 2803   2928   
            .uri("/")
 2804   2929   
            .method("POST")
 2805   2930   
            .header("Content-Type", "application/x-amz-json-1.0")
 2806   2931   
            .header("X-Amz-Target", "JsonRpc10.SimpleScalarProperties")
 2807         -
            .body(::aws_smithy_http_server::body::Body::from(
 2808         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2809         -
                    "{\n    \"floatValue\": \"NaN\",\n    \"doubleValue\": \"NaN\"\n}".as_bytes(),
 2810         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2932  +
            .body(::aws_smithy_http_server::body::boxed(
        2933  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        2934  +
                    &::aws_smithy_protocol_test::decode_body_data(
        2935  +
                        "{\n    \"floatValue\": \"NaN\",\n    \"doubleValue\": \"NaN\"\n}"
        2936  +
                            .as_bytes(),
        2937  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        2938  +
                    ),
 2811   2939   
                )),
 2812   2940   
            ))
 2813   2941   
            .unwrap();
 2814   2942   
        #[allow(unused_mut)]
 2815   2943   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2816   2944   
        let config = crate::service::JsonRpc10Config::builder().build();
 2817         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2818         -
                        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
 2819         -
                            let sender = sender.clone();
 2820         -
                            async move {
 2821         -
                                let result = { use ::aws_smithy_protocol_test::FloatEquals;
 2822         -
        let expected =
 2823         -
            crate::input::SimpleScalarPropertiesInput {
 2824         -
                float_value:
 2825         -
                    ::std::option::Option::Some(
 2826         -
                        <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number")
 2827         -
                    )
 2828         -
                ,
 2829         -
                double_value:
 2830         -
                    ::std::option::Option::Some(
 2831         -
                        <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number")
 2832         -
                    )
 2833         -
                ,
 2834         -
            }
 2835         -
        ;
 2836         -
        assert!(input.float_value.float_equals(&expected.float_value),
 2837         -
                                            "Unexpected value for `float_value` {:?} vs. {:?}", expected.float_value, input.float_value);
 2838         -
        assert!(input.double_value.float_equals(&expected.double_value),
 2839         -
                                            "Unexpected value for `double_value` {:?} vs. {:?}", expected.double_value, input.double_value);
 2840         -
        let output =
 2841         -
            crate::output::SimpleScalarPropertiesOutput {
 2842         -
                float_value:
 2843         -
                    ::std::option::Option::None
 2844         -
                ,
 2845         -
                double_value:
 2846         -
                    ::std::option::Option::None
 2847         -
                ,
        2945  +
        let service = crate::service::JsonRpc10::builder::<
        2946  +
            ::aws_smithy_http_server::body::BoxBody,
        2947  +
            _,
        2948  +
            _,
        2949  +
            _,
        2950  +
        >(config)
        2951  +
        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
        2952  +
            let sender = sender.clone();
        2953  +
            async move {
        2954  +
                let result = {
        2955  +
                    use ::aws_smithy_protocol_test::FloatEquals;
        2956  +
                    let expected = crate::input::SimpleScalarPropertiesInput {
        2957  +
                        float_value: ::std::option::Option::Some(
        2958  +
                            <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        2959  +
                                "NaN",
        2960  +
                            )
        2961  +
                            .expect("invalid string for number"),
        2962  +
                        ),
        2963  +
                        double_value: ::std::option::Option::Some(
        2964  +
                            <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        2965  +
                                "NaN",
        2966  +
                            )
        2967  +
                            .expect("invalid string for number"),
        2968  +
                        ),
        2969  +
                    };
        2970  +
                    assert!(
        2971  +
                        input.float_value.float_equals(&expected.float_value),
        2972  +
                        "Unexpected value for `float_value` {:?} vs. {:?}",
        2973  +
                        expected.float_value,
        2974  +
                        input.float_value
        2975  +
                    );
        2976  +
                    assert!(
        2977  +
                        input.double_value.float_equals(&expected.double_value),
        2978  +
                        "Unexpected value for `double_value` {:?} vs. {:?}",
        2979  +
                        expected.double_value,
        2980  +
                        input.double_value
        2981  +
                    );
        2982  +
                    let output = crate::output::SimpleScalarPropertiesOutput {
        2983  +
                        float_value: ::std::option::Option::None,
        2984  +
                        double_value: ::std::option::Option::None,
        2985  +
                    };
        2986  +
                    output
        2987  +
                };
        2988  +
                sender.send(()).await.expect("receiver dropped early");
        2989  +
                result
 2848   2990   
            }
 2849         -
        ;
 2850         -
        output };
 2851         -
                                sender.send(()).await.expect("receiver dropped early");
 2852         -
                                result
 2853         -
                            }
 2854         -
                        })
 2855         -
                        .build_unchecked();
        2991  +
        })
        2992  +
        .build_unchecked();
 2856   2993   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2857   2994   
            .await
 2858   2995   
            .expect("unable to make an HTTP request");
 2859   2996   
        assert!(
 2860   2997   
            receiver.recv().await.is_some(),
 2861   2998   
            "we expected operation handler to be invoked but it was not entered"
 2862   2999   
        );
 2863   3000   
    }
 2864   3001   
 2865   3002   
    /// Supports handling Infinity float values.
 2866   3003   
    /// Test ID: AwsJson10SupportsInfinityFloatInputs
 2867   3004   
    #[::tokio::test]
 2868   3005   
    #[::tracing_test::traced_test]
 2869   3006   
    async fn aws_json10_supports_infinity_float_inputs_request() {
 2870   3007   
        #[allow(unused_mut)]
 2871         -
        let mut http_request = http::Request::builder()
 2872         -
            .uri("/")
 2873         -
            .method("POST")
 2874         -
            .header("Content-Type", "application/x-amz-json-1.0")
 2875         -
            .header("X-Amz-Target", "JsonRpc10.SimpleScalarProperties")
 2876         -
            .body(::aws_smithy_http_server::body::Body::from(
 2877         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2878         -
                    "{\n    \"floatValue\": \"Infinity\",\n    \"doubleValue\": \"Infinity\"\n}"
 2879         -
                        .as_bytes(),
 2880         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2881         -
                )),
 2882         -
            ))
 2883         -
            .unwrap();
        3008  +
                    let mut http_request = ::http_1x::Request::builder()
        3009  +
                        .uri("/")
        3010  +
                        .method("POST")
        3011  +
        .header("Content-Type", "application/x-amz-json-1.0")
        3012  +
        .header("X-Amz-Target", "JsonRpc10.SimpleScalarProperties")
        3013  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
        3014  +
                        ::bytes::Bytes::copy_from_slice(
        3015  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"floatValue\": \"Infinity\",\n    \"doubleValue\": \"Infinity\"\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
        3016  +
                        )
        3017  +
                        ))).unwrap();
 2884   3018   
        #[allow(unused_mut)]
 2885   3019   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2886   3020   
        let config = crate::service::JsonRpc10Config::builder().build();
 2887         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2888         -
                        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
 2889         -
                            let sender = sender.clone();
 2890         -
                            async move {
 2891         -
                                let result = { use ::aws_smithy_protocol_test::FloatEquals;
 2892         -
        let expected =
 2893         -
            crate::input::SimpleScalarPropertiesInput {
 2894         -
                float_value:
 2895         -
                    ::std::option::Option::Some(
 2896         -
                        <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number")
 2897         -
                    )
 2898         -
                ,
 2899         -
                double_value:
 2900         -
                    ::std::option::Option::Some(
 2901         -
                        <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number")
 2902         -
                    )
 2903         -
                ,
 2904         -
            }
 2905         -
        ;
 2906         -
        assert!(input.float_value.float_equals(&expected.float_value),
 2907         -
                                            "Unexpected value for `float_value` {:?} vs. {:?}", expected.float_value, input.float_value);
 2908         -
        assert!(input.double_value.float_equals(&expected.double_value),
 2909         -
                                            "Unexpected value for `double_value` {:?} vs. {:?}", expected.double_value, input.double_value);
 2910         -
        let output =
 2911         -
            crate::output::SimpleScalarPropertiesOutput {
 2912         -
                float_value:
 2913         -
                    ::std::option::Option::None
 2914         -
                ,
 2915         -
                double_value:
 2916         -
                    ::std::option::Option::None
 2917         -
                ,
        3021  +
        let service = crate::service::JsonRpc10::builder::<
        3022  +
            ::aws_smithy_http_server::body::BoxBody,
        3023  +
            _,
        3024  +
            _,
        3025  +
            _,
        3026  +
        >(config)
        3027  +
        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
        3028  +
            let sender = sender.clone();
        3029  +
            async move {
        3030  +
                let result = {
        3031  +
                    use ::aws_smithy_protocol_test::FloatEquals;
        3032  +
                    let expected = crate::input::SimpleScalarPropertiesInput {
        3033  +
                        float_value: ::std::option::Option::Some(
        3034  +
                            <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        3035  +
                                "Infinity",
        3036  +
                            )
        3037  +
                            .expect("invalid string for number"),
        3038  +
                        ),
        3039  +
                        double_value: ::std::option::Option::Some(
        3040  +
                            <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        3041  +
                                "Infinity",
        3042  +
                            )
        3043  +
                            .expect("invalid string for number"),
        3044  +
                        ),
        3045  +
                    };
        3046  +
                    assert!(
        3047  +
                        input.float_value.float_equals(&expected.float_value),
        3048  +
                        "Unexpected value for `float_value` {:?} vs. {:?}",
        3049  +
                        expected.float_value,
        3050  +
                        input.float_value
        3051  +
                    );
        3052  +
                    assert!(
        3053  +
                        input.double_value.float_equals(&expected.double_value),
        3054  +
                        "Unexpected value for `double_value` {:?} vs. {:?}",
        3055  +
                        expected.double_value,
        3056  +
                        input.double_value
        3057  +
                    );
        3058  +
                    let output = crate::output::SimpleScalarPropertiesOutput {
        3059  +
                        float_value: ::std::option::Option::None,
        3060  +
                        double_value: ::std::option::Option::None,
        3061  +
                    };
        3062  +
                    output
        3063  +
                };
        3064  +
                sender.send(()).await.expect("receiver dropped early");
        3065  +
                result
 2918   3066   
            }
 2919         -
        ;
 2920         -
        output };
 2921         -
                                sender.send(()).await.expect("receiver dropped early");
 2922         -
                                result
 2923         -
                            }
 2924         -
                        })
 2925         -
                        .build_unchecked();
        3067  +
        })
        3068  +
        .build_unchecked();
 2926   3069   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2927   3070   
            .await
 2928   3071   
            .expect("unable to make an HTTP request");
 2929   3072   
        assert!(
 2930   3073   
            receiver.recv().await.is_some(),
 2931   3074   
            "we expected operation handler to be invoked but it was not entered"
 2932   3075   
        );
 2933   3076   
    }
 2934   3077   
 2935   3078   
    /// Supports handling -Infinity float values.
 2936   3079   
    /// Test ID: AwsJson10SupportsNegativeInfinityFloatInputs
 2937   3080   
    #[::tokio::test]
 2938   3081   
    #[::tracing_test::traced_test]
 2939   3082   
    async fn aws_json10_supports_negative_infinity_float_inputs_request() {
 2940   3083   
        #[allow(unused_mut)]
 2941         -
        let mut http_request = http::Request::builder()
 2942         -
            .uri("/")
 2943         -
            .method("POST")
 2944         -
            .header("Content-Type", "application/x-amz-json-1.0")
 2945         -
            .header("X-Amz-Target", "JsonRpc10.SimpleScalarProperties")
 2946         -
            .body(::aws_smithy_http_server::body::Body::from(
 2947         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 2948         -
                    "{\n    \"floatValue\": \"-Infinity\",\n    \"doubleValue\": \"-Infinity\"\n}"
 2949         -
                        .as_bytes(),
 2950         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
 2951         -
                )),
 2952         -
            ))
 2953         -
            .unwrap();
        3084  +
                    let mut http_request = ::http_1x::Request::builder()
        3085  +
                        .uri("/")
        3086  +
                        .method("POST")
        3087  +
        .header("Content-Type", "application/x-amz-json-1.0")
        3088  +
        .header("X-Amz-Target", "JsonRpc10.SimpleScalarProperties")
        3089  +
        .body(::aws_smithy_http_server::body::boxed(::http_body_util::Full::new(
        3090  +
                        ::bytes::Bytes::copy_from_slice(
        3091  +
                            &::aws_smithy_protocol_test::decode_body_data("{\n    \"floatValue\": \"-Infinity\",\n    \"doubleValue\": \"-Infinity\"\n}".as_bytes(), ::aws_smithy_protocol_test::MediaType::from("application/json"))
        3092  +
                        )
        3093  +
                        ))).unwrap();
 2954   3094   
        #[allow(unused_mut)]
 2955   3095   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 2956   3096   
        let config = crate::service::JsonRpc10Config::builder().build();
 2957         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 2958         -
                        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
 2959         -
                            let sender = sender.clone();
 2960         -
                            async move {
 2961         -
                                let result = { use ::aws_smithy_protocol_test::FloatEquals;
 2962         -
        let expected =
 2963         -
            crate::input::SimpleScalarPropertiesInput {
 2964         -
                float_value:
 2965         -
                    ::std::option::Option::Some(
 2966         -
                        <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number")
 2967         -
                    )
 2968         -
                ,
 2969         -
                double_value:
 2970         -
                    ::std::option::Option::Some(
 2971         -
                        <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number")
 2972         -
                    )
 2973         -
                ,
 2974         -
            }
 2975         -
        ;
 2976         -
        assert!(input.float_value.float_equals(&expected.float_value),
 2977         -
                                            "Unexpected value for `float_value` {:?} vs. {:?}", expected.float_value, input.float_value);
 2978         -
        assert!(input.double_value.float_equals(&expected.double_value),
 2979         -
                                            "Unexpected value for `double_value` {:?} vs. {:?}", expected.double_value, input.double_value);
 2980         -
        let output =
 2981         -
            crate::output::SimpleScalarPropertiesOutput {
 2982         -
                float_value:
 2983         -
                    ::std::option::Option::None
 2984         -
                ,
 2985         -
                double_value:
 2986         -
                    ::std::option::Option::None
 2987         -
                ,
        3097  +
        let service = crate::service::JsonRpc10::builder::<
        3098  +
            ::aws_smithy_http_server::body::BoxBody,
        3099  +
            _,
        3100  +
            _,
        3101  +
            _,
        3102  +
        >(config)
        3103  +
        .simple_scalar_properties(move |input: crate::input::SimpleScalarPropertiesInput| {
        3104  +
            let sender = sender.clone();
        3105  +
            async move {
        3106  +
                let result = {
        3107  +
                    use ::aws_smithy_protocol_test::FloatEquals;
        3108  +
                    let expected = crate::input::SimpleScalarPropertiesInput {
        3109  +
                        float_value: ::std::option::Option::Some(
        3110  +
                            <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        3111  +
                                "-Infinity",
        3112  +
                            )
        3113  +
                            .expect("invalid string for number"),
        3114  +
                        ),
        3115  +
                        double_value: ::std::option::Option::Some(
        3116  +
                            <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
        3117  +
                                "-Infinity",
        3118  +
                            )
        3119  +
                            .expect("invalid string for number"),
        3120  +
                        ),
        3121  +
                    };
        3122  +
                    assert!(
        3123  +
                        input.float_value.float_equals(&expected.float_value),
        3124  +
                        "Unexpected value for `float_value` {:?} vs. {:?}",
        3125  +
                        expected.float_value,
        3126  +
                        input.float_value
        3127  +
                    );
        3128  +
                    assert!(
        3129  +
                        input.double_value.float_equals(&expected.double_value),
        3130  +
                        "Unexpected value for `double_value` {:?} vs. {:?}",
        3131  +
                        expected.double_value,
        3132  +
                        input.double_value
        3133  +
                    );
        3134  +
                    let output = crate::output::SimpleScalarPropertiesOutput {
        3135  +
                        float_value: ::std::option::Option::None,
        3136  +
                        double_value: ::std::option::Option::None,
        3137  +
                    };
        3138  +
                    output
        3139  +
                };
        3140  +
                sender.send(()).await.expect("receiver dropped early");
        3141  +
                result
 2988   3142   
            }
 2989         -
        ;
 2990         -
        output };
 2991         -
                                sender.send(()).await.expect("receiver dropped early");
 2992         -
                                result
 2993         -
                            }
 2994         -
                        })
 2995         -
                        .build_unchecked();
        3143  +
        })
        3144  +
        .build_unchecked();
 2996   3145   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 2997   3146   
            .await
 2998   3147   
            .expect("unable to make an HTTP request");
 2999   3148   
        assert!(
 3000   3149   
            receiver.recv().await.is_some(),
 3001   3150   
            "we expected operation handler to be invoked but it was not entered"
 3002   3151   
        );
 3003   3152   
    }
 3004   3153   
 3005   3154   
    /// Supports handling NaN float values.
 3006   3155   
    /// Test ID: AwsJson10SupportsNaNFloatInputs
 3007   3156   
    #[::tokio::test]
 3008   3157   
    #[::tracing_test::traced_test]
 3009   3158   
    async fn aws_json10_supports_na_n_float_inputs_response() {
 3010   3159   
        let output = crate::output::SimpleScalarPropertiesOutput {
 3011   3160   
            float_value: ::std::option::Option::Some(
 3012   3161   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN")
 3013   3162   
                    .expect("invalid string for number"),
 3014   3163   
            ),
 3015   3164   
            double_value: ::std::option::Option::Some(
 3016   3165   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN")
 3017   3166   
                    .expect("invalid string for number"),
 3018   3167   
            ),
 3019   3168   
        };
 3020   3169   
        use ::aws_smithy_http_server::response::IntoResponse;
 3021   3170   
        let http_response = output.into_response();
 3022   3171   
        ::pretty_assertions::assert_eq!(
 3023         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3172  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3024   3173   
            http_response.status()
 3025   3174   
        );
 3026   3175   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3027   3176   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3028   3177   
            http_response.headers(),
 3029   3178   
            expected_headers,
 3030   3179   
        ));
 3031         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3180  +
        use ::http_body_util::BodyExt;
        3181  +
        let body = http_response
        3182  +
            .into_body()
        3183  +
            .collect()
 3032   3184   
            .await
 3033         -
            .expect("unable to extract body to bytes");
        3185  +
            .expect("unable to collect body")
        3186  +
            .to_bytes();
 3034   3187   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 3035   3188   
            &body,
 3036   3189   
            "{\n    \"floatValue\": \"NaN\",\n    \"doubleValue\": \"NaN\"\n}",
 3037   3190   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 3038   3191   
        ));
 3039   3192   
    }
 3040   3193   
 3041   3194   
    /// Supports handling Infinity float values.
 3042   3195   
    /// Test ID: AwsJson10SupportsInfinityFloatInputs
 3043   3196   
    #[::tokio::test]
 3044   3197   
    #[::tracing_test::traced_test]
 3045   3198   
    async fn aws_json10_supports_infinity_float_inputs_response() {
 3046   3199   
        let output = crate::output::SimpleScalarPropertiesOutput {
 3047   3200   
            float_value: ::std::option::Option::Some(
 3048   3201   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity")
 3049   3202   
                    .expect("invalid string for number"),
 3050   3203   
            ),
 3051   3204   
            double_value: ::std::option::Option::Some(
 3052   3205   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity")
 3053   3206   
                    .expect("invalid string for number"),
 3054   3207   
            ),
 3055   3208   
        };
 3056   3209   
        use ::aws_smithy_http_server::response::IntoResponse;
 3057   3210   
        let http_response = output.into_response();
 3058   3211   
        ::pretty_assertions::assert_eq!(
 3059         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3212  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3060   3213   
            http_response.status()
 3061   3214   
        );
 3062   3215   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3063   3216   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3064   3217   
            http_response.headers(),
 3065   3218   
            expected_headers,
 3066   3219   
        ));
 3067         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3220  +
        use ::http_body_util::BodyExt;
        3221  +
        let body = http_response
        3222  +
            .into_body()
        3223  +
            .collect()
 3068   3224   
            .await
 3069         -
            .expect("unable to extract body to bytes");
        3225  +
            .expect("unable to collect body")
        3226  +
            .to_bytes();
 3070   3227   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 3071   3228   
            &body,
 3072   3229   
            "{\n    \"floatValue\": \"Infinity\",\n    \"doubleValue\": \"Infinity\"\n}",
 3073   3230   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 3074   3231   
        ));
 3075   3232   
    }
 3076   3233   
 3077   3234   
    /// Supports handling -Infinity float values.
 3078   3235   
    /// Test ID: AwsJson10SupportsNegativeInfinityFloatInputs
 3079   3236   
    #[::tokio::test]
 3080   3237   
    #[::tracing_test::traced_test]
 3081   3238   
    async fn aws_json10_supports_negative_infinity_float_inputs_response() {
 3082   3239   
        let output = crate::output::SimpleScalarPropertiesOutput {
 3083   3240   
            float_value: ::std::option::Option::Some(
 3084   3241   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity")
 3085   3242   
                    .expect("invalid string for number"),
 3086   3243   
            ),
 3087   3244   
            double_value: ::std::option::Option::Some(
 3088   3245   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity")
 3089   3246   
                    .expect("invalid string for number"),
 3090   3247   
            ),
 3091   3248   
        };
 3092   3249   
        use ::aws_smithy_http_server::response::IntoResponse;
 3093   3250   
        let http_response = output.into_response();
 3094   3251   
        ::pretty_assertions::assert_eq!(
 3095         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3252  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3096   3253   
            http_response.status()
 3097   3254   
        );
 3098   3255   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3099   3256   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3100   3257   
            http_response.headers(),
 3101   3258   
            expected_headers,
 3102   3259   
        ));
 3103         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3260  +
        use ::http_body_util::BodyExt;
        3261  +
        let body = http_response
        3262  +
            .into_body()
        3263  +
            .collect()
 3104   3264   
            .await
 3105         -
            .expect("unable to extract body to bytes");
        3265  +
            .expect("unable to collect body")
        3266  +
            .to_bytes();
 3106   3267   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 3107   3268   
            &body,
 3108   3269   
            "{\n    \"floatValue\": \"-Infinity\",\n    \"doubleValue\": \"-Infinity\"\n}",
 3109   3270   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 3110   3271   
        ));
 3111   3272   
    }
 3112   3273   
}
 3113   3274   
 3114   3275   
::pin_project_lite::pin_project! {
 3115   3276   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 3116   3277   
    /// [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput) using modelled bindings.
 3117   3278   
    pub struct EmptyInputAndEmptyOutputInputFuture {
 3118   3279   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyInputAndEmptyOutputInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
 3119   3280   
    }
 3120   3281   
}
 3121   3282   
 3122   3283   
impl std::future::Future for EmptyInputAndEmptyOutputInputFuture {
 3123   3284   
    type Output = Result<
 3124   3285   
        crate::input::EmptyInputAndEmptyOutputInput,
 3125   3286   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
 3126   3287   
    >;
 3127   3288   
 3128   3289   
    fn poll(
 3129   3290   
        self: std::pin::Pin<&mut Self>,
 3130   3291   
        cx: &mut std::task::Context<'_>,
 3131   3292   
    ) -> std::task::Poll<Self::Output> {
 3132   3293   
        let this = self.project();
 3133   3294   
        this.inner.as_mut().poll(cx)
 3134   3295   
    }
 3135   3296   
}
 3136   3297   
 3137   3298   
impl<B>
 3138   3299   
    ::aws_smithy_http_server::request::FromRequest<
 3139   3300   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3140   3301   
        B,
 3141   3302   
    > for crate::input::EmptyInputAndEmptyOutputInput
 3142   3303   
where
 3143   3304   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 3144   3305   
    B: 'static,
 3145   3306   
 3146   3307   
    B::Data: Send,
 3147   3308   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 3148   3309   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 3149   3310   
{
 3150   3311   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 3151   3312   
    type Future = EmptyInputAndEmptyOutputInputFuture;
 3152   3313   
 3153         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        3314  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 3154   3315   
        let fut = async move {
 3155   3316   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 3156   3317   
                request.headers(),
 3157   3318   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 3158   3319   
            ) {
 3159   3320   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 3160   3321   
            }
 3161   3322   
            crate::protocol_serde::shape_empty_input_and_empty_output::de_empty_input_and_empty_output_http_request(request)
 3162   3323   
                            .await
 3163   3324   
        };
 3164   3325   
        use ::futures_util::future::TryFutureExt;
 3165   3326   
        let fut = fut.map_err(
 3166   3327   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 3167   3328   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 3168   3329   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 3169   3330   
            },
 3170   3331   
        );
 3171   3332   
        EmptyInputAndEmptyOutputInputFuture {
 3172   3333   
            inner: Box::pin(fut),
 3173   3334   
        }
 3174   3335   
    }
 3175   3336   
}
 3176   3337   
impl
 3177   3338   
    ::aws_smithy_http_server::response::IntoResponse<
 3178   3339   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3179   3340   
    > for crate::output::EmptyInputAndEmptyOutputOutput
 3180   3341   
{
 3181   3342   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 3182   3343   
        match crate::protocol_serde::shape_empty_input_and_empty_output::ser_empty_input_and_empty_output_http_response(self) {
 3183   3344   
                        Ok(response) => response,
 3184   3345   
                        Err(e) => {
 3185   3346   
                            ::tracing::error!(error = %e, "failed to serialize response");
 3186   3347   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
 3187   3348   
                        }
 3188   3349   
                    }
 3189   3350   
    }
 3190   3351   
}
 3191   3352   
 3192   3353   
#[allow(unreachable_code, unused_variables)]
 3193   3354   
#[cfg(test)]
 3194   3355   
mod empty_input_and_empty_output_test {
 3195   3356   
 3196   3357   
    /// Clients must always send an empty object if input is modeled.
 3197   3358   
    /// Test ID: AwsJson10EmptyInputAndEmptyOutput
 3198   3359   
    #[::tokio::test]
 3199   3360   
    #[::tracing_test::traced_test]
 3200   3361   
    async fn aws_json10_empty_input_and_empty_output_request() {
 3201   3362   
        #[allow(unused_mut)]
 3202         -
        let mut http_request = http::Request::builder()
        3363  +
        let mut http_request = ::http_1x::Request::builder()
 3203   3364   
            .uri("/")
 3204   3365   
            .method("POST")
 3205   3366   
            .header("Content-Type", "application/x-amz-json-1.0")
 3206   3367   
            .header("X-Amz-Target", "JsonRpc10.EmptyInputAndEmptyOutput")
 3207         -
            .body(::aws_smithy_http_server::body::Body::from(
 3208         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3209         -
                    "{}".as_bytes(),
 3210         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3368  +
            .body(::aws_smithy_http_server::body::boxed(
        3369  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        3370  +
                    &::aws_smithy_protocol_test::decode_body_data(
        3371  +
                        "{}".as_bytes(),
        3372  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3373  +
                    ),
 3211   3374   
                )),
 3212   3375   
            ))
 3213   3376   
            .unwrap();
 3214   3377   
        #[allow(unused_mut)]
 3215   3378   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3216   3379   
        let config = crate::service::JsonRpc10Config::builder().build();
 3217         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
 3218         -
            .empty_input_and_empty_output(
 3219         -
                move |input: crate::input::EmptyInputAndEmptyOutputInput| {
 3220         -
                    let sender = sender.clone();
 3221         -
                    async move {
 3222         -
                        let result = {
 3223         -
                            let expected = crate::input::EmptyInputAndEmptyOutputInput {};
 3224         -
                            ::pretty_assertions::assert_eq!(input, expected);
 3225         -
                            let output = crate::output::EmptyInputAndEmptyOutputOutput {};
 3226         -
                            output
 3227         -
                        };
 3228         -
                        sender.send(()).await.expect("receiver dropped early");
 3229         -
                        result
 3230         -
                    }
 3231         -
                },
 3232         -
            )
 3233         -
            .build_unchecked();
        3380  +
        let service = crate::service::JsonRpc10::builder::<
        3381  +
            ::aws_smithy_http_server::body::BoxBody,
        3382  +
            _,
        3383  +
            _,
        3384  +
            _,
        3385  +
        >(config)
        3386  +
        .empty_input_and_empty_output(move |input: crate::input::EmptyInputAndEmptyOutputInput| {
        3387  +
            let sender = sender.clone();
        3388  +
            async move {
        3389  +
                let result = {
        3390  +
                    let expected = crate::input::EmptyInputAndEmptyOutputInput {};
        3391  +
                    ::pretty_assertions::assert_eq!(input, expected);
        3392  +
                    let output = crate::output::EmptyInputAndEmptyOutputOutput {};
        3393  +
                    output
        3394  +
                };
        3395  +
                sender.send(()).await.expect("receiver dropped early");
        3396  +
                result
        3397  +
            }
        3398  +
        })
        3399  +
        .build_unchecked();
 3234   3400   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 3235   3401   
            .await
 3236   3402   
            .expect("unable to make an HTTP request");
 3237   3403   
        assert!(
 3238   3404   
            receiver.recv().await.is_some(),
 3239   3405   
            "we expected operation handler to be invoked but it was not entered"
 3240   3406   
        );
 3241   3407   
    }
 3242   3408   
 3243   3409   
    /// A service will always return a JSON object for operations with modeled output.
 3244   3410   
    /// Test ID: AwsJson10EmptyInputAndEmptyOutputSendJsonObject
 3245   3411   
    #[::tokio::test]
 3246   3412   
    #[::tracing_test::traced_test]
 3247   3413   
    async fn aws_json10_empty_input_and_empty_output_send_json_object_response() {
 3248   3414   
        let output = crate::output::EmptyInputAndEmptyOutputOutput {};
 3249   3415   
        use ::aws_smithy_http_server::response::IntoResponse;
 3250   3416   
        let http_response = output.into_response();
 3251   3417   
        ::pretty_assertions::assert_eq!(
 3252         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3418  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3253   3419   
            http_response.status()
 3254   3420   
        );
 3255   3421   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3256   3422   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3257   3423   
            http_response.headers(),
 3258   3424   
            expected_headers,
 3259   3425   
        ));
 3260         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3426  +
        use ::http_body_util::BodyExt;
        3427  +
        let body = http_response
        3428  +
            .into_body()
        3429  +
            .collect()
 3261   3430   
            .await
 3262         -
            .expect("unable to extract body to bytes");
        3431  +
            .expect("unable to collect body")
        3432  +
            .to_bytes();
 3263   3433   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 3264   3434   
            &body,
 3265   3435   
            "{}",
 3266   3436   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 3267   3437   
        ));
 3268   3438   
    }
 3269   3439   
}
 3270   3440   
 3271   3441   
::pin_project_lite::pin_project! {
 3272   3442   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 3273   3443   
    /// [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput) using modelled bindings.
 3274   3444   
    pub struct NoInputAndOutputInputFuture {
 3275   3445   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndOutputInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
 3276   3446   
    }
 3277   3447   
}
 3278   3448   
 3279   3449   
impl std::future::Future for NoInputAndOutputInputFuture {
 3280   3450   
    type Output = Result<
 3281   3451   
        crate::input::NoInputAndOutputInput,
 3282   3452   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
 3283   3453   
    >;
 3284   3454   
 3285   3455   
    fn poll(
 3286   3456   
        self: std::pin::Pin<&mut Self>,
 3287   3457   
        cx: &mut std::task::Context<'_>,
 3288   3458   
    ) -> std::task::Poll<Self::Output> {
 3289   3459   
        let this = self.project();
 3290   3460   
        this.inner.as_mut().poll(cx)
 3291   3461   
    }
 3292   3462   
}
 3293   3463   
 3294   3464   
impl<B>
 3295   3465   
    ::aws_smithy_http_server::request::FromRequest<
 3296   3466   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3297   3467   
        B,
 3298   3468   
    > for crate::input::NoInputAndOutputInput
 3299   3469   
where
 3300   3470   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 3301   3471   
    B: 'static,
 3302   3472   
 3303   3473   
    B::Data: Send,
 3304   3474   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 3305   3475   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 3306   3476   
{
 3307   3477   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 3308   3478   
    type Future = NoInputAndOutputInputFuture;
 3309   3479   
 3310         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        3480  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 3311   3481   
        let fut = async move {
 3312   3482   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 3313   3483   
                request.headers(),
 3314   3484   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 3315   3485   
            ) {
 3316   3486   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 3317   3487   
            }
 3318   3488   
            crate::protocol_serde::shape_no_input_and_output::de_no_input_and_output_http_request(
 3319   3489   
                request,
 3320   3490   
            )
 3321   3491   
            .await
 3322   3492   
        };
 3323   3493   
        use ::futures_util::future::TryFutureExt;
 3324   3494   
        let fut = fut.map_err(
 3325   3495   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 3326   3496   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 3327   3497   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 3328   3498   
            },
 3329   3499   
        );
 3330   3500   
        NoInputAndOutputInputFuture {
 3331   3501   
            inner: Box::pin(fut),
 3332   3502   
        }
 3333   3503   
    }
 3334   3504   
}
 3335   3505   
impl
 3336   3506   
    ::aws_smithy_http_server::response::IntoResponse<
 3337   3507   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3338   3508   
    > for crate::output::NoInputAndOutputOutput
 3339   3509   
{
 3340   3510   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 3341   3511   
        match crate::protocol_serde::shape_no_input_and_output::ser_no_input_and_output_http_response(self) {
 3342   3512   
                        Ok(response) => response,
 3343   3513   
                        Err(e) => {
 3344   3514   
                            ::tracing::error!(error = %e, "failed to serialize response");
 3345   3515   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
 3346   3516   
                        }
 3347   3517   
                    }
 3348   3518   
    }
 3349   3519   
}
 3350   3520   
 3351   3521   
#[allow(unreachable_code, unused_variables)]
 3352   3522   
#[cfg(test)]
 3353   3523   
mod no_input_and_output_test {
 3354   3524   
 3355   3525   
    /// A client should always send and empty JSON object payload.
 3356   3526   
    /// Test ID: AwsJson10NoInputAndOutput
 3357   3527   
    #[::tokio::test]
 3358   3528   
    #[::tracing_test::traced_test]
 3359   3529   
    async fn aws_json10_no_input_and_output_request() {
 3360   3530   
        #[allow(unused_mut)]
 3361         -
        let mut http_request = http::Request::builder()
        3531  +
        let mut http_request = ::http_1x::Request::builder()
 3362   3532   
            .uri("/")
 3363   3533   
            .method("POST")
 3364   3534   
            .header("Content-Type", "application/x-amz-json-1.0")
 3365   3535   
            .header("X-Amz-Target", "JsonRpc10.NoInputAndOutput")
 3366         -
            .body(::aws_smithy_http_server::body::Body::from(
 3367         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3368         -
                    "{}".as_bytes(),
 3369         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3536  +
            .body(::aws_smithy_http_server::body::boxed(
        3537  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        3538  +
                    &::aws_smithy_protocol_test::decode_body_data(
        3539  +
                        "{}".as_bytes(),
        3540  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3541  +
                    ),
 3370   3542   
                )),
 3371   3543   
            ))
 3372   3544   
            .unwrap();
 3373   3545   
        #[allow(unused_mut)]
 3374   3546   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3375   3547   
        let config = crate::service::JsonRpc10Config::builder().build();
 3376         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        3548  +
        let service =
        3549  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        3550  +
                config,
        3551  +
            )
 3377   3552   
            .no_input_and_output(move |input: crate::input::NoInputAndOutputInput| {
 3378   3553   
                let sender = sender.clone();
 3379   3554   
                async move {
 3380   3555   
                    let result = {
 3381   3556   
                        let expected = crate::input::NoInputAndOutputInput {};
 3382   3557   
                        ::pretty_assertions::assert_eq!(input, expected);
 3383   3558   
                        let output = crate::output::NoInputAndOutputOutput {};
 3384   3559   
                        output
 3385   3560   
                    };
 3386   3561   
                    sender.send(()).await.expect("receiver dropped early");
 3387   3562   
                    result
 3388   3563   
                }
 3389   3564   
            })
 3390   3565   
            .build_unchecked();
 3391   3566   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 3392   3567   
            .await
 3393   3568   
            .expect("unable to make an HTTP request");
 3394   3569   
        assert!(
 3395   3570   
            receiver.recv().await.is_some(),
 3396   3571   
            "we expected operation handler to be invoked but it was not entered"
 3397   3572   
        );
 3398   3573   
    }
 3399   3574   
 3400   3575   
    /// Empty output always serializes an empty object payload.
 3401   3576   
    /// Test ID: AwsJson10NoInputAndOutput
 3402   3577   
    #[::tokio::test]
 3403   3578   
    #[::tracing_test::traced_test]
 3404   3579   
    async fn aws_json10_no_input_and_output_response() {
 3405   3580   
        let output = crate::output::NoInputAndOutputOutput {};
 3406   3581   
        use ::aws_smithy_http_server::response::IntoResponse;
 3407   3582   
        let http_response = output.into_response();
 3408   3583   
        ::pretty_assertions::assert_eq!(
 3409         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3584  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3410   3585   
            http_response.status()
 3411   3586   
        );
 3412   3587   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3413   3588   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3414   3589   
            http_response.headers(),
 3415   3590   
            expected_headers,
 3416   3591   
        ));
 3417         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3592  +
        use ::http_body_util::BodyExt;
        3593  +
        let body = http_response
        3594  +
            .into_body()
        3595  +
            .collect()
 3418   3596   
            .await
 3419         -
            .expect("unable to extract body to bytes");
        3597  +
            .expect("unable to collect body")
        3598  +
            .to_bytes();
 3420   3599   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 3421   3600   
            &body,
 3422   3601   
            "{}",
 3423   3602   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
 3424   3603   
        ));
 3425   3604   
    }
 3426   3605   
}
 3427   3606   
 3428   3607   
::pin_project_lite::pin_project! {
 3429   3608   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 3430   3609   
    /// [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput) using modelled bindings.
 3431   3610   
    pub struct NoInputAndNoOutputInputFuture {
 3432   3611   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndNoOutputInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
 3433   3612   
    }
 3434   3613   
}
 3435   3614   
 3436   3615   
impl std::future::Future for NoInputAndNoOutputInputFuture {
 3437   3616   
    type Output = Result<
 3438   3617   
        crate::input::NoInputAndNoOutputInput,
 3439   3618   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
 3440   3619   
    >;
 3441   3620   
 3442   3621   
    fn poll(
 3443   3622   
        self: std::pin::Pin<&mut Self>,
 3444   3623   
        cx: &mut std::task::Context<'_>,
 3445   3624   
    ) -> std::task::Poll<Self::Output> {
 3446   3625   
        let this = self.project();
 3447   3626   
        this.inner.as_mut().poll(cx)
 3448   3627   
    }
 3449   3628   
}
 3450   3629   
 3451   3630   
impl<B>
 3452   3631   
    ::aws_smithy_http_server::request::FromRequest<
 3453   3632   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3454   3633   
        B,
 3455   3634   
    > for crate::input::NoInputAndNoOutputInput
 3456   3635   
where
 3457   3636   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
 3458   3637   
    B: 'static,
 3459   3638   
 3460   3639   
    B::Data: Send,
 3461   3640   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
 3462   3641   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 3463   3642   
{
 3464   3643   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
 3465   3644   
    type Future = NoInputAndNoOutputInputFuture;
 3466   3645   
 3467         -
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        3646  +
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
 3468   3647   
        let fut = async move {
 3469   3648   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 3470   3649   
                request.headers(),
 3471   3650   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
 3472   3651   
            ) {
 3473   3652   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
 3474   3653   
            }
 3475   3654   
            crate::protocol_serde::shape_no_input_and_no_output::de_no_input_and_no_output_http_request(request)
 3476   3655   
                            .await
 3477   3656   
        };
 3478   3657   
        use ::futures_util::future::TryFutureExt;
 3479   3658   
        let fut = fut.map_err(
 3480   3659   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
 3481   3660   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 3482   3661   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
 3483   3662   
            },
 3484   3663   
        );
 3485   3664   
        NoInputAndNoOutputInputFuture {
 3486   3665   
            inner: Box::pin(fut),
 3487   3666   
        }
 3488   3667   
    }
 3489   3668   
}
 3490   3669   
impl
 3491   3670   
    ::aws_smithy_http_server::response::IntoResponse<
 3492   3671   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
 3493   3672   
    > for crate::output::NoInputAndNoOutputOutput
 3494   3673   
{
 3495   3674   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 3496   3675   
        match crate::protocol_serde::shape_no_input_and_no_output::ser_no_input_and_no_output_http_response(self) {
 3497   3676   
                        Ok(response) => response,
 3498   3677   
                        Err(e) => {
 3499   3678   
                            ::tracing::error!(error = %e, "failed to serialize response");
 3500   3679   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
 3501   3680   
                        }
 3502   3681   
                    }
 3503   3682   
    }
 3504   3683   
}
 3505   3684   
 3506   3685   
#[allow(unreachable_code, unused_variables)]
 3507   3686   
#[cfg(test)]
 3508   3687   
mod no_input_and_no_output_test {
 3509   3688   
 3510   3689   
    /// Clients must always send an empty JSON object payload for
 3511   3690   
    /// operations with no input (that is, `{}`). While AWS service
 3512   3691   
    /// implementations support requests with no payload or requests
 3513   3692   
    /// that send `{}`, always sending `{}` from the client is
 3514   3693   
    /// preferred for forward compatibility in case input is ever
 3515   3694   
    /// added to an operation.
 3516   3695   
    /// Test ID: AwsJson10MustAlwaysSendEmptyJsonPayload
 3517   3696   
    #[::tokio::test]
 3518   3697   
    #[::tracing_test::traced_test]
 3519   3698   
    async fn aws_json10_must_always_send_empty_json_payload_request() {
 3520   3699   
        #[allow(unused_mut)]
 3521         -
        let mut http_request = http::Request::builder()
        3700  +
        let mut http_request = ::http_1x::Request::builder()
 3522   3701   
            .uri("/")
 3523   3702   
            .method("POST")
 3524   3703   
            .header("Content-Type", "application/x-amz-json-1.0")
 3525   3704   
            .header("X-Amz-Target", "JsonRpc10.NoInputAndNoOutput")
 3526         -
            .body(::aws_smithy_http_server::body::Body::from(
 3527         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3528         -
                    "{}".as_bytes(),
 3529         -
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3705  +
            .body(::aws_smithy_http_server::body::boxed(
        3706  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        3707  +
                    &::aws_smithy_protocol_test::decode_body_data(
        3708  +
                        "{}".as_bytes(),
        3709  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
        3710  +
                    ),
 3530   3711   
                )),
 3531   3712   
            ))
 3532   3713   
            .unwrap();
 3533   3714   
        #[allow(unused_mut)]
 3534   3715   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3535   3716   
        let config = crate::service::JsonRpc10Config::builder().build();
 3536         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        3717  +
        let service =
        3718  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        3719  +
                config,
        3720  +
            )
 3537   3721   
            .no_input_and_no_output(move |input: crate::input::NoInputAndNoOutputInput| {
 3538   3722   
                let sender = sender.clone();
 3539   3723   
                async move {
 3540   3724   
                    let result = {
 3541   3725   
                        let expected = crate::input::NoInputAndNoOutputInput {};
 3542   3726   
                        ::pretty_assertions::assert_eq!(input, expected);
 3543   3727   
                        let output = crate::output::NoInputAndNoOutputOutput {};
 3544   3728   
                        output
 3545   3729   
                    };
 3546   3730   
                    sender.send(()).await.expect("receiver dropped early");
 3547   3731   
                    result
 3548   3732   
                }
 3549   3733   
            })
 3550   3734   
            .build_unchecked();
 3551   3735   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 3552   3736   
            .await
 3553   3737   
            .expect("unable to make an HTTP request");
 3554   3738   
        assert!(
 3555   3739   
            receiver.recv().await.is_some(),
 3556   3740   
            "we expected operation handler to be invoked but it was not entered"
 3557   3741   
        );
 3558   3742   
    }
 3559   3743   
 3560   3744   
    /// Service implementations must support no payload or an empty
 3561   3745   
    /// object payload for operations that define no input. However,
 3562   3746   
    /// despite the lack of a payload, a Content-Type header is still
 3563   3747   
    /// required in order for the service to properly detect the
 3564   3748   
    /// protocol.
 3565   3749   
    /// Test ID: AwsJson10ServiceSupportsNoPayloadForNoInput
 3566   3750   
    #[::tokio::test]
 3567   3751   
    #[::tracing_test::traced_test]
 3568   3752   
    async fn aws_json10_service_supports_no_payload_for_no_input_request() {
 3569   3753   
        #[allow(unused_mut)]
 3570         -
        let mut http_request = http::Request::builder()
        3754  +
        let mut http_request = ::http_1x::Request::builder()
 3571   3755   
            .uri("/")
 3572   3756   
            .method("POST")
 3573   3757   
            .header("Content-Type", "application/x-amz-json-1.0")
 3574   3758   
            .header("X-Amz-Target", "JsonRpc10.NoInputAndNoOutput")
 3575         -
            .body(::aws_smithy_http_server::body::Body::from(
 3576         -
                ::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 3577         -
                    "".as_bytes(),
 3578         -
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
        3759  +
            .body(::aws_smithy_http_server::body::boxed(
        3760  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
        3761  +
                    &::aws_smithy_protocol_test::decode_body_data(
        3762  +
                        "".as_bytes(),
        3763  +
                        ::aws_smithy_protocol_test::MediaType::from("unknown"),
        3764  +
                    ),
 3579   3765   
                )),
 3580   3766   
            ))
 3581   3767   
            .unwrap();
 3582   3768   
        #[allow(unused_mut)]
 3583   3769   
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
 3584   3770   
        let config = crate::service::JsonRpc10Config::builder().build();
 3585         -
        let service = crate::service::JsonRpc10::builder::<::hyper::body::Body, _, _, _>(config)
        3771  +
        let service =
        3772  +
            crate::service::JsonRpc10::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
        3773  +
                config,
        3774  +
            )
 3586   3775   
            .no_input_and_no_output(move |input: crate::input::NoInputAndNoOutputInput| {
 3587   3776   
                let sender = sender.clone();
 3588   3777   
                async move {
 3589   3778   
                    let result = {
 3590   3779   
                        let expected = crate::input::NoInputAndNoOutputInput {};
 3591   3780   
                        ::pretty_assertions::assert_eq!(input, expected);
 3592   3781   
                        let output = crate::output::NoInputAndNoOutputOutput {};
 3593   3782   
                        output
 3594   3783   
                    };
 3595   3784   
                    sender.send(()).await.expect("receiver dropped early");
 3596   3785   
                    result
 3597   3786   
                }
 3598   3787   
            })
 3599   3788   
            .build_unchecked();
 3600   3789   
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
 3601   3790   
            .await
 3602   3791   
            .expect("unable to make an HTTP request");
 3603   3792   
        assert!(
 3604   3793   
            receiver.recv().await.is_some(),
 3605   3794   
            "we expected operation handler to be invoked but it was not entered"
 3606   3795   
        );
 3607   3796   
    }
 3608   3797   
 3609   3798   
    /// When no output is defined, the service is expected to return
 3610   3799   
    /// an empty payload. Despite the lack of a payload, the service
 3611   3800   
    /// is expected to always send a Content-Type header. Clients must
 3612   3801   
    /// handle cases where a service returns a JSON object and where
 3613   3802   
    /// a service returns no JSON at all.
 3614   3803   
    /// Test ID: AwsJson10ServiceRespondsWithNoPayload
 3615   3804   
    #[::tokio::test]
 3616   3805   
    #[::tracing_test::traced_test]
 3617   3806   
    async fn aws_json10_service_responds_with_no_payload_response() {
 3618   3807   
        let output = crate::output::NoInputAndNoOutputOutput {};
 3619   3808   
        use ::aws_smithy_http_server::response::IntoResponse;
 3620   3809   
        let http_response = output.into_response();
 3621   3810   
        ::pretty_assertions::assert_eq!(
 3622         -
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
        3811  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 3623   3812   
            http_response.status()
 3624   3813   
        );
 3625   3814   
        let expected_headers = [("Content-Type", "application/x-amz-json-1.0")];
 3626   3815   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 3627   3816   
            http_response.headers(),
 3628   3817   
            expected_headers,
 3629   3818   
        ));
 3630         -
        let body = ::hyper::body::to_bytes(http_response.into_body())
        3819  +
        use ::http_body_util::BodyExt;
        3820  +
        let body = http_response
        3821  +
            .into_body()
        3822  +
            .collect()
 3631   3823   
            .await
 3632         -
            .expect("unable to extract body to bytes");
        3824  +
            .expect("unable to collect body")
        3825  +
            .to_bytes();
 3633   3826   
        // No body.
 3634   3827   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
 3635   3828   
    }
 3636   3829   
}