Server Test Typescript

Server Test Typescript

rev. 03e6e47f15dfd569240d570d98975ebba692c405 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/Cargo.toml

@@ -1,1 +65,69 @@
    2      2   
[package]
    3      3   
name = "pokemon-service-server-sdk"
    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     12   
[dependencies.aws-smithy-http-server]
   15     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server"
   16     14   
[dependencies.aws-smithy-json]
   17     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"
   18     20   
[dependencies.aws-smithy-runtime-api]
   19     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          22  +
features = ["http-02x"]
   20     23   
[dependencies.aws-smithy-types]
   21     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          25  +
features = ["http-body-0-4-x"]
   22     26   
[dependencies.futures-util]
   23     27   
version = "0.3"
   24     28   
[dependencies.http]
   25     29   
version = "0.2.9"
   26     30   
[dependencies.hyper]
   27     31   
version = "0.14.12"
   28     32   
features = ["server", "http1", "http2", "tcp", "stream"]
   29     33   
[dependencies.mime]
   30     34   
version = "0.3"
   31     35   
[dependencies.napi]
   32     36   
version = "2.11"
   33     37   
features = ["tokio_rt", "napi8"]
   34     38   
[dependencies.napi-derive]
   35     39   
version = "2.11"
   36     40   
[dependencies.nom]
   37     41   
version = "7"
   38     42   
[dependencies.percent-encoding]
   39     43   
version = "2.0.0"
   40     44   
[dependencies.pin-project-lite]
   41     45   
version = "0.2"
   42     46   
[dependencies.socket2]
   43     47   
version = "0.4"
   44     48   
[dependencies.tokio]
   45     49   
version = "1.20.1"
   46     50   
features = ["full"]
   47     51   
[dependencies.tower]
   48     52   
version = "0.4"
   49     53   
[dependencies.tracing]
   50     54   
version = "0.1"
   51     55   
[build-dependencies.napi-build]
   52     56   
version = "2.0"
   53     57   
[dev-dependencies.hyper]
   54         -
version = "0.14.12"
          58  +
version = "0.14.26"
   55     59   
[dev-dependencies.tokio]
   56     60   
version = "1.23.1"
   57     61   
[features]
   58     62   
rt-tokio = ["aws-smithy-types/rt-tokio"]
   59         -
aws-lambda = ["aws-smithy-http-server/aws-lambda"]
   60         -
request-id = ["aws-smithy-http-server/request-id"]
          63  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          64  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
   61     65   
default = ["rt-tokio", "request-id"]
   62     66   
[lib]
   63     67   
crate-type = ["cdylib"]
   64     68   
   65     69   

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/input.rs

@@ -81,81 +141,141 @@
  101    101   
                    message: format!(
  102    102   
                        "Value at '{}/name' failed to satisfy constraint: Member must not be null",
  103    103   
                        path
  104    104   
                    ),
  105    105   
                    path: path + "/name",
  106    106   
                },
  107    107   
            }
  108    108   
        }
  109    109   
    }
  110    110   
    impl ::std::convert::From<ConstraintViolation>
  111         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
         111  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
  112    112   
    {
  113    113   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  114    114   
            let first_validation_exception_field =
  115    115   
                constraint_violation.as_validation_exception_field("".to_owned());
  116    116   
            let validation_exception = crate::error::ValidationException {
  117    117   
                message: format!(
  118    118   
                    "1 validation error detected. {}",
  119    119   
                    &first_validation_exception_field.message
  120    120   
                ),
  121    121   
                field_list: Some(vec![first_validation_exception_field]),

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/lib.rs

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

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/operation.rs

@@ -1,1 +400,394 @@
    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   
    /// [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) using modelled bindings.
    5      5   
    pub struct GetPokemonSpeciesInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::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::GetPokemonSpeciesInput, ::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 GetPokemonSpeciesInputFuture {
   11     11   
    type Output = Result<
   12     12   
        crate::input::GetPokemonSpeciesInput,
   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::GetPokemonSpeciesInput
   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 = GetPokemonSpeciesInputFuture;
   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_get_pokemon_species::de_get_pokemon_species_http_request(
   50     51   
                request,
   51     52   
            )
   52     53   
            .await
   53     54   
        };
   54     55   
        use ::futures_util::future::TryFutureExt;
   55         -
        let fut = fut.map_err(
   56         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
          56  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     57   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
   58         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59         -
                    e,
   60         -
                )
   61         -
            },
   62         -
        );
          58  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
          59  +
                    });
   63     60   
        GetPokemonSpeciesInputFuture {
   64     61   
            inner: Box::pin(fut),
   65     62   
        }
   66     63   
    }
   67     64   
}
   68     65   
impl
   69         -
    ::aws_smithy_http_server::response::IntoResponse<
   70         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          66  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          67  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   71     68   
    > for crate::output::GetPokemonSpeciesOutput
   72     69   
{
   73         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          70  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   74     71   
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_response(self) {
   75     72   
                        Ok(response) => response,
   76     73   
                        Err(e) => {
   77     74   
                            ::tracing::error!(error = %e, "failed to serialize response");
   78         -
                            ::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))
          75  +
                            ::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))
   79     76   
                        }
   80     77   
                    }
   81     78   
    }
   82     79   
}
   83     80   
impl
   84         -
    ::aws_smithy_http_server::response::IntoResponse<
   85         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          81  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          82  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   86     83   
    > for crate::error::GetPokemonSpeciesError
   87     84   
{
   88         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          85  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   89     86   
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_error(
   90     87   
            &self,
   91     88   
        ) {
   92     89   
            Ok(mut response) => {
   93     90   
                response.extensions_mut().insert(
   94         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
          91  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
          92  +
                        self.name(),
          93  +
                    ),
   95     94   
                );
   96     95   
                response
   97     96   
            }
   98     97   
            Err(e) => {
   99     98   
                ::tracing::error!(error = %e, "failed to serialize response");
  100         -
                ::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))
          99  +
                ::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))
  101    100   
            }
  102    101   
        }
  103    102   
    }
  104    103   
}
  105    104   
  106    105   
::pin_project_lite::pin_project! {
  107    106   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  108    107   
    /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
  109    108   
    pub struct CheckHealthInputFuture {
  110         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         109  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  111    110   
    }
  112    111   
}
  113    112   
  114    113   
impl std::future::Future for CheckHealthInputFuture {
  115    114   
    type Output = Result<
  116    115   
        crate::input::CheckHealthInput,
  117         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         116  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  118    117   
    >;
  119    118   
  120    119   
    fn poll(
  121    120   
        self: std::pin::Pin<&mut Self>,
  122    121   
        cx: &mut std::task::Context<'_>,
  123    122   
    ) -> std::task::Poll<Self::Output> {
  124    123   
        let this = self.project();
  125    124   
        this.inner.as_mut().poll(cx)
  126    125   
    }
  127    126   
}
  128    127   
  129    128   
impl<B>
  130         -
    ::aws_smithy_http_server::request::FromRequest<
  131         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         129  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         130  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  132    131   
        B,
  133    132   
    > for crate::input::CheckHealthInput
  134    133   
where
  135         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         134  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  136    135   
    B: 'static,
  137    136   
  138    137   
    B::Data: Send,
  139         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  140         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         138  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         139  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  141    140   
{
  142         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         141  +
    type Rejection =
         142  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  143    143   
    type Future = CheckHealthInputFuture;
  144    144   
  145    145   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  146    146   
        let fut = async move {
  147         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         147  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  148    148   
                request.headers(),
  149    149   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  150    150   
            ) {
  151         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         151  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  152    152   
            }
  153    153   
            crate::protocol_serde::shape_check_health::de_check_health_http_request(request).await
  154    154   
        };
  155    155   
        use ::futures_util::future::TryFutureExt;
  156         -
        let fut = fut.map_err(
  157         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         156  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  158    157   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  159         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  160         -
                    e,
  161         -
                )
  162         -
            },
  163         -
        );
         158  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         159  +
                    });
  164    160   
        CheckHealthInputFuture {
  165    161   
            inner: Box::pin(fut),
  166    162   
        }
  167    163   
    }
  168    164   
}
  169    165   
impl
  170         -
    ::aws_smithy_http_server::response::IntoResponse<
  171         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         166  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         167  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  172    168   
    > for crate::output::CheckHealthOutput
  173    169   
{
  174         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         170  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  175    171   
        match crate::protocol_serde::shape_check_health::ser_check_health_http_response(self) {
  176    172   
            Ok(response) => response,
  177    173   
            Err(e) => {
  178    174   
                ::tracing::error!(error = %e, "failed to serialize response");
  179         -
                ::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))
         175  +
                ::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))
  180    176   
            }
  181    177   
        }
  182    178   
    }
  183    179   
}
  184    180   
impl
  185         -
    ::aws_smithy_http_server::response::IntoResponse<
  186         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         181  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         182  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  187    183   
    > for crate::error::CheckHealthError
  188    184   
{
  189         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         185  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  190    186   
        match crate::protocol_serde::shape_check_health::ser_check_health_http_error(&self) {
  191    187   
            Ok(mut response) => {
  192    188   
                response.extensions_mut().insert(
  193         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         189  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         190  +
                        self.name(),
         191  +
                    ),
  194    192   
                );
  195    193   
                response
  196    194   
            }
  197    195   
            Err(e) => {
  198    196   
                ::tracing::error!(error = %e, "failed to serialize response");
  199         -
                ::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))
         197  +
                ::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))
  200    198   
            }
  201    199   
        }
  202    200   
    }
  203    201   
}
  204    202   
  205    203   
::pin_project_lite::pin_project! {
  206    204   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  207    205   
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
  208    206   
    pub struct DoNothingInputFuture {
  209         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         207  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  210    208   
    }
  211    209   
}
  212    210   
  213    211   
impl std::future::Future for DoNothingInputFuture {
  214    212   
    type Output = Result<
  215    213   
        crate::input::DoNothingInput,
  216         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         214  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  217    215   
    >;
  218    216   
  219    217   
    fn poll(
  220    218   
        self: std::pin::Pin<&mut Self>,
  221    219   
        cx: &mut std::task::Context<'_>,
  222    220   
    ) -> std::task::Poll<Self::Output> {
  223    221   
        let this = self.project();
  224    222   
        this.inner.as_mut().poll(cx)
  225    223   
    }
  226    224   
}
  227    225   
  228    226   
impl<B>
  229         -
    ::aws_smithy_http_server::request::FromRequest<
  230         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         227  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         228  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  231    229   
        B,
  232    230   
    > for crate::input::DoNothingInput
  233    231   
where
  234         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         232  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  235    233   
    B: 'static,
  236    234   
  237    235   
    B::Data: Send,
  238         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  239         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         236  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         237  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  240    238   
{
  241         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         239  +
    type Rejection =
         240  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  242    241   
    type Future = DoNothingInputFuture;
  243    242   
  244    243   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  245    244   
        let fut = async move {
  246         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         245  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  247    246   
                request.headers(),
  248    247   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  249    248   
            ) {
  250         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         249  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  251    250   
            }
  252    251   
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
  253    252   
        };
  254    253   
        use ::futures_util::future::TryFutureExt;
  255         -
        let fut = fut.map_err(
  256         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         254  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  257    255   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  258         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  259         -
                    e,
  260         -
                )
  261         -
            },
  262         -
        );
         256  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         257  +
                    });
  263    258   
        DoNothingInputFuture {
  264    259   
            inner: Box::pin(fut),
  265    260   
        }
  266    261   
    }
  267    262   
}
  268    263   
impl
  269         -
    ::aws_smithy_http_server::response::IntoResponse<
  270         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         264  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         265  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  271    266   
    > for crate::output::DoNothingOutput
  272    267   
{
  273         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         268  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  274    269   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
  275    270   
            Ok(response) => response,
  276    271   
            Err(e) => {
  277    272   
                ::tracing::error!(error = %e, "failed to serialize response");
  278         -
                ::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))
         273  +
                ::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))
  279    274   
            }
  280    275   
        }
  281    276   
    }
  282    277   
}
  283    278   
impl
  284         -
    ::aws_smithy_http_server::response::IntoResponse<
  285         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         279  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         280  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  286    281   
    > for crate::error::DoNothingError
  287    282   
{
  288         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         283  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  289    284   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_error(&self) {
  290    285   
            Ok(mut response) => {
  291    286   
                response.extensions_mut().insert(
  292         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         287  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         288  +
                        self.name(),
         289  +
                    ),
  293    290   
                );
  294    291   
                response
  295    292   
            }
  296    293   
            Err(e) => {
  297    294   
                ::tracing::error!(error = %e, "failed to serialize response");
  298         -
                ::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))
         295  +
                ::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))
  299    296   
            }
  300    297   
        }
  301    298   
    }
  302    299   
}
  303    300   
  304    301   
::pin_project_lite::pin_project! {
  305    302   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  306    303   
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
  307    304   
    pub struct GetServerStatisticsInputFuture {
  308         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         305  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  309    306   
    }
  310    307   
}
  311    308   
  312    309   
impl std::future::Future for GetServerStatisticsInputFuture {
  313    310   
    type Output = Result<
  314    311   
        crate::input::GetServerStatisticsInput,
  315         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         312  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  316    313   
    >;
  317    314   
  318    315   
    fn poll(
  319    316   
        self: std::pin::Pin<&mut Self>,
  320    317   
        cx: &mut std::task::Context<'_>,
  321    318   
    ) -> std::task::Poll<Self::Output> {
  322    319   
        let this = self.project();
  323    320   
        this.inner.as_mut().poll(cx)
  324    321   
    }
  325    322   
}
  326    323   
  327    324   
impl<B>
  328         -
    ::aws_smithy_http_server::request::FromRequest<
  329         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         325  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         326  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  330    327   
        B,
  331    328   
    > for crate::input::GetServerStatisticsInput
  332    329   
where
  333         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         330  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  334    331   
    B: 'static,
  335    332   
  336    333   
    B::Data: Send,
  337         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  338         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         334  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         335  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  339    336   
{
  340         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         337  +
    type Rejection =
         338  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  341    339   
    type Future = GetServerStatisticsInputFuture;
  342    340   
  343    341   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  344    342   
        let fut = async move {
  345         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         343  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  346    344   
                request.headers(),
  347    345   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  348    346   
            ) {
  349         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         347  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  350    348   
            }
  351    349   
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
  352    350   
                            .await
  353    351   
        };
  354    352   
        use ::futures_util::future::TryFutureExt;
  355         -
        let fut = fut.map_err(
  356         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         353  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  357    354   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  358         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  359         -
                    e,
  360         -
                )
  361         -
            },
  362         -
        );
         355  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         356  +
                    });
  363    357   
        GetServerStatisticsInputFuture {
  364    358   
            inner: Box::pin(fut),
  365    359   
        }
  366    360   
    }
  367    361   
}
  368    362   
impl
  369         -
    ::aws_smithy_http_server::response::IntoResponse<
  370         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         363  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         364  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  371    365   
    > for crate::output::GetServerStatisticsOutput
  372    366   
{
  373         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         367  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  374    368   
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
  375    369   
                        Ok(response) => response,
  376    370   
                        Err(e) => {
  377    371   
                            ::tracing::error!(error = %e, "failed to serialize response");
  378         -
                            ::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))
         372  +
                            ::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))
  379    373   
                        }
  380    374   
                    }
  381    375   
    }
  382    376   
}
  383    377   
impl
  384         -
    ::aws_smithy_http_server::response::IntoResponse<
  385         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         378  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         379  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  386    380   
    > for crate::error::GetServerStatisticsError
  387    381   
{
  388         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         382  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  389    383   
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_error(&self) {
  390    384   
            Ok(mut response) => {
  391         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         385  +
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  392    386   
                response
  393    387   
            },
  394    388   
            Err(e) => {
  395    389   
                ::tracing::error!(error = %e, "failed to serialize response");
  396         -
                ::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))
         390  +
                ::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))
  397    391   
            }
  398    392   
        }
  399    393   
    }
  400    394   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/operation_shape.rs

@@ -1,1 +153,157 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3      3   
/// Retrieve information about a Pokémon species.
    4      4   
pub struct GetPokemonSpecies;
    5      5   
    6         -
impl ::aws_smithy_http_server::operation::OperationShape for GetPokemonSpecies {
    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 GetPokemonSpecies {
           7  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           8  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
    9      9   
            "com.aws.example#GetPokemonSpecies",
   10     10   
            "com.aws.example",
   11     11   
            "GetPokemonSpecies",
   12     12   
        );
   13     13   
   14     14   
    type Input = crate::input::GetPokemonSpeciesInput;
   15     15   
    type Output = crate::output::GetPokemonSpeciesOutput;
   16     16   
    type Error = crate::error::GetPokemonSpeciesError;
   17     17   
}
   18     18   
   19         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetPokemonSpecies {
   20         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   21         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   22         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   23         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          19  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          20  +
    for GetPokemonSpecies
          21  +
{
          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,
   25     27   
        >,
   26     28   
    >;
   27         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   28         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   29         -
        ::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,
   30     32   
    >;
   31     33   
   32     34   
    fn request_fmt() -> Self::RequestFmt {
   33         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          35  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   34     36   
    }
   35     37   
   36     38   
    fn response_fmt() -> Self::ResponseFmt {
   37         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          39  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   38     40   
    }
   39     41   
}
   40     42   
   41     43   
/// Health check operation, to check the service is up Not yet a deep check
   42     44   
pub struct CheckHealth;
   43     45   
   44         -
impl ::aws_smithy_http_server::operation::OperationShape for CheckHealth {
   45         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   46         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          46  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for CheckHealth {
          47  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          48  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   47     49   
            "com.aws.example#CheckHealth",
   48     50   
            "com.aws.example",
   49     51   
            "CheckHealth",
   50     52   
        );
   51     53   
   52     54   
    type Input = crate::input::CheckHealthInput;
   53     55   
    type Output = crate::output::CheckHealthOutput;
   54     56   
    type Error = crate::error::CheckHealthError;
   55     57   
}
   56     58   
   57         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CheckHealth {
   58         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   59         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   60         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   61         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   62         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          59  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for CheckHealth {
          60  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          61  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          62  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          63  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          64  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   63     65   
        >,
   64     66   
    >;
   65         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   66         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   67         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          67  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          68  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          69  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   68     70   
    >;
   69     71   
   70     72   
    fn request_fmt() -> Self::RequestFmt {
   71         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          73  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   72     74   
    }
   73     75   
   74     76   
    fn response_fmt() -> Self::ResponseFmt {
   75         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          77  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   76     78   
    }
   77     79   
}
   78     80   
   79     81   
/// DoNothing operation, used to stress test the framework.
   80     82   
pub struct DoNothing;
   81     83   
   82         -
impl ::aws_smithy_http_server::operation::OperationShape for DoNothing {
   83         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   84         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          84  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for DoNothing {
          85  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          86  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   85     87   
            "com.aws.example#DoNothing",
   86     88   
            "com.aws.example",
   87     89   
            "DoNothing",
   88     90   
        );
   89     91   
   90     92   
    type Input = crate::input::DoNothingInput;
   91     93   
    type Output = crate::output::DoNothingOutput;
   92     94   
    type Error = crate::error::DoNothingError;
   93     95   
}
   94     96   
   95         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
   96         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   97         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   98         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   99         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  100         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          97  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
          98  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          99  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         100  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         101  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         102  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  101    103   
        >,
  102    104   
    >;
  103         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  104         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  105         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         105  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         106  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         107  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  106    108   
    >;
  107    109   
  108    110   
    fn request_fmt() -> Self::RequestFmt {
  109         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         111  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  110    112   
    }
  111    113   
  112    114   
    fn response_fmt() -> Self::ResponseFmt {
  113         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         115  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  114    116   
    }
  115    117   
}
  116    118   
  117    119   
/// Retrieve HTTP server statistiscs, such as calls count.
  118    120   
pub struct GetServerStatistics;
  119    121   
  120         -
impl ::aws_smithy_http_server::operation::OperationShape for GetServerStatistics {
  121         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  122         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         122  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetServerStatistics {
         123  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         124  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  123    125   
            "com.aws.example#GetServerStatistics",
  124    126   
            "com.aws.example",
  125    127   
            "GetServerStatistics",
  126    128   
        );
  127    129   
  128    130   
    type Input = crate::input::GetServerStatisticsInput;
  129    131   
    type Output = crate::output::GetServerStatisticsOutput;
  130    132   
    type Error = crate::error::GetServerStatisticsError;
  131    133   
}
  132    134   
  133         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetServerStatistics {
  134         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  135         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  136         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  137         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  138         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         135  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         136  +
    for GetServerStatistics
         137  +
{
         138  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         139  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         140  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         141  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         142  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  139    143   
        >,
  140    144   
    >;
  141         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  142         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  143         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         145  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         146  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         147  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  144    148   
    >;
  145    149   
  146    150   
    fn request_fmt() -> Self::RequestFmt {
  147         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         151  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  148    152   
    }
  149    153   
  150    154   
    fn response_fmt() -> Self::ResponseFmt {
  151         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         155  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  152    156   
    }
  153    157   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_check_health.rs

@@ -1,1 +91,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_check_health_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::CheckHealthInput,
    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::check_health_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         -
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          22  +
        ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          23  +
            &headers, None,
          24  +
        )?;
   23     25   
        input.build()
   24     26   
    })
   25     27   
}
   26     28   
   27     29   
#[allow(clippy::unnecessary_wraps)]
   28     30   
pub fn ser_check_health_http_response(
   29     31   
    #[allow(unused_variables)] output: crate::output::CheckHealthOutput,
   30     32   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          33  +
    ::aws_smithy_legacy_http_server::response::Response,
          34  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     35   
> {
   34     36   
    Ok({
   35     37   
        #[allow(unused_mut)]
   36     38   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          39  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     40   
            builder,
   39     41   
            ::http::header::CONTENT_TYPE,
   40     42   
            "application/json",
   41     43   
        );
   42     44   
        let http_status: u16 = 200;
   43     45   
        builder = builder.status(http_status);
   44     46   
        let payload = "";
   45     47   
        let content_length = payload.len();
   46         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   47     49   
            builder,
   48     50   
            ::http::header::CONTENT_LENGTH,
   49     51   
            content_length,
   50     52   
        );
   51         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   52     54   
        builder.body(body)?
   53     55   
    })
   54     56   
}
   55     57   
   56     58   
#[allow(clippy::unnecessary_wraps)]
   57     59   
pub fn ser_check_health_http_error(
   58     60   
    error: &crate::error::CheckHealthError,
   59     61   
) -> std::result::Result<
   60         -
    ::aws_smithy_http_server::response::Response,
   61         -
    ::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,
   62     64   
> {
   63     65   
    Ok({
   64     66   
        match error {
   65     67   
            crate::error::CheckHealthError::InternalServerError(output) => {
   66     68   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   67     69   
                #[allow(unused_mut)]
   68     70   
                let mut builder = ::http::Response::builder();
   69         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          71  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   70     72   
                    builder,
   71     73   
                    ::http::header::CONTENT_TYPE,
   72     74   
                    "application/json",
   73     75   
                );
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     77   
                    builder,
   76     78   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   77     79   
                    "InternalServerError",
   78     80   
                );
   79     81   
                let content_length = payload.len();
   80         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   81     83   
                    builder,
   82     84   
                    ::http::header::CONTENT_LENGTH,
   83     85   
                    content_length,
   84     86   
                );
   85     87   
                builder
   86     88   
                    .status(500)
   87         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   88     90   
            }
   89     91   
        }
   90     92   
    })
   91     93   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_do_nothing.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_do_nothing_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::DoNothingInput,
    7         -
    ::aws_smithy_http_server::protocol::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::do_nothing_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_do_nothing_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::DoNothingOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/json",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_do_nothing_output::ser_do_nothing_output_output_output(
   45     45   
                &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_do_nothing_http_error(
   60     60   
    error: &crate::error::DoNothingError,
   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::DoNothingError::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-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_pokemon_species.rs

@@ -1,1 +160,160 @@
    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_get_pokemon_species_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GetPokemonSpeciesInput,
    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::get_pokemon_species_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 input_string = uri.path();
   23     23   
        let (input_string, (_, m1)) =
   24     24   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   25     25   
                ::nom::sequence::preceded(
   26     26   
                    ::nom::bytes::complete::tag("/"),
   27     27   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
   28     28   
                        "pokemon-species",
   29     29   
                    ),
   30     30   
                ),
   31     31   
                ::nom::sequence::preceded(
   32     32   
                    ::nom::bytes::complete::tag("/"),
   33     33   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   34     34   
                        ::nom::bytes::complete::take_until("/"),
   35     35   
                        ::nom::combinator::rest,
   36     36   
                    )),
   37     37   
                ),
   38     38   
            ))(input_string)?;
   39     39   
        debug_assert_eq!("", input_string);
   40     40   
        input =
   41     41   
            input.set_name(crate::protocol_serde::shape_get_pokemon_species_input::de_name(m1)?);
   42     42   
        input.build()?
   43     43   
    })
   44     44   
}
   45     45   
   46     46   
#[allow(clippy::unnecessary_wraps)]
   47     47   
pub fn ser_get_pokemon_species_http_response(
   48     48   
    #[allow(unused_variables)] output: crate::output::GetPokemonSpeciesOutput,
   49     49   
) -> std::result::Result<
   50         -
    ::aws_smithy_http_server::response::Response,
   51         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          50  +
    ::aws_smithy_legacy_http_server::response::Response,
          51  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   52     52   
> {
   53     53   
    Ok({
   54     54   
        #[allow(unused_mut)]
   55     55   
        let mut builder = ::http::Response::builder();
   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_TYPE,
   59     59   
            "application/json",
   60     60   
        );
   61     61   
        let http_status: u16 = 200;
   62     62   
        builder = builder.status(http_status);
   63     63   
        let payload =
   64     64   
            crate::protocol_serde::shape_get_pokemon_species_output::ser_get_pokemon_species_output_output_output(&output)?
   65     65   
        ;
   66     66   
        let content_length = payload.len();
   67         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          67  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   68     68   
            builder,
   69     69   
            ::http::header::CONTENT_LENGTH,
   70     70   
            content_length,
   71     71   
        );
   72         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          72  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   73     73   
        builder.body(body)?
   74     74   
    })
   75     75   
}
   76     76   
   77     77   
#[allow(clippy::unnecessary_wraps)]
   78     78   
pub fn ser_get_pokemon_species_http_error(
   79     79   
    error: &crate::error::GetPokemonSpeciesError,
   80     80   
) -> std::result::Result<
   81         -
    ::aws_smithy_http_server::response::Response,
   82         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          81  +
    ::aws_smithy_legacy_http_server::response::Response,
          82  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   83     83   
> {
   84     84   
    Ok({
   85     85   
        match error {
   86     86   
            crate::error::GetPokemonSpeciesError::ResourceNotFoundException(output) => {
   87     87   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
   88     88   
                #[allow(unused_mut)]
   89     89   
                let mut builder = ::http::Response::builder();
   90         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   91     91   
                    builder,
   92     92   
                    ::http::header::CONTENT_TYPE,
   93     93   
                    "application/json",
   94     94   
                );
   95         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          95  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   96     96   
                    builder,
   97     97   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   98     98   
                    "ResourceNotFoundException",
   99     99   
                );
  100    100   
                let content_length = payload.len();
  101         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         101  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  102    102   
                    builder,
  103    103   
                    ::http::header::CONTENT_LENGTH,
  104    104   
                    content_length,
  105    105   
                );
  106    106   
                builder
  107    107   
                    .status(404)
  108         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         108  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  109    109   
            }
  110    110   
            crate::error::GetPokemonSpeciesError::ValidationException(output) => {
  111    111   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  112    112   
                #[allow(unused_mut)]
  113    113   
                let mut builder = ::http::Response::builder();
  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_TYPE,
  117    117   
                    "application/json",
  118    118   
                );
  119         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         119  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  120    120   
                    builder,
  121    121   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  122    122   
                    "ValidationException",
  123    123   
                );
  124    124   
                let content_length = payload.len();
  125         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         125  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  126    126   
                    builder,
  127    127   
                    ::http::header::CONTENT_LENGTH,
  128    128   
                    content_length,
  129    129   
                );
  130    130   
                builder
  131    131   
                    .status(400)
  132         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         132  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  133    133   
            }
  134    134   
            crate::error::GetPokemonSpeciesError::InternalServerError(output) => {
  135    135   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  136    136   
                #[allow(unused_mut)]
  137    137   
                let mut builder = ::http::Response::builder();
  138         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         138  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  139    139   
                    builder,
  140    140   
                    ::http::header::CONTENT_TYPE,
  141    141   
                    "application/json",
  142    142   
                );
  143         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         143  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  144    144   
                    builder,
  145    145   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  146    146   
                    "InternalServerError",
  147    147   
                );
  148    148   
                let content_length = payload.len();
  149         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         149  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  150    150   
                    builder,
  151    151   
                    ::http::header::CONTENT_LENGTH,
  152    152   
                    content_length,
  153    153   
                );
  154    154   
                builder
  155    155   
                    .status(500)
  156         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         156  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  157    157   
            }
  158    158   
        }
  159    159   
    })
  160    160   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_pokemon_species_input.rs

@@ -1,1 +12,12 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn de_name(
    3      3   
    value: &str,
    4      4   
) -> std::result::Result<
    5      5   
    ::std::string::String,
    6         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           6  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      7   
> {
    8      8   
    let value = ::percent_encoding::percent_decode_str(value)
    9      9   
        .decode_utf8()?
   10     10   
        .into_owned();
   11     11   
    Ok(value)
   12     12   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_server_statistics.rs

@@ -1,1 +92,92 @@
    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_get_server_statistics_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GetServerStatisticsInput,
    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::get_server_statistics_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_get_server_statistics_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::GetServerStatisticsOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/json",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_get_server_statistics_output::ser_get_server_statistics_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          52  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_get_server_statistics_http_error(
   59     59   
    error: &crate::error::GetServerStatisticsError,
   60     60   
) -> std::result::Result<
   61         -
    ::aws_smithy_http_server::response::Response,
   62         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          61  +
    ::aws_smithy_legacy_http_server::response::Response,
          62  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::GetServerStatisticsError::InternalServerError(output) => {
   67     67   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   68     68   
                #[allow(unused_mut)]
   69     69   
                let mut builder = ::http::Response::builder();
   70         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          70  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   71     71   
                    builder,
   72     72   
                    ::http::header::CONTENT_TYPE,
   73     73   
                    "application/json",
   74     74   
                );
   75         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          75  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   76     76   
                    builder,
   77     77   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   78     78   
                    "InternalServerError",
   79     79   
                );
   80     80   
                let content_length = payload.len();
   81         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          81  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   82     82   
                    builder,
   83     83   
                    ::http::header::CONTENT_LENGTH,
   84     84   
                    content_length,
   85     85   
                );
   86     86   
                builder
   87     87   
                    .status(500)
   88         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          88  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   89     89   
            }
   90     90   
        }
   91     91   
    })
   92     92   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/service.rs

@@ -1,1 +1239,1260 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`PokemonService`].
    3      3   
///
    4      4   
/// Constructed via [`PokemonService::builder`].
    5      5   
pub struct PokemonServiceBuilder<Body, L, HttpPl, ModelPl> {
    6         -
    check_health: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7         -
    do_nothing: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8         -
    get_pokemon_species: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9         -
    get_server_statistics: Option<::aws_smithy_http_server::routing::Route<Body>>,
           6  +
    check_health: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
           7  +
    do_nothing: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
           8  +
    get_pokemon_species: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
           9  +
    get_server_statistics: Option<::aws_smithy_legacy_http_server::routing::Route<Body>>,
   10     10   
    layer: L,
   11     11   
    http_plugin: HttpPl,
   12     12   
    model_plugin: ModelPl,
   13     13   
}
   14     14   
   15     15   
impl<Body, L, HttpPl, ModelPl> PokemonServiceBuilder<Body, L, HttpPl, ModelPl> {
   16     16   
    /// Sets the [`CheckHealth`](crate::operation_shape::CheckHealth) operation.
   17     17   
    ///
   18         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   19         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          18  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          19  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   20     20   
    ///
   21     21   
    /// # Example
   22     22   
    ///
   23     23   
    /// ```no_run
   24     24   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
   25     25   
    ///
   26     26   
    /// use pokemon_service_server_sdk::{input, output, error};
   27     27   
    ///
   28     28   
    /// async fn handler(input: input::CheckHealthInput) -> Result<output::CheckHealthOutput, error::CheckHealthError> {
   29     29   
    ///     todo!()
   30     30   
    /// }
   31     31   
    ///
   32     32   
    /// let config = PokemonServiceConfig::builder().build();
   33     33   
    /// let app = PokemonService::builder(config)
   34     34   
    ///     .check_health(handler)
   35     35   
    ///     /* Set other handlers */
   36     36   
    ///     .build()
   37     37   
    ///     .unwrap();
   38         -
    /// # let app: PokemonService<::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;
          38  +
    /// # let app: PokemonService<::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;
   39     39   
    /// ```
   40     40   
    ///
   41     41   
                    pub fn check_health<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
   42     42   
                    where
   43         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::CheckHealth, HandlerExtractors>,
          43  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::CheckHealth, HandlerExtractors>,
   44     44   
   45         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
          45  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   46     46   
                            PokemonService<L>,
   47     47   
                            crate::operation_shape::CheckHealth,
   48         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::CheckHealth, HandlerType>
          48  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::CheckHealth, HandlerType>
   49     49   
                        >,
   50         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
          50  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
   51     51   
                            PokemonService<L>,
   52     52   
                            crate::operation_shape::CheckHealth,
   53     53   
                            ModelPl::Output
   54     54   
                        >,
   55         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
          55  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
   56     56   
                            PokemonService<L>,
   57     57   
                            crate::operation_shape::CheckHealth,
   58     58   
                            <
   59         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   60         -
                                as ::aws_smithy_http_server::plugin::Plugin<
          59  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
          60  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
   61     61   
                                    PokemonService<L>,
   62     62   
                                    crate::operation_shape::CheckHealth,
   63     63   
                                    ModelPl::Output
   64     64   
                                >
   65     65   
                            >::Output
   66     66   
                        >,
   67     67   
   68         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
          68  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   69     69   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
   70     70   
   71     71   
                    {
   72         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   73         -
        use ::aws_smithy_http_server::plugin::Plugin;
          72  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
          73  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
   74     74   
        let svc = crate::operation_shape::CheckHealth::from_handler(handler);
   75     75   
        let svc = self.model_plugin.apply(svc);
   76         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
          76  +
        let svc =
          77  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   77     78   
                .apply(svc);
   78     79   
        let svc = self.http_plugin.apply(svc);
   79     80   
        self.check_health_custom(svc)
   80     81   
    }
   81     82   
   82     83   
    /// Sets the [`CheckHealth`](crate::operation_shape::CheckHealth) operation.
   83     84   
    ///
   84         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
   85         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
          85  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
          86  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
   86     87   
    ///
   87     88   
    /// # Example
   88     89   
    ///
   89     90   
    /// ```no_run
   90     91   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
   91     92   
    ///
   92     93   
    /// use pokemon_service_server_sdk::{input, output, error};
   93     94   
    ///
   94     95   
    /// async fn handler(input: input::CheckHealthInput) -> Result<output::CheckHealthOutput, error::CheckHealthError> {
   95     96   
    ///     todo!()
   96     97   
    /// }
   97     98   
    ///
   98     99   
    /// let config = PokemonServiceConfig::builder().build();
   99    100   
    /// let svc = ::tower::util::service_fn(handler);
  100    101   
    /// let app = PokemonService::builder(config)
  101    102   
    ///     .check_health_service(svc)
  102    103   
    ///     /* Set other handlers */
  103    104   
    ///     .build()
  104    105   
    ///     .unwrap();
  105         -
    /// # let app: PokemonService<::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;
         106  +
    /// # let app: PokemonService<::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;
  106    107   
    /// ```
  107    108   
    ///
  108    109   
                    pub fn check_health_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  109    110   
                    where
  110         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::CheckHealth, ServiceExtractors>,
         111  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::CheckHealth, ServiceExtractors>,
  111    112   
  112         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         113  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  113    114   
                            PokemonService<L>,
  114    115   
                            crate::operation_shape::CheckHealth,
  115         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::CheckHealth, S>
         116  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::CheckHealth, S>
  116    117   
                        >,
  117         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         118  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  118    119   
                            PokemonService<L>,
  119    120   
                            crate::operation_shape::CheckHealth,
  120    121   
                            ModelPl::Output
  121    122   
                        >,
  122         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         123  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  123    124   
                            PokemonService<L>,
  124    125   
                            crate::operation_shape::CheckHealth,
  125    126   
                            <
  126         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  127         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         127  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         128  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  128    129   
                                    PokemonService<L>,
  129    130   
                                    crate::operation_shape::CheckHealth,
  130    131   
                                    ModelPl::Output
  131    132   
                                >
  132    133   
                            >::Output
  133    134   
                        >,
  134    135   
  135         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         136  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  136    137   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  137    138   
  138    139   
                    {
  139         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  140         -
        use ::aws_smithy_http_server::plugin::Plugin;
         140  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         141  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  141    142   
        let svc = crate::operation_shape::CheckHealth::from_service(service);
  142    143   
        let svc = self.model_plugin.apply(svc);
  143         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         144  +
        let svc =
         145  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  144    146   
                .apply(svc);
  145    147   
        let svc = self.http_plugin.apply(svc);
  146    148   
        self.check_health_custom(svc)
  147    149   
    }
  148    150   
  149    151   
    /// Sets the [`CheckHealth`](crate::operation_shape::CheckHealth) to a custom [`Service`](tower::Service).
  150    152   
    /// not constrained by the Smithy contract.
  151    153   
    fn check_health_custom<S>(mut self, svc: S) -> Self
  152    154   
    where
  153    155   
        S: ::tower::Service<
  154    156   
                ::http::Request<Body>,
  155         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         157  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  156    158   
                Error = ::std::convert::Infallible,
  157    159   
            > + Clone
  158    160   
            + Send
  159    161   
            + 'static,
  160    162   
        S::Future: Send + 'static,
  161    163   
    {
  162         -
        self.check_health = Some(::aws_smithy_http_server::routing::Route::new(svc));
         164  +
        self.check_health = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  163    165   
        self
  164    166   
    }
  165    167   
  166    168   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) operation.
  167    169   
    ///
  168         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  169         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         170  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         171  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  170    172   
    ///
  171    173   
    /// # Example
  172    174   
    ///
  173    175   
    /// ```no_run
  174    176   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  175    177   
    ///
  176    178   
    /// use pokemon_service_server_sdk::{input, output, error};
  177    179   
    ///
  178    180   
    /// async fn handler(input: input::DoNothingInput) -> Result<output::DoNothingOutput, error::DoNothingError> {
  179    181   
    ///     todo!()
  180    182   
    /// }
  181    183   
    ///
  182    184   
    /// let config = PokemonServiceConfig::builder().build();
  183    185   
    /// let app = PokemonService::builder(config)
  184    186   
    ///     .do_nothing(handler)
  185    187   
    ///     /* Set other handlers */
  186    188   
    ///     .build()
  187    189   
    ///     .unwrap();
  188         -
    /// # let app: PokemonService<::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;
         190  +
    /// # let app: PokemonService<::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;
  189    191   
    /// ```
  190    192   
    ///
  191    193   
                    pub fn do_nothing<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  192    194   
                    where
  193         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::DoNothing, HandlerExtractors>,
         195  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::DoNothing, HandlerExtractors>,
  194    196   
  195         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         197  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  196    198   
                            PokemonService<L>,
  197    199   
                            crate::operation_shape::DoNothing,
  198         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::DoNothing, HandlerType>
         200  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::DoNothing, HandlerType>
  199    201   
                        >,
  200         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         202  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  201    203   
                            PokemonService<L>,
  202    204   
                            crate::operation_shape::DoNothing,
  203    205   
                            ModelPl::Output
  204    206   
                        >,
  205         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         207  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  206    208   
                            PokemonService<L>,
  207    209   
                            crate::operation_shape::DoNothing,
  208    210   
                            <
  209         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  210         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         211  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         212  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  211    213   
                                    PokemonService<L>,
  212    214   
                                    crate::operation_shape::DoNothing,
  213    215   
                                    ModelPl::Output
  214    216   
                                >
  215    217   
                            >::Output
  216    218   
                        >,
  217    219   
  218         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         220  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  219    221   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  220    222   
  221    223   
                    {
  222         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  223         -
        use ::aws_smithy_http_server::plugin::Plugin;
         224  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         225  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  224    226   
        let svc = crate::operation_shape::DoNothing::from_handler(handler);
  225    227   
        let svc = self.model_plugin.apply(svc);
  226         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         228  +
        let svc =
         229  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  227    230   
                .apply(svc);
  228    231   
        let svc = self.http_plugin.apply(svc);
  229    232   
        self.do_nothing_custom(svc)
  230    233   
    }
  231    234   
  232    235   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) operation.
  233    236   
    ///
  234         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  235         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         237  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         238  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  236    239   
    ///
  237    240   
    /// # Example
  238    241   
    ///
  239    242   
    /// ```no_run
  240    243   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  241    244   
    ///
  242    245   
    /// use pokemon_service_server_sdk::{input, output, error};
  243    246   
    ///
  244    247   
    /// async fn handler(input: input::DoNothingInput) -> Result<output::DoNothingOutput, error::DoNothingError> {
  245    248   
    ///     todo!()
  246    249   
    /// }
  247    250   
    ///
  248    251   
    /// let config = PokemonServiceConfig::builder().build();
  249    252   
    /// let svc = ::tower::util::service_fn(handler);
  250    253   
    /// let app = PokemonService::builder(config)
  251    254   
    ///     .do_nothing_service(svc)
  252    255   
    ///     /* Set other handlers */
  253    256   
    ///     .build()
  254    257   
    ///     .unwrap();
  255         -
    /// # let app: PokemonService<::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;
         258  +
    /// # let app: PokemonService<::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;
  256    259   
    /// ```
  257    260   
    ///
  258    261   
                    pub fn do_nothing_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  259    262   
                    where
  260         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::DoNothing, ServiceExtractors>,
         263  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::DoNothing, ServiceExtractors>,
  261    264   
  262         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         265  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  263    266   
                            PokemonService<L>,
  264    267   
                            crate::operation_shape::DoNothing,
  265         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::DoNothing, S>
         268  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::DoNothing, S>
  266    269   
                        >,
  267         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         270  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  268    271   
                            PokemonService<L>,
  269    272   
                            crate::operation_shape::DoNothing,
  270    273   
                            ModelPl::Output
  271    274   
                        >,
  272         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         275  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  273    276   
                            PokemonService<L>,
  274    277   
                            crate::operation_shape::DoNothing,
  275    278   
                            <
  276         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  277         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         279  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         280  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  278    281   
                                    PokemonService<L>,
  279    282   
                                    crate::operation_shape::DoNothing,
  280    283   
                                    ModelPl::Output
  281    284   
                                >
  282    285   
                            >::Output
  283    286   
                        >,
  284    287   
  285         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         288  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  286    289   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  287    290   
  288    291   
                    {
  289         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  290         -
        use ::aws_smithy_http_server::plugin::Plugin;
         292  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         293  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  291    294   
        let svc = crate::operation_shape::DoNothing::from_service(service);
  292    295   
        let svc = self.model_plugin.apply(svc);
  293         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         296  +
        let svc =
         297  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  294    298   
                .apply(svc);
  295    299   
        let svc = self.http_plugin.apply(svc);
  296    300   
        self.do_nothing_custom(svc)
  297    301   
    }
  298    302   
  299    303   
    /// Sets the [`DoNothing`](crate::operation_shape::DoNothing) to a custom [`Service`](tower::Service).
  300    304   
    /// not constrained by the Smithy contract.
  301    305   
    fn do_nothing_custom<S>(mut self, svc: S) -> Self
  302    306   
    where
  303    307   
        S: ::tower::Service<
  304    308   
                ::http::Request<Body>,
  305         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         309  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  306    310   
                Error = ::std::convert::Infallible,
  307    311   
            > + Clone
  308    312   
            + Send
  309    313   
            + 'static,
  310    314   
        S::Future: Send + 'static,
  311    315   
    {
  312         -
        self.do_nothing = Some(::aws_smithy_http_server::routing::Route::new(svc));
         316  +
        self.do_nothing = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  313    317   
        self
  314    318   
    }
  315    319   
  316    320   
    /// Sets the [`GetPokemonSpecies`](crate::operation_shape::GetPokemonSpecies) operation.
  317    321   
    ///
  318         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  319         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         322  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         323  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  320    324   
    ///
  321    325   
    /// # Example
  322    326   
    ///
  323    327   
    /// ```no_run
  324    328   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  325    329   
    ///
  326    330   
    /// use pokemon_service_server_sdk::{input, output, error};
  327    331   
    ///
  328    332   
    /// async fn handler(input: input::GetPokemonSpeciesInput) -> Result<output::GetPokemonSpeciesOutput, error::GetPokemonSpeciesError> {
  329    333   
    ///     todo!()
  330    334   
    /// }
  331    335   
    ///
  332    336   
    /// let config = PokemonServiceConfig::builder().build();
  333    337   
    /// let app = PokemonService::builder(config)
  334    338   
    ///     .get_pokemon_species(handler)
  335    339   
    ///     /* Set other handlers */
  336    340   
    ///     .build()
  337    341   
    ///     .unwrap();
  338         -
    /// # let app: PokemonService<::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;
         342  +
    /// # let app: PokemonService<::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;
  339    343   
    /// ```
  340    344   
    ///
  341    345   
                    pub fn get_pokemon_species<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  342    346   
                    where
  343         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::GetPokemonSpecies, HandlerExtractors>,
         347  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::GetPokemonSpecies, HandlerExtractors>,
  344    348   
  345         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         349  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  346    350   
                            PokemonService<L>,
  347    351   
                            crate::operation_shape::GetPokemonSpecies,
  348         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::GetPokemonSpecies, HandlerType>
         352  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::GetPokemonSpecies, HandlerType>
  349    353   
                        >,
  350         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         354  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  351    355   
                            PokemonService<L>,
  352    356   
                            crate::operation_shape::GetPokemonSpecies,
  353    357   
                            ModelPl::Output
  354    358   
                        >,
  355         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         359  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  356    360   
                            PokemonService<L>,
  357    361   
                            crate::operation_shape::GetPokemonSpecies,
  358    362   
                            <
  359         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  360         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         363  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         364  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  361    365   
                                    PokemonService<L>,
  362    366   
                                    crate::operation_shape::GetPokemonSpecies,
  363    367   
                                    ModelPl::Output
  364    368   
                                >
  365    369   
                            >::Output
  366    370   
                        >,
  367    371   
  368         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         372  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  369    373   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  370    374   
  371    375   
                    {
  372         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  373         -
        use ::aws_smithy_http_server::plugin::Plugin;
         376  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         377  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  374    378   
        let svc = crate::operation_shape::GetPokemonSpecies::from_handler(handler);
  375    379   
        let svc = self.model_plugin.apply(svc);
  376         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         380  +
        let svc =
         381  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  377    382   
                .apply(svc);
  378    383   
        let svc = self.http_plugin.apply(svc);
  379    384   
        self.get_pokemon_species_custom(svc)
  380    385   
    }
  381    386   
  382    387   
    /// Sets the [`GetPokemonSpecies`](crate::operation_shape::GetPokemonSpecies) operation.
  383    388   
    ///
  384         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  385         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         389  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         390  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  386    391   
    ///
  387    392   
    /// # Example
  388    393   
    ///
  389    394   
    /// ```no_run
  390    395   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  391    396   
    ///
  392    397   
    /// use pokemon_service_server_sdk::{input, output, error};
  393    398   
    ///
  394    399   
    /// async fn handler(input: input::GetPokemonSpeciesInput) -> Result<output::GetPokemonSpeciesOutput, error::GetPokemonSpeciesError> {
  395    400   
    ///     todo!()
  396    401   
    /// }
  397    402   
    ///
  398    403   
    /// let config = PokemonServiceConfig::builder().build();
  399    404   
    /// let svc = ::tower::util::service_fn(handler);
  400    405   
    /// let app = PokemonService::builder(config)
  401    406   
    ///     .get_pokemon_species_service(svc)
  402    407   
    ///     /* Set other handlers */
  403    408   
    ///     .build()
  404    409   
    ///     .unwrap();
  405         -
    /// # let app: PokemonService<::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;
         410  +
    /// # let app: PokemonService<::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;
  406    411   
    /// ```
  407    412   
    ///
  408    413   
                    pub fn get_pokemon_species_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  409    414   
                    where
  410         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::GetPokemonSpecies, ServiceExtractors>,
         415  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::GetPokemonSpecies, ServiceExtractors>,
  411    416   
  412         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         417  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  413    418   
                            PokemonService<L>,
  414    419   
                            crate::operation_shape::GetPokemonSpecies,
  415         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::GetPokemonSpecies, S>
         420  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::GetPokemonSpecies, S>
  416    421   
                        >,
  417         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         422  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  418    423   
                            PokemonService<L>,
  419    424   
                            crate::operation_shape::GetPokemonSpecies,
  420    425   
                            ModelPl::Output
  421    426   
                        >,
  422         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         427  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  423    428   
                            PokemonService<L>,
  424    429   
                            crate::operation_shape::GetPokemonSpecies,
  425    430   
                            <
  426         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  427         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         431  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         432  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  428    433   
                                    PokemonService<L>,
  429    434   
                                    crate::operation_shape::GetPokemonSpecies,
  430    435   
                                    ModelPl::Output
  431    436   
                                >
  432    437   
                            >::Output
  433    438   
                        >,
  434    439   
  435         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         440  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  436    441   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  437    442   
  438    443   
                    {
  439         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  440         -
        use ::aws_smithy_http_server::plugin::Plugin;
         444  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         445  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  441    446   
        let svc = crate::operation_shape::GetPokemonSpecies::from_service(service);
  442    447   
        let svc = self.model_plugin.apply(svc);
  443         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         448  +
        let svc =
         449  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  444    450   
                .apply(svc);
  445    451   
        let svc = self.http_plugin.apply(svc);
  446    452   
        self.get_pokemon_species_custom(svc)
  447    453   
    }
  448    454   
  449    455   
    /// Sets the [`GetPokemonSpecies`](crate::operation_shape::GetPokemonSpecies) to a custom [`Service`](tower::Service).
  450    456   
    /// not constrained by the Smithy contract.
  451    457   
    fn get_pokemon_species_custom<S>(mut self, svc: S) -> Self
  452    458   
    where
  453    459   
        S: ::tower::Service<
  454    460   
                ::http::Request<Body>,
  455         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         461  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  456    462   
                Error = ::std::convert::Infallible,
  457    463   
            > + Clone
  458    464   
            + Send
  459    465   
            + 'static,
  460    466   
        S::Future: Send + 'static,
  461    467   
    {
  462         -
        self.get_pokemon_species = Some(::aws_smithy_http_server::routing::Route::new(svc));
         468  +
        self.get_pokemon_species = Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  463    469   
        self
  464    470   
    }
  465    471   
  466    472   
    /// Sets the [`GetServerStatistics`](crate::operation_shape::GetServerStatistics) operation.
  467    473   
    ///
  468         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  469         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         474  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         475  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  470    476   
    ///
  471    477   
    /// # Example
  472    478   
    ///
  473    479   
    /// ```no_run
  474    480   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  475    481   
    ///
  476    482   
    /// use pokemon_service_server_sdk::{input, output, error};
  477    483   
    ///
  478    484   
    /// async fn handler(input: input::GetServerStatisticsInput) -> Result<output::GetServerStatisticsOutput, error::GetServerStatisticsError> {
  479    485   
    ///     todo!()
  480    486   
    /// }
  481    487   
    ///
  482    488   
    /// let config = PokemonServiceConfig::builder().build();
  483    489   
    /// let app = PokemonService::builder(config)
  484    490   
    ///     .get_server_statistics(handler)
  485    491   
    ///     /* Set other handlers */
  486    492   
    ///     .build()
  487    493   
    ///     .unwrap();
  488         -
    /// # let app: PokemonService<::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;
         494  +
    /// # let app: PokemonService<::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;
  489    495   
    /// ```
  490    496   
    ///
  491    497   
                    pub fn get_server_statistics<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  492    498   
                    where
  493         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::GetServerStatistics, HandlerExtractors>,
         499  +
                        HandlerType: ::aws_smithy_legacy_http_server::operation::Handler<crate::operation_shape::GetServerStatistics, HandlerExtractors>,
  494    500   
  495         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         501  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  496    502   
                            PokemonService<L>,
  497    503   
                            crate::operation_shape::GetServerStatistics,
  498         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::GetServerStatistics, HandlerType>
         504  +
                            ::aws_smithy_legacy_http_server::operation::IntoService<crate::operation_shape::GetServerStatistics, HandlerType>
  499    505   
                        >,
  500         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         506  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  501    507   
                            PokemonService<L>,
  502    508   
                            crate::operation_shape::GetServerStatistics,
  503    509   
                            ModelPl::Output
  504    510   
                        >,
  505         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         511  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  506    512   
                            PokemonService<L>,
  507    513   
                            crate::operation_shape::GetServerStatistics,
  508    514   
                            <
  509         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  510         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         515  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         516  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  511    517   
                                    PokemonService<L>,
  512    518   
                                    crate::operation_shape::GetServerStatistics,
  513    519   
                                    ModelPl::Output
  514    520   
                                >
  515    521   
                            >::Output
  516    522   
                        >,
  517    523   
  518         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         524  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  519    525   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  520    526   
  521    527   
                    {
  522         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  523         -
        use ::aws_smithy_http_server::plugin::Plugin;
         528  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         529  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  524    530   
        let svc = crate::operation_shape::GetServerStatistics::from_handler(handler);
  525    531   
        let svc = self.model_plugin.apply(svc);
  526         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         532  +
        let svc =
         533  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  527    534   
                .apply(svc);
  528    535   
        let svc = self.http_plugin.apply(svc);
  529    536   
        self.get_server_statistics_custom(svc)
  530    537   
    }
  531    538   
  532    539   
    /// Sets the [`GetServerStatistics`](crate::operation_shape::GetServerStatistics) operation.
  533    540   
    ///
  534         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  535         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         541  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_legacy_http_server::operation::Handler) trait.
         542  +
    /// See the [operation module documentation](::aws_smithy_legacy_http_server::operation) for more information.
  536    543   
    ///
  537    544   
    /// # Example
  538    545   
    ///
  539    546   
    /// ```no_run
  540    547   
    /// use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
  541    548   
    ///
  542    549   
    /// use pokemon_service_server_sdk::{input, output, error};
  543    550   
    ///
  544    551   
    /// async fn handler(input: input::GetServerStatisticsInput) -> Result<output::GetServerStatisticsOutput, error::GetServerStatisticsError> {
  545    552   
    ///     todo!()
  546    553   
    /// }
  547    554   
    ///
  548    555   
    /// let config = PokemonServiceConfig::builder().build();
  549    556   
    /// let svc = ::tower::util::service_fn(handler);
  550    557   
    /// let app = PokemonService::builder(config)
  551    558   
    ///     .get_server_statistics_service(svc)
  552    559   
    ///     /* Set other handlers */
  553    560   
    ///     .build()
  554    561   
    ///     .unwrap();
  555         -
    /// # let app: PokemonService<::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;
         562  +
    /// # let app: PokemonService<::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;
  556    563   
    /// ```
  557    564   
    ///
  558    565   
                    pub fn get_server_statistics_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  559    566   
                    where
  560         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::GetServerStatistics, ServiceExtractors>,
         567  +
                        S: ::aws_smithy_legacy_http_server::operation::OperationService<crate::operation_shape::GetServerStatistics, ServiceExtractors>,
  561    568   
  562         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         569  +
                        ModelPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  563    570   
                            PokemonService<L>,
  564    571   
                            crate::operation_shape::GetServerStatistics,
  565         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::GetServerStatistics, S>
         572  +
                            ::aws_smithy_legacy_http_server::operation::Normalize<crate::operation_shape::GetServerStatistics, S>
  566    573   
                        >,
  567         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         574  +
                        ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_legacy_http_server::plugin::Plugin<
  568    575   
                            PokemonService<L>,
  569    576   
                            crate::operation_shape::GetServerStatistics,
  570    577   
                            ModelPl::Output
  571    578   
                        >,
  572         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         579  +
                        HttpPl: ::aws_smithy_legacy_http_server::plugin::Plugin<
  573    580   
                            PokemonService<L>,
  574    581   
                            crate::operation_shape::GetServerStatistics,
  575    582   
                            <
  576         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  577         -
                                as ::aws_smithy_http_server::plugin::Plugin<
         583  +
                                ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         584  +
                                as ::aws_smithy_legacy_http_server::plugin::Plugin<
  578    585   
                                    PokemonService<L>,
  579    586   
                                    crate::operation_shape::GetServerStatistics,
  580    587   
                                    ModelPl::Output
  581    588   
                                >
  582    589   
                            >::Output
  583    590   
                        >,
  584    591   
  585         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         592  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  586    593   
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
  587    594   
  588    595   
                    {
  589         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  590         -
        use ::aws_smithy_http_server::plugin::Plugin;
         596  +
        use ::aws_smithy_legacy_http_server::operation::OperationShapeExt;
         597  +
        use ::aws_smithy_legacy_http_server::plugin::Plugin;
  591    598   
        let svc = crate::operation_shape::GetServerStatistics::from_service(service);
  592    599   
        let svc = self.model_plugin.apply(svc);
  593         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         600  +
        let svc =
         601  +
            ::aws_smithy_legacy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  594    602   
                .apply(svc);
  595    603   
        let svc = self.http_plugin.apply(svc);
  596    604   
        self.get_server_statistics_custom(svc)
  597    605   
    }
  598    606   
  599    607   
    /// Sets the [`GetServerStatistics`](crate::operation_shape::GetServerStatistics) to a custom [`Service`](tower::Service).
  600    608   
    /// not constrained by the Smithy contract.
  601    609   
    fn get_server_statistics_custom<S>(mut self, svc: S) -> Self
  602    610   
    where
  603    611   
        S: ::tower::Service<
  604    612   
                ::http::Request<Body>,
  605         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         613  +
                Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  606    614   
                Error = ::std::convert::Infallible,
  607    615   
            > + Clone
  608    616   
            + Send
  609    617   
            + 'static,
  610    618   
        S::Future: Send + 'static,
  611    619   
    {
  612         -
        self.get_server_statistics = Some(::aws_smithy_http_server::routing::Route::new(svc));
         620  +
        self.get_server_statistics =
         621  +
            Some(::aws_smithy_legacy_http_server::routing::Route::new(svc));
  613    622   
        self
  614    623   
    }
  615    624   
}
  616    625   
  617    626   
impl<Body, L, HttpPl, ModelPl> PokemonServiceBuilder<Body, L, HttpPl, ModelPl> {
  618    627   
    /// Constructs a [`PokemonService`] from the arguments provided to the builder.
  619    628   
    ///
  620    629   
    /// Forgetting to register a handler for one or more operations will result in an error.
  621    630   
    ///
  622    631   
    /// Check out [`PokemonServiceBuilder::build_unchecked`] if you'd prefer the service to return status code 500 when an
  623    632   
    /// unspecified route is requested.
  624    633   
    pub fn build(
  625    634   
        self,
  626    635   
    ) -> ::std::result::Result<
  627    636   
        PokemonService<
  628         -
            ::aws_smithy_http_server::routing::RoutingService<
  629         -
                ::aws_smithy_http_server::protocol::rest::router::RestRouter<L::Service>,
  630         -
                ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         637  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
         638  +
                ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<L::Service>,
         639  +
                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  631    640   
            >,
  632    641   
        >,
  633    642   
        MissingOperationsError,
  634    643   
    >
  635    644   
    where
  636         -
        L: ::tower::Layer<::aws_smithy_http_server::routing::Route<Body>>,
         645  +
        L: ::tower::Layer<::aws_smithy_legacy_http_server::routing::Route<Body>>,
  637    646   
    {
  638    647   
        let router = {
  639         -
            use ::aws_smithy_http_server::operation::OperationShape;
         648  +
            use ::aws_smithy_legacy_http_server::operation::OperationShape;
  640    649   
            let mut missing_operation_names = std::collections::HashMap::new();
  641    650   
            if self.check_health.is_none() {
  642    651   
                missing_operation_names
  643    652   
                    .insert(crate::operation_shape::CheckHealth::ID, ".check_health()");
  644    653   
            }
  645    654   
            if self.do_nothing.is_none() {
  646    655   
                missing_operation_names
  647    656   
                    .insert(crate::operation_shape::DoNothing::ID, ".do_nothing()");
  648    657   
            }
  649    658   
            if self.get_pokemon_species.is_none() {
  650    659   
                missing_operation_names.insert(
  651    660   
                    crate::operation_shape::GetPokemonSpecies::ID,
  652    661   
                    ".get_pokemon_species()",
  653    662   
                );
  654    663   
            }
  655    664   
            if self.get_server_statistics.is_none() {
  656    665   
                missing_operation_names.insert(
  657    666   
                    crate::operation_shape::GetServerStatistics::ID,
  658    667   
                    ".get_server_statistics()",
  659    668   
                );
  660    669   
            }
  661    670   
            if !missing_operation_names.is_empty() {
  662    671   
                return Err(MissingOperationsError {
  663    672   
                    operation_names2setter_methods: missing_operation_names,
  664    673   
                });
  665    674   
            }
  666    675   
            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";
  667    676   
  668         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([
         677  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter::from_iter([
  669    678   
                (
  670    679   
                    request_specs::check_health(),
  671    680   
                    self.check_health.expect(unexpected_error_msg),
  672    681   
                ),
  673    682   
                (
  674    683   
                    request_specs::do_nothing(),
  675    684   
                    self.do_nothing.expect(unexpected_error_msg),
  676    685   
                ),
  677    686   
                (
  678    687   
                    request_specs::get_pokemon_species(),
  679    688   
                    self.get_pokemon_species.expect(unexpected_error_msg),
  680    689   
                ),
  681    690   
                (
  682    691   
                    request_specs::get_server_statistics(),
  683    692   
                    self.get_server_statistics.expect(unexpected_error_msg),
  684    693   
                ),
  685    694   
            ])
  686    695   
        };
  687         -
        let svc = ::aws_smithy_http_server::routing::RoutingService::new(router);
         696  +
        let svc = ::aws_smithy_legacy_http_server::routing::RoutingService::new(router);
  688    697   
        let svc = svc.map(|s| s.layer(self.layer));
  689    698   
        Ok(PokemonService { svc })
  690    699   
    }
  691    700   
  692    701   
    /// Constructs a [`PokemonService`] from the arguments provided to the builder.
  693    702   
    /// Operations without a handler default to returning 500 Internal Server Error to the caller.
  694    703   
    ///
  695    704   
    /// Check out [`PokemonServiceBuilder::build`] if you'd prefer the builder to fail if one or more operations do
  696    705   
    /// not have a registered handler.
  697    706   
    pub fn build_unchecked(self) -> PokemonService<L::Service>
  698    707   
    where
  699    708   
        Body: Send + 'static,
  700    709   
        L: ::tower::Layer<
  701         -
            ::aws_smithy_http_server::routing::RoutingService<
  702         -
                ::aws_smithy_http_server::protocol::rest::router::RestRouter<
  703         -
                    ::aws_smithy_http_server::routing::Route<Body>,
         710  +
            ::aws_smithy_legacy_http_server::routing::RoutingService<
         711  +
                ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
         712  +
                    ::aws_smithy_legacy_http_server::routing::Route<Body>,
  704    713   
                >,
  705         -
                ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         714  +
                ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  706    715   
            >,
  707    716   
        >,
  708    717   
    {
  709         -
        let router = ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([
         718  +
        let router =
         719  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter::from_iter([
  710    720   
                (
  711    721   
                    request_specs::check_health(),
  712    722   
                    self.check_health.unwrap_or_else(|| {
  713         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
  714         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         723  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
         724  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  715    725   
                        >::default();
  716         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
         726  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
  717    727   
                    }),
  718    728   
                ),
  719    729   
                (
  720    730   
                    request_specs::do_nothing(),
  721    731   
                    self.do_nothing.unwrap_or_else(|| {
  722         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
  723         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         732  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
         733  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  724    734   
                        >::default();
  725         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
         735  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
  726    736   
                    }),
  727    737   
                ),
  728    738   
                (
  729    739   
                    request_specs::get_pokemon_species(),
  730    740   
                    self.get_pokemon_species.unwrap_or_else(|| {
  731         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
  732         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         741  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
         742  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  733    743   
                        >::default();
  734         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
         744  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
  735    745   
                    }),
  736    746   
                ),
  737    747   
                (
  738    748   
                    request_specs::get_server_statistics(),
  739    749   
                    self.get_server_statistics.unwrap_or_else(|| {
  740         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
  741         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         750  +
                        let svc = ::aws_smithy_legacy_http_server::operation::MissingFailure::<
         751  +
                            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  742    752   
                        >::default();
  743         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
         753  +
                        ::aws_smithy_legacy_http_server::routing::Route::new(svc)
  744    754   
                    }),
  745    755   
                ),
  746    756   
            ]);
  747    757   
        let svc = self
  748    758   
            .layer
  749         -
            .layer(::aws_smithy_http_server::routing::RoutingService::new(
  750         -
                router,
  751         -
            ));
         759  +
            .layer(::aws_smithy_legacy_http_server::routing::RoutingService::new(router));
  752    760   
        PokemonService { svc }
  753    761   
    }
  754    762   
}
  755    763   
  756    764   
/// The error encountered when calling the [`PokemonServiceBuilder::build`] method if one or more operation handlers are not
  757    765   
/// specified.
  758    766   
#[derive(Debug)]
  759    767   
pub struct MissingOperationsError {
  760    768   
    operation_names2setter_methods:
  761         -
        std::collections::HashMap<::aws_smithy_http_server::shape_id::ShapeId, &'static str>,
         769  +
        std::collections::HashMap<::aws_smithy_legacy_http_server::shape_id::ShapeId, &'static str>,
  762    770   
}
  763    771   
  764    772   
impl std::fmt::Display for MissingOperationsError {
  765    773   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  766    774   
        write!(
  767    775   
            f,
  768    776   
            "You must specify a handler for all operations attached to `PokemonService`.\n\
  769    777   
                            We are missing handlers for the following operations:\n",
  770    778   
        )?;
  771    779   
        for operation_name in self.operation_names2setter_methods.keys() {
  772    780   
            writeln!(f, "- {}", operation_name.absolute())?;
  773    781   
        }
  774    782   
  775    783   
        writeln!(f, "\nUse the dedicated methods on `PokemonServiceBuilder` to register the missing handlers:")?;
  776    784   
        for setter_name in self.operation_names2setter_methods.values() {
  777    785   
            writeln!(f, "- {}", setter_name)?;
  778    786   
        }
  779    787   
        Ok(())
  780    788   
    }
  781    789   
}
  782    790   
  783    791   
impl std::error::Error for MissingOperationsError {}
  784    792   
  785    793   
mod request_specs {
  786         -
    pub(super) fn check_health() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
  787         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
         794  +
    pub(super) fn check_health(
         795  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
         796  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
  788    797   
                    ::http::Method::GET,
  789         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
  790         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
  791         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
  792         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("ping")),
         798  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
         799  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
         800  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
         801  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("ping")),
  793    802   
]),
  794         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
         803  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
  795    804   
])
  796    805   
                        )
  797    806   
                    ),
  798    807   
                )
  799    808   
    }
  800         -
    pub(super) fn do_nothing() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
  801         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
         809  +
    pub(super) fn do_nothing() -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec
         810  +
    {
         811  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
  802    812   
                    ::http::Method::GET,
  803         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
  804         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
  805         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
  806         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("do-nothing")),
         813  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
         814  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
         815  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
         816  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("do-nothing")),
  807    817   
]),
  808         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
         818  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
  809    819   
])
  810    820   
                        )
  811    821   
                    ),
  812    822   
                )
  813    823   
    }
  814    824   
    pub(super) fn get_pokemon_species(
  815         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
  816         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
         825  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
         826  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
  817    827   
                    ::http::Method::GET,
  818         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
  819         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
  820         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
  821         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("pokemon-species")),
  822         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Label,
         828  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
         829  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
         830  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
         831  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("pokemon-species")),
         832  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Label,
  823    833   
]),
  824         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
         834  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
  825    835   
])
  826    836   
                        )
  827    837   
                    ),
  828    838   
                )
  829    839   
    }
  830    840   
    pub(super) fn get_server_statistics(
  831         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
  832         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
         841  +
    ) -> ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec {
         842  +
        ::aws_smithy_legacy_http_server::routing::request_spec::RequestSpec::new(
  833    843   
                    ::http::Method::GET,
  834         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
  835         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
  836         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
  837         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("stats")),
         844  +
                    ::aws_smithy_legacy_http_server::routing::request_spec::UriSpec::new(
         845  +
                        ::aws_smithy_legacy_http_server::routing::request_spec::PathAndQuerySpec::new(
         846  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
         847  +
    ::aws_smithy_legacy_http_server::routing::request_spec::PathSegment::Literal(String::from("stats")),
  838    848   
]),
  839         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
         849  +
                            ::aws_smithy_legacy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
  840    850   
])
  841    851   
                        )
  842    852   
                    ),
  843    853   
                )
  844    854   
    }
  845    855   
}
  846    856   
  847    857   
/// The Pokémon Service allows you to retrieve information about Pokémon species.
  848    858   
///
  849    859   
/// See the [root](crate) documentation for more information.
  850    860   
#[derive(Clone)]
  851    861   
pub struct PokemonService<
  852         -
    S = ::aws_smithy_http_server::routing::RoutingService<
  853         -
        ::aws_smithy_http_server::protocol::rest::router::RestRouter<
  854         -
            ::aws_smithy_http_server::routing::Route<::aws_smithy_http_server::body::BoxBody>,
         862  +
    S = ::aws_smithy_legacy_http_server::routing::RoutingService<
         863  +
        ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
         864  +
            ::aws_smithy_legacy_http_server::routing::Route<
         865  +
                ::aws_smithy_legacy_http_server::body::BoxBody,
         866  +
            >,
  855    867   
        >,
  856         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         868  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  857    869   
    >,
  858    870   
> {
  859    871   
    // This is the router wrapped by layers.
  860    872   
    svc: S,
  861    873   
}
  862    874   
  863    875   
impl PokemonService<()> {
  864    876   
    /// Constructs a builder for [`PokemonService`].
  865    877   
    /// You must specify a configuration object holding any plugins and layers that should be applied
  866    878   
    /// to the operations in this service.
  867    879   
    pub fn builder<
  868    880   
        Body,
  869    881   
        L,
  870         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
  871         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
         882  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
         883  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
  872    884   
    >(
  873    885   
        config: PokemonServiceConfig<L, HttpPl, ModelPl>,
  874    886   
    ) -> PokemonServiceBuilder<Body, L, HttpPl, ModelPl> {
  875    887   
        PokemonServiceBuilder {
  876    888   
            check_health: None,
  877    889   
            do_nothing: None,
  878    890   
            get_pokemon_species: None,
  879    891   
            get_server_statistics: None,
  880    892   
            layer: config.layers,
  881    893   
            http_plugin: config.http_plugins,
  882    894   
            model_plugin: config.model_plugins,
  883    895   
        }
  884    896   
    }
  885    897   
  886    898   
    /// Constructs a builder for [`PokemonService`].
  887    899   
    /// You must specify what plugins should be applied to the operations in this service.
  888    900   
    ///
  889    901   
    /// Use [`PokemonService::builder_without_plugins`] if you don't need to apply plugins.
  890    902   
    ///
  891         -
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
  892         -
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
         903  +
    /// Check out [`HttpPlugins`](::aws_smithy_legacy_http_server::plugin::HttpPlugins) and
         904  +
    /// [`ModelPlugins`](::aws_smithy_legacy_http_server::plugin::ModelPlugins) if you need to apply
  893    905   
    /// multiple plugins.
  894    906   
    #[deprecated(
  895    907   
        since = "0.57.0",
  896    908   
        note = "please use the `builder` constructor and register plugins on the `PokemonServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  897    909   
    )]
  898    910   
    pub fn builder_with_plugins<
  899    911   
        Body,
  900         -
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
  901         -
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
         912  +
        HttpPl: ::aws_smithy_legacy_http_server::plugin::HttpMarker,
         913  +
        ModelPl: ::aws_smithy_legacy_http_server::plugin::ModelMarker,
  902    914   
    >(
  903    915   
        http_plugin: HttpPl,
  904    916   
        model_plugin: ModelPl,
  905    917   
    ) -> PokemonServiceBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
  906    918   
        PokemonServiceBuilder {
  907    919   
            check_health: None,
  908    920   
            do_nothing: None,
  909    921   
            get_pokemon_species: None,
  910    922   
            get_server_statistics: None,
  911    923   
            layer: ::tower::layer::util::Identity::new(),
  912    924   
            http_plugin,
  913    925   
            model_plugin,
  914    926   
        }
  915    927   
    }
  916    928   
  917    929   
    /// Constructs a builder for [`PokemonService`].
  918    930   
    ///
  919    931   
    /// Use [`PokemonService::builder_with_plugins`] if you need to specify plugins.
  920    932   
    #[deprecated(
  921    933   
        since = "0.57.0",
  922    934   
        note = "please use the `builder` constructor instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  923    935   
    )]
  924    936   
    pub fn builder_without_plugins<Body>() -> PokemonServiceBuilder<
  925    937   
        Body,
  926    938   
        ::tower::layer::util::Identity,
  927         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
  928         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
         939  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         940  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  929    941   
    > {
  930    942   
        Self::builder_with_plugins(
  931         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
  932         -
            ::aws_smithy_http_server::plugin::IdentityPlugin,
         943  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
         944  +
            ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
  933    945   
        )
  934    946   
    }
  935    947   
}
  936    948   
  937    949   
impl<S> PokemonService<S> {
  938    950   
    /// Converts [`PokemonService`] into a [`MakeService`](tower::make::MakeService).
  939         -
    pub fn into_make_service(self) -> ::aws_smithy_http_server::routing::IntoMakeService<Self> {
  940         -
        ::aws_smithy_http_server::routing::IntoMakeService::new(self)
         951  +
    pub fn into_make_service(
         952  +
        self,
         953  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeService<Self> {
         954  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeService::new(self)
  941    955   
    }
  942    956   
  943         -
    /// Converts [`PokemonService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_http_server::request::connect_info::ConnectInfo).
         957  +
    /// Converts [`PokemonService`] into a [`MakeService`](tower::make::MakeService) with [`ConnectInfo`](::aws_smithy_legacy_http_server::request::connect_info::ConnectInfo).
  944    958   
    pub fn into_make_service_with_connect_info<C>(
  945    959   
        self,
  946         -
    ) -> ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
  947         -
        ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
         960  +
    ) -> ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo<Self, C> {
         961  +
        ::aws_smithy_legacy_http_server::routing::IntoMakeServiceWithConnectInfo::new(self)
  948    962   
    }
  949    963   
}
  950    964   
  951    965   
impl<S>
  952    966   
    PokemonService<
  953         -
        ::aws_smithy_http_server::routing::RoutingService<
  954         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<S>,
  955         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         967  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
         968  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<S>,
         969  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  956    970   
        >,
  957    971   
    >
  958    972   
{
  959    973   
    /// Applies a [`Layer`](::tower::Layer) uniformly to all routes.
  960    974   
    #[deprecated(
  961    975   
        since = "0.57.0",
  962    976   
        note = "please add layers to the `PokemonServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
  963    977   
    )]
  964    978   
    pub fn layer<L>(
  965    979   
        self,
  966    980   
        layer: &L,
  967    981   
    ) -> PokemonService<
  968         -
        ::aws_smithy_http_server::routing::RoutingService<
  969         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<L::Service>,
  970         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         982  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
         983  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<L::Service>,
         984  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  971    985   
        >,
  972    986   
    >
  973    987   
    where
  974    988   
        L: ::tower::Layer<S>,
  975    989   
    {
  976    990   
        PokemonService {
  977    991   
            svc: self.svc.map(|s| s.layer(layer)),
  978    992   
        }
  979    993   
    }
  980    994   
  981         -
    /// Applies [`Route::new`](::aws_smithy_http_server::routing::Route::new) to all routes.
         995  +
    /// Applies [`Route::new`](::aws_smithy_legacy_http_server::routing::Route::new) to all routes.
  982    996   
    ///
  983    997   
    /// This has the effect of erasing all types accumulated via layers.
  984    998   
    pub fn boxed<B>(
  985    999   
        self,
  986   1000   
    ) -> PokemonService<
  987         -
        ::aws_smithy_http_server::routing::RoutingService<
  988         -
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<
  989         -
                ::aws_smithy_http_server::routing::Route<B>,
        1001  +
        ::aws_smithy_legacy_http_server::routing::RoutingService<
        1002  +
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter<
        1003  +
                ::aws_smithy_legacy_http_server::routing::Route<B>,
  990   1004   
            >,
  991         -
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1005  +
            ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  992   1006   
        >,
  993   1007   
    >
  994   1008   
    where
  995   1009   
        S: ::tower::Service<
  996   1010   
            ::http::Request<B>,
  997         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1011  +
            Response = ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  998   1012   
            Error = std::convert::Infallible,
  999   1013   
        >,
 1000   1014   
        S: Clone + Send + 'static,
 1001   1015   
        S::Future: Send + 'static,
 1002   1016   
    {
 1003   1017   
        self.layer(&::tower::layer::layer_fn(
 1004         -
            ::aws_smithy_http_server::routing::Route::new,
        1018  +
            ::aws_smithy_legacy_http_server::routing::Route::new,
 1005   1019   
        ))
 1006   1020   
    }
 1007   1021   
}
 1008   1022   
 1009   1023   
impl<S, R> ::tower::Service<R> for PokemonService<S>
 1010   1024   
where
 1011   1025   
    S: ::tower::Service<R>,
 1012   1026   
{
 1013   1027   
    type Response = S::Response;
 1014   1028   
    type Error = S::Error;
 1015   1029   
    type Future = S::Future;
 1016   1030   
 1017   1031   
    fn poll_ready(
 1018   1032   
        &mut self,
 1019   1033   
        cx: &mut std::task::Context,
 1020   1034   
    ) -> std::task::Poll<::std::result::Result<(), Self::Error>> {
 1021   1035   
        self.svc.poll_ready(cx)
 1022   1036   
    }
 1023   1037   
 1024   1038   
    fn call(&mut self, request: R) -> Self::Future {
 1025   1039   
        self.svc.call(request)
 1026   1040   
    }
 1027   1041   
}
 1028   1042   
 1029   1043   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in PokemonService.
 1030   1044   
#[allow(clippy::enum_variant_names)]
 1031   1045   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
 1032   1046   
pub enum Operation {
 1033   1047   
    CheckHealth,
 1034   1048   
    DoNothing,
 1035   1049   
    GetPokemonSpecies,
 1036   1050   
    GetServerStatistics,
 1037   1051   
}
 1038   1052   
 1039   1053   
impl Operation {
 1040         -
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
 1041         -
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
        1054  +
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_legacy_http_server::shape_id::ShapeId).
        1055  +
    pub fn shape_id(&self) -> ::aws_smithy_legacy_http_server::shape_id::ShapeId {
 1042   1056   
        match self {
 1043         -
            Operation::CheckHealth => ::aws_smithy_http_server::shape_id::ShapeId::new(
        1057  +
            Operation::CheckHealth => ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1044   1058   
                "com.aws.example#CheckHealth",
 1045   1059   
                "com.aws.example",
 1046   1060   
                "CheckHealth",
 1047   1061   
            ),
 1048         -
            Operation::DoNothing => ::aws_smithy_http_server::shape_id::ShapeId::new(
        1062  +
            Operation::DoNothing => ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1049   1063   
                "com.aws.example#DoNothing",
 1050   1064   
                "com.aws.example",
 1051   1065   
                "DoNothing",
 1052   1066   
            ),
 1053         -
            Operation::GetPokemonSpecies => ::aws_smithy_http_server::shape_id::ShapeId::new(
        1067  +
            Operation::GetPokemonSpecies => {
        1068  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1054   1069   
                    "com.aws.example#GetPokemonSpecies",
 1055   1070   
                    "com.aws.example",
 1056   1071   
                    "GetPokemonSpecies",
 1057         -
            ),
 1058         -
            Operation::GetServerStatistics => ::aws_smithy_http_server::shape_id::ShapeId::new(
        1072  +
                )
        1073  +
            }
        1074  +
            Operation::GetServerStatistics => {
        1075  +
                ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1059   1076   
                    "com.aws.example#GetServerStatistics",
 1060   1077   
                    "com.aws.example",
 1061   1078   
                    "GetServerStatistics",
 1062         -
            ),
        1079  +
                )
        1080  +
            }
 1063   1081   
        }
 1064   1082   
    }
 1065   1083   
}
 1066         -
impl<L> ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::CheckHealth>
        1084  +
impl<L>
        1085  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<crate::operation_shape::CheckHealth>
 1067   1086   
    for PokemonService<L>
 1068   1087   
{
 1069   1088   
    const VALUE: Operation = Operation::CheckHealth;
 1070   1089   
}
 1071         -
impl<L> ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::DoNothing>
        1090  +
impl<L>
        1091  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<crate::operation_shape::DoNothing>
 1072   1092   
    for PokemonService<L>
 1073   1093   
{
 1074   1094   
    const VALUE: Operation = Operation::DoNothing;
 1075   1095   
}
 1076   1096   
impl<L>
 1077         -
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::GetPokemonSpecies>
 1078         -
    for PokemonService<L>
        1097  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
        1098  +
        crate::operation_shape::GetPokemonSpecies,
        1099  +
    > for PokemonService<L>
 1079   1100   
{
 1080   1101   
    const VALUE: Operation = Operation::GetPokemonSpecies;
 1081   1102   
}
 1082   1103   
impl<L>
 1083         -
    ::aws_smithy_http_server::service::ContainsOperation<
        1104  +
    ::aws_smithy_legacy_http_server::service::ContainsOperation<
 1084   1105   
        crate::operation_shape::GetServerStatistics,
 1085   1106   
    > for PokemonService<L>
 1086   1107   
{
 1087   1108   
    const VALUE: Operation = Operation::GetServerStatistics;
 1088   1109   
}
 1089   1110   
 1090         -
impl<S> ::aws_smithy_http_server::service::ServiceShape for PokemonService<S> {
 1091         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
 1092         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
        1111  +
impl<S> ::aws_smithy_legacy_http_server::service::ServiceShape for PokemonService<S> {
        1112  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
        1113  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
 1093   1114   
            "com.aws.example.ts#PokemonService",
 1094   1115   
            "com.aws.example.ts",
 1095   1116   
            "PokemonService",
 1096   1117   
        );
 1097   1118   
 1098   1119   
    const VERSION: Option<&'static str> = Some("2021-12-01");
 1099   1120   
 1100         -
    type Protocol = ::aws_smithy_http_server::protocol::rest_json_1::RestJson1;
        1121  +
    type Protocol = ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1;
 1101   1122   
 1102   1123   
    type Operations = Operation;
 1103   1124   
}
 1104   1125   
/// Configuration for the [`PokemonService`]. This is the central place where to register and
 1105   1126   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
 1106   1127   
///
 1107   1128   
/// ```rust,no_run
 1108   1129   
/// # use pokemon_service_server_sdk::PokemonServiceConfig;
 1109         -
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
        1130  +
/// # use ::aws_smithy_legacy_http_server::plugin::IdentityPlugin;
 1110   1131   
/// # use ::tower::layer::util::Identity;
 1111   1132   
/// # let authentication_plugin = IdentityPlugin;
 1112   1133   
/// # let authorization_plugin = IdentityPlugin;
 1113   1134   
/// # let server_request_id_provider_layer = Identity::new();
 1114   1135   
/// let config = PokemonServiceConfig::builder()
 1115   1136   
///     // Layers get executed first...
 1116   1137   
///     .layer(server_request_id_provider_layer)
 1117   1138   
///     // ...then HTTP plugins...
 1118   1139   
///     .http_plugin(authentication_plugin)
 1119   1140   
///     // ...and right after deserialization, model plugins.
 1120   1141   
///     .model_plugin(authorization_plugin)
 1121   1142   
///     .build();
 1122   1143   
/// ```
 1123   1144   
///
 1124   1145   
/// See the [`plugin`] system for details.
 1125   1146   
///
 1126         -
/// [`plugin`]: ::aws_smithy_http_server::plugin
        1147  +
/// [`plugin`]: ::aws_smithy_legacy_http_server::plugin
 1127   1148   
#[derive(::std::fmt::Debug)]
 1128   1149   
pub struct PokemonServiceConfig<L, H, M> {
 1129   1150   
    layers: L,
 1130   1151   
    http_plugins: H,
 1131   1152   
    model_plugins: M,
 1132   1153   
}
 1133   1154   
 1134   1155   
impl PokemonServiceConfig<(), (), ()> {
 1135   1156   
    /// Returns a builder to construct the configuration.
 1136   1157   
    pub fn builder() -> PokemonServiceConfigBuilder<
 1137   1158   
        ::tower::layer::util::Identity,
 1138         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
 1139         -
        ::aws_smithy_http_server::plugin::IdentityPlugin,
        1159  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1160  +
        ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1140   1161   
    > {
 1141   1162   
        PokemonServiceConfigBuilder {
 1142   1163   
            layers: ::tower::layer::util::Identity::new(),
 1143         -
            http_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
 1144         -
            model_plugins: ::aws_smithy_http_server::plugin::IdentityPlugin,
        1164  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
        1165  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::IdentityPlugin,
 1145   1166   
        }
 1146   1167   
    }
 1147   1168   
}
 1148   1169   
 1149   1170   
/// Builder returned by [`PokemonServiceConfig::builder()`].
 1150   1171   
#[derive(::std::fmt::Debug)]
 1151   1172   
pub struct PokemonServiceConfigBuilder<L, H, M> {
 1152   1173   
    pub(crate) layers: L,
 1153   1174   
    pub(crate) http_plugins: H,
 1154   1175   
    pub(crate) model_plugins: M,
 1155   1176   
}
 1156   1177   
 1157   1178   
impl<L, H, M> PokemonServiceConfigBuilder<L, H, M> {
 1158   1179   
    /// Add a [`::tower::Layer`] to the service.
 1159   1180   
    pub fn layer<NewLayer>(
 1160   1181   
        self,
 1161   1182   
        layer: NewLayer,
 1162   1183   
    ) -> PokemonServiceConfigBuilder<::tower::layer::util::Stack<NewLayer, L>, H, M> {
 1163   1184   
        PokemonServiceConfigBuilder {
 1164   1185   
            layers: ::tower::layer::util::Stack::new(layer, self.layers),
 1165   1186   
            http_plugins: self.http_plugins,
 1166   1187   
            model_plugins: self.model_plugins,
 1167   1188   
        }
 1168   1189   
    }
 1169   1190   
 1170   1191   
    /// Add a HTTP [plugin] to the service.
 1171   1192   
    ///
 1172         -
    /// [plugin]: ::aws_smithy_http_server::plugin
        1193  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
 1173   1194   
    // We eagerly require `NewPlugin: HttpMarker`, despite not really needing it, because compiler
 1174   1195   
    // errors get _substantially_ better if the user makes a mistake.
 1175         -
    pub fn http_plugin<NewPlugin: ::aws_smithy_http_server::plugin::HttpMarker>(
        1196  +
    pub fn http_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::HttpMarker>(
 1176   1197   
        self,
 1177   1198   
        http_plugin: NewPlugin,
 1178   1199   
    ) -> PokemonServiceConfigBuilder<
 1179   1200   
        L,
 1180         -
        ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, H>,
        1201  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, H>,
 1181   1202   
        M,
 1182   1203   
    > {
 1183   1204   
        PokemonServiceConfigBuilder {
 1184   1205   
            layers: self.layers,
 1185         -
            http_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
        1206  +
            http_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
 1186   1207   
                http_plugin,
 1187   1208   
                self.http_plugins,
 1188   1209   
            ),
 1189   1210   
            model_plugins: self.model_plugins,
 1190   1211   
        }
 1191   1212   
    }
 1192   1213   
 1193   1214   
    /// Add a model [plugin] to the service.
 1194   1215   
    ///
 1195         -
    /// [plugin]: ::aws_smithy_http_server::plugin
        1216  +
    /// [plugin]: ::aws_smithy_legacy_http_server::plugin
 1196   1217   
    // We eagerly require `NewPlugin: ModelMarker`, despite not really needing it, because compiler
 1197   1218   
    // errors get _substantially_ better if the user makes a mistake.
 1198         -
    pub fn model_plugin<NewPlugin: ::aws_smithy_http_server::plugin::ModelMarker>(
        1219  +
    pub fn model_plugin<NewPlugin: ::aws_smithy_legacy_http_server::plugin::ModelMarker>(
 1199   1220   
        self,
 1200   1221   
        model_plugin: NewPlugin,
 1201   1222   
    ) -> PokemonServiceConfigBuilder<
 1202   1223   
        L,
 1203   1224   
        H,
 1204         -
        ::aws_smithy_http_server::plugin::PluginStack<NewPlugin, M>,
        1225  +
        ::aws_smithy_legacy_http_server::plugin::PluginStack<NewPlugin, M>,
 1205   1226   
    > {
 1206   1227   
        PokemonServiceConfigBuilder {
 1207   1228   
            layers: self.layers,
 1208   1229   
            http_plugins: self.http_plugins,
 1209         -
            model_plugins: ::aws_smithy_http_server::plugin::PluginStack::new(
        1230  +
            model_plugins: ::aws_smithy_legacy_http_server::plugin::PluginStack::new(
 1210   1231   
                model_plugin,
 1211   1232   
                self.model_plugins,
 1212   1233   
            ),
 1213   1234   
        }
 1214   1235   
    }
 1215   1236   
 1216   1237   
    /// Build the configuration.
 1217   1238   
    pub fn build(self) -> super::PokemonServiceConfig<L, H, M> {
 1218   1239   
        super::PokemonServiceConfig {
 1219   1240   
            layers: self.layers,

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/ts_server_application.rs

@@ -45,45 +115,115 @@
   65     65   
        let handlers = Handlers {
   66     66   
            check_health: check_health.clone(),
   67     67   
            do_nothing: do_nothing.clone(),
   68     68   
            get_pokemon_species: get_pokemon_species.clone(),
   69     69   
            get_server_statistics: get_server_statistics.clone(),
   70     70   
        };
   71     71   
        Ok(Self { handlers })
   72     72   
    }
   73     73   
    #[napi]
   74     74   
    pub fn start(&self, socket: &TsSocket) -> ::napi::Result<()> {
   75         -
        let plugins = ::aws_smithy_http_server::plugin::PluginPipeline::new();
          75  +
        let plugins = ::aws_smithy_legacy_http_server::plugin::PluginPipeline::new();
   76     76   
        let builder = crate::service::PokemonService::builder_with_plugins(plugins);
   77     77   
        let builder = builder.check_health(crate::ts_operation_adaptor::check_health);
   78     78   
        let builder = builder.do_nothing(crate::ts_operation_adaptor::do_nothing);
   79     79   
        let builder = builder.get_pokemon_species(crate::ts_operation_adaptor::get_pokemon_species);
   80     80   
        let builder =
   81     81   
            builder.get_server_statistics(crate::ts_operation_adaptor::get_server_statistics);
   82     82   
        let app = builder
   83     83   
            .build()
   84     84   
            .expect("failed to build instance of PokemonService")
   85         -
            .layer(&::aws_smithy_http_server::AddExtensionLayer::new(
          85  +
            .layer(&::aws_smithy_legacy_http_server::AddExtensionLayer::new(
   86     86   
                self.handlers.clone(),
   87     87   
            ));
   88     88   
        let service = ::tower::util::BoxCloneService::new(app);
   89     89   
        start_hyper_worker(socket, service).expect("failed to start the hyper server");
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
#[napi]
   94     94   
#[derive(::std::fmt::Debug)]
   95     95   
pub struct TsSocket(::socket2::Socket);
@@ -123,123 +174,174 @@
  143    143   
impl TsSocket {
  144    144   
    pub fn to_raw_socket(&self) -> ::napi::Result<::socket2::Socket> {
  145    145   
        self.0
  146    146   
            .try_clone()
  147    147   
            .map_err(|e| ::napi::Error::from_reason(e.to_string()))
  148    148   
    }
  149    149   
}
  150    150   
pub fn start_hyper_worker(
  151    151   
    socket: &TsSocket,
  152    152   
    app: ::tower::util::BoxCloneService<
  153         -
        ::http::Request<::aws_smithy_http_server::body::Body>,
  154         -
        ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         153  +
        ::http::Request<::aws_smithy_legacy_http_server::body::Body>,
         154  +
        ::http::Response<::aws_smithy_legacy_http_server::body::BoxBody>,
  155    155   
        std::convert::Infallible,
  156    156   
    >,
  157    157   
) -> ::napi::Result<()> {
  158    158   
    let server = ::hyper::Server::from_tcp(
  159    159   
        socket
  160    160   
            .to_raw_socket()?
  161    161   
            .try_into()
  162    162   
            .expect("Unable to convert socket2::Socket into std::net::TcpListener"),
  163    163   
    )
  164    164   
    .expect("Unable to create hyper server from shared socket")
  165         -
    .serve(::aws_smithy_http_server::routing::IntoMakeService::new(app));
         165  +
    .serve(::aws_smithy_legacy_http_server::routing::IntoMakeService::new(app));
  166    166   
  167    167   
    let handle = ::tokio::runtime::Handle::current();
  168    168   
    handle.spawn(async move {
  169    169   
        // Process each socket concurrently.
  170    170   
        server.await
  171    171   
    });
  172    172   
  173    173   
    Ok(())
  174    174   
}