Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_empty_input_output.rs

@@ -1,1 +60,60 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_empty_input_output_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EmptyInputOutputInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::empty_input_output_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_empty_input_output_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EmptyInputOutputOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35         -
        let mut builder = ::http::Response::builder();
          35  +
        let mut builder = ::http_1x::Response::builder();
   36     36   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38         -
            ::http::header::CONTENT_TYPE,
          38  +
            ::http_1x::header::CONTENT_TYPE,
   39     39   
            "application/cbor",
   40     40   
        );
   41     41   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   42     42   
            builder,
   43         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          43  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   44     44   
            "rpc-v2-cbor",
   45     45   
        );
   46     46   
        let http_status: u16 = 200;
   47     47   
        builder = builder.status(http_status);
   48     48   
        let payload =
   49     49   
            crate::protocol_serde::shape_empty_input_output_output::ser_empty_input_output_output_output_output(&output)?
   50     50   
        ;
   51     51   
        let content_length = payload.len();
   52     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     53   
            builder,
   54         -
            ::http::header::CONTENT_LENGTH,
          54  +
            ::http_1x::header::CONTENT_LENGTH,
   55     55   
            content_length,
   56     56   
        );
   57     57   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   58     58   
        builder.body(body)?
   59     59   
    })
   60     60   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_float16.rs

@@ -1,1 +59,59 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_float16_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::Float16Input,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::float16_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_float16_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::Float16Output,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35         -
        let mut builder = ::http::Response::builder();
          35  +
        let mut builder = ::http_1x::Response::builder();
   36     36   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38         -
            ::http::header::CONTENT_TYPE,
          38  +
            ::http_1x::header::CONTENT_TYPE,
   39     39   
            "application/cbor",
   40     40   
        );
   41     41   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   42     42   
            builder,
   43         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          43  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   44     44   
            "rpc-v2-cbor",
   45     45   
        );
   46     46   
        let http_status: u16 = 200;
   47     47   
        builder = builder.status(http_status);
   48     48   
        let payload =
   49     49   
            crate::protocol_serde::shape_float16_output::ser_float16_output_output_output(&output)?;
   50     50   
        let content_length = payload.len();
   51     51   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   52     52   
            builder,
   53         -
            ::http::header::CONTENT_LENGTH,
          53  +
            ::http_1x::header::CONTENT_LENGTH,
   54     54   
            content_length,
   55     55   
        );
   56     56   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   57     57   
        builder.body(body)?
   58     58   
    })
   59     59   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_fractional_seconds.rs

@@ -1,1 +60,60 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_fractional_seconds_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::FractionalSecondsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::fractional_seconds_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_fractional_seconds_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::FractionalSecondsOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35         -
        let mut builder = ::http::Response::builder();
          35  +
        let mut builder = ::http_1x::Response::builder();
   36     36   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38         -
            ::http::header::CONTENT_TYPE,
          38  +
            ::http_1x::header::CONTENT_TYPE,
   39     39   
            "application/cbor",
   40     40   
        );
   41     41   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   42     42   
            builder,
   43         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          43  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   44     44   
            "rpc-v2-cbor",
   45     45   
        );
   46     46   
        let http_status: u16 = 200;
   47     47   
        builder = builder.status(http_status);
   48     48   
        let payload =
   49     49   
            crate::protocol_serde::shape_fractional_seconds_output::ser_fractional_seconds_output_output_output(&output)?
   50     50   
        ;
   51     51   
        let content_length = payload.len();
   52     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     53   
            builder,
   54         -
            ::http::header::CONTENT_LENGTH,
          54  +
            ::http_1x::header::CONTENT_LENGTH,
   55     55   
            content_length,
   56     56   
        );
   57     57   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   58     58   
        builder.body(body)?
   59     59   
    })
   60     60   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_greeting_with_errors.rs

@@ -1,1 +125,125 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_greeting_with_errors_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GreetingWithErrorsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::greeting_with_errors_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_greeting_with_errors_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::GreetingWithErrorsOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35         -
        let mut builder = ::http::Response::builder();
          35  +
        let mut builder = ::http_1x::Response::builder();
   36     36   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38         -
            ::http::header::CONTENT_TYPE,
          38  +
            ::http_1x::header::CONTENT_TYPE,
   39     39   
            "application/cbor",
   40     40   
        );
   41     41   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   42     42   
            builder,
   43         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          43  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   44     44   
            "rpc-v2-cbor",
   45     45   
        );
   46     46   
        let http_status: u16 = 200;
   47     47   
        builder = builder.status(http_status);
   48     48   
        let payload =
   49     49   
            crate::protocol_serde::shape_greeting_with_errors_output::ser_greeting_with_errors_output_output_output(&output)?
   50     50   
        ;
   51     51   
        let content_length = payload.len();
   52     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     53   
            builder,
   54         -
            ::http::header::CONTENT_LENGTH,
          54  +
            ::http_1x::header::CONTENT_LENGTH,
   55     55   
            content_length,
   56     56   
        );
   57     57   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   58     58   
        builder.body(body)?
   59     59   
    })
   60     60   
}
   61     61   
   62     62   
#[allow(clippy::unnecessary_wraps)]
   63     63   
pub fn ser_greeting_with_errors_http_error(
   64     64   
    error: &crate::error::GreetingWithErrorsError,
   65     65   
) -> std::result::Result<
   66     66   
    ::aws_smithy_http_server::response::Response,
   67     67   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   68     68   
> {
   69     69   
    Ok({
   70     70   
        match error {
   71     71   
            crate::error::GreetingWithErrorsError::InvalidGreeting(output) => {
   72     72   
                let payload =
   73     73   
                    crate::protocol_serde::shape_invalid_greeting::ser_invalid_greeting_error(
   74     74   
                        output,
   75     75   
                    )?;
   76     76   
                #[allow(unused_mut)]
   77         -
                let mut builder = ::http::Response::builder();
          77  +
                let mut builder = ::http_1x::Response::builder();
   78     78   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   79     79   
                    builder,
   80         -
                    ::http::header::CONTENT_TYPE,
          80  +
                    ::http_1x::header::CONTENT_TYPE,
   81     81   
                    "application/cbor",
   82     82   
                );
   83     83   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
          85  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   86     86   
                    "rpc-v2-cbor",
   87     87   
                );
   88     88   
                let content_length = payload.len();
   89     89   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   90     90   
                    builder,
   91         -
                    ::http::header::CONTENT_LENGTH,
          91  +
                    ::http_1x::header::CONTENT_LENGTH,
   92     92   
                    content_length,
   93     93   
                );
   94     94   
                builder
   95     95   
                    .status(400)
   96     96   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   97     97   
            }
   98     98   
            crate::error::GreetingWithErrorsError::ComplexError(output) => {
   99     99   
                let payload =
  100    100   
                    crate::protocol_serde::shape_complex_error::ser_complex_error_error(output)?;
  101    101   
                #[allow(unused_mut)]
  102         -
                let mut builder = ::http::Response::builder();
         102  +
                let mut builder = ::http_1x::Response::builder();
  103    103   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  104    104   
                    builder,
  105         -
                    ::http::header::CONTENT_TYPE,
         105  +
                    ::http_1x::header::CONTENT_TYPE,
  106    106   
                    "application/cbor",
  107    107   
                );
  108    108   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  109    109   
                    builder,
  110         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
         110  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
  111    111   
                    "rpc-v2-cbor",
  112    112   
                );
  113    113   
                let content_length = payload.len();
  114    114   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  115    115   
                    builder,
  116         -
                    ::http::header::CONTENT_LENGTH,
         116  +
                    ::http_1x::header::CONTENT_LENGTH,
  117    117   
                    content_length,
  118    118   
                );
  119    119   
                builder
  120    120   
                    .status(400)
  121    121   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  122    122   
            }
  123    123   
        }
  124    124   
    })
  125    125   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_no_input_output.rs

@@ -1,1 +53,53 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_no_input_output_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::NoInputOutputInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::no_input_output_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_no_input_output_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::NoInputOutputOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35         -
        let mut builder = ::http::Response::builder();
          35  +
        let mut builder = ::http_1x::Response::builder();
   36     36   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          38  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   39     39   
            "rpc-v2-cbor",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45     45   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47         -
            ::http::header::CONTENT_LENGTH,
          47  +
            ::http_1x::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50     50   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_operation_with_defaults.rs

@@ -1,1 +130,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_defaults_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithDefaultsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::operation_with_defaults_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults(
   30     33   
                    bytes.as_ref(),
   31     34   
                    input,
   32     35   
                )?;
   33     36   
        }
   34     37   
        input.build()?
   35     38   
    })
   36     39   
}
   37     40   
   38     41   
#[allow(clippy::unnecessary_wraps)]
   39     42   
pub fn ser_operation_with_defaults_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::OperationWithDefaultsOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   44     47   
> {
   45     48   
    Ok({
   46     49   
        #[allow(unused_mut)]
   47         -
        let mut builder = ::http::Response::builder();
          50  +
        let mut builder = ::http_1x::Response::builder();
   48     51   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     52   
            builder,
   50         -
            ::http::header::CONTENT_TYPE,
          53  +
            ::http_1x::header::CONTENT_TYPE,
   51     54   
            "application/cbor",
   52     55   
        );
   53     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     57   
            builder,
   55         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          58  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   56     59   
            "rpc-v2-cbor",
   57     60   
        );
   58     61   
        let http_status: u16 = 200;
   59     62   
        builder = builder.status(http_status);
   60     63   
        let payload =
   61     64   
            crate::protocol_serde::shape_operation_with_defaults_output::ser_operation_with_defaults_output_output_output(&output)?
   62     65   
        ;
   63     66   
        let content_length = payload.len();
   64     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   65     68   
            builder,
   66         -
            ::http::header::CONTENT_LENGTH,
          69  +
            ::http_1x::header::CONTENT_LENGTH,
   67     70   
            content_length,
   68     71   
        );
   69     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   70     73   
        builder.body(body)?
   71     74   
    })
   72     75   
}
   73     76   
   74     77   
#[allow(clippy::unnecessary_wraps)]
   75     78   
pub fn ser_operation_with_defaults_http_error(
   76     79   
    error: &crate::error::OperationWithDefaultsError,
   77     80   
) -> std::result::Result<
   78     81   
    ::aws_smithy_http_server::response::Response,
   79     82   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   80     83   
> {
   81     84   
    Ok({
   82     85   
        match error {
   83     86   
            crate::error::OperationWithDefaultsError::ValidationException(output) => {
   84     87   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   85     88   
                #[allow(unused_mut)]
   86         -
                let mut builder = ::http::Response::builder();
          89  +
                let mut builder = ::http_1x::Response::builder();
   87     90   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   88     91   
                    builder,
   89         -
                    ::http::header::CONTENT_TYPE,
          92  +
                    ::http_1x::header::CONTENT_TYPE,
   90     93   
                    "application/cbor",
   91     94   
                );
   92     95   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   93     96   
                    builder,
   94         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
          97  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   95     98   
                    "rpc-v2-cbor",
   96     99   
                );
   97    100   
                let content_length = payload.len();
   98    101   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   99    102   
                    builder,
  100         -
                    ::http::header::CONTENT_LENGTH,
         103  +
                    ::http_1x::header::CONTENT_LENGTH,
  101    104   
                    content_length,
  102    105   
                );
  103    106   
                builder
  104    107   
                    .status(400)
  105    108   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  106    109   
            }
  107    110   
        }
  108    111   
    })
  109    112   
}
  110    113   

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_optional_input_output.rs

@@ -1,1 +95,98 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_optional_input_output_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OptionalInputOutputInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::optional_input_output_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_optional_input_output::de_optional_input_output(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        input.build()
   34     37   
    })
   35     38   
}
   36     39   
   37     40   
#[allow(clippy::unnecessary_wraps)]
   38     41   
pub fn ser_optional_input_output_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::OptionalInputOutputOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   43     46   
> {
   44     47   
    Ok({
   45     48   
        #[allow(unused_mut)]
   46         -
        let mut builder = ::http::Response::builder();
          49  +
        let mut builder = ::http_1x::Response::builder();
   47     50   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     51   
            builder,
   49         -
            ::http::header::CONTENT_TYPE,
          52  +
            ::http_1x::header::CONTENT_TYPE,
   50     53   
            "application/cbor",
   51     54   
        );
   52     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     56   
            builder,
   54         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          57  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   55     58   
            "rpc-v2-cbor",
   56     59   
        );
   57     60   
        let http_status: u16 = 200;
   58     61   
        builder = builder.status(http_status);
   59     62   
        let payload =
   60     63   
            crate::protocol_serde::shape_optional_input_output_output::ser_optional_input_output_output_output_output(&output)?
   61     64   
        ;
   62     65   
        let content_length = payload.len();
   63     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   64     67   
            builder,
   65         -
            ::http::header::CONTENT_LENGTH,
          68  +
            ::http_1x::header::CONTENT_LENGTH,
   66     69   
            content_length,
   67     70   
        );
   68     71   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   69     72   
        builder.body(body)?
   70     73   
    })
   71     74   
}
   72     75   
   73     76   
pub(crate) fn de_optional_input_output(
   74     77   
    value: &[u8],
   75     78   
    mut builder: crate::input::optional_input_output_input::Builder,

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_recursive_shapes.rs

@@ -1,1 +95,98 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_recursive_shapes_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RecursiveShapesInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::recursive_shapes_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_recursive_shapes::de_recursive_shapes(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        input.build()
   34     37   
    })
   35     38   
}
   36     39   
   37     40   
#[allow(clippy::unnecessary_wraps)]
   38     41   
pub fn ser_recursive_shapes_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::RecursiveShapesOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   43     46   
> {
   44     47   
    Ok({
   45     48   
        #[allow(unused_mut)]
   46         -
        let mut builder = ::http::Response::builder();
          49  +
        let mut builder = ::http_1x::Response::builder();
   47     50   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     51   
            builder,
   49         -
            ::http::header::CONTENT_TYPE,
          52  +
            ::http_1x::header::CONTENT_TYPE,
   50     53   
            "application/cbor",
   51     54   
        );
   52     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     56   
            builder,
   54         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          57  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   55     58   
            "rpc-v2-cbor",
   56     59   
        );
   57     60   
        let http_status: u16 = 200;
   58     61   
        builder = builder.status(http_status);
   59     62   
        let payload =
   60     63   
            crate::protocol_serde::shape_recursive_shapes_output::ser_recursive_shapes_output_output_output(&output)?
   61     64   
        ;
   62     65   
        let content_length = payload.len();
   63     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   64     67   
            builder,
   65         -
            ::http::header::CONTENT_LENGTH,
          68  +
            ::http_1x::header::CONTENT_LENGTH,
   66     69   
            content_length,
   67     70   
        );
   68     71   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   69     72   
        builder.body(body)?
   70     73   
    })
   71     74   
}
   72     75   
   73     76   
pub(crate) fn de_recursive_shapes(
   74     77   
    value: &[u8],
   75     78   
    mut builder: crate::input::recursive_shapes_input::Builder,

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_rpc_v2_cbor_dense_maps.rs

@@ -1,1 +129,132 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_rpc_v2_cbor_dense_maps_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RpcV2CborDenseMapsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::rpc_v2_cbor_dense_maps_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::de_rpc_v2_cbor_dense_maps(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        input.build()?
   34     37   
    })
   35     38   
}
   36     39   
   37     40   
#[allow(clippy::unnecessary_wraps)]
   38     41   
pub fn ser_rpc_v2_cbor_dense_maps_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::RpcV2CborDenseMapsOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   43     46   
> {
   44     47   
    Ok({
   45     48   
        #[allow(unused_mut)]
   46         -
        let mut builder = ::http::Response::builder();
          49  +
        let mut builder = ::http_1x::Response::builder();
   47     50   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     51   
            builder,
   49         -
            ::http::header::CONTENT_TYPE,
          52  +
            ::http_1x::header::CONTENT_TYPE,
   50     53   
            "application/cbor",
   51     54   
        );
   52     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     56   
            builder,
   54         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          57  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   55     58   
            "rpc-v2-cbor",
   56     59   
        );
   57     60   
        let http_status: u16 = 200;
   58     61   
        builder = builder.status(http_status);
   59     62   
        let payload =
   60     63   
            crate::protocol_serde::shape_rpc_v2_cbor_dense_maps_output::ser_rpc_v2_cbor_dense_maps_output_output_output(&output)?
   61     64   
        ;
   62     65   
        let content_length = payload.len();
   63     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   64     67   
            builder,
   65         -
            ::http::header::CONTENT_LENGTH,
          68  +
            ::http_1x::header::CONTENT_LENGTH,
   66     69   
            content_length,
   67     70   
        );
   68     71   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   69     72   
        builder.body(body)?
   70     73   
    })
   71     74   
}
   72     75   
   73     76   
#[allow(clippy::unnecessary_wraps)]
   74     77   
pub fn ser_rpc_v2_cbor_dense_maps_http_error(
   75     78   
    error: &crate::error::RpcV2CborDenseMapsError,
   76     79   
) -> std::result::Result<
   77     80   
    ::aws_smithy_http_server::response::Response,
   78     81   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   79     82   
> {
   80     83   
    Ok({
   81     84   
        match error {
   82     85   
            crate::error::RpcV2CborDenseMapsError::ValidationException(output) => {
   83     86   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   84     87   
                #[allow(unused_mut)]
   85         -
                let mut builder = ::http::Response::builder();
          88  +
                let mut builder = ::http_1x::Response::builder();
   86     89   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87     90   
                    builder,
   88         -
                    ::http::header::CONTENT_TYPE,
          91  +
                    ::http_1x::header::CONTENT_TYPE,
   89     92   
                    "application/cbor",
   90     93   
                );
   91     94   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   92     95   
                    builder,
   93         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
          96  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   94     97   
                    "rpc-v2-cbor",
   95     98   
                );
   96     99   
                let content_length = payload.len();
   97    100   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   98    101   
                    builder,
   99         -
                    ::http::header::CONTENT_LENGTH,
         102  +
                    ::http_1x::header::CONTENT_LENGTH,
  100    103   
                    content_length,
  101    104   
                );
  102    105   
                builder
  103    106   
                    .status(400)
  104    107   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  105    108   
            }
  106    109   
        }
  107    110   
    })
  108    111   
}
  109    112   

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_rpc_v2_cbor_lists.rs

@@ -1,1 +129,132 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_rpc_v2_cbor_lists_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RpcV2CborListsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::rpc_v2_cbor_lists_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_rpc_v2_cbor_lists::de_rpc_v2_cbor_lists(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        input.build()?
   34     37   
    })
   35     38   
}
   36     39   
   37     40   
#[allow(clippy::unnecessary_wraps)]
   38     41   
pub fn ser_rpc_v2_cbor_lists_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::RpcV2CborListsOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   43     46   
> {
   44     47   
    Ok({
   45     48   
        #[allow(unused_mut)]
   46         -
        let mut builder = ::http::Response::builder();
          49  +
        let mut builder = ::http_1x::Response::builder();
   47     50   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     51   
            builder,
   49         -
            ::http::header::CONTENT_TYPE,
          52  +
            ::http_1x::header::CONTENT_TYPE,
   50     53   
            "application/cbor",
   51     54   
        );
   52     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     56   
            builder,
   54         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          57  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   55     58   
            "rpc-v2-cbor",
   56     59   
        );
   57     60   
        let http_status: u16 = 200;
   58     61   
        builder = builder.status(http_status);
   59     62   
        let payload =
   60     63   
            crate::protocol_serde::shape_rpc_v2_cbor_lists_output::ser_rpc_v2_cbor_lists_output_output_output(&output)?
   61     64   
        ;
   62     65   
        let content_length = payload.len();
   63     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   64     67   
            builder,
   65         -
            ::http::header::CONTENT_LENGTH,
          68  +
            ::http_1x::header::CONTENT_LENGTH,
   66     69   
            content_length,
   67     70   
        );
   68     71   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   69     72   
        builder.body(body)?
   70     73   
    })
   71     74   
}
   72     75   
   73     76   
#[allow(clippy::unnecessary_wraps)]
   74     77   
pub fn ser_rpc_v2_cbor_lists_http_error(
   75     78   
    error: &crate::error::RpcV2CborListsError,
   76     79   
) -> std::result::Result<
   77     80   
    ::aws_smithy_http_server::response::Response,
   78     81   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   79     82   
> {
   80     83   
    Ok({
   81     84   
        match error {
   82     85   
            crate::error::RpcV2CborListsError::ValidationException(output) => {
   83     86   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   84     87   
                #[allow(unused_mut)]
   85         -
                let mut builder = ::http::Response::builder();
          88  +
                let mut builder = ::http_1x::Response::builder();
   86     89   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87     90   
                    builder,
   88         -
                    ::http::header::CONTENT_TYPE,
          91  +
                    ::http_1x::header::CONTENT_TYPE,
   89     92   
                    "application/cbor",
   90     93   
                );
   91     94   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   92     95   
                    builder,
   93         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
          96  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   94     97   
                    "rpc-v2-cbor",
   95     98   
                );
   96     99   
                let content_length = payload.len();
   97    100   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   98    101   
                    builder,
   99         -
                    ::http::header::CONTENT_LENGTH,
         102  +
                    ::http_1x::header::CONTENT_LENGTH,
  100    103   
                    content_length,
  101    104   
                );
  102    105   
                builder
  103    106   
                    .status(400)
  104    107   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  105    108   
            }
  106    109   
        }
  107    110   
    })
  108    111   
}
  109    112   

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_rpc_v2_cbor_sparse_maps.rs

@@ -1,1 +130,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_rpc_v2_cbor_sparse_maps_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RpcV2CborSparseMapsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::rpc_v2_cbor_sparse_maps_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_rpc_v2_cbor_sparse_maps::de_rpc_v2_cbor_sparse_maps(
   30     33   
                    bytes.as_ref(),
   31     34   
                    input,
   32     35   
                )?;
   33     36   
        }
   34     37   
        input.build()?
   35     38   
    })
   36     39   
}
   37     40   
   38     41   
#[allow(clippy::unnecessary_wraps)]
   39     42   
pub fn ser_rpc_v2_cbor_sparse_maps_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::RpcV2CborSparseMapsOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   44     47   
> {
   45     48   
    Ok({
   46     49   
        #[allow(unused_mut)]
   47         -
        let mut builder = ::http::Response::builder();
          50  +
        let mut builder = ::http_1x::Response::builder();
   48     51   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     52   
            builder,
   50         -
            ::http::header::CONTENT_TYPE,
          53  +
            ::http_1x::header::CONTENT_TYPE,
   51     54   
            "application/cbor",
   52     55   
        );
   53     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     57   
            builder,
   55         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          58  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   56     59   
            "rpc-v2-cbor",
   57     60   
        );
   58     61   
        let http_status: u16 = 200;
   59     62   
        builder = builder.status(http_status);
   60     63   
        let payload =
   61     64   
            crate::protocol_serde::shape_rpc_v2_cbor_sparse_maps_output::ser_rpc_v2_cbor_sparse_maps_output_output_output(&output)?
   62     65   
        ;
   63     66   
        let content_length = payload.len();
   64     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   65     68   
            builder,
   66         -
            ::http::header::CONTENT_LENGTH,
          69  +
            ::http_1x::header::CONTENT_LENGTH,
   67     70   
            content_length,
   68     71   
        );
   69     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   70     73   
        builder.body(body)?
   71     74   
    })
   72     75   
}
   73     76   
   74     77   
#[allow(clippy::unnecessary_wraps)]
   75     78   
pub fn ser_rpc_v2_cbor_sparse_maps_http_error(
   76     79   
    error: &crate::error::RpcV2CborSparseMapsError,
   77     80   
) -> std::result::Result<
   78     81   
    ::aws_smithy_http_server::response::Response,
   79     82   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   80     83   
> {
   81     84   
    Ok({
   82     85   
        match error {
   83     86   
            crate::error::RpcV2CborSparseMapsError::ValidationException(output) => {
   84     87   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   85     88   
                #[allow(unused_mut)]
   86         -
                let mut builder = ::http::Response::builder();
          89  +
                let mut builder = ::http_1x::Response::builder();
   87     90   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   88     91   
                    builder,
   89         -
                    ::http::header::CONTENT_TYPE,
          92  +
                    ::http_1x::header::CONTENT_TYPE,
   90     93   
                    "application/cbor",
   91     94   
                );
   92     95   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   93     96   
                    builder,
   94         -
                    ::http::header::HeaderName::from_static("smithy-protocol"),
          97  +
                    ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   95     98   
                    "rpc-v2-cbor",
   96     99   
                );
   97    100   
                let content_length = payload.len();
   98    101   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   99    102   
                    builder,
  100         -
                    ::http::header::CONTENT_LENGTH,
         103  +
                    ::http_1x::header::CONTENT_LENGTH,
  101    104   
                    content_length,
  102    105   
                );
  103    106   
                builder
  104    107   
                    .status(400)
  105    108   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  106    109   
            }
  107    110   
        }
  108    111   
    })
  109    112   
}
  110    113   

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_simple_scalar_properties.rs

@@ -1,1 +96,99 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_simple_scalar_properties_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::SimpleScalarPropertiesInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::simple_scalar_properties_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties(
   30     33   
                    bytes.as_ref(),
   31     34   
                    input,
   32     35   
                )?;
   33     36   
        }
   34     37   
        input.build()
   35     38   
    })
   36     39   
}
   37     40   
   38     41   
#[allow(clippy::unnecessary_wraps)]
   39     42   
pub fn ser_simple_scalar_properties_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::SimpleScalarPropertiesOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   44     47   
> {
   45     48   
    Ok({
   46     49   
        #[allow(unused_mut)]
   47         -
        let mut builder = ::http::Response::builder();
          50  +
        let mut builder = ::http_1x::Response::builder();
   48     51   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     52   
            builder,
   50         -
            ::http::header::CONTENT_TYPE,
          53  +
            ::http_1x::header::CONTENT_TYPE,
   51     54   
            "application/cbor",
   52     55   
        );
   53     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     57   
            builder,
   55         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          58  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   56     59   
            "rpc-v2-cbor",
   57     60   
        );
   58     61   
        let http_status: u16 = 200;
   59     62   
        builder = builder.status(http_status);
   60     63   
        let payload =
   61     64   
            crate::protocol_serde::shape_simple_scalar_properties_output::ser_simple_scalar_properties_output_output_output(&output)?
   62     65   
        ;
   63     66   
        let content_length = payload.len();
   64     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   65     68   
            builder,
   66         -
            ::http::header::CONTENT_LENGTH,
          69  +
            ::http_1x::header::CONTENT_LENGTH,
   67     70   
            content_length,
   68     71   
        );
   69     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   70     73   
        builder.body(body)?
   71     74   
    })
   72     75   
}
   73     76   
   74     77   
pub(crate) fn de_simple_scalar_properties(
   75     78   
    value: &[u8],
   76     79   
    mut builder: crate::input::simple_scalar_properties_input::Builder,

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/protocol_serde/shape_sparse_nulls_operation.rs

@@ -1,1 +95,98 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_sparse_nulls_operation_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::SparseNullsOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::sparse_nulls_operation_input::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          22  +
        let bytes = {
          23  +
            use ::http_body_util::BodyExt;
          24  +
            body.collect().await?.to_bytes()
          25  +
        };
   23     26   
        if !bytes.is_empty() {
   24     27   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     28   
                &headers,
   26     29   
                Some("application/cbor"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_sparse_nulls_operation::de_sparse_nulls_operation(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        input.build()
   34     37   
    })
   35     38   
}
   36     39   
   37     40   
#[allow(clippy::unnecessary_wraps)]
   38     41   
pub fn ser_sparse_nulls_operation_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::SparseNullsOperationOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
   43     46   
> {
   44     47   
    Ok({
   45     48   
        #[allow(unused_mut)]
   46         -
        let mut builder = ::http::Response::builder();
          49  +
        let mut builder = ::http_1x::Response::builder();
   47     50   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     51   
            builder,
   49         -
            ::http::header::CONTENT_TYPE,
          52  +
            ::http_1x::header::CONTENT_TYPE,
   50     53   
            "application/cbor",
   51     54   
        );
   52     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     56   
            builder,
   54         -
            ::http::header::HeaderName::from_static("smithy-protocol"),
          57  +
            ::http_1x::header::HeaderName::from_static("smithy-protocol"),
   55     58   
            "rpc-v2-cbor",
   56     59   
        );
   57     60   
        let http_status: u16 = 200;
   58     61   
        builder = builder.status(http_status);
   59     62   
        let payload =
   60     63   
            crate::protocol_serde::shape_sparse_nulls_operation_output::ser_sparse_nulls_operation_output_output_output(&output)?
   61     64   
        ;
   62     65   
        let content_length = payload.len();
   63     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   64     67   
            builder,
   65         -
            ::http::header::CONTENT_LENGTH,
          68  +
            ::http_1x::header::CONTENT_LENGTH,
   66     69   
            content_length,
   67     70   
        );
   68     71   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   69     72   
        builder.body(body)?
   70     73   
    })
   71     74   
}
   72     75   
   73     76   
pub(crate) fn de_sparse_nulls_operation(
   74     77   
    value: &[u8],
   75     78   
    mut builder: crate::input::sparse_nulls_operation_input::Builder,

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/service.rs

@@ -47,47 +108,108 @@
   67     67   
                            <
   68     68   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   69     69   
                                as ::aws_smithy_http_server::plugin::Plugin<
   70     70   
                                    RpcV2Protocol<L>,
   71     71   
                                    crate::operation_shape::EmptyInputOutput,
   72     72   
                                    ModelPl::Output
   73     73   
                                >
   74     74   
                            >::Output
   75     75   
                        >,
   76     76   
   77         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   78         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
          77  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
          78  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
   79     79   
   80     80   
                    {
   81     81   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   82     82   
        use ::aws_smithy_http_server::plugin::Plugin;
   83     83   
        let svc = crate::operation_shape::EmptyInputOutput::from_handler(handler);
   84     84   
        let svc = self.model_plugin.apply(svc);
   85     85   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   86     86   
            .apply(svc);
   87     87   
        let svc = self.http_plugin.apply(svc);
   88     88   
        self.empty_input_output_custom(svc)
@@ -114,114 +194,194 @@
  134    134   
                            <
  135    135   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  136    136   
                                as ::aws_smithy_http_server::plugin::Plugin<
  137    137   
                                    RpcV2Protocol<L>,
  138    138   
                                    crate::operation_shape::EmptyInputOutput,
  139    139   
                                    ModelPl::Output
  140    140   
                                >
  141    141   
                            >::Output
  142    142   
                        >,
  143    143   
  144         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  145         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         144  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         145  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  146    146   
  147    147   
                    {
  148    148   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  149    149   
        use ::aws_smithy_http_server::plugin::Plugin;
  150    150   
        let svc = crate::operation_shape::EmptyInputOutput::from_service(service);
  151    151   
        let svc = self.model_plugin.apply(svc);
  152    152   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  153    153   
            .apply(svc);
  154    154   
        let svc = self.http_plugin.apply(svc);
  155    155   
        self.empty_input_output_custom(svc)
  156    156   
    }
  157    157   
  158    158   
    /// Sets the [`EmptyInputOutput`](crate::operation_shape::EmptyInputOutput) to a custom [`Service`](tower::Service).
  159    159   
    /// not constrained by the Smithy contract.
  160    160   
    fn empty_input_output_custom<S>(mut self, svc: S) -> Self
  161    161   
    where
  162    162   
        S: ::tower::Service<
  163         -
                ::http::Request<Body>,
  164         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         163  +
                ::http_1x::Request<Body>,
         164  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  165    165   
                Error = ::std::convert::Infallible,
  166    166   
            > + Clone
  167    167   
            + Send
  168    168   
            + 'static,
  169    169   
        S::Future: Send + 'static,
  170    170   
    {
  171    171   
        self.empty_input_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
  172    172   
        self
  173    173   
    }
  174    174   
@@ -197,197 +258,258 @@
  217    217   
                            <
  218    218   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  219    219   
                                as ::aws_smithy_http_server::plugin::Plugin<
  220    220   
                                    RpcV2Protocol<L>,
  221    221   
                                    crate::operation_shape::Float16,
  222    222   
                                    ModelPl::Output
  223    223   
                                >
  224    224   
                            >::Output
  225    225   
                        >,
  226    226   
  227         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  228         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         227  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         228  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  229    229   
  230    230   
                    {
  231    231   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  232    232   
        use ::aws_smithy_http_server::plugin::Plugin;
  233    233   
        let svc = crate::operation_shape::Float16::from_handler(handler);
  234    234   
        let svc = self.model_plugin.apply(svc);
  235    235   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  236    236   
            .apply(svc);
  237    237   
        let svc = self.http_plugin.apply(svc);
  238    238   
        self.float16_custom(svc)
@@ -264,264 +344,344 @@
  284    284   
                            <
  285    285   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  286    286   
                                as ::aws_smithy_http_server::plugin::Plugin<
  287    287   
                                    RpcV2Protocol<L>,
  288    288   
                                    crate::operation_shape::Float16,
  289    289   
                                    ModelPl::Output
  290    290   
                                >
  291    291   
                            >::Output
  292    292   
                        >,
  293    293   
  294         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  295         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         294  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         295  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  296    296   
  297    297   
                    {
  298    298   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  299    299   
        use ::aws_smithy_http_server::plugin::Plugin;
  300    300   
        let svc = crate::operation_shape::Float16::from_service(service);
  301    301   
        let svc = self.model_plugin.apply(svc);
  302    302   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  303    303   
            .apply(svc);
  304    304   
        let svc = self.http_plugin.apply(svc);
  305    305   
        self.float16_custom(svc)
  306    306   
    }
  307    307   
  308    308   
    /// Sets the [`Float16`](crate::operation_shape::Float16) to a custom [`Service`](tower::Service).
  309    309   
    /// not constrained by the Smithy contract.
  310    310   
    fn float16_custom<S>(mut self, svc: S) -> Self
  311    311   
    where
  312    312   
        S: ::tower::Service<
  313         -
                ::http::Request<Body>,
  314         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         313  +
                ::http_1x::Request<Body>,
         314  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  315    315   
                Error = ::std::convert::Infallible,
  316    316   
            > + Clone
  317    317   
            + Send
  318    318   
            + 'static,
  319    319   
        S::Future: Send + 'static,
  320    320   
    {
  321    321   
        self.float16 = Some(::aws_smithy_http_server::routing::Route::new(svc));
  322    322   
        self
  323    323   
    }
  324    324   
@@ -347,347 +408,408 @@
  367    367   
                            <
  368    368   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  369    369   
                                as ::aws_smithy_http_server::plugin::Plugin<
  370    370   
                                    RpcV2Protocol<L>,
  371    371   
                                    crate::operation_shape::FractionalSeconds,
  372    372   
                                    ModelPl::Output
  373    373   
                                >
  374    374   
                            >::Output
  375    375   
                        >,
  376    376   
  377         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  378         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         377  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         378  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  379    379   
  380    380   
                    {
  381    381   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  382    382   
        use ::aws_smithy_http_server::plugin::Plugin;
  383    383   
        let svc = crate::operation_shape::FractionalSeconds::from_handler(handler);
  384    384   
        let svc = self.model_plugin.apply(svc);
  385    385   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  386    386   
            .apply(svc);
  387    387   
        let svc = self.http_plugin.apply(svc);
  388    388   
        self.fractional_seconds_custom(svc)
@@ -414,414 +494,494 @@
  434    434   
                            <
  435    435   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  436    436   
                                as ::aws_smithy_http_server::plugin::Plugin<
  437    437   
                                    RpcV2Protocol<L>,
  438    438   
                                    crate::operation_shape::FractionalSeconds,
  439    439   
                                    ModelPl::Output
  440    440   
                                >
  441    441   
                            >::Output
  442    442   
                        >,
  443    443   
  444         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  445         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         444  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         445  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  446    446   
  447    447   
                    {
  448    448   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  449    449   
        use ::aws_smithy_http_server::plugin::Plugin;
  450    450   
        let svc = crate::operation_shape::FractionalSeconds::from_service(service);
  451    451   
        let svc = self.model_plugin.apply(svc);
  452    452   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  453    453   
            .apply(svc);
  454    454   
        let svc = self.http_plugin.apply(svc);
  455    455   
        self.fractional_seconds_custom(svc)
  456    456   
    }
  457    457   
  458    458   
    /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) to a custom [`Service`](tower::Service).
  459    459   
    /// not constrained by the Smithy contract.
  460    460   
    fn fractional_seconds_custom<S>(mut self, svc: S) -> Self
  461    461   
    where
  462    462   
        S: ::tower::Service<
  463         -
                ::http::Request<Body>,
  464         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         463  +
                ::http_1x::Request<Body>,
         464  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  465    465   
                Error = ::std::convert::Infallible,
  466    466   
            > + Clone
  467    467   
            + Send
  468    468   
            + 'static,
  469    469   
        S::Future: Send + 'static,
  470    470   
    {
  471    471   
        self.fractional_seconds = Some(::aws_smithy_http_server::routing::Route::new(svc));
  472    472   
        self
  473    473   
    }
  474    474   
@@ -497,497 +558,558 @@
  517    517   
                            <
  518    518   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  519    519   
                                as ::aws_smithy_http_server::plugin::Plugin<
  520    520   
                                    RpcV2Protocol<L>,
  521    521   
                                    crate::operation_shape::GreetingWithErrors,
  522    522   
                                    ModelPl::Output
  523    523   
                                >
  524    524   
                            >::Output
  525    525   
                        >,
  526    526   
  527         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  528         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         527  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         528  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  529    529   
  530    530   
                    {
  531    531   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  532    532   
        use ::aws_smithy_http_server::plugin::Plugin;
  533    533   
        let svc = crate::operation_shape::GreetingWithErrors::from_handler(handler);
  534    534   
        let svc = self.model_plugin.apply(svc);
  535    535   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  536    536   
            .apply(svc);
  537    537   
        let svc = self.http_plugin.apply(svc);
  538    538   
        self.greeting_with_errors_custom(svc)
@@ -564,564 +644,644 @@
  584    584   
                            <
  585    585   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  586    586   
                                as ::aws_smithy_http_server::plugin::Plugin<
  587    587   
                                    RpcV2Protocol<L>,
  588    588   
                                    crate::operation_shape::GreetingWithErrors,
  589    589   
                                    ModelPl::Output
  590    590   
                                >
  591    591   
                            >::Output
  592    592   
                        >,
  593    593   
  594         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  595         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         594  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         595  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  596    596   
  597    597   
                    {
  598    598   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  599    599   
        use ::aws_smithy_http_server::plugin::Plugin;
  600    600   
        let svc = crate::operation_shape::GreetingWithErrors::from_service(service);
  601    601   
        let svc = self.model_plugin.apply(svc);
  602    602   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  603    603   
            .apply(svc);
  604    604   
        let svc = self.http_plugin.apply(svc);
  605    605   
        self.greeting_with_errors_custom(svc)
  606    606   
    }
  607    607   
  608    608   
    /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) to a custom [`Service`](tower::Service).
  609    609   
    /// not constrained by the Smithy contract.
  610    610   
    fn greeting_with_errors_custom<S>(mut self, svc: S) -> Self
  611    611   
    where
  612    612   
        S: ::tower::Service<
  613         -
                ::http::Request<Body>,
  614         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         613  +
                ::http_1x::Request<Body>,
         614  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  615    615   
                Error = ::std::convert::Infallible,
  616    616   
            > + Clone
  617    617   
            + Send
  618    618   
            + 'static,
  619    619   
        S::Future: Send + 'static,
  620    620   
    {
  621    621   
        self.greeting_with_errors = Some(::aws_smithy_http_server::routing::Route::new(svc));
  622    622   
        self
  623    623   
    }
  624    624   
@@ -647,647 +708,708 @@
  667    667   
                            <
  668    668   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  669    669   
                                as ::aws_smithy_http_server::plugin::Plugin<
  670    670   
                                    RpcV2Protocol<L>,
  671    671   
                                    crate::operation_shape::NoInputOutput,
  672    672   
                                    ModelPl::Output
  673    673   
                                >
  674    674   
                            >::Output
  675    675   
                        >,
  676    676   
  677         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  678         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         677  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         678  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  679    679   
  680    680   
                    {
  681    681   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  682    682   
        use ::aws_smithy_http_server::plugin::Plugin;
  683    683   
        let svc = crate::operation_shape::NoInputOutput::from_handler(handler);
  684    684   
        let svc = self.model_plugin.apply(svc);
  685    685   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  686    686   
            .apply(svc);
  687    687   
        let svc = self.http_plugin.apply(svc);
  688    688   
        self.no_input_output_custom(svc)
@@ -714,714 +794,794 @@
  734    734   
                            <
  735    735   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  736    736   
                                as ::aws_smithy_http_server::plugin::Plugin<
  737    737   
                                    RpcV2Protocol<L>,
  738    738   
                                    crate::operation_shape::NoInputOutput,
  739    739   
                                    ModelPl::Output
  740    740   
                                >
  741    741   
                            >::Output
  742    742   
                        >,
  743    743   
  744         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  745         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         744  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         745  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  746    746   
  747    747   
                    {
  748    748   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  749    749   
        use ::aws_smithy_http_server::plugin::Plugin;
  750    750   
        let svc = crate::operation_shape::NoInputOutput::from_service(service);
  751    751   
        let svc = self.model_plugin.apply(svc);
  752    752   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  753    753   
            .apply(svc);
  754    754   
        let svc = self.http_plugin.apply(svc);
  755    755   
        self.no_input_output_custom(svc)
  756    756   
    }
  757    757   
  758    758   
    /// Sets the [`NoInputOutput`](crate::operation_shape::NoInputOutput) to a custom [`Service`](tower::Service).
  759    759   
    /// not constrained by the Smithy contract.
  760    760   
    fn no_input_output_custom<S>(mut self, svc: S) -> Self
  761    761   
    where
  762    762   
        S: ::tower::Service<
  763         -
                ::http::Request<Body>,
  764         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         763  +
                ::http_1x::Request<Body>,
         764  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  765    765   
                Error = ::std::convert::Infallible,
  766    766   
            > + Clone
  767    767   
            + Send
  768    768   
            + 'static,
  769    769   
        S::Future: Send + 'static,
  770    770   
    {
  771    771   
        self.no_input_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
  772    772   
        self
  773    773   
    }
  774    774   
@@ -797,797 +858,858 @@
  817    817   
                            <
  818    818   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  819    819   
                                as ::aws_smithy_http_server::plugin::Plugin<
  820    820   
                                    RpcV2Protocol<L>,
  821    821   
                                    crate::operation_shape::OperationWithDefaults,
  822    822   
                                    ModelPl::Output
  823    823   
                                >
  824    824   
                            >::Output
  825    825   
                        >,
  826    826   
  827         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  828         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         827  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         828  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  829    829   
  830    830   
                    {
  831    831   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  832    832   
        use ::aws_smithy_http_server::plugin::Plugin;
  833    833   
        let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
  834    834   
        let svc = self.model_plugin.apply(svc);
  835    835   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  836    836   
            .apply(svc);
  837    837   
        let svc = self.http_plugin.apply(svc);
  838    838   
        self.operation_with_defaults_custom(svc)
@@ -864,864 +944,944 @@
  884    884   
                            <
  885    885   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  886    886   
                                as ::aws_smithy_http_server::plugin::Plugin<
  887    887   
                                    RpcV2Protocol<L>,
  888    888   
                                    crate::operation_shape::OperationWithDefaults,
  889    889   
                                    ModelPl::Output
  890    890   
                                >
  891    891   
                            >::Output
  892    892   
                        >,
  893    893   
  894         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  895         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         894  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         895  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  896    896   
  897    897   
                    {
  898    898   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  899    899   
        use ::aws_smithy_http_server::plugin::Plugin;
  900    900   
        let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
  901    901   
        let svc = self.model_plugin.apply(svc);
  902    902   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  903    903   
            .apply(svc);
  904    904   
        let svc = self.http_plugin.apply(svc);
  905    905   
        self.operation_with_defaults_custom(svc)
  906    906   
    }
  907    907   
  908    908   
    /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
  909    909   
    /// not constrained by the Smithy contract.
  910    910   
    fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
  911    911   
    where
  912    912   
        S: ::tower::Service<
  913         -
                ::http::Request<Body>,
  914         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         913  +
                ::http_1x::Request<Body>,
         914  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  915    915   
                Error = ::std::convert::Infallible,
  916    916   
            > + Clone
  917    917   
            + Send
  918    918   
            + 'static,
  919    919   
        S::Future: Send + 'static,
  920    920   
    {
  921    921   
        self.operation_with_defaults = Some(::aws_smithy_http_server::routing::Route::new(svc));
  922    922   
        self
  923    923   
    }
  924    924   
@@ -947,947 +1008,1008 @@
  967    967   
                            <
  968    968   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  969    969   
                                as ::aws_smithy_http_server::plugin::Plugin<
  970    970   
                                    RpcV2Protocol<L>,
  971    971   
                                    crate::operation_shape::OptionalInputOutput,
  972    972   
                                    ModelPl::Output
  973    973   
                                >
  974    974   
                            >::Output
  975    975   
                        >,
  976    976   
  977         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  978         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         977  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         978  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  979    979   
  980    980   
                    {
  981    981   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  982    982   
        use ::aws_smithy_http_server::plugin::Plugin;
  983    983   
        let svc = crate::operation_shape::OptionalInputOutput::from_handler(handler);
  984    984   
        let svc = self.model_plugin.apply(svc);
  985    985   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  986    986   
            .apply(svc);
  987    987   
        let svc = self.http_plugin.apply(svc);
  988    988   
        self.optional_input_output_custom(svc)
@@ -1014,1014 +1094,1094 @@
 1034   1034   
                            <
 1035   1035   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1036   1036   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1037   1037   
                                    RpcV2Protocol<L>,
 1038   1038   
                                    crate::operation_shape::OptionalInputOutput,
 1039   1039   
                                    ModelPl::Output
 1040   1040   
                                >
 1041   1041   
                            >::Output
 1042   1042   
                        >,
 1043   1043   
 1044         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1045         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1044  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1045  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1046   1046   
 1047   1047   
                    {
 1048   1048   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1049   1049   
        use ::aws_smithy_http_server::plugin::Plugin;
 1050   1050   
        let svc = crate::operation_shape::OptionalInputOutput::from_service(service);
 1051   1051   
        let svc = self.model_plugin.apply(svc);
 1052   1052   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1053   1053   
            .apply(svc);
 1054   1054   
        let svc = self.http_plugin.apply(svc);
 1055   1055   
        self.optional_input_output_custom(svc)
 1056   1056   
    }
 1057   1057   
 1058   1058   
    /// Sets the [`OptionalInputOutput`](crate::operation_shape::OptionalInputOutput) to a custom [`Service`](tower::Service).
 1059   1059   
    /// not constrained by the Smithy contract.
 1060   1060   
    fn optional_input_output_custom<S>(mut self, svc: S) -> Self
 1061   1061   
    where
 1062   1062   
        S: ::tower::Service<
 1063         -
                ::http::Request<Body>,
 1064         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1063  +
                ::http_1x::Request<Body>,
        1064  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1065   1065   
                Error = ::std::convert::Infallible,
 1066   1066   
            > + Clone
 1067   1067   
            + Send
 1068   1068   
            + 'static,
 1069   1069   
        S::Future: Send + 'static,
 1070   1070   
    {
 1071   1071   
        self.optional_input_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1072   1072   
        self
 1073   1073   
    }
 1074   1074   
@@ -1097,1097 +1158,1158 @@
 1117   1117   
                            <
 1118   1118   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1119   1119   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1120   1120   
                                    RpcV2Protocol<L>,
 1121   1121   
                                    crate::operation_shape::RecursiveShapes,
 1122   1122   
                                    ModelPl::Output
 1123   1123   
                                >
 1124   1124   
                            >::Output
 1125   1125   
                        >,
 1126   1126   
 1127         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1128         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1127  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1128  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1129   1129   
 1130   1130   
                    {
 1131   1131   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1132   1132   
        use ::aws_smithy_http_server::plugin::Plugin;
 1133   1133   
        let svc = crate::operation_shape::RecursiveShapes::from_handler(handler);
 1134   1134   
        let svc = self.model_plugin.apply(svc);
 1135   1135   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1136   1136   
            .apply(svc);
 1137   1137   
        let svc = self.http_plugin.apply(svc);
 1138   1138   
        self.recursive_shapes_custom(svc)
@@ -1164,1164 +1244,1244 @@
 1184   1184   
                            <
 1185   1185   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1186   1186   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1187   1187   
                                    RpcV2Protocol<L>,
 1188   1188   
                                    crate::operation_shape::RecursiveShapes,
 1189   1189   
                                    ModelPl::Output
 1190   1190   
                                >
 1191   1191   
                            >::Output
 1192   1192   
                        >,
 1193   1193   
 1194         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1195         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1194  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1195  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1196   1196   
 1197   1197   
                    {
 1198   1198   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1199   1199   
        use ::aws_smithy_http_server::plugin::Plugin;
 1200   1200   
        let svc = crate::operation_shape::RecursiveShapes::from_service(service);
 1201   1201   
        let svc = self.model_plugin.apply(svc);
 1202   1202   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1203   1203   
            .apply(svc);
 1204   1204   
        let svc = self.http_plugin.apply(svc);
 1205   1205   
        self.recursive_shapes_custom(svc)
 1206   1206   
    }
 1207   1207   
 1208   1208   
    /// Sets the [`RecursiveShapes`](crate::operation_shape::RecursiveShapes) to a custom [`Service`](tower::Service).
 1209   1209   
    /// not constrained by the Smithy contract.
 1210   1210   
    fn recursive_shapes_custom<S>(mut self, svc: S) -> Self
 1211   1211   
    where
 1212   1212   
        S: ::tower::Service<
 1213         -
                ::http::Request<Body>,
 1214         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1213  +
                ::http_1x::Request<Body>,
        1214  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1215   1215   
                Error = ::std::convert::Infallible,
 1216   1216   
            > + Clone
 1217   1217   
            + Send
 1218   1218   
            + 'static,
 1219   1219   
        S::Future: Send + 'static,
 1220   1220   
    {
 1221   1221   
        self.recursive_shapes = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1222   1222   
        self
 1223   1223   
    }
 1224   1224   
@@ -1247,1247 +1308,1308 @@
 1267   1267   
                            <
 1268   1268   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1269   1269   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1270   1270   
                                    RpcV2Protocol<L>,
 1271   1271   
                                    crate::operation_shape::RpcV2CborDenseMaps,
 1272   1272   
                                    ModelPl::Output
 1273   1273   
                                >
 1274   1274   
                            >::Output
 1275   1275   
                        >,
 1276   1276   
 1277         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1278         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1277  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1278  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1279   1279   
 1280   1280   
                    {
 1281   1281   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1282   1282   
        use ::aws_smithy_http_server::plugin::Plugin;
 1283   1283   
        let svc = crate::operation_shape::RpcV2CborDenseMaps::from_handler(handler);
 1284   1284   
        let svc = self.model_plugin.apply(svc);
 1285   1285   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1286   1286   
            .apply(svc);
 1287   1287   
        let svc = self.http_plugin.apply(svc);
 1288   1288   
        self.rpc_v2_cbor_dense_maps_custom(svc)
@@ -1314,1314 +1394,1394 @@
 1334   1334   
                            <
 1335   1335   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1336   1336   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1337   1337   
                                    RpcV2Protocol<L>,
 1338   1338   
                                    crate::operation_shape::RpcV2CborDenseMaps,
 1339   1339   
                                    ModelPl::Output
 1340   1340   
                                >
 1341   1341   
                            >::Output
 1342   1342   
                        >,
 1343   1343   
 1344         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1345         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1344  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1345  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1346   1346   
 1347   1347   
                    {
 1348   1348   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1349   1349   
        use ::aws_smithy_http_server::plugin::Plugin;
 1350   1350   
        let svc = crate::operation_shape::RpcV2CborDenseMaps::from_service(service);
 1351   1351   
        let svc = self.model_plugin.apply(svc);
 1352   1352   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1353   1353   
            .apply(svc);
 1354   1354   
        let svc = self.http_plugin.apply(svc);
 1355   1355   
        self.rpc_v2_cbor_dense_maps_custom(svc)
 1356   1356   
    }
 1357   1357   
 1358   1358   
    /// Sets the [`RpcV2CborDenseMaps`](crate::operation_shape::RpcV2CborDenseMaps) to a custom [`Service`](tower::Service).
 1359   1359   
    /// not constrained by the Smithy contract.
 1360   1360   
    fn rpc_v2_cbor_dense_maps_custom<S>(mut self, svc: S) -> Self
 1361   1361   
    where
 1362   1362   
        S: ::tower::Service<
 1363         -
                ::http::Request<Body>,
 1364         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1363  +
                ::http_1x::Request<Body>,
        1364  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1365   1365   
                Error = ::std::convert::Infallible,
 1366   1366   
            > + Clone
 1367   1367   
            + Send
 1368   1368   
            + 'static,
 1369   1369   
        S::Future: Send + 'static,
 1370   1370   
    {
 1371   1371   
        self.rpc_v2_cbor_dense_maps = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1372   1372   
        self
 1373   1373   
    }
 1374   1374   
@@ -1397,1397 +1458,1458 @@
 1417   1417   
                            <
 1418   1418   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1419   1419   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1420   1420   
                                    RpcV2Protocol<L>,
 1421   1421   
                                    crate::operation_shape::RpcV2CborLists,
 1422   1422   
                                    ModelPl::Output
 1423   1423   
                                >
 1424   1424   
                            >::Output
 1425   1425   
                        >,
 1426   1426   
 1427         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1428         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1427  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1428  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1429   1429   
 1430   1430   
                    {
 1431   1431   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1432   1432   
        use ::aws_smithy_http_server::plugin::Plugin;
 1433   1433   
        let svc = crate::operation_shape::RpcV2CborLists::from_handler(handler);
 1434   1434   
        let svc = self.model_plugin.apply(svc);
 1435   1435   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1436   1436   
            .apply(svc);
 1437   1437   
        let svc = self.http_plugin.apply(svc);
 1438   1438   
        self.rpc_v2_cbor_lists_custom(svc)
@@ -1464,1464 +1544,1544 @@
 1484   1484   
                            <
 1485   1485   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1486   1486   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1487   1487   
                                    RpcV2Protocol<L>,
 1488   1488   
                                    crate::operation_shape::RpcV2CborLists,
 1489   1489   
                                    ModelPl::Output
 1490   1490   
                                >
 1491   1491   
                            >::Output
 1492   1492   
                        >,
 1493   1493   
 1494         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1495         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1494  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1495  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1496   1496   
 1497   1497   
                    {
 1498   1498   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1499   1499   
        use ::aws_smithy_http_server::plugin::Plugin;
 1500   1500   
        let svc = crate::operation_shape::RpcV2CborLists::from_service(service);
 1501   1501   
        let svc = self.model_plugin.apply(svc);
 1502   1502   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1503   1503   
            .apply(svc);
 1504   1504   
        let svc = self.http_plugin.apply(svc);
 1505   1505   
        self.rpc_v2_cbor_lists_custom(svc)
 1506   1506   
    }
 1507   1507   
 1508   1508   
    /// Sets the [`RpcV2CborLists`](crate::operation_shape::RpcV2CborLists) to a custom [`Service`](tower::Service).
 1509   1509   
    /// not constrained by the Smithy contract.
 1510   1510   
    fn rpc_v2_cbor_lists_custom<S>(mut self, svc: S) -> Self
 1511   1511   
    where
 1512   1512   
        S: ::tower::Service<
 1513         -
                ::http::Request<Body>,
 1514         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1513  +
                ::http_1x::Request<Body>,
        1514  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1515   1515   
                Error = ::std::convert::Infallible,
 1516   1516   
            > + Clone
 1517   1517   
            + Send
 1518   1518   
            + 'static,
 1519   1519   
        S::Future: Send + 'static,
 1520   1520   
    {
 1521   1521   
        self.rpc_v2_cbor_lists = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1522   1522   
        self
 1523   1523   
    }
 1524   1524   
@@ -1547,1547 +1608,1608 @@
 1567   1567   
                            <
 1568   1568   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1569   1569   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1570   1570   
                                    RpcV2Protocol<L>,
 1571   1571   
                                    crate::operation_shape::RpcV2CborSparseMaps,
 1572   1572   
                                    ModelPl::Output
 1573   1573   
                                >
 1574   1574   
                            >::Output
 1575   1575   
                        >,
 1576   1576   
 1577         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1578         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1577  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1578  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1579   1579   
 1580   1580   
                    {
 1581   1581   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1582   1582   
        use ::aws_smithy_http_server::plugin::Plugin;
 1583   1583   
        let svc = crate::operation_shape::RpcV2CborSparseMaps::from_handler(handler);
 1584   1584   
        let svc = self.model_plugin.apply(svc);
 1585   1585   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1586   1586   
            .apply(svc);
 1587   1587   
        let svc = self.http_plugin.apply(svc);
 1588   1588   
        self.rpc_v2_cbor_sparse_maps_custom(svc)
@@ -1614,1614 +1694,1694 @@
 1634   1634   
                            <
 1635   1635   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1636   1636   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1637   1637   
                                    RpcV2Protocol<L>,
 1638   1638   
                                    crate::operation_shape::RpcV2CborSparseMaps,
 1639   1639   
                                    ModelPl::Output
 1640   1640   
                                >
 1641   1641   
                            >::Output
 1642   1642   
                        >,
 1643   1643   
 1644         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1645         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1644  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1645  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1646   1646   
 1647   1647   
                    {
 1648   1648   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1649   1649   
        use ::aws_smithy_http_server::plugin::Plugin;
 1650   1650   
        let svc = crate::operation_shape::RpcV2CborSparseMaps::from_service(service);
 1651   1651   
        let svc = self.model_plugin.apply(svc);
 1652   1652   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1653   1653   
            .apply(svc);
 1654   1654   
        let svc = self.http_plugin.apply(svc);
 1655   1655   
        self.rpc_v2_cbor_sparse_maps_custom(svc)
 1656   1656   
    }
 1657   1657   
 1658   1658   
    /// Sets the [`RpcV2CborSparseMaps`](crate::operation_shape::RpcV2CborSparseMaps) to a custom [`Service`](tower::Service).
 1659   1659   
    /// not constrained by the Smithy contract.
 1660   1660   
    fn rpc_v2_cbor_sparse_maps_custom<S>(mut self, svc: S) -> Self
 1661   1661   
    where
 1662   1662   
        S: ::tower::Service<
 1663         -
                ::http::Request<Body>,
 1664         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1663  +
                ::http_1x::Request<Body>,
        1664  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1665   1665   
                Error = ::std::convert::Infallible,
 1666   1666   
            > + Clone
 1667   1667   
            + Send
 1668   1668   
            + 'static,
 1669   1669   
        S::Future: Send + 'static,
 1670   1670   
    {
 1671   1671   
        self.rpc_v2_cbor_sparse_maps = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1672   1672   
        self
 1673   1673   
    }
 1674   1674   
@@ -1697,1697 +1758,1758 @@
 1717   1717   
                            <
 1718   1718   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1719   1719   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1720   1720   
                                    RpcV2Protocol<L>,
 1721   1721   
                                    crate::operation_shape::SimpleScalarProperties,
 1722   1722   
                                    ModelPl::Output
 1723   1723   
                                >
 1724   1724   
                            >::Output
 1725   1725   
                        >,
 1726   1726   
 1727         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1728         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1727  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1728  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1729   1729   
 1730   1730   
                    {
 1731   1731   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1732   1732   
        use ::aws_smithy_http_server::plugin::Plugin;
 1733   1733   
        let svc = crate::operation_shape::SimpleScalarProperties::from_handler(handler);
 1734   1734   
        let svc = self.model_plugin.apply(svc);
 1735   1735   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1736   1736   
            .apply(svc);
 1737   1737   
        let svc = self.http_plugin.apply(svc);
 1738   1738   
        self.simple_scalar_properties_custom(svc)
@@ -1764,1764 +1844,1844 @@
 1784   1784   
                            <
 1785   1785   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1786   1786   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1787   1787   
                                    RpcV2Protocol<L>,
 1788   1788   
                                    crate::operation_shape::SimpleScalarProperties,
 1789   1789   
                                    ModelPl::Output
 1790   1790   
                                >
 1791   1791   
                            >::Output
 1792   1792   
                        >,
 1793   1793   
 1794         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1795         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1794  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1795  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1796   1796   
 1797   1797   
                    {
 1798   1798   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1799   1799   
        use ::aws_smithy_http_server::plugin::Plugin;
 1800   1800   
        let svc = crate::operation_shape::SimpleScalarProperties::from_service(service);
 1801   1801   
        let svc = self.model_plugin.apply(svc);
 1802   1802   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1803   1803   
            .apply(svc);
 1804   1804   
        let svc = self.http_plugin.apply(svc);
 1805   1805   
        self.simple_scalar_properties_custom(svc)
 1806   1806   
    }
 1807   1807   
 1808   1808   
    /// Sets the [`SimpleScalarProperties`](crate::operation_shape::SimpleScalarProperties) to a custom [`Service`](tower::Service).
 1809   1809   
    /// not constrained by the Smithy contract.
 1810   1810   
    fn simple_scalar_properties_custom<S>(mut self, svc: S) -> Self
 1811   1811   
    where
 1812   1812   
        S: ::tower::Service<
 1813         -
                ::http::Request<Body>,
 1814         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1813  +
                ::http_1x::Request<Body>,
        1814  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1815   1815   
                Error = ::std::convert::Infallible,
 1816   1816   
            > + Clone
 1817   1817   
            + Send
 1818   1818   
            + 'static,
 1819   1819   
        S::Future: Send + 'static,
 1820   1820   
    {
 1821   1821   
        self.simple_scalar_properties = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1822   1822   
        self
 1823   1823   
    }
 1824   1824   
@@ -1847,1847 +1908,1908 @@
 1867   1867   
                            <
 1868   1868   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1869   1869   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1870   1870   
                                    RpcV2Protocol<L>,
 1871   1871   
                                    crate::operation_shape::SparseNullsOperation,
 1872   1872   
                                    ModelPl::Output
 1873   1873   
                                >
 1874   1874   
                            >::Output
 1875   1875   
                        >,
 1876   1876   
 1877         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1878         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1877  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1878  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1879   1879   
 1880   1880   
                    {
 1881   1881   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1882   1882   
        use ::aws_smithy_http_server::plugin::Plugin;
 1883   1883   
        let svc = crate::operation_shape::SparseNullsOperation::from_handler(handler);
 1884   1884   
        let svc = self.model_plugin.apply(svc);
 1885   1885   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1886   1886   
            .apply(svc);
 1887   1887   
        let svc = self.http_plugin.apply(svc);
 1888   1888   
        self.sparse_nulls_operation_custom(svc)
@@ -1914,1914 +1994,1994 @@
 1934   1934   
                            <
 1935   1935   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1936   1936   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1937   1937   
                                    RpcV2Protocol<L>,
 1938   1938   
                                    crate::operation_shape::SparseNullsOperation,
 1939   1939   
                                    ModelPl::Output
 1940   1940   
                                >
 1941   1941   
                            >::Output
 1942   1942   
                        >,
 1943   1943   
 1944         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1945         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1944  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1945  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1946   1946   
 1947   1947   
                    {
 1948   1948   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1949   1949   
        use ::aws_smithy_http_server::plugin::Plugin;
 1950   1950   
        let svc = crate::operation_shape::SparseNullsOperation::from_service(service);
 1951   1951   
        let svc = self.model_plugin.apply(svc);
 1952   1952   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1953   1953   
            .apply(svc);
 1954   1954   
        let svc = self.http_plugin.apply(svc);
 1955   1955   
        self.sparse_nulls_operation_custom(svc)
 1956   1956   
    }
 1957   1957   
 1958   1958   
    /// Sets the [`SparseNullsOperation`](crate::operation_shape::SparseNullsOperation) to a custom [`Service`](tower::Service).
 1959   1959   
    /// not constrained by the Smithy contract.
 1960   1960   
    fn sparse_nulls_operation_custom<S>(mut self, svc: S) -> Self
 1961   1961   
    where
 1962   1962   
        S: ::tower::Service<
 1963         -
                ::http::Request<Body>,
 1964         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1963  +
                ::http_1x::Request<Body>,
        1964  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1965   1965   
                Error = ::std::convert::Infallible,
 1966   1966   
            > + Clone
 1967   1967   
            + Send
 1968   1968   
            + 'static,
 1969   1969   
        S::Future: Send + 'static,
 1970   1970   
    {
 1971   1971   
        self.sparse_nulls_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1972   1972   
        self
 1973   1973   
    }
 1974   1974   
}
@@ -2498,2498 +2559,2559 @@
 2518   2518   
    ) -> RpcV2Protocol<
 2519   2519   
        ::aws_smithy_http_server::routing::RoutingService<
 2520   2520   
            ::aws_smithy_http_server::protocol::rpc_v2_cbor::router::RpcV2CborRouter<
 2521   2521   
                ::aws_smithy_http_server::routing::Route<B>,
 2522   2522   
            >,
 2523   2523   
            ::aws_smithy_http_server::protocol::rpc_v2_cbor::RpcV2Cbor,
 2524   2524   
        >,
 2525   2525   
    >
 2526   2526   
    where
 2527   2527   
        S: ::tower::Service<
 2528         -
            ::http::Request<B>,
 2529         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        2528  +
            ::http_1x::Request<B>,
        2529  +
            Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 2530   2530   
            Error = std::convert::Infallible,
 2531   2531   
        >,
 2532   2532   
        S: Clone + Send + 'static,
 2533   2533   
        S::Future: Send + 'static,
 2534   2534   
    {
 2535   2535   
        self.layer(&::tower::layer::layer_fn(
 2536   2536   
            ::aws_smithy_http_server::routing::Route::new,
 2537   2537   
        ))
 2538   2538   
    }
 2539   2539   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras-http0x/rust-server-codegen/Cargo.toml

@@ -0,1 +0,59 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "rpcv2cbor_extras-http0x"
           4  +
version = "0.0.1"
           5  +
authors = ["protocoltest@example.com"]
           6  +
description = "test"
           7  +
edition = "2021"
           8  +
           9  +
[package.metadata.smithy]
          10  +
codegen-version = "ci"
          11  +
protocol = "smithy.protocols#rpcv2Cbor"
          12  +
[dependencies.aws-smithy-cbor]
          13  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-cbor"
          14  +
[dependencies.aws-smithy-eventstream]
          15  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-eventstream"
          16  +
[dependencies.aws-smithy-legacy-http]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          18  +
features = ["event-stream"]
          19  +
[dependencies.aws-smithy-legacy-http-server]
          20  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
          21  +
[dependencies.aws-smithy-runtime-api]
          22  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          23  +
features = ["http-02x", "client", "http-1x"]
          24  +
[dependencies.aws-smithy-types]
          25  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          26  +
features = ["http-body-0-4-x"]
          27  +
[dependencies.bytes]
          28  +
version = "1.4.0"
          29  +
[dependencies.futures-util]
          30  +
version = "0.3"
          31  +
[dependencies.http]
          32  +
version = "0.2.9"
          33  +
[dependencies.hyper]
          34  +
version = "0.14.26"
          35  +
[dependencies.mime]
          36  +
version = "0.3"
          37  +
[dependencies.pin-project-lite]
          38  +
version = "0.2"
          39  +
[dependencies.tower]
          40  +
version = "0.4"
          41  +
[dependencies.tracing]
          42  +
version = "0.1"
          43  +
[dev-dependencies.aws-smithy-protocol-test]
          44  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
          45  +
[dev-dependencies.pretty_assertions]
          46  +
version = "1.3.0"
          47  +
[dev-dependencies.tokio]
          48  +
version = "1.23.1"
          49  +
features = ["macros", "test-util", "rt-multi-thread"]
          50  +
[dev-dependencies.tracing-test]
          51  +
version = "0.2.5"
          52  +
features = ["no-env-filter"]
          53  +
[features]
          54  +
rt-tokio = ["aws-smithy-types/rt-tokio"]
          55  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          56  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
          57  +
default = ["rt-tokio", "request-id"]
          58  +
          59  +

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras-http0x/rust-server-codegen/src/constrained.rs

@@ -0,1 +0,107 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
pub(crate) mod complex_map_constrained {
           4  +
           5  +
    #[derive(Debug, Clone)]
           6  +
    pub(crate) struct ComplexMapConstrained(
           7  +
        pub(crate) std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
           8  +
    );
           9  +
          10  +
    impl crate::constrained::Constrained for ComplexMapConstrained {
          11  +
        type Unconstrained =
          12  +
            crate::unconstrained::complex_map_unconstrained::ComplexMapUnconstrained;
          13  +
    }
          14  +
    impl
          15  +
        ::std::convert::From<
          16  +
            ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          17  +
        > for ComplexMapConstrained
          18  +
    {
          19  +
        fn from(
          20  +
            v: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          21  +
        ) -> Self {
          22  +
            Self(v)
          23  +
        }
          24  +
    }
          25  +
          26  +
    impl ::std::convert::From<ComplexMapConstrained>
          27  +
        for ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>
          28  +
    {
          29  +
        fn from(v: ComplexMapConstrained) -> Self {
          30  +
            v.0
          31  +
        }
          32  +
    }
          33  +
}
          34  +
pub(crate) mod complex_list_constrained {
          35  +
          36  +
    #[derive(Debug, Clone)]
          37  +
    pub(crate) struct ComplexListConstrained(
          38  +
        pub(crate) std::vec::Vec<crate::constrained::complex_map_constrained::ComplexMapConstrained>,
          39  +
    );
          40  +
          41  +
    impl crate::constrained::Constrained for ComplexListConstrained {
          42  +
        type Unconstrained =
          43  +
            crate::unconstrained::complex_list_unconstrained::ComplexListUnconstrained;
          44  +
    }
          45  +
    impl
          46  +
        ::std::convert::From<
          47  +
            ::std::vec::Vec<
          48  +
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          49  +
            >,
          50  +
        > for ComplexListConstrained
          51  +
    {
          52  +
        fn from(
          53  +
            v: ::std::vec::Vec<
          54  +
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          55  +
            >,
          56  +
        ) -> Self {
          57  +
            Self(v.into_iter().map(|item| item.into()).collect())
          58  +
        }
          59  +
    }
          60  +
          61  +
    impl ::std::convert::From<ComplexListConstrained>
          62  +
        for ::std::vec::Vec<
          63  +
            ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          64  +
        >
          65  +
    {
          66  +
        fn from(v: ComplexListConstrained) -> Self {
          67  +
            v.0.into_iter().map(|item| item.into()).collect()
          68  +
        }
          69  +
    }
          70  +
}
          71  +
pub(crate) mod struct_list_constrained {
          72  +
          73  +
    #[derive(Debug, Clone)]
          74  +
    pub(crate) struct StructListConstrained(pub(crate) std::vec::Vec<crate::model::SimpleStruct>);
          75  +
          76  +
    impl crate::constrained::Constrained for StructListConstrained {
          77  +
        type Unconstrained =
          78  +
            crate::unconstrained::struct_list_unconstrained::StructListUnconstrained;
          79  +
    }
          80  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::SimpleStruct>> for StructListConstrained {
          81  +
        fn from(v: ::std::vec::Vec<crate::model::SimpleStruct>) -> Self {
          82  +
            Self(v)
          83  +
        }
          84  +
    }
          85  +
          86  +
    impl ::std::convert::From<StructListConstrained> for ::std::vec::Vec<crate::model::SimpleStruct> {
          87  +
        fn from(v: StructListConstrained) -> Self {
          88  +
            v.0
          89  +
        }
          90  +
    }
          91  +
}
          92  +
          93  +
/*
          94  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
          95  +
 * SPDX-License-Identifier: Apache-2.0
          96  +
 */
          97  +
          98  +
pub(crate) trait Constrained {
          99  +
    type Unconstrained;
         100  +
}
         101  +
         102  +
#[derive(Debug, Clone)]
         103  +
#[allow(dead_code)]
         104  +
pub(crate) enum MaybeConstrained<T: Constrained> {
         105  +
    Constrained(T),
         106  +
    Unconstrained(T::Unconstrained),
         107  +
}