Server Test Python

Server Test Python

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde.rs

@@ -1,1 +88,68 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) mod shape_case_insensitive_error_operation;
    3      3   
    4      4   
pub(crate) mod shape_empty_struct_with_content_on_wire_op;
    5      5   
    6      6   
pub(crate) mod shape_enum_query;
    7      7   
    8      8   
pub(crate) mod shape_escaped_string_values;
    9      9   
   10         -
pub(crate) mod shape_http_enum_payload2;
   11         -
   12         -
pub(crate) mod shape_http_payload_traits2;
   13         -
   14         -
pub(crate) mod shape_http_string_payload2;
   15         -
   16         -
pub(crate) mod shape_malformed_content_type_with_body2;
   17         -
   18     10   
pub(crate) mod shape_map_with_enum_key_op;
   19     11   
   20     12   
pub(crate) mod shape_null_in_non_sparse;
   21     13   
   22     14   
pub(crate) mod shape_primitive_int_header;
   23     15   
   24     16   
pub(crate) mod shape_primitive_int_op;
   25     17   
   26     18   
pub(crate) mod shape_query_precedence;
   27     19   
   28     20   
pub(crate) mod shape_status_response;
   29     21   
   30     22   
pub(crate) mod shape_string_payload;
   31     23   
   32     24   
pub(crate) mod shape_case_insensitive_error;
   33     25   
   34     26   
pub(crate) mod shape_empty_struct_with_content_on_wire_op_output;
   35     27   
   36     28   
pub(crate) mod shape_enum_query_input;
   37     29   
   38     30   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   39     31   
    if data.is_empty() {
   40     32   
        b"{}"
   41     33   
    } else {
   42     34   
        data
   43     35   
    }
   44     36   
}
   45     37   
   46     38   
pub(crate) mod shape_escaped_string_values_output;
   47     39   
   48     40   
pub(crate) mod shape_extra_error;
   49     41   
   50         -
pub(crate) mod shape_http_enum_payload2_input;
   51         -
   52         -
pub(crate) mod shape_http_enum_payload2_output;
   53         -
   54         -
pub(crate) mod shape_http_payload_traits2_input;
   55         -
   56         -
pub(crate) mod shape_http_payload_traits2_output;
   57         -
   58         -
pub(crate) mod shape_http_string_payload2_input;
   59         -
   60         -
pub(crate) mod shape_http_string_payload2_output;
   61         -
   62     42   
pub(crate) mod shape_internal_server_error;
   63     43   
   64     44   
pub(crate) mod shape_map_with_enum_key_op_output;
   65     45   
   66     46   
pub(crate) mod shape_null_in_non_sparse_output;
   67     47   
   68     48   
pub(crate) mod shape_primitive_int_header_output;
   69     49   
   70     50   
pub(crate) mod shape_primitive_int_op_output;
   71     51   

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_enum_payload2.rs

@@ -1,0 +154,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub async fn de_http_enum_payload2_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
    5         -
) -> std::result::Result<
    6         -
    crate::input::HttpEnumPayload2Input,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8         -
>
    9         -
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11         -
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14         -
{
   15         -
    Ok({
   16         -
        #[allow(unused_mut)]
   17         -
        let mut input = crate::input::http_enum_payload2_input_internal::Builder::default();
   18         -
        #[allow(unused_variables)]
   19         -
        let ::aws_smithy_runtime_api::http::RequestParts {
   20         -
            uri, headers, body, ..
   21         -
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22         -
        if let Some(value) = {
   23         -
            let bytes = ::hyper::body::to_bytes(body).await?;
   24         -
            if !bytes.is_empty() {
   25         -
                ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   26         -
                    &headers,
   27         -
                    Some("text/plain"),
   28         -
                )?;
   29         -
            }
   30         -
            crate::protocol_serde::shape_http_enum_payload2_input::de_payload_payload(&bytes)?
   31         -
        } {
   32         -
            input = input.set_payload(Some(value))
   33         -
        }
   34         -
        input.build()?
   35         -
    })
   36         -
}
   37         -
   38         -
#[allow(clippy::unnecessary_wraps)]
   39         -
pub fn ser_http_enum_payload2_http_response(
   40         -
    #[allow(unused_variables)] output: crate::output::HttpEnumPayload2Output,
   41         -
) -> std::result::Result<
   42         -
    ::aws_smithy_http_server::response::Response,
   43         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   44         -
> {
   45         -
    Ok({
   46         -
        #[allow(unused_mut)]
   47         -
        let mut builder = ::http::Response::builder();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49         -
            builder,
   50         -
            ::http::header::CONTENT_TYPE,
   51         -
            "text/plain",
   52         -
        );
   53         -
        let http_status: u16 = 200;
   54         -
        builder = builder.status(http_status);
   55         -
        let payload =
   56         -
            crate::protocol_serde::shape_http_enum_payload2_output::ser_payload_http_payload(
   57         -
                output.payload,
   58         -
            )?;
   59         -
        let content_length = payload.len();
   60         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   61         -
            builder,
   62         -
            ::http::header::CONTENT_LENGTH,
   63         -
            content_length,
   64         -
        );
   65         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   66         -
        builder.body(body)?
   67         -
    })
   68         -
}
   69         -
   70         -
#[allow(clippy::unnecessary_wraps)]
   71         -
pub fn ser_http_enum_payload2_http_error(
   72         -
    error: &crate::error::HttpEnumPayload2Error,
   73         -
) -> std::result::Result<
   74         -
    ::aws_smithy_http_server::response::Response,
   75         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   76         -
> {
   77         -
    Ok({
   78         -
        match error {
   79         -
            crate::error::HttpEnumPayload2Error::ValidationException(output) => {
   80         -
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   81         -
                #[allow(unused_mut)]
   82         -
                let mut builder = ::http::Response::builder();
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   84         -
                    builder,
   85         -
                    ::http::header::CONTENT_TYPE,
   86         -
                    "text/plain",
   87         -
                );
   88         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   89         -
                    builder,
   90         -
                    http::header::HeaderName::from_static("x-amzn-errortype"),
   91         -
                    "ValidationException",
   92         -
                );
   93         -
                let content_length = payload.len();
   94         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   95         -
                    builder,
   96         -
                    ::http::header::CONTENT_LENGTH,
   97         -
                    content_length,
   98         -
                );
   99         -
                builder
  100         -
                    .status(400)
  101         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  102         -
            }
  103         -
            crate::error::HttpEnumPayload2Error::ExtraError(output) => {
  104         -
                let payload =
  105         -
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
  106         -
                #[allow(unused_mut)]
  107         -
                let mut builder = ::http::Response::builder();
  108         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  109         -
                    builder,
  110         -
                    ::http::header::CONTENT_TYPE,
  111         -
                    "text/plain",
  112         -
                );
  113         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  114         -
                    builder,
  115         -
                    http::header::HeaderName::from_static("x-amzn-errortype"),
  116         -
                    "ExtraError",
  117         -
                );
  118         -
                let content_length = payload.len();
  119         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  120         -
                    builder,
  121         -
                    ::http::header::CONTENT_LENGTH,
  122         -
                    content_length,
  123         -
                );
  124         -
                builder
  125         -
                    .status(500)
  126         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  127         -
            }
  128         -
            crate::error::HttpEnumPayload2Error::InternalServerError(output) => {
  129         -
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  130         -
                #[allow(unused_mut)]
  131         -
                let mut builder = ::http::Response::builder();
  132         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  133         -
                    builder,
  134         -
                    ::http::header::CONTENT_TYPE,
  135         -
                    "text/plain",
  136         -
                );
  137         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  138         -
                    builder,
  139         -
                    http::header::HeaderName::from_static("x-amzn-errortype"),
  140         -
                    "InternalServerError",
  141         -
                );
  142         -
                let content_length = payload.len();
  143         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  144         -
                    builder,
  145         -
                    ::http::header::CONTENT_LENGTH,
  146         -
                    content_length,
  147         -
                );
  148         -
                builder
  149         -
                    .status(500)
  150         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  151         -
            }
  152         -
        }
  153         -
    })
  154         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_enum_payload2_input.rs

@@ -1,0 +14,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_payload_payload(
    3         -
    body: &[u8],
    4         -
) -> std::result::Result<
    5         -
    ::std::option::Option<::std::string::String>,
    6         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7         -
> {
    8         -
    (!body.is_empty())
    9         -
        .then(|| {
   10         -
            let body_str = std::str::from_utf8(body)?;
   11         -
            Ok(::std::string::String::from(body_str))
   12         -
        })
   13         -
        .transpose()
   14         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_enum_payload2_output.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_payload_http_payload(
    3         -
    payload: ::std::option::Option<crate::model::StringEnum>,
    4         -
) -> Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    5         -
    let payload = match payload {
    6         -
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
    8         -
    };
    9         -
    Ok(payload.as_str().as_bytes().to_vec())
   10         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_payload_traits2_input.rs

@@ -1,0 +21,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_blob_payload(
    3         -
    body: &[u8],
    4         -
) -> std::result::Result<
    5         -
    ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
    6         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7         -
> {
    8         -
    (!body.is_empty())
    9         -
        .then(|| Ok(::aws_smithy_http_server_python::types::Blob::new(body)))
   10         -
        .transpose()
   11         -
}
   12         -
   13         -
pub(crate) fn de_foo_header(
   14         -
    header_map: &::aws_smithy_runtime_api::http::Headers,
   15         -
) -> ::std::result::Result<
   16         -
    ::std::option::Option<::std::string::String>,
   17         -
    ::aws_smithy_http::header::ParseError,
   18         -
> {
   19         -
    let headers = header_map.get_all("X-Foo");
   20         -
    ::aws_smithy_http::header::one_or_none(headers)
   21         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_payload_traits2_output.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_blob_http_payload(
    3         -
    payload: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
    4         -
) -> Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    5         -
    let payload = match payload {
    6         -
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
    8         -
    };
    9         -
    Ok(payload.into_inner())
   10         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_string_payload2_input.rs

@@ -1,0 +14,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_payload_payload(
    3         -
    body: &[u8],
    4         -
) -> std::result::Result<
    5         -
    ::std::option::Option<::std::string::String>,
    6         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7         -
> {
    8         -
    (!body.is_empty())
    9         -
        .then(|| {
   10         -
            let body_str = std::str::from_utf8(body)?;
   11         -
            Ok(body_str.to_string())
   12         -
        })
   13         -
        .transpose()
   14         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/protocol_serde/shape_http_string_payload2_output.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_payload_http_payload(
    3         -
    payload: ::std::option::Option<::std::string::String>,
    4         -
) -> Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    5         -
    let payload = match payload {
    6         -
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
    8         -
    };
    9         -
    Ok(payload.into_bytes())
   10         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/python_module_export.rs

@@ -1,1 +68,60 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pymodule]
    3      3   
#[::pyo3(name = "rest_json_extras")]
    4      4   
pub fn python_library(py: ::pyo3::Python<'_>, m: &::pyo3::types::PyModule) -> ::pyo3::PyResult<()> {
    5      5   
    let input = ::pyo3::types::PyModule::new(py, "input")?;
    6      6   
    let output = ::pyo3::types::PyModule::new(py, "output")?;
    7      7   
    let error = ::pyo3::types::PyModule::new(py, "error")?;
    8      8   
    error.add_class::<crate::error::ExtraError>()?;
    9      9   
    error.add_class::<crate::error::InternalServerError>()?;
   10         -
    output.add_class::<crate::output::HttpStringPayload2Output>()?;
   11         -
    input.add_class::<crate::input::HttpStringPayload2Input>()?;
   12         -
    error.add_class::<crate::error::ValidationException>()?;
   13         -
    let model = ::pyo3::types::PyModule::new(py, "model")?;
   14         -
    model.add_class::<crate::model::ValidationExceptionField>()?;
   15         -
    output.add_class::<crate::output::HttpEnumPayload2Output>()?;
   16         -
    model.add_class::<crate::model::StringEnum>()?;
   17         -
    input.add_class::<crate::input::HttpEnumPayload2Input>()?;
   18         -
    output.add_class::<crate::output::MalformedContentTypeWithBody2Output>()?;
   19         -
    input.add_class::<crate::input::MalformedContentTypeWithBody2Input>()?;
   20         -
    output.add_class::<crate::output::HttpPayloadTraits2Output>()?;
   21         -
    input.add_class::<crate::input::HttpPayloadTraits2Input>()?;
   22     10   
    output.add_class::<crate::output::QueryPrecedenceOutput>()?;
   23     11   
    input.add_class::<crate::input::QueryPrecedenceInput>()?;
   24     12   
    output.add_class::<crate::output::EmptyStructWithContentOnWireOpOutput>()?;
          13  +
    let model = ::pyo3::types::PyModule::new(py, "model")?;
   25     14   
    model.add_class::<crate::model::EmptyStruct>()?;
   26     15   
    input.add_class::<crate::input::EmptyStructWithContentOnWireOpInput>()?;
   27     16   
    error.add_class::<crate::error::CaseInsensitiveError>()?;
   28     17   
    output.add_class::<crate::output::CaseInsensitiveErrorOperationOutput>()?;
   29     18   
    input.add_class::<crate::input::CaseInsensitiveErrorOperationInput>()?;
   30     19   
    output.add_class::<crate::output::NullInNonSparseOutput>()?;
   31     20   
    model.add_class::<crate::model::PyUnionMarkerSingleElementUnion>()?;
   32     21   
    input.add_class::<crate::input::NullInNonSparseInput>()?;
          22  +
    error.add_class::<crate::error::ValidationException>()?;
          23  +
    model.add_class::<crate::model::ValidationExceptionField>()?;
   33     24   
    output.add_class::<crate::output::EscapedStringValuesOutput>()?;
   34     25   
    model.add_class::<crate::model::EnumWithEscapedChars>()?;
   35     26   
    input.add_class::<crate::input::EscapedStringValuesInput>()?;
   36     27   
    output.add_class::<crate::output::PrimitiveIntOpOutput>()?;
   37     28   
    input.add_class::<crate::input::PrimitiveIntOpInput>()?;
   38     29   
    output.add_class::<crate::output::MapWithEnumKeyOpOutput>()?;
          30  +
    model.add_class::<crate::model::StringEnum>()?;
   39     31   
    input.add_class::<crate::input::MapWithEnumKeyOpInput>()?;
   40     32   
    output.add_class::<crate::output::StatusResponseOutput>()?;
   41     33   
    input.add_class::<crate::input::StatusResponseInput>()?;
   42     34   
    output.add_class::<crate::output::EnumQueryOutput>()?;
   43     35   
    input.add_class::<crate::input::EnumQueryInput>()?;
   44     36   
    output.add_class::<crate::output::PrimitiveIntHeaderOutput>()?;
   45     37   
    input.add_class::<crate::input::PrimitiveIntHeaderInput>()?;
   46     38   
    output.add_class::<crate::output::StringPayloadOutput>()?;
   47     39   
    input.add_class::<crate::input::StringPayloadInput>()?;
   48     40   
    ::pyo3::py_run!(

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/python_operation_adaptor.rs

@@ -1,1 +243,31 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Python handler for operation `HttpStringPayload2`.
    3         -
pub(crate) async fn http_string_payload2(
    4         -
    input: crate::input::HttpStringPayload2Input,
    5         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
    6         -
    handler: ::aws_smithy_http_server_python::PyHandler,
    7         -
) -> std::result::Result<
    8         -
    crate::output::HttpStringPayload2Output,
    9         -
    crate::error::HttpStringPayload2Error,
   10         -
> {
   11         -
    // Async block used to run the handler and catch any Python error.
   12         -
    let result = if handler.is_coroutine {
   13         -
        ::tracing::trace!(
   14         -
            name = "http_string_payload2",
   15         -
            "executing python handler coroutine"
   16         -
        );
   17         -
        let result = ::pyo3::Python::with_gil(|py| {
   18         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   19         -
            let coroutine = if handler.args == 1 {
   20         -
                pyhandler.call1((input,))?
   21         -
            } else {
   22         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   23         -
            };
   24         -
            ::pyo3_asyncio::tokio::into_future(coroutine)
   25         -
        })?;
   26         -
        result.await.and_then(|r| {
   27         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpStringPayload2Output>(py))
   28         -
        })
   29         -
    } else {
   30         -
        ::tracing::trace!(
   31         -
            name = "http_string_payload2",
   32         -
            "executing python handler function"
   33         -
        );
   34         -
        ::pyo3::Python::with_gil(|py| {
   35         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   36         -
            let output = if handler.args == 1 {
   37         -
                pyhandler.call1((input,))?
   38         -
            } else {
   39         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   40         -
            };
   41         -
            output.extract::<crate::output::HttpStringPayload2Output>()
   42         -
        })
   43         -
    };
   44         -
    // Catch and record a Python traceback.
   45         -
    result.map_err(|e| {
   46         -
        let rich_py_err =
   47         -
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   48         -
                e.clone_ref(py)
   49         -
            }));
   50         -
        ::tracing::error!(error = ?rich_py_err, "handler error");
   51         -
        e.into()
   52         -
    })
   53         -
}
   54         -
   55         -
/// Python handler for operation `HttpEnumPayload2`.
   56         -
pub(crate) async fn http_enum_payload2(
   57         -
    input: crate::input::HttpEnumPayload2Input,
   58         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
   59         -
    handler: ::aws_smithy_http_server_python::PyHandler,
   60         -
) -> std::result::Result<crate::output::HttpEnumPayload2Output, crate::error::HttpEnumPayload2Error>
   61         -
{
   62         -
    // Async block used to run the handler and catch any Python error.
   63         -
    let result = if handler.is_coroutine {
   64         -
        ::tracing::trace!(
   65         -
            name = "http_enum_payload2",
   66         -
            "executing python handler coroutine"
   67         -
        );
   68         -
        let result = ::pyo3::Python::with_gil(|py| {
   69         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   70         -
            let coroutine = if handler.args == 1 {
   71         -
                pyhandler.call1((input,))?
   72         -
            } else {
   73         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   74         -
            };
   75         -
            ::pyo3_asyncio::tokio::into_future(coroutine)
   76         -
        })?;
   77         -
        result.await.and_then(|r| {
   78         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpEnumPayload2Output>(py))
   79         -
        })
   80         -
    } else {
   81         -
        ::tracing::trace!(
   82         -
            name = "http_enum_payload2",
   83         -
            "executing python handler function"
   84         -
        );
   85         -
        ::pyo3::Python::with_gil(|py| {
   86         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   87         -
            let output = if handler.args == 1 {
   88         -
                pyhandler.call1((input,))?
   89         -
            } else {
   90         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   91         -
            };
   92         -
            output.extract::<crate::output::HttpEnumPayload2Output>()
   93         -
        })
   94         -
    };
   95         -
    // Catch and record a Python traceback.
   96         -
    result.map_err(|e| {
   97         -
        let rich_py_err =
   98         -
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   99         -
                e.clone_ref(py)
  100         -
            }));
  101         -
        ::tracing::error!(error = ?rich_py_err, "handler error");
  102         -
        e.into()
  103         -
    })
  104         -
}
  105         -
  106         -
/// Python handler for operation `MalformedContentTypeWithBody2`.
  107         -
pub(crate) async fn malformed_content_type_with_body2(
  108         -
    input: crate::input::MalformedContentTypeWithBody2Input,
  109         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  110         -
    handler: ::aws_smithy_http_server_python::PyHandler,
  111         -
) -> std::result::Result<
  112         -
    crate::output::MalformedContentTypeWithBody2Output,
  113         -
    crate::error::MalformedContentTypeWithBody2Error,
  114         -
> {
  115         -
    // Async block used to run the handler and catch any Python error.
  116         -
    let result = if handler.is_coroutine {
  117         -
        ::tracing::trace!(
  118         -
            name = "malformed_content_type_with_body2",
  119         -
            "executing python handler coroutine"
  120         -
        );
  121         -
        let result = ::pyo3::Python::with_gil(|py| {
  122         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  123         -
            let coroutine = if handler.args == 1 {
  124         -
                pyhandler.call1((input,))?
  125         -
            } else {
  126         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  127         -
            };
  128         -
            ::pyo3_asyncio::tokio::into_future(coroutine)
  129         -
        })?;
  130         -
        result.await.and_then(|r| {
  131         -
            ::pyo3::Python::with_gil(|py| {
  132         -
                r.extract::<crate::output::MalformedContentTypeWithBody2Output>(py)
  133         -
            })
  134         -
        })
  135         -
    } else {
  136         -
        ::tracing::trace!(
  137         -
            name = "malformed_content_type_with_body2",
  138         -
            "executing python handler function"
  139         -
        );
  140         -
        ::pyo3::Python::with_gil(|py| {
  141         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  142         -
            let output = if handler.args == 1 {
  143         -
                pyhandler.call1((input,))?
  144         -
            } else {
  145         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  146         -
            };
  147         -
            output.extract::<crate::output::MalformedContentTypeWithBody2Output>()
  148         -
        })
  149         -
    };
  150         -
    // Catch and record a Python traceback.
  151         -
    result.map_err(|e| {
  152         -
        let rich_py_err =
  153         -
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  154         -
                e.clone_ref(py)
  155         -
            }));
  156         -
        ::tracing::error!(error = ?rich_py_err, "handler error");
  157         -
        e.into()
  158         -
    })
  159         -
}
  160         -
  161         -
/// Python handler for operation `HttpPayloadTraits2`.
  162         -
pub(crate) async fn http_payload_traits2(
  163         -
    input: crate::input::HttpPayloadTraits2Input,
  164         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  165         -
    handler: ::aws_smithy_http_server_python::PyHandler,
  166         -
) -> std::result::Result<
  167         -
    crate::output::HttpPayloadTraits2Output,
  168         -
    crate::error::HttpPayloadTraits2Error,
  169         -
> {
  170         -
    // Async block used to run the handler and catch any Python error.
  171         -
    let result = if handler.is_coroutine {
  172         -
        ::tracing::trace!(
  173         -
            name = "http_payload_traits2",
  174         -
            "executing python handler coroutine"
  175         -
        );
  176         -
        let result = ::pyo3::Python::with_gil(|py| {
  177         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  178         -
            let coroutine = if handler.args == 1 {
  179         -
                pyhandler.call1((input,))?
  180         -
            } else {
  181         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  182         -
            };
  183         -
            ::pyo3_asyncio::tokio::into_future(coroutine)
  184         -
        })?;
  185         -
        result.await.and_then(|r| {
  186         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpPayloadTraits2Output>(py))
  187         -
        })
  188         -
    } else {
  189         -
        ::tracing::trace!(
  190         -
            name = "http_payload_traits2",
  191         -
            "executing python handler function"
  192         -
        );
  193         -
        ::pyo3::Python::with_gil(|py| {
  194         -
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  195         -
            let output = if handler.args == 1 {
  196         -
                pyhandler.call1((input,))?
  197         -
            } else {
  198         -
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  199         -
            };
  200         -
            output.extract::<crate::output::HttpPayloadTraits2Output>()
  201         -
        })
  202         -
    };
  203         -
    // Catch and record a Python traceback.
  204         -
    result.map_err(|e| {
  205         -
        let rich_py_err =
  206         -
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  207         -
                e.clone_ref(py)
  208         -
            }));
  209         -
        ::tracing::error!(error = ?rich_py_err, "handler error");
  210         -
        e.into()
  211         -
    })
  212         -
}
  213         -
  214      2   
/// Python handler for operation `QueryPrecedence`.
  215      3   
pub(crate) async fn query_precedence(
  216      4   
    input: crate::input::QueryPrecedenceInput,
  217      5   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  218      6   
    handler: ::aws_smithy_http_server_python::PyHandler,
  219      7   
) -> std::result::Result<crate::output::QueryPrecedenceOutput, crate::error::QueryPrecedenceError> {
  220      8   
    // Async block used to run the handler and catch any Python error.
  221      9   
    let result = if handler.is_coroutine {
  222     10   
        ::tracing::trace!(
  223     11   
            name = "query_precedence",

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/python_server_application.rs

@@ -15,15 +94,74 @@
   35     35   
///     raise NotImplementedError
   36     36   
///
   37     37   
/// @app.enum_query
   38     38   
/// def enum_query(input: input::EnumQueryInput, ctx: Context) -> output::EnumQueryOutput:
   39     39   
///     raise NotImplementedError
   40     40   
///
   41     41   
/// @app.escaped_string_values
   42     42   
/// def escaped_string_values(input: input::EscapedStringValuesInput, ctx: Context) -> output::EscapedStringValuesOutput:
   43     43   
///     raise NotImplementedError
   44     44   
///
   45         -
/// @app.http_enum_payload2
   46         -
/// def http_enum_payload2(input: input::HttpEnumPayload2Input, ctx: Context) -> output::HttpEnumPayload2Output:
   47         -
///     raise NotImplementedError
   48         -
///
   49         -
/// # This example serializes a blob shape in the payload.
   50         -
/// #
   51         -
/// # In this example, no JSON document is synthesized because the payload is
   52         -
/// # not a structure or a union type.
   53         -
/// @app.http_payload_traits2
   54         -
/// def http_payload_traits2(input: input::HttpPayloadTraits2Input, ctx: Context) -> output::HttpPayloadTraits2Output:
   55         -
///     raise NotImplementedError
   56         -
///
   57         -
/// @app.http_string_payload2
   58         -
/// def http_string_payload2(input: input::HttpStringPayload2Input, ctx: Context) -> output::HttpStringPayload2Output:
   59         -
///     raise NotImplementedError
   60         -
///
   61         -
/// @app.malformed_content_type_with_body2
   62         -
/// def malformed_content_type_with_body2(input: input::MalformedContentTypeWithBody2Input, ctx: Context) -> output::MalformedContentTypeWithBody2Output:
   63         -
///     raise NotImplementedError
   64         -
///
   65     45   
/// @app.map_with_enum_key_op
   66     46   
/// def map_with_enum_key_op(input: input::MapWithEnumKeyOpInput, ctx: Context) -> output::MapWithEnumKeyOpOutput:
   67     47   
///     raise NotImplementedError
   68     48   
///
   69     49   
/// @app.null_in_non_sparse
   70     50   
/// def null_in_non_sparse(input: input::NullInNonSparseInput, ctx: Context) -> output::NullInNonSparseOutput:
   71     51   
///     raise NotImplementedError
   72     52   
///
   73     53   
/// @app.primitive_int_header
   74     54   
/// def primitive_int_header(input: input::PrimitiveIntHeaderInput, ctx: Context) -> output::PrimitiveIntHeaderOutput:
@@ -183,163 +302,222 @@
  203    183   
        let builder = builder.escaped_string_values(move |input, state| {
  204    184   
            ::pyo3_asyncio::tokio::scope(
  205    185   
                escaped_string_values_locals.clone(),
  206    186   
                crate::python_operation_adaptor::escaped_string_values(
  207    187   
                    input,
  208    188   
                    state,
  209    189   
                    handler.clone(),
  210    190   
                ),
  211    191   
            )
  212    192   
        });
  213         -
        let http_enum_payload2_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  214         -
        let handler = self
  215         -
            .handlers
  216         -
            .get("http_enum_payload2")
  217         -
            .expect("Python handler for operation `http_enum_payload2` not found")
  218         -
            .clone();
  219         -
        let builder = builder.http_enum_payload2(move |input, state| {
  220         -
            ::pyo3_asyncio::tokio::scope(
  221         -
                http_enum_payload2_locals.clone(),
  222         -
                crate::python_operation_adaptor::http_enum_payload2(input, state, handler.clone()),
  223         -
            )
  224         -
        });
  225         -
        let http_payload_traits2_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  226         -
        let handler = self
  227         -
            .handlers
  228         -
            .get("http_payload_traits2")
  229         -
            .expect("Python handler for operation `http_payload_traits2` not found")
  230         -
            .clone();
  231         -
        let builder = builder.http_payload_traits2(move |input, state| {
  232         -
            ::pyo3_asyncio::tokio::scope(
  233         -
                http_payload_traits2_locals.clone(),
  234         -
                crate::python_operation_adaptor::http_payload_traits2(
  235         -
                    input,
  236         -
                    state,
  237         -
                    handler.clone(),
  238         -
                ),
  239         -
            )
  240         -
        });
  241         -
        let http_string_payload2_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  242         -
        let handler = self
  243         -
            .handlers
  244         -
            .get("http_string_payload2")
  245         -
            .expect("Python handler for operation `http_string_payload2` not found")
  246         -
            .clone();
  247         -
        let builder = builder.http_string_payload2(move |input, state| {
  248         -
            ::pyo3_asyncio::tokio::scope(
  249         -
                http_string_payload2_locals.clone(),
  250         -
                crate::python_operation_adaptor::http_string_payload2(
  251         -
                    input,
  252         -
                    state,
  253         -
                    handler.clone(),
  254         -
                ),
  255         -
            )
  256         -
        });
  257         -
        let malformed_content_type_with_body2_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  258         -
        let handler = self
  259         -
            .handlers
  260         -
            .get("malformed_content_type_with_body2")
  261         -
            .expect("Python handler for operation `malformed_content_type_with_body2` not found")
  262         -
            .clone();
  263         -
        let builder = builder.malformed_content_type_with_body2(move |input, state| {
  264         -
            ::pyo3_asyncio::tokio::scope(
  265         -
                malformed_content_type_with_body2_locals.clone(),
  266         -
                crate::python_operation_adaptor::malformed_content_type_with_body2(
  267         -
                    input,
  268         -
                    state,
  269         -
                    handler.clone(),
  270         -
                ),
  271         -
            )
  272         -
        });
  273    193   
        let map_with_enum_key_op_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  274    194   
        let handler = self
  275    195   
            .handlers
  276    196   
            .get("map_with_enum_key_op")
  277    197   
            .expect("Python handler for operation `map_with_enum_key_op` not found")
  278    198   
            .clone();
  279    199   
        let builder = builder.map_with_enum_key_op(move |input, state| {
  280    200   
            ::pyo3_asyncio::tokio::scope(
  281    201   
                map_with_enum_key_op_locals.clone(),
  282    202   
                crate::python_operation_adaptor::map_with_enum_key_op(
@@ -495,415 +610,474 @@
  515    435   
    /// :rtype None:
  516    436   
    #[pyo3(text_signature = "($self, func)")]
  517    437   
    pub fn escaped_string_values(
  518    438   
        &mut self,
  519    439   
        py: ::pyo3::Python,
  520    440   
        func: ::pyo3::PyObject,
  521    441   
    ) -> ::pyo3::PyResult<()> {
  522    442   
        use ::aws_smithy_http_server_python::PyApp;
  523    443   
        self.register_operation(py, "escaped_string_values", func)
  524    444   
    }
  525         -
    /// Method to register `http_enum_payload2` Python implementation inside the handlers map.
  526         -
    /// It can be used as a function decorator in Python.
  527         -
    ///
  528         -
    /// :param func typing.Union\[typing.Callable\[\[rest_json_extras.input.HttpEnumPayload2Input, Ctx\], typing.Union\[rest_json_extras.output.HttpEnumPayload2Output, typing.Awaitable\[rest_json_extras.output.HttpEnumPayload2Output\]\]\], typing.Callable\[\[rest_json_extras.input.HttpEnumPayload2Input\], typing.Union\[rest_json_extras.output.HttpEnumPayload2Output, typing.Awaitable\[rest_json_extras.output.HttpEnumPayload2Output\]\]\]\]:
  529         -
    /// :rtype None:
  530         -
    #[pyo3(text_signature = "($self, func)")]
  531         -
    pub fn http_enum_payload2(
  532         -
        &mut self,
  533         -
        py: ::pyo3::Python,
  534         -
        func: ::pyo3::PyObject,
  535         -
    ) -> ::pyo3::PyResult<()> {
  536         -
        use ::aws_smithy_http_server_python::PyApp;
  537         -
        self.register_operation(py, "http_enum_payload2", func)
  538         -
    }
  539         -
    /// Method to register `http_payload_traits2` Python implementation inside the handlers map.
  540         -
    /// It can be used as a function decorator in Python.
  541         -
    ///
  542         -
    /// :param func typing.Union\[typing.Callable\[\[rest_json_extras.input.HttpPayloadTraits2Input, Ctx\], typing.Union\[rest_json_extras.output.HttpPayloadTraits2Output, typing.Awaitable\[rest_json_extras.output.HttpPayloadTraits2Output\]\]\], typing.Callable\[\[rest_json_extras.input.HttpPayloadTraits2Input\], typing.Union\[rest_json_extras.output.HttpPayloadTraits2Output, typing.Awaitable\[rest_json_extras.output.HttpPayloadTraits2Output\]\]\]\]:
  543         -
    /// :rtype None:
  544         -
    #[pyo3(text_signature = "($self, func)")]
  545         -
    pub fn http_payload_traits2(
  546         -
        &mut self,
  547         -
        py: ::pyo3::Python,
  548         -
        func: ::pyo3::PyObject,
  549         -
    ) -> ::pyo3::PyResult<()> {
  550         -
        use ::aws_smithy_http_server_python::PyApp;
  551         -
        self.register_operation(py, "http_payload_traits2", func)
  552         -
    }
  553         -
    /// Method to register `http_string_payload2` Python implementation inside the handlers map.
  554         -
    /// It can be used as a function decorator in Python.
  555         -
    ///
  556         -
    /// :param func typing.Union\[typing.Callable\[\[rest_json_extras.input.HttpStringPayload2Input, Ctx\], typing.Union\[rest_json_extras.output.HttpStringPayload2Output, typing.Awaitable\[rest_json_extras.output.HttpStringPayload2Output\]\]\], typing.Callable\[\[rest_json_extras.input.HttpStringPayload2Input\], typing.Union\[rest_json_extras.output.HttpStringPayload2Output, typing.Awaitable\[rest_json_extras.output.HttpStringPayload2Output\]\]\]\]:
  557         -
    /// :rtype None:
  558         -
    #[pyo3(text_signature = "($self, func)")]
  559         -
    pub fn http_string_payload2(
  560         -
        &mut self,
  561         -
        py: ::pyo3::Python,
  562         -
        func: ::pyo3::PyObject,
  563         -
    ) -> ::pyo3::PyResult<()> {
  564         -
        use ::aws_smithy_http_server_python::PyApp;
  565         -
        self.register_operation(py, "http_string_payload2", func)
  566         -
    }
  567         -
    /// Method to register `malformed_content_type_with_body2` Python implementation inside the handlers map.
  568         -
    /// It can be used as a function decorator in Python.
  569         -
    ///
  570         -
    /// :param func typing.Union\[typing.Callable\[\[rest_json_extras.input.MalformedContentTypeWithBody2Input, Ctx\], typing.Union\[rest_json_extras.output.MalformedContentTypeWithBody2Output, typing.Awaitable\[rest_json_extras.output.MalformedContentTypeWithBody2Output\]\]\], typing.Callable\[\[rest_json_extras.input.MalformedContentTypeWithBody2Input\], typing.Union\[rest_json_extras.output.MalformedContentTypeWithBody2Output, typing.Awaitable\[rest_json_extras.output.MalformedContentTypeWithBody2Output\]\]\]\]:
  571         -
    /// :rtype None:
  572         -
    #[pyo3(text_signature = "($self, func)")]
  573         -
    pub fn malformed_content_type_with_body2(
  574         -
        &mut self,
  575         -
        py: ::pyo3::Python,
  576         -
        func: ::pyo3::PyObject,
  577         -
    ) -> ::pyo3::PyResult<()> {
  578         -
        use ::aws_smithy_http_server_python::PyApp;
  579         -
        self.register_operation(py, "malformed_content_type_with_body2", func)
  580         -
    }
  581    445   
    /// Method to register `map_with_enum_key_op` Python implementation inside the handlers map.
  582    446   
    /// It can be used as a function decorator in Python.
  583    447   
    ///
  584    448   
    /// :param func typing.Union\[typing.Callable\[\[rest_json_extras.input.MapWithEnumKeyOpInput, Ctx\], typing.Union\[rest_json_extras.output.MapWithEnumKeyOpOutput, typing.Awaitable\[rest_json_extras.output.MapWithEnumKeyOpOutput\]\]\], typing.Callable\[\[rest_json_extras.input.MapWithEnumKeyOpInput\], typing.Union\[rest_json_extras.output.MapWithEnumKeyOpOutput, typing.Awaitable\[rest_json_extras.output.MapWithEnumKeyOpOutput\]\]\]\]:
  585    449   
    /// :rtype None:
  586    450   
    #[pyo3(text_signature = "($self, func)")]
  587    451   
    pub fn map_with_enum_key_op(
  588    452   
        &mut self,
  589    453   
        py: ::pyo3::Python,
  590    454   
        func: ::pyo3::PyObject,

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

@@ -1,1 +43,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`RestJsonExtras`].
    3      3   
///
    4      4   
/// Constructed via [`RestJsonExtras::builder`].
    5      5   
pub struct RestJsonExtrasBuilder<Body, L, HttpPl, ModelPl> {
    6      6   
    case_insensitive_error_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      7   
    empty_struct_with_content_on_wire_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8      8   
    enum_query: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9      9   
    escaped_string_values: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10         -
    http_enum_payload2: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11         -
    http_payload_traits2: Option<::aws_smithy_http_server::routing::Route<Body>>,
   12         -
    http_string_payload2: Option<::aws_smithy_http_server::routing::Route<Body>>,
   13         -
    malformed_content_type_with_body2: Option<::aws_smithy_http_server::routing::Route<Body>>,
   14     10   
    map_with_enum_key_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
   15     11   
    null_in_non_sparse: Option<::aws_smithy_http_server::routing::Route<Body>>,
   16     12   
    primitive_int_header: Option<::aws_smithy_http_server::routing::Route<Body>>,
   17     13   
    primitive_int_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
   18     14   
    query_precedence: Option<::aws_smithy_http_server::routing::Route<Body>>,
   19     15   
    status_response: Option<::aws_smithy_http_server::routing::Route<Body>>,
   20     16   
    string_payload: Option<::aws_smithy_http_server::routing::Route<Body>>,
   21     17   
    layer: L,
   22     18   
    http_plugin: HttpPl,
   23     19   
    model_plugin: ModelPl,
@@ -599,595 +1259,654 @@
  619    615   
                Error = ::std::convert::Infallible,
  620    616   
            > + Clone
  621    617   
            + Send
  622    618   
            + 'static,
  623    619   
        S::Future: Send + 'static,
  624    620   
    {
  625    621   
        self.escaped_string_values = Some(::aws_smithy_http_server::routing::Route::new(svc));
  626    622   
        self
  627    623   
    }
  628    624   
  629         -
    /// Sets the [`HttpEnumPayload2`](crate::operation_shape::HttpEnumPayload2) operation.
  630         -
    ///
  631         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  632         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  633         -
    ///
  634         -
    /// # Example
  635         -
    ///
  636         -
    /// ```no_run
  637         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  638         -
    ///
  639         -
    /// use rest_json_extras::{input, output, error};
  640         -
    ///
  641         -
    /// async fn handler(input: input::HttpEnumPayload2Input) -> Result<output::HttpEnumPayload2Output, error::HttpEnumPayload2Error> {
  642         -
    ///     todo!()
  643         -
    /// }
  644         -
    ///
  645         -
    /// let config = RestJsonExtrasConfig::builder().build();
  646         -
    /// let app = RestJsonExtras::builder(config)
  647         -
    ///     .http_enum_payload2(handler)
  648         -
    ///     /* Set other handlers */
  649         -
    ///     .build()
  650         -
    ///     .unwrap();
  651         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  652         -
    /// ```
  653         -
    ///
  654         -
                    pub fn http_enum_payload2<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  655         -
                    where
  656         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpEnumPayload2, HandlerExtractors>,
  657         -
  658         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  659         -
                            RestJsonExtras<L>,
  660         -
                            crate::operation_shape::HttpEnumPayload2,
  661         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpEnumPayload2, HandlerType>
  662         -
                        >,
  663         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  664         -
                            RestJsonExtras<L>,
  665         -
                            crate::operation_shape::HttpEnumPayload2,
  666         -
                            ModelPl::Output
  667         -
                        >,
  668         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  669         -
                            RestJsonExtras<L>,
  670         -
                            crate::operation_shape::HttpEnumPayload2,
  671         -
                            <
  672         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  673         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  674         -
                                    RestJsonExtras<L>,
  675         -
                                    crate::operation_shape::HttpEnumPayload2,
  676         -
                                    ModelPl::Output
  677         -
                                >
  678         -
                            >::Output
  679         -
                        >,
  680         -
  681         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  682         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  683         -
  684         -
                    {
  685         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  686         -
        use ::aws_smithy_http_server::plugin::Plugin;
  687         -
        let svc = crate::operation_shape::HttpEnumPayload2::from_handler(handler);
  688         -
        let svc = self.model_plugin.apply(svc);
  689         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  690         -
            .apply(svc);
  691         -
        let svc = self.http_plugin.apply(svc);
  692         -
        self.http_enum_payload2_custom(svc)
  693         -
    }
  694         -
  695         -
    /// Sets the [`HttpEnumPayload2`](crate::operation_shape::HttpEnumPayload2) operation.
  696         -
    ///
  697         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  698         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  699         -
    ///
  700         -
    /// # Example
  701         -
    ///
  702         -
    /// ```no_run
  703         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  704         -
    ///
  705         -
    /// use rest_json_extras::{input, output, error};
  706         -
    ///
  707         -
    /// async fn handler(input: input::HttpEnumPayload2Input) -> Result<output::HttpEnumPayload2Output, error::HttpEnumPayload2Error> {
  708         -
    ///     todo!()
  709         -
    /// }
  710         -
    ///
  711         -
    /// let config = RestJsonExtrasConfig::builder().build();
  712         -
    /// let svc = ::tower::util::service_fn(handler);
  713         -
    /// let app = RestJsonExtras::builder(config)
  714         -
    ///     .http_enum_payload2_service(svc)
  715         -
    ///     /* Set other handlers */
  716         -
    ///     .build()
  717         -
    ///     .unwrap();
  718         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  719         -
    /// ```
  720         -
    ///
  721         -
                    pub fn http_enum_payload2_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  722         -
                    where
  723         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpEnumPayload2, ServiceExtractors>,
  724         -
  725         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  726         -
                            RestJsonExtras<L>,
  727         -
                            crate::operation_shape::HttpEnumPayload2,
  728         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpEnumPayload2, S>
  729         -
                        >,
  730         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  731         -
                            RestJsonExtras<L>,
  732         -
                            crate::operation_shape::HttpEnumPayload2,
  733         -
                            ModelPl::Output
  734         -
                        >,
  735         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  736         -
                            RestJsonExtras<L>,
  737         -
                            crate::operation_shape::HttpEnumPayload2,
  738         -
                            <
  739         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  740         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  741         -
                                    RestJsonExtras<L>,
  742         -
                                    crate::operation_shape::HttpEnumPayload2,
  743         -
                                    ModelPl::Output
  744         -
                                >
  745         -
                            >::Output
  746         -
                        >,
  747         -
  748         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  749         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  750         -
  751         -
                    {
  752         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  753         -
        use ::aws_smithy_http_server::plugin::Plugin;
  754         -
        let svc = crate::operation_shape::HttpEnumPayload2::from_service(service);
  755         -
        let svc = self.model_plugin.apply(svc);
  756         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  757         -
            .apply(svc);
  758         -
        let svc = self.http_plugin.apply(svc);
  759         -
        self.http_enum_payload2_custom(svc)
  760         -
    }
  761         -
  762         -
    /// Sets the [`HttpEnumPayload2`](crate::operation_shape::HttpEnumPayload2) to a custom [`Service`](tower::Service).
  763         -
    /// not constrained by the Smithy contract.
  764         -
    fn http_enum_payload2_custom<S>(mut self, svc: S) -> Self
  765         -
    where
  766         -
        S: ::tower::Service<
  767         -
                ::http::Request<Body>,
  768         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
  769         -
                Error = ::std::convert::Infallible,
  770         -
            > + Clone
  771         -
            + Send
  772         -
            + 'static,
  773         -
        S::Future: Send + 'static,
  774         -
    {
  775         -
        self.http_enum_payload2 = Some(::aws_smithy_http_server::routing::Route::new(svc));
  776         -
        self
  777         -
    }
  778         -
  779         -
    /// Sets the [`HttpPayloadTraits2`](crate::operation_shape::HttpPayloadTraits2) operation.
  780         -
    ///
  781         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  782         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  783         -
    ///
  784         -
    /// # Example
  785         -
    ///
  786         -
    /// ```no_run
  787         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  788         -
    ///
  789         -
    /// use rest_json_extras::{input, output, error};
  790         -
    ///
  791         -
    /// async fn handler(input: input::HttpPayloadTraits2Input) -> Result<output::HttpPayloadTraits2Output, error::HttpPayloadTraits2Error> {
  792         -
    ///     todo!()
  793         -
    /// }
  794         -
    ///
  795         -
    /// let config = RestJsonExtrasConfig::builder().build();
  796         -
    /// let app = RestJsonExtras::builder(config)
  797         -
    ///     .http_payload_traits2(handler)
  798         -
    ///     /* Set other handlers */
  799         -
    ///     .build()
  800         -
    ///     .unwrap();
  801         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  802         -
    /// ```
  803         -
    ///
  804         -
                    pub fn http_payload_traits2<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  805         -
                    where
  806         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraits2, HandlerExtractors>,
  807         -
  808         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  809         -
                            RestJsonExtras<L>,
  810         -
                            crate::operation_shape::HttpPayloadTraits2,
  811         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraits2, HandlerType>
  812         -
                        >,
  813         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  814         -
                            RestJsonExtras<L>,
  815         -
                            crate::operation_shape::HttpPayloadTraits2,
  816         -
                            ModelPl::Output
  817         -
                        >,
  818         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  819         -
                            RestJsonExtras<L>,
  820         -
                            crate::operation_shape::HttpPayloadTraits2,
  821         -
                            <
  822         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  823         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  824         -
                                    RestJsonExtras<L>,
  825         -
                                    crate::operation_shape::HttpPayloadTraits2,
  826         -
                                    ModelPl::Output
  827         -
                                >
  828         -
                            >::Output
  829         -
                        >,
  830         -
  831         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  832         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  833         -
  834         -
                    {
  835         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  836         -
        use ::aws_smithy_http_server::plugin::Plugin;
  837         -
        let svc = crate::operation_shape::HttpPayloadTraits2::from_handler(handler);
  838         -
        let svc = self.model_plugin.apply(svc);
  839         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  840         -
            .apply(svc);
  841         -
        let svc = self.http_plugin.apply(svc);
  842         -
        self.http_payload_traits2_custom(svc)
  843         -
    }
  844         -
  845         -
    /// Sets the [`HttpPayloadTraits2`](crate::operation_shape::HttpPayloadTraits2) operation.
  846         -
    ///
  847         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  848         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  849         -
    ///
  850         -
    /// # Example
  851         -
    ///
  852         -
    /// ```no_run
  853         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  854         -
    ///
  855         -
    /// use rest_json_extras::{input, output, error};
  856         -
    ///
  857         -
    /// async fn handler(input: input::HttpPayloadTraits2Input) -> Result<output::HttpPayloadTraits2Output, error::HttpPayloadTraits2Error> {
  858         -
    ///     todo!()
  859         -
    /// }
  860         -
    ///
  861         -
    /// let config = RestJsonExtrasConfig::builder().build();
  862         -
    /// let svc = ::tower::util::service_fn(handler);
  863         -
    /// let app = RestJsonExtras::builder(config)
  864         -
    ///     .http_payload_traits2_service(svc)
  865         -
    ///     /* Set other handlers */
  866         -
    ///     .build()
  867         -
    ///     .unwrap();
  868         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  869         -
    /// ```
  870         -
    ///
  871         -
                    pub fn http_payload_traits2_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  872         -
                    where
  873         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraits2, ServiceExtractors>,
  874         -
  875         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  876         -
                            RestJsonExtras<L>,
  877         -
                            crate::operation_shape::HttpPayloadTraits2,
  878         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraits2, S>
  879         -
                        >,
  880         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  881         -
                            RestJsonExtras<L>,
  882         -
                            crate::operation_shape::HttpPayloadTraits2,
  883         -
                            ModelPl::Output
  884         -
                        >,
  885         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  886         -
                            RestJsonExtras<L>,
  887         -
                            crate::operation_shape::HttpPayloadTraits2,
  888         -
                            <
  889         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  890         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  891         -
                                    RestJsonExtras<L>,
  892         -
                                    crate::operation_shape::HttpPayloadTraits2,
  893         -
                                    ModelPl::Output
  894         -
                                >
  895         -
                            >::Output
  896         -
                        >,
  897         -
  898         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  899         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  900         -
  901         -
                    {
  902         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  903         -
        use ::aws_smithy_http_server::plugin::Plugin;
  904         -
        let svc = crate::operation_shape::HttpPayloadTraits2::from_service(service);
  905         -
        let svc = self.model_plugin.apply(svc);
  906         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  907         -
            .apply(svc);
  908         -
        let svc = self.http_plugin.apply(svc);
  909         -
        self.http_payload_traits2_custom(svc)
  910         -
    }
  911         -
  912         -
    /// Sets the [`HttpPayloadTraits2`](crate::operation_shape::HttpPayloadTraits2) to a custom [`Service`](tower::Service).
  913         -
    /// not constrained by the Smithy contract.
  914         -
    fn http_payload_traits2_custom<S>(mut self, svc: S) -> Self
  915         -
    where
  916         -
        S: ::tower::Service<
  917         -
                ::http::Request<Body>,
  918         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
  919         -
                Error = ::std::convert::Infallible,
  920         -
            > + Clone
  921         -
            + Send
  922         -
            + 'static,
  923         -
        S::Future: Send + 'static,
  924         -
    {
  925         -
        self.http_payload_traits2 = Some(::aws_smithy_http_server::routing::Route::new(svc));
  926         -
        self
  927         -
    }
  928         -
  929         -
    /// Sets the [`HttpStringPayload2`](crate::operation_shape::HttpStringPayload2) operation.
  930         -
    ///
  931         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  932         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  933         -
    ///
  934         -
    /// # Example
  935         -
    ///
  936         -
    /// ```no_run
  937         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  938         -
    ///
  939         -
    /// use rest_json_extras::{input, output, error};
  940         -
    ///
  941         -
    /// async fn handler(input: input::HttpStringPayload2Input) -> Result<output::HttpStringPayload2Output, error::HttpStringPayload2Error> {
  942         -
    ///     todo!()
  943         -
    /// }
  944         -
    ///
  945         -
    /// let config = RestJsonExtrasConfig::builder().build();
  946         -
    /// let app = RestJsonExtras::builder(config)
  947         -
    ///     .http_string_payload2(handler)
  948         -
    ///     /* Set other handlers */
  949         -
    ///     .build()
  950         -
    ///     .unwrap();
  951         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  952         -
    /// ```
  953         -
    ///
  954         -
                    pub fn http_string_payload2<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  955         -
                    where
  956         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpStringPayload2, HandlerExtractors>,
  957         -
  958         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  959         -
                            RestJsonExtras<L>,
  960         -
                            crate::operation_shape::HttpStringPayload2,
  961         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpStringPayload2, HandlerType>
  962         -
                        >,
  963         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  964         -
                            RestJsonExtras<L>,
  965         -
                            crate::operation_shape::HttpStringPayload2,
  966         -
                            ModelPl::Output
  967         -
                        >,
  968         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  969         -
                            RestJsonExtras<L>,
  970         -
                            crate::operation_shape::HttpStringPayload2,
  971         -
                            <
  972         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  973         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  974         -
                                    RestJsonExtras<L>,
  975         -
                                    crate::operation_shape::HttpStringPayload2,
  976         -
                                    ModelPl::Output
  977         -
                                >
  978         -
                            >::Output
  979         -
                        >,
  980         -
  981         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  982         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  983         -
  984         -
                    {
  985         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  986         -
        use ::aws_smithy_http_server::plugin::Plugin;
  987         -
        let svc = crate::operation_shape::HttpStringPayload2::from_handler(handler);
  988         -
        let svc = self.model_plugin.apply(svc);
  989         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  990         -
            .apply(svc);
  991         -
        let svc = self.http_plugin.apply(svc);
  992         -
        self.http_string_payload2_custom(svc)
  993         -
    }
  994         -
  995         -
    /// Sets the [`HttpStringPayload2`](crate::operation_shape::HttpStringPayload2) operation.
  996         -
    ///
  997         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  998         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  999         -
    ///
 1000         -
    /// # Example
 1001         -
    ///
 1002         -
    /// ```no_run
 1003         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
 1004         -
    ///
 1005         -
    /// use rest_json_extras::{input, output, error};
 1006         -
    ///
 1007         -
    /// async fn handler(input: input::HttpStringPayload2Input) -> Result<output::HttpStringPayload2Output, error::HttpStringPayload2Error> {
 1008         -
    ///     todo!()
 1009         -
    /// }
 1010         -
    ///
 1011         -
    /// let config = RestJsonExtrasConfig::builder().build();
 1012         -
    /// let svc = ::tower::util::service_fn(handler);
 1013         -
    /// let app = RestJsonExtras::builder(config)
 1014         -
    ///     .http_string_payload2_service(svc)
 1015         -
    ///     /* Set other handlers */
 1016         -
    ///     .build()
 1017         -
    ///     .unwrap();
 1018         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
 1019         -
    /// ```
 1020         -
    ///
 1021         -
                    pub fn http_string_payload2_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
 1022         -
                    where
 1023         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpStringPayload2, ServiceExtractors>,
 1024         -
 1025         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
 1026         -
                            RestJsonExtras<L>,
 1027         -
                            crate::operation_shape::HttpStringPayload2,
 1028         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpStringPayload2, S>
 1029         -
                        >,
 1030         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
 1031         -
                            RestJsonExtras<L>,
 1032         -
                            crate::operation_shape::HttpStringPayload2,
 1033         -
                            ModelPl::Output
 1034         -
                        >,
 1035         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
 1036         -
                            RestJsonExtras<L>,
 1037         -
                            crate::operation_shape::HttpStringPayload2,
 1038         -
                            <
 1039         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1040         -
                                as ::aws_smithy_http_server::plugin::Plugin<
 1041         -
                                    RestJsonExtras<L>,
 1042         -
                                    crate::operation_shape::HttpStringPayload2,
 1043         -
                                    ModelPl::Output
 1044         -
                                >
 1045         -
                            >::Output
 1046         -
                        >,
 1047         -
 1048         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1049         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
 1050         -
 1051         -
                    {
 1052         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1053         -
        use ::aws_smithy_http_server::plugin::Plugin;
 1054         -
        let svc = crate::operation_shape::HttpStringPayload2::from_service(service);
 1055         -
        let svc = self.model_plugin.apply(svc);
 1056         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1057         -
            .apply(svc);
 1058         -
        let svc = self.http_plugin.apply(svc);
 1059         -
        self.http_string_payload2_custom(svc)
 1060         -
    }
 1061         -
 1062         -
    /// Sets the [`HttpStringPayload2`](crate::operation_shape::HttpStringPayload2) to a custom [`Service`](tower::Service).
 1063         -
    /// not constrained by the Smithy contract.
 1064         -
    fn http_string_payload2_custom<S>(mut self, svc: S) -> Self
 1065         -
    where
 1066         -
        S: ::tower::Service<
 1067         -
                ::http::Request<Body>,
 1068         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
 1069         -
                Error = ::std::convert::Infallible,
 1070         -
            > + Clone
 1071         -
            + Send
 1072         -
            + 'static,
 1073         -
        S::Future: Send + 'static,
 1074         -
    {
 1075         -
        self.http_string_payload2 = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1076         -
        self
 1077         -
    }
 1078         -
 1079         -
    /// Sets the [`MalformedContentTypeWithBody2`](crate::operation_shape::MalformedContentTypeWithBody2) operation.
 1080         -
    ///
 1081         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
 1082         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
 1083         -
    ///
 1084         -
    /// # Example
 1085         -
    ///
 1086         -
    /// ```no_run
 1087         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
 1088         -
    ///
 1089         -
    /// use rest_json_extras::{input, output, error};
 1090         -
    ///
 1091         -
    /// async fn handler(input: input::MalformedContentTypeWithBody2Input) -> Result<output::MalformedContentTypeWithBody2Output, error::MalformedContentTypeWithBody2Error> {
 1092         -
    ///     todo!()
 1093         -
    /// }
 1094         -
    ///
 1095         -
    /// let config = RestJsonExtrasConfig::builder().build();
 1096         -
    /// let app = RestJsonExtras::builder(config)
 1097         -
    ///     .malformed_content_type_with_body2(handler)
 1098         -
    ///     /* Set other handlers */
 1099         -
    ///     .build()
 1100         -
    ///     .unwrap();
 1101         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
 1102         -
    /// ```
 1103         -
    ///
 1104         -
                    pub fn malformed_content_type_with_body2<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
 1105         -
                    where
 1106         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithBody2, HandlerExtractors>,
 1107         -
 1108         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
 1109         -
                            RestJsonExtras<L>,
 1110         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1111         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithBody2, HandlerType>
 1112         -
                        >,
 1113         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
 1114         -
                            RestJsonExtras<L>,
 1115         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1116         -
                            ModelPl::Output
 1117         -
                        >,
 1118         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
 1119         -
                            RestJsonExtras<L>,
 1120         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1121         -
                            <
 1122         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1123         -
                                as ::aws_smithy_http_server::plugin::Plugin<
 1124         -
                                    RestJsonExtras<L>,
 1125         -
                                    crate::operation_shape::MalformedContentTypeWithBody2,
 1126         -
                                    ModelPl::Output
 1127         -
                                >
 1128         -
                            >::Output
 1129         -
                        >,
 1130         -
 1131         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1132         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
 1133         -
 1134         -
                    {
 1135         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1136         -
        use ::aws_smithy_http_server::plugin::Plugin;
 1137         -
        let svc = crate::operation_shape::MalformedContentTypeWithBody2::from_handler(handler);
 1138         -
        let svc = self.model_plugin.apply(svc);
 1139         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1140         -
            .apply(svc);
 1141         -
        let svc = self.http_plugin.apply(svc);
 1142         -
        self.malformed_content_type_with_body2_custom(svc)
 1143         -
    }
 1144         -
 1145         -
    /// Sets the [`MalformedContentTypeWithBody2`](crate::operation_shape::MalformedContentTypeWithBody2) operation.
 1146         -
    ///
 1147         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
 1148         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
 1149         -
    ///
 1150         -
    /// # Example
 1151         -
    ///
 1152         -
    /// ```no_run
 1153         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
 1154         -
    ///
 1155         -
    /// use rest_json_extras::{input, output, error};
 1156         -
    ///
 1157         -
    /// async fn handler(input: input::MalformedContentTypeWithBody2Input) -> Result<output::MalformedContentTypeWithBody2Output, error::MalformedContentTypeWithBody2Error> {
 1158         -
    ///     todo!()
 1159         -
    /// }
 1160         -
    ///
 1161         -
    /// let config = RestJsonExtrasConfig::builder().build();
 1162         -
    /// let svc = ::tower::util::service_fn(handler);
 1163         -
    /// let app = RestJsonExtras::builder(config)
 1164         -
    ///     .malformed_content_type_with_body2_service(svc)
 1165         -
    ///     /* Set other handlers */
 1166         -
    ///     .build()
 1167         -
    ///     .unwrap();
 1168         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
 1169         -
    /// ```
 1170         -
    ///
 1171         -
                    pub fn malformed_content_type_with_body2_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
 1172         -
                    where
 1173         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithBody2, ServiceExtractors>,
 1174         -
 1175         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
 1176         -
                            RestJsonExtras<L>,
 1177         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1178         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithBody2, S>
 1179         -
                        >,
 1180         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
 1181         -
                            RestJsonExtras<L>,
 1182         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1183         -
                            ModelPl::Output
 1184         -
                        >,
 1185         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
 1186         -
                            RestJsonExtras<L>,
 1187         -
                            crate::operation_shape::MalformedContentTypeWithBody2,
 1188         -
                            <
 1189         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1190         -
                                as ::aws_smithy_http_server::plugin::Plugin<
 1191         -
                                    RestJsonExtras<L>,
 1192         -
                                    crate::operation_shape::MalformedContentTypeWithBody2,
 1193         -
                                    ModelPl::Output
 1194         -
                                >
 1195         -
                            >::Output
 1196         -
                        >,
 1197         -
 1198         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1199         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
 1200         -
 1201         -
                    {
 1202         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1203         -
        use ::aws_smithy_http_server::plugin::Plugin;
 1204         -
        let svc = crate::operation_shape::MalformedContentTypeWithBody2::from_service(service);
 1205         -
        let svc = self.model_plugin.apply(svc);
 1206         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1207         -
            .apply(svc);
 1208         -
        let svc = self.http_plugin.apply(svc);
 1209         -
        self.malformed_content_type_with_body2_custom(svc)
 1210         -
    }
 1211         -
 1212         -
    /// Sets the [`MalformedContentTypeWithBody2`](crate::operation_shape::MalformedContentTypeWithBody2) to a custom [`Service`](tower::Service).
 1213         -
    /// not constrained by the Smithy contract.
 1214         -
    fn malformed_content_type_with_body2_custom<S>(mut self, svc: S) -> Self
 1215         -
    where
 1216         -
        S: ::tower::Service<
 1217         -
                ::http::Request<Body>,
 1218         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
 1219         -
                Error = ::std::convert::Infallible,
 1220         -
            > + Clone
 1221         -
            + Send
 1222         -
            + 'static,
 1223         -
        S::Future: Send + 'static,
 1224         -
    {
 1225         -
        self.malformed_content_type_with_body2 =
 1226         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
 1227         -
        self
 1228         -
    }
 1229         -
 1230    625   
    /// Sets the [`MapWithEnumKeyOp`](crate::operation_shape::MapWithEnumKeyOp) operation.
 1231    626   
    ///
 1232    627   
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
 1233    628   
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
 1234    629   
    ///
 1235    630   
    /// # Example
 1236    631   
    ///
 1237    632   
    /// ```no_run
 1238    633   
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
 1239    634   
    ///
@@ -2297,1692 +2380,1751 @@
 2317   1712   
            if self.enum_query.is_none() {
 2318   1713   
                missing_operation_names
 2319   1714   
                    .insert(crate::operation_shape::EnumQuery::ID, ".enum_query()");
 2320   1715   
            }
 2321   1716   
            if self.escaped_string_values.is_none() {
 2322   1717   
                missing_operation_names.insert(
 2323   1718   
                    crate::operation_shape::EscapedStringValues::ID,
 2324   1719   
                    ".escaped_string_values()",
 2325   1720   
                );
 2326   1721   
            }
 2327         -
            if self.http_enum_payload2.is_none() {
 2328         -
                missing_operation_names.insert(
 2329         -
                    crate::operation_shape::HttpEnumPayload2::ID,
 2330         -
                    ".http_enum_payload2()",
 2331         -
                );
 2332         -
            }
 2333         -
            if self.http_payload_traits2.is_none() {
 2334         -
                missing_operation_names.insert(
 2335         -
                    crate::operation_shape::HttpPayloadTraits2::ID,
 2336         -
                    ".http_payload_traits2()",
 2337         -
                );
 2338         -
            }
 2339         -
            if self.http_string_payload2.is_none() {
 2340         -
                missing_operation_names.insert(
 2341         -
                    crate::operation_shape::HttpStringPayload2::ID,
 2342         -
                    ".http_string_payload2()",
 2343         -
                );
 2344         -
            }
 2345         -
            if self.malformed_content_type_with_body2.is_none() {
 2346         -
                missing_operation_names.insert(
 2347         -
                    crate::operation_shape::MalformedContentTypeWithBody2::ID,
 2348         -
                    ".malformed_content_type_with_body2()",
 2349         -
                );
 2350         -
            }
 2351   1722   
            if self.map_with_enum_key_op.is_none() {
 2352   1723   
                missing_operation_names.insert(
 2353   1724   
                    crate::operation_shape::MapWithEnumKeyOp::ID,
 2354   1725   
                    ".map_with_enum_key_op()",
 2355   1726   
                );
 2356   1727   
            }
 2357   1728   
            if self.null_in_non_sparse.is_none() {
 2358   1729   
                missing_operation_names.insert(
 2359   1730   
                    crate::operation_shape::NullInNonSparse::ID,
 2360   1731   
                    ".null_in_non_sparse()",
@@ -2389,1760 +2465,1819 @@
 2409   1780   
                        .expect(unexpected_error_msg),
 2410   1781   
                ),
 2411   1782   
                (
 2412   1783   
                    request_specs::enum_query(),
 2413   1784   
                    self.enum_query.expect(unexpected_error_msg),
 2414   1785   
                ),
 2415   1786   
                (
 2416   1787   
                    request_specs::escaped_string_values(),
 2417   1788   
                    self.escaped_string_values.expect(unexpected_error_msg),
 2418   1789   
                ),
 2419         -
                (
 2420         -
                    request_specs::http_enum_payload2(),
 2421         -
                    self.http_enum_payload2.expect(unexpected_error_msg),
 2422         -
                ),
 2423         -
                (
 2424         -
                    request_specs::http_payload_traits2(),
 2425         -
                    self.http_payload_traits2.expect(unexpected_error_msg),
 2426         -
                ),
 2427         -
                (
 2428         -
                    request_specs::http_string_payload2(),
 2429         -
                    self.http_string_payload2.expect(unexpected_error_msg),
 2430         -
                ),
 2431         -
                (
 2432         -
                    request_specs::malformed_content_type_with_body2(),
 2433         -
                    self.malformed_content_type_with_body2
 2434         -
                        .expect(unexpected_error_msg),
 2435         -
                ),
 2436   1790   
                (
 2437   1791   
                    request_specs::map_with_enum_key_op(),
 2438   1792   
                    self.map_with_enum_key_op.expect(unexpected_error_msg),
 2439   1793   
                ),
 2440   1794   
                (
 2441   1795   
                    request_specs::null_in_non_sparse(),
 2442   1796   
                    self.null_in_non_sparse.expect(unexpected_error_msg),
 2443   1797   
                ),
 2444   1798   
                (
 2445   1799   
                    request_specs::primitive_int_header(),
@@ -2496,1850 +2591,1909 @@
 2516   1870   
            ),
 2517   1871   
            (
 2518   1872   
                request_specs::escaped_string_values(),
 2519   1873   
                self.escaped_string_values.unwrap_or_else(|| {
 2520   1874   
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2521   1875   
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2522   1876   
                    >::default();
 2523   1877   
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2524   1878   
                }),
 2525   1879   
            ),
 2526         -
            (
 2527         -
                request_specs::http_enum_payload2(),
 2528         -
                self.http_enum_payload2.unwrap_or_else(|| {
 2529         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2530         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2531         -
                    >::default();
 2532         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2533         -
                }),
 2534         -
            ),
 2535         -
            (
 2536         -
                request_specs::http_payload_traits2(),
 2537         -
                self.http_payload_traits2.unwrap_or_else(|| {
 2538         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2539         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2540         -
                    >::default();
 2541         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2542         -
                }),
 2543         -
            ),
 2544         -
            (
 2545         -
                request_specs::http_string_payload2(),
 2546         -
                self.http_string_payload2.unwrap_or_else(|| {
 2547         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2548         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2549         -
                    >::default();
 2550         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2551         -
                }),
 2552         -
            ),
 2553         -
            (
 2554         -
                request_specs::malformed_content_type_with_body2(),
 2555         -
                self.malformed_content_type_with_body2.unwrap_or_else(|| {
 2556         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2557         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2558         -
                    >::default();
 2559         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2560         -
                }),
 2561         -
            ),
 2562   1880   
            (
 2563   1881   
                request_specs::map_with_enum_key_op(),
 2564   1882   
                self.map_with_enum_key_op.unwrap_or_else(|| {
 2565   1883   
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2566   1884   
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2567   1885   
                    >::default();
 2568   1886   
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2569   1887   
                }),
 2570   1888   
            ),
 2571   1889   
            (
@@ -2690,2008 +2809,2067 @@
 2710   2028   
    pub(super) fn escaped_string_values(
 2711   2029   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2712   2030   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2713   2031   
                    ::http::Method::POST,
 2714   2032   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2715   2033   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2716   2034   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2717   2035   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("escaped-string-values")),
 2718   2036   
]),
 2719   2037   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2720         -
])
 2721         -
                        )
 2722         -
                    ),
 2723         -
                )
 2724         -
    }
 2725         -
    pub(super) fn http_enum_payload2(
 2726         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2727         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2728         -
                    ::http::Method::POST,
 2729         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2730         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2731         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2732         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("EnumPayload2")),
 2733         -
]),
 2734         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2735         -
])
 2736         -
                        )
 2737         -
                    ),
 2738         -
                )
 2739         -
    }
 2740         -
    pub(super) fn http_payload_traits2(
 2741         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2742         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2743         -
                    ::http::Method::POST,
 2744         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2745         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2746         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2747         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("HttpPayloadTraits")),
 2748         -
]),
 2749         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2750         -
])
 2751         -
                        )
 2752         -
                    ),
 2753         -
                )
 2754         -
    }
 2755         -
    pub(super) fn http_string_payload2(
 2756         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2757         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2758         -
                    ::http::Method::POST,
 2759         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2760         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2761         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2762         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("StringPayload2")),
 2763         -
]),
 2764         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2765         -
])
 2766         -
                        )
 2767         -
                    ),
 2768         -
                )
 2769         -
    }
 2770         -
    pub(super) fn malformed_content_type_with_body2(
 2771         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2772         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2773         -
                    ::http::Method::POST,
 2774         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2775         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2776         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2777         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("MalformedContentTypeWithBody")),
 2778         -
]),
 2779         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2780   2038   
])
 2781   2039   
                        )
 2782   2040   
                    ),
 2783   2041   
                )
 2784   2042   
    }
 2785   2043   
    pub(super) fn map_with_enum_key_op(
 2786   2044   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2787   2045   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2788   2046   
                    ::http::Method::POST,
 2789   2047   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
@@ -2893,2151 +2998,2248 @@
 2913   2171   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 2914   2172   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 2915   2173   
    >(
 2916   2174   
        config: RestJsonExtrasConfig<L, HttpPl, ModelPl>,
 2917   2175   
    ) -> RestJsonExtrasBuilder<Body, L, HttpPl, ModelPl> {
 2918   2176   
        RestJsonExtrasBuilder {
 2919   2177   
            case_insensitive_error_operation: None,
 2920   2178   
            empty_struct_with_content_on_wire_op: None,
 2921   2179   
            enum_query: None,
 2922   2180   
            escaped_string_values: None,
 2923         -
            http_enum_payload2: None,
 2924         -
            http_payload_traits2: None,
 2925         -
            http_string_payload2: None,
 2926         -
            malformed_content_type_with_body2: None,
 2927   2181   
            map_with_enum_key_op: None,
 2928   2182   
            null_in_non_sparse: None,
 2929   2183   
            primitive_int_header: None,
 2930   2184   
            primitive_int_op: None,
 2931   2185   
            query_precedence: None,
 2932   2186   
            status_response: None,
 2933   2187   
            string_payload: None,
 2934   2188   
            layer: config.layers,
 2935   2189   
            http_plugin: config.http_plugins,
 2936   2190   
            model_plugin: config.model_plugins,
 2937   2191   
        }
 2938   2192   
    }
 2939   2193   
 2940   2194   
    /// Constructs a builder for [`RestJsonExtras`].
 2941   2195   
    /// You must specify what plugins should be applied to the operations in this service.
 2942   2196   
    ///
 2943   2197   
    /// Use [`RestJsonExtras::builder_without_plugins`] if you don't need to apply plugins.
 2944   2198   
    ///
 2945   2199   
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
 2946   2200   
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
 2947   2201   
    /// multiple plugins.
 2948   2202   
    #[deprecated(
 2949   2203   
        since = "0.57.0",
 2950   2204   
        note = "please use the `builder` constructor and register plugins on the `RestJsonExtrasConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 2951   2205   
    )]
 2952   2206   
    pub fn builder_with_plugins<
 2953   2207   
        Body,
 2954   2208   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 2955   2209   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 2956   2210   
    >(
 2957   2211   
        http_plugin: HttpPl,
 2958   2212   
        model_plugin: ModelPl,
 2959   2213   
    ) -> RestJsonExtrasBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
 2960   2214   
        RestJsonExtrasBuilder {
 2961   2215   
            case_insensitive_error_operation: None,
 2962   2216   
            empty_struct_with_content_on_wire_op: None,
 2963   2217   
            enum_query: None,
 2964   2218   
            escaped_string_values: None,
 2965         -
            http_enum_payload2: None,
 2966         -
            http_payload_traits2: None,
 2967         -
            http_string_payload2: None,
 2968         -
            malformed_content_type_with_body2: None,
 2969   2219   
            map_with_enum_key_op: None,
 2970   2220   
            null_in_non_sparse: None,
 2971   2221   
            primitive_int_header: None,
 2972   2222   
            primitive_int_op: None,
 2973   2223   
            query_precedence: None,
 2974   2224   
            status_response: None,
 2975   2225   
            string_payload: None,
 2976   2226   
            layer: ::tower::layer::util::Identity::new(),
 2977   2227   
            http_plugin,
 2978   2228   
            model_plugin,
@@ -3072,2322 +3194,2418 @@
 3092   2342   
}
 3093   2343   
 3094   2344   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in RestJsonExtras.
 3095   2345   
#[allow(clippy::enum_variant_names)]
 3096   2346   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
 3097   2347   
pub enum Operation {
 3098   2348   
    CaseInsensitiveErrorOperation,
 3099   2349   
    EmptyStructWithContentOnWireOp,
 3100   2350   
    EnumQuery,
 3101   2351   
    EscapedStringValues,
 3102         -
    HttpEnumPayload2,
 3103         -
    HttpPayloadTraits2,
 3104         -
    HttpStringPayload2,
 3105         -
    MalformedContentTypeWithBody2,
 3106   2352   
    MapWithEnumKeyOp,
 3107   2353   
    NullInNonSparse,
 3108   2354   
    PrimitiveIntHeader,
 3109   2355   
    PrimitiveIntOp,
 3110   2356   
    QueryPrecedence,
 3111   2357   
    StatusResponse,
 3112   2358   
    StringPayload,
 3113   2359   
}
 3114   2360   
 3115   2361   
impl Operation {
 3116   2362   
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
 3117   2363   
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
 3118   2364   
        match self {
 3119   2365   
            Operation::CaseInsensitiveErrorOperation => {
 3120   2366   
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 3121   2367   
                    "aws.protocoltests.restjson#CaseInsensitiveErrorOperation",
 3122   2368   
                    "aws.protocoltests.restjson",
 3123   2369   
                    "CaseInsensitiveErrorOperation",
 3124   2370   
                )
 3125   2371   
            }
 3126   2372   
            Operation::EmptyStructWithContentOnWireOp => {
 3127   2373   
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 3128   2374   
                    "aws.protocoltests.restjson#EmptyStructWithContentOnWireOp",
 3129   2375   
                    "aws.protocoltests.restjson",
 3130   2376   
                    "EmptyStructWithContentOnWireOp",
 3131   2377   
                )
 3132   2378   
            }
 3133   2379   
            Operation::EnumQuery => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3134   2380   
                "aws.protocoltests.restjson#EnumQuery",
 3135   2381   
                "aws.protocoltests.restjson",
 3136   2382   
                "EnumQuery",
 3137   2383   
            ),
 3138   2384   
            Operation::EscapedStringValues => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3139   2385   
                "aws.protocoltests.restjson#EscapedStringValues",
 3140   2386   
                "aws.protocoltests.restjson",
 3141   2387   
                "EscapedStringValues",
 3142   2388   
            ),
 3143         -
            Operation::HttpEnumPayload2 => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3144         -
                "aws.protocoltests.restjson#HttpEnumPayload2",
 3145         -
                "aws.protocoltests.restjson",
 3146         -
                "HttpEnumPayload2",
 3147         -
            ),
 3148         -
            Operation::HttpPayloadTraits2 => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3149         -
                "aws.protocoltests.restjson#HttpPayloadTraits2",
 3150         -
                "aws.protocoltests.restjson",
 3151         -
                "HttpPayloadTraits2",
 3152         -
            ),
 3153         -
            Operation::HttpStringPayload2 => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3154         -
                "aws.protocoltests.restjson#HttpStringPayload2",
 3155         -
                "aws.protocoltests.restjson",
 3156         -
                "HttpStringPayload2",
 3157         -
            ),
 3158         -
            Operation::MalformedContentTypeWithBody2 => {
 3159         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 3160         -
                    "aws.protocoltests.restjson#MalformedContentTypeWithBody2",
 3161         -
                    "aws.protocoltests.restjson",
 3162         -
                    "MalformedContentTypeWithBody2",
 3163         -
                )
 3164         -
            }
 3165   2389   
            Operation::MapWithEnumKeyOp => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3166   2390   
                "aws.protocoltests.restjson#MapWithEnumKeyOp",
 3167   2391   
                "aws.protocoltests.restjson",
 3168   2392   
                "MapWithEnumKeyOp",
 3169   2393   
            ),
 3170   2394   
            Operation::NullInNonSparse => ::aws_smithy_http_server::shape_id::ShapeId::new(
 3171   2395   
                "aws.protocoltests.restjson#NullInNonSparse",
 3172   2396   
                "aws.protocoltests.restjson",
 3173   2397   
                "NullInNonSparse",
 3174   2398   
            ),
@@ -3199,2423 +3283,2482 @@
 3219   2443   
{
 3220   2444   
    const VALUE: Operation = Operation::EnumQuery;
 3221   2445   
}
 3222   2446   
impl<L>
 3223   2447   
    ::aws_smithy_http_server::service::ContainsOperation<
 3224   2448   
        crate::operation_shape::EscapedStringValues,
 3225   2449   
    > for RestJsonExtras<L>
 3226   2450   
{
 3227   2451   
    const VALUE: Operation = Operation::EscapedStringValues;
 3228   2452   
}
 3229         -
impl<L>
 3230         -
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::HttpEnumPayload2>
 3231         -
    for RestJsonExtras<L>
 3232         -
{
 3233         -
    const VALUE: Operation = Operation::HttpEnumPayload2;
 3234         -
}
 3235         -
impl<L>
 3236         -
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::HttpPayloadTraits2>
 3237         -
    for RestJsonExtras<L>
 3238         -
{
 3239         -
    const VALUE: Operation = Operation::HttpPayloadTraits2;
 3240         -
}
 3241         -
impl<L>
 3242         -
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::HttpStringPayload2>
 3243         -
    for RestJsonExtras<L>
 3244         -
{
 3245         -
    const VALUE: Operation = Operation::HttpStringPayload2;
 3246         -
}
 3247         -
impl<L>
 3248         -
    ::aws_smithy_http_server::service::ContainsOperation<
 3249         -
        crate::operation_shape::MalformedContentTypeWithBody2,
 3250         -
    > for RestJsonExtras<L>
 3251         -
{
 3252         -
    const VALUE: Operation = Operation::MalformedContentTypeWithBody2;
 3253         -
}
 3254   2453   
impl<L>
 3255   2454   
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::MapWithEnumKeyOp>
 3256   2455   
    for RestJsonExtras<L>
 3257   2456   
{
 3258   2457   
    const VALUE: Operation = Operation::MapWithEnumKeyOp;
 3259   2458   
}
 3260   2459   
impl<L>
 3261   2460   
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::NullInNonSparse>
 3262   2461   
    for RestJsonExtras<L>
 3263   2462   
{
@@ -3488,2687 +3583,2746 @@
 3508   2707   
 3509   2708   
                        // EscapedStringValues match found, pop from both `member` and `not_member`
 3510   2709   
                        (@ $ name: ident, $ contains: ident (EscapedStringValues $($ member: ident)*) ($($ temp: ident)*) (EscapedStringValues $($ not_member: ident)*)) => {
 3511   2710   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3512   2711   
                        };
 3513   2712   
                        // EscapedStringValues match not found, pop from `not_member` into `temp` stack
 3514   2713   
                        (@ $ name: ident, $ contains: ident (EscapedStringValues $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3515   2714   
                            scope! { @ $ name, $ contains (EscapedStringValues $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3516   2715   
                        };
 3517   2716   
 3518         -
                        // HttpEnumPayload2 match found, pop from both `member` and `not_member`
 3519         -
                        (@ $ name: ident, $ contains: ident (HttpEnumPayload2 $($ member: ident)*) ($($ temp: ident)*) (HttpEnumPayload2 $($ not_member: ident)*)) => {
 3520         -
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3521         -
                        };
 3522         -
                        // HttpEnumPayload2 match not found, pop from `not_member` into `temp` stack
 3523         -
                        (@ $ name: ident, $ contains: ident (HttpEnumPayload2 $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3524         -
                            scope! { @ $ name, $ contains (HttpEnumPayload2 $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3525         -
                        };
 3526         -
 3527         -
                        // HttpPayloadTraits2 match found, pop from both `member` and `not_member`
 3528         -
                        (@ $ name: ident, $ contains: ident (HttpPayloadTraits2 $($ member: ident)*) ($($ temp: ident)*) (HttpPayloadTraits2 $($ not_member: ident)*)) => {
 3529         -
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3530         -
                        };
 3531         -
                        // HttpPayloadTraits2 match not found, pop from `not_member` into `temp` stack
 3532         -
                        (@ $ name: ident, $ contains: ident (HttpPayloadTraits2 $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3533         -
                            scope! { @ $ name, $ contains (HttpPayloadTraits2 $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3534         -
                        };
 3535         -
 3536         -
                        // HttpStringPayload2 match found, pop from both `member` and `not_member`
 3537         -
                        (@ $ name: ident, $ contains: ident (HttpStringPayload2 $($ member: ident)*) ($($ temp: ident)*) (HttpStringPayload2 $($ not_member: ident)*)) => {
 3538         -
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3539         -
                        };
 3540         -
                        // HttpStringPayload2 match not found, pop from `not_member` into `temp` stack
 3541         -
                        (@ $ name: ident, $ contains: ident (HttpStringPayload2 $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3542         -
                            scope! { @ $ name, $ contains (HttpStringPayload2 $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3543         -
                        };
 3544         -
 3545         -
                        // MalformedContentTypeWithBody2 match found, pop from both `member` and `not_member`
 3546         -
                        (@ $ name: ident, $ contains: ident (MalformedContentTypeWithBody2 $($ member: ident)*) ($($ temp: ident)*) (MalformedContentTypeWithBody2 $($ not_member: ident)*)) => {
 3547         -
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3548         -
                        };
 3549         -
                        // MalformedContentTypeWithBody2 match not found, pop from `not_member` into `temp` stack
 3550         -
                        (@ $ name: ident, $ contains: ident (MalformedContentTypeWithBody2 $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3551         -
                            scope! { @ $ name, $ contains (MalformedContentTypeWithBody2 $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3552         -
                        };
 3553         -
 3554   2717   
                        // MapWithEnumKeyOp match found, pop from both `member` and `not_member`
 3555   2718   
                        (@ $ name: ident, $ contains: ident (MapWithEnumKeyOp $($ member: ident)*) ($($ temp: ident)*) (MapWithEnumKeyOp $($ not_member: ident)*)) => {
 3556   2719   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 3557   2720   
                        };
 3558   2721   
                        // MapWithEnumKeyOp match not found, pop from `not_member` into `temp` stack
 3559   2722   
                        (@ $ name: ident, $ contains: ident (MapWithEnumKeyOp $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 3560   2723   
                            scope! { @ $ name, $ contains (MapWithEnumKeyOp $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 3561   2724   
                        };
 3562   2725   
 3563   2726   
                        // NullInNonSparse match found, pop from both `member` and `not_member`
@@ -3601,2764 +3650,2813 @@
 3621   2784   
                        }
 3622   2785   
                    ) => {
 3623   2786   
                        use $ crate::operation_shape::*;
 3624   2787   
                        ::aws_smithy_http_server::scope! {
 3625   2788   
                            $(#[$ attrs])*
 3626   2789   
                            $ vis struct $ name {
 3627   2790   
                                includes: [$($ include),*],
 3628   2791   
                                excludes: []
 3629   2792   
                            }
 3630   2793   
                        }
 3631         -
                        scope! { @ $ name, False ($($ include)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues HttpEnumPayload2 HttpPayloadTraits2 HttpStringPayload2 MalformedContentTypeWithBody2 MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
        2794  +
                        scope! { @ $ name, False ($($ include)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
 3632   2795   
                    };
 3633   2796   
                    (
 3634   2797   
                        $(#[$ attrs:meta])*
 3635   2798   
                        $ vis:vis struct $ name:ident {
 3636   2799   
                            excludes: [$($ exclude:ident),*]
 3637   2800   
                        }
 3638   2801   
                    ) => {
 3639   2802   
                        use $ crate::operation_shape::*;
 3640   2803   
 3641   2804   
                        ::aws_smithy_http_server::scope! {
 3642   2805   
                            $(#[$ attrs])*
 3643   2806   
                            $ vis struct $ name {
 3644   2807   
                                includes: [],
 3645   2808   
                                excludes: [$($ exclude),*]
 3646   2809   
                            }
 3647   2810   
                        }
 3648         -
                        scope! { @ $ name, True ($($ exclude)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues HttpEnumPayload2 HttpPayloadTraits2 HttpStringPayload2 MalformedContentTypeWithBody2 MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
        2811  +
                        scope! { @ $ name, True ($($ exclude)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
 3649   2812   
                    };
 3650   2813   
                }