Server Test

Server Test

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_enum.rs

@@ -1,1 +122,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_malformed_enum_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::MalformedEnumInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_enum_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_enum::de_malformed_enum(
   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_malformed_enum_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::MalformedEnumOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_malformed_enum_http_error(
   68     71   
    error: &crate::error::MalformedEnumError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::MalformedEnumError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_length.rs

@@ -1,1 +122,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_malformed_length_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::MalformedLengthInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_length_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_length::de_malformed_length(
   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_malformed_length_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::MalformedLengthOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_malformed_length_http_error(
   68     71   
    error: &crate::error::MalformedLengthError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::MalformedLengthError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_length_override.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_malformed_length_override_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::MalformedLengthOverrideInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_length_override_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_length_override::de_malformed_length_override(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_malformed_length_override_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::MalformedLengthOverrideOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   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_malformed_length_override_http_error(
   65     68   
    error: &crate::error::MalformedLengthOverrideError,
   66     69   
) -> std::result::Result<
   67     70   
    ::aws_smithy_http_server::response::Response,
   68     71   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   69     72   
> {
   70     73   
    Ok({
   71     74   
        match error {
   72     75   
            crate::error::MalformedLengthOverrideError::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/json",
   80     83   
                );
   81     84   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82     85   
                    builder,
   83         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          86  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   84     87   
                    "ValidationException",
   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/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_length_query_string.rs

@@ -1,1 +103,103 @@
    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_malformed_length_query_string_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::MalformedLengthQueryStringInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_length_query_string_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   
        let query_string = uri.query().unwrap_or("");
   23     23   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
   24     24   
        let mut string_seen = false;
   25     25   
        for (k, v) in pairs {
   26     26   
            if !string_seen && k == "string" {
   27     27   
                input = input.set_string(
   28     28   
                    crate::protocol_serde::shape_malformed_length_query_string_input::de_string(
   29     29   
                        &v,
   30     30   
                    )?,
   31     31   
                );
   32     32   
                string_seen = true;
   33     33   
            }
   34     34   
        }
   35     35   
        input.build()?
   36     36   
    })
   37     37   
}
   38     38   
   39     39   
#[allow(clippy::unnecessary_wraps)]
   40     40   
pub fn ser_malformed_length_query_string_http_response(
   41     41   
    #[allow(unused_variables)] output: crate::output::MalformedLengthQueryStringOutput,
   42     42   
) -> std::result::Result<
   43     43   
    ::aws_smithy_http_server::response::Response,
   44     44   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   45     45   
> {
   46     46   
    Ok({
   47     47   
        #[allow(unused_mut)]
   48         -
        let mut builder = ::http::Response::builder();
          48  +
        let mut builder = ::http_1x::Response::builder();
   49     49   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   50     50   
            builder,
   51         -
            ::http::header::CONTENT_TYPE,
          51  +
            ::http_1x::header::CONTENT_TYPE,
   52     52   
            "application/json",
   53     53   
        );
   54     54   
        let http_status: u16 = 200;
   55     55   
        builder = builder.status(http_status);
   56     56   
        let payload = "";
   57     57   
        let content_length = payload.len();
   58     58   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60         -
            ::http::header::CONTENT_LENGTH,
          60  +
            ::http_1x::header::CONTENT_LENGTH,
   61     61   
            content_length,
   62     62   
        );
   63     63   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   64     64   
        builder.body(body)?
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
#[allow(clippy::unnecessary_wraps)]
   69     69   
pub fn ser_malformed_length_query_string_http_error(
   70     70   
    error: &crate::error::MalformedLengthQueryStringError,
   71     71   
) -> std::result::Result<
   72     72   
    ::aws_smithy_http_server::response::Response,
   73     73   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   74     74   
> {
   75     75   
    Ok({
   76     76   
        match error {
   77     77   
            crate::error::MalformedLengthQueryStringError::ValidationException(output) => {
   78     78   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   79     79   
                #[allow(unused_mut)]
   80         -
                let mut builder = ::http::Response::builder();
          80  +
                let mut builder = ::http_1x::Response::builder();
   81     81   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82     82   
                    builder,
   83         -
                    ::http::header::CONTENT_TYPE,
          83  +
                    ::http_1x::header::CONTENT_TYPE,
   84     84   
                    "application/json",
   85     85   
                );
   86     86   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87     87   
                    builder,
   88         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          88  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   89     89   
                    "ValidationException",
   90     90   
                );
   91     91   
                let content_length = payload.len();
   92     92   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   93     93   
                    builder,
   94         -
                    ::http::header::CONTENT_LENGTH,
          94  +
                    ::http_1x::header::CONTENT_LENGTH,
   95     95   
                    content_length,
   96     96   
                );
   97     97   
                builder
   98     98   
                    .status(400)
   99     99   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  100    100   
            }
  101    101   
        }
  102    102   
    })
  103    103   
}

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_pattern.rs

@@ -1,1 +122,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_malformed_pattern_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::MalformedPatternInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_pattern_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_pattern::de_malformed_pattern(
   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_malformed_pattern_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::MalformedPatternOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_malformed_pattern_http_error(
   68     71   
    error: &crate::error::MalformedPatternError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::MalformedPatternError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_pattern_override.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_malformed_pattern_override_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::MalformedPatternOverrideInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_pattern_override_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_pattern_override::de_malformed_pattern_override(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_malformed_pattern_override_http_response(
   36     39   
    #[allow(unused_variables)] output: crate::output::MalformedPatternOverrideOutput,
   37     40   
) -> std::result::Result<
   38     41   
    ::aws_smithy_http_server::response::Response,
   39     42   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   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_malformed_pattern_override_http_error(
   65     68   
    error: &crate::error::MalformedPatternOverrideError,
   66     69   
) -> std::result::Result<
   67     70   
    ::aws_smithy_http_server::response::Response,
   68     71   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   69     72   
> {
   70     73   
    Ok({
   71     74   
        match error {
   72     75   
            crate::error::MalformedPatternOverrideError::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/json",
   80     83   
                );
   81     84   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82     85   
                    builder,
   83         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          86  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   84     87   
                    "ValidationException",
   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/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_range.rs

@@ -1,1 +122,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_malformed_range_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::MalformedRangeInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_range_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_range::de_malformed_range(
   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_malformed_range_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::MalformedRangeOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_malformed_range_http_error(
   68     71   
    error: &crate::error::MalformedRangeError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::MalformedRangeError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_range_override.rs

@@ -1,1 +123,126 @@
    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_malformed_range_override_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::MalformedRangeOverrideInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_range_override_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/json"),
   27     30   
            )?;
   28     31   
            input =
   29     32   
                crate::protocol_serde::shape_malformed_range_override::de_malformed_range_override(
   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_malformed_range_override_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::MalformedRangeOverrideOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   52     55   
        );
   53     56   
        let http_status: u16 = 200;
   54     57   
        builder = builder.status(http_status);
   55     58   
        let payload = "";
   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_malformed_range_override_http_error(
   69     72   
    error: &crate::error::MalformedRangeOverrideError,
   70     73   
) -> std::result::Result<
   71     74   
    ::aws_smithy_http_server::response::Response,
   72     75   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   73     76   
> {
   74     77   
    Ok({
   75     78   
        match error {
   76     79   
            crate::error::MalformedRangeOverrideError::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/json",
   84     87   
                );
   85     88   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   86     89   
                    builder,
   87         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          90  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   88     91   
                    "ValidationException",
   89     92   
                );
   90     93   
                let content_length = payload.len();
   91     94   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   92     95   
                    builder,
   93         -
                    ::http::header::CONTENT_LENGTH,
          96  +
                    ::http_1x::header::CONTENT_LENGTH,
   94     97   
                    content_length,
   95     98   
                );
   96     99   
                builder
   97    100   
                    .status(400)
   98    101   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   99    102   
            }
  100    103   
        }
  101    104   
    })
  102    105   
}
  103    106   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_required.rs

@@ -1,1 +140,143 @@
    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_malformed_required_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::MalformedRequiredInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_required_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_required::de_malformed_required(
   29     32   
                bytes.as_ref(),
   30     33   
                input,
   31     34   
            )?;
   32     35   
        }
   33     36   
        if let Some(value) =
   34     37   
            crate::protocol_serde::shape_malformed_required_input::de_string_in_header_header(
   35     38   
                &headers,
   36     39   
            )?
   37     40   
        {
   38     41   
            input = input.set_string_in_header(value)
   39     42   
        }
   40     43   
        let query_string = uri.query().unwrap_or("");
   41     44   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
   42     45   
        let mut string_in_query_seen = false;
   43     46   
        for (k, v) in pairs {
   44     47   
            if !string_in_query_seen && k == "stringInQuery" {
   45     48   
                input = input.set_string_in_query(
   46     49   
                    crate::protocol_serde::shape_malformed_required_input::de_string_in_query(&v)?,
   47     50   
                );
   48     51   
                string_in_query_seen = true;
   49     52   
            }
   50     53   
        }
   51     54   
        input.build()?
   52     55   
    })
   53     56   
}
   54     57   
   55     58   
#[allow(clippy::unnecessary_wraps)]
   56     59   
pub fn ser_malformed_required_http_response(
   57     60   
    #[allow(unused_variables)] output: crate::output::MalformedRequiredOutput,
   58     61   
) -> std::result::Result<
   59     62   
    ::aws_smithy_http_server::response::Response,
   60     63   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   61     64   
> {
   62     65   
    Ok({
   63     66   
        #[allow(unused_mut)]
   64         -
        let mut builder = ::http::Response::builder();
          67  +
        let mut builder = ::http_1x::Response::builder();
   65     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   66     69   
            builder,
   67         -
            ::http::header::CONTENT_TYPE,
          70  +
            ::http_1x::header::CONTENT_TYPE,
   68     71   
            "application/json",
   69     72   
        );
   70     73   
        let http_status: u16 = 200;
   71     74   
        builder = builder.status(http_status);
   72     75   
        let payload = "";
   73     76   
        let content_length = payload.len();
   74     77   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   75     78   
            builder,
   76         -
            ::http::header::CONTENT_LENGTH,
          79  +
            ::http_1x::header::CONTENT_LENGTH,
   77     80   
            content_length,
   78     81   
        );
   79     82   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   80     83   
        builder.body(body)?
   81     84   
    })
   82     85   
}
   83     86   
   84     87   
#[allow(clippy::unnecessary_wraps)]
   85     88   
pub fn ser_malformed_required_http_error(
   86     89   
    error: &crate::error::MalformedRequiredError,
   87     90   
) -> std::result::Result<
   88     91   
    ::aws_smithy_http_server::response::Response,
   89     92   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   90     93   
> {
   91     94   
    Ok({
   92     95   
        match error {
   93     96   
            crate::error::MalformedRequiredError::ValidationException(output) => {
   94     97   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   95     98   
                #[allow(unused_mut)]
   96         -
                let mut builder = ::http::Response::builder();
          99  +
                let mut builder = ::http_1x::Response::builder();
   97    100   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   98    101   
                    builder,
   99         -
                    ::http::header::CONTENT_TYPE,
         102  +
                    ::http_1x::header::CONTENT_TYPE,
  100    103   
                    "application/json",
  101    104   
                );
  102    105   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  103    106   
                    builder,
  104         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
         107  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
  105    108   
                    "ValidationException",
  106    109   
                );
  107    110   
                let content_length = payload.len();
  108    111   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  109    112   
                    builder,
  110         -
                    ::http::header::CONTENT_LENGTH,
         113  +
                    ::http_1x::header::CONTENT_LENGTH,
  111    114   
                    content_length,
  112    115   
                );
  113    116   
                builder
  114    117   
                    .status(400)
  115    118   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  116    119   
            }
  117    120   
        }
  118    121   
    })
  119    122   
}
  120    123   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_malformed_unique_items.rs

@@ -1,1 +122,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_malformed_unique_items_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::MalformedUniqueItemsInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::malformed_unique_items_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_malformed_unique_items::de_malformed_unique_items(
   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_malformed_unique_items_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::MalformedUniqueItemsOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_malformed_unique_items_http_error(
   68     71   
    error: &crate::error::MalformedUniqueItemsError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::MalformedUniqueItemsError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_recursive_structures.rs

@@ -1,1 +122,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_recursive_structures_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::RecursiveStructuresInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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_structures_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_recursive_structures::de_recursive_structures(
   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_structures_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::RecursiveStructuresOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_recursive_structures_http_error(
   68     71   
    error: &crate::error::RecursiveStructuresError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::RecursiveStructuresError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

tmp-codegen-diff/codegen-server-test/rest_json_validation/rust-server-codegen/src/protocol_serde/shape_sensitive_validation.rs

@@ -1,1 +122,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_sensitive_validation_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::SensitiveValidationInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::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::rest_json_1::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::sensitive_validation_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/json"),
   27     30   
            )?;
   28     31   
            input = crate::protocol_serde::shape_sensitive_validation::de_sensitive_validation(
   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_sensitive_validation_http_response(
   39     42   
    #[allow(unused_variables)] output: crate::output::SensitiveValidationOutput,
   40     43   
) -> std::result::Result<
   41     44   
    ::aws_smithy_http_server::response::Response,
   42     45   
    ::aws_smithy_http_server::protocol::rest_json_1::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/json",
   51     54   
        );
   52     55   
        let http_status: u16 = 200;
   53     56   
        builder = builder.status(http_status);
   54     57   
        let payload = "";
   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_sensitive_validation_http_error(
   68     71   
    error: &crate::error::SensitiveValidationError,
   69     72   
) -> std::result::Result<
   70     73   
    ::aws_smithy_http_server::response::Response,
   71     74   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     75   
> {
   73     76   
    Ok({
   74     77   
        match error {
   75     78   
            crate::error::SensitiveValidationError::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/json",
   83     86   
                );
   84     87   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85     88   
                    builder,
   86         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          89  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   87     90   
                    "ValidationException",
   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   
        }
  100    103   
    })
  101    104   
}
  102    105   

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

@@ -46,46 +107,107 @@
   66     66   
                            <
   67     67   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   68     68   
                                as ::aws_smithy_http_server::plugin::Plugin<
   69     69   
                                    RestJsonValidation<L>,
   70     70   
                                    crate::operation_shape::MalformedEnum,
   71     71   
                                    ModelPl::Output
   72     72   
                                >
   73     73   
                            >::Output
   74     74   
                        >,
   75     75   
   76         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   77         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
          76  +
                        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,
          77  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
   78     78   
   79     79   
                    {
   80     80   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   81     81   
        use ::aws_smithy_http_server::plugin::Plugin;
   82     82   
        let svc = crate::operation_shape::MalformedEnum::from_handler(handler);
   83     83   
        let svc = self.model_plugin.apply(svc);
   84     84   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   85     85   
            .apply(svc);
   86     86   
        let svc = self.http_plugin.apply(svc);
   87     87   
        self.malformed_enum_custom(svc)
@@ -113,113 +193,193 @@
  133    133   
                            <
  134    134   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  135    135   
                                as ::aws_smithy_http_server::plugin::Plugin<
  136    136   
                                    RestJsonValidation<L>,
  137    137   
                                    crate::operation_shape::MalformedEnum,
  138    138   
                                    ModelPl::Output
  139    139   
                                >
  140    140   
                            >::Output
  141    141   
                        >,
  142    142   
  143         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  144         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         143  +
                        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,
         144  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  145    145   
  146    146   
                    {
  147    147   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  148    148   
        use ::aws_smithy_http_server::plugin::Plugin;
  149    149   
        let svc = crate::operation_shape::MalformedEnum::from_service(service);
  150    150   
        let svc = self.model_plugin.apply(svc);
  151    151   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  152    152   
            .apply(svc);
  153    153   
        let svc = self.http_plugin.apply(svc);
  154    154   
        self.malformed_enum_custom(svc)
  155    155   
    }
  156    156   
  157    157   
    /// Sets the [`MalformedEnum`](crate::operation_shape::MalformedEnum) to a custom [`Service`](tower::Service).
  158    158   
    /// not constrained by the Smithy contract.
  159    159   
    fn malformed_enum_custom<S>(mut self, svc: S) -> Self
  160    160   
    where
  161    161   
        S: ::tower::Service<
  162         -
                ::http::Request<Body>,
  163         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         162  +
                ::http_1x::Request<Body>,
         163  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  164    164   
                Error = ::std::convert::Infallible,
  165    165   
            > + Clone
  166    166   
            + Send
  167    167   
            + 'static,
  168    168   
        S::Future: Send + 'static,
  169    169   
    {
  170    170   
        self.malformed_enum = Some(::aws_smithy_http_server::routing::Route::new(svc));
  171    171   
        self
  172    172   
    }
  173    173   
@@ -196,196 +257,257 @@
  216    216   
                            <
  217    217   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  218    218   
                                as ::aws_smithy_http_server::plugin::Plugin<
  219    219   
                                    RestJsonValidation<L>,
  220    220   
                                    crate::operation_shape::MalformedLength,
  221    221   
                                    ModelPl::Output
  222    222   
                                >
  223    223   
                            >::Output
  224    224   
                        >,
  225    225   
  226         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  227         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         226  +
                        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,
         227  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  228    228   
  229    229   
                    {
  230    230   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  231    231   
        use ::aws_smithy_http_server::plugin::Plugin;
  232    232   
        let svc = crate::operation_shape::MalformedLength::from_handler(handler);
  233    233   
        let svc = self.model_plugin.apply(svc);
  234    234   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  235    235   
            .apply(svc);
  236    236   
        let svc = self.http_plugin.apply(svc);
  237    237   
        self.malformed_length_custom(svc)
@@ -263,263 +343,343 @@
  283    283   
                            <
  284    284   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  285    285   
                                as ::aws_smithy_http_server::plugin::Plugin<
  286    286   
                                    RestJsonValidation<L>,
  287    287   
                                    crate::operation_shape::MalformedLength,
  288    288   
                                    ModelPl::Output
  289    289   
                                >
  290    290   
                            >::Output
  291    291   
                        >,
  292    292   
  293         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  294         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         293  +
                        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,
         294  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  295    295   
  296    296   
                    {
  297    297   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  298    298   
        use ::aws_smithy_http_server::plugin::Plugin;
  299    299   
        let svc = crate::operation_shape::MalformedLength::from_service(service);
  300    300   
        let svc = self.model_plugin.apply(svc);
  301    301   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  302    302   
            .apply(svc);
  303    303   
        let svc = self.http_plugin.apply(svc);
  304    304   
        self.malformed_length_custom(svc)
  305    305   
    }
  306    306   
  307    307   
    /// Sets the [`MalformedLength`](crate::operation_shape::MalformedLength) to a custom [`Service`](tower::Service).
  308    308   
    /// not constrained by the Smithy contract.
  309    309   
    fn malformed_length_custom<S>(mut self, svc: S) -> Self
  310    310   
    where
  311    311   
        S: ::tower::Service<
  312         -
                ::http::Request<Body>,
  313         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         312  +
                ::http_1x::Request<Body>,
         313  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  314    314   
                Error = ::std::convert::Infallible,
  315    315   
            > + Clone
  316    316   
            + Send
  317    317   
            + 'static,
  318    318   
        S::Future: Send + 'static,
  319    319   
    {
  320    320   
        self.malformed_length = Some(::aws_smithy_http_server::routing::Route::new(svc));
  321    321   
        self
  322    322   
    }
  323    323   
@@ -346,346 +407,407 @@
  366    366   
                            <
  367    367   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  368    368   
                                as ::aws_smithy_http_server::plugin::Plugin<
  369    369   
                                    RestJsonValidation<L>,
  370    370   
                                    crate::operation_shape::MalformedLengthOverride,
  371    371   
                                    ModelPl::Output
  372    372   
                                >
  373    373   
                            >::Output
  374    374   
                        >,
  375    375   
  376         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  377         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         376  +
                        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,
         377  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  378    378   
  379    379   
                    {
  380    380   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  381    381   
        use ::aws_smithy_http_server::plugin::Plugin;
  382    382   
        let svc = crate::operation_shape::MalformedLengthOverride::from_handler(handler);
  383    383   
        let svc = self.model_plugin.apply(svc);
  384    384   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  385    385   
            .apply(svc);
  386    386   
        let svc = self.http_plugin.apply(svc);
  387    387   
        self.malformed_length_override_custom(svc)
@@ -413,413 +493,493 @@
  433    433   
                            <
  434    434   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  435    435   
                                as ::aws_smithy_http_server::plugin::Plugin<
  436    436   
                                    RestJsonValidation<L>,
  437    437   
                                    crate::operation_shape::MalformedLengthOverride,
  438    438   
                                    ModelPl::Output
  439    439   
                                >
  440    440   
                            >::Output
  441    441   
                        >,
  442    442   
  443         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  444         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         443  +
                        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,
         444  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  445    445   
  446    446   
                    {
  447    447   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  448    448   
        use ::aws_smithy_http_server::plugin::Plugin;
  449    449   
        let svc = crate::operation_shape::MalformedLengthOverride::from_service(service);
  450    450   
        let svc = self.model_plugin.apply(svc);
  451    451   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  452    452   
            .apply(svc);
  453    453   
        let svc = self.http_plugin.apply(svc);
  454    454   
        self.malformed_length_override_custom(svc)
  455    455   
    }
  456    456   
  457    457   
    /// Sets the [`MalformedLengthOverride`](crate::operation_shape::MalformedLengthOverride) to a custom [`Service`](tower::Service).
  458    458   
    /// not constrained by the Smithy contract.
  459    459   
    fn malformed_length_override_custom<S>(mut self, svc: S) -> Self
  460    460   
    where
  461    461   
        S: ::tower::Service<
  462         -
                ::http::Request<Body>,
  463         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         462  +
                ::http_1x::Request<Body>,
         463  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  464    464   
                Error = ::std::convert::Infallible,
  465    465   
            > + Clone
  466    466   
            + Send
  467    467   
            + 'static,
  468    468   
        S::Future: Send + 'static,
  469    469   
    {
  470    470   
        self.malformed_length_override = Some(::aws_smithy_http_server::routing::Route::new(svc));
  471    471   
        self
  472    472   
    }
  473    473   
@@ -496,496 +557,557 @@
  516    516   
                            <
  517    517   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  518    518   
                                as ::aws_smithy_http_server::plugin::Plugin<
  519    519   
                                    RestJsonValidation<L>,
  520    520   
                                    crate::operation_shape::MalformedLengthQueryString,
  521    521   
                                    ModelPl::Output
  522    522   
                                >
  523    523   
                            >::Output
  524    524   
                        >,
  525    525   
  526         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  527         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         526  +
                        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,
         527  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  528    528   
  529    529   
                    {
  530    530   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  531    531   
        use ::aws_smithy_http_server::plugin::Plugin;
  532    532   
        let svc = crate::operation_shape::MalformedLengthQueryString::from_handler(handler);
  533    533   
        let svc = self.model_plugin.apply(svc);
  534    534   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  535    535   
            .apply(svc);
  536    536   
        let svc = self.http_plugin.apply(svc);
  537    537   
        self.malformed_length_query_string_custom(svc)
@@ -563,563 +643,643 @@
  583    583   
                            <
  584    584   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  585    585   
                                as ::aws_smithy_http_server::plugin::Plugin<
  586    586   
                                    RestJsonValidation<L>,
  587    587   
                                    crate::operation_shape::MalformedLengthQueryString,
  588    588   
                                    ModelPl::Output
  589    589   
                                >
  590    590   
                            >::Output
  591    591   
                        >,
  592    592   
  593         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  594         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         593  +
                        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,
         594  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  595    595   
  596    596   
                    {
  597    597   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  598    598   
        use ::aws_smithy_http_server::plugin::Plugin;
  599    599   
        let svc = crate::operation_shape::MalformedLengthQueryString::from_service(service);
  600    600   
        let svc = self.model_plugin.apply(svc);
  601    601   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  602    602   
            .apply(svc);
  603    603   
        let svc = self.http_plugin.apply(svc);
  604    604   
        self.malformed_length_query_string_custom(svc)
  605    605   
    }
  606    606   
  607    607   
    /// Sets the [`MalformedLengthQueryString`](crate::operation_shape::MalformedLengthQueryString) to a custom [`Service`](tower::Service).
  608    608   
    /// not constrained by the Smithy contract.
  609    609   
    fn malformed_length_query_string_custom<S>(mut self, svc: S) -> Self
  610    610   
    where
  611    611   
        S: ::tower::Service<
  612         -
                ::http::Request<Body>,
  613         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         612  +
                ::http_1x::Request<Body>,
         613  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  614    614   
                Error = ::std::convert::Infallible,
  615    615   
            > + Clone
  616    616   
            + Send
  617    617   
            + 'static,
  618    618   
        S::Future: Send + 'static,
  619    619   
    {
  620    620   
        self.malformed_length_query_string =
  621    621   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  622    622   
        self
  623    623   
    }
@@ -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   
                                    RestJsonValidation<L>,
  671    671   
                                    crate::operation_shape::MalformedPattern,
  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::MalformedPattern::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.malformed_pattern_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   
                                    RestJsonValidation<L>,
  738    738   
                                    crate::operation_shape::MalformedPattern,
  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::MalformedPattern::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.malformed_pattern_custom(svc)
  756    756   
    }
  757    757   
  758    758   
    /// Sets the [`MalformedPattern`](crate::operation_shape::MalformedPattern) to a custom [`Service`](tower::Service).
  759    759   
    /// not constrained by the Smithy contract.
  760    760   
    fn malformed_pattern_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.malformed_pattern = 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   
                                    RestJsonValidation<L>,
  821    821   
                                    crate::operation_shape::MalformedPatternOverride,
  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::MalformedPatternOverride::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.malformed_pattern_override_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   
                                    RestJsonValidation<L>,
  888    888   
                                    crate::operation_shape::MalformedPatternOverride,
  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::MalformedPatternOverride::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.malformed_pattern_override_custom(svc)
  906    906   
    }
  907    907   
  908    908   
    /// Sets the [`MalformedPatternOverride`](crate::operation_shape::MalformedPatternOverride) to a custom [`Service`](tower::Service).
  909    909   
    /// not constrained by the Smithy contract.
  910    910   
    fn malformed_pattern_override_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.malformed_pattern_override = 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   
                                    RestJsonValidation<L>,
  971    971   
                                    crate::operation_shape::MalformedRange,
  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::MalformedRange::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.malformed_range_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   
                                    RestJsonValidation<L>,
 1038   1038   
                                    crate::operation_shape::MalformedRange,
 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::MalformedRange::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.malformed_range_custom(svc)
 1056   1056   
    }
 1057   1057   
 1058   1058   
    /// Sets the [`MalformedRange`](crate::operation_shape::MalformedRange) to a custom [`Service`](tower::Service).
 1059   1059   
    /// not constrained by the Smithy contract.
 1060   1060   
    fn malformed_range_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.malformed_range = 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   
                                    RestJsonValidation<L>,
 1121   1121   
                                    crate::operation_shape::MalformedRangeOverride,
 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::MalformedRangeOverride::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.malformed_range_override_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   
                                    RestJsonValidation<L>,
 1188   1188   
                                    crate::operation_shape::MalformedRangeOverride,
 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::MalformedRangeOverride::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.malformed_range_override_custom(svc)
 1206   1206   
    }
 1207   1207   
 1208   1208   
    /// Sets the [`MalformedRangeOverride`](crate::operation_shape::MalformedRangeOverride) to a custom [`Service`](tower::Service).
 1209   1209   
    /// not constrained by the Smithy contract.
 1210   1210   
    fn malformed_range_override_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.malformed_range_override = 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   
                                    RestJsonValidation<L>,
 1271   1271   
                                    crate::operation_shape::MalformedRequired,
 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::MalformedRequired::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.malformed_required_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   
                                    RestJsonValidation<L>,
 1338   1338   
                                    crate::operation_shape::MalformedRequired,
 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::MalformedRequired::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.malformed_required_custom(svc)
 1356   1356   
    }
 1357   1357   
 1358   1358   
    /// Sets the [`MalformedRequired`](crate::operation_shape::MalformedRequired) to a custom [`Service`](tower::Service).
 1359   1359   
    /// not constrained by the Smithy contract.
 1360   1360   
    fn malformed_required_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.malformed_required = 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   
                                    RestJsonValidation<L>,
 1421   1421   
                                    crate::operation_shape::MalformedUniqueItems,
 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::MalformedUniqueItems::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.malformed_unique_items_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   
                                    RestJsonValidation<L>,
 1488   1488   
                                    crate::operation_shape::MalformedUniqueItems,
 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::MalformedUniqueItems::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.malformed_unique_items_custom(svc)
 1506   1506   
    }
 1507   1507   
 1508   1508   
    /// Sets the [`MalformedUniqueItems`](crate::operation_shape::MalformedUniqueItems) to a custom [`Service`](tower::Service).
 1509   1509   
    /// not constrained by the Smithy contract.
 1510   1510   
    fn malformed_unique_items_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.malformed_unique_items = 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   
                                    RestJsonValidation<L>,
 1571   1571   
                                    crate::operation_shape::RecursiveStructures,
 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::RecursiveStructures::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.recursive_structures_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   
                                    RestJsonValidation<L>,
 1638   1638   
                                    crate::operation_shape::RecursiveStructures,
 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::RecursiveStructures::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.recursive_structures_custom(svc)
 1656   1656   
    }
 1657   1657   
 1658   1658   
    /// Sets the [`RecursiveStructures`](crate::operation_shape::RecursiveStructures) to a custom [`Service`](tower::Service).
 1659   1659   
    /// not constrained by the Smithy contract.
 1660   1660   
    fn recursive_structures_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.recursive_structures = 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   
                                    RestJsonValidation<L>,
 1721   1721   
                                    crate::operation_shape::SensitiveValidation,
 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::SensitiveValidation::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.sensitive_validation_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   
                                    RestJsonValidation<L>,
 1788   1788   
                                    crate::operation_shape::SensitiveValidation,
 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::SensitiveValidation::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.sensitive_validation_custom(svc)
 1806   1806   
    }
 1807   1807   
 1808   1808   
    /// Sets the [`SensitiveValidation`](crate::operation_shape::SensitiveValidation) to a custom [`Service`](tower::Service).
 1809   1809   
    /// not constrained by the Smithy contract.
 1810   1810   
    fn sensitive_validation_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.sensitive_validation = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1822   1822   
        self
 1823   1823   
    }
 1824   1824   
}
@@ -2134,2134 +2359,2359 @@
 2154   2154   
        }
 2155   2155   
        Ok(())
 2156   2156   
    }
 2157   2157   
}
 2158   2158   
 2159   2159   
impl std::error::Error for MissingOperationsError {}
 2160   2160   
 2161   2161   
mod request_specs {
 2162   2162   
    pub(super) fn malformed_enum() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2163   2163   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2164         -
                    ::http::Method::POST,
        2164  +
                    ::http_1x::Method::POST,
 2165   2165   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2166   2166   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2167   2167   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2168   2168   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedEnum")),
 2169   2169   
]),
 2170   2170   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2171   2171   
])
 2172   2172   
                        )
 2173   2173   
                    ),
 2174   2174   
                )
 2175   2175   
    }
 2176   2176   
    pub(super) fn malformed_length() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2177   2177   
    {
 2178   2178   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2179         -
                    ::http::Method::POST,
        2179  +
                    ::http_1x::Method::POST,
 2180   2180   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2181   2181   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2182   2182   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2183   2183   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedLength")),
 2184   2184   
]),
 2185   2185   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2186   2186   
])
 2187   2187   
                        )
 2188   2188   
                    ),
 2189   2189   
                )
 2190   2190   
    }
 2191   2191   
    pub(super) fn malformed_length_override(
 2192   2192   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2193   2193   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2194         -
                    ::http::Method::POST,
        2194  +
                    ::http_1x::Method::POST,
 2195   2195   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2196   2196   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2197   2197   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2198   2198   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedLengthOverride")),
 2199   2199   
]),
 2200   2200   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2201   2201   
])
 2202   2202   
                        )
 2203   2203   
                    ),
 2204   2204   
                )
 2205   2205   
    }
 2206   2206   
    pub(super) fn malformed_length_query_string(
 2207   2207   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2208   2208   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2209         -
                    ::http::Method::POST,
        2209  +
                    ::http_1x::Method::POST,
 2210   2210   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2211   2211   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2212   2212   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2213   2213   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedLengthQueryString")),
 2214   2214   
]),
 2215   2215   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2216   2216   
])
 2217   2217   
                        )
 2218   2218   
                    ),
 2219   2219   
                )
 2220   2220   
    }
 2221   2221   
    pub(super) fn malformed_pattern() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2222   2222   
    {
 2223   2223   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2224         -
                    ::http::Method::POST,
        2224  +
                    ::http_1x::Method::POST,
 2225   2225   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2226   2226   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2227   2227   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2228   2228   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedPattern")),
 2229   2229   
]),
 2230   2230   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2231   2231   
])
 2232   2232   
                        )
 2233   2233   
                    ),
 2234   2234   
                )
 2235   2235   
    }
 2236   2236   
    pub(super) fn malformed_pattern_override(
 2237   2237   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2238   2238   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2239         -
                    ::http::Method::POST,
        2239  +
                    ::http_1x::Method::POST,
 2240   2240   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2241   2241   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2242   2242   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2243   2243   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedPatternOverride")),
 2244   2244   
]),
 2245   2245   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2246   2246   
])
 2247   2247   
                        )
 2248   2248   
                    ),
 2249   2249   
                )
 2250   2250   
    }
 2251   2251   
    pub(super) fn malformed_range() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2252   2252   
    {
 2253   2253   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2254         -
                    ::http::Method::POST,
        2254  +
                    ::http_1x::Method::POST,
 2255   2255   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2256   2256   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2257   2257   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2258   2258   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedRange")),
 2259   2259   
]),
 2260   2260   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2261   2261   
])
 2262   2262   
                        )
 2263   2263   
                    ),
 2264   2264   
                )
 2265   2265   
    }
 2266   2266   
    pub(super) fn malformed_range_override(
 2267   2267   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2268   2268   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2269         -
                    ::http::Method::POST,
        2269  +
                    ::http_1x::Method::POST,
 2270   2270   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2271   2271   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2272   2272   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2273   2273   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedRangeOverride")),
 2274   2274   
]),
 2275   2275   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2276   2276   
])
 2277   2277   
                        )
 2278   2278   
                    ),
 2279   2279   
                )
 2280   2280   
    }
 2281   2281   
    pub(super) fn malformed_required(
 2282   2282   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2283   2283   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2284         -
                    ::http::Method::POST,
        2284  +
                    ::http_1x::Method::POST,
 2285   2285   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2286   2286   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2287   2287   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2288   2288   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedRequired")),
 2289   2289   
]),
 2290   2290   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2291   2291   
])
 2292   2292   
                        )
 2293   2293   
                    ),
 2294   2294   
                )
 2295   2295   
    }
 2296   2296   
    pub(super) fn malformed_unique_items(
 2297   2297   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2298   2298   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2299         -
                    ::http::Method::POST,
        2299  +
                    ::http_1x::Method::POST,
 2300   2300   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2301   2301   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2302   2302   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2303   2303   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedUniqueItems")),
 2304   2304   
]),
 2305   2305   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2306   2306   
])
 2307   2307   
                        )
 2308   2308   
                    ),
 2309   2309   
                )
 2310   2310   
    }
 2311   2311   
    pub(super) fn recursive_structures(
 2312   2312   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2313   2313   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2314         -
                    ::http::Method::POST,
        2314  +
                    ::http_1x::Method::POST,
 2315   2315   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2316   2316   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2317   2317   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2318   2318   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("RecursiveStructures")),
 2319   2319   
]),
 2320   2320   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2321   2321   
])
 2322   2322   
                        )
 2323   2323   
                    ),
 2324   2324   
                )
 2325   2325   
    }
 2326   2326   
    pub(super) fn sensitive_validation(
 2327   2327   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2328   2328   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2329         -
                    ::http::Method::POST,
        2329  +
                    ::http_1x::Method::POST,
 2330   2330   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2331   2331   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2332   2332   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2333   2333   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("SensitiveValidation")),
 2334   2334   
]),
 2335   2335   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2336   2336   
])
 2337   2337   
                        )
 2338   2338   
                    ),
 2339   2339   
                )
@@ -2478,2478 +2539,2539 @@
 2498   2498   
    ) -> RestJsonValidation<
 2499   2499   
        ::aws_smithy_http_server::routing::RoutingService<
 2500   2500   
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 2501   2501   
                ::aws_smithy_http_server::routing::Route<B>,
 2502   2502   
            >,
 2503   2503   
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2504   2504   
        >,
 2505   2505   
    >
 2506   2506   
    where
 2507   2507   
        S: ::tower::Service<
 2508         -
            ::http::Request<B>,
 2509         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        2508  +
            ::http_1x::Request<B>,
        2509  +
            Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 2510   2510   
            Error = std::convert::Infallible,
 2511   2511   
        >,
 2512   2512   
        S: Clone + Send + 'static,
 2513   2513   
        S::Future: Send + 'static,
 2514   2514   
    {
 2515   2515   
        self.layer(&::tower::layer::layer_fn(
 2516   2516   
            ::aws_smithy_http_server::routing::Route::new,
 2517   2517   
        ))
 2518   2518   
    }
 2519   2519   
}

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

@@ -0,1 +0,56 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "rpcv2cbor-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-legacy-http]
          15  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          16  +
[dependencies.aws-smithy-legacy-http-server]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
          18  +
[dependencies.aws-smithy-runtime-api]
          19  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          20  +
features = ["http-02x"]
          21  +
[dependencies.aws-smithy-types]
          22  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          23  +
features = ["http-body-0-4-x"]
          24  +
[dependencies.futures-util]
          25  +
version = "0.3"
          26  +
[dependencies.http]
          27  +
version = "0.2.9"
          28  +
[dependencies.hyper]
          29  +
version = "0.14.26"
          30  +
[dependencies.mime]
          31  +
version = "0.3"
          32  +
[dependencies.pin-project-lite]
          33  +
version = "0.2"
          34  +
[dependencies.tower]
          35  +
version = "0.4"
          36  +
[dependencies.tracing]
          37  +
version = "0.1"
          38  +
[dev-dependencies.aws-smithy-protocol-test]
          39  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
          40  +
[dev-dependencies.bytes]
          41  +
version = "1.4.0"
          42  +
[dev-dependencies.pretty_assertions]
          43  +
version = "1.3.0"
          44  +
[dev-dependencies.tokio]
          45  +
version = "1.23.1"
          46  +
features = ["macros", "test-util", "rt-multi-thread"]
          47  +
[dev-dependencies.tracing-test]
          48  +
version = "0.2.5"
          49  +
features = ["no-env-filter"]
          50  +
[features]
          51  +
rt-tokio = ["aws-smithy-types/rt-tokio"]
          52  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          53  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
          54  +
default = ["rt-tokio", "request-id"]
          55  +
          56  +

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

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

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

@@ -0,1 +0,476 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// Error type for the `OperationWithDefaults` operation.
           4  +
/// Each variant represents an error that can occur for the `OperationWithDefaults` operation.
           5  +
#[derive(::std::fmt::Debug)]
           6  +
pub enum OperationWithDefaultsError {
           7  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           8  +
    ValidationException(crate::error::ValidationException),
           9  +
}
          10  +
impl ::std::fmt::Display for OperationWithDefaultsError {
          11  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          12  +
        match &self {
          13  +
            OperationWithDefaultsError::ValidationException(_inner) => _inner.fmt(f),
          14  +
        }
          15  +
    }
          16  +
}
          17  +
impl OperationWithDefaultsError {
          18  +
    /// Returns `true` if the error kind is `OperationWithDefaultsError::ValidationException`.
          19  +
    pub fn is_validation_exception(&self) -> bool {
          20  +
        matches!(&self, OperationWithDefaultsError::ValidationException(_))
          21  +
    }
          22  +
    /// Returns the error name string by matching the correct variant.
          23  +
    pub fn name(&self) -> &'static str {
          24  +
        match &self {
          25  +
            OperationWithDefaultsError::ValidationException(_inner) => _inner.name(),
          26  +
        }
          27  +
    }
          28  +
}
          29  +
impl ::std::error::Error for OperationWithDefaultsError {
          30  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          31  +
        match &self {
          32  +
            OperationWithDefaultsError::ValidationException(_inner) => Some(_inner),
          33  +
        }
          34  +
    }
          35  +
}
          36  +
impl ::std::convert::From<crate::error::ValidationException>
          37  +
    for crate::error::OperationWithDefaultsError
          38  +
{
          39  +
    fn from(
          40  +
        variant: crate::error::ValidationException,
          41  +
    ) -> crate::error::OperationWithDefaultsError {
          42  +
        Self::ValidationException(variant)
          43  +
    }
          44  +
}
          45  +
          46  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          47  +
#[derive(
          48  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          49  +
)]
          50  +
pub struct ValidationException {
          51  +
    /// A summary of the validation failure.
          52  +
    pub message: ::std::string::String,
          53  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          54  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          55  +
}
          56  +
impl ValidationException {
          57  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          58  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
          59  +
        self.field_list.as_deref()
          60  +
    }
          61  +
}
          62  +
impl ValidationException {
          63  +
    /// Returns the error message.
          64  +
    pub fn message(&self) -> &str {
          65  +
        &self.message
          66  +
    }
          67  +
    #[doc(hidden)]
          68  +
    /// Returns the error name.
          69  +
    pub fn name(&self) -> &'static str {
          70  +
        "ValidationException"
          71  +
    }
          72  +
}
          73  +
impl ::std::fmt::Display for ValidationException {
          74  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          75  +
        ::std::write!(f, "ValidationException")?;
          76  +
        {
          77  +
            ::std::write!(f, ": {}", &self.message)?;
          78  +
        }
          79  +
        Ok(())
          80  +
    }
          81  +
}
          82  +
impl ::std::error::Error for ValidationException {}
          83  +
impl ValidationException {
          84  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
          85  +
    pub fn builder() -> crate::error::validation_exception::Builder {
          86  +
        crate::error::validation_exception::Builder::default()
          87  +
    }
          88  +
}
          89  +
          90  +
/// Error type for the `GreetingWithErrors` operation.
          91  +
/// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
          92  +
#[derive(::std::fmt::Debug)]
          93  +
pub enum GreetingWithErrorsError {
          94  +
    /// This error is thrown when an invalid greeting value is provided.
          95  +
    InvalidGreeting(crate::error::InvalidGreeting),
          96  +
    /// This error is thrown when a request is invalid.
          97  +
    ComplexError(crate::error::ComplexError),
          98  +
}
          99  +
impl ::std::fmt::Display for GreetingWithErrorsError {
         100  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         101  +
        match &self {
         102  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
         103  +
            GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
         104  +
        }
         105  +
    }
         106  +
}
         107  +
impl GreetingWithErrorsError {
         108  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
         109  +
    pub fn is_invalid_greeting(&self) -> bool {
         110  +
        matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
         111  +
    }
         112  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
         113  +
    pub fn is_complex_error(&self) -> bool {
         114  +
        matches!(&self, GreetingWithErrorsError::ComplexError(_))
         115  +
    }
         116  +
    /// Returns the error name string by matching the correct variant.
         117  +
    pub fn name(&self) -> &'static str {
         118  +
        match &self {
         119  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
         120  +
            GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
         121  +
        }
         122  +
    }
         123  +
}
         124  +
impl ::std::error::Error for GreetingWithErrorsError {
         125  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         126  +
        match &self {
         127  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
         128  +
            GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
         129  +
        }
         130  +
    }
         131  +
}
         132  +
impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
         133  +
    fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
         134  +
        Self::InvalidGreeting(variant)
         135  +
    }
         136  +
}
         137  +
impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
         138  +
    fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
         139  +
        Self::ComplexError(variant)
         140  +
    }
         141  +
}
         142  +
         143  +
/// This error is thrown when a request is invalid.
         144  +
#[derive(
         145  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         146  +
)]
         147  +
pub struct ComplexError {
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub top_level: ::std::option::Option<::std::string::String>,
         150  +
    #[allow(missing_docs)] // documentation missing in model
         151  +
    pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
         152  +
}
         153  +
impl ComplexError {
         154  +
    #[allow(missing_docs)] // documentation missing in model
         155  +
    pub fn top_level(&self) -> ::std::option::Option<&str> {
         156  +
        self.top_level.as_deref()
         157  +
    }
         158  +
    #[allow(missing_docs)] // documentation missing in model
         159  +
    pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
         160  +
        self.nested.as_ref()
         161  +
    }
         162  +
}
         163  +
impl ComplexError {
         164  +
    #[doc(hidden)]
         165  +
    /// Returns the error name.
         166  +
    pub fn name(&self) -> &'static str {
         167  +
        "ComplexError"
         168  +
    }
         169  +
}
         170  +
impl ::std::fmt::Display for ComplexError {
         171  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         172  +
        ::std::write!(f, "ComplexError")?;
         173  +
        Ok(())
         174  +
    }
         175  +
}
         176  +
impl ::std::error::Error for ComplexError {}
         177  +
impl ComplexError {
         178  +
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
         179  +
    pub fn builder() -> crate::error::complex_error::Builder {
         180  +
        crate::error::complex_error::Builder::default()
         181  +
    }
         182  +
}
         183  +
         184  +
/// This error is thrown when an invalid greeting value is provided.
         185  +
#[derive(
         186  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         187  +
)]
         188  +
pub struct InvalidGreeting {
         189  +
    #[allow(missing_docs)] // documentation missing in model
         190  +
    pub message: ::std::option::Option<::std::string::String>,
         191  +
}
         192  +
impl InvalidGreeting {
         193  +
    /// Returns the error message.
         194  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         195  +
        self.message.as_deref()
         196  +
    }
         197  +
    #[doc(hidden)]
         198  +
    /// Returns the error name.
         199  +
    pub fn name(&self) -> &'static str {
         200  +
        "InvalidGreeting"
         201  +
    }
         202  +
}
         203  +
impl ::std::fmt::Display for InvalidGreeting {
         204  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         205  +
        ::std::write!(f, "InvalidGreeting")?;
         206  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         207  +
            {
         208  +
                ::std::write!(f, ": {inner_1}")?;
         209  +
            }
         210  +
        }
         211  +
        Ok(())
         212  +
    }
         213  +
}
         214  +
impl ::std::error::Error for InvalidGreeting {}
         215  +
impl InvalidGreeting {
         216  +
    /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
         217  +
    pub fn builder() -> crate::error::invalid_greeting::Builder {
         218  +
        crate::error::invalid_greeting::Builder::default()
         219  +
    }
         220  +
}
         221  +
         222  +
/// Error type for the `RpcV2CborSparseMaps` operation.
         223  +
/// Each variant represents an error that can occur for the `RpcV2CborSparseMaps` operation.
         224  +
#[derive(::std::fmt::Debug)]
         225  +
pub enum RpcV2CborSparseMapsError {
         226  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         227  +
    ValidationException(crate::error::ValidationException),
         228  +
}
         229  +
impl ::std::fmt::Display for RpcV2CborSparseMapsError {
         230  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         231  +
        match &self {
         232  +
            RpcV2CborSparseMapsError::ValidationException(_inner) => _inner.fmt(f),
         233  +
        }
         234  +
    }
         235  +
}
         236  +
impl RpcV2CborSparseMapsError {
         237  +
    /// Returns `true` if the error kind is `RpcV2CborSparseMapsError::ValidationException`.
         238  +
    pub fn is_validation_exception(&self) -> bool {
         239  +
        matches!(&self, RpcV2CborSparseMapsError::ValidationException(_))
         240  +
    }
         241  +
    /// Returns the error name string by matching the correct variant.
         242  +
    pub fn name(&self) -> &'static str {
         243  +
        match &self {
         244  +
            RpcV2CborSparseMapsError::ValidationException(_inner) => _inner.name(),
         245  +
        }
         246  +
    }
         247  +
}
         248  +
impl ::std::error::Error for RpcV2CborSparseMapsError {
         249  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         250  +
        match &self {
         251  +
            RpcV2CborSparseMapsError::ValidationException(_inner) => Some(_inner),
         252  +
        }
         253  +
    }
         254  +
}
         255  +
impl ::std::convert::From<crate::error::ValidationException>
         256  +
    for crate::error::RpcV2CborSparseMapsError
         257  +
{
         258  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RpcV2CborSparseMapsError {
         259  +
        Self::ValidationException(variant)
         260  +
    }
         261  +
}
         262  +
         263  +
/// Error type for the `RpcV2CborDenseMaps` operation.
         264  +
/// Each variant represents an error that can occur for the `RpcV2CborDenseMaps` operation.
         265  +
#[derive(::std::fmt::Debug)]
         266  +
pub enum RpcV2CborDenseMapsError {
         267  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         268  +
    ValidationException(crate::error::ValidationException),
         269  +
}
         270  +
impl ::std::fmt::Display for RpcV2CborDenseMapsError {
         271  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         272  +
        match &self {
         273  +
            RpcV2CborDenseMapsError::ValidationException(_inner) => _inner.fmt(f),
         274  +
        }
         275  +
    }
         276  +
}
         277  +
impl RpcV2CborDenseMapsError {
         278  +
    /// Returns `true` if the error kind is `RpcV2CborDenseMapsError::ValidationException`.
         279  +
    pub fn is_validation_exception(&self) -> bool {
         280  +
        matches!(&self, RpcV2CborDenseMapsError::ValidationException(_))
         281  +
    }
         282  +
    /// Returns the error name string by matching the correct variant.
         283  +
    pub fn name(&self) -> &'static str {
         284  +
        match &self {
         285  +
            RpcV2CborDenseMapsError::ValidationException(_inner) => _inner.name(),
         286  +
        }
         287  +
    }
         288  +
}
         289  +
impl ::std::error::Error for RpcV2CborDenseMapsError {
         290  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         291  +
        match &self {
         292  +
            RpcV2CborDenseMapsError::ValidationException(_inner) => Some(_inner),
         293  +
        }
         294  +
    }
         295  +
}
         296  +
impl ::std::convert::From<crate::error::ValidationException>
         297  +
    for crate::error::RpcV2CborDenseMapsError
         298  +
{
         299  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RpcV2CborDenseMapsError {
         300  +
        Self::ValidationException(variant)
         301  +
    }
         302  +
}
         303  +
         304  +
/// Error type for the `RpcV2CborLists` operation.
         305  +
/// Each variant represents an error that can occur for the `RpcV2CborLists` operation.
         306  +
#[derive(::std::fmt::Debug)]
         307  +
pub enum RpcV2CborListsError {
         308  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         309  +
    ValidationException(crate::error::ValidationException),
         310  +
}
         311  +
impl ::std::fmt::Display for RpcV2CborListsError {
         312  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         313  +
        match &self {
         314  +
            RpcV2CborListsError::ValidationException(_inner) => _inner.fmt(f),
         315  +
        }
         316  +
    }
         317  +
}
         318  +
impl RpcV2CborListsError {
         319  +
    /// Returns `true` if the error kind is `RpcV2CborListsError::ValidationException`.
         320  +
    pub fn is_validation_exception(&self) -> bool {
         321  +
        matches!(&self, RpcV2CborListsError::ValidationException(_))
         322  +
    }
         323  +
    /// Returns the error name string by matching the correct variant.
         324  +
    pub fn name(&self) -> &'static str {
         325  +
        match &self {
         326  +
            RpcV2CborListsError::ValidationException(_inner) => _inner.name(),
         327  +
        }
         328  +
    }
         329  +
}
         330  +
impl ::std::error::Error for RpcV2CborListsError {
         331  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         332  +
        match &self {
         333  +
            RpcV2CborListsError::ValidationException(_inner) => Some(_inner),
         334  +
        }
         335  +
    }
         336  +
}
         337  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::RpcV2CborListsError {
         338  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RpcV2CborListsError {
         339  +
        Self::ValidationException(variant)
         340  +
    }
         341  +
}
         342  +
         343  +
/// See [`ValidationException`](crate::error::ValidationException).
         344  +
pub mod validation_exception {
         345  +
         346  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         347  +
    /// Holds one variant for each of the ways the builder can fail.
         348  +
    #[non_exhaustive]
         349  +
    #[allow(clippy::enum_variant_names)]
         350  +
    pub enum ConstraintViolation {
         351  +
        /// `message` was not provided but it is required when building `ValidationException`.
         352  +
        MissingMessage,
         353  +
    }
         354  +
    impl ::std::fmt::Display for ConstraintViolation {
         355  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         356  +
            match self {
         357  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         358  +
            }
         359  +
        }
         360  +
    }
         361  +
    impl ::std::error::Error for ConstraintViolation {}
         362  +
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
         363  +
        type Error = ConstraintViolation;
         364  +
         365  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         366  +
            builder.build()
         367  +
        }
         368  +
    }
         369  +
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         370  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         371  +
    pub struct Builder {
         372  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         373  +
        pub(crate) field_list:
         374  +
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         375  +
    }
         376  +
    impl Builder {
         377  +
        /// A summary of the validation failure.
         378  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         379  +
            self.message = Some(input);
         380  +
            self
         381  +
        }
         382  +
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         383  +
        pub fn field_list(
         384  +
            mut self,
         385  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         386  +
        ) -> Self {
         387  +
            self.field_list = input;
         388  +
            self
         389  +
        }
         390  +
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         391  +
        ///
         392  +
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
         393  +
        ///
         394  +
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
         395  +
            self.build_enforcing_all_constraints()
         396  +
        }
         397  +
        fn build_enforcing_all_constraints(
         398  +
            self,
         399  +
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
         400  +
            Ok(crate::error::ValidationException {
         401  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         402  +
                field_list: self.field_list,
         403  +
            })
         404  +
        }
         405  +
    }
         406  +
}
         407  +
/// See [`ComplexError`](crate::error::ComplexError).
         408  +
pub mod complex_error {
         409  +
         410  +
    impl ::std::convert::From<Builder> for crate::error::ComplexError {
         411  +
        fn from(builder: Builder) -> Self {
         412  +
            builder.build()
         413  +
        }
         414  +
    }
         415  +
    /// A builder for [`ComplexError`](crate::error::ComplexError).
         416  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         417  +
    pub struct Builder {
         418  +
        pub(crate) top_level: ::std::option::Option<::std::string::String>,
         419  +
        pub(crate) nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
         420  +
    }
         421  +
    impl Builder {
         422  +
        #[allow(missing_docs)] // documentation missing in model
         423  +
        pub fn top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         424  +
            self.top_level = input;
         425  +
            self
         426  +
        }
         427  +
        #[allow(missing_docs)] // documentation missing in model
         428  +
        pub fn nested(
         429  +
            mut self,
         430  +
            input: ::std::option::Option<crate::model::ComplexNestedErrorData>,
         431  +
        ) -> Self {
         432  +
            self.nested = input;
         433  +
            self
         434  +
        }
         435  +
        /// Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
         436  +
        pub fn build(self) -> crate::error::ComplexError {
         437  +
            self.build_enforcing_all_constraints()
         438  +
        }
         439  +
        fn build_enforcing_all_constraints(self) -> crate::error::ComplexError {
         440  +
            crate::error::ComplexError {
         441  +
                top_level: self.top_level,
         442  +
                nested: self.nested,
         443  +
            }
         444  +
        }
         445  +
    }
         446  +
}
         447  +
/// See [`InvalidGreeting`](crate::error::InvalidGreeting).
         448  +
pub mod invalid_greeting {
         449  +
         450  +
    impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
         451  +
        fn from(builder: Builder) -> Self {
         452  +
            builder.build()
         453  +
        }
         454  +
    }
         455  +
    /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
         456  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         457  +
    pub struct Builder {
         458  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         459  +
    }
         460  +
    impl Builder {
         461  +
        #[allow(missing_docs)] // documentation missing in model
         462  +
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         463  +
            self.message = input;
         464  +
            self
         465  +
        }
         466  +
        /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
         467  +
        pub fn build(self) -> crate::error::InvalidGreeting {
         468  +
            self.build_enforcing_all_constraints()
         469  +
        }
         470  +
        fn build_enforcing_all_constraints(self) -> crate::error::InvalidGreeting {
         471  +
            crate::error::InvalidGreeting {
         472  +
                message: self.message,
         473  +
            }
         474  +
        }
         475  +
    }
         476  +
}