Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5

Files changed:

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_content_type_parameters.rs

@@ -1,1 +91,94 @@
    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_content_type_parameters_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::ContentTypeParametersInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::content_type_parameters_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters(
   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_content_type_parameters_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::ContentTypeParametersOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   52     55   
        );
   53     56   
        let http_status: u16 = 200;
   54     57   
        builder = builder.status(http_status);
   55     58   
        let payload =
   56     59   
            crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
   57     60   
        ;
   58     61   
        let content_length = payload.len();
   59     62   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   60     63   
            builder,
   61         -
            ::http::header::CONTENT_LENGTH,
          64  +
            ::http_1x::header::CONTENT_LENGTH,
   62     65   
            content_length,
   63     66   
        );
   64     67   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   65     68   
        builder.body(body)?
   66     69   
    })
   67     70   
}
   68     71   
   69     72   
pub(crate) fn de_content_type_parameters(
   70     73   
    value: &[u8],
   71     74   
    mut builder: crate::input::content_type_parameters_input::Builder,

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_datetime_offsets.rs

@@ -1,1 +55,55 @@
    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_datetime_offsets_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::DatetimeOffsetsInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::datetime_offsets_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_datetime_offsets_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::DatetimeOffsetsOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_datetime_offsets_output::ser_datetime_offsets_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49         -
            ::http::header::CONTENT_LENGTH,
          49  +
            ::http_1x::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52     52   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_empty_operation.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_empty_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::EmptyOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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_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     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_empty_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EmptyOperationOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   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/json_rpc11/rust-server-codegen/src/protocol_serde/shape_endpoint_operation.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_endpoint_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::EndpointOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::endpoint_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     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_endpoint_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EndpointOperationOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   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/json_rpc11/rust-server-codegen/src/protocol_serde/shape_endpoint_with_host_label_operation.rs

@@ -1,1 +114,117 @@
    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_endpoint_with_host_label_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::EndpointWithHostLabelOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::endpoint_with_host_label_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_endpoint_with_host_label_operation::de_endpoint_with_host_label_operation(bytes.as_ref(), input)?;
   29     32   
        }
   30     33   
        input.build()?
   31     34   
    })
   32     35   
}
   33     36   
   34     37   
#[allow(clippy::unnecessary_wraps)]
   35     38   
pub fn ser_endpoint_with_host_label_operation_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::EndpointWithHostLabelOperationOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     43   
> {
   41     44   
    Ok({
   42     45   
        #[allow(unused_mut)]
   43         -
        let mut builder = ::http::Response::builder();
          46  +
        let mut builder = ::http_1x::Response::builder();
   44     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   45     48   
            builder,
   46         -
            ::http::header::CONTENT_TYPE,
          49  +
            ::http_1x::header::CONTENT_TYPE,
   47     50   
            "application/x-amz-json-1.1",
   48     51   
        );
   49     52   
        let http_status: u16 = 200;
   50     53   
        builder = builder.status(http_status);
   51     54   
        let payload = "";
   52     55   
        let content_length = payload.len();
   53     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     57   
            builder,
   55         -
            ::http::header::CONTENT_LENGTH,
          58  +
            ::http_1x::header::CONTENT_LENGTH,
   56     59   
            content_length,
   57     60   
        );
   58     61   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   59     62   
        builder.body(body)?
   60     63   
    })
   61     64   
}
   62     65   
   63     66   
#[allow(clippy::unnecessary_wraps)]
   64     67   
pub fn ser_endpoint_with_host_label_operation_http_error(
   65     68   
    error: &crate::error::EndpointWithHostLabelOperationError,
   66     69   
) -> std::result::Result<
   67     70   
    ::aws_smithy_http_server::response::Response,
   68     71   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   69     72   
> {
   70     73   
    Ok({
   71     74   
        match error {
   72     75   
            crate::error::EndpointWithHostLabelOperationError::ValidationException(output) => {
   73     76   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   74     77   
                #[allow(unused_mut)]
   75         -
                let mut builder = ::http::Response::builder();
          78  +
                let mut builder = ::http_1x::Response::builder();
   76     79   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   77     80   
                    builder,
   78         -
                    ::http::header::CONTENT_TYPE,
          81  +
                    ::http_1x::header::CONTENT_TYPE,
   79     82   
                    "application/x-amz-json-1.1",
   80     83   
                );
   81     84   
                let content_length = payload.len();
   82     85   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   83     86   
                    builder,
   84         -
                    ::http::header::CONTENT_LENGTH,
          87  +
                    ::http_1x::header::CONTENT_LENGTH,
   85     88   
                    content_length,
   86     89   
                );
   87     90   
                builder
   88     91   
                    .status(400)
   89     92   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   90     93   
            }
   91     94   
        }
   92     95   
    })
   93     96   
}
   94     97   

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

@@ -1,1 +55,55 @@
    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::aws_json::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::aws_json::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::aws_json::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/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_fractional_seconds_output::ser_fractional_seconds_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49         -
            ::http::header::CONTENT_LENGTH,
          49  +
            ::http_1x::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52     52   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}

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

@@ -1,1 +129,129 @@
    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::aws_json::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::aws_json::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::aws_json::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/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_greeting_with_errors_output::ser_greeting_with_errors_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49         -
            ::http::header::CONTENT_LENGTH,
          49  +
            ::http_1x::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52     52   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_greeting_with_errors_http_error(
   59     59   
    error: &crate::error::GreetingWithErrorsError,
   60     60   
) -> std::result::Result<
   61     61   
    ::aws_smithy_http_server::response::Response,
   62     62   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::GreetingWithErrorsError::InvalidGreeting(output) => {
   67     67   
                let payload =
   68     68   
                    crate::protocol_serde::shape_invalid_greeting::ser_invalid_greeting_error(
   69     69   
                        output,
   70     70   
                    )?;
   71     71   
                #[allow(unused_mut)]
   72         -
                let mut builder = ::http::Response::builder();
          72  +
                let mut builder = ::http_1x::Response::builder();
   73     73   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   74     74   
                    builder,
   75         -
                    ::http::header::CONTENT_TYPE,
          75  +
                    ::http_1x::header::CONTENT_TYPE,
   76     76   
                    "application/x-amz-json-1.1",
   77     77   
                );
   78     78   
                let content_length = payload.len();
   79     79   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81         -
                    ::http::header::CONTENT_LENGTH,
          81  +
                    ::http_1x::header::CONTENT_LENGTH,
   82     82   
                    content_length,
   83     83   
                );
   84     84   
                builder
   85     85   
                    .status(400)
   86     86   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   87     87   
            }
   88     88   
            crate::error::GreetingWithErrorsError::ComplexError(output) => {
   89     89   
                let payload =
   90     90   
                    crate::protocol_serde::shape_complex_error::ser_complex_error_error(output)?;
   91     91   
                #[allow(unused_mut)]
   92         -
                let mut builder = ::http::Response::builder();
          92  +
                let mut builder = ::http_1x::Response::builder();
   93     93   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   94     94   
                    builder,
   95         -
                    ::http::header::CONTENT_TYPE,
          95  +
                    ::http_1x::header::CONTENT_TYPE,
   96     96   
                    "application/x-amz-json-1.1",
   97     97   
                );
   98     98   
                let content_length = payload.len();
   99     99   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  100    100   
                    builder,
  101         -
                    ::http::header::CONTENT_LENGTH,
         101  +
                    ::http_1x::header::CONTENT_LENGTH,
  102    102   
                    content_length,
  103    103   
                );
  104    104   
                builder
  105    105   
                    .status(400)
  106    106   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  107    107   
            }
  108    108   
            crate::error::GreetingWithErrorsError::FooError(output) => {
  109    109   
                let payload = crate::protocol_serde::shape_foo_error::ser_foo_error_error(output)?;
  110    110   
                #[allow(unused_mut)]
  111         -
                let mut builder = ::http::Response::builder();
         111  +
                let mut builder = ::http_1x::Response::builder();
  112    112   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  113    113   
                    builder,
  114         -
                    ::http::header::CONTENT_TYPE,
         114  +
                    ::http_1x::header::CONTENT_TYPE,
  115    115   
                    "application/x-amz-json-1.1",
  116    116   
                );
  117    117   
                let content_length = payload.len();
  118    118   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  119    119   
                    builder,
  120         -
                    ::http::header::CONTENT_LENGTH,
         120  +
                    ::http_1x::header::CONTENT_LENGTH,
  121    121   
                    content_length,
  122    122   
                );
  123    123   
                builder
  124    124   
                    .status(500)
  125    125   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  126    126   
            }
  127    127   
        }
  128    128   
    })
  129    129   
}

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_host_with_path_operation.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_host_with_path_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::HostWithPathOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::host_with_path_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     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_host_with_path_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::HostWithPathOperationOutput,
   29     29   
) -> std::result::Result<
   30     30   
    ::aws_smithy_http_server::response::Response,
   31     31   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   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/json_rpc11/rust-server-codegen/src/protocol_serde/shape_json_enums.rs

@@ -1,1 +117,120 @@
    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_json_enums_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::JsonEnumsInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::json_enums_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_json_enums::de_json_enums(bytes.as_ref(), input)?;
   29     32   
        }
   30     33   
        input.build()?
   31     34   
    })
   32     35   
}
   33     36   
   34     37   
#[allow(clippy::unnecessary_wraps)]
   35     38   
pub fn ser_json_enums_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::JsonEnumsOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     43   
> {
   41     44   
    Ok({
   42     45   
        #[allow(unused_mut)]
   43         -
        let mut builder = ::http::Response::builder();
          46  +
        let mut builder = ::http_1x::Response::builder();
   44     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   45     48   
            builder,
   46         -
            ::http::header::CONTENT_TYPE,
          49  +
            ::http_1x::header::CONTENT_TYPE,
   47     50   
            "application/x-amz-json-1.1",
   48     51   
        );
   49     52   
        let http_status: u16 = 200;
   50     53   
        builder = builder.status(http_status);
   51     54   
        let payload =
   52     55   
            crate::protocol_serde::shape_json_enums_output::ser_json_enums_output_output_output(
   53     56   
                &output,
   54     57   
            )?;
   55     58   
        let content_length = payload.len();
   56     59   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     60   
            builder,
   58         -
            ::http::header::CONTENT_LENGTH,
          61  +
            ::http_1x::header::CONTENT_LENGTH,
   59     62   
            content_length,
   60     63   
        );
   61     64   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   62     65   
        builder.body(body)?
   63     66   
    })
   64     67   
}
   65     68   
   66     69   
#[allow(clippy::unnecessary_wraps)]
   67     70   
pub fn ser_json_enums_http_error(
   68     71   
    error: &crate::error::JsonEnumsError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::JsonEnumsError::ValidationException(output) => {
   76     79   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   77     80   
                #[allow(unused_mut)]
   78         -
                let mut builder = ::http::Response::builder();
          81  +
                let mut builder = ::http_1x::Response::builder();
   79     82   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   80     83   
                    builder,
   81         -
                    ::http::header::CONTENT_TYPE,
          84  +
                    ::http_1x::header::CONTENT_TYPE,
   82     85   
                    "application/x-amz-json-1.1",
   83     86   
                );
   84     87   
                let content_length = payload.len();
   85     88   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   86     89   
                    builder,
   87         -
                    ::http::header::CONTENT_LENGTH,
          90  +
                    ::http_1x::header::CONTENT_LENGTH,
   88     91   
                    content_length,
   89     92   
                );
   90     93   
                builder
   91     94   
                    .status(400)
   92     95   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   93     96   
            }
   94     97   
        }
   95     98   
    })
   96     99   
}
   97    100   

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_json_int_enums.rs

@@ -1,1 +119,122 @@
    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_json_int_enums_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::JsonIntEnumsInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::json_int_enums_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_json_int_enums::de_json_int_enums(
   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_json_int_enums_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::JsonIntEnumsOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload =
   55     58   
            crate::protocol_serde::shape_json_int_enums_output::ser_json_int_enums_output_output_output(&output)?
   56     59   
        ;
   57     60   
        let content_length = payload.len();
   58     61   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     62   
            builder,
   60         -
            ::http::header::CONTENT_LENGTH,
          63  +
            ::http_1x::header::CONTENT_LENGTH,
   61     64   
            content_length,
   62     65   
        );
   63     66   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   64     67   
        builder.body(body)?
   65     68   
    })
   66     69   
}
   67     70   
   68     71   
#[allow(clippy::unnecessary_wraps)]
   69     72   
pub fn ser_json_int_enums_http_error(
   70     73   
    error: &crate::error::JsonIntEnumsError,
   71     74   
) -> std::result::Result<
   72     75   
    ::aws_smithy_http_server::response::Response,
   73     76   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     77   
> {
   75     78   
    Ok({
   76     79   
        match error {
   77     80   
            crate::error::JsonIntEnumsError::ValidationException(output) => {
   78     81   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   79     82   
                #[allow(unused_mut)]
   80         -
                let mut builder = ::http::Response::builder();
          83  +
                let mut builder = ::http_1x::Response::builder();
   81     84   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82     85   
                    builder,
   83         -
                    ::http::header::CONTENT_TYPE,
          86  +
                    ::http_1x::header::CONTENT_TYPE,
   84     87   
                    "application/x-amz-json-1.1",
   85     88   
                );
   86     89   
                let content_length = payload.len();
   87     90   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   88     91   
                    builder,
   89         -
                    ::http::header::CONTENT_LENGTH,
          92  +
                    ::http_1x::header::CONTENT_LENGTH,
   90     93   
                    content_length,
   91     94   
                );
   92     95   
                builder
   93     96   
                    .status(400)
   94     97   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   95     98   
            }
   96     99   
        }
   97    100   
    })
   98    101   
}
   99    102   

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_json_unions.rs

@@ -1,1 +118,121 @@
    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_json_unions_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::JsonUnionsInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::json_unions_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_json_unions::de_json_unions(bytes.as_ref(), input)?;
   30     33   
        }
   31     34   
        input.build()?
   32     35   
    })
   33     36   
}
   34     37   
   35     38   
#[allow(clippy::unnecessary_wraps)]
   36     39   
pub fn ser_json_unions_http_response(
   37     40   
    #[allow(unused_variables)] output: crate::output::JsonUnionsOutput,
   38     41   
) -> std::result::Result<
   39     42   
    ::aws_smithy_http_server::response::Response,
   40     43   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     44   
> {
   42     45   
    Ok({
   43     46   
        #[allow(unused_mut)]
   44         -
        let mut builder = ::http::Response::builder();
          47  +
        let mut builder = ::http_1x::Response::builder();
   45     48   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   46     49   
            builder,
   47         -
            ::http::header::CONTENT_TYPE,
          50  +
            ::http_1x::header::CONTENT_TYPE,
   48     51   
            "application/x-amz-json-1.1",
   49     52   
        );
   50     53   
        let http_status: u16 = 200;
   51     54   
        builder = builder.status(http_status);
   52     55   
        let payload =
   53     56   
            crate::protocol_serde::shape_json_unions_output::ser_json_unions_output_output_output(
   54     57   
                &output,
   55     58   
            )?;
   56     59   
        let content_length = payload.len();
   57     60   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   58     61   
            builder,
   59         -
            ::http::header::CONTENT_LENGTH,
          62  +
            ::http_1x::header::CONTENT_LENGTH,
   60     63   
            content_length,
   61     64   
        );
   62     65   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   63     66   
        builder.body(body)?
   64     67   
    })
   65     68   
}
   66     69   
   67     70   
#[allow(clippy::unnecessary_wraps)]
   68     71   
pub fn ser_json_unions_http_error(
   69     72   
    error: &crate::error::JsonUnionsError,
   70     73   
) -> std::result::Result<
   71     74   
    ::aws_smithy_http_server::response::Response,
   72     75   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   73     76   
> {
   74     77   
    Ok({
   75     78   
        match error {
   76     79   
            crate::error::JsonUnionsError::ValidationException(output) => {
   77     80   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   78     81   
                #[allow(unused_mut)]
   79         -
                let mut builder = ::http::Response::builder();
          82  +
                let mut builder = ::http_1x::Response::builder();
   80     83   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   81     84   
                    builder,
   82         -
                    ::http::header::CONTENT_TYPE,
          85  +
                    ::http_1x::header::CONTENT_TYPE,
   83     86   
                    "application/x-amz-json-1.1",
   84     87   
                );
   85     88   
                let content_length = payload.len();
   86     89   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87     90   
                    builder,
   88         -
                    ::http::header::CONTENT_LENGTH,
          91  +
                    ::http_1x::header::CONTENT_LENGTH,
   89     92   
                    content_length,
   90     93   
                );
   91     94   
                builder
   92     95   
                    .status(400)
   93     96   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   94     97   
            }
   95     98   
        }
   96     99   
    })
   97    100   
}
   98    101   

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_kitchen_sink_operation.rs

@@ -1,1 +141,144 @@
    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_kitchen_sink_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::KitchenSinkOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::kitchen_sink_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_kitchen_sink_operation::de_kitchen_sink_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_kitchen_sink_operation_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::KitchenSinkOperationOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload =
   55     58   
            crate::protocol_serde::shape_kitchen_sink_operation_output::ser_kitchen_sink_operation_output_output_output(&output)?
   56     59   
        ;
   57     60   
        let content_length = payload.len();
   58     61   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     62   
            builder,
   60         -
            ::http::header::CONTENT_LENGTH,
          63  +
            ::http_1x::header::CONTENT_LENGTH,
   61     64   
            content_length,
   62     65   
        );
   63     66   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   64     67   
        builder.body(body)?
   65     68   
    })
   66     69   
}
   67     70   
   68     71   
#[allow(clippy::unnecessary_wraps)]
   69     72   
pub fn ser_kitchen_sink_operation_http_error(
   70     73   
    error: &crate::error::KitchenSinkOperationError,
   71     74   
) -> std::result::Result<
   72     75   
    ::aws_smithy_http_server::response::Response,
   73     76   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     77   
> {
   75     78   
    Ok({
   76     79   
        match error {
   77     80   
            crate::error::KitchenSinkOperationError::ErrorWithMembers(output) => {
   78     81   
                let payload =
   79     82   
                    crate::protocol_serde::shape_error_with_members::ser_error_with_members_error(
   80     83   
                        output,
   81     84   
                    )?;
   82     85   
                #[allow(unused_mut)]
   83         -
                let mut builder = ::http::Response::builder();
          86  +
                let mut builder = ::http_1x::Response::builder();
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::CONTENT_TYPE,
          89  +
                    ::http_1x::header::CONTENT_TYPE,
   87     90   
                    "application/x-amz-json-1.1",
   88     91   
                );
   89     92   
                let content_length = payload.len();
   90     93   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   91     94   
                    builder,
   92         -
                    ::http::header::CONTENT_LENGTH,
          95  +
                    ::http_1x::header::CONTENT_LENGTH,
   93     96   
                    content_length,
   94     97   
                );
   95     98   
                builder
   96     99   
                    .status(400)
   97    100   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   98    101   
            }
   99    102   
            crate::error::KitchenSinkOperationError::ErrorWithoutMembers(output) => {
  100    103   
                let payload = crate::protocol_serde::shape_error_without_members::ser_error_without_members_error(output)?;
  101    104   
                #[allow(unused_mut)]
  102         -
                let mut builder = ::http::Response::builder();
         105  +
                let mut builder = ::http_1x::Response::builder();
  103    106   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  104    107   
                    builder,
  105         -
                    ::http::header::CONTENT_TYPE,
         108  +
                    ::http_1x::header::CONTENT_TYPE,
  106    109   
                    "application/x-amz-json-1.1",
  107    110   
                );
  108    111   
                let content_length = payload.len();
  109    112   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  110    113   
                    builder,
  111         -
                    ::http::header::CONTENT_LENGTH,
         114  +
                    ::http_1x::header::CONTENT_LENGTH,
  112    115   
                    content_length,
  113    116   
                );
  114    117   
                builder
  115    118   
                    .status(500)
  116    119   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  117    120   
            }
  118    121   
        }
  119    122   
    })
  120    123   
}
  121    124   

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_null_operation.rs

@@ -1,1 +90,93 @@
    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_null_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::NullOperationInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::null_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_null_operation::de_null_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_null_operation_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::NullOperationOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::aws_json::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/x-amz-json-1.1",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload =
   55     58   
            crate::protocol_serde::shape_null_operation_output::ser_null_operation_output_output_output(&output)?
   56     59   
        ;
   57     60   
        let content_length = payload.len();
   58     61   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     62   
            builder,
   60         -
            ::http::header::CONTENT_LENGTH,
          63  +
            ::http_1x::header::CONTENT_LENGTH,
   61     64   
            content_length,
   62     65   
        );
   63     66   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   64     67   
        builder.body(body)?
   65     68   
    })
   66     69   
}
   67     70   
   68     71   
pub(crate) fn de_null_operation(
   69     72   
    value: &[u8],
   70     73   
    mut builder: crate::input::null_operation_input::Builder,

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_operation_with_optional_input_output.rs

@@ -1,1 +88,91 @@
    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_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::OperationWithOptionalInputOutputInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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 =
   18     18   
            crate::input::operation_with_optional_input_output_input::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23         -
        let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
        let bytes = {
          24  +
            use ::http_body_util::BodyExt;
          25  +
            body.collect().await?.to_bytes()
          26  +
        };
   24     27   
        if !bytes.is_empty() {
   25     28   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   26     29   
                &headers,
   27     30   
                Some("application/x-amz-json-1.1"),
   28     31   
            )?;
   29     32   
            input = crate::protocol_serde::shape_operation_with_optional_input_output::de_operation_with_optional_input_output(bytes.as_ref(), input)?;
   30     33   
        }
   31     34   
        input.build()
   32     35   
    })
   33     36   
}
   34     37   
   35     38   
#[allow(clippy::unnecessary_wraps)]
   36     39   
pub fn ser_operation_with_optional_input_output_http_response(
   37     40   
    #[allow(unused_variables)] output: crate::output::OperationWithOptionalInputOutputOutput,
   38     41   
) -> std::result::Result<
   39     42   
    ::aws_smithy_http_server::response::Response,
   40     43   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     44   
> {
   42     45   
    Ok({
   43     46   
        #[allow(unused_mut)]
   44         -
        let mut builder = ::http::Response::builder();
          47  +
        let mut builder = ::http_1x::Response::builder();
   45     48   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   46     49   
            builder,
   47         -
            ::http::header::CONTENT_TYPE,
          50  +
            ::http_1x::header::CONTENT_TYPE,
   48     51   
            "application/x-amz-json-1.1",
   49     52   
        );
   50     53   
        let http_status: u16 = 200;
   51     54   
        builder = builder.status(http_status);
   52     55   
        let payload =
   53     56   
            crate::protocol_serde::shape_operation_with_optional_input_output_output::ser_operation_with_optional_input_output_output_output_output(&output)?
   54     57   
        ;
   55     58   
        let content_length = payload.len();
   56     59   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     60   
            builder,
   58         -
            ::http::header::CONTENT_LENGTH,
          61  +
            ::http_1x::header::CONTENT_LENGTH,
   59     62   
            content_length,
   60     63   
        );
   61     64   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   62     65   
        builder.body(body)?
   63     66   
    })
   64     67   
}
   65     68   
   66     69   
pub(crate) fn de_operation_with_optional_input_output(
   67     70   
    value: &[u8],
   68     71   
    mut builder: crate::input::operation_with_optional_input_output_input::Builder,

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_put_and_get_inline_documents.rs

@@ -1,1 +87,90 @@
    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_put_and_get_inline_documents_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::PutAndGetInlineDocumentsInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::put_and_get_inline_documents_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_put_and_get_inline_documents::de_put_and_get_inline_documents(bytes.as_ref(), input)?;
   29     32   
        }
   30     33   
        input.build()
   31     34   
    })
   32     35   
}
   33     36   
   34     37   
#[allow(clippy::unnecessary_wraps)]
   35     38   
pub fn ser_put_and_get_inline_documents_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::PutAndGetInlineDocumentsOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     43   
> {
   41     44   
    Ok({
   42     45   
        #[allow(unused_mut)]
   43         -
        let mut builder = ::http::Response::builder();
          46  +
        let mut builder = ::http_1x::Response::builder();
   44     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   45     48   
            builder,
   46         -
            ::http::header::CONTENT_TYPE,
          49  +
            ::http_1x::header::CONTENT_TYPE,
   47     50   
            "application/x-amz-json-1.1",
   48     51   
        );
   49     52   
        let http_status: u16 = 200;
   50     53   
        builder = builder.status(http_status);
   51     54   
        let payload =
   52     55   
            crate::protocol_serde::shape_put_and_get_inline_documents_output::ser_put_and_get_inline_documents_output_output_output(&output)?
   53     56   
        ;
   54     57   
        let content_length = payload.len();
   55     58   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   56     59   
            builder,
   57         -
            ::http::header::CONTENT_LENGTH,
          60  +
            ::http_1x::header::CONTENT_LENGTH,
   58     61   
            content_length,
   59     62   
        );
   60     63   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   61     64   
        builder.body(body)?
   62     65   
    })
   63     66   
}
   64     67   
   65     68   
pub(crate) fn de_put_and_get_inline_documents(
   66     69   
    value: &[u8],
   67     70   
    mut builder: crate::input::put_and_get_inline_documents_input::Builder,

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/protocol_serde/shape_put_with_content_encoding.rs

@@ -1,1 +85,88 @@
    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_put_with_content_encoding_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::PutWithContentEncodingInput,
    7      7   
    ::aws_smithy_http_server::protocol::aws_json::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::aws_json::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::put_with_content_encoding_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/x-amz-json-1.1"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding(bytes.as_ref(), input)?;
   29     32   
        }
   30     33   
        input.build()
   31     34   
    })
   32     35   
}
   33     36   
   34     37   
#[allow(clippy::unnecessary_wraps)]
   35     38   
pub fn ser_put_with_content_encoding_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::PutWithContentEncodingOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     43   
> {
   41     44   
    Ok({
   42     45   
        #[allow(unused_mut)]
   43         -
        let mut builder = ::http::Response::builder();
          46  +
        let mut builder = ::http_1x::Response::builder();
   44     47   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   45     48   
            builder,
   46         -
            ::http::header::CONTENT_TYPE,
          49  +
            ::http_1x::header::CONTENT_TYPE,
   47     50   
            "application/x-amz-json-1.1",
   48     51   
        );
   49     52   
        let http_status: u16 = 200;
   50     53   
        builder = builder.status(http_status);
   51     54   
        let payload = "";
   52     55   
        let content_length = payload.len();
   53     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     57   
            builder,
   55         -
            ::http::header::CONTENT_LENGTH,
          58  +
            ::http_1x::header::CONTENT_LENGTH,
   56     59   
            content_length,
   57     60   
        );
   58     61   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   59     62   
        builder.body(body)?
   60     63   
    })
   61     64   
}
   62     65   
   63     66   
pub(crate) fn de_put_with_content_encoding(
   64     67   
    value: &[u8],
   65     68   
    mut builder: crate::input::put_with_content_encoding_input::Builder,