Server Test Python

Server Test Python

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/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-python/pokemon-service-server-sdk/rust-server-codegen-python/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-python/pokemon-service-server-sdk/rust-server-codegen-python/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-python/pokemon-service-server-sdk/rust-server-codegen-python/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-python/pokemon-service-server-sdk/rust-server-codegen-python/src/protocol_serde/shape_get_storage.rs

@@ -1,1 +187,187 @@
    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_storage_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GetStorageInput,
    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_storage_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   
        if let Some(value) =
   23     23   
            crate::protocol_serde::shape_get_storage_input::de_passcode_header(&headers)?
   24     24   
        {
   25     25   
            input = input.set_passcode(value)
   26     26   
        }
   27     27   
        let input_string = uri.path();
   28     28   
        let (input_string, (_, m1)) =
   29     29   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   30     30   
                ::nom::sequence::preceded(
   31     31   
                    ::nom::bytes::complete::tag("/"),
   32     32   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("pokedex"),
   33     33   
                ),
   34     34   
                ::nom::sequence::preceded(
   35     35   
                    ::nom::bytes::complete::tag("/"),
   36     36   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   37     37   
                        ::nom::bytes::complete::take_until("/"),
   38     38   
                        ::nom::combinator::rest,
   39     39   
                    )),
   40     40   
                ),
   41     41   
            ))(input_string)?;
   42     42   
        debug_assert_eq!("", input_string);
   43     43   
        input = input.set_user(crate::protocol_serde::shape_get_storage_input::de_user(m1)?);
   44     44   
        input.build()?
   45     45   
    })
   46     46   
}
   47     47   
   48     48   
#[allow(clippy::unnecessary_wraps)]
   49     49   
pub fn ser_get_storage_http_response(
   50     50   
    #[allow(unused_variables)] output: crate::output::GetStorageOutput,
   51     51   
) -> std::result::Result<
   52         -
    ::aws_smithy_http_server::response::Response,
   53         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          52  +
    ::aws_smithy_legacy_http_server::response::Response,
          53  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   54     54   
> {
   55     55   
    Ok({
   56     56   
        #[allow(unused_mut)]
   57     57   
        let mut builder = ::http::Response::builder();
   58         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          58  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_TYPE,
   61     61   
            "application/json",
   62     62   
        );
   63     63   
        let http_status: u16 = 200;
   64     64   
        builder = builder.status(http_status);
   65     65   
        let payload =
   66     66   
            crate::protocol_serde::shape_get_storage_output::ser_get_storage_output_output_output(
   67     67   
                &output,
   68     68   
            )?;
   69     69   
        let content_length = payload.len();
   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_LENGTH,
   73     73   
            content_length,
   74     74   
        );
   75         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          75  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   76     76   
        builder.body(body)?
   77     77   
    })
   78     78   
}
   79     79   
   80     80   
#[allow(clippy::unnecessary_wraps)]
   81     81   
pub fn ser_get_storage_http_error(
   82     82   
    error: &crate::error::GetStorageError,
   83     83   
) -> std::result::Result<
   84         -
    ::aws_smithy_http_server::response::Response,
   85         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          84  +
    ::aws_smithy_legacy_http_server::response::Response,
          85  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   86     86   
> {
   87     87   
    Ok({
   88     88   
        match error {
   89     89   
            crate::error::GetStorageError::ResourceNotFoundException(output) => {
   90     90   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
   91     91   
                #[allow(unused_mut)]
   92     92   
                let mut builder = ::http::Response::builder();
   93         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          93  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   94     94   
                    builder,
   95     95   
                    ::http::header::CONTENT_TYPE,
   96     96   
                    "application/json",
   97     97   
                );
   98         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          98  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   99     99   
                    builder,
  100    100   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  101    101   
                    "ResourceNotFoundException",
  102    102   
                );
  103    103   
                let content_length = payload.len();
  104         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         104  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  105    105   
                    builder,
  106    106   
                    ::http::header::CONTENT_LENGTH,
  107    107   
                    content_length,
  108    108   
                );
  109    109   
                builder
  110    110   
                    .status(404)
  111         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         111  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  112    112   
            }
  113    113   
            crate::error::GetStorageError::StorageAccessNotAuthorized(output) => {
  114    114   
                let payload = crate::protocol_serde::shape_storage_access_not_authorized::ser_storage_access_not_authorized_error(output)?;
  115    115   
                #[allow(unused_mut)]
  116    116   
                let mut builder = ::http::Response::builder();
  117         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         117  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  118    118   
                    builder,
  119    119   
                    ::http::header::CONTENT_TYPE,
  120    120   
                    "application/json",
  121    121   
                );
  122         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         122  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  123    123   
                    builder,
  124    124   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  125    125   
                    "StorageAccessNotAuthorized",
  126    126   
                );
  127    127   
                let content_length = payload.len();
  128         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         128  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  129    129   
                    builder,
  130    130   
                    ::http::header::CONTENT_LENGTH,
  131    131   
                    content_length,
  132    132   
                );
  133    133   
                builder
  134    134   
                    .status(401)
  135         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         135  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  136    136   
            }
  137    137   
            crate::error::GetStorageError::ValidationException(output) => {
  138    138   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  139    139   
                #[allow(unused_mut)]
  140    140   
                let mut builder = ::http::Response::builder();
  141         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         141  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  142    142   
                    builder,
  143    143   
                    ::http::header::CONTENT_TYPE,
  144    144   
                    "application/json",
  145    145   
                );
  146         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         146  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  147    147   
                    builder,
  148    148   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  149    149   
                    "ValidationException",
  150    150   
                );
  151    151   
                let content_length = payload.len();
  152         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         152  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  153    153   
                    builder,
  154    154   
                    ::http::header::CONTENT_LENGTH,
  155    155   
                    content_length,
  156    156   
                );
  157    157   
                builder
  158    158   
                    .status(400)
  159         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         159  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  160    160   
            }
  161    161   
            crate::error::GetStorageError::InternalServerError(output) => {
  162    162   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  163    163   
                #[allow(unused_mut)]
  164    164   
                let mut builder = ::http::Response::builder();
  165         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         165  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  166    166   
                    builder,
  167    167   
                    ::http::header::CONTENT_TYPE,
  168    168   
                    "application/json",
  169    169   
                );
  170         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         170  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  171    171   
                    builder,
  172    172   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  173    173   
                    "InternalServerError",
  174    174   
                );
  175    175   
                let content_length = payload.len();
  176         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         176  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  177    177   
                    builder,
  178    178   
                    ::http::header::CONTENT_LENGTH,
  179    179   
                    content_length,
  180    180   
                );
  181    181   
                builder
  182    182   
                    .status(500)
  183         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         183  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  184    184   
            }
  185    185   
        }
  186    186   
    })
  187    187   
}

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/src/protocol_serde/shape_get_storage_input.rs

@@ -1,1 +22,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_passcode_header(
    3      3   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4      4   
) -> ::std::result::Result<
    5      5   
    ::std::option::Option<::std::string::String>,
    6         -
    ::aws_smithy_http::header::ParseError,
           6  +
    ::aws_smithy_legacy_http::header::ParseError,
    7      7   
> {
    8      8   
    let headers = header_map.get_all("passcode");
    9         -
    ::aws_smithy_http::header::one_or_none(headers)
           9  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   10     10   
}
   11     11   
   12     12   
pub fn de_user(
   13     13   
    value: &str,
   14     14   
) -> std::result::Result<
   15     15   
    ::std::string::String,
   16         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          16  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   17     17   
> {
   18     18   
    let value = ::percent_encoding::percent_decode_str(value)
   19     19   
        .decode_utf8()?
   20     20   
        .into_owned();
   21     21   
    Ok(value)
   22     22   
}

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/src/protocol_serde/shape_stream_pokemon_radio.rs

@@ -1,1 +90,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_stream_pokemon_radio_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::StreamPokemonRadioInput,
    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::stream_pokemon_radio_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_stream_pokemon_radio_http_response(
   29     31   
    #[allow(unused_variables)] output: crate::output::StreamPokemonRadioOutput,
   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/octet-stream",
   41     43   
        );
   42     44   
        let http_status: u16 = 200;
   43     45   
        builder = builder.status(http_status);
   44         -
        let body = ::aws_smithy_http_server::body::boxed(
   45         -
            ::aws_smithy_http_server::body::Body::wrap_stream(
          46  +
        let body = ::aws_smithy_legacy_http_server::body::boxed(
          47  +
            ::aws_smithy_legacy_http_server::body::Body::wrap_stream(
   46     48   
                crate::protocol_serde::shape_stream_pokemon_radio_output::ser_data_http_payload(
   47     49   
                    output.data,
   48     50   
                )?,
   49     51   
            ),
   50     52   
        );
   51     53   
        builder.body(body)?
   52     54   
    })
   53     55   
}
   54     56   
   55     57   
#[allow(clippy::unnecessary_wraps)]
   56     58   
pub fn ser_stream_pokemon_radio_http_error(
   57     59   
    error: &crate::error::StreamPokemonRadioError,
   58     60   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::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,
   61     63   
> {
   62     64   
    Ok({
   63     65   
        match error {
   64     66   
            crate::error::StreamPokemonRadioError::InternalServerError(output) => {
   65     67   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     68   
                #[allow(unused_mut)]
   67     69   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          70  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     71   
                    builder,
   70     72   
                    ::http::header::CONTENT_TYPE,
   71     73   
                    "application/octet-stream",
   72     74   
                );
   73         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          75  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   74     76   
                    builder,
   75     77   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   76     78   
                    "InternalServerError",
   77     79   
                );
   78     80   
                let content_length = payload.len();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          81  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     82   
                    builder,
   81     83   
                    ::http::header::CONTENT_LENGTH,
   82     84   
                    content_length,
   83     85   
                );
   84     86   
                builder
   85     87   
                    .status(500)
   86         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          88  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   87     89   
            }
   88     90   
        }
   89     91   
    })
   90     92   
}

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

@@ -1,1 +62,62 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
    3      3   
pub struct CapturePokemonOutputEventsEventStreamSender {
    4      4   
    inner: ::std::sync::Arc<
    5      5   
        ::parking_lot::Mutex<
    6      6   
            ::std::option::Option<
    7         -
                ::aws_smithy_http::event_stream::EventStreamSender<
           7  +
                ::aws_smithy_legacy_http::event_stream::EventStreamSender<
    8      8   
                    crate::model::CapturePokemonEvents,
    9      9   
                    crate::error::CapturePokemonEventsError,
   10     10   
                >,
   11     11   
            >,
   12     12   
        >,
   13     13   
    >,
   14     14   
}
   15     15   
impl CapturePokemonOutputEventsEventStreamSender {
   16     16   
    pub fn into_body_stream(
   17     17   
        self,
   18     18   
        marshaller: impl ::aws_smithy_eventstream::frame::MarshallMessage<
   19     19   
                Input = crate::model::CapturePokemonEvents,
   20     20   
            > + ::std::marker::Send
   21     21   
            + ::std::marker::Sync
   22     22   
            + 'static,
   23     23   
        error_marshaller: impl ::aws_smithy_eventstream::frame::MarshallMessage<
   24     24   
                Input = crate::error::CapturePokemonEventsError,
   25     25   
            > + ::std::marker::Send
   26     26   
            + ::std::marker::Sync
   27     27   
            + 'static,
   28     28   
        signer: impl ::aws_smithy_eventstream::frame::SignMessage
   29     29   
            + ::std::marker::Send
   30     30   
            + ::std::marker::Sync
   31     31   
            + 'static,
   32         -
    ) -> ::aws_smithy_http::event_stream::MessageStreamAdapter<
          32  +
    ) -> ::aws_smithy_legacy_http::event_stream::MessageStreamAdapter<
   33     33   
        crate::model::CapturePokemonEvents,
   34     34   
        crate::error::CapturePokemonEventsError,
   35     35   
    > {
   36     36   
        let mut inner = self.inner.lock();
   37     37   
        let inner = inner.take().expect(
   38     38   
                            "attempted to reuse an event stream. \
   39     39   
                             that means you kept a reference to an event stream and tried to reuse it in another request, \
   40     40   
                             event streams are request scoped and shouldn't be used outside of their bounded request scope"
   41     41   
                        );
   42     42   
        inner.into_body_stream(marshaller, error_marshaller, signer)
@@ -65,65 +149,149 @@
   85     85   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   86     86   
        ::pyo3::exceptions::PyAttributeError::new_err("this is a write-only object").into_py(py)
   87     87   
    }
   88     88   
}
   89     89   
   90     90   
#[::pyo3::pyclass]
   91     91   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   92     92   
pub struct CapturePokemonInputEventsReceiver {
   93     93   
    inner: ::std::sync::Arc<
   94     94   
        ::tokio::sync::Mutex<
   95         -
            ::aws_smithy_http::event_stream::Receiver<
          95  +
            ::aws_smithy_legacy_http::event_stream::Receiver<
   96     96   
                crate::model::AttemptCapturingPokemonEvent,
   97     97   
                crate::error::AttemptCapturingPokemonEventError,
   98     98   
            >,
   99     99   
        >,
  100    100   
    >,
  101    101   
}
  102    102   
impl CapturePokemonInputEventsReceiver {
  103    103   
    pub fn new(
  104    104   
        unmarshaller: impl ::aws_smithy_eventstream::frame::UnmarshallMessage<
  105    105   
                Output = crate::model::AttemptCapturingPokemonEvent,
  106    106   
                Error = crate::error::AttemptCapturingPokemonEventError,
  107    107   
            > + ::std::marker::Send
  108    108   
            + ::std::marker::Sync
  109    109   
            + 'static,
  110    110   
        body: ::aws_smithy_types::body::SdkBody,
  111    111   
    ) -> CapturePokemonInputEventsReceiver {
  112         -
        let inner = ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body);
         112  +
        let inner = ::aws_smithy_legacy_http::event_stream::Receiver::new(unmarshaller, body);
  113    113   
        let inner = ::std::sync::Arc::new(::tokio::sync::Mutex::new(inner));
  114    114   
        CapturePokemonInputEventsReceiver { inner }
  115    115   
    }
  116    116   
  117    117   
    pub async fn try_recv_initial(
  118    118   
        &mut self,
  119         -
        message_type: ::aws_smithy_http::event_stream::InitialMessageType,
         119  +
        message_type: ::aws_smithy_legacy_http::event_stream::InitialMessageType,
  120    120   
    ) -> Result<
  121    121   
        ::std::option::Option<::aws_smithy_types::event_stream::Message>,
  122    122   
        ::aws_smithy_runtime_api::client::result::SdkError<
  123    123   
            crate::error::AttemptCapturingPokemonEventError,
  124    124   
            ::aws_smithy_types::event_stream::RawMessage,
  125    125   
        >,
  126    126   
    > {
  127    127   
        let mut inner = self.inner.lock().await;
  128    128   
        inner.try_recv_initial(message_type).await
  129    129   
    }

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

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

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

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

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

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