Server Test Python

Server Test Python

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/rust-server-codegen-python/Cargo.toml

@@ -1,1 +57,59 @@
    2      2   
[package]
    3      3   
name = "naming_test_casing"
    4      4   
version = "0.0.1"
    5      5   
authors = ["protocoltest@example.com"]
    6      6   
description = "test"
    7      7   
edition = "2021"
    8      8   
    9      9   
[package.metadata.smithy]
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#awsJson1_1"
   12         -
[dependencies.aws-smithy-http]
   13         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   14         -
[dependencies.aws-smithy-http-server]
   15         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server"
   16     12   
[dependencies.aws-smithy-http-server-python]
   17     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server-python"
   18     14   
[dependencies.aws-smithy-json]
   19     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
          16  +
[dependencies.aws-smithy-legacy-http]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          18  +
[dependencies.aws-smithy-legacy-http-server]
          19  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
   20     20   
[dependencies.aws-smithy-runtime-api]
   21     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          22  +
features = ["http-02x"]
   22     23   
[dependencies.aws-smithy-types]
   23     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          25  +
features = ["http-body-0-4-x"]
   24     26   
[dependencies.futures-util]
   25     27   
version = "0.3"
   26     28   
[dependencies.http]
   27     29   
version = "0.2.9"
   28     30   
[dependencies.mime]
   29     31   
version = "0.3"
   30     32   
[dependencies.parking_lot]
   31     33   
version = "0.12"
   32     34   
[dependencies.pin-project-lite]
   33     35   
version = "0.2"
   34     36   
[dependencies.pyo3]
   35     37   
version = "0.20"
   36     38   
[dependencies.pyo3-asyncio]
   37     39   
version = "0.20"
   38     40   
features = ["attributes", "tokio-runtime"]
   39     41   
[dependencies.tower]
   40     42   
version = "0.4"
   41     43   
[dependencies.tracing]
   42     44   
version = "0.1"
   43     45   
[dev-dependencies.hyper]
   44         -
version = "0.14.12"
          46  +
version = "0.14.26"
   45     47   
[dev-dependencies.tokio]
   46     48   
version = "1.23.1"
   47     49   
[features]
   48     50   
rt-tokio = ["aws-smithy-types/rt-tokio"]
   49         -
aws-lambda = ["aws-smithy-http-server/aws-lambda"]
   50         -
request-id = ["aws-smithy-http-server/request-id"]
          51  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          52  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
   51     53   
extension-module = ["pyo3/extension-module"]
   52     54   
default = ["rt-tokio", "request-id", "extension-module"]
   53     55   
[lib]
   54     56   
name = "naming_test_casing"
   55     57   
crate-type = ["cdylib"]
   56     58   
   57     59   

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/rust-server-codegen-python/python/naming_test_casing/middleware/__init__.pyi

@@ -1,1 +38,38 @@
    1      1   
import typing
    2      2   
    3      3   
class MiddlewareException(Exception):
    4      4   
    """
    5      5   
    Exception that can be thrown from a Python middleware.
    6      6   
    7      7   
    It allows to specify a message and HTTP status code and implementing protocol specific capabilities
    8         -
    to build a [aws_smithy_http_server::response::Response] from it.
           8  +
    to build a [aws_smithy_legacy_http_server::response::Response] from it.
    9      9   
    """
   10     10   
   11     11   
    message: str
   12     12   
   13     13   
    status_code: int
   14     14   
   15     15   
    def __init__(self, message: str, status_code: typing.Optional[int] = ...) -> None:
   16     16   
        ...
   17     17   
   18     18   

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

@@ -29,29 +128,129 @@
   49     49   
//!
   50     50   
//! # let app = AcronymInsideService::builder(
   51     51   
//! #     AcronymInsideServiceConfig::builder()
   52     52   
//! #         .build()
   53     53   
//! # ).build_unchecked();
   54     54   
//! let server = app.into_make_service();
   55     55   
//! let bind: SocketAddr = "127.0.0.1:6969".parse()
   56     56   
//!     .expect("unable to parse the server bind address and port");
   57     57   
//! ::hyper::Server::bind(&bind).serve(server).await.unwrap();
   58     58   
//! # }
          59  +
//!
   59     60   
//! ```
   60     61   
//!
   61     62   
//! ### Running on Lambda
   62     63   
//!
   63     64   
//! ```rust,ignore
   64     65   
//! use naming_test_casing::server::routing::LambdaHandler;
   65     66   
//! use naming_test_casing::AcronymInsideService;
   66     67   
//!
   67     68   
//! # async fn dummy() {
   68     69   
//! # let app = AcronymInsideService::builder(
   69     70   
//! #     AcronymInsideServiceConfig::builder()
   70     71   
//! #         .build()
   71     72   
//! # ).build_unchecked();
   72     73   
//! let handler = LambdaHandler::new(app);
   73     74   
//! lambda_http::run(handler).await.unwrap();
   74     75   
//! # }
   75     76   
//! ```
   76     77   
//!
   77     78   
//! # Building the AcronymInsideService
   78     79   
//!
   79     80   
//! To construct [`AcronymInsideService`] we use [`AcronymInsideServiceBuilder`] returned by [`AcronymInsideService::builder`].
   80     81   
//!
   81     82   
//! ## Plugins
   82     83   
//!
   83     84   
//! The [`AcronymInsideService::builder`] method, returning [`AcronymInsideServiceBuilder`],
   84     85   
//! accepts a config object on which plugins can be registered.
   85     86   
//! Plugins allow you to build middleware which is aware of the operation it is being applied to.
   86     87   
//!
   87     88   
//! ```rust,no_run
   88     89   
//! # use naming_test_casing::server::plugin::IdentityPlugin as LoggingPlugin;
   89     90   
//! # use naming_test_casing::server::plugin::IdentityPlugin as MetricsPlugin;
   90     91   
//! # use ::hyper::Body;
   91     92   
//! use naming_test_casing::server::plugin::HttpPlugins;
   92     93   
//! use naming_test_casing::{AcronymInsideService, AcronymInsideServiceConfig, AcronymInsideServiceBuilder};
   93     94   
//!
   94     95   
//! let http_plugins = HttpPlugins::new()
   95     96   
//!         .push(LoggingPlugin)
   96     97   
//!         .push(MetricsPlugin);
   97     98   
//! let config = AcronymInsideServiceConfig::builder().build();
   98         -
//! let builder: AcronymInsideServiceBuilder<Body, _, _, _> = AcronymInsideService::builder(config);
          99  +
//! let builder: AcronymInsideServiceBuilder<::hyper::Body, _, _, _> = AcronymInsideService::builder(config);
   99    100   
//! ```
  100    101   
//!
  101    102   
//! Check out [`crate::server::plugin`] to learn more about plugins.
  102    103   
//!
  103    104   
//! ## Handlers
  104    105   
//!
  105    106   
//! [`AcronymInsideServiceBuilder`] provides a setter method for each operation in your Smithy model. The setter methods expect an async function as input, matching the signature for the corresponding operation in your Smithy model.
  106    107   
//! We call these async functions **handlers**. This is where your application business logic lives.
  107    108   
//!
  108    109   
//! Every handler must take an `Input`, and optional [`extractor arguments`](crate::server::request), while returning:
@@ -164,165 +257,258 @@
  184    185   
//!
  185    186   
//! use naming_test_casing::{input, output, error};
  186    187   
//!
  187    188   
//! async fn do_nothing(input: input::DoNothingInput) -> Result<output::DoNothingOutput, error::DoNothingError> {
  188    189   
//!     todo!()
  189    190   
//! }
  190    191   
//!
  191    192   
//! ```
  192    193   
//!
  193    194   
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
         195  +
//! [hyper server]: https://docs.rs/hyper/0.14.26/hyper/server/index.html
  194    196   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  195    197   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  196    198   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  197         -
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  198    199   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
  199    200   
pub use crate::service::{
  200    201   
    AcronymInsideService, AcronymInsideServiceBuilder, AcronymInsideServiceConfig,
  201    202   
    AcronymInsideServiceConfigBuilder, MissingOperationsError,
  202    203   
};
  203    204   
  204    205   
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  205    206   
pub mod server {
  206    207   
    // Re-export all types from the `aws-smithy-http-server` crate.
  207         -
    pub use ::aws_smithy_http_server::*;
         208  +
    pub use ::aws_smithy_legacy_http_server::*;
  208    209   
}
  209    210   
  210    211   
/// Crate version number.
  211    212   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  212    213   
  213    214   
/// All error types that operations can return. Documentation on these types is copied from the model.
  214    215   
pub mod error;
  215    216   
  216    217   
/// Input structures for operations. Documentation on these types is copied from the model.
  217    218   
pub mod input;
  218    219   
  219    220   
/// All operations that this crate can perform.
  220    221   
pub mod operation;
  221    222   
  222    223   
/// A collection of types representing each operation defined in the service closure.
  223    224   
///
  224         -
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
         225  +
/// The [plugin system](::aws_smithy_legacy_http_server::plugin) makes use of these
  225    226   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  226         -
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  227         -
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
         227  +
/// parameterize [`Plugin`](::aws_smithy_legacy_http_server::plugin::Plugin) implementations. Their traits, such as
         228  +
/// [`OperationShape`](::aws_smithy_legacy_http_server::operation::OperationShape), can be used to provide
  228    229   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  229    230   
pub mod operation_shape;
  230    231   
  231    232   
/// Output structures for operations. Documentation on these types is copied from the model.
  232    233   
pub mod output;
  233    234   
  234    235   
/// Export PyO3 symbols in the shared library
  235    236   
pub mod python_module_export;
  236    237   
  237    238   
/// Operation adapters that delegate to Python handlers.

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

@@ -1,1 +109,98 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4      4   
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
    5      5   
    pub struct DoNothingInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10     10   
impl std::future::Future for DoNothingInputFuture {
   11     11   
    type Output = Result<
   12     12   
        crate::input::DoNothingInput,
   13         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
          13  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26         -
    ::aws_smithy_http_server::request::FromRequest<
   27         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          26  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
          27  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   28     28   
        B,
   29     29   
    > for crate::input::DoNothingInput
   30     30   
where
   31         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          31  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   36         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          35  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          36  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
          38  +
    type Rejection =
          39  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
   39     40   
    type Future = DoNothingInputFuture;
   40     41   
   41     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   42     43   
        let fut = async move {
   43         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
          44  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
   44     45   
                request.headers(),
   45     46   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
   46     47   
            ) {
   47         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
          48  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
   48     49   
            }
   49     50   
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
   50     51   
        };
   51     52   
        use ::futures_util::future::TryFutureExt;
   52         -
        let fut = fut.map_err(
   53         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
   54         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
   55         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
   56         -
            },
   57         -
        );
          53  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
          54  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
          55  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
          56  +
                    });
   58     57   
        DoNothingInputFuture {
   59     58   
            inner: Box::pin(fut),
   60     59   
        }
   61     60   
    }
   62     61   
}
   63     62   
impl
   64         -
    ::aws_smithy_http_server::response::IntoResponse<
   65         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          63  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          64  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   66     65   
    > for crate::output::DoNothingOutput
   67     66   
{
   68         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          67  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   69     68   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
   70     69   
            Ok(response) => response,
   71     70   
            Err(e) => {
   72     71   
                ::tracing::error!(error = %e, "failed to serialize response");
   73         -
                ::aws_smithy_http_server::response::IntoResponse::<
   74         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   75         -
                >::into_response(
   76         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
   77         -
                        e,
   78         -
                    ),
   79         -
                )
          72  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
   80     73   
            }
   81     74   
        }
   82     75   
    }
   83     76   
}
   84     77   
impl
   85         -
    ::aws_smithy_http_server::response::IntoResponse<
   86         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          78  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          79  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   87     80   
    > for crate::error::DoNothingError
   88     81   
{
   89         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          82  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   90     83   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_error(&self) {
   91     84   
            Ok(mut response) => {
   92     85   
                response.extensions_mut().insert(
   93         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
          86  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
          87  +
                        self.name(),
          88  +
                    ),
   94     89   
                );
   95     90   
                response
   96     91   
            }
   97     92   
            Err(e) => {
   98     93   
                ::tracing::error!(error = %e, "failed to serialize response");
   99         -
                ::aws_smithy_http_server::response::IntoResponse::<
  100         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  101         -
                >::into_response(
  102         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  103         -
                        e,
  104         -
                    ),
  105         -
                )
          94  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  106     95   
            }
  107     96   
        }
  108     97   
    }
  109     98   
}

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/rust-server-codegen-python/src/operation_shape.rs

@@ -1,1 +25,31 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
pub struct DoNothing;
    4      4   
    5         -
impl ::aws_smithy_http_server::operation::OperationShape for DoNothing {
    6         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7         -
        ::aws_smithy_http_server::shape_id::ShapeId::new("casing#DoNothing", "casing", "DoNothing");
           5  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for DoNothing {
           6  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           7  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
           8  +
            "casing#DoNothing",
           9  +
            "casing",
          10  +
            "DoNothing",
          11  +
        );
    8     12   
    9     13   
    type Input = crate::input::DoNothingInput;
   10     14   
    type Output = crate::output::DoNothingOutput;
   11     15   
    type Error = crate::error::DoNothingError;
   12     16   
}
   13     17   
   14         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
   15         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   16         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          18  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
          19  +
    type RequestFmt =
          20  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          21  +
    type ResponseFmt =
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   17     23   
   18     24   
    fn request_fmt() -> Self::RequestFmt {
   19         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          25  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   20     26   
    }
   21     27   
   22     28   
    fn response_fmt() -> Self::ResponseFmt {
   23         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          29  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   24     30   
    }
   25     31   
}

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

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_do_nothing_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::DoNothingInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::do_nothing_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_do_nothing_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::DoNothingOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.1",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_do_nothing_http_error(
   57     57   
    error: &crate::error::DoNothingError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::DoNothingError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.1",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

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

@@ -1,1 +35,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Python handler for operation `DoNothing`.
    3      3   
pub(crate) async fn do_nothing(
    4      4   
    input: crate::input::DoNothingInput,
    5         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
           5  +
    state: ::aws_smithy_legacy_http_server::Extension<
           6  +
        ::aws_smithy_http_server_python::context::PyContext,
           7  +
    >,
    6      8   
    handler: ::aws_smithy_http_server_python::PyHandler,
    7      9   
) -> std::result::Result<crate::output::DoNothingOutput, crate::error::DoNothingError> {
    8     10   
    // Async block used to run the handler and catch any Python error.
    9     11   
    let result = if handler.is_coroutine {
   10     12   
        ::tracing::trace!(name = "do_nothing", "executing python handler coroutine");
   11     13   
        let result = ::pyo3::Python::with_gil(|py| {
   12     14   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   13     15   
            let coroutine = if handler.args == 1 {
   14     16   
                pyhandler.call1((input,))?
   15     17   
            } else {

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

@@ -56,56 +146,146 @@
   76     76   
    fn handlers(
   77     77   
        &mut self,
   78     78   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
   79     79   
        &mut self.handlers
   80     80   
    }
   81     81   
    fn build_service(
   82     82   
        &mut self,
   83     83   
        event_loop: &::pyo3::PyAny,
   84     84   
    ) -> ::pyo3::PyResult<
   85     85   
        ::tower::util::BoxCloneService<
   86         -
            ::http::Request<::aws_smithy_http_server::body::Body>,
   87         -
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
          86  +
            ::http::Request<::aws_smithy_legacy_http_server::body::Body>,
          87  +
            ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
   88     88   
            std::convert::Infallible,
   89     89   
        >,
   90     90   
    > {
   91     91   
        let builder = crate::service::AcronymInsideService::builder_without_plugins();
   92     92   
        let do_nothing_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
   93     93   
        let handler = self
   94     94   
            .handlers
   95     95   
            .get("do_nothing")
   96     96   
            .expect("Python handler for operation `do_nothing` not found")
   97     97   
            .clone();
   98     98   
        let builder = builder.do_nothing(move |input, state| {
   99     99   
            ::pyo3_asyncio::tokio::scope(
  100    100   
                do_nothing_locals.clone(),
  101    101   
                crate::python_operation_adaptor::do_nothing(input, state, handler.clone()),
  102    102   
            )
  103    103   
        });
  104    104   
        let mut service = ::tower::util::BoxCloneService::new(builder.build().expect("one or more operations do not have a registered handler; this is a bug in the Python code generator, please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"));
  105    105   
  106    106   
        {
  107    107   
            use ::tower::Layer;
  108    108   
            ::tracing::trace!("adding middlewares to rust python router");
  109    109   
            let mut middlewares = self.middlewares.clone();
  110    110   
            // Reverse the middlewares, so they run with same order as they defined
  111    111   
            middlewares.reverse();
  112    112   
            for handler in middlewares {
  113    113   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  114    114   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  115    115   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  116         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         116  +
                    ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  117    117   
                >::new(handler, locals);
  118    118   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  119    119   
            }
  120    120   
        }
  121    121   
        Ok(service)
  122    122   
    }
  123    123   
}
  124    124   
#[::pyo3::pymethods]
  125    125   
impl App {
  126    126   
    /// Create a new [App].

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

@@ -1,1 +630,641 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`AcronymInsideService`].
    3      3   
///
    4      4   
/// Constructed via [`AcronymInsideService::builder`].
    5      5   
pub struct AcronymInsideServiceBuilder<Body, L, HttpPl, ModelPl> {
    6         -
    do_nothing: Option<::aws_smithy_http_server::routing::Route<Body>>,
           6  +
    do_nothing: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
    7      7   
    layer: L,
    8      8   
    http_plugin: HttpPl,
    9      9   
    model_plugin: ModelPl,
   10     10   
}
   11     11   
   12     12   
impl<Body, L, HttpPl, ModelPl> AcronymInsideServiceBuilder<Body, L, HttpPl, ModelPl> {
   13     13   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) operation.
   14     14   
    ///
   15         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   16         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          15  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          16  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   17     17   
    ///
   18     18   
    /// # Example
   19     19   
    ///
   20     20   
    /// ```no_run
   21     21   
    /// use naming_test_casing::{AcronymInsideService, AcronymInsideServiceConfig};
   22     22   
    ///
   23     23   
    /// use naming_test_casing::{input, output, error};
   24     24   
    ///
   25     25   
    /// async fn handler(input: input::DoNothingInput) -> Result<output::DoNothingOutput, error::DoNothingError> {
   26     26   
    ///     todo!()
   27     27   
    /// }
   28     28   
    ///
   29     29   
    /// let config = AcronymInsideServiceConfig::builder().build();
   30     30   
    /// let app = AcronymInsideService::builder(config)
   31     31   
    ///     .do_nothing(handler)
   32     32   
    ///     /* Set other handlers */
   33     33   
    ///     .build()
   34     34   
    ///     .unwrap();
   35         -
    /// # let app: AcronymInsideService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>> = app;
          35  +
    /// # let app: AcronymInsideService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>> = app;
   36     36   
    /// ```
   37     37   
    ///
   38     38   
                    pub fn do_nothing<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
   39     39   
                    where
   40         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::DoNothing, HandlerExtractors>,
          40  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::DoNothing, HandlerExtractors>,
   41     41   
   42         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
          42  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   43     43   
                            AcronymInsideService<L>,
   44     44   
                            crate::operation_shape::DoNothing,
   45         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::DoNothing, HandlerType>
          45  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::DoNothing, HandlerType>
   46     46   
                        >,
   47         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
          47  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
   48     48   
                            AcronymInsideService<L>,
   49     49   
                            crate::operation_shape::DoNothing,
   50     50   
                            ModelPl::Output
   51     51   
                        >,
   52         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
          52  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   53     53   
                            AcronymInsideService<L>,
   54     54   
                            crate::operation_shape::DoNothing,
   55     55   
                            <
   56         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   57         -
                                as ::aws_smithy_http_server::plugin::Plugin<
          56  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
          57  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
   58     58   
                                    AcronymInsideService<L>,
   59     59   
                                    crate::operation_shape::DoNothing,
   60     60   
                                    ModelPl::Output
   61     61   
                                >
   62     62   
                            >::Output
   63     63   
                        >,
   64     64   
   65         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
          65  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   66     66   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
   67     67   
   68     68   
                    {
   69         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   70         -
        use ::aws_smithy_http_server::plugin::Plugin;
          69  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
          70  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
   71     71   
        let svc = crate::operation_shape::DoNothing::from_handler(handler);
   72     72   
        let svc = self.model_plugin.apply(svc);
   73         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   74         -
            .apply(svc);
          73  +
        let svc =
          74  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
          75  +
                .apply(svc);
   75     76   
        let svc = self.http_plugin.apply(svc);
   76     77   
        self.do_nothing_custom(svc)
   77     78   
    }
   78     79   
   79     80   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) operation.
   80     81   
    ///
   81         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   82         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          82  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          83  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   83     84   
    ///
   84     85   
    /// # Example
   85     86   
    ///
   86     87   
    /// ```no_run
   87     88   
    /// use naming_test_casing::{AcronymInsideService, AcronymInsideServiceConfig};
   88     89   
    ///
   89     90   
    /// use naming_test_casing::{input, output, error};
   90     91   
    ///
   91     92   
    /// async fn handler(input: input::DoNothingInput) -> Result<output::DoNothingOutput, error::DoNothingError> {
   92     93   
    ///     todo!()
   93     94   
    /// }
   94     95   
    ///
   95     96   
    /// let config = AcronymInsideServiceConfig::builder().build();
   96     97   
    /// let svc = ::tower::util::service_fn(handler);
   97     98   
    /// let app = AcronymInsideService::builder(config)
   98     99   
    ///     .do_nothing_service(svc)
   99    100   
    ///     /* Set other handlers */
  100    101   
    ///     .build()
  101    102   
    ///     .unwrap();
  102         -
    /// # let app: AcronymInsideService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>> = app;
         103  +
    /// # let app: AcronymInsideService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>> = app;
  103    104   
    /// ```
  104    105   
    ///
  105    106   
                    pub fn do_nothing_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  106    107   
                    where
  107         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::DoNothing, ServiceExtractors>,
         108  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::DoNothing, ServiceExtractors>,
  108    109   
  109         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         110  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  110    111   
                            AcronymInsideService<L>,
  111    112   
                            crate::operation_shape::DoNothing,
  112         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::DoNothing, S>
         113  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::DoNothing, S>
  113    114   
                        >,
  114         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         115  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  115    116   
                            AcronymInsideService<L>,
  116    117   
                            crate::operation_shape::DoNothing,
  117    118   
                            ModelPl::Output
  118    119   
                        >,
  119         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         120  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  120    121   
                            AcronymInsideService<L>,
  121    122   
                            crate::operation_shape::DoNothing,
  122    123   
                            <
  123         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  124         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         124  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         125  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  125    126   
                                    AcronymInsideService<L>,
  126    127   
                                    crate::operation_shape::DoNothing,
  127    128   
                                    ModelPl::Output
  128    129   
                                >
  129    130   
                            >::Output
  130    131   
                        >,
  131    132   
  132         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         133  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  133    134   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  134    135   
  135    136   
                    {
  136         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  137         -
        use ::aws_smithy_http_server::plugin::Plugin;
         137  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         138  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  138    139   
        let svc = crate::operation_shape::DoNothing::from_service(service);
  139    140   
        let svc = self.model_plugin.apply(svc);
  140         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  141         -
            .apply(svc);
         141  +
        let svc =
         142  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         143  +
                .apply(svc);
  142    144   
        let svc = self.http_plugin.apply(svc);
  143    145   
        self.do_nothing_custom(svc)
  144    146   
    }
  145    147   
  146    148   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) to a custom [`Service`](tower::Service).
  147    149   
    /// not constrained by the Smithy contract.
  148    150   
    fn do_nothing_custom<S>(mut self, svc: S) -> Self
  149    151   
    where
  150    152   
        S: ::tower::Service<
  151    153   
                ::http::Request<Body>,
  152         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         154  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  153    155   
                Error = ::std::convert::Infallible,
  154    156   
            > + Clone
  155    157   
            + Send
  156    158   
            + 'static,
  157    159   
        S::Future: Send + 'static,
  158    160   
    {
  159         -
        self.do_nothing = Some(::aws_smithy_http_server::routing::Route::new(svc));
         161  +
        self.do_nothing = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  160    162   
        self
  161    163   
    }
  162    164   
}
  163    165   
  164    166   
impl<Body, L, HttpPl, ModelPl> AcronymInsideServiceBuilder<Body, L, HttpPl, ModelPl> {
  165    167   
    /// Constructs a [`AcronymInsideService`] from the arguments provided to the builder.
  166    168   
    ///
  167    169   
    /// Forgetting to register a handler for one or more operations will result in an error.
  168    170   
    ///
  169    171   
    /// Check out [`AcronymInsideServiceBuilder::build_unchecked`] if you'd prefer the service to return status code 500 when an
  170    172   
    /// unspecified route is requested.
  171    173   
    pub fn build(
  172    174   
        self,
  173    175   
    ) -> ::std::result::Result<
  174    176   
        AcronymInsideService<
  175         -
            ::aws_smithy_http_server::routing::RoutingService<
  176         -
                ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<L::Service>,
  177         -
                ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         177  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
         178  +
                ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<
         179  +
                    L::Service,
         180  +
                >,
         181  +
                ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  178    182   
            >,
  179    183   
        >,
  180    184   
        MissingOperationsError,
  181    185   
    >
  182    186   
    where
  183         -
        L: ::tower::Layer<::aws_smithy_http_server::routing::Route<Body>>,
         187  +
        L: ::tower::Layer<::aws_smithy_legacy_http_server::routing::Route<Body>>,
  184    188   
    {
  185    189   
        let router = {
  186         -
            use ::aws_smithy_http_server::operation::OperationShape;
         190  +
            use ::aws_smithy_legacy_http_server::operation::OperationShape;
  187    191   
            let mut missing_operation_names = std::collections::HashMap::new();
  188    192   
            if self.do_nothing.is_none() {
  189    193   
                missing_operation_names
  190    194   
                    .insert(crate::operation_shape::DoNothing::ID, ".do_nothing()");
  191    195   
            }
  192    196   
            if !missing_operation_names.is_empty() {
  193    197   
                return Err(MissingOperationsError {
  194    198   
                    operation_names2setter_methods: missing_operation_names,
  195    199   
                });
  196    200   
            }
  197    201   
            let unexpected_error_msg = "this should never panic since we are supposed to check beforehand that a handler has been registered for this operation; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues";
  198    202   
  199         -
            ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter::from_iter([(
  200         -
                request_specs::do_nothing(),
  201         -
                self.do_nothing.expect(unexpected_error_msg),
  202         -
            )])
         203  +
            ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter::from_iter([
         204  +
                (
         205  +
                    request_specs::do_nothing(),
         206  +
                    self.do_nothing.expect(unexpected_error_msg),
         207  +
                ),
         208  +
            ])
  203    209   
        };
  204         -
        let svc = ::aws_smithy_http_server::routing::RoutingService::new(router);
         210  +
        let svc = ::aws_smithy_legacy_http_server::routing::RoutingService::new(router);
  205    211   
        let svc = svc.map(|s| s.layer(self.layer));
  206    212   
        Ok(AcronymInsideService { svc })
  207    213   
    }
  208    214   
  209    215   
    /// Constructs a [`AcronymInsideService`] from the arguments provided to the builder.
  210    216   
    /// Operations without a handler default to returning 500 Internal Server Error to the caller.
  211    217   
    ///
  212    218   
    /// Check out [`AcronymInsideServiceBuilder::build`] if you'd prefer the builder to fail if one or more operations do
  213    219   
    /// not have a registered handler.
  214    220   
    pub fn build_unchecked(self) -> AcronymInsideService<L::Service>
  215    221   
    where
  216    222   
        Body: Send + 'static,
  217    223   
        L: ::tower::Layer<
  218         -
            ::aws_smithy_http_server::routing::RoutingService<
  219         -
                ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<
  220         -
                    ::aws_smithy_http_server::routing::Route<Body>,
         224  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
         225  +
                ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<
         226  +
                    ::aws_smithy_legacy_http_server::routing::Route<Body>,
  221    227   
                >,
  222         -
                ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         228  +
                ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  223    229   
            >,
  224    230   
        >,
  225    231   
    {
  226    232   
        let router =
  227         -
            ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter::from_iter([(
  228         -
                request_specs::do_nothing(),
  229         -
                self.do_nothing.unwrap_or_else(|| {
  230         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
  231         -
                        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  232         -
                    >::default();
  233         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
  234         -
                }),
  235         -
            )]);
         233  +
            ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter::from_iter(
         234  +
                [(
         235  +
                    request_specs::do_nothing(),
         236  +
                    self.do_nothing.unwrap_or_else(|| {
         237  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
         238  +
                            ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
         239  +
                        >::default();
         240  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
         241  +
                    }),
         242  +
                )],
         243  +
            );
  236    244   
        let svc = self
  237    245   
            .layer
  238         -
            .layer(::aws_smithy_http_server::routing::RoutingService::new(
  239         -
                router,
  240         -
            ));
         246  +
            .layer(::aws_smithy_legacy_http_server::routing::RoutingService::new(router));
  241    247   
        AcronymInsideService { svc }
  242    248   
    }
  243    249   
}
  244    250   
  245    251   
/// The error encountered when calling the [`AcronymInsideServiceBuilder::build`] method if one or more operation handlers are not
  246    252   
/// specified.
  247    253   
#[derive(Debug)]
  248    254   
pub struct MissingOperationsError {
  249    255   
    operation_names2setter_methods:
  250         -
        std::collections::HashMap<::aws_smithy_http_server::shape_id::ShapeId, &'static str>,
         256  +
        std::collections::HashMap<::aws_smithy_legacy_http_server::shape_id::ShapeId, &'static str>,
  251    257   
}
  252    258   
  253    259   
impl std::fmt::Display for MissingOperationsError {
  254    260   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  255    261   
        write!(
  256    262   
            f,
  257    263   
            "You must specify a handler for all operations attached to `AcronymInsideService`.\n\
  258    264   
                            We are missing handlers for the following operations:\n",
  259    265   
        )?;
  260    266   
        for operation_name in self.operation_names2setter_methods.keys() {
  261    267   
            writeln!(f, "- {}", operation_name.absolute())?;
  262    268   
        }
  263    269   
  264    270   
        writeln!(f, "\nUse the dedicated methods on `AcronymInsideServiceBuilder` to register the missing handlers:")?;
  265    271   
        for setter_name in self.operation_names2setter_methods.values() {
  266    272   
            writeln!(f, "- {}", setter_name)?;
  267    273   
        }
  268    274   
        Ok(())
  269    275   
    }
  270    276   
}
  271    277   
  272    278   
impl std::error::Error for MissingOperationsError {}
  273    279   
  274    280   
mod request_specs {
  275    281   
    pub(super) fn do_nothing() -> &'static str {
  276    282   
        "ACRONYMInside_Service.DoNothing"
  277    283   
    }
  278    284   
}
  279    285   
  280    286   
/// Confounds model generation machinery with lots of problematic casing
  281    287   
///
  282    288   
/// See the [root](crate) documentation for more information.
  283    289   
#[derive(Clone)]
  284    290   
pub struct AcronymInsideService<
  285         -
    S = ::aws_smithy_http_server::routing::RoutingService<
  286         -
        ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<
  287         -
            ::aws_smithy_http_server::routing::Route<::aws_smithy_http_server::body::BoxBody>,
         291  +
    S = ::aws_smithy_legacy_http_server::routing::RoutingService<
         292  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<
         293  +
            ::aws_smithy_legacy_http_server::routing::Route<
         294  +
                ::aws_smithy_legacy_http_server::body::BoxBody,
         295  +
            >,
  288    296   
        >,
  289         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         297  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  290    298   
    >,
  291    299   
> {
  292    300   
    // This is the router wrapped by layers.
  293    301   
    svc: S,
  294    302   
}
  295    303   
  296    304   
impl AcronymInsideService<()> {
  297    305   
    /// Constructs a builder for [`AcronymInsideService`].
  298    306   
    /// You must specify a configuration object holding any plugins and layers that should be applied
  299    307   
    /// to the operations in this service.
  300    308   
    pub fn builder<
  301    309   
        Body,
  302    310   
        L,
  303         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
  304         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
         311  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
         312  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
  305    313   
    >(
  306    314   
        config: AcronymInsideServiceConfig<L, HttpPl, ModelPl>,
  307    315   
    ) -> AcronymInsideServiceBuilder<Body, L, HttpPl, ModelPl> {
  308    316   
        AcronymInsideServiceBuilder {
  309    317   
            do_nothing: None,
  310    318   
            layer: config.layers,
  311    319   
            http_plugin: config.http_plugins,
  312    320   
            model_plugin: config.model_plugins,
  313    321   
        }
  314    322   
    }
  315    323   
  316    324   
    /// Constructs a builder for [`AcronymInsideService`].
  317    325   
    /// You must specify what plugins should be applied to the operations in this service.
  318    326   
    ///
  319    327   
    /// Use [`AcronymInsideService::builder_without_plugins`] if you don't need to apply plugins.
  320    328   
    ///
  321         -
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
  322         -
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
         329  +
    /// Check out [`HttpPlugins`](::aws_smithy_legacy_http_server::plugin::HttpPlugins) and
         330  +
    /// [`ModelPlugins`](::aws_smithy_legacy_http_server::plugin::ModelPlugins) if you need to apply
  323    331   
    /// multiple plugins.
  324    332   
    #[deprecated(
  325    333   
        since = "0.57.0",
  326    334   
        note = "please use the `builder` constructor and register plugins on the `AcronymInsideServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  327    335   
    )]
  328    336   
    pub fn builder_with_plugins<
  329    337   
        Body,
  330         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
  331         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
         338  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
         339  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
  332    340   
    >(
  333    341   
        http_plugin: HttpPl,
  334    342   
        model_plugin: ModelPl,
  335    343   
    ) -> AcronymInsideServiceBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
  336    344   
        AcronymInsideServiceBuilder {
  337    345   
            do_nothing: None,
  338    346   
            layer: ::tower::layer::util::Identity::new(),
  339    347   
            http_plugin,
  340    348   
            model_plugin,
  341    349   
        }
  342    350   
    }
  343    351   
  344    352   
    /// Constructs a builder for [`AcronymInsideService`].
  345    353   
    ///
  346    354   
    /// Use [`AcronymInsideService::builder_with_plugins`] if you need to specify plugins.
  347    355   
    #[deprecated(
  348    356   
        since = "0.57.0",
  349    357   
        note = "please use the `builder` constructor instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  350    358   
    )]
  351    359   
    pub fn builder_without_plugins<Body>() -> AcronymInsideServiceBuilder<
  352    360   
        Body,
  353    361   
        ::tower::layer::util::Identity,
  354         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
  355         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
         362  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         363  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  356    364   
    > {
  357    365   
        Self::builder_with_plugins(
  358         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
  359         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
         366  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         367  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  360    368   
        )
  361    369   
    }
  362    370   
}
  363    371   
  364    372   
impl<S> AcronymInsideService<S> {
  365    373   
    /// Converts [`AcronymInsideService`] into a [`MakeService`](tower::make::MakeService).
  366         -
    pub fn into_make_service(self) -> ::aws_smithy_http_server::routing::IntoMakeService<Self> {
  367         -
        ::aws_smithy_http_server::routing::IntoMakeService::new(self)
         374  +
    pub fn into_make_service(
         375  +
        self,
         376  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeService<Self> {
         377  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeService::new(self)
  368    378   
    }
  369    379   
  370         -
    /// Converts [`AcronymInsideService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_http_server::request::connect_info::ConnectInfo).
         380  +
    /// Converts [`AcronymInsideService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_legacy_http_server::request::connect_info::ConnectInfo).
  371    381   
    pub fn into_make_service_with_connect_info<C>(
  372    382   
        self,
  373         -
    ) -> ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
  374         -
        ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
         383  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
         384  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
  375    385   
    }
  376    386   
}
  377    387   
  378    388   
impl<S>
  379    389   
    AcronymInsideService<
  380         -
        ::aws_smithy_http_server::routing::RoutingService<
  381         -
            ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<S>,
  382         -
            ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         390  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
         391  +
            ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<S>,
         392  +
            ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  383    393   
        >,
  384    394   
    >
  385    395   
{
  386    396   
    /// Applies a [`Layer`](::tower::Layer) uniformly to all routes.
  387    397   
    #[deprecated(
  388    398   
        since = "0.57.0",
  389    399   
        note = "please add layers to the `AcronymInsideServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  390    400   
    )]
  391    401   
    pub fn layer<L>(
  392    402   
        self,
  393    403   
        layer: &L,
  394    404   
    ) -> AcronymInsideService<
  395         -
        ::aws_smithy_http_server::routing::RoutingService<
  396         -
            ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<L::Service>,
  397         -
            ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         405  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
         406  +
            ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<L::Service>,
         407  +
            ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  398    408   
        >,
  399    409   
    >
  400    410   
    where
  401    411   
        L: ::tower::Layer<S>,
  402    412   
    {
  403    413   
        AcronymInsideService {
  404    414   
            svc: self.svc.map(|s| s.layer(layer)),
  405    415   
        }
  406    416   
    }
  407    417   
  408         -
    /// Applies [`Route::new`](::aws_smithy_http_server::routing::Route::new) to all routes.
         418  +
    /// Applies [`Route::new`](::aws_smithy_legacy_http_server::routing::Route::new) to all routes.
  409    419   
    ///
  410    420   
    /// This has the effect of erasing all types accumulated via layers.
  411    421   
    pub fn boxed<B>(
  412    422   
        self,
  413    423   
    ) -> AcronymInsideService<
  414         -
        ::aws_smithy_http_server::routing::RoutingService<
  415         -
            ::aws_smithy_http_server::protocol::aws_json::router::AwsJsonRouter<
  416         -
                ::aws_smithy_http_server::routing::Route<B>,
         424  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
         425  +
            ::aws_smithy_legacy_http_server::protocol::aws_json::router::AwsJsonRouter<
         426  +
                ::aws_smithy_legacy_http_server::routing::Route<B>,
  417    427   
            >,
  418         -
            ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         428  +
            ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  419    429   
        >,
  420    430   
    >
  421    431   
    where
  422    432   
        S: ::tower::Service<
  423    433   
            ::http::Request<B>,
  424         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         434  +
            Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  425    435   
            Error = std::convert::Infallible,
  426    436   
        >,
  427    437   
        S: Clone + Send + 'static,
  428    438   
        S::Future: Send + 'static,
  429    439   
    {
  430    440   
        self.layer(&::tower::layer::layer_fn(
  431         -
            ::aws_smithy_http_server::routing::Route::new,
         441  +
            ::aws_smithy_legacy_http_server::routing::Route::new,
  432    442   
        ))
  433    443   
    }
  434    444   
}
  435    445   
  436    446   
impl<S, R> ::tower::Service<R> for AcronymInsideService<S>
  437    447   
where
  438    448   
    S: ::tower::Service<R>,
  439    449   
{
  440    450   
    type Response = S::Response;
  441    451   
    type Error = S::Error;
  442    452   
    type Future = S::Future;
  443    453   
  444    454   
    fn poll_ready(
  445    455   
        &mut self,
  446    456   
        cx: &mut std::task::Context,
  447    457   
    ) -> std::task::Poll<::std::result::Result<(), Self::Error>> {
  448    458   
        self.svc.poll_ready(cx)
  449    459   
    }
  450    460   
  451    461   
    fn call(&mut self, request: R) -> Self::Future {
  452    462   
        self.svc.call(request)
  453    463   
    }
  454    464   
}
  455    465   
  456    466   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in AcronymInsideService.
  457    467   
#[allow(clippy::enum_variant_names)]
  458    468   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
  459    469   
pub enum Operation {
  460    470   
    DoNothing,
  461    471   
}
  462    472   
  463    473   
impl Operation {
  464         -
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
  465         -
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
         474  +
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_legacy_http_server::shape_id::ShapeId).
         475  +
    pub fn shape_id(&self) -> ::aws_smithy_legacy_http_server::shape_id::ShapeId {
  466    476   
        match self {
  467         -
            Operation::DoNothing => ::aws_smithy_http_server::shape_id::ShapeId::new(
         477  +
            Operation::DoNothing => ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  468    478   
                "casing#DoNothing",
  469    479   
                "casing",
  470    480   
                "DoNothing",
  471    481   
            ),
  472    482   
        }
  473    483   
    }
  474    484   
}
  475         -
impl<L> ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::DoNothing>
         485  +
impl<L>
         486  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<crate::operation_shape::DoNothing>
  476    487   
    for AcronymInsideService<L>
  477    488   
{
  478    489   
    const VALUE: Operation = Operation::DoNothing;
  479    490   
}
  480    491   
  481         -
impl<S> ::aws_smithy_http_server::service::ServiceShape for AcronymInsideService<S> {
  482         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  483         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         492  +
impl<S> ::aws_smithy_legacy_http_server::service::ServiceShape for AcronymInsideService<S> {
         493  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         494  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  484    495   
            "casing#ACRONYMInside_Service",
  485    496   
            "casing",
  486    497   
            "ACRONYMInside_Service",
  487    498   
        );
  488    499   
  489    500   
    const VERSION: Option<&'static str> = Some("");
  490    501   
  491         -
    type Protocol = ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1;
         502  +
    type Protocol = ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1;
  492    503   
  493    504   
    type Operations = Operation;
  494    505   
}
  495    506   
/// Configuration for the [`AcronymInsideService`]. This is the central place where to register and
  496    507   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
  497    508   
///
  498    509   
/// ```rust,no_run
  499    510   
/// # use naming_test_casing::AcronymInsideServiceConfig;
  500         -
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
         511  +
/// # use ::aws_smithy_legacy_http_server::plugin::IdentityPlugin;
  501    512   
/// # use ::tower::layer::util::Identity;
  502    513   
/// # let authentication_plugin = IdentityPlugin;
  503    514   
/// # let authorization_plugin = IdentityPlugin;
  504    515   
/// # let server_request_id_provider_layer = Identity::new();
  505    516   
/// let config = AcronymInsideServiceConfig::builder()
  506    517   
///     // Layers get executed first...
  507    518   
///     .layer(server_request_id_provider_layer)
  508    519   
///     // ...then HTTP plugins...
  509    520   
///     .http_plugin(authentication_plugin)
  510    521   
///     // ...and right after deserialization, model plugins.
  511    522   
///     .model_plugin(authorization_plugin)
  512    523   
///     .build();
  513    524   
/// ```
  514    525   
///
  515    526   
/// See the [`plugin`] system for details.
  516    527   
///
  517         -
/// [`plugin`]: ::aws_smithy_http_server::plugin
         528  +
/// [`plugin`]: ::aws_smithy_legacy_http_server::plugin
  518    529   
#[derive(::std::fmt::Debug)]
  519    530   
pub struct AcronymInsideServiceConfig<L, H, M> {
  520    531   
    layers: L,
  521    532   
    http_plugins: H,
  522    533   
    model_plugins: M,
  523    534   
}
  524    535   
  525    536   
impl AcronymInsideServiceConfig<(), (), ()> {
  526    537   
    /// Returns a builder to construct the configuration.
  527    538   
    pub fn builder() -> AcronymInsideServiceConfigBuilder<
  528    539   
        ::tower::layer::util::Identity,
  529         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
  530         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
         540  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         541  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  531    542   
    > {
  532    543   
        AcronymInsideServiceConfigBuilder {
  533    544   
            layers: ::tower::layer::util::Identity::new(),
  534         -
            http_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
  535         -
            model_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
         545  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         546  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  536    547   
        }
  537    548   
    }
  538    549   
}
  539    550   
  540    551   
/// Builder returned by [`AcronymInsideServiceConfig::builder()`].
  541    552   
#[derive(::std::fmt::Debug)]
  542    553   
pub struct AcronymInsideServiceConfigBuilder<L, H, M> {
  543    554   
    pub(crate) layers: L,
  544    555   
    pub(crate) http_plugins: H,
  545    556   
    pub(crate) model_plugins: M,
  546    557   
}
  547    558   
  548    559   
impl<L, H, M> AcronymInsideServiceConfigBuilder<L, H, M> {
  549    560   
    /// Add a [`::tower::Layer`] to the service.
  550    561   
    pub fn layer<NewLayer>(
  551    562   
        self,
  552    563   
        layer: NewLayer,
  553    564   
    ) -> AcronymInsideServiceConfigBuilder<::tower::layer::util::Stack<NewLayer, L>, H, M> {
  554    565   
        AcronymInsideServiceConfigBuilder {
  555    566   
            layers: ::tower::layer::util::Stack::new(layer, self.layers),
  556    567   
            http_plugins: self.http_plugins,
  557    568   
            model_plugins: self.model_plugins,
  558    569   
        }
  559    570   
    }
  560    571   
  561    572   
    /// Add a HTTP [plugin] to the service.
  562    573   
    ///
  563         -
    /// [plugin]: ::aws_smithy_http_server::plugin
         574  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
  564    575   
    // We eagerly require `NewPlugin: HttpMarker`, despite not really needing it, because compiler
  565    576   
    // errors get _substantially_ better if the user makes a mistake.
  566         -
    pub fn http_plugin<NewPlugin: ::aws_smithy_http_server::plugin::HttpMarker>(
         577  +
    pub fn http_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::HttpMarker>(
  567    578   
        self,
  568    579   
        http_plugin: NewPlugin,
  569    580   
    ) -> AcronymInsideServiceConfigBuilder<
  570    581   
        L,
  571         -
        ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, H>,
         582  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, H>,
  572    583   
        M,
  573    584   
    > {
  574    585   
        AcronymInsideServiceConfigBuilder {
  575    586   
            layers: self.layers,
  576         -
            http_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
         587  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
  577    588   
                http_plugin,
  578    589   
                self.http_plugins,
  579    590   
            ),
  580    591   
            model_plugins: self.model_plugins,
  581    592   
        }
  582    593   
    }
  583    594   
  584    595   
    /// Add a model [plugin] to the service.
  585    596   
    ///
  586         -
    /// [plugin]: ::aws_smithy_http_server::plugin
         597  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
  587    598   
    // We eagerly require `NewPlugin: ModelMarker`, despite not really needing it, because compiler
  588    599   
    // errors get _substantially_ better if the user makes a mistake.
  589         -
    pub fn model_plugin<NewPlugin: ::aws_smithy_http_server::plugin::ModelMarker>(
         600  +
    pub fn model_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::ModelMarker>(
  590    601   
        self,
  591    602   
        model_plugin: NewPlugin,
  592    603   
    ) -> AcronymInsideServiceConfigBuilder<
  593    604   
        L,
  594    605   
        H,
  595         -
        ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, M>,
         606  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, M>,
  596    607   
    > {
  597    608   
        AcronymInsideServiceConfigBuilder {
  598    609   
            layers: self.layers,
  599    610   
            http_plugins: self.http_plugins,
  600         -
            model_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
         611  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
  601    612   
                model_plugin,
  602    613   
                self.model_plugins,
  603    614   
            ),
  604    615   
        }
  605    616   
    }
  606    617   
  607    618   
    /// Build the configuration.
  608    619   
    pub fn build(self) -> super::AcronymInsideServiceConfig<L, H, M> {
  609    620   
        super::AcronymInsideServiceConfig {
  610    621   
            layers: self.layers,

tmp-codegen-diff/codegen-server-test-python/naming_test_ops/rust-server-codegen-python/Cargo.toml

@@ -1,1 +59,59 @@
    2      2   
[package]
    3      3   
name = "naming_test_ops"
    4      4   
version = "0.0.1"
    5      5   
authors = ["protocoltest@example.com"]
    6      6   
description = "test"
    7      7   
edition = "2021"
    8      8   
    9      9   
[package.metadata.smithy]
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#awsJson1_1"
   12         -
[dependencies.aws-smithy-http]
   13         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   14         -
[dependencies.aws-smithy-http-server]
   15         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server"
   16     12   
[dependencies.aws-smithy-http-server-python]
   17     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server-python"
   18     14   
[dependencies.aws-smithy-json]
   19     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
          16  +
[dependencies.aws-smithy-legacy-http]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          18  +
[dependencies.aws-smithy-legacy-http-server]
          19  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
   20     20   
[dependencies.aws-smithy-runtime-api]
   21     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          22  +
features = ["http-02x"]
   22     23   
[dependencies.aws-smithy-types]
   23     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          25  +
features = ["http-body-0-4-x"]
   24     26   
[dependencies.futures-util]
   25     27   
version = "0.3"
   26     28   
[dependencies.http]
   27     29   
version = "0.2.9"
   28     30   
[dependencies.hyper]
   29     31   
version = "0.14.26"
   30     32   
[dependencies.mime]
   31     33   
version = "0.3"
   32     34   
[dependencies.parking_lot]
   33     35   
version = "0.12"
   34     36   
[dependencies.pin-project-lite]
   35     37   
version = "0.2"
   36     38   
[dependencies.pyo3]
   37     39   
version = "0.20"
   38     40   
[dependencies.pyo3-asyncio]
   39     41   
version = "0.20"
   40     42   
features = ["attributes", "tokio-runtime"]
   41     43   
[dependencies.tower]
   42     44   
version = "0.4"
   43     45   
[dependencies.tracing]
   44     46   
version = "0.1"
   45         -
[dev-dependencies.hyper]
   46         -
version = "0.14.12"
   47     47   
[dev-dependencies.tokio]
   48     48   
version = "1.23.1"
   49     49   
[features]
   50     50   
rt-tokio = ["aws-smithy-types/rt-tokio"]
   51         -
aws-lambda = ["aws-smithy-http-server/aws-lambda"]
   52         -
request-id = ["aws-smithy-http-server/request-id"]
          51  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          52  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
   53     53   
extension-module = ["pyo3/extension-module"]
   54     54   
default = ["rt-tokio", "request-id", "extension-module"]
   55     55   
[lib]
   56     56   
name = "naming_test_ops"
   57     57   
crate-type = ["cdylib"]
   58     58   
   59     59   

tmp-codegen-diff/codegen-server-test-python/naming_test_ops/rust-server-codegen-python/python/naming_test_ops/middleware/__init__.pyi

@@ -1,1 +38,38 @@
    1      1   
import typing
    2      2   
    3      3   
class MiddlewareException(Exception):
    4      4   
    """
    5      5   
    Exception that can be thrown from a Python middleware.
    6      6   
    7      7   
    It allows to specify a message and HTTP status code and implementing protocol specific capabilities
    8         -
    to build a [aws_smithy_http_server::response::Response] from it.
           8  +
    to build a [aws_smithy_legacy_http_server::response::Response] from it.
    9      9   
    """
   10     10   
   11     11   
    message: str
   12     12   
   13     13   
    status_code: int
   14     14   
   15     15   
    def __init__(self, message: str, status_code: typing.Optional[int] = ...) -> None:
   16     16   
        ...
   17     17   
   18     18   

tmp-codegen-diff/codegen-server-test-python/naming_test_ops/rust-server-codegen-python/src/input.rs

@@ -668,668 +728,728 @@
  688    688   
            path: ::std::string::String,
  689    689   
        ) -> crate::model::ValidationExceptionField {
  690    690   
            match self {
  691    691   
                ConstraintViolation::Enum(inner) => {
  692    692   
                    inner.as_validation_exception_field(path + "/enum")
  693    693   
                }
  694    694   
            }
  695    695   
        }
  696    696   
    }
  697    697   
    impl ::std::convert::From<ConstraintViolation>
  698         -
        for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
         698  +
        for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
  699    699   
    {
  700    700   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  701    701   
            let first_validation_exception_field =
  702    702   
                constraint_violation.as_validation_exception_field("".to_owned());
  703    703   
            let validation_exception = crate::error::ValidationException {
  704    704   
                message: format!(
  705    705   
                    "1 validation error detected. {}",
  706    706   
                    &first_validation_exception_field.message
  707    707   
                ),
  708    708   
                field_list: Some(vec![first_validation_exception_field]),
@@ -933,933 +993,993 @@
  953    953   
            path: ::std::string::String,
  954    954   
        ) -> crate::model::ValidationExceptionField {
  955    955   
            match self {
  956    956   
                ConstraintViolation::Enum(inner) => {
  957    957   
                    inner.as_validation_exception_field(path + "/enum")
  958    958   
                }
  959    959   
            }
  960    960   
        }
  961    961   
    }
  962    962   
    impl ::std::convert::From<ConstraintViolation>
  963         -
        for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
         963  +
        for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
  964    964   
    {
  965    965   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  966    966   
            let first_validation_exception_field =
  967    967   
                constraint_violation.as_validation_exception_field("".to_owned());
  968    968   
            let validation_exception = crate::error::ValidationException {
  969    969   
                message: format!(
  970    970   
                    "1 validation error detected. {}",
  971    971   
                    &first_validation_exception_field.message
  972    972   
                ),
  973    973   
                field_list: Some(vec![first_validation_exception_field]),
@@ -1451,1451 +1511,1511 @@
 1471   1471   
            path: ::std::string::String,
 1472   1472   
        ) -> crate::model::ValidationExceptionField {
 1473   1473   
            match self {
 1474   1474   
                ConstraintViolation::Enum(inner) => {
 1475   1475   
                    inner.as_validation_exception_field(path + "/enum")
 1476   1476   
                }
 1477   1477   
            }
 1478   1478   
        }
 1479   1479   
    }
 1480   1480   
    impl ::std::convert::From<ConstraintViolation>
 1481         -
        for ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection
        1481  +
        for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
 1482   1482   
    {
 1483   1483   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 1484   1484   
            let first_validation_exception_field =
 1485   1485   
                constraint_violation.as_validation_exception_field("".to_owned());
 1486   1486   
            let validation_exception = crate::error::ValidationException {
 1487   1487   
                message: format!(
 1488   1488   
                    "1 validation error detected. {}",
 1489   1489   
                    &first_validation_exception_field.message
 1490   1490   
                ),
 1491   1491   
                field_list: Some(vec![first_validation_exception_field]),

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

@@ -29,29 +128,129 @@
   49     49   
//!
   50     50   
//! # let app = Config::builder(
   51     51   
//! #     ConfigConfig::builder()
   52     52   
//! #         .build()
   53     53   
//! # ).build_unchecked();
   54     54   
//! let server = app.into_make_service();
   55     55   
//! let bind: SocketAddr = "127.0.0.1:6969".parse()
   56     56   
//!     .expect("unable to parse the server bind address and port");
   57     57   
//! ::hyper::Server::bind(&bind).serve(server).await.unwrap();
   58     58   
//! # }
          59  +
//!
   59     60   
//! ```
   60     61   
//!
   61     62   
//! ### Running on Lambda
   62     63   
//!
   63     64   
//! ```rust,ignore
   64     65   
//! use naming_test_ops::server::routing::LambdaHandler;
   65     66   
//! use naming_test_ops::Config;
   66     67   
//!
   67     68   
//! # async fn dummy() {
   68     69   
//! # let app = Config::builder(
   69     70   
//! #     ConfigConfig::builder()
   70     71   
//! #         .build()
   71     72   
//! # ).build_unchecked();
   72     73   
//! let handler = LambdaHandler::new(app);
   73     74   
//! lambda_http::run(handler).await.unwrap();
   74     75   
//! # }
   75     76   
//! ```
   76     77   
//!
   77     78   
//! # Building the Config
   78     79   
//!
   79     80   
//! To construct [`Config`] we use [`ConfigBuilder`] returned by [`Config::builder`].
   80     81   
//!
   81     82   
//! ## Plugins
   82     83   
//!
   83     84   
//! The [`Config::builder`] method, returning [`ConfigBuilder`],
   84     85   
//! accepts a config object on which plugins can be registered.
   85     86   
//! Plugins allow you to build middleware which is aware of the operation it is being applied to.
   86     87   
//!
   87     88   
//! ```rust,no_run
   88     89   
//! # use naming_test_ops::server::plugin::IdentityPlugin as LoggingPlugin;
   89     90   
//! # use naming_test_ops::server::plugin::IdentityPlugin as MetricsPlugin;
   90     91   
//! # use ::hyper::Body;
   91     92   
//! use naming_test_ops::server::plugin::HttpPlugins;
   92     93   
//! use naming_test_ops::{Config, ConfigConfig, ConfigBuilder};
   93     94   
//!
   94     95   
//! let http_plugins = HttpPlugins::new()
   95     96   
//!         .push(LoggingPlugin)
   96     97   
//!         .push(MetricsPlugin);
   97     98   
//! let config = ConfigConfig::builder().build();
   98         -
//! let builder: ConfigBuilder<Body, _, _, _> = Config::builder(config);
          99  +
//! let builder: ConfigBuilder<::hyper::Body, _, _, _> = Config::builder(config);
   99    100   
//! ```
  100    101   
//!
  101    102   
//! Check out [`crate::server::plugin`] to learn more about plugins.
  102    103   
//!
  103    104   
//! ## Handlers
  104    105   
//!
  105    106   
//! [`ConfigBuilder`] provides a setter method for each operation in your Smithy model. The setter methods expect an async function as input, matching the signature for the corresponding operation in your Smithy model.
  106    107   
//! We call these async functions **handlers**. This is where your application business logic lives.
  107    108   
//!
  108    109   
//! Every handler must take an `Input`, and optional [`extractor arguments`](crate::server::request), while returning:
@@ -194,195 +289,290 @@
  214    215   
//!     todo!()
  215    216   
//! }
  216    217   
//!
  217    218   
//! async fn structure_name_punning(input: input::StructureNamePunningInput) -> Result<output::StructureNamePunningOutput, error::StructureNamePunningError> {
  218    219   
//!     todo!()
  219    220   
//! }
  220    221   
//!
  221    222   
//! ```
  222    223   
//!
  223    224   
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
         225  +
//! [hyper server]: https://docs.rs/hyper/0.14.26/hyper/server/index.html
  224    226   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  225    227   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  226    228   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  227         -
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  228    229   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
  229    230   
pub use crate::service::{
  230    231   
    Config, ConfigBuilder, ConfigConfig, ConfigConfigBuilder, MissingOperationsError,
  231    232   
};
  232    233   
  233    234   
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  234    235   
pub mod server {
  235    236   
    // Re-export all types from the `aws-smithy-http-server` crate.
  236         -
    pub use ::aws_smithy_http_server::*;
         237  +
    pub use ::aws_smithy_legacy_http_server::*;
  237    238   
}
  238    239   
  239    240   
/// Crate version number.
  240    241   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  241    242   
  242    243   
/// All error types that operations can return. Documentation on these types is copied from the model.
  243    244   
pub mod error;
  244    245   
  245    246   
/// Input structures for operations. Documentation on these types is copied from the model.
  246    247   
pub mod input;
  247    248   
  248    249   
/// Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
  249    250   
pub mod model;
  250    251   
  251    252   
/// All operations that this crate can perform.
  252    253   
pub mod operation;
  253    254   
  254    255   
/// A collection of types representing each operation defined in the service closure.
  255    256   
///
  256         -
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
         257  +
/// The [plugin system](::aws_smithy_legacy_http_server::plugin) makes use of these
  257    258   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  258         -
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  259         -
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
         259  +
/// parameterize [`Plugin`](::aws_smithy_legacy_http_server::plugin::Plugin) implementations. Their traits, such as
         260  +
/// [`OperationShape`](::aws_smithy_legacy_http_server::operation::OperationShape), can be used to provide
  260    261   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  261    262   
pub mod operation_shape;
  262    263   
  263    264   
/// Output structures for operations. Documentation on these types is copied from the model.
  264    265   
pub mod output;
  265    266   
  266    267   
/// Export PyO3 symbols in the shared library
  267    268   
pub mod python_module_export;
  268    269   
  269    270   
/// Operation adapters that delegate to Python handlers.

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

@@ -1,1 +738,681 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4      4   
    /// [`RpcEchoInput`](crate::input::RpcEchoInput) using modelled bindings.
    5      5   
    pub struct RpcEchoInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10     10   
impl std::future::Future for RpcEchoInputFuture {
   11     11   
    type Output = Result<
   12     12   
        crate::input::RpcEchoInput,
   13         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
          13  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26         -
    ::aws_smithy_http_server::request::FromRequest<
   27         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          26  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
          27  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   28     28   
        B,
   29     29   
    > for crate::input::RpcEchoInput
   30     30   
where
   31         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          31  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   36         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          35  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          36  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
          38  +
    type Rejection =
          39  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
   39     40   
    type Future = RpcEchoInputFuture;
   40     41   
   41     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   42     43   
        let fut = async move {
   43         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
          44  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
   44     45   
                request.headers(),
   45     46   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
   46     47   
            ) {
   47         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
          48  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
   48     49   
            }
   49     50   
            crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_request(request).await
   50     51   
        };
   51     52   
        use ::futures_util::future::TryFutureExt;
   52         -
        let fut = fut.map_err(
   53         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
   54         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
   55         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
   56         -
            },
   57         -
        );
          53  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
          54  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
          55  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
          56  +
                    });
   58     57   
        RpcEchoInputFuture {
   59     58   
            inner: Box::pin(fut),
   60     59   
        }
   61     60   
    }
   62     61   
}
   63     62   
impl
   64         -
    ::aws_smithy_http_server::response::IntoResponse<
   65         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          63  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          64  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   66     65   
    > for crate::output::RpcEchoOutput
   67     66   
{
   68         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          67  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   69     68   
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_response(self) {
   70     69   
            Ok(response) => response,
   71     70   
            Err(e) => {
   72     71   
                ::tracing::error!(error = %e, "failed to serialize response");
   73         -
                ::aws_smithy_http_server::response::IntoResponse::<
   74         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   75         -
                >::into_response(
   76         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
   77         -
                        e,
   78         -
                    ),
   79         -
                )
          72  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
   80     73   
            }
   81     74   
        }
   82     75   
    }
   83     76   
}
   84     77   
impl
   85         -
    ::aws_smithy_http_server::response::IntoResponse<
   86         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
          78  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          79  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
   87     80   
    > for crate::error::RPCEchoError
   88     81   
{
   89         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          82  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   90     83   
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_error(&self) {
   91     84   
            Ok(mut response) => {
   92     85   
                response.extensions_mut().insert(
   93         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
          86  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
          87  +
                        self.name(),
          88  +
                    ),
   94     89   
                );
   95     90   
                response
   96     91   
            }
   97     92   
            Err(e) => {
   98     93   
                ::tracing::error!(error = %e, "failed to serialize response");
   99         -
                ::aws_smithy_http_server::response::IntoResponse::<
  100         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  101         -
                >::into_response(
  102         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  103         -
                        e,
  104         -
                    ),
  105         -
                )
          94  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  106     95   
            }
  107     96   
        }
  108     97   
    }
  109     98   
}
  110     99   
  111    100   
::pin_project_lite::pin_project! {
  112    101   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  113    102   
    /// [`MatchInput`](crate::input::MatchInput) using modelled bindings.
  114    103   
    pub struct MatchInputFuture {
  115         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         104  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  116    105   
    }
  117    106   
}
  118    107   
  119    108   
impl std::future::Future for MatchInputFuture {
  120    109   
    type Output = Result<
  121    110   
        crate::input::MatchInput,
  122         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         111  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  123    112   
    >;
  124    113   
  125    114   
    fn poll(
  126    115   
        self: std::pin::Pin<&mut Self>,
  127    116   
        cx: &mut std::task::Context<'_>,
  128    117   
    ) -> std::task::Poll<Self::Output> {
  129    118   
        let this = self.project();
  130    119   
        this.inner.as_mut().poll(cx)
  131    120   
    }
  132    121   
}
  133    122   
  134    123   
impl<B>
  135         -
    ::aws_smithy_http_server::request::FromRequest<
  136         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         124  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         125  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  137    126   
        B,
  138    127   
    > for crate::input::MatchInput
  139    128   
where
  140         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         129  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  141    130   
    B: 'static,
  142    131   
  143    132   
    B::Data: Send,
  144         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  145         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         133  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         134  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  146    135   
{
  147         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         136  +
    type Rejection =
         137  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  148    138   
    type Future = MatchInputFuture;
  149    139   
  150    140   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  151    141   
        let fut = async move {
  152         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         142  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  153    143   
                request.headers(),
  154    144   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  155    145   
            ) {
  156         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         146  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  157    147   
            }
  158    148   
            crate::protocol_serde::shape_match::de_match_http_request(request).await
  159    149   
        };
  160    150   
        use ::futures_util::future::TryFutureExt;
  161         -
        let fut = fut.map_err(
  162         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  163         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  164         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  165         -
            },
  166         -
        );
         151  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         152  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         153  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         154  +
                    });
  167    155   
        MatchInputFuture {
  168    156   
            inner: Box::pin(fut),
  169    157   
        }
  170    158   
    }
  171    159   
}
  172    160   
impl
  173         -
    ::aws_smithy_http_server::response::IntoResponse<
  174         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         161  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         162  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  175    163   
    > for crate::output::MatchOutput
  176    164   
{
  177         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         165  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  178    166   
        match crate::protocol_serde::shape_match::ser_match_http_response(self) {
  179    167   
            Ok(response) => response,
  180    168   
            Err(e) => {
  181    169   
                ::tracing::error!(error = %e, "failed to serialize response");
  182         -
                ::aws_smithy_http_server::response::IntoResponse::<
  183         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  184         -
                >::into_response(
  185         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  186         -
                        e,
  187         -
                    ),
  188         -
                )
         170  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  189    171   
            }
  190    172   
        }
  191    173   
    }
  192    174   
}
  193    175   
impl
  194         -
    ::aws_smithy_http_server::response::IntoResponse<
  195         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         176  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         177  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  196    178   
    > for crate::error::MatchError
  197    179   
{
  198         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         180  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  199    181   
        match crate::protocol_serde::shape_match::ser_match_http_error(&self) {
  200    182   
            Ok(mut response) => {
  201    183   
                response.extensions_mut().insert(
  202         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         184  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         185  +
                        self.name(),
         186  +
                    ),
  203    187   
                );
  204    188   
                response
  205    189   
            }
  206    190   
            Err(e) => {
  207    191   
                ::tracing::error!(error = %e, "failed to serialize response");
  208         -
                ::aws_smithy_http_server::response::IntoResponse::<
  209         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  210         -
                >::into_response(
  211         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  212         -
                        e,
  213         -
                    ),
  214         -
                )
         192  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  215    193   
            }
  216    194   
        }
  217    195   
    }
  218    196   
}
  219    197   
  220    198   
::pin_project_lite::pin_project! {
  221    199   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  222    200   
    /// [`OptionInput`](crate::input::OptionInput) using modelled bindings.
  223    201   
    pub struct OptionInputFuture {
  224         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         202  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  225    203   
    }
  226    204   
}
  227    205   
  228    206   
impl std::future::Future for OptionInputFuture {
  229    207   
    type Output = Result<
  230    208   
        crate::input::OptionInput,
  231         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         209  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  232    210   
    >;
  233    211   
  234    212   
    fn poll(
  235    213   
        self: std::pin::Pin<&mut Self>,
  236    214   
        cx: &mut std::task::Context<'_>,
  237    215   
    ) -> std::task::Poll<Self::Output> {
  238    216   
        let this = self.project();
  239    217   
        this.inner.as_mut().poll(cx)
  240    218   
    }
  241    219   
}
  242    220   
  243    221   
impl<B>
  244         -
    ::aws_smithy_http_server::request::FromRequest<
  245         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         222  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         223  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  246    224   
        B,
  247    225   
    > for crate::input::OptionInput
  248    226   
where
  249         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         227  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  250    228   
    B: 'static,
  251    229   
  252    230   
    B::Data: Send,
  253         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  254         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         231  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         232  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  255    233   
{
  256         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         234  +
    type Rejection =
         235  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  257    236   
    type Future = OptionInputFuture;
  258    237   
  259    238   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  260    239   
        let fut = async move {
  261         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         240  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  262    241   
                request.headers(),
  263    242   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  264    243   
            ) {
  265         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         244  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  266    245   
            }
  267    246   
            crate::protocol_serde::shape_option::de_option_http_request(request).await
  268    247   
        };
  269    248   
        use ::futures_util::future::TryFutureExt;
  270         -
        let fut = fut.map_err(
  271         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  272         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  273         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  274         -
            },
  275         -
        );
         249  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         250  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         251  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         252  +
                    });
  276    253   
        OptionInputFuture {
  277    254   
            inner: Box::pin(fut),
  278    255   
        }
  279    256   
    }
  280    257   
}
  281    258   
impl
  282         -
    ::aws_smithy_http_server::response::IntoResponse<
  283         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         259  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         260  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  284    261   
    > for crate::output::OptionOutput
  285    262   
{
  286         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         263  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  287    264   
        match crate::protocol_serde::shape_option::ser_option_http_response(self) {
  288    265   
            Ok(response) => response,
  289    266   
            Err(e) => {
  290    267   
                ::tracing::error!(error = %e, "failed to serialize response");
  291         -
                ::aws_smithy_http_server::response::IntoResponse::<
  292         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  293         -
                >::into_response(
  294         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  295         -
                        e,
  296         -
                    ),
  297         -
                )
         268  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  298    269   
            }
  299    270   
        }
  300    271   
    }
  301    272   
}
  302    273   
impl
  303         -
    ::aws_smithy_http_server::response::IntoResponse<
  304         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         274  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         275  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  305    276   
    > for crate::error::OptionError
  306    277   
{
  307         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         278  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  308    279   
        match crate::protocol_serde::shape_option::ser_option_http_error(&self) {
  309    280   
            Ok(mut response) => {
  310    281   
                response.extensions_mut().insert(
  311         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         282  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         283  +
                        self.name(),
         284  +
                    ),
  312    285   
                );
  313    286   
                response
  314    287   
            }
  315    288   
            Err(e) => {
  316    289   
                ::tracing::error!(error = %e, "failed to serialize response");
  317         -
                ::aws_smithy_http_server::response::IntoResponse::<
  318         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  319         -
                >::into_response(
  320         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  321         -
                        e,
  322         -
                    ),
  323         -
                )
         290  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  324    291   
            }
  325    292   
        }
  326    293   
    }
  327    294   
}
  328    295   
  329    296   
::pin_project_lite::pin_project! {
  330    297   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  331    298   
    /// [`ResultInput`](crate::input::ResultInput) using modelled bindings.
  332    299   
    pub struct ResultInputFuture {
  333         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         300  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  334    301   
    }
  335    302   
}
  336    303   
  337    304   
impl std::future::Future for ResultInputFuture {
  338    305   
    type Output = Result<
  339    306   
        crate::input::ResultInput,
  340         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         307  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  341    308   
    >;
  342    309   
  343    310   
    fn poll(
  344    311   
        self: std::pin::Pin<&mut Self>,
  345    312   
        cx: &mut std::task::Context<'_>,
  346    313   
    ) -> std::task::Poll<Self::Output> {
  347    314   
        let this = self.project();
  348    315   
        this.inner.as_mut().poll(cx)
  349    316   
    }
  350    317   
}
  351    318   
  352    319   
impl<B>
  353         -
    ::aws_smithy_http_server::request::FromRequest<
  354         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         320  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         321  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  355    322   
        B,
  356    323   
    > for crate::input::ResultInput
  357    324   
where
  358         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         325  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  359    326   
    B: 'static,
  360    327   
  361    328   
    B::Data: Send,
  362         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  363         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         329  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         330  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  364    331   
{
  365         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         332  +
    type Rejection =
         333  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  366    334   
    type Future = ResultInputFuture;
  367    335   
  368    336   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  369    337   
        let fut = async move {
  370         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         338  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  371    339   
                request.headers(),
  372    340   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  373    341   
            ) {
  374         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         342  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  375    343   
            }
  376    344   
            crate::protocol_serde::shape_result::de_result_http_request(request).await
  377    345   
        };
  378    346   
        use ::futures_util::future::TryFutureExt;
  379         -
        let fut = fut.map_err(
  380         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  381         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  382         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  383         -
            },
  384         -
        );
         347  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         348  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         349  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         350  +
                    });
  385    351   
        ResultInputFuture {
  386    352   
            inner: Box::pin(fut),
  387    353   
        }
  388    354   
    }
  389    355   
}
  390    356   
impl
  391         -
    ::aws_smithy_http_server::response::IntoResponse<
  392         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         357  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         358  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  393    359   
    > for crate::output::ResultOutput
  394    360   
{
  395         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         361  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  396    362   
        match crate::protocol_serde::shape_result::ser_result_http_response(self) {
  397    363   
            Ok(response) => response,
  398    364   
            Err(e) => {
  399    365   
                ::tracing::error!(error = %e, "failed to serialize response");
  400         -
                ::aws_smithy_http_server::response::IntoResponse::<
  401         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  402         -
                >::into_response(
  403         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  404         -
                        e,
  405         -
                    ),
  406         -
                )
         366  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  407    367   
            }
  408    368   
        }
  409    369   
    }
  410    370   
}
  411    371   
impl
  412         -
    ::aws_smithy_http_server::response::IntoResponse<
  413         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         372  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         373  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  414    374   
    > for crate::error::ResultError
  415    375   
{
  416         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         376  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  417    377   
        match crate::protocol_serde::shape_result::ser_result_http_error(&self) {
  418    378   
            Ok(mut response) => {
  419    379   
                response.extensions_mut().insert(
  420         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         380  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         381  +
                        self.name(),
         382  +
                    ),
  421    383   
                );
  422    384   
                response
  423    385   
            }
  424    386   
            Err(e) => {
  425    387   
                ::tracing::error!(error = %e, "failed to serialize response");
  426         -
                ::aws_smithy_http_server::response::IntoResponse::<
  427         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  428         -
                >::into_response(
  429         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  430         -
                        e,
  431         -
                    ),
  432         -
                )
         388  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  433    389   
            }
  434    390   
        }
  435    391   
    }
  436    392   
}
  437    393   
  438    394   
::pin_project_lite::pin_project! {
  439    395   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  440    396   
    /// [`ErrCollisionsInput`](crate::input::ErrCollisionsInput) using modelled bindings.
  441    397   
    pub struct ErrCollisionsInputFuture {
  442         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         398  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  443    399   
    }
  444    400   
}
  445    401   
  446    402   
impl std::future::Future for ErrCollisionsInputFuture {
  447    403   
    type Output = Result<
  448    404   
        crate::input::ErrCollisionsInput,
  449         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         405  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  450    406   
    >;
  451    407   
  452    408   
    fn poll(
  453    409   
        self: std::pin::Pin<&mut Self>,
  454    410   
        cx: &mut std::task::Context<'_>,
  455    411   
    ) -> std::task::Poll<Self::Output> {
  456    412   
        let this = self.project();
  457    413   
        this.inner.as_mut().poll(cx)
  458    414   
    }
  459    415   
}
  460    416   
  461    417   
impl<B>
  462         -
    ::aws_smithy_http_server::request::FromRequest<
  463         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         418  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         419  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  464    420   
        B,
  465    421   
    > for crate::input::ErrCollisionsInput
  466    422   
where
  467         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         423  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  468    424   
    B: 'static,
  469    425   
  470    426   
    B::Data: Send,
  471         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  472         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         427  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         428  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  473    429   
{
  474         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         430  +
    type Rejection =
         431  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  475    432   
    type Future = ErrCollisionsInputFuture;
  476    433   
  477    434   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  478    435   
        let fut = async move {
  479         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         436  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  480    437   
                request.headers(),
  481    438   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  482    439   
            ) {
  483         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         440  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  484    441   
            }
  485    442   
            crate::protocol_serde::shape_err_collisions::de_err_collisions_http_request(request)
  486    443   
                .await
  487    444   
        };
  488    445   
        use ::futures_util::future::TryFutureExt;
  489         -
        let fut = fut.map_err(
  490         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  491         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  492         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  493         -
            },
  494         -
        );
         446  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         447  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         448  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         449  +
                    });
  495    450   
        ErrCollisionsInputFuture {
  496    451   
            inner: Box::pin(fut),
  497    452   
        }
  498    453   
    }
  499    454   
}
  500    455   
impl
  501         -
    ::aws_smithy_http_server::response::IntoResponse<
  502         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         456  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         457  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  503    458   
    > for crate::output::ErrCollisionsOutput
  504    459   
{
  505         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         460  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  506    461   
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_response(self) {
  507    462   
            Ok(response) => response,
  508    463   
            Err(e) => {
  509    464   
                ::tracing::error!(error = %e, "failed to serialize response");
  510         -
                ::aws_smithy_http_server::response::IntoResponse::<
  511         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  512         -
                >::into_response(
  513         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  514         -
                        e,
  515         -
                    ),
  516         -
                )
         465  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  517    466   
            }
  518    467   
        }
  519    468   
    }
  520    469   
}
  521    470   
impl
  522         -
    ::aws_smithy_http_server::response::IntoResponse<
  523         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         471  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         472  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  524    473   
    > for crate::error::ErrCollisionsError
  525    474   
{
  526         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         475  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  527    476   
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_error(&self) {
  528    477   
            Ok(mut response) => {
  529    478   
                response.extensions_mut().insert(
  530         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         479  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         480  +
                        self.name(),
         481  +
                    ),
  531    482   
                );
  532    483   
                response
  533    484   
            }
  534    485   
            Err(e) => {
  535    486   
                ::tracing::error!(error = %e, "failed to serialize response");
  536         -
                ::aws_smithy_http_server::response::IntoResponse::<
  537         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  538         -
                >::into_response(
  539         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  540         -
                        e,
  541         -
                    ),
  542         -
                )
         487  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  543    488   
            }
  544    489   
        }
  545    490   
    }
  546    491   
}
  547    492   
  548    493   
::pin_project_lite::pin_project! {
  549    494   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  550    495   
    /// [`StructureNamePunningInput`](crate::input::StructureNamePunningInput) using modelled bindings.
  551    496   
    pub struct StructureNamePunningInputFuture {
  552         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         497  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  553    498   
    }
  554    499   
}
  555    500   
  556    501   
impl std::future::Future for StructureNamePunningInputFuture {
  557    502   
    type Output = Result<
  558    503   
        crate::input::StructureNamePunningInput,
  559         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         504  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  560    505   
    >;
  561    506   
  562    507   
    fn poll(
  563    508   
        self: std::pin::Pin<&mut Self>,
  564    509   
        cx: &mut std::task::Context<'_>,
  565    510   
    ) -> std::task::Poll<Self::Output> {
  566    511   
        let this = self.project();
  567    512   
        this.inner.as_mut().poll(cx)
  568    513   
    }
  569    514   
}
  570    515   
  571    516   
impl<B>
  572         -
    ::aws_smithy_http_server::request::FromRequest<
  573         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         517  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         518  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  574    519   
        B,
  575    520   
    > for crate::input::StructureNamePunningInput
  576    521   
where
  577         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         522  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  578    523   
    B: 'static,
  579    524   
  580    525   
    B::Data: Send,
  581         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  582         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         526  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         527  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  583    528   
{
  584         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         529  +
    type Rejection =
         530  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  585    531   
    type Future = StructureNamePunningInputFuture;
  586    532   
  587    533   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  588    534   
        let fut = async move {
  589         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         535  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  590    536   
                request.headers(),
  591    537   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  592    538   
            ) {
  593         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         539  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  594    540   
            }
  595    541   
            crate::protocol_serde::shape_structure_name_punning::de_structure_name_punning_http_request(request)
  596    542   
                            .await
  597    543   
        };
  598    544   
        use ::futures_util::future::TryFutureExt;
  599         -
        let fut = fut.map_err(
  600         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  601         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  602         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  603         -
            },
  604         -
        );
         545  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         546  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         547  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         548  +
                    });
  605    549   
        StructureNamePunningInputFuture {
  606    550   
            inner: Box::pin(fut),
  607    551   
        }
  608    552   
    }
  609    553   
}
  610    554   
impl
  611         -
    ::aws_smithy_http_server::response::IntoResponse<
  612         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         555  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         556  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  613    557   
    > for crate::output::StructureNamePunningOutput
  614    558   
{
  615         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         559  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  616    560   
        match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_response(self) {
  617    561   
                        Ok(response) => response,
  618    562   
                        Err(e) => {
  619    563   
                            ::tracing::error!(error = %e, "failed to serialize response");
  620         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         564  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  621    565   
                        }
  622    566   
                    }
  623    567   
    }
  624    568   
}
  625    569   
impl
  626         -
    ::aws_smithy_http_server::response::IntoResponse<
  627         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         570  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         571  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  628    572   
    > for crate::error::StructureNamePunningError
  629    573   
{
  630         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         574  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  631    575   
        match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_error(&self) {
  632    576   
            Ok(mut response) => {
  633         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         577  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  634    578   
                response
  635    579   
            },
  636    580   
            Err(e) => {
  637    581   
                ::tracing::error!(error = %e, "failed to serialize response");
  638         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         582  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  639    583   
            }
  640    584   
        }
  641    585   
    }
  642    586   
}
  643    587   
  644    588   
::pin_project_lite::pin_project! {
  645    589   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  646    590   
    /// [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) using modelled bindings.
  647    591   
    pub struct ReservedWordsAsMembersInputFuture {
  648         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         592  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  649    593   
    }
  650    594   
}
  651    595   
  652    596   
impl std::future::Future for ReservedWordsAsMembersInputFuture {
  653    597   
    type Output = Result<
  654    598   
        crate::input::ReservedWordsAsMembersInput,
  655         -
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
         599  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  656    600   
    >;
  657    601   
  658    602   
    fn poll(
  659    603   
        self: std::pin::Pin<&mut Self>,
  660    604   
        cx: &mut std::task::Context<'_>,
  661    605   
    ) -> std::task::Poll<Self::Output> {
  662    606   
        let this = self.project();
  663    607   
        this.inner.as_mut().poll(cx)
  664    608   
    }
  665    609   
}
  666    610   
  667    611   
impl<B>
  668         -
    ::aws_smithy_http_server::request::FromRequest<
  669         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         612  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         613  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  670    614   
        B,
  671    615   
    > for crate::input::ReservedWordsAsMembersInput
  672    616   
where
  673         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         617  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  674    618   
    B: 'static,
  675    619   
  676    620   
    B::Data: Send,
  677         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  678         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         621  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
         622  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  679    623   
{
  680         -
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
         624  +
    type Rejection =
         625  +
        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  681    626   
    type Future = ReservedWordsAsMembersInputFuture;
  682    627   
  683    628   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  684    629   
        let fut = async move {
  685         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         630  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  686    631   
                request.headers(),
  687    632   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  688    633   
            ) {
  689         -
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
         634  +
                return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  690    635   
            }
  691    636   
            crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members_http_request(request)
  692    637   
                            .await
  693    638   
        };
  694    639   
        use ::futures_util::future::TryFutureExt;
  695         -
        let fut = fut.map_err(
  696         -
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  697         -
                ::tracing::debug!(error = %e, "failed to deserialize request");
  698         -
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  699         -
            },
  700         -
        );
         640  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
         641  +
                        ::tracing::debug!(error = %e, "failed to deserialize request");
         642  +
                        ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
         643  +
                    });
  701    644   
        ReservedWordsAsMembersInputFuture {
  702    645   
            inner: Box::pin(fut),
  703    646   
        }
  704    647   
    }
  705    648   
}
  706    649   
impl
  707         -
    ::aws_smithy_http_server::response::IntoResponse<
  708         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         650  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         651  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  709    652   
    > for crate::output::ReservedWordsAsMembersOutput
  710    653   
{
  711         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         654  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  712    655   
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_response(self) {
  713    656   
                        Ok(response) => response,
  714    657   
                        Err(e) => {
  715    658   
                            ::tracing::error!(error = %e, "failed to serialize response");
  716         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         659  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  717    660   
                        }
  718    661   
                    }
  719    662   
    }
  720    663   
}
  721    664   
impl
  722         -
    ::aws_smithy_http_server::response::IntoResponse<
  723         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         665  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         666  +
        ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
  724    667   
    > for crate::error::ReservedWordsAsMembersError
  725    668   
{
  726         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         669  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  727    670   
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_error(&self) {
  728    671   
            Ok(mut response) => {
  729         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         672  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  730    673   
                response
  731    674   
            },
  732    675   
            Err(e) => {
  733    676   
                ::tracing::error!(error = %e, "failed to serialize response");
  734         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         677  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  735    678   
            }
  736    679   
        }
  737    680   
    }
  738    681   
}

tmp-codegen-diff/codegen-server-test-python/naming_test_ops/rust-server-codegen-python/src/operation_shape.rs

@@ -1,1 +189,209 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
pub struct RpcEcho;
    4      4   
    5         -
impl ::aws_smithy_http_server::operation::OperationShape for RpcEcho {
    6         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7         -
        ::aws_smithy_http_server::shape_id::ShapeId::new("crate#RPCEcho", "crate", "RPCEcho");
           5  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for RpcEcho {
           6  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           7  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
           8  +
            "crate#RPCEcho",
           9  +
            "crate",
          10  +
            "RPCEcho",
          11  +
        );
    8     12   
    9     13   
    type Input = crate::input::RpcEchoInput;
   10     14   
    type Output = crate::output::RpcEchoOutput;
   11     15   
    type Error = crate::error::RPCEchoError;
   12     16   
}
   13     17   
   14         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for RpcEcho {
   15         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   16         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          18  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for RpcEcho {
          19  +
    type RequestFmt =
          20  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          21  +
    type ResponseFmt =
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   17     23   
   18     24   
    fn request_fmt() -> Self::RequestFmt {
   19         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          25  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   20     26   
    }
   21     27   
   22     28   
    fn response_fmt() -> Self::ResponseFmt {
   23         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          29  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   24     30   
    }
   25     31   
}
   26     32   
   27     33   
#[allow(missing_docs)] // documentation missing in model
   28     34   
pub struct Match;
   29     35   
   30         -
impl ::aws_smithy_http_server::operation::OperationShape for Match {
   31         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   32         -
        ::aws_smithy_http_server::shape_id::ShapeId::new("crate#Match", "crate", "Match");
          36  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Match {
          37  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          38  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Match", "crate", "Match");
   33     39   
   34     40   
    type Input = crate::input::MatchInput;
   35     41   
    type Output = crate::output::MatchOutput;
   36     42   
    type Error = crate::error::MatchError;
   37     43   
}
   38     44   
   39         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for Match {
   40         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   41         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          45  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Match {
          46  +
    type RequestFmt =
          47  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          48  +
    type ResponseFmt =
          49  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   42     50   
   43     51   
    fn request_fmt() -> Self::RequestFmt {
   44         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          52  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   45     53   
    }
   46     54   
   47     55   
    fn response_fmt() -> Self::ResponseFmt {
   48         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          56  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   49     57   
    }
   50     58   
}
   51     59   
   52     60   
#[allow(missing_docs)] // documentation missing in model
   53     61   
pub struct Option;
   54     62   
   55         -
impl ::aws_smithy_http_server::operation::OperationShape for Option {
   56         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   57         -
        ::aws_smithy_http_server::shape_id::ShapeId::new("crate#Option", "crate", "Option");
          63  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Option {
          64  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          65  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Option", "crate", "Option");
   58     66   
   59     67   
    type Input = crate::input::OptionInput;
   60     68   
    type Output = crate::output::OptionOutput;
   61     69   
    type Error = crate::error::OptionError;
   62     70   
}
   63     71   
   64         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for Option {
   65         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   66         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          72  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Option {
          73  +
    type RequestFmt =
          74  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          75  +
    type ResponseFmt =
          76  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   67     77   
   68     78   
    fn request_fmt() -> Self::RequestFmt {
   69         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          79  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   70     80   
    }
   71     81   
   72     82   
    fn response_fmt() -> Self::ResponseFmt {
   73         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          83  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   74     84   
    }
   75     85   
}
   76     86   
   77     87   
#[allow(missing_docs)] // documentation missing in model
   78     88   
pub struct Result;
   79     89   
   80         -
impl ::aws_smithy_http_server::operation::OperationShape for Result {
   81         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   82         -
        ::aws_smithy_http_server::shape_id::ShapeId::new("crate#Result", "crate", "Result");
          90  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Result {
          91  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          92  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Result", "crate", "Result");
   83     93   
   84     94   
    type Input = crate::input::ResultInput;
   85     95   
    type Output = crate::output::ResultOutput;
   86     96   
    type Error = crate::error::ResultError;
   87     97   
}
   88     98   
   89         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for Result {
   90         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   91         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          99  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Result {
         100  +
    type RequestFmt =
         101  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         102  +
    type ResponseFmt =
         103  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   92    104   
   93    105   
    fn request_fmt() -> Self::RequestFmt {
   94         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         106  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   95    107   
    }
   96    108   
   97    109   
    fn response_fmt() -> Self::ResponseFmt {
   98         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         110  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   99    111   
    }
  100    112   
}
  101    113   
  102    114   
#[allow(missing_docs)] // documentation missing in model
  103    115   
pub struct ErrCollisions;
  104    116   
  105         -
impl ::aws_smithy_http_server::operation::OperationShape for ErrCollisions {
  106         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  107         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         117  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ErrCollisions {
         118  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         119  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  108    120   
            "crate#ErrCollisions",
  109    121   
            "crate",
  110    122   
            "ErrCollisions",
  111    123   
        );
  112    124   
  113    125   
    type Input = crate::input::ErrCollisionsInput;
  114    126   
    type Output = crate::output::ErrCollisionsOutput;
  115    127   
    type Error = crate::error::ErrCollisionsError;
  116    128   
}
  117    129   
  118         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ErrCollisions {
  119         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  120         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         130  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for ErrCollisions {
         131  +
    type RequestFmt =
         132  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         133  +
    type ResponseFmt =
         134  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  121    135   
  122    136   
    fn request_fmt() -> Self::RequestFmt {
  123         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         137  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  124    138   
    }
  125    139   
  126    140   
    fn response_fmt() -> Self::ResponseFmt {
  127         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         141  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  128    142   
    }
  129    143   
}
  130    144   
  131    145   
#[allow(missing_docs)] // documentation missing in model
  132    146   
pub struct StructureNamePunning;
  133    147   
  134         -
impl ::aws_smithy_http_server::operation::OperationShape for StructureNamePunning {
  135         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  136         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         148  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StructureNamePunning {
         149  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         150  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  137    151   
            "crate#StructureNamePunning",
  138    152   
            "crate",
  139    153   
            "StructureNamePunning",
  140    154   
        );
  141    155   
  142    156   
    type Input = crate::input::StructureNamePunningInput;
  143    157   
    type Output = crate::output::StructureNamePunningOutput;
  144    158   
    type Error = crate::error::StructureNamePunningError;
  145    159   
}
  146    160   
  147         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StructureNamePunning {
  148         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  149         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         161  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         162  +
    for StructureNamePunning
         163  +
{
         164  +
    type RequestFmt =
         165  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         166  +
    type ResponseFmt =
         167  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  150    168   
  151    169   
    fn request_fmt() -> Self::RequestFmt {
  152         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         170  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  153    171   
    }
  154    172   
  155    173   
    fn response_fmt() -> Self::ResponseFmt {
  156         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         174  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  157    175   
    }
  158    176   
}
  159    177   
  160    178   
#[allow(missing_docs)] // documentation missing in model
  161    179   
pub struct ReservedWordsAsMembers;
  162    180   
  163         -
impl ::aws_smithy_http_server::operation::OperationShape for ReservedWordsAsMembers {
  164         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  165         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         181  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ReservedWordsAsMembers {
         182  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         183  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  166    184   
            "crate#ReservedWordsAsMembers",
  167    185   
            "crate",
  168    186   
            "ReservedWordsAsMembers",
  169    187   
        );
  170    188   
  171    189   
    type Input = crate::input::ReservedWordsAsMembersInput;
  172    190   
    type Output = crate::output::ReservedWordsAsMembersOutput;
  173    191   
    type Error = crate::error::ReservedWordsAsMembersError;
  174    192   
}
  175    193   
  176         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         194  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  177    195   
    for ReservedWordsAsMembers
  178    196   
{
  179         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  180         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         197  +
    type RequestFmt =
         198  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         199  +
    type ResponseFmt =
         200  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  181    201   
  182    202   
    fn request_fmt() -> Self::RequestFmt {
  183         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         203  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  184    204   
    }
  185    205   
  186    206   
    fn response_fmt() -> Self::ResponseFmt {
  187         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         207  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  188    208   
    }
  189    209   
}

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

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