Server Test Python

Server Test Python

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb (ignoring whitespace)

Files changed:

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

@@ -1,1 +59,59 @@
    2      2   
[package]
    3      3   
name = "misc"
    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#restJson1"
   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 = "misc"
   57     57   
crate-type = ["cdylib"]
   58     58   
   59     59   

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/python/misc/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/misc/rust-server-codegen-python/src/input.rs

@@ -505,505 +565,565 @@
  525    525   
                                            },
  526    526   
            ConstraintViolation::MissingRequiredHeaderSet => crate::model::ValidationExceptionField {
  527    527   
                                                message: format!("Value at '{}/requiredHeaderSet' failed to satisfy constraint: Member must not be null", path),
  528    528   
                                                path: path + "/requiredHeaderSet",
  529    529   
                                            },
  530    530   
            ConstraintViolation::RequiredHeaderSet(inner) => inner.as_validation_exception_field(path + "/requiredHeaderSet"),
  531    531   
        }
  532    532   
        }
  533    533   
    }
  534    534   
    impl ::std::convert::From<ConstraintViolation>
  535         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
         535  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
  536    536   
    {
  537    537   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  538    538   
            let first_validation_exception_field =
  539    539   
                constraint_violation.as_validation_exception_field("".to_owned());
  540    540   
            let validation_exception = crate::error::ValidationException {
  541    541   
                message: format!(
  542    542   
                    "1 validation error detected. {}",
  543    543   
                    &first_validation_exception_field.message
  544    544   
                ),
  545    545   
                field_list: Some(vec![first_validation_exception_field]),
@@ -710,710 +770,770 @@
  730    730   
            path: ::std::string::String,
  731    731   
        ) -> crate::model::ValidationExceptionField {
  732    732   
            match self {
  733    733   
                ConstraintViolation::Inner(inner) => {
  734    734   
                    inner.as_validation_exception_field(path + "/inner")
  735    735   
                }
  736    736   
            }
  737    737   
        }
  738    738   
    }
  739    739   
    impl ::std::convert::From<ConstraintViolation>
  740         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
         740  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
  741    741   
    {
  742    742   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  743    743   
            let first_validation_exception_field =
  744    744   
                constraint_violation.as_validation_exception_field("".to_owned());
  745    745   
            let validation_exception = crate::error::ValidationException {
  746    746   
                message: format!(
  747    747   
                    "1 validation error detected. {}",
  748    748   
                    &first_validation_exception_field.message
  749    749   
                ),
  750    750   
                field_list: Some(vec![first_validation_exception_field]),

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

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

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

@@ -1,1 +588,570 @@
    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   
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
    5      5   
    pub struct ResponseCodeDefaultOperationInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10     10   
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
   11     11   
    type Output = Result<
   12     12   
        crate::input::ResponseCodeDefaultOperationInput,
   13         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
          13  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::RestJson1,
          26  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
          27  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   28     28   
        B,
   29     29   
    > for crate::input::ResponseCodeDefaultOperationInput
   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::rest_json_1::rejection::RequestRejection:
   36         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          35  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          36  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
          38  +
    type Rejection =
          39  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
   39     40   
    type Future = ResponseCodeDefaultOperationInputFuture;
   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_JSON,
   46     47   
            ) {
   47         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
          48  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   48     49   
            }
   49     50   
            crate::protocol_serde::shape_response_code_default_operation::de_response_code_default_operation_http_request(request)
   50     51   
                            .await
   51     52   
        };
   52     53   
        use ::futures_util::future::TryFutureExt;
   53         -
        let fut = fut.map_err(
   54         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
          54  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   55     55   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
   56         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   57         -
                    e,
   58         -
                )
   59         -
            },
   60         -
        );
          56  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
          57  +
                    });
   61     58   
        ResponseCodeDefaultOperationInputFuture {
   62     59   
            inner: Box::pin(fut),
   63     60   
        }
   64     61   
    }
   65     62   
}
   66     63   
impl
   67         -
    ::aws_smithy_http_server::response::IntoResponse<
   68         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          64  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          65  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   69     66   
    > for crate::output::ResponseCodeDefaultOperationOutput
   70     67   
{
   71         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          68  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   72     69   
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
   73     70   
                        Ok(response) => response,
   74     71   
                        Err(e) => {
   75     72   
                            ::tracing::error!(error = %e, "failed to serialize response");
   76         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
          73  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   77     74   
                        }
   78     75   
                    }
   79     76   
    }
   80     77   
}
   81     78   
impl
   82         -
    ::aws_smithy_http_server::response::IntoResponse<
   83         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          79  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          80  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   84     81   
    > for crate::error::ResponseCodeDefaultOperationError
   85     82   
{
   86         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          83  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   87     84   
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_error(&self) {
   88     85   
            Ok(mut response) => {
   89         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
          86  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
   90     87   
                response
   91     88   
            },
   92     89   
            Err(e) => {
   93     90   
                ::tracing::error!(error = %e, "failed to serialize response");
   94         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
          91  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   95     92   
            }
   96     93   
        }
   97     94   
    }
   98     95   
}
   99     96   
  100     97   
::pin_project_lite::pin_project! {
  101     98   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  102     99   
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
  103    100   
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
  104         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         101  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  105    102   
    }
  106    103   
}
  107    104   
  108    105   
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
  109    106   
    type Output = Result<
  110    107   
        crate::input::ResponseCodeHttpFallbackOperationInput,
  111         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         108  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  112    109   
    >;
  113    110   
  114    111   
    fn poll(
  115    112   
        self: std::pin::Pin<&mut Self>,
  116    113   
        cx: &mut std::task::Context<'_>,
  117    114   
    ) -> std::task::Poll<Self::Output> {
  118    115   
        let this = self.project();
  119    116   
        this.inner.as_mut().poll(cx)
  120    117   
    }
  121    118   
}
  122    119   
  123    120   
impl<B>
  124         -
    ::aws_smithy_http_server::request::FromRequest<
  125         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         121  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         122  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  126    123   
        B,
  127    124   
    > for crate::input::ResponseCodeHttpFallbackOperationInput
  128    125   
where
  129         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         126  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  130    127   
    B: 'static,
  131    128   
  132    129   
    B::Data: Send,
  133         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  134         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         130  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         131  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  135    132   
{
  136         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         133  +
    type Rejection =
         134  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  137    135   
    type Future = ResponseCodeHttpFallbackOperationInputFuture;
  138    136   
  139    137   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  140    138   
        let fut = async move {
  141         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         139  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  142    140   
                request.headers(),
  143    141   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  144    142   
            ) {
  145         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         143  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  146    144   
            }
  147    145   
            crate::protocol_serde::shape_response_code_http_fallback_operation::de_response_code_http_fallback_operation_http_request(request)
  148    146   
                            .await
  149    147   
        };
  150    148   
        use ::futures_util::future::TryFutureExt;
  151         -
        let fut = fut.map_err(
  152         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         149  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  153    150   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  154         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  155         -
                    e,
  156         -
                )
  157         -
            },
  158         -
        );
         151  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         152  +
                    });
  159    153   
        ResponseCodeHttpFallbackOperationInputFuture {
  160    154   
            inner: Box::pin(fut),
  161    155   
        }
  162    156   
    }
  163    157   
}
  164    158   
impl
  165         -
    ::aws_smithy_http_server::response::IntoResponse<
  166         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         159  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         160  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  167    161   
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
  168    162   
{
  169         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         163  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  170    164   
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
  171    165   
                        Ok(response) => response,
  172    166   
                        Err(e) => {
  173    167   
                            ::tracing::error!(error = %e, "failed to serialize response");
  174         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         168  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  175    169   
                        }
  176    170   
                    }
  177    171   
    }
  178    172   
}
  179    173   
impl
  180         -
    ::aws_smithy_http_server::response::IntoResponse<
  181         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         174  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         175  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  182    176   
    > for crate::error::ResponseCodeHttpFallbackOperationError
  183    177   
{
  184         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         178  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  185    179   
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_error(&self) {
  186    180   
            Ok(mut response) => {
  187         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         181  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  188    182   
                response
  189    183   
            },
  190    184   
            Err(e) => {
  191    185   
                ::tracing::error!(error = %e, "failed to serialize response");
  192         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         186  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  193    187   
            }
  194    188   
        }
  195    189   
    }
  196    190   
}
  197    191   
  198    192   
::pin_project_lite::pin_project! {
  199    193   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  200    194   
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
  201    195   
    pub struct ResponseCodeRequiredOperationInputFuture {
  202         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         196  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  203    197   
    }
  204    198   
}
  205    199   
  206    200   
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
  207    201   
    type Output = Result<
  208    202   
        crate::input::ResponseCodeRequiredOperationInput,
  209         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         203  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  210    204   
    >;
  211    205   
  212    206   
    fn poll(
  213    207   
        self: std::pin::Pin<&mut Self>,
  214    208   
        cx: &mut std::task::Context<'_>,
  215    209   
    ) -> std::task::Poll<Self::Output> {
  216    210   
        let this = self.project();
  217    211   
        this.inner.as_mut().poll(cx)
  218    212   
    }
  219    213   
}
  220    214   
  221    215   
impl<B>
  222         -
    ::aws_smithy_http_server::request::FromRequest<
  223         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         216  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         217  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  224    218   
        B,
  225    219   
    > for crate::input::ResponseCodeRequiredOperationInput
  226    220   
where
  227         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         221  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  228    222   
    B: 'static,
  229    223   
  230    224   
    B::Data: Send,
  231         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  232         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         225  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         226  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  233    227   
{
  234         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         228  +
    type Rejection =
         229  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  235    230   
    type Future = ResponseCodeRequiredOperationInputFuture;
  236    231   
  237    232   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  238    233   
        let fut = async move {
  239         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         234  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  240    235   
                request.headers(),
  241    236   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  242    237   
            ) {
  243         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         238  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  244    239   
            }
  245    240   
            crate::protocol_serde::shape_response_code_required_operation::de_response_code_required_operation_http_request(request)
  246    241   
                            .await
  247    242   
        };
  248    243   
        use ::futures_util::future::TryFutureExt;
  249         -
        let fut = fut.map_err(
  250         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         244  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  251    245   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  252         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  253         -
                    e,
  254         -
                )
  255         -
            },
  256         -
        );
         246  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         247  +
                    });
  257    248   
        ResponseCodeRequiredOperationInputFuture {
  258    249   
            inner: Box::pin(fut),
  259    250   
        }
  260    251   
    }
  261    252   
}
  262    253   
impl
  263         -
    ::aws_smithy_http_server::response::IntoResponse<
  264         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         254  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         255  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  265    256   
    > for crate::output::ResponseCodeRequiredOperationOutput
  266    257   
{
  267         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         258  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  268    259   
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
  269    260   
                        Ok(response) => response,
  270    261   
                        Err(e) => {
  271    262   
                            ::tracing::error!(error = %e, "failed to serialize response");
  272         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         263  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  273    264   
                        }
  274    265   
                    }
  275    266   
    }
  276    267   
}
  277    268   
impl
  278         -
    ::aws_smithy_http_server::response::IntoResponse<
  279         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         269  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         270  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  280    271   
    > for crate::error::ResponseCodeRequiredOperationError
  281    272   
{
  282         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         273  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  283    274   
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_error(&self) {
  284    275   
            Ok(mut response) => {
  285         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         276  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  286    277   
                response
  287    278   
            },
  288    279   
            Err(e) => {
  289    280   
                ::tracing::error!(error = %e, "failed to serialize response");
  290         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         281  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  291    282   
            }
  292    283   
        }
  293    284   
    }
  294    285   
}
  295    286   
  296    287   
::pin_project_lite::pin_project! {
  297    288   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  298    289   
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
  299    290   
    pub struct RequiredHeaderCollectionOperationInputFuture {
  300         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         291  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  301    292   
    }
  302    293   
}
  303    294   
  304    295   
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
  305    296   
    type Output = Result<
  306    297   
        crate::input::RequiredHeaderCollectionOperationInput,
  307         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         298  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  308    299   
    >;
  309    300   
  310    301   
    fn poll(
  311    302   
        self: std::pin::Pin<&mut Self>,
  312    303   
        cx: &mut std::task::Context<'_>,
  313    304   
    ) -> std::task::Poll<Self::Output> {
  314    305   
        let this = self.project();
  315    306   
        this.inner.as_mut().poll(cx)
  316    307   
    }
  317    308   
}
  318    309   
  319    310   
impl<B>
  320         -
    ::aws_smithy_http_server::request::FromRequest<
  321         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         311  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         312  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  322    313   
        B,
  323    314   
    > for crate::input::RequiredHeaderCollectionOperationInput
  324    315   
where
  325         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         316  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  326    317   
    B: 'static,
  327    318   
  328    319   
    B::Data: Send,
  329         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  330         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         320  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         321  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  331    322   
{
  332         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         323  +
    type Rejection =
         324  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  333    325   
    type Future = RequiredHeaderCollectionOperationInputFuture;
  334    326   
  335    327   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  336    328   
        let fut = async move {
  337         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         329  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  338    330   
                request.headers(),
  339    331   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  340    332   
            ) {
  341         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         333  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  342    334   
            }
  343    335   
            crate::protocol_serde::shape_required_header_collection_operation::de_required_header_collection_operation_http_request(request)
  344    336   
                            .await
  345    337   
        };
  346    338   
        use ::futures_util::future::TryFutureExt;
  347         -
        let fut = fut.map_err(
  348         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         339  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  349    340   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  350         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  351         -
                    e,
  352         -
                )
  353         -
            },
  354         -
        );
         341  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         342  +
                    });
  355    343   
        RequiredHeaderCollectionOperationInputFuture {
  356    344   
            inner: Box::pin(fut),
  357    345   
        }
  358    346   
    }
  359    347   
}
  360    348   
impl
  361         -
    ::aws_smithy_http_server::response::IntoResponse<
  362         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         349  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         350  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  363    351   
    > for crate::output::RequiredHeaderCollectionOperationOutput
  364    352   
{
  365         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         353  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  366    354   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
  367    355   
                        Ok(response) => response,
  368    356   
                        Err(e) => {
  369    357   
                            ::tracing::error!(error = %e, "failed to serialize response");
  370         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         358  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  371    359   
                        }
  372    360   
                    }
  373    361   
    }
  374    362   
}
  375    363   
impl
  376         -
    ::aws_smithy_http_server::response::IntoResponse<
  377         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         364  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         365  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  378    366   
    > for crate::error::RequiredHeaderCollectionOperationError
  379    367   
{
  380         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         368  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  381    369   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
  382    370   
            Ok(mut response) => {
  383         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         371  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  384    372   
                response
  385    373   
            },
  386    374   
            Err(e) => {
  387    375   
                ::tracing::error!(error = %e, "failed to serialize response");
  388         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         376  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  389    377   
            }
  390    378   
        }
  391    379   
    }
  392    380   
}
  393    381   
  394    382   
::pin_project_lite::pin_project! {
  395    383   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  396    384   
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
  397    385   
    pub struct RequiredInnerShapeOperationInputFuture {
  398         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         386  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  399    387   
    }
  400    388   
}
  401    389   
  402    390   
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
  403    391   
    type Output = Result<
  404    392   
        crate::input::RequiredInnerShapeOperationInput,
  405         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         393  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  406    394   
    >;
  407    395   
  408    396   
    fn poll(
  409    397   
        self: std::pin::Pin<&mut Self>,
  410    398   
        cx: &mut std::task::Context<'_>,
  411    399   
    ) -> std::task::Poll<Self::Output> {
  412    400   
        let this = self.project();
  413    401   
        this.inner.as_mut().poll(cx)
  414    402   
    }
  415    403   
}
  416    404   
  417    405   
impl<B>
  418         -
    ::aws_smithy_http_server::request::FromRequest<
  419         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         406  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         407  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  420    408   
        B,
  421    409   
    > for crate::input::RequiredInnerShapeOperationInput
  422    410   
where
  423         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         411  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  424    412   
    B: 'static,
  425    413   
  426    414   
    B::Data: Send,
  427         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  428         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         415  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         416  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  429    417   
{
  430         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         418  +
    type Rejection =
         419  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  431    420   
    type Future = RequiredInnerShapeOperationInputFuture;
  432    421   
  433    422   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  434    423   
        let fut = async move {
  435         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         424  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  436    425   
                request.headers(),
  437    426   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  438    427   
            ) {
  439         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         428  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  440    429   
            }
  441    430   
            crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation_http_request(request)
  442    431   
                            .await
  443    432   
        };
  444    433   
        use ::futures_util::future::TryFutureExt;
  445         -
        let fut = fut.map_err(
  446         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         434  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  447    435   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  448         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  449         -
                    e,
  450         -
                )
  451         -
            },
  452         -
        );
         436  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         437  +
                    });
  453    438   
        RequiredInnerShapeOperationInputFuture {
  454    439   
            inner: Box::pin(fut),
  455    440   
        }
  456    441   
    }
  457    442   
}
  458    443   
impl
  459         -
    ::aws_smithy_http_server::response::IntoResponse<
  460         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         444  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         445  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  461    446   
    > for crate::output::RequiredInnerShapeOperationOutput
  462    447   
{
  463         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         448  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  464    449   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
  465    450   
                        Ok(response) => response,
  466    451   
                        Err(e) => {
  467    452   
                            ::tracing::error!(error = %e, "failed to serialize response");
  468         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         453  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  469    454   
                        }
  470    455   
                    }
  471    456   
    }
  472    457   
}
  473    458   
impl
  474         -
    ::aws_smithy_http_server::response::IntoResponse<
  475         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         459  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         460  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  476    461   
    > for crate::error::RequiredInnerShapeOperationError
  477    462   
{
  478         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         463  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  479    464   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
  480    465   
            Ok(mut response) => {
  481         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         466  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  482    467   
                response
  483    468   
            },
  484    469   
            Err(e) => {
  485    470   
                ::tracing::error!(error = %e, "failed to serialize response");
  486         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         471  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  487    472   
            }
  488    473   
        }
  489    474   
    }
  490    475   
}
  491    476   
  492    477   
::pin_project_lite::pin_project! {
  493    478   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  494    479   
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
  495    480   
    pub struct TypeComplexityOperationInputFuture {
  496         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         481  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  497    482   
    }
  498    483   
}
  499    484   
  500    485   
impl std::future::Future for TypeComplexityOperationInputFuture {
  501    486   
    type Output = Result<
  502    487   
        crate::input::TypeComplexityOperationInput,
  503         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         488  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  504    489   
    >;
  505    490   
  506    491   
    fn poll(
  507    492   
        self: std::pin::Pin<&mut Self>,
  508    493   
        cx: &mut std::task::Context<'_>,
  509    494   
    ) -> std::task::Poll<Self::Output> {
  510    495   
        let this = self.project();
  511    496   
        this.inner.as_mut().poll(cx)
  512    497   
    }
  513    498   
}
  514    499   
  515    500   
impl<B>
  516         -
    ::aws_smithy_http_server::request::FromRequest<
  517         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         501  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         502  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  518    503   
        B,
  519    504   
    > for crate::input::TypeComplexityOperationInput
  520    505   
where
  521         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         506  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  522    507   
    B: 'static,
  523    508   
  524    509   
    B::Data: Send,
  525         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  526         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         510  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         511  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  527    512   
{
  528         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         513  +
    type Rejection =
         514  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  529    515   
    type Future = TypeComplexityOperationInputFuture;
  530    516   
  531    517   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  532    518   
        let fut = async move {
  533         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         519  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  534    520   
                request.headers(),
  535    521   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  536    522   
            ) {
  537         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         523  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  538    524   
            }
  539    525   
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_request(request)
  540    526   
                            .await
  541    527   
        };
  542    528   
        use ::futures_util::future::TryFutureExt;
  543         -
        let fut = fut.map_err(
  544         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         529  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  545    530   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  546         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  547         -
                    e,
  548         -
                )
  549         -
            },
  550         -
        );
         531  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         532  +
                    });
  551    533   
        TypeComplexityOperationInputFuture {
  552    534   
            inner: Box::pin(fut),
  553    535   
        }
  554    536   
    }
  555    537   
}
  556    538   
impl
  557         -
    ::aws_smithy_http_server::response::IntoResponse<
  558         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         539  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         540  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  559    541   
    > for crate::output::TypeComplexityOperationOutput
  560    542   
{
  561         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         543  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  562    544   
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
  563    545   
                        Ok(response) => response,
  564    546   
                        Err(e) => {
  565    547   
                            ::tracing::error!(error = %e, "failed to serialize response");
  566         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         548  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  567    549   
                        }
  568    550   
                    }
  569    551   
    }
  570    552   
}
  571    553   
impl
  572         -
    ::aws_smithy_http_server::response::IntoResponse<
  573         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         554  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         555  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  574    556   
    > for crate::error::TypeComplexityOperationError
  575    557   
{
  576         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         558  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  577    559   
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_error(&self) {
  578    560   
            Ok(mut response) => {
  579         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         561  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  580    562   
                response
  581    563   
            },
  582    564   
            Err(e) => {
  583    565   
                ::tracing::error!(error = %e, "failed to serialize response");
  584         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         566  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  585    567   
            }
  586    568   
        }
  587    569   
    }
  588    570   
}

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

@@ -1,1 +241,245 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3      3   
/// This operation tests that the response code defaults to 200 when no other code is set.
    4      4   
pub struct ResponseCodeDefaultOperation;
    5      5   
    6         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
    7         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
           6  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
           7  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           8  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
    9      9   
            "aws.protocoltests.misc#ResponseCodeDefaultOperation",
   10     10   
            "aws.protocoltests.misc",
   11     11   
            "ResponseCodeDefaultOperation",
   12     12   
        );
   13     13   
   14     14   
    type Input = crate::input::ResponseCodeDefaultOperationInput;
   15     15   
    type Output = crate::output::ResponseCodeDefaultOperationOutput;
   16     16   
    type Error = crate::error::ResponseCodeDefaultOperationError;
   17     17   
}
   18     18   
   19         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          19  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   20     20   
    for ResponseCodeDefaultOperation
   21     21   
{
   22         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   23         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   25         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   26         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          22  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          23  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          24  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          25  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          26  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   27     27   
        >,
   28     28   
    >;
   29         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   30         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   31         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          29  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          30  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          31  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   32     32   
    >;
   33     33   
   34     34   
    fn request_fmt() -> Self::RequestFmt {
   35         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          35  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   36     36   
    }
   37     37   
   38     38   
    fn response_fmt() -> Self::ResponseFmt {
   39         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          39  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   40     40   
    }
   41     41   
}
   42     42   
   43     43   
/// This operation tests that the response code defaults to `@http`'s code.
   44     44   
pub struct ResponseCodeHttpFallbackOperation;
   45     45   
   46         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeHttpFallbackOperation {
   47         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   48         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          46  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape
          47  +
    for ResponseCodeHttpFallbackOperation
          48  +
{
          49  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          50  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   49     51   
            "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
   50     52   
            "aws.protocoltests.misc",
   51     53   
            "ResponseCodeHttpFallbackOperation",
   52     54   
        );
   53     55   
   54     56   
    type Input = crate::input::ResponseCodeHttpFallbackOperationInput;
   55     57   
    type Output = crate::output::ResponseCodeHttpFallbackOperationOutput;
   56     58   
    type Error = crate::error::ResponseCodeHttpFallbackOperationError;
   57     59   
}
   58     60   
   59         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          61  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   60     62   
    for ResponseCodeHttpFallbackOperation
   61     63   
{
   62         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   63         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   65         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   66         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          64  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          65  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          66  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          67  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          68  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   67     69   
        >,
   68     70   
    >;
   69         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   70         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   71         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          71  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          72  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          73  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   72     74   
    >;
   73     75   
   74     76   
    fn request_fmt() -> Self::RequestFmt {
   75         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          77  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   76     78   
    }
   77     79   
   78     80   
    fn response_fmt() -> Self::ResponseFmt {
   79         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          81  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   80     82   
    }
   81     83   
}
   82     84   
   83     85   
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
   84     86   
pub struct ResponseCodeRequiredOperation;
   85     87   
   86         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
   87         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   88         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          88  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
          89  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          90  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   89     91   
            "aws.protocoltests.misc#ResponseCodeRequiredOperation",
   90     92   
            "aws.protocoltests.misc",
   91     93   
            "ResponseCodeRequiredOperation",
   92     94   
        );
   93     95   
   94     96   
    type Input = crate::input::ResponseCodeRequiredOperationInput;
   95     97   
    type Output = crate::output::ResponseCodeRequiredOperationOutput;
   96     98   
    type Error = crate::error::ResponseCodeRequiredOperationError;
   97     99   
}
   98    100   
   99         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         101  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  100    102   
    for ResponseCodeRequiredOperation
  101    103   
{
  102         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  103         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  105         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  106         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         104  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         105  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         106  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         107  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         108  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  107    109   
        >,
  108    110   
    >;
  109         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  110         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  111         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         111  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         112  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         113  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  112    114   
    >;
  113    115   
  114    116   
    fn request_fmt() -> Self::RequestFmt {
  115         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         117  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  116    118   
    }
  117    119   
  118    120   
    fn response_fmt() -> Self::ResponseFmt {
  119         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         121  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  120    122   
    }
  121    123   
}
  122    124   
  123    125   
#[allow(missing_docs)] // documentation missing in model
  124    126   
pub struct RequiredHeaderCollectionOperation;
  125    127   
  126         -
impl ::aws_smithy_http_server::operation::OperationShape for RequiredHeaderCollectionOperation {
  127         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  128         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         128  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape
         129  +
    for RequiredHeaderCollectionOperation
         130  +
{
         131  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         132  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  129    133   
            "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
  130    134   
            "aws.protocoltests.misc",
  131    135   
            "RequiredHeaderCollectionOperation",
  132    136   
        );
  133    137   
  134    138   
    type Input = crate::input::RequiredHeaderCollectionOperationInput;
  135    139   
    type Output = crate::output::RequiredHeaderCollectionOperationOutput;
  136    140   
    type Error = crate::error::RequiredHeaderCollectionOperationError;
  137    141   
}
  138    142   
  139         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         143  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  140    144   
    for RequiredHeaderCollectionOperation
  141    145   
{
  142         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  143         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  144         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  145         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         146  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         147  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         148  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         149  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         150  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  147    151   
        >,
  148    152   
    >;
  149         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  150         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  151         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         153  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         154  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         155  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  152    156   
    >;
  153    157   
  154    158   
    fn request_fmt() -> Self::RequestFmt {
  155         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         159  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  156    160   
    }
  157    161   
  158    162   
    fn response_fmt() -> Self::ResponseFmt {
  159         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         163  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  160    164   
    }
  161    165   
}
  162    166   
  163    167   
/// This operation tests that (de)serializing required values from a nested shape works correctly.
  164    168   
pub struct RequiredInnerShapeOperation;
  165    169   
  166         -
impl ::aws_smithy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
  167         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  168         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         170  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
         171  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         172  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  169    173   
            "aws.protocoltests.misc#RequiredInnerShapeOperation",
  170    174   
            "aws.protocoltests.misc",
  171    175   
            "RequiredInnerShapeOperation",
  172    176   
        );
  173    177   
  174    178   
    type Input = crate::input::RequiredInnerShapeOperationInput;
  175    179   
    type Output = crate::output::RequiredInnerShapeOperationOutput;
  176    180   
    type Error = crate::error::RequiredInnerShapeOperationError;
  177    181   
}
  178    182   
  179         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         183  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  180    184   
    for RequiredInnerShapeOperation
  181    185   
{
  182         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  183         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  185         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  186         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         186  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         187  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         188  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         189  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         190  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  187    191   
        >,
  188    192   
    >;
  189         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  190         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  191         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         193  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         194  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         195  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  192    196   
    >;
  193    197   
  194    198   
    fn request_fmt() -> Self::RequestFmt {
  195         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         199  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  196    200   
    }
  197    201   
  198    202   
    fn response_fmt() -> Self::ResponseFmt {
  199         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         203  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  200    204   
    }
  201    205   
}
  202    206   
  203    207   
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
  204    208   
pub struct TypeComplexityOperation;
  205    209   
  206         -
impl ::aws_smithy_http_server::operation::OperationShape for TypeComplexityOperation {
  207         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  208         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         210  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for TypeComplexityOperation {
         211  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         212  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  209    213   
            "aws.protocoltests.misc#TypeComplexityOperation",
  210    214   
            "aws.protocoltests.misc",
  211    215   
            "TypeComplexityOperation",
  212    216   
        );
  213    217   
  214    218   
    type Input = crate::input::TypeComplexityOperationInput;
  215    219   
    type Output = crate::output::TypeComplexityOperationOutput;
  216    220   
    type Error = crate::error::TypeComplexityOperationError;
  217    221   
}
  218    222   
  219         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         223  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  220    224   
    for TypeComplexityOperation
  221    225   
{
  222         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  223         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  224         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  225         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  226         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         226  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         227  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         228  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         229  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         230  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  227    231   
        >,
  228    232   
    >;
  229         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  230         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  231         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         233  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         234  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         235  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  232    236   
    >;
  233    237   
  234    238   
    fn request_fmt() -> Self::RequestFmt {
  235         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         239  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  236    240   
    }
  237    241   
  238    242   
    fn response_fmt() -> Self::ResponseFmt {
  239         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         243  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  240    244   
    }
  241    245   
}

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

@@ -1,1 +164,164 @@
    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_required_header_collection_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RequiredHeaderCollectionOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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 =
   18     18   
            crate::input::required_header_collection_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        if let Some(value) = crate::protocol_serde::shape_required_header_collection_operation_input::de_required_header_list_header(&headers)? {
   24     24   
                                input = input.set_required_header_list(value)
   25     25   
                            }
   26     26   
        if let Some(value) = crate::protocol_serde::shape_required_header_collection_operation_input::de_required_header_set_header(&headers)? {
   27     27   
                                input = input.set_required_header_set(value)
   28     28   
                            }
   29     29   
        input.build()?
   30     30   
    })
   31     31   
}
   32     32   
   33     33   
#[allow(clippy::unnecessary_wraps)]
   34     34   
pub fn ser_required_header_collection_operation_http_response(
   35     35   
    #[allow(unused_variables)] output: crate::output::RequiredHeaderCollectionOperationOutput,
   36     36   
) -> std::result::Result<
   37         -
    ::aws_smithy_http_server::response::Response,
   38         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          37  +
    ::aws_smithy_legacy_http_server::response::Response,
          38  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   39     39   
> {
   40     40   
    Ok({
   41     41   
        #[allow(unused_mut)]
   42     42   
        let mut builder = ::http::Response::builder();
   43     43   
        builder = crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_headers(&output, builder)?;
   44         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   45     45   
            builder,
   46     46   
            ::http::header::CONTENT_TYPE,
   47     47   
            "application/json",
   48     48   
        );
   49     49   
        let http_status: u16 = 200;
   50     50   
        builder = builder.status(http_status);
   51     51   
        let payload =
   52     52   
            crate::protocol_serde::shape_required_header_collection_operation_output::ser_required_header_collection_operation_output_output_output(&output)?
   53     53   
        ;
   54     54   
        let content_length = payload.len();
   55         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          55  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   56     56   
            builder,
   57     57   
            ::http::header::CONTENT_LENGTH,
   58     58   
            content_length,
   59     59   
        );
   60         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          60  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   61     61   
        builder.body(body)?
   62     62   
    })
   63     63   
}
   64     64   
   65     65   
#[allow(clippy::unnecessary_wraps)]
   66     66   
pub fn ser_required_header_collection_operation_http_error(
   67     67   
    error: &crate::error::RequiredHeaderCollectionOperationError,
   68     68   
) -> std::result::Result<
   69         -
    ::aws_smithy_http_server::response::Response,
   70         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          69  +
    ::aws_smithy_legacy_http_server::response::Response,
          70  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   71     71   
> {
   72     72   
    Ok({
   73     73   
        match error {
   74     74   
            crate::error::RequiredHeaderCollectionOperationError::ValidationException(output) => {
   75     75   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   76     76   
                #[allow(unused_mut)]
   77     77   
                let mut builder = ::http::Response::builder();
   78         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          78  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   79     79   
                    builder,
   80     80   
                    ::http::header::CONTENT_TYPE,
   81     81   
                    "application/json",
   82     82   
                );
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85     85   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   86     86   
                    "ValidationException",
   87     87   
                );
   88     88   
                let content_length = payload.len();
   89         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          89  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   90     90   
                    builder,
   91     91   
                    ::http::header::CONTENT_LENGTH,
   92     92   
                    content_length,
   93     93   
                );
   94     94   
                builder
   95     95   
                    .status(400)
   96         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          96  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   97     97   
            }
   98     98   
            crate::error::RequiredHeaderCollectionOperationError::InternalServerError(output) => {
   99     99   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  100    100   
                #[allow(unused_mut)]
  101    101   
                let mut builder = ::http::Response::builder();
  102         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         102  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  103    103   
                    builder,
  104    104   
                    ::http::header::CONTENT_TYPE,
  105    105   
                    "application/json",
  106    106   
                );
  107         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         107  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  108    108   
                    builder,
  109    109   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  110    110   
                    "InternalServerError",
  111    111   
                );
  112    112   
                let content_length = payload.len();
  113         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         113  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  114    114   
                    builder,
  115    115   
                    ::http::header::CONTENT_LENGTH,
  116    116   
                    content_length,
  117    117   
                );
  118    118   
                builder
  119    119   
                    .status(500)
  120         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         120  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  121    121   
            }
  122    122   
        }
  123    123   
    })
  124    124   
}
  125    125   
  126    126   
pub fn ser_required_header_collection_operation_headers(
  127    127   
    input: &crate::output::RequiredHeaderCollectionOperationOutput,
  128    128   
    mut builder: ::http::response::Builder,
  129    129   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
  130    130   
{
  131    131   
    for inner_1 in &input.required_header_list {
  132         -
        let formatted_2 = ::aws_smithy_http::header::quote_header_value(inner_1.as_str());
         132  +
        let formatted_2 = ::aws_smithy_legacy_http::header::quote_header_value(inner_1.as_str());
  133    133   
        if !formatted_2.is_empty() {
  134    134   
            let header_value = formatted_2;
  135    135   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  136    136   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  137    137   
                    "required_header_list",
  138    138   
                    format!(
  139    139   
                        "`{}` cannot be used as a header value: {}",
  140    140   
                        &header_value, err
  141    141   
                    ),
  142    142   
                )
  143    143   
            })?;
  144    144   
            builder = builder.header("X-Required-List", header_value);
  145    145   
        }
  146    146   
    }
  147    147   
    for inner_3 in &input.required_header_set {
  148         -
        let formatted_4 = ::aws_smithy_http::header::quote_header_value(inner_3.as_str());
         148  +
        let formatted_4 = ::aws_smithy_legacy_http::header::quote_header_value(inner_3.as_str());
  149    149   
        if !formatted_4.is_empty() {
  150    150   
            let header_value = formatted_4;
  151    151   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  152    152   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  153    153   
                    "required_header_set",
  154    154   
                    format!(
  155    155   
                        "`{}` cannot be used as a header value: {}",
  156    156   
                        &header_value, err
  157    157   
                    ),
  158    158   
                )

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

@@ -1,1 +26,28 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_required_header_list_header(
    3      3   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4      4   
) -> ::std::result::Result<
    5      5   
    ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    6         -
    ::aws_smithy_http::header::ParseError,
           6  +
    ::aws_smithy_legacy_http::header::ParseError,
    7      7   
> {
    8      8   
    let headers = header_map.get_all("X-Required-List");
    9         -
    let var_1: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
           9  +
    let var_1: Vec<::std::string::String> =
          10  +
        ::aws_smithy_legacy_http::header::read_many_from_str(headers)?;
   10     11   
    Ok(if !var_1.is_empty() { Some(var_1) } else { None })
   11     12   
}
   12     13   
   13     14   
pub(crate) fn de_required_header_set_header(
   14     15   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   15     16   
) -> ::std::result::Result<
   16     17   
    ::std::option::Option<crate::unconstrained::header_set_unconstrained::HeaderSetUnconstrained>,
   17         -
    ::aws_smithy_http::header::ParseError,
          18  +
    ::aws_smithy_legacy_http::header::ParseError,
   18     19   
> {
   19     20   
    let headers = header_map.get_all("X-Required-Set");
   20         -
    let var_2: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
          21  +
    let var_2: Vec<::std::string::String> =
          22  +
        ::aws_smithy_legacy_http::header::read_many_from_str(headers)?;
   21     23   
    Ok(if !var_2.is_empty() {
   22     24   
        Some(crate::unconstrained::header_set_unconstrained::HeaderSetUnconstrained(var_2))
   23     25   
    } else {
   24     26   
        None
   25     27   
    })
   26     28   
}

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

@@ -1,1 +151,151 @@
    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_required_inner_shape_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::RequiredInnerShapeOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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 =
   18     18   
            crate::input::required_inner_shape_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/json"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_required_inner_shape_operation_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::RequiredInnerShapeOperationOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   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_TYPE,
   48     48   
            "application/json",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_required_inner_shape_operation_output::ser_required_inner_shape_operation_output_output_output(&output)?
   54     54   
        ;
   55     55   
        let content_length = payload.len();
   56         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_LENGTH,
   59     59   
            content_length,
   60     60   
        );
   61         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          61  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   62     62   
        builder.body(body)?
   63     63   
    })
   64     64   
}
   65     65   
   66     66   
#[allow(clippy::unnecessary_wraps)]
   67     67   
pub fn ser_required_inner_shape_operation_http_error(
   68     68   
    error: &crate::error::RequiredInnerShapeOperationError,
   69     69   
) -> std::result::Result<
   70         -
    ::aws_smithy_http_server::response::Response,
   71         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          70  +
    ::aws_smithy_legacy_http_server::response::Response,
          71  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   72     72   
> {
   73     73   
    Ok({
   74     74   
        match error {
   75     75   
            crate::error::RequiredInnerShapeOperationError::ValidationException(output) => {
   76     76   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   77     77   
                #[allow(unused_mut)]
   78     78   
                let mut builder = ::http::Response::builder();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_TYPE,
   82     82   
                    "application/json",
   83     83   
                );
   84         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          84  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   85     85   
                    builder,
   86     86   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   87     87   
                    "ValidationException",
   88     88   
                );
   89     89   
                let content_length = payload.len();
   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_LENGTH,
   93     93   
                    content_length,
   94     94   
                );
   95     95   
                builder
   96     96   
                    .status(400)
   97         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          97  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   98     98   
            }
   99     99   
            crate::error::RequiredInnerShapeOperationError::InternalServerError(output) => {
  100    100   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  101    101   
                #[allow(unused_mut)]
  102    102   
                let mut builder = ::http::Response::builder();
  103         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         103  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  104    104   
                    builder,
  105    105   
                    ::http::header::CONTENT_TYPE,
  106    106   
                    "application/json",
  107    107   
                );
  108         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         108  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  109    109   
                    builder,
  110    110   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  111    111   
                    "InternalServerError",
  112    112   
                );
  113    113   
                let content_length = payload.len();
  114         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         114  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  115    115   
                    builder,
  116    116   
                    ::http::header::CONTENT_LENGTH,
  117    117   
                    content_length,
  118    118   
                );
  119    119   
                builder
  120    120   
                    .status(500)
  121         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         121  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  122    122   
            }
  123    123   
        }
  124    124   
    })
  125    125   
}
  126    126   
  127    127   
pub(crate) fn de_required_inner_shape_operation(
  128    128   
    value: &[u8],
  129    129   
    mut builder: crate::input::required_inner_shape_operation_input_internal::Builder,
  130    130   
) -> ::std::result::Result<
  131    131   
    crate::input::required_inner_shape_operation_input_internal::Builder,

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

@@ -1,1 +93,93 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_response_code_default_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ResponseCodeDefaultOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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 =
   18     18   
            crate::input::response_code_default_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_response_code_default_operation_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::ResponseCodeDefaultOperationOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/json",
   41     41   
        );
   42     42   
        let http_status: u16 = 200;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload =
   45     45   
            crate::protocol_serde::shape_response_code_default_operation_output::ser_response_code_default_operation_output_output_output(&output)?
   46     46   
        ;
   47     47   
        let content_length = payload.len();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_LENGTH,
   51     51   
            content_length,
   52     52   
        );
   53         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   54     54   
        builder.body(body)?
   55     55   
    })
   56     56   
}
   57     57   
   58     58   
#[allow(clippy::unnecessary_wraps)]
   59     59   
pub fn ser_response_code_default_operation_http_error(
   60     60   
    error: &crate::error::ResponseCodeDefaultOperationError,
   61     61   
) -> std::result::Result<
   62         -
    ::aws_smithy_http_server::response::Response,
   63         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          62  +
    ::aws_smithy_legacy_http_server::response::Response,
          63  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   64     64   
> {
   65     65   
    Ok({
   66     66   
        match error {
   67     67   
            crate::error::ResponseCodeDefaultOperationError::InternalServerError(output) => {
   68     68   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   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/json",
   75     75   
                );
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   79     79   
                    "InternalServerError",
   80     80   
                );
   81     81   
                let content_length = payload.len();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_LENGTH,
   85     85   
                    content_length,
   86     86   
                );
   87     87   
                builder
   88     88   
                    .status(500)
   89         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   90     90   
            }
   91     91   
        }
   92     92   
    })
   93     93   
}

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

@@ -1,1 +93,93 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_response_code_http_fallback_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ResponseCodeHttpFallbackOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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 =
   18     18   
            crate::input::response_code_http_fallback_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_response_code_http_fallback_operation_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::ResponseCodeHttpFallbackOperationOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/json",
   41     41   
        );
   42     42   
        let http_status: u16 = 201;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload =
   45     45   
            crate::protocol_serde::shape_response_code_http_fallback_operation_output::ser_response_code_http_fallback_operation_output_output_output(&output)?
   46     46   
        ;
   47     47   
        let content_length = payload.len();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_LENGTH,
   51     51   
            content_length,
   52     52   
        );
   53         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   54     54   
        builder.body(body)?
   55     55   
    })
   56     56   
}
   57     57   
   58     58   
#[allow(clippy::unnecessary_wraps)]
   59     59   
pub fn ser_response_code_http_fallback_operation_http_error(
   60     60   
    error: &crate::error::ResponseCodeHttpFallbackOperationError,
   61     61   
) -> std::result::Result<
   62         -
    ::aws_smithy_http_server::response::Response,
   63         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          62  +
    ::aws_smithy_legacy_http_server::response::Response,
          63  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   64     64   
> {
   65     65   
    Ok({
   66     66   
        match error {
   67     67   
            crate::error::ResponseCodeHttpFallbackOperationError::InternalServerError(output) => {
   68     68   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   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/json",
   75     75   
                );
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   79     79   
                    "InternalServerError",
   80     80   
                );
   81     81   
                let content_length = payload.len();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_LENGTH,
   85     85   
                    content_length,
   86     86   
                );
   87     87   
                builder
   88     88   
                    .status(500)
   89         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   90     90   
            }
   91     91   
        }
   92     92   
    })
   93     93   
}

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

@@ -1,1 +94,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_response_code_required_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ResponseCodeRequiredOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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 =
   18     18   
            crate::input::response_code_required_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_response_code_required_operation_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::ResponseCodeRequiredOperationOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/json",
   41     41   
        );
   42     42   
        let status = output.response_code;
   43         -
        let http_status: u16 = status.try_into().map_err(::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection::InvalidHttpStatusCode)?;
          43  +
        let http_status: u16 = status.try_into().map_err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection::InvalidHttpStatusCode)?;
   44     44   
        builder = builder.status(http_status);
   45     45   
        let payload =
   46     46   
            crate::protocol_serde::shape_response_code_required_operation_output::ser_response_code_required_operation_output_output_output(&output)?
   47     47   
        ;
   48     48   
        let content_length = payload.len();
   49         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          49  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   50     50   
            builder,
   51     51   
            ::http::header::CONTENT_LENGTH,
   52     52   
            content_length,
   53     53   
        );
   54         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          54  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   55     55   
        builder.body(body)?
   56     56   
    })
   57     57   
}
   58     58   
   59     59   
#[allow(clippy::unnecessary_wraps)]
   60     60   
pub fn ser_response_code_required_operation_http_error(
   61     61   
    error: &crate::error::ResponseCodeRequiredOperationError,
   62     62   
) -> std::result::Result<
   63         -
    ::aws_smithy_http_server::response::Response,
   64         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          63  +
    ::aws_smithy_legacy_http_server::response::Response,
          64  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   65     65   
> {
   66     66   
    Ok({
   67     67   
        match error {
   68     68   
            crate::error::ResponseCodeRequiredOperationError::InternalServerError(output) => {
   69     69   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   70     70   
                #[allow(unused_mut)]
   71     71   
                let mut builder = ::http::Response::builder();
   72         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          72  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   73     73   
                    builder,
   74     74   
                    ::http::header::CONTENT_TYPE,
   75     75   
                    "application/json",
   76     76   
                );
   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::HeaderName::from_static("x-amzn-errortype"),
   80     80   
                    "InternalServerError",
   81     81   
                );
   82     82   
                let content_length = payload.len();
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85     85   
                    ::http::header::CONTENT_LENGTH,
   86     86   
                    content_length,
   87     87   
                );
   88     88   
                builder
   89     89   
                    .status(500)
   90         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          90  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   91     91   
            }
   92     92   
        }
   93     93   
    })
   94     94   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_type_complexity_operation.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_type_complexity_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::TypeComplexityOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::type_complexity_operation_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   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/json"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation(bytes.as_ref(), input)?;
   29     29   
        }
   30     30   
        input.build()
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
#[allow(clippy::unnecessary_wraps)]
   35     35   
pub fn ser_type_complexity_operation_http_response(
   36     36   
    #[allow(unused_variables)] output: crate::output::TypeComplexityOperationOutput,
   37     37   
) -> std::result::Result<
   38         -
    ::aws_smithy_http_server::response::Response,
   39         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   40     40   
> {
   41     41   
    Ok({
   42     42   
        #[allow(unused_mut)]
   43     43   
        let mut builder = ::http::Response::builder();
   44         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   45     45   
            builder,
   46     46   
            ::http::header::CONTENT_TYPE,
   47     47   
            "application/json",
   48     48   
        );
   49     49   
        let http_status: u16 = 200;
   50     50   
        builder = builder.status(http_status);
   51     51   
        let payload =
   52     52   
            crate::protocol_serde::shape_type_complexity_operation_output::ser_type_complexity_operation_output_output_output(&output)?
   53     53   
        ;
   54     54   
        let content_length = payload.len();
   55         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          55  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   56     56   
            builder,
   57     57   
            ::http::header::CONTENT_LENGTH,
   58     58   
            content_length,
   59     59   
        );
   60         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          60  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   61     61   
        builder.body(body)?
   62     62   
    })
   63     63   
}
   64     64   
   65     65   
#[allow(clippy::unnecessary_wraps)]
   66     66   
pub fn ser_type_complexity_operation_http_error(
   67     67   
    error: &crate::error::TypeComplexityOperationError,
   68     68   
) -> std::result::Result<
   69         -
    ::aws_smithy_http_server::response::Response,
   70         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          69  +
    ::aws_smithy_legacy_http_server::response::Response,
          70  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   71     71   
> {
   72     72   
    Ok({
   73     73   
        match error {
   74     74   
            crate::error::TypeComplexityOperationError::InternalServerError(output) => {
   75     75   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   76     76   
                #[allow(unused_mut)]
   77     77   
                let mut builder = ::http::Response::builder();
   78         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          78  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   79     79   
                    builder,
   80     80   
                    ::http::header::CONTENT_TYPE,
   81     81   
                    "application/json",
   82     82   
                );
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85     85   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   86     86   
                    "InternalServerError",
   87     87   
                );
   88     88   
                let content_length = payload.len();
   89         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          89  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   90     90   
                    builder,
   91     91   
                    ::http::header::CONTENT_LENGTH,
   92     92   
                    content_length,
   93     93   
                );
   94     94   
                builder
   95     95   
                    .status(500)
   96         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          96  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   97     97   
            }
   98     98   
        }
   99     99   
    })
  100    100   
}
  101    101   
  102    102   
pub(crate) fn de_type_complexity_operation(
  103    103   
    value: &[u8],
  104    104   
    mut builder: crate::input::type_complexity_operation_input_internal::Builder,
  105    105   
) -> ::std::result::Result<
  106    106   
    crate::input::type_complexity_operation_input_internal::Builder,

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

@@ -1,1 +310,322 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Python handler for operation `ResponseCodeDefaultOperation`.
    3      3   
pub(crate) async fn response_code_default_operation(
    4      4   
    input: crate::input::ResponseCodeDefaultOperationInput,
    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<
    8     10   
    crate::output::ResponseCodeDefaultOperationOutput,
    9     11   
    crate::error::ResponseCodeDefaultOperationError,
   10     12   
> {
   11     13   
    // Async block used to run the handler and catch any Python error.
   12     14   
    let result = if handler.is_coroutine {
   13     15   
        ::tracing::trace!(
   14     16   
            name = "response_code_default_operation",
   15     17   
            "executing python handler coroutine"
   16     18   
        );
   17     19   
        let result = ::pyo3::Python::with_gil(|py| {
   18     20   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   19     21   
            let coroutine = if handler.args == 1 {
   20     22   
                pyhandler.call1((input,))?
   21     23   
            } else {
   22     24   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   23     25   
            };
   24     26   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   25     27   
        })?;
   26     28   
        result.await.and_then(|r| {
   27     29   
            ::pyo3::Python::with_gil(|py| {
   28     30   
                r.extract::<crate::output::ResponseCodeDefaultOperationOutput>(py)
   29     31   
            })
   30     32   
        })
   31     33   
    } else {
   32     34   
        ::tracing::trace!(
   33     35   
            name = "response_code_default_operation",
   34     36   
            "executing python handler function"
   35     37   
        );
   36     38   
        ::pyo3::Python::with_gil(|py| {
   37     39   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   38     40   
            let output = if handler.args == 1 {
   39     41   
                pyhandler.call1((input,))?
   40     42   
            } else {
   41     43   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   42     44   
            };
   43     45   
            output.extract::<crate::output::ResponseCodeDefaultOperationOutput>()
   44     46   
        })
   45     47   
    };
   46     48   
    // Catch and record a Python traceback.
   47     49   
    result.map_err(|e| {
   48     50   
        let rich_py_err =
   49     51   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   50     52   
                e.clone_ref(py)
   51     53   
            }));
   52     54   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   53     55   
        e.into()
   54     56   
    })
   55     57   
}
   56     58   
   57     59   
/// Python handler for operation `ResponseCodeHttpFallbackOperation`.
   58     60   
pub(crate) async fn response_code_http_fallback_operation(
   59     61   
    input: crate::input::ResponseCodeHttpFallbackOperationInput,
   60         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
          62  +
    state: ::aws_smithy_legacy_http_server::Extension<
          63  +
        ::aws_smithy_http_server_python::context::PyContext,
          64  +
    >,
   61     65   
    handler: ::aws_smithy_http_server_python::PyHandler,
   62     66   
) -> std::result::Result<
   63     67   
    crate::output::ResponseCodeHttpFallbackOperationOutput,
   64     68   
    crate::error::ResponseCodeHttpFallbackOperationError,
   65     69   
> {
   66     70   
    // Async block used to run the handler and catch any Python error.
   67     71   
    let result = if handler.is_coroutine {
   68     72   
        ::tracing::trace!(
   69     73   
            name = "response_code_http_fallback_operation",
   70     74   
            "executing python handler coroutine"
   71     75   
        );
   72     76   
        let result = ::pyo3::Python::with_gil(|py| {
   73     77   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   74     78   
            let coroutine = if handler.args == 1 {
   75     79   
                pyhandler.call1((input,))?
   76     80   
            } else {
   77     81   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   78     82   
            };
   79     83   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   80     84   
        })?;
   81     85   
        result.await.and_then(|r| {
   82     86   
            ::pyo3::Python::with_gil(|py| {
   83     87   
                r.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>(py)
   84     88   
            })
   85     89   
        })
   86     90   
    } else {
   87     91   
        ::tracing::trace!(
   88     92   
            name = "response_code_http_fallback_operation",
   89     93   
            "executing python handler function"
   90     94   
        );
   91     95   
        ::pyo3::Python::with_gil(|py| {
   92     96   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   93     97   
            let output = if handler.args == 1 {
   94     98   
                pyhandler.call1((input,))?
   95     99   
            } else {
   96    100   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   97    101   
            };
   98    102   
            output.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>()
   99    103   
        })
  100    104   
    };
  101    105   
    // Catch and record a Python traceback.
  102    106   
    result.map_err(|e| {
  103    107   
        let rich_py_err =
  104    108   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  105    109   
                e.clone_ref(py)
  106    110   
            }));
  107    111   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  108    112   
        e.into()
  109    113   
    })
  110    114   
}
  111    115   
  112    116   
/// Python handler for operation `ResponseCodeRequiredOperation`.
  113    117   
pub(crate) async fn response_code_required_operation(
  114    118   
    input: crate::input::ResponseCodeRequiredOperationInput,
  115         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
         119  +
    state: ::aws_smithy_legacy_http_server::Extension<
         120  +
        ::aws_smithy_http_server_python::context::PyContext,
         121  +
    >,
  116    122   
    handler: ::aws_smithy_http_server_python::PyHandler,
  117    123   
) -> std::result::Result<
  118    124   
    crate::output::ResponseCodeRequiredOperationOutput,
  119    125   
    crate::error::ResponseCodeRequiredOperationError,
  120    126   
> {
  121    127   
    // Async block used to run the handler and catch any Python error.
  122    128   
    let result = if handler.is_coroutine {
  123    129   
        ::tracing::trace!(
  124    130   
            name = "response_code_required_operation",
  125    131   
            "executing python handler coroutine"
  126    132   
        );
  127    133   
        let result = ::pyo3::Python::with_gil(|py| {
  128    134   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  129    135   
            let coroutine = if handler.args == 1 {
  130    136   
                pyhandler.call1((input,))?
  131    137   
            } else {
  132    138   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  133    139   
            };
  134    140   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  135    141   
        })?;
  136    142   
        result.await.and_then(|r| {
  137    143   
            ::pyo3::Python::with_gil(|py| {
  138    144   
                r.extract::<crate::output::ResponseCodeRequiredOperationOutput>(py)
  139    145   
            })
  140    146   
        })
  141    147   
    } else {
  142    148   
        ::tracing::trace!(
  143    149   
            name = "response_code_required_operation",
  144    150   
            "executing python handler function"
  145    151   
        );
  146    152   
        ::pyo3::Python::with_gil(|py| {
  147    153   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  148    154   
            let output = if handler.args == 1 {
  149    155   
                pyhandler.call1((input,))?
  150    156   
            } else {
  151    157   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  152    158   
            };
  153    159   
            output.extract::<crate::output::ResponseCodeRequiredOperationOutput>()
  154    160   
        })
  155    161   
    };
  156    162   
    // Catch and record a Python traceback.
  157    163   
    result.map_err(|e| {
  158    164   
        let rich_py_err =
  159    165   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  160    166   
                e.clone_ref(py)
  161    167   
            }));
  162    168   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  163    169   
        e.into()
  164    170   
    })
  165    171   
}
  166    172   
  167    173   
/// Python handler for operation `RequiredHeaderCollectionOperation`.
  168    174   
pub(crate) async fn required_header_collection_operation(
  169    175   
    input: crate::input::RequiredHeaderCollectionOperationInput,
  170         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
         176  +
    state: ::aws_smithy_legacy_http_server::Extension<
         177  +
        ::aws_smithy_http_server_python::context::PyContext,
         178  +
    >,
  171    179   
    handler: ::aws_smithy_http_server_python::PyHandler,
  172    180   
) -> std::result::Result<
  173    181   
    crate::output::RequiredHeaderCollectionOperationOutput,
  174    182   
    crate::error::RequiredHeaderCollectionOperationError,
  175    183   
> {
  176    184   
    // Async block used to run the handler and catch any Python error.
  177    185   
    let result = if handler.is_coroutine {
  178    186   
        ::tracing::trace!(
  179    187   
            name = "required_header_collection_operation",
  180    188   
            "executing python handler coroutine"
  181    189   
        );
  182    190   
        let result = ::pyo3::Python::with_gil(|py| {
  183    191   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  184    192   
            let coroutine = if handler.args == 1 {
  185    193   
                pyhandler.call1((input,))?
  186    194   
            } else {
  187    195   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  188    196   
            };
  189    197   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  190    198   
        })?;
  191    199   
        result.await.and_then(|r| {
  192    200   
            ::pyo3::Python::with_gil(|py| {
  193    201   
                r.extract::<crate::output::RequiredHeaderCollectionOperationOutput>(py)
  194    202   
            })
  195    203   
        })
  196    204   
    } else {
  197    205   
        ::tracing::trace!(
  198    206   
            name = "required_header_collection_operation",
  199    207   
            "executing python handler function"
  200    208   
        );
  201    209   
        ::pyo3::Python::with_gil(|py| {
  202    210   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  203    211   
            let output = if handler.args == 1 {
  204    212   
                pyhandler.call1((input,))?
  205    213   
            } else {
  206    214   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  207    215   
            };
  208    216   
            output.extract::<crate::output::RequiredHeaderCollectionOperationOutput>()
  209    217   
        })
  210    218   
    };
  211    219   
    // Catch and record a Python traceback.
  212    220   
    result.map_err(|e| {
  213    221   
        let rich_py_err =
  214    222   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  215    223   
                e.clone_ref(py)
  216    224   
            }));
  217    225   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  218    226   
        e.into()
  219    227   
    })
  220    228   
}
  221    229   
  222    230   
/// Python handler for operation `RequiredInnerShapeOperation`.
  223    231   
pub(crate) async fn required_inner_shape_operation(
  224    232   
    input: crate::input::RequiredInnerShapeOperationInput,
  225         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
         233  +
    state: ::aws_smithy_legacy_http_server::Extension<
         234  +
        ::aws_smithy_http_server_python::context::PyContext,
         235  +
    >,
  226    236   
    handler: ::aws_smithy_http_server_python::PyHandler,
  227    237   
) -> std::result::Result<
  228    238   
    crate::output::RequiredInnerShapeOperationOutput,
  229    239   
    crate::error::RequiredInnerShapeOperationError,
  230    240   
> {
  231    241   
    // Async block used to run the handler and catch any Python error.
  232    242   
    let result = if handler.is_coroutine {
  233    243   
        ::tracing::trace!(
  234    244   
            name = "required_inner_shape_operation",
  235    245   
            "executing python handler coroutine"
  236    246   
        );
  237    247   
        let result = ::pyo3::Python::with_gil(|py| {
  238    248   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  239    249   
            let coroutine = if handler.args == 1 {
  240    250   
                pyhandler.call1((input,))?
  241    251   
            } else {
  242    252   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  243    253   
            };
  244    254   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  245    255   
        })?;
  246    256   
        result.await.and_then(|r| {
  247    257   
            ::pyo3::Python::with_gil(|py| {
  248    258   
                r.extract::<crate::output::RequiredInnerShapeOperationOutput>(py)
  249    259   
            })
  250    260   
        })
  251    261   
    } else {
  252    262   
        ::tracing::trace!(
  253    263   
            name = "required_inner_shape_operation",
  254    264   
            "executing python handler function"
  255    265   
        );
  256    266   
        ::pyo3::Python::with_gil(|py| {
  257    267   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  258    268   
            let output = if handler.args == 1 {
  259    269   
                pyhandler.call1((input,))?
  260    270   
            } else {
  261    271   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  262    272   
            };
  263    273   
            output.extract::<crate::output::RequiredInnerShapeOperationOutput>()
  264    274   
        })
  265    275   
    };
  266    276   
    // Catch and record a Python traceback.
  267    277   
    result.map_err(|e| {
  268    278   
        let rich_py_err =
  269    279   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  270    280   
                e.clone_ref(py)
  271    281   
            }));
  272    282   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  273    283   
        e.into()
  274    284   
    })
  275    285   
}
  276    286   
  277    287   
/// Python handler for operation `TypeComplexityOperation`.
  278    288   
pub(crate) async fn type_complexity_operation(
  279    289   
    input: crate::input::TypeComplexityOperationInput,
  280         -
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
         290  +
    state: ::aws_smithy_legacy_http_server::Extension<
         291  +
        ::aws_smithy_http_server_python::context::PyContext,
         292  +
    >,
  281    293   
    handler: ::aws_smithy_http_server_python::PyHandler,
  282    294   
) -> std::result::Result<
  283    295   
    crate::output::TypeComplexityOperationOutput,
  284    296   
    crate::error::TypeComplexityOperationError,
  285    297   
> {
  286    298   
    // Async block used to run the handler and catch any Python error.
  287    299   
    let result = if handler.is_coroutine {
  288    300   
        ::tracing::trace!(
  289    301   
            name = "type_complexity_operation",
  290    302   
            "executing python handler coroutine"

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

@@ -85,85 +146,146 @@
  105    105   
    fn handlers(
  106    106   
        &mut self,
  107    107   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
  108    108   
        &mut self.handlers
  109    109   
    }
  110    110   
    fn build_service(
  111    111   
        &mut self,
  112    112   
        event_loop: &::pyo3::PyAny,
  113    113   
    ) -> ::pyo3::PyResult<
  114    114   
        ::tower::util::BoxCloneService<
  115         -
            ::http::Request<::aws_smithy_http_server::body::Body>,
  116         -
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         115  +
            ::http::Request<::aws_smithy_legacy_http_server::body::Body>,
         116  +
            ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  117    117   
            std::convert::Infallible,
  118    118   
        >,
  119    119   
    > {
  120    120   
        let builder = crate::service::MiscService::builder_without_plugins();
  121    121   
        let required_header_collection_operation_locals =
  122    122   
            ::pyo3_asyncio::TaskLocals::new(event_loop);
  123    123   
        let handler = self
  124    124   
            .handlers
  125    125   
            .get("required_header_collection_operation")
  126    126   
            .expect("Python handler for operation `required_header_collection_operation` not found")
@@ -203,203 +263,263 @@
  223    223   
        {
  224    224   
            use ::tower::Layer;
  225    225   
            ::tracing::trace!("adding middlewares to rust python router");
  226    226   
            let mut middlewares = self.middlewares.clone();
  227    227   
            // Reverse the middlewares, so they run with same order as they defined
  228    228   
            middlewares.reverse();
  229    229   
            for handler in middlewares {
  230    230   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  231    231   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  232    232   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  233         -
                    ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         233  +
                    ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  234    234   
                >::new(handler, locals);
  235    235   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  236    236   
            }
  237    237   
        }
  238    238   
        Ok(service)
  239    239   
    }
  240    240   
}
  241    241   
#[::pyo3::pymethods]
  242    242   
impl App {
  243    243   
    /// Create a new [App].

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

@@ -1,1 +1668,1694 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`MiscService`].
    3      3   
///
    4      4   
/// Constructed via [`MiscService::builder`].
    5      5   
pub struct MiscServiceBuilder<Body, L, HttpPl, ModelPl> {
    6         -
    required_header_collection_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7         -
    required_inner_shape_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8         -
    response_code_default_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9         -
    response_code_http_fallback_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10         -
    response_code_required_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11         -
    type_complexity_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
           6  +
    required_header_collection_operation:
           7  +
        Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
           8  +
    required_inner_shape_operation: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
           9  +
    response_code_default_operation: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
          10  +
    response_code_http_fallback_operation:
          11  +
        Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
          12  +
    response_code_required_operation: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
          13  +
    type_complexity_operation: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
   12     14   
    layer: L,
   13     15   
    http_plugin: HttpPl,
   14     16   
    model_plugin: ModelPl,
   15     17   
}
   16     18   
   17     19   
impl<Body, L, HttpPl, ModelPl> MiscServiceBuilder<Body, L, HttpPl, ModelPl> {
   18     20   
    /// Sets the [`RequiredHeaderCollectionOperation`](crate::operation_shape::RequiredHeaderCollectionOperation) operation.
   19     21   
    ///
   20         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   21         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          22  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          23  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   22     24   
    ///
   23     25   
    /// # Example
   24     26   
    ///
   25     27   
    /// ```no_run
   26     28   
    /// use misc::{MiscService, MiscServiceConfig};
   27     29   
    ///
   28     30   
    /// use misc::{input, output, error};
   29     31   
    ///
   30     32   
    /// async fn handler(input: input::RequiredHeaderCollectionOperationInput) -> Result<output::RequiredHeaderCollectionOperationOutput, error::RequiredHeaderCollectionOperationError> {
   31     33   
    ///     todo!()
   32     34   
    /// }
   33     35   
    ///
   34     36   
    /// let config = MiscServiceConfig::builder().build();
   35     37   
    /// let app = MiscService::builder(config)
   36     38   
    ///     .required_header_collection_operation(handler)
   37     39   
    ///     /* Set other handlers */
   38     40   
    ///     .build()
   39     41   
    ///     .unwrap();
   40         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
          42  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
   41     43   
    /// ```
   42     44   
    ///
   43     45   
                    pub fn required_header_collection_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
   44     46   
                    where
   45         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::RequiredHeaderCollectionOperation, HandlerExtractors>,
          47  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::RequiredHeaderCollectionOperation, HandlerExtractors>,
   46     48   
   47         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
          49  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   48     50   
                            MiscService<L>,
   49     51   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
   50         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::RequiredHeaderCollectionOperation, HandlerType>
          52  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::RequiredHeaderCollectionOperation, HandlerType>
   51     53   
                        >,
   52         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
          54  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
   53     55   
                            MiscService<L>,
   54     56   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
   55     57   
                            ModelPl::Output
   56     58   
                        >,
   57         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
          59  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   58     60   
                            MiscService<L>,
   59     61   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
   60     62   
                            <
   61         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   62         -
                                as ::aws_smithy_http_server::plugin::Plugin<
          63  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
          64  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
   63     65   
                                    MiscService<L>,
   64     66   
                                    crate::operation_shape::RequiredHeaderCollectionOperation,
   65     67   
                                    ModelPl::Output
   66     68   
                                >
   67     69   
                            >::Output
   68     70   
                        >,
   69     71   
   70         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
          72  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   71     73   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
   72     74   
   73     75   
                    {
   74         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   75         -
        use ::aws_smithy_http_server::plugin::Plugin;
          76  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
          77  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
   76     78   
        let svc = crate::operation_shape::RequiredHeaderCollectionOperation::from_handler(handler);
   77     79   
        let svc = self.model_plugin.apply(svc);
   78         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
          80  +
        let svc =
          81  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   79     82   
                .apply(svc);
   80     83   
        let svc = self.http_plugin.apply(svc);
   81     84   
        self.required_header_collection_operation_custom(svc)
   82     85   
    }
   83     86   
   84     87   
    /// Sets the [`RequiredHeaderCollectionOperation`](crate::operation_shape::RequiredHeaderCollectionOperation) operation.
   85     88   
    ///
   86         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   87         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          89  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          90  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   88     91   
    ///
   89     92   
    /// # Example
   90     93   
    ///
   91     94   
    /// ```no_run
   92     95   
    /// use misc::{MiscService, MiscServiceConfig};
   93     96   
    ///
   94     97   
    /// use misc::{input, output, error};
   95     98   
    ///
   96     99   
    /// async fn handler(input: input::RequiredHeaderCollectionOperationInput) -> Result<output::RequiredHeaderCollectionOperationOutput, error::RequiredHeaderCollectionOperationError> {
   97    100   
    ///     todo!()
   98    101   
    /// }
   99    102   
    ///
  100    103   
    /// let config = MiscServiceConfig::builder().build();
  101    104   
    /// let svc = ::tower::util::service_fn(handler);
  102    105   
    /// let app = MiscService::builder(config)
  103    106   
    ///     .required_header_collection_operation_service(svc)
  104    107   
    ///     /* Set other handlers */
  105    108   
    ///     .build()
  106    109   
    ///     .unwrap();
  107         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         110  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  108    111   
    /// ```
  109    112   
    ///
  110    113   
                    pub fn required_header_collection_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  111    114   
                    where
  112         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::RequiredHeaderCollectionOperation, ServiceExtractors>,
         115  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::RequiredHeaderCollectionOperation, ServiceExtractors>,
  113    116   
  114         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         117  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  115    118   
                            MiscService<L>,
  116    119   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
  117         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::RequiredHeaderCollectionOperation, S>
         120  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::RequiredHeaderCollectionOperation, S>
  118    121   
                        >,
  119         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         122  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  120    123   
                            MiscService<L>,
  121    124   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
  122    125   
                            ModelPl::Output
  123    126   
                        >,
  124         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         127  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  125    128   
                            MiscService<L>,
  126    129   
                            crate::operation_shape::RequiredHeaderCollectionOperation,
  127    130   
                            <
  128         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  129         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         131  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         132  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  130    133   
                                    MiscService<L>,
  131    134   
                                    crate::operation_shape::RequiredHeaderCollectionOperation,
  132    135   
                                    ModelPl::Output
  133    136   
                                >
  134    137   
                            >::Output
  135    138   
                        >,
  136    139   
  137         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         140  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  138    141   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  139    142   
  140    143   
                    {
  141         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  142         -
        use ::aws_smithy_http_server::plugin::Plugin;
         144  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         145  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  143    146   
        let svc = crate::operation_shape::RequiredHeaderCollectionOperation::from_service(service);
  144    147   
        let svc = self.model_plugin.apply(svc);
  145         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         148  +
        let svc =
         149  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  146    150   
                .apply(svc);
  147    151   
        let svc = self.http_plugin.apply(svc);
  148    152   
        self.required_header_collection_operation_custom(svc)
  149    153   
    }
  150    154   
  151    155   
    /// Sets the [`RequiredHeaderCollectionOperation`](crate::operation_shape::RequiredHeaderCollectionOperation) to a custom [`Service`](tower::Service).
  152    156   
    /// not constrained by the Smithy contract.
  153    157   
    fn required_header_collection_operation_custom<S>(mut self, svc: S) -> Self
  154    158   
    where
  155    159   
        S: ::tower::Service<
  156    160   
                ::http::Request<Body>,
  157         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         161  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  158    162   
                Error = ::std::convert::Infallible,
  159    163   
            > + Clone
  160    164   
            + Send
  161    165   
            + 'static,
  162    166   
        S::Future: Send + 'static,
  163    167   
    {
  164    168   
        self.required_header_collection_operation =
  165         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         169  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  166    170   
        self
  167    171   
    }
  168    172   
  169    173   
    /// Sets the [`RequiredInnerShapeOperation`](crate::operation_shape::RequiredInnerShapeOperation) operation.
  170    174   
    ///
  171         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  172         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         175  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         176  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  173    177   
    ///
  174    178   
    /// # Example
  175    179   
    ///
  176    180   
    /// ```no_run
  177    181   
    /// use misc::{MiscService, MiscServiceConfig};
  178    182   
    ///
  179    183   
    /// use misc::{input, output, error};
  180    184   
    ///
  181    185   
    /// async fn handler(input: input::RequiredInnerShapeOperationInput) -> Result<output::RequiredInnerShapeOperationOutput, error::RequiredInnerShapeOperationError> {
  182    186   
    ///     todo!()
  183    187   
    /// }
  184    188   
    ///
  185    189   
    /// let config = MiscServiceConfig::builder().build();
  186    190   
    /// let app = MiscService::builder(config)
  187    191   
    ///     .required_inner_shape_operation(handler)
  188    192   
    ///     /* Set other handlers */
  189    193   
    ///     .build()
  190    194   
    ///     .unwrap();
  191         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         195  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  192    196   
    /// ```
  193    197   
    ///
  194    198   
                    pub fn required_inner_shape_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  195    199   
                    where
  196         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::RequiredInnerShapeOperation, HandlerExtractors>,
         200  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::RequiredInnerShapeOperation, HandlerExtractors>,
  197    201   
  198         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         202  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  199    203   
                            MiscService<L>,
  200    204   
                            crate::operation_shape::RequiredInnerShapeOperation,
  201         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::RequiredInnerShapeOperation, HandlerType>
         205  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::RequiredInnerShapeOperation, HandlerType>
  202    206   
                        >,
  203         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         207  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  204    208   
                            MiscService<L>,
  205    209   
                            crate::operation_shape::RequiredInnerShapeOperation,
  206    210   
                            ModelPl::Output
  207    211   
                        >,
  208         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         212  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  209    213   
                            MiscService<L>,
  210    214   
                            crate::operation_shape::RequiredInnerShapeOperation,
  211    215   
                            <
  212         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  213         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         216  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         217  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  214    218   
                                    MiscService<L>,
  215    219   
                                    crate::operation_shape::RequiredInnerShapeOperation,
  216    220   
                                    ModelPl::Output
  217    221   
                                >
  218    222   
                            >::Output
  219    223   
                        >,
  220    224   
  221         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         225  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  222    226   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  223    227   
  224    228   
                    {
  225         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  226         -
        use ::aws_smithy_http_server::plugin::Plugin;
         229  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         230  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  227    231   
        let svc = crate::operation_shape::RequiredInnerShapeOperation::from_handler(handler);
  228    232   
        let svc = self.model_plugin.apply(svc);
  229         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         233  +
        let svc =
         234  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  230    235   
                .apply(svc);
  231    236   
        let svc = self.http_plugin.apply(svc);
  232    237   
        self.required_inner_shape_operation_custom(svc)
  233    238   
    }
  234    239   
  235    240   
    /// Sets the [`RequiredInnerShapeOperation`](crate::operation_shape::RequiredInnerShapeOperation) operation.
  236    241   
    ///
  237         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  238         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         242  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         243  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  239    244   
    ///
  240    245   
    /// # Example
  241    246   
    ///
  242    247   
    /// ```no_run
  243    248   
    /// use misc::{MiscService, MiscServiceConfig};
  244    249   
    ///
  245    250   
    /// use misc::{input, output, error};
  246    251   
    ///
  247    252   
    /// async fn handler(input: input::RequiredInnerShapeOperationInput) -> Result<output::RequiredInnerShapeOperationOutput, error::RequiredInnerShapeOperationError> {
  248    253   
    ///     todo!()
  249    254   
    /// }
  250    255   
    ///
  251    256   
    /// let config = MiscServiceConfig::builder().build();
  252    257   
    /// let svc = ::tower::util::service_fn(handler);
  253    258   
    /// let app = MiscService::builder(config)
  254    259   
    ///     .required_inner_shape_operation_service(svc)
  255    260   
    ///     /* Set other handlers */
  256    261   
    ///     .build()
  257    262   
    ///     .unwrap();
  258         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         263  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  259    264   
    /// ```
  260    265   
    ///
  261    266   
                    pub fn required_inner_shape_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  262    267   
                    where
  263         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::RequiredInnerShapeOperation, ServiceExtractors>,
         268  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::RequiredInnerShapeOperation, ServiceExtractors>,
  264    269   
  265         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         270  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  266    271   
                            MiscService<L>,
  267    272   
                            crate::operation_shape::RequiredInnerShapeOperation,
  268         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::RequiredInnerShapeOperation, S>
         273  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::RequiredInnerShapeOperation, S>
  269    274   
                        >,
  270         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         275  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  271    276   
                            MiscService<L>,
  272    277   
                            crate::operation_shape::RequiredInnerShapeOperation,
  273    278   
                            ModelPl::Output
  274    279   
                        >,
  275         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         280  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  276    281   
                            MiscService<L>,
  277    282   
                            crate::operation_shape::RequiredInnerShapeOperation,
  278    283   
                            <
  279         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  280         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         284  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         285  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  281    286   
                                    MiscService<L>,
  282    287   
                                    crate::operation_shape::RequiredInnerShapeOperation,
  283    288   
                                    ModelPl::Output
  284    289   
                                >
  285    290   
                            >::Output
  286    291   
                        >,
  287    292   
  288         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         293  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  289    294   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  290    295   
  291    296   
                    {
  292         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  293         -
        use ::aws_smithy_http_server::plugin::Plugin;
         297  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         298  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  294    299   
        let svc = crate::operation_shape::RequiredInnerShapeOperation::from_service(service);
  295    300   
        let svc = self.model_plugin.apply(svc);
  296         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         301  +
        let svc =
         302  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  297    303   
                .apply(svc);
  298    304   
        let svc = self.http_plugin.apply(svc);
  299    305   
        self.required_inner_shape_operation_custom(svc)
  300    306   
    }
  301    307   
  302    308   
    /// Sets the [`RequiredInnerShapeOperation`](crate::operation_shape::RequiredInnerShapeOperation) to a custom [`Service`](tower::Service).
  303    309   
    /// not constrained by the Smithy contract.
  304    310   
    fn required_inner_shape_operation_custom<S>(mut self, svc: S) -> Self
  305    311   
    where
  306    312   
        S: ::tower::Service<
  307    313   
                ::http::Request<Body>,
  308         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         314  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  309    315   
                Error = ::std::convert::Infallible,
  310    316   
            > + Clone
  311    317   
            + Send
  312    318   
            + 'static,
  313    319   
        S::Future: Send + 'static,
  314    320   
    {
  315    321   
        self.required_inner_shape_operation =
  316         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         322  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  317    323   
        self
  318    324   
    }
  319    325   
  320    326   
    /// Sets the [`ResponseCodeDefaultOperation`](crate::operation_shape::ResponseCodeDefaultOperation) operation.
  321    327   
    ///
  322         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  323         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         328  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         329  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  324    330   
    ///
  325    331   
    /// # Example
  326    332   
    ///
  327    333   
    /// ```no_run
  328    334   
    /// use misc::{MiscService, MiscServiceConfig};
  329    335   
    ///
  330    336   
    /// use misc::{input, output, error};
  331    337   
    ///
  332    338   
    /// async fn handler(input: input::ResponseCodeDefaultOperationInput) -> Result<output::ResponseCodeDefaultOperationOutput, error::ResponseCodeDefaultOperationError> {
  333    339   
    ///     todo!()
  334    340   
    /// }
  335    341   
    ///
  336    342   
    /// let config = MiscServiceConfig::builder().build();
  337    343   
    /// let app = MiscService::builder(config)
  338    344   
    ///     .response_code_default_operation(handler)
  339    345   
    ///     /* Set other handlers */
  340    346   
    ///     .build()
  341    347   
    ///     .unwrap();
  342         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         348  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  343    349   
    /// ```
  344    350   
    ///
  345    351   
                    pub fn response_code_default_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  346    352   
                    where
  347         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::ResponseCodeDefaultOperation, HandlerExtractors>,
         353  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::ResponseCodeDefaultOperation, HandlerExtractors>,
  348    354   
  349         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         355  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  350    356   
                            MiscService<L>,
  351    357   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  352         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeDefaultOperation, HandlerType>
         358  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeDefaultOperation, HandlerType>
  353    359   
                        >,
  354         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         360  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  355    361   
                            MiscService<L>,
  356    362   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  357    363   
                            ModelPl::Output
  358    364   
                        >,
  359         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         365  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  360    366   
                            MiscService<L>,
  361    367   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  362    368   
                            <
  363         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  364         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         369  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         370  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  365    371   
                                    MiscService<L>,
  366    372   
                                    crate::operation_shape::ResponseCodeDefaultOperation,
  367    373   
                                    ModelPl::Output
  368    374   
                                >
  369    375   
                            >::Output
  370    376   
                        >,
  371    377   
  372         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         378  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  373    379   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  374    380   
  375    381   
                    {
  376         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  377         -
        use ::aws_smithy_http_server::plugin::Plugin;
         382  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         383  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  378    384   
        let svc = crate::operation_shape::ResponseCodeDefaultOperation::from_handler(handler);
  379    385   
        let svc = self.model_plugin.apply(svc);
  380         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         386  +
        let svc =
         387  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  381    388   
                .apply(svc);
  382    389   
        let svc = self.http_plugin.apply(svc);
  383    390   
        self.response_code_default_operation_custom(svc)
  384    391   
    }
  385    392   
  386    393   
    /// Sets the [`ResponseCodeDefaultOperation`](crate::operation_shape::ResponseCodeDefaultOperation) operation.
  387    394   
    ///
  388         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  389         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         395  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         396  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  390    397   
    ///
  391    398   
    /// # Example
  392    399   
    ///
  393    400   
    /// ```no_run
  394    401   
    /// use misc::{MiscService, MiscServiceConfig};
  395    402   
    ///
  396    403   
    /// use misc::{input, output, error};
  397    404   
    ///
  398    405   
    /// async fn handler(input: input::ResponseCodeDefaultOperationInput) -> Result<output::ResponseCodeDefaultOperationOutput, error::ResponseCodeDefaultOperationError> {
  399    406   
    ///     todo!()
  400    407   
    /// }
  401    408   
    ///
  402    409   
    /// let config = MiscServiceConfig::builder().build();
  403    410   
    /// let svc = ::tower::util::service_fn(handler);
  404    411   
    /// let app = MiscService::builder(config)
  405    412   
    ///     .response_code_default_operation_service(svc)
  406    413   
    ///     /* Set other handlers */
  407    414   
    ///     .build()
  408    415   
    ///     .unwrap();
  409         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         416  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  410    417   
    /// ```
  411    418   
    ///
  412    419   
                    pub fn response_code_default_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  413    420   
                    where
  414         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeDefaultOperation, ServiceExtractors>,
         421  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeDefaultOperation, ServiceExtractors>,
  415    422   
  416         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         423  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  417    424   
                            MiscService<L>,
  418    425   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  419         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeDefaultOperation, S>
         426  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeDefaultOperation, S>
  420    427   
                        >,
  421         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         428  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  422    429   
                            MiscService<L>,
  423    430   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  424    431   
                            ModelPl::Output
  425    432   
                        >,
  426         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         433  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  427    434   
                            MiscService<L>,
  428    435   
                            crate::operation_shape::ResponseCodeDefaultOperation,
  429    436   
                            <
  430         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  431         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         437  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         438  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  432    439   
                                    MiscService<L>,
  433    440   
                                    crate::operation_shape::ResponseCodeDefaultOperation,
  434    441   
                                    ModelPl::Output
  435    442   
                                >
  436    443   
                            >::Output
  437    444   
                        >,
  438    445   
  439         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         446  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  440    447   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  441    448   
  442    449   
                    {
  443         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  444         -
        use ::aws_smithy_http_server::plugin::Plugin;
         450  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         451  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  445    452   
        let svc = crate::operation_shape::ResponseCodeDefaultOperation::from_service(service);
  446    453   
        let svc = self.model_plugin.apply(svc);
  447         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         454  +
        let svc =
         455  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  448    456   
                .apply(svc);
  449    457   
        let svc = self.http_plugin.apply(svc);
  450    458   
        self.response_code_default_operation_custom(svc)
  451    459   
    }
  452    460   
  453    461   
    /// Sets the [`ResponseCodeDefaultOperation`](crate::operation_shape::ResponseCodeDefaultOperation) to a custom [`Service`](tower::Service).
  454    462   
    /// not constrained by the Smithy contract.
  455    463   
    fn response_code_default_operation_custom<S>(mut self, svc: S) -> Self
  456    464   
    where
  457    465   
        S: ::tower::Service<
  458    466   
                ::http::Request<Body>,
  459         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         467  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  460    468   
                Error = ::std::convert::Infallible,
  461    469   
            > + Clone
  462    470   
            + Send
  463    471   
            + 'static,
  464    472   
        S::Future: Send + 'static,
  465    473   
    {
  466    474   
        self.response_code_default_operation =
  467         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         475  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  468    476   
        self
  469    477   
    }
  470    478   
  471    479   
    /// Sets the [`ResponseCodeHttpFallbackOperation`](crate::operation_shape::ResponseCodeHttpFallbackOperation) operation.
  472    480   
    ///
  473         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  474         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         481  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         482  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  475    483   
    ///
  476    484   
    /// # Example
  477    485   
    ///
  478    486   
    /// ```no_run
  479    487   
    /// use misc::{MiscService, MiscServiceConfig};
  480    488   
    ///
  481    489   
    /// use misc::{input, output, error};
  482    490   
    ///
  483    491   
    /// async fn handler(input: input::ResponseCodeHttpFallbackOperationInput) -> Result<output::ResponseCodeHttpFallbackOperationOutput, error::ResponseCodeHttpFallbackOperationError> {
  484    492   
    ///     todo!()
  485    493   
    /// }
  486    494   
    ///
  487    495   
    /// let config = MiscServiceConfig::builder().build();
  488    496   
    /// let app = MiscService::builder(config)
  489    497   
    ///     .response_code_http_fallback_operation(handler)
  490    498   
    ///     /* Set other handlers */
  491    499   
    ///     .build()
  492    500   
    ///     .unwrap();
  493         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         501  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  494    502   
    /// ```
  495    503   
    ///
  496    504   
                    pub fn response_code_http_fallback_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  497    505   
                    where
  498         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::ResponseCodeHttpFallbackOperation, HandlerExtractors>,
         506  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::ResponseCodeHttpFallbackOperation, HandlerExtractors>,
  499    507   
  500         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         508  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  501    509   
                            MiscService<L>,
  502    510   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  503         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeHttpFallbackOperation, HandlerType>
         511  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeHttpFallbackOperation, HandlerType>
  504    512   
                        >,
  505         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         513  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  506    514   
                            MiscService<L>,
  507    515   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  508    516   
                            ModelPl::Output
  509    517   
                        >,
  510         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         518  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  511    519   
                            MiscService<L>,
  512    520   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  513    521   
                            <
  514         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  515         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         522  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         523  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  516    524   
                                    MiscService<L>,
  517    525   
                                    crate::operation_shape::ResponseCodeHttpFallbackOperation,
  518    526   
                                    ModelPl::Output
  519    527   
                                >
  520    528   
                            >::Output
  521    529   
                        >,
  522    530   
  523         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         531  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  524    532   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  525    533   
  526    534   
                    {
  527         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  528         -
        use ::aws_smithy_http_server::plugin::Plugin;
         535  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         536  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  529    537   
        let svc = crate::operation_shape::ResponseCodeHttpFallbackOperation::from_handler(handler);
  530    538   
        let svc = self.model_plugin.apply(svc);
  531         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         539  +
        let svc =
         540  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  532    541   
                .apply(svc);
  533    542   
        let svc = self.http_plugin.apply(svc);
  534    543   
        self.response_code_http_fallback_operation_custom(svc)
  535    544   
    }
  536    545   
  537    546   
    /// Sets the [`ResponseCodeHttpFallbackOperation`](crate::operation_shape::ResponseCodeHttpFallbackOperation) operation.
  538    547   
    ///
  539         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  540         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         548  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         549  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  541    550   
    ///
  542    551   
    /// # Example
  543    552   
    ///
  544    553   
    /// ```no_run
  545    554   
    /// use misc::{MiscService, MiscServiceConfig};
  546    555   
    ///
  547    556   
    /// use misc::{input, output, error};
  548    557   
    ///
  549    558   
    /// async fn handler(input: input::ResponseCodeHttpFallbackOperationInput) -> Result<output::ResponseCodeHttpFallbackOperationOutput, error::ResponseCodeHttpFallbackOperationError> {
  550    559   
    ///     todo!()
  551    560   
    /// }
  552    561   
    ///
  553    562   
    /// let config = MiscServiceConfig::builder().build();
  554    563   
    /// let svc = ::tower::util::service_fn(handler);
  555    564   
    /// let app = MiscService::builder(config)
  556    565   
    ///     .response_code_http_fallback_operation_service(svc)
  557    566   
    ///     /* Set other handlers */
  558    567   
    ///     .build()
  559    568   
    ///     .unwrap();
  560         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         569  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  561    570   
    /// ```
  562    571   
    ///
  563    572   
                    pub fn response_code_http_fallback_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  564    573   
                    where
  565         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeHttpFallbackOperation, ServiceExtractors>,
         574  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeHttpFallbackOperation, ServiceExtractors>,
  566    575   
  567         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         576  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  568    577   
                            MiscService<L>,
  569    578   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  570         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeHttpFallbackOperation, S>
         579  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeHttpFallbackOperation, S>
  571    580   
                        >,
  572         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         581  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  573    582   
                            MiscService<L>,
  574    583   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  575    584   
                            ModelPl::Output
  576    585   
                        >,
  577         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         586  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  578    587   
                            MiscService<L>,
  579    588   
                            crate::operation_shape::ResponseCodeHttpFallbackOperation,
  580    589   
                            <
  581         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  582         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         590  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         591  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  583    592   
                                    MiscService<L>,
  584    593   
                                    crate::operation_shape::ResponseCodeHttpFallbackOperation,
  585    594   
                                    ModelPl::Output
  586    595   
                                >
  587    596   
                            >::Output
  588    597   
                        >,
  589    598   
  590         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         599  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  591    600   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  592    601   
  593    602   
                    {
  594         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  595         -
        use ::aws_smithy_http_server::plugin::Plugin;
         603  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         604  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  596    605   
        let svc = crate::operation_shape::ResponseCodeHttpFallbackOperation::from_service(service);
  597    606   
        let svc = self.model_plugin.apply(svc);
  598         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         607  +
        let svc =
         608  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  599    609   
                .apply(svc);
  600    610   
        let svc = self.http_plugin.apply(svc);
  601    611   
        self.response_code_http_fallback_operation_custom(svc)
  602    612   
    }
  603    613   
  604    614   
    /// Sets the [`ResponseCodeHttpFallbackOperation`](crate::operation_shape::ResponseCodeHttpFallbackOperation) to a custom [`Service`](tower::Service).
  605    615   
    /// not constrained by the Smithy contract.
  606    616   
    fn response_code_http_fallback_operation_custom<S>(mut self, svc: S) -> Self
  607    617   
    where
  608    618   
        S: ::tower::Service<
  609    619   
                ::http::Request<Body>,
  610         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         620  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  611    621   
                Error = ::std::convert::Infallible,
  612    622   
            > + Clone
  613    623   
            + Send
  614    624   
            + 'static,
  615    625   
        S::Future: Send + 'static,
  616    626   
    {
  617    627   
        self.response_code_http_fallback_operation =
  618         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         628  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  619    629   
        self
  620    630   
    }
  621    631   
  622    632   
    /// Sets the [`ResponseCodeRequiredOperation`](crate::operation_shape::ResponseCodeRequiredOperation) operation.
  623    633   
    ///
  624         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  625         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         634  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         635  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  626    636   
    ///
  627    637   
    /// # Example
  628    638   
    ///
  629    639   
    /// ```no_run
  630    640   
    /// use misc::{MiscService, MiscServiceConfig};
  631    641   
    ///
  632    642   
    /// use misc::{input, output, error};
  633    643   
    ///
  634    644   
    /// async fn handler(input: input::ResponseCodeRequiredOperationInput) -> Result<output::ResponseCodeRequiredOperationOutput, error::ResponseCodeRequiredOperationError> {
  635    645   
    ///     todo!()
  636    646   
    /// }
  637    647   
    ///
  638    648   
    /// let config = MiscServiceConfig::builder().build();
  639    649   
    /// let app = MiscService::builder(config)
  640    650   
    ///     .response_code_required_operation(handler)
  641    651   
    ///     /* Set other handlers */
  642    652   
    ///     .build()
  643    653   
    ///     .unwrap();
  644         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         654  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  645    655   
    /// ```
  646    656   
    ///
  647    657   
                    pub fn response_code_required_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  648    658   
                    where
  649         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::ResponseCodeRequiredOperation, HandlerExtractors>,
         659  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::ResponseCodeRequiredOperation, HandlerExtractors>,
  650    660   
  651         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         661  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  652    662   
                            MiscService<L>,
  653    663   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  654         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeRequiredOperation, HandlerType>
         664  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::ResponseCodeRequiredOperation, HandlerType>
  655    665   
                        >,
  656         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         666  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  657    667   
                            MiscService<L>,
  658    668   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  659    669   
                            ModelPl::Output
  660    670   
                        >,
  661         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         671  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  662    672   
                            MiscService<L>,
  663    673   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  664    674   
                            <
  665         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  666         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         675  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         676  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  667    677   
                                    MiscService<L>,
  668    678   
                                    crate::operation_shape::ResponseCodeRequiredOperation,
  669    679   
                                    ModelPl::Output
  670    680   
                                >
  671    681   
                            >::Output
  672    682   
                        >,
  673    683   
  674         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         684  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  675    685   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  676    686   
  677    687   
                    {
  678         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  679         -
        use ::aws_smithy_http_server::plugin::Plugin;
         688  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         689  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  680    690   
        let svc = crate::operation_shape::ResponseCodeRequiredOperation::from_handler(handler);
  681    691   
        let svc = self.model_plugin.apply(svc);
  682         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         692  +
        let svc =
         693  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  683    694   
                .apply(svc);
  684    695   
        let svc = self.http_plugin.apply(svc);
  685    696   
        self.response_code_required_operation_custom(svc)
  686    697   
    }
  687    698   
  688    699   
    /// Sets the [`ResponseCodeRequiredOperation`](crate::operation_shape::ResponseCodeRequiredOperation) operation.
  689    700   
    ///
  690         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  691         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         701  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         702  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  692    703   
    ///
  693    704   
    /// # Example
  694    705   
    ///
  695    706   
    /// ```no_run
  696    707   
    /// use misc::{MiscService, MiscServiceConfig};
  697    708   
    ///
  698    709   
    /// use misc::{input, output, error};
  699    710   
    ///
  700    711   
    /// async fn handler(input: input::ResponseCodeRequiredOperationInput) -> Result<output::ResponseCodeRequiredOperationOutput, error::ResponseCodeRequiredOperationError> {
  701    712   
    ///     todo!()
  702    713   
    /// }
  703    714   
    ///
  704    715   
    /// let config = MiscServiceConfig::builder().build();
  705    716   
    /// let svc = ::tower::util::service_fn(handler);
  706    717   
    /// let app = MiscService::builder(config)
  707    718   
    ///     .response_code_required_operation_service(svc)
  708    719   
    ///     /* Set other handlers */
  709    720   
    ///     .build()
  710    721   
    ///     .unwrap();
  711         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         722  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  712    723   
    /// ```
  713    724   
    ///
  714    725   
                    pub fn response_code_required_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  715    726   
                    where
  716         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeRequiredOperation, ServiceExtractors>,
         727  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::ResponseCodeRequiredOperation, ServiceExtractors>,
  717    728   
  718         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         729  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  719    730   
                            MiscService<L>,
  720    731   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  721         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeRequiredOperation, S>
         732  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::ResponseCodeRequiredOperation, S>
  722    733   
                        >,
  723         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         734  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  724    735   
                            MiscService<L>,
  725    736   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  726    737   
                            ModelPl::Output
  727    738   
                        >,
  728         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         739  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  729    740   
                            MiscService<L>,
  730    741   
                            crate::operation_shape::ResponseCodeRequiredOperation,
  731    742   
                            <
  732         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  733         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         743  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         744  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  734    745   
                                    MiscService<L>,
  735    746   
                                    crate::operation_shape::ResponseCodeRequiredOperation,
  736    747   
                                    ModelPl::Output
  737    748   
                                >
  738    749   
                            >::Output
  739    750   
                        >,
  740    751   
  741         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         752  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  742    753   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  743    754   
  744    755   
                    {
  745         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  746         -
        use ::aws_smithy_http_server::plugin::Plugin;
         756  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         757  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  747    758   
        let svc = crate::operation_shape::ResponseCodeRequiredOperation::from_service(service);
  748    759   
        let svc = self.model_plugin.apply(svc);
  749         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         760  +
        let svc =
         761  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  750    762   
                .apply(svc);
  751    763   
        let svc = self.http_plugin.apply(svc);
  752    764   
        self.response_code_required_operation_custom(svc)
  753    765   
    }
  754    766   
  755    767   
    /// Sets the [`ResponseCodeRequiredOperation`](crate::operation_shape::ResponseCodeRequiredOperation) to a custom [`Service`](tower::Service).
  756    768   
    /// not constrained by the Smithy contract.
  757    769   
    fn response_code_required_operation_custom<S>(mut self, svc: S) -> Self
  758    770   
    where
  759    771   
        S: ::tower::Service<
  760    772   
                ::http::Request<Body>,
  761         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         773  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  762    774   
                Error = ::std::convert::Infallible,
  763    775   
            > + Clone
  764    776   
            + Send
  765    777   
            + 'static,
  766    778   
        S::Future: Send + 'static,
  767    779   
    {
  768    780   
        self.response_code_required_operation =
  769         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         781  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  770    782   
        self
  771    783   
    }
  772    784   
  773    785   
    /// Sets the [`TypeComplexityOperation`](crate::operation_shape::TypeComplexityOperation) operation.
  774    786   
    ///
  775         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  776         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         787  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         788  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  777    789   
    ///
  778    790   
    /// # Example
  779    791   
    ///
  780    792   
    /// ```no_run
  781    793   
    /// use misc::{MiscService, MiscServiceConfig};
  782    794   
    ///
  783    795   
    /// use misc::{input, output, error};
  784    796   
    ///
  785    797   
    /// async fn handler(input: input::TypeComplexityOperationInput) -> Result<output::TypeComplexityOperationOutput, error::TypeComplexityOperationError> {
  786    798   
    ///     todo!()
  787    799   
    /// }
  788    800   
    ///
  789    801   
    /// let config = MiscServiceConfig::builder().build();
  790    802   
    /// let app = MiscService::builder(config)
  791    803   
    ///     .type_complexity_operation(handler)
  792    804   
    ///     /* Set other handlers */
  793    805   
    ///     .build()
  794    806   
    ///     .unwrap();
  795         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         807  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  796    808   
    /// ```
  797    809   
    ///
  798    810   
                    pub fn type_complexity_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  799    811   
                    where
  800         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::TypeComplexityOperation, HandlerExtractors>,
         812  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::TypeComplexityOperation, HandlerExtractors>,
  801    813   
  802         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         814  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  803    815   
                            MiscService<L>,
  804    816   
                            crate::operation_shape::TypeComplexityOperation,
  805         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::TypeComplexityOperation, HandlerType>
         817  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::TypeComplexityOperation, HandlerType>
  806    818   
                        >,
  807         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         819  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  808    820   
                            MiscService<L>,
  809    821   
                            crate::operation_shape::TypeComplexityOperation,
  810    822   
                            ModelPl::Output
  811    823   
                        >,
  812         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         824  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  813    825   
                            MiscService<L>,
  814    826   
                            crate::operation_shape::TypeComplexityOperation,
  815    827   
                            <
  816         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  817         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         828  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         829  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  818    830   
                                    MiscService<L>,
  819    831   
                                    crate::operation_shape::TypeComplexityOperation,
  820    832   
                                    ModelPl::Output
  821    833   
                                >
  822    834   
                            >::Output
  823    835   
                        >,
  824    836   
  825         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         837  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  826    838   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  827    839   
  828    840   
                    {
  829         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  830         -
        use ::aws_smithy_http_server::plugin::Plugin;
         841  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         842  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  831    843   
        let svc = crate::operation_shape::TypeComplexityOperation::from_handler(handler);
  832    844   
        let svc = self.model_plugin.apply(svc);
  833         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         845  +
        let svc =
         846  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  834    847   
                .apply(svc);
  835    848   
        let svc = self.http_plugin.apply(svc);
  836    849   
        self.type_complexity_operation_custom(svc)
  837    850   
    }
  838    851   
  839    852   
    /// Sets the [`TypeComplexityOperation`](crate::operation_shape::TypeComplexityOperation) operation.
  840    853   
    ///
  841         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  842         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         854  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         855  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  843    856   
    ///
  844    857   
    /// # Example
  845    858   
    ///
  846    859   
    /// ```no_run
  847    860   
    /// use misc::{MiscService, MiscServiceConfig};
  848    861   
    ///
  849    862   
    /// use misc::{input, output, error};
  850    863   
    ///
  851    864   
    /// async fn handler(input: input::TypeComplexityOperationInput) -> Result<output::TypeComplexityOperationOutput, error::TypeComplexityOperationError> {
  852    865   
    ///     todo!()
  853    866   
    /// }
  854    867   
    ///
  855    868   
    /// let config = MiscServiceConfig::builder().build();
  856    869   
    /// let svc = ::tower::util::service_fn(handler);
  857    870   
    /// let app = MiscService::builder(config)
  858    871   
    ///     .type_complexity_operation_service(svc)
  859    872   
    ///     /* Set other handlers */
  860    873   
    ///     .build()
  861    874   
    ///     .unwrap();
  862         -
    /// # let app: MiscService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         875  +
    /// # let app: MiscService<::aws_smithy_legacy_http_server::routing::RoutingService<::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<::aws_smithy_legacy_http_server::routing::Route>, ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>> = app;
  863    876   
    /// ```
  864    877   
    ///
  865    878   
                    pub fn type_complexity_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  866    879   
                    where
  867         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::TypeComplexityOperation, ServiceExtractors>,
         880  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::TypeComplexityOperation, ServiceExtractors>,
  868    881   
  869         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         882  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  870    883   
                            MiscService<L>,
  871    884   
                            crate::operation_shape::TypeComplexityOperation,
  872         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::TypeComplexityOperation, S>
         885  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::TypeComplexityOperation, S>
  873    886   
                        >,
  874         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         887  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  875    888   
                            MiscService<L>,
  876    889   
                            crate::operation_shape::TypeComplexityOperation,
  877    890   
                            ModelPl::Output
  878    891   
                        >,
  879         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         892  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  880    893   
                            MiscService<L>,
  881    894   
                            crate::operation_shape::TypeComplexityOperation,
  882    895   
                            <
  883         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  884         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         896  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         897  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  885    898   
                                    MiscService<L>,
  886    899   
                                    crate::operation_shape::TypeComplexityOperation,
  887    900   
                                    ModelPl::Output
  888    901   
                                >
  889    902   
                            >::Output
  890    903   
                        >,
  891    904   
  892         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         905  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  893    906   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  894    907   
  895    908   
                    {
  896         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  897         -
        use ::aws_smithy_http_server::plugin::Plugin;
         909  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         910  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  898    911   
        let svc = crate::operation_shape::TypeComplexityOperation::from_service(service);
  899    912   
        let svc = self.model_plugin.apply(svc);
  900         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         913  +
        let svc =
         914  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  901    915   
                .apply(svc);
  902    916   
        let svc = self.http_plugin.apply(svc);
  903    917   
        self.type_complexity_operation_custom(svc)
  904    918   
    }
  905    919   
  906    920   
    /// Sets the [`TypeComplexityOperation`](crate::operation_shape::TypeComplexityOperation) to a custom [`Service`](tower::Service).
  907    921   
    /// not constrained by the Smithy contract.
  908    922   
    fn type_complexity_operation_custom<S>(mut self, svc: S) -> Self
  909    923   
    where
  910    924   
        S: ::tower::Service<
  911    925   
                ::http::Request<Body>,
  912         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         926  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  913    927   
                Error = ::std::convert::Infallible,
  914    928   
            > + Clone
  915    929   
            + Send
  916    930   
            + 'static,
  917    931   
        S::Future: Send + 'static,
  918    932   
    {
  919         -
        self.type_complexity_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
         933  +
        self.type_complexity_operation =
         934  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  920    935   
        self
  921    936   
    }
  922    937   
}
  923    938   
  924    939   
impl<Body, L, HttpPl, ModelPl> MiscServiceBuilder<Body, L, HttpPl, ModelPl> {
  925    940   
    /// Constructs a [`MiscService`] from the arguments provided to the builder.
  926    941   
    ///
  927    942   
    /// Forgetting to register a handler for one or more operations will result in an error.
  928    943   
    ///
  929    944   
    /// Check out [`MiscServiceBuilder::build_unchecked`] if you'd prefer the service to return status code 500 when an
  930    945   
    /// unspecified route is requested.
  931    946   
    pub fn build(
  932    947   
        self,
  933    948   
    ) -> ::std::result::Result<
  934    949   
        MiscService<
  935         -
            ::aws_smithy_http_server::routing::RoutingService<
  936         -
                ::aws_smithy_http_server::protocol::rest::router::RestRouter<L::Service>,
  937         -
                ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         950  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
         951  +
                ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<L::Service>,
         952  +
                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  938    953   
            >,
  939    954   
        >,
  940    955   
        MissingOperationsError,
  941    956   
    >
  942    957   
    where
  943         -
        L: ::tower::Layer<::aws_smithy_http_server::routing::Route<Body>>,
         958  +
        L: ::tower::Layer<::aws_smithy_legacy_http_server::routing::Route<Body>>,
  944    959   
    {
  945    960   
        let router = {
  946         -
            use ::aws_smithy_http_server::operation::OperationShape;
         961  +
            use ::aws_smithy_legacy_http_server::operation::OperationShape;
  947    962   
            let mut missing_operation_names = std::collections::HashMap::new();
  948    963   
            if self.required_header_collection_operation.is_none() {
  949    964   
                missing_operation_names.insert(
  950    965   
                    crate::operation_shape::RequiredHeaderCollectionOperation::ID,
  951    966   
                    ".required_header_collection_operation()",
  952    967   
                );
  953    968   
            }
  954    969   
            if self.required_inner_shape_operation.is_none() {
  955    970   
                missing_operation_names.insert(
  956    971   
                    crate::operation_shape::RequiredInnerShapeOperation::ID,
  957    972   
                    ".required_inner_shape_operation()",
  958    973   
                );
  959    974   
            }
  960    975   
            if self.response_code_default_operation.is_none() {
  961    976   
                missing_operation_names.insert(
  962    977   
                    crate::operation_shape::ResponseCodeDefaultOperation::ID,
  963    978   
                    ".response_code_default_operation()",
  964    979   
                );
  965    980   
            }
  966    981   
            if self.response_code_http_fallback_operation.is_none() {
  967    982   
                missing_operation_names.insert(
  968    983   
                    crate::operation_shape::ResponseCodeHttpFallbackOperation::ID,
  969    984   
                    ".response_code_http_fallback_operation()",
  970    985   
                );
  971    986   
            }
  972    987   
            if self.response_code_required_operation.is_none() {
  973    988   
                missing_operation_names.insert(
  974    989   
                    crate::operation_shape::ResponseCodeRequiredOperation::ID,
  975    990   
                    ".response_code_required_operation()",
  976    991   
                );
  977    992   
            }
  978    993   
            if self.type_complexity_operation.is_none() {
  979    994   
                missing_operation_names.insert(
  980    995   
                    crate::operation_shape::TypeComplexityOperation::ID,
  981    996   
                    ".type_complexity_operation()",
  982    997   
                );
  983    998   
            }
  984    999   
            if !missing_operation_names.is_empty() {
  985   1000   
                return Err(MissingOperationsError {
  986   1001   
                    operation_names2setter_methods: missing_operation_names,
  987   1002   
                });
  988   1003   
            }
  989   1004   
            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";
  990   1005   
  991         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([
        1006  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter::from_iter([
  992   1007   
                (
  993   1008   
                    request_specs::required_header_collection_operation(),
  994   1009   
                    self.required_header_collection_operation
  995   1010   
                        .expect(unexpected_error_msg),
  996   1011   
                ),
  997   1012   
                (
  998   1013   
                    request_specs::required_inner_shape_operation(),
  999   1014   
                    self.required_inner_shape_operation
 1000   1015   
                        .expect(unexpected_error_msg),
 1001   1016   
                ),
 1002   1017   
                (
 1003   1018   
                    request_specs::response_code_default_operation(),
 1004   1019   
                    self.response_code_default_operation
 1005   1020   
                        .expect(unexpected_error_msg),
 1006   1021   
                ),
 1007   1022   
                (
 1008   1023   
                    request_specs::response_code_http_fallback_operation(),
 1009   1024   
                    self.response_code_http_fallback_operation
 1010   1025   
                        .expect(unexpected_error_msg),
 1011   1026   
                ),
 1012   1027   
                (
 1013   1028   
                    request_specs::response_code_required_operation(),
 1014   1029   
                    self.response_code_required_operation
 1015   1030   
                        .expect(unexpected_error_msg),
 1016   1031   
                ),
 1017   1032   
                (
 1018   1033   
                    request_specs::type_complexity_operation(),
 1019   1034   
                    self.type_complexity_operation.expect(unexpected_error_msg),
 1020   1035   
                ),
 1021   1036   
            ])
 1022   1037   
        };
 1023         -
        let svc = ::aws_smithy_http_server::routing::RoutingService::new(router);
        1038  +
        let svc = ::aws_smithy_legacy_http_server::routing::RoutingService::new(router);
 1024   1039   
        let svc = svc.map(|s| s.layer(self.layer));
 1025   1040   
        Ok(MiscService { svc })
 1026   1041   
    }
 1027   1042   
 1028   1043   
    /// Constructs a [`MiscService`] from the arguments provided to the builder.
 1029   1044   
    /// Operations without a handler default to returning 500 Internal Server Error to the caller.
 1030   1045   
    ///
 1031   1046   
    /// Check out [`MiscServiceBuilder::build`] if you'd prefer the builder to fail if one or more operations do
 1032   1047   
    /// not have a registered handler.
 1033   1048   
    pub fn build_unchecked(self) -> MiscService<L::Service>
 1034   1049   
    where
 1035   1050   
        Body: Send + 'static,
 1036   1051   
        L: ::tower::Layer<
 1037         -
            ::aws_smithy_http_server::routing::RoutingService<
 1038         -
                ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 1039         -
                    ::aws_smithy_http_server::routing::Route<Body>,
        1052  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
        1053  +
                ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
        1054  +
                    ::aws_smithy_legacy_http_server::routing::Route<Body>,
 1040   1055   
                >,
 1041         -
                ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1056  +
                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1042   1057   
            >,
 1043   1058   
        >,
 1044   1059   
    {
 1045         -
        let router = ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([
        1060  +
        let router =
        1061  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter::from_iter([
 1046   1062   
                (
 1047   1063   
                    request_specs::required_header_collection_operation(),
 1048   1064   
                    self.required_header_collection_operation
 1049   1065   
                        .unwrap_or_else(|| {
 1050         -
                        let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1051         -
                            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1066  +
                            let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1067  +
                                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1052   1068   
                            >::default();
 1053         -
                        ::aws_smithy_http_server::routing::Route::new(svc)
        1069  +
                            ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1054   1070   
                        }),
 1055   1071   
                ),
 1056   1072   
                (
 1057   1073   
                    request_specs::required_inner_shape_operation(),
 1058   1074   
                    self.required_inner_shape_operation.unwrap_or_else(|| {
 1059         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1060         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1075  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1076  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1061   1077   
                        >::default();
 1062         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
        1078  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1063   1079   
                    }),
 1064   1080   
                ),
 1065   1081   
                (
 1066   1082   
                    request_specs::response_code_default_operation(),
 1067   1083   
                    self.response_code_default_operation.unwrap_or_else(|| {
 1068         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1069         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1084  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1085  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1070   1086   
                        >::default();
 1071         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
        1087  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1072   1088   
                    }),
 1073   1089   
                ),
 1074   1090   
                (
 1075   1091   
                    request_specs::response_code_http_fallback_operation(),
 1076   1092   
                    self.response_code_http_fallback_operation
 1077   1093   
                        .unwrap_or_else(|| {
 1078         -
                        let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1079         -
                            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1094  +
                            let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1095  +
                                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1080   1096   
                            >::default();
 1081         -
                        ::aws_smithy_http_server::routing::Route::new(svc)
        1097  +
                            ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1082   1098   
                        }),
 1083   1099   
                ),
 1084   1100   
                (
 1085   1101   
                    request_specs::response_code_required_operation(),
 1086   1102   
                    self.response_code_required_operation.unwrap_or_else(|| {
 1087         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1088         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1103  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1104  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1089   1105   
                        >::default();
 1090         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
        1106  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1091   1107   
                    }),
 1092   1108   
                ),
 1093   1109   
                (
 1094   1110   
                    request_specs::type_complexity_operation(),
 1095   1111   
                    self.type_complexity_operation.unwrap_or_else(|| {
 1096         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 1097         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1112  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
        1113  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1098   1114   
                        >::default();
 1099         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
        1115  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
 1100   1116   
                    }),
 1101   1117   
                ),
 1102   1118   
            ]);
 1103   1119   
        let svc = self
 1104   1120   
            .layer
 1105         -
            .layer(::aws_smithy_http_server::routing::RoutingService::new(
 1106         -
                router,
 1107         -
            ));
        1121  +
            .layer(::aws_smithy_legacy_http_server::routing::RoutingService::new(router));
 1108   1122   
        MiscService { svc }
 1109   1123   
    }
 1110   1124   
}
 1111   1125   
 1112   1126   
/// The error encountered when calling the [`MiscServiceBuilder::build`] method if one or more operation handlers are not
 1113   1127   
/// specified.
 1114   1128   
#[derive(Debug)]
 1115   1129   
pub struct MissingOperationsError {
 1116   1130   
    operation_names2setter_methods:
 1117         -
        std::collections::HashMap<::aws_smithy_http_server::shape_id::ShapeId, &'static str>,
        1131  +
        std::collections::HashMap<::aws_smithy_legacy_http_server::shape_id::ShapeId, &'static str>,
 1118   1132   
}
 1119   1133   
 1120   1134   
impl std::fmt::Display for MissingOperationsError {
 1121   1135   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1122   1136   
        write!(
 1123   1137   
            f,
 1124   1138   
            "You must specify a handler for all operations attached to `MiscService`.\n\
 1125   1139   
                            We are missing handlers for the following operations:\n",
 1126   1140   
        )?;
 1127   1141   
        for operation_name in self.operation_names2setter_methods.keys() {
 1128   1142   
            writeln!(f, "- {}", operation_name.absolute())?;
 1129   1143   
        }
 1130   1144   
 1131   1145   
        writeln!(
 1132   1146   
            f,
 1133   1147   
            "\nUse the dedicated methods on `MiscServiceBuilder` to register the missing handlers:"
 1134   1148   
        )?;
 1135   1149   
        for setter_name in self.operation_names2setter_methods.values() {
 1136   1150   
            writeln!(f, "- {}", setter_name)?;
 1137   1151   
        }
 1138   1152   
        Ok(())
 1139   1153   
    }
 1140   1154   
}
 1141   1155   
 1142   1156   
impl std::error::Error for MissingOperationsError {}
 1143   1157   
 1144   1158   
mod request_specs {
 1145   1159   
    pub(super) fn required_header_collection_operation(
 1146         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1147         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1160  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1161  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1148   1162   
                    ::http::Method::GET,
 1149         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1150         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1151         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1152         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("required-header-collection-operation")),
        1163  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1164  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1165  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1166  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("required-header-collection-operation")),
 1153   1167   
]),
 1154         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1168  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1155   1169   
])
 1156   1170   
                        )
 1157   1171   
                    ),
 1158   1172   
                )
 1159   1173   
    }
 1160   1174   
    pub(super) fn required_inner_shape_operation(
 1161         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1162         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1175  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1176  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1163   1177   
                    ::http::Method::POST,
 1164         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1165         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1166         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1167         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("requiredInnerShapeOperation")),
        1178  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1179  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1180  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1181  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("requiredInnerShapeOperation")),
 1168   1182   
]),
 1169         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1183  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1170   1184   
])
 1171   1185   
                        )
 1172   1186   
                    ),
 1173   1187   
                )
 1174   1188   
    }
 1175   1189   
    pub(super) fn response_code_default_operation(
 1176         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1177         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1190  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1191  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1178   1192   
                    ::http::Method::GET,
 1179         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1180         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1181         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1182         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeDefaultOperation")),
        1193  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1194  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1195  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1196  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeDefaultOperation")),
 1183   1197   
]),
 1184         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1198  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1185   1199   
])
 1186   1200   
                        )
 1187   1201   
                    ),
 1188   1202   
                )
 1189   1203   
    }
 1190   1204   
    pub(super) fn response_code_http_fallback_operation(
 1191         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1192         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1205  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1206  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1193   1207   
                    ::http::Method::GET,
 1194         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1195         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1196         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1197         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeHttpFallbackOperation")),
        1208  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1209  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1210  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1211  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeHttpFallbackOperation")),
 1198   1212   
]),
 1199         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1213  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1200   1214   
])
 1201   1215   
                        )
 1202   1216   
                    ),
 1203   1217   
                )
 1204   1218   
    }
 1205   1219   
    pub(super) fn response_code_required_operation(
 1206         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1207         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1220  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1221  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1208   1222   
                    ::http::Method::GET,
 1209         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1210         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1211         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1212         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeRequiredOperation")),
        1223  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1224  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1225  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1226  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("responseCodeRequiredOperation")),
 1213   1227   
]),
 1214         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1228  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1215   1229   
])
 1216   1230   
                        )
 1217   1231   
                    ),
 1218   1232   
                )
 1219   1233   
    }
 1220   1234   
    pub(super) fn type_complexity_operation(
 1221         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 1222         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        1235  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
        1236  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
 1223   1237   
                    ::http::Method::POST,
 1224         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 1225         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 1226         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 1227         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("typeComplexityOperation")),
        1238  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
        1239  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
        1240  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        1241  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("typeComplexityOperation")),
 1228   1242   
]),
 1229         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        1243  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 1230   1244   
])
 1231   1245   
                        )
 1232   1246   
                    ),
 1233   1247   
                )
 1234   1248   
    }
 1235   1249   
}
 1236   1250   
 1237   1251   
/// A service to test miscellaneous aspects of code generation where protocol selection is not relevant. If you want to test something protocol-specific, add it to a separate `\[protocol\]-extras.smithy`.
 1238   1252   
///
 1239   1253   
/// See the [root](crate) documentation for more information.
 1240   1254   
#[derive(Clone)]
 1241   1255   
pub struct MiscService<
 1242         -
    S = ::aws_smithy_http_server::routing::RoutingService<
 1243         -
        ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 1244         -
            ::aws_smithy_http_server::routing::Route<::aws_smithy_http_server::body::BoxBody>,
        1256  +
    S = ::aws_smithy_legacy_http_server::routing::RoutingService<
        1257  +
        ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
        1258  +
            ::aws_smithy_legacy_http_server::routing::Route<
        1259  +
                ::aws_smithy_legacy_http_server::body::BoxBody,
 1245   1260   
            >,
 1246         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1261  +
        >,
        1262  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1247   1263   
    >,
 1248   1264   
> {
 1249   1265   
    // This is the router wrapped by layers.
 1250   1266   
    svc: S,
 1251   1267   
}
 1252   1268   
 1253   1269   
impl MiscService<()> {
 1254   1270   
    /// Constructs a builder for [`MiscService`].
 1255   1271   
    /// You must specify a configuration object holding any plugins and layers that should be applied
 1256   1272   
    /// to the operations in this service.
 1257   1273   
    pub fn builder<
 1258   1274   
        Body,
 1259   1275   
        L,
 1260         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 1261         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
        1276  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
        1277  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
 1262   1278   
    >(
 1263   1279   
        config: MiscServiceConfig<L, HttpPl, ModelPl>,
 1264   1280   
    ) -> MiscServiceBuilder<Body, L, HttpPl, ModelPl> {
 1265   1281   
        MiscServiceBuilder {
 1266   1282   
            required_header_collection_operation: None,
 1267   1283   
            required_inner_shape_operation: None,
 1268   1284   
            response_code_default_operation: None,
 1269   1285   
            response_code_http_fallback_operation: None,
 1270   1286   
            response_code_required_operation: None,
 1271   1287   
            type_complexity_operation: None,
 1272   1288   
            layer: config.layers,
 1273   1289   
            http_plugin: config.http_plugins,
 1274   1290   
            model_plugin: config.model_plugins,
 1275   1291   
        }
 1276   1292   
    }
 1277   1293   
 1278   1294   
    /// Constructs a builder for [`MiscService`].
 1279   1295   
    /// You must specify what plugins should be applied to the operations in this service.
 1280   1296   
    ///
 1281   1297   
    /// Use [`MiscService::builder_without_plugins`] if you don't need to apply plugins.
 1282   1298   
    ///
 1283         -
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
 1284         -
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
        1299  +
    /// Check out [`HttpPlugins`](::aws_smithy_legacy_http_server::plugin::HttpPlugins) and
        1300  +
    /// [`ModelPlugins`](::aws_smithy_legacy_http_server::plugin::ModelPlugins) if you need to apply
 1285   1301   
    /// multiple plugins.
 1286   1302   
    #[deprecated(
 1287   1303   
        since = "0.57.0",
 1288   1304   
        note = "please use the `builder` constructor and register plugins on the `MiscServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 1289   1305   
    )]
 1290   1306   
    pub fn builder_with_plugins<
 1291   1307   
        Body,
 1292         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 1293         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
        1308  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
        1309  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
 1294   1310   
    >(
 1295   1311   
        http_plugin: HttpPl,
 1296   1312   
        model_plugin: ModelPl,
 1297   1313   
    ) -> MiscServiceBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
 1298   1314   
        MiscServiceBuilder {
 1299   1315   
            required_header_collection_operation: None,
 1300   1316   
            required_inner_shape_operation: None,
 1301   1317   
            response_code_default_operation: None,
 1302   1318   
            response_code_http_fallback_operation: None,
 1303   1319   
            response_code_required_operation: None,
 1304   1320   
            type_complexity_operation: None,
 1305   1321   
            layer: ::tower::layer::util::Identity::new(),
 1306   1322   
            http_plugin,
 1307   1323   
            model_plugin,
 1308   1324   
        }
 1309   1325   
    }
 1310   1326   
 1311   1327   
    /// Constructs a builder for [`MiscService`].
 1312   1328   
    ///
 1313   1329   
    /// Use [`MiscService::builder_with_plugins`] if you need to specify plugins.
 1314   1330   
    #[deprecated(
 1315   1331   
        since = "0.57.0",
 1316   1332   
        note = "please use the `builder` constructor instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 1317   1333   
    )]
 1318   1334   
    pub fn builder_without_plugins<Body>() -> MiscServiceBuilder<
 1319   1335   
        Body,
 1320   1336   
        ::tower::layer::util::Identity,
 1321         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
 1322         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
        1337  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1338  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1323   1339   
    > {
 1324   1340   
        Self::builder_with_plugins(
 1325         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
 1326         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
        1341  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1342  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1327   1343   
        )
 1328   1344   
    }
 1329   1345   
}
 1330   1346   
 1331   1347   
impl<S> MiscService<S> {
 1332   1348   
    /// Converts [`MiscService`] into a [`MakeService`](tower::make::MakeService).
 1333         -
    pub fn into_make_service(self) -> ::aws_smithy_http_server::routing::IntoMakeService<Self> {
 1334         -
        ::aws_smithy_http_server::routing::IntoMakeService::new(self)
        1349  +
    pub fn into_make_service(
        1350  +
        self,
        1351  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeService<Self> {
        1352  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeService::new(self)
 1335   1353   
    }
 1336   1354   
 1337         -
    /// Converts [`MiscService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_http_server::request::connect_info::ConnectInfo).
        1355  +
    /// Converts [`MiscService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_legacy_http_server::request::connect_info::ConnectInfo).
 1338   1356   
    pub fn into_make_service_with_connect_info<C>(
 1339   1357   
        self,
 1340         -
    ) -> ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
 1341         -
        ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
        1358  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
        1359  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
 1342   1360   
    }
 1343   1361   
}
 1344   1362   
 1345   1363   
impl<S>
 1346   1364   
    MiscService<
 1347         -
        ::aws_smithy_http_server::routing::RoutingService<
 1348         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<S>,
 1349         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1365  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
        1366  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<S>,
        1367  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1350   1368   
        >,
 1351   1369   
    >
 1352   1370   
{
 1353   1371   
    /// Applies a [`Layer`](::tower::Layer) uniformly to all routes.
 1354   1372   
    #[deprecated(
 1355   1373   
        since = "0.57.0",
 1356   1374   
        note = "please add layers to the `MiscServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 1357   1375   
    )]
 1358   1376   
    pub fn layer<L>(
 1359   1377   
        self,
 1360   1378   
        layer: &L,
 1361   1379   
    ) -> MiscService<
 1362         -
        ::aws_smithy_http_server::routing::RoutingService<
 1363         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<L::Service>,
 1364         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1380  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
        1381  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<L::Service>,
        1382  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1365   1383   
        >,
 1366   1384   
    >
 1367   1385   
    where
 1368   1386   
        L: ::tower::Layer<S>,
 1369   1387   
    {
 1370   1388   
        MiscService {
 1371   1389   
            svc: self.svc.map(|s| s.layer(layer)),
 1372   1390   
        }
 1373   1391   
    }
 1374   1392   
 1375         -
    /// Applies [`Route::new`](::aws_smithy_http_server::routing::Route::new) to all routes.
        1393  +
    /// Applies [`Route::new`](::aws_smithy_legacy_http_server::routing::Route::new) to all routes.
 1376   1394   
    ///
 1377   1395   
    /// This has the effect of erasing all types accumulated via layers.
 1378   1396   
    pub fn boxed<B>(
 1379   1397   
        self,
 1380   1398   
    ) -> MiscService<
 1381         -
        ::aws_smithy_http_server::routing::RoutingService<
 1382         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 1383         -
                ::aws_smithy_http_server::routing::Route<B>,
        1399  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
        1400  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
        1401  +
                ::aws_smithy_legacy_http_server::routing::Route<B>,
 1384   1402   
            >,
 1385         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1403  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
 1386   1404   
        >,
 1387   1405   
    >
 1388   1406   
    where
 1389   1407   
        S: ::tower::Service<
 1390   1408   
            ::http::Request<B>,
 1391         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1409  +
            Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
 1392   1410   
            Error = std::convert::Infallible,
 1393   1411   
        >,
 1394   1412   
        S: Clone + Send + 'static,
 1395   1413   
        S::Future: Send + 'static,
 1396   1414   
    {
 1397   1415   
        self.layer(&::tower::layer::layer_fn(
 1398         -
            ::aws_smithy_http_server::routing::Route::new,
        1416  +
            ::aws_smithy_legacy_http_server::routing::Route::new,
 1399   1417   
        ))
 1400   1418   
    }
 1401   1419   
}
 1402   1420   
 1403   1421   
impl<S, R> ::tower::Service<R> for MiscService<S>
 1404   1422   
where
 1405   1423   
    S: ::tower::Service<R>,
 1406   1424   
{
 1407   1425   
    type Response = S::Response;
 1408   1426   
    type Error = S::Error;
 1409   1427   
    type Future = S::Future;
 1410   1428   
 1411   1429   
    fn poll_ready(
 1412   1430   
        &mut self,
 1413   1431   
        cx: &mut std::task::Context,
 1414   1432   
    ) -> std::task::Poll<::std::result::Result<(), Self::Error>> {
 1415   1433   
        self.svc.poll_ready(cx)
 1416   1434   
    }
 1417   1435   
 1418   1436   
    fn call(&mut self, request: R) -> Self::Future {
 1419   1437   
        self.svc.call(request)
 1420   1438   
    }
 1421   1439   
}
 1422   1440   
 1423   1441   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in MiscService.
 1424   1442   
#[allow(clippy::enum_variant_names)]
 1425   1443   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
 1426   1444   
pub enum Operation {
 1427   1445   
    RequiredHeaderCollectionOperation,
 1428   1446   
    RequiredInnerShapeOperation,
 1429   1447   
    ResponseCodeDefaultOperation,
 1430   1448   
    ResponseCodeHttpFallbackOperation,
 1431   1449   
    ResponseCodeRequiredOperation,
 1432   1450   
    TypeComplexityOperation,
 1433   1451   
}
 1434   1452   
 1435   1453   
impl Operation {
 1436         -
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
 1437         -
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
        1454  +
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_legacy_http_server::shape_id::ShapeId).
        1455  +
    pub fn shape_id(&self) -> ::aws_smithy_legacy_http_server::shape_id::ShapeId {
 1438   1456   
        match self {
 1439   1457   
            Operation::RequiredHeaderCollectionOperation => {
 1440         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
        1458  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1441   1459   
                    "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
 1442   1460   
                    "aws.protocoltests.misc",
 1443   1461   
                    "RequiredHeaderCollectionOperation",
 1444   1462   
                )
 1445   1463   
            }
 1446   1464   
            Operation::RequiredInnerShapeOperation => {
 1447         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
        1465  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1448   1466   
                    "aws.protocoltests.misc#RequiredInnerShapeOperation",
 1449   1467   
                    "aws.protocoltests.misc",
 1450   1468   
                    "RequiredInnerShapeOperation",
 1451   1469   
                )
 1452   1470   
            }
 1453   1471   
            Operation::ResponseCodeDefaultOperation => {
 1454         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
        1472  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1455   1473   
                    "aws.protocoltests.misc#ResponseCodeDefaultOperation",
 1456   1474   
                    "aws.protocoltests.misc",
 1457   1475   
                    "ResponseCodeDefaultOperation",
 1458   1476   
                )
 1459   1477   
            }
 1460   1478   
            Operation::ResponseCodeHttpFallbackOperation => {
 1461         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
        1479  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1462   1480   
                    "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
 1463   1481   
                    "aws.protocoltests.misc",
 1464   1482   
                    "ResponseCodeHttpFallbackOperation",
 1465   1483   
                )
 1466   1484   
            }
 1467   1485   
            Operation::ResponseCodeRequiredOperation => {
 1468         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
        1486  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1469   1487   
                    "aws.protocoltests.misc#ResponseCodeRequiredOperation",
 1470   1488   
                    "aws.protocoltests.misc",
 1471   1489   
                    "ResponseCodeRequiredOperation",
 1472   1490   
                )
 1473   1491   
            }
 1474         -
            Operation::TypeComplexityOperation => ::aws_smithy_http_server::shape_id::ShapeId::new(
        1492  +
            Operation::TypeComplexityOperation => {
        1493  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1475   1494   
                    "aws.protocoltests.misc#TypeComplexityOperation",
 1476   1495   
                    "aws.protocoltests.misc",
 1477   1496   
                    "TypeComplexityOperation",
 1478         -
            ),
        1497  +
                )
        1498  +
            }
 1479   1499   
        }
 1480   1500   
    }
 1481   1501   
}
 1482   1502   
impl<L>
 1483         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1503  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1484   1504   
        crate::operation_shape::RequiredHeaderCollectionOperation,
 1485   1505   
    > for MiscService<L>
 1486   1506   
{
 1487   1507   
    const VALUE: Operation = Operation::RequiredHeaderCollectionOperation;
 1488   1508   
}
 1489   1509   
impl<L>
 1490         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1510  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1491   1511   
        crate::operation_shape::RequiredInnerShapeOperation,
 1492   1512   
    > for MiscService<L>
 1493   1513   
{
 1494   1514   
    const VALUE: Operation = Operation::RequiredInnerShapeOperation;
 1495   1515   
}
 1496   1516   
impl<L>
 1497         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1517  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1498   1518   
        crate::operation_shape::ResponseCodeDefaultOperation,
 1499   1519   
    > for MiscService<L>
 1500   1520   
{
 1501   1521   
    const VALUE: Operation = Operation::ResponseCodeDefaultOperation;
 1502   1522   
}
 1503   1523   
impl<L>
 1504         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1524  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1505   1525   
        crate::operation_shape::ResponseCodeHttpFallbackOperation,
 1506   1526   
    > for MiscService<L>
 1507   1527   
{
 1508   1528   
    const VALUE: Operation = Operation::ResponseCodeHttpFallbackOperation;
 1509   1529   
}
 1510   1530   
impl<L>
 1511         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1531  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1512   1532   
        crate::operation_shape::ResponseCodeRequiredOperation,
 1513   1533   
    > for MiscService<L>
 1514   1534   
{
 1515   1535   
    const VALUE: Operation = Operation::ResponseCodeRequiredOperation;
 1516   1536   
}
 1517   1537   
impl<L>
 1518         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1538  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1519   1539   
        crate::operation_shape::TypeComplexityOperation,
 1520   1540   
    > for MiscService<L>
 1521   1541   
{
 1522   1542   
    const VALUE: Operation = Operation::TypeComplexityOperation;
 1523   1543   
}
 1524   1544   
 1525         -
impl<S> ::aws_smithy_http_server::service::ServiceShape for MiscService<S> {
 1526         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
 1527         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
        1545  +
impl<S> ::aws_smithy_legacy_http_server::service::ServiceShape for MiscService<S> {
        1546  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
        1547  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1528   1548   
            "aws.protocoltests.misc#MiscService",
 1529   1549   
            "aws.protocoltests.misc",
 1530   1550   
            "MiscService",
 1531   1551   
        );
 1532   1552   
 1533   1553   
    const VERSION: Option<&'static str> = Some("");
 1534   1554   
 1535         -
    type Protocol = ::aws_smithy_http_server::protocol::rest_json_1::RestJson1;
        1555  +
    type Protocol = ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1;
 1536   1556   
 1537   1557   
    type Operations = Operation;
 1538   1558   
}
 1539   1559   
/// Configuration for the [`MiscService`]. This is the central place where to register and
 1540   1560   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
 1541   1561   
///
 1542   1562   
/// ```rust,no_run
 1543   1563   
/// # use misc::MiscServiceConfig;
 1544         -
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
        1564  +
/// # use ::aws_smithy_legacy_http_server::plugin::IdentityPlugin;
 1545   1565   
/// # use ::tower::layer::util::Identity;
 1546   1566   
/// # let authentication_plugin = IdentityPlugin;
 1547   1567   
/// # let authorization_plugin = IdentityPlugin;
 1548   1568   
/// # let server_request_id_provider_layer = Identity::new();
 1549   1569   
/// let config = MiscServiceConfig::builder()
 1550   1570   
///     // Layers get executed first...
 1551   1571   
///     .layer(server_request_id_provider_layer)
 1552   1572   
///     // ...then HTTP plugins...
 1553   1573   
///     .http_plugin(authentication_plugin)
 1554   1574   
///     // ...and right after deserialization, model plugins.
 1555   1575   
///     .model_plugin(authorization_plugin)
 1556   1576   
///     .build();
 1557   1577   
/// ```
 1558   1578   
///
 1559   1579   
/// See the [`plugin`] system for details.
 1560   1580   
///
 1561         -
/// [`plugin`]: ::aws_smithy_http_server::plugin
        1581  +
/// [`plugin`]: ::aws_smithy_legacy_http_server::plugin
 1562   1582   
#[derive(::std::fmt::Debug)]
 1563   1583   
pub struct MiscServiceConfig<L, H, M> {
 1564   1584   
    layers: L,
 1565   1585   
    http_plugins: H,
 1566   1586   
    model_plugins: M,
 1567   1587   
}
 1568   1588   
 1569   1589   
impl MiscServiceConfig<(), (), ()> {
 1570   1590   
    /// Returns a builder to construct the configuration.
 1571   1591   
    pub fn builder() -> MiscServiceConfigBuilder<
 1572   1592   
        ::tower::layer::util::Identity,
 1573         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
 1574         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
        1593  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1594  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1575   1595   
    > {
 1576   1596   
        MiscServiceConfigBuilder {
 1577   1597   
            layers: ::tower::layer::util::Identity::new(),
 1578         -
            http_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
 1579         -
            model_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
        1598  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1599  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1580   1600   
        }
 1581   1601   
    }
 1582   1602   
}
 1583   1603   
 1584   1604   
/// Builder returned by [`MiscServiceConfig::builder()`].
 1585   1605   
#[derive(::std::fmt::Debug)]
 1586   1606   
pub struct MiscServiceConfigBuilder<L, H, M> {
 1587   1607   
    pub(crate) layers: L,
 1588   1608   
    pub(crate) http_plugins: H,
 1589   1609   
    pub(crate) model_plugins: M,
 1590   1610   
}
 1591   1611   
 1592   1612   
impl<L, H, M> MiscServiceConfigBuilder<L, H, M> {
 1593   1613   
    /// Add a [`::tower::Layer`] to the service.
 1594   1614   
    pub fn layer<NewLayer>(
 1595   1615   
        self,
 1596   1616   
        layer: NewLayer,
 1597   1617   
    ) -> MiscServiceConfigBuilder<::tower::layer::util::Stack<NewLayer, L>, H, M> {
 1598   1618   
        MiscServiceConfigBuilder {
 1599   1619   
            layers: ::tower::layer::util::Stack::new(layer, self.layers),
 1600   1620   
            http_plugins: self.http_plugins,
 1601   1621   
            model_plugins: self.model_plugins,
 1602   1622   
        }
 1603   1623   
    }
 1604   1624   
 1605   1625   
    /// Add a HTTP [plugin] to the service.
 1606   1626   
    ///
 1607         -
    /// [plugin]: ::aws_smithy_http_server::plugin
        1627  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
 1608   1628   
    // We eagerly require `NewPlugin: HttpMarker`, despite not really needing it, because compiler
 1609   1629   
    // errors get _substantially_ better if the user makes a mistake.
 1610         -
    pub fn http_plugin<NewPlugin: ::aws_smithy_http_server::plugin::HttpMarker>(
        1630  +
    pub fn http_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::HttpMarker>(
 1611   1631   
        self,
 1612   1632   
        http_plugin: NewPlugin,
 1613         -
    ) -> MiscServiceConfigBuilder<L, ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, H>, M>
 1614         -
    {
        1633  +
    ) -> MiscServiceConfigBuilder<
        1634  +
        L,
        1635  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, H>,
        1636  +
        M,
        1637  +
    > {
 1615   1638   
        MiscServiceConfigBuilder {
 1616   1639   
            layers: self.layers,
 1617         -
            http_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
        1640  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
 1618   1641   
                http_plugin,
 1619   1642   
                self.http_plugins,
 1620   1643   
            ),
 1621   1644   
            model_plugins: self.model_plugins,
 1622   1645   
        }
 1623   1646   
    }
 1624   1647   
 1625   1648   
    /// Add a model [plugin] to the service.
 1626   1649   
    ///
 1627         -
    /// [plugin]: ::aws_smithy_http_server::plugin
        1650  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
 1628   1651   
    // We eagerly require `NewPlugin: ModelMarker`, despite not really needing it, because compiler
 1629   1652   
    // errors get _substantially_ better if the user makes a mistake.
 1630         -
    pub fn model_plugin<NewPlugin: ::aws_smithy_http_server::plugin::ModelMarker>(
        1653  +
    pub fn model_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::ModelMarker>(
 1631   1654   
        self,
 1632   1655   
        model_plugin: NewPlugin,
 1633         -
    ) -> MiscServiceConfigBuilder<L, H, ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, M>>
 1634         -
    {
        1656  +
    ) -> MiscServiceConfigBuilder<
        1657  +
        L,
        1658  +
        H,
        1659  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, M>,
        1660  +
    > {
 1635   1661   
        MiscServiceConfigBuilder {
 1636   1662   
            layers: self.layers,
 1637   1663   
            http_plugins: self.http_plugins,
 1638         -
            model_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
        1664  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
 1639   1665   
                model_plugin,
 1640   1666   
                self.model_plugins,
 1641   1667   
            ),
 1642   1668   
        }
 1643   1669   
    }
 1644   1670   
 1645   1671   
    /// Build the configuration.
 1646   1672   
    pub fn build(self) -> super::MiscServiceConfig<L, H, M> {
 1647   1673   
        super::MiscServiceConfig {
 1648   1674   
            layers: self.layers,