Server Test Python

Server Test Python

rev. ee474c7509d7728618c23068f3741e8e5b339ef9 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -763,763 +823,823 @@
  783    783   
                                            },
  784    784   
            ConstraintViolation::VolumeSize(inner) => inner.as_validation_exception_field(path + "/VolumeSize"),
  785    785   
            ConstraintViolation::Tags(inner) => inner.as_validation_exception_field(path + "/Tags"),
  786    786   
            ConstraintViolation::KmsKeyArn(inner) => inner.as_validation_exception_field(path + "/KmsKeyArn"),
  787    787   
            ConstraintViolation::ParentSnapshotId(inner) => inner.as_validation_exception_field(path + "/ParentSnapshotId"),
  788    788   
            ConstraintViolation::Description(inner) => inner.as_validation_exception_field(path + "/Description"),
  789    789   
        }
  790    790   
        }
  791    791   
    }
  792    792   
    impl ::std::convert::From<ConstraintViolation>
  793         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
         793  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
  794    794   
    {
  795    795   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  796    796   
            let first_validation_exception_field =
  797    797   
                constraint_violation.as_validation_exception_field("".to_owned());
  798    798   
            let validation_exception = crate::error::ValidationException {
  799    799   
                message: format!(
  800    800   
                    "1 validation error detected. {}",
  801    801   
                    &first_validation_exception_field.message
  802    802   
                ),
  803    803   
                field_list: Some(vec![first_validation_exception_field]),
@@ -1235,1235 +1295,1295 @@
 1255   1255   
                                            },
 1256   1256   
            ConstraintViolation::MissingChecksumAlgorithm => crate::model::ValidationExceptionField {
 1257   1257   
                                                message: format!("Value at '{}/ChecksumAlgorithm' failed to satisfy constraint: Member must not be null", path),
 1258   1258   
                                                path: path + "/ChecksumAlgorithm",
 1259   1259   
                                            },
 1260   1260   
            ConstraintViolation::ChecksumAlgorithm(inner) => inner.as_validation_exception_field(path + "/ChecksumAlgorithm"),
 1261   1261   
        }
 1262   1262   
        }
 1263   1263   
    }
 1264   1264   
    impl ::std::convert::From<ConstraintViolation>
 1265         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        1265  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
 1266   1266   
    {
 1267   1267   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 1268   1268   
            let first_validation_exception_field =
 1269   1269   
                constraint_violation.as_validation_exception_field("".to_owned());
 1270   1270   
            let validation_exception = crate::error::ValidationException {
 1271   1271   
                message: format!(
 1272   1272   
                    "1 validation error detected. {}",
 1273   1273   
                    &first_validation_exception_field.message
 1274   1274   
                ),
 1275   1275   
                field_list: Some(vec![first_validation_exception_field]),
@@ -1612,1612 +1672,1672 @@
 1632   1632   
            ConstraintViolation::NextToken(inner) => inner.as_validation_exception_field(path + "/NextToken"),
 1633   1633   
            ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
 1634   1634   
                                                message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
 1635   1635   
                                                path: path + "/SnapshotId",
 1636   1636   
                                            },
 1637   1637   
            ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
 1638   1638   
        }
 1639   1639   
        }
 1640   1640   
    }
 1641   1641   
    impl ::std::convert::From<ConstraintViolation>
 1642         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        1642  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
 1643   1643   
    {
 1644   1644   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 1645   1645   
            let first_validation_exception_field =
 1646   1646   
                constraint_violation.as_validation_exception_field("".to_owned());
 1647   1647   
            let validation_exception = crate::error::ValidationException {
 1648   1648   
                message: format!(
 1649   1649   
                    "1 validation error detected. {}",
 1650   1650   
                    &first_validation_exception_field.message
 1651   1651   
                ),
 1652   1652   
                field_list: Some(vec![first_validation_exception_field]),
@@ -1887,1887 +1947,1947 @@
 1907   1907   
                                            },
 1908   1908   
            ConstraintViolation::SecondSnapshotId(inner) => inner.as_validation_exception_field(path + "/SecondSnapshotId"),
 1909   1909   
            ConstraintViolation::FirstSnapshotId(inner) => inner.as_validation_exception_field(path + "/FirstSnapshotId"),
 1910   1910   
            ConstraintViolation::NextToken(inner) => inner.as_validation_exception_field(path + "/NextToken"),
 1911   1911   
            ConstraintViolation::MaxResults(inner) => inner.as_validation_exception_field(path + "/MaxResults"),
 1912   1912   
            ConstraintViolation::StartingBlockIndex(inner) => inner.as_validation_exception_field(path + "/StartingBlockIndex"),
 1913   1913   
        }
 1914   1914   
        }
 1915   1915   
    }
 1916   1916   
    impl ::std::convert::From<ConstraintViolation>
 1917         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        1917  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
 1918   1918   
    {
 1919   1919   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 1920   1920   
            let first_validation_exception_field =
 1921   1921   
                constraint_violation.as_validation_exception_field("".to_owned());
 1922   1922   
            let validation_exception = crate::error::ValidationException {
 1923   1923   
                message: format!(
 1924   1924   
                    "1 validation error detected. {}",
 1925   1925   
                    &first_validation_exception_field.message
 1926   1926   
                ),
 1927   1927   
                field_list: Some(vec![first_validation_exception_field]),
@@ -2209,2209 +2269,2269 @@
 2229   2229   
            ConstraintViolation::BlockToken(inner) => inner.as_validation_exception_field(path + "/BlockToken"),
 2230   2230   
            ConstraintViolation::MissingBlockIndex => crate::model::ValidationExceptionField {
 2231   2231   
                                                message: format!("Value at '{}/BlockIndex' failed to satisfy constraint: Member must not be null", path),
 2232   2232   
                                                path: path + "/BlockIndex",
 2233   2233   
                                            },
 2234   2234   
            ConstraintViolation::BlockIndex(inner) => inner.as_validation_exception_field(path + "/BlockIndex"),
 2235   2235   
        }
 2236   2236   
        }
 2237   2237   
    }
 2238   2238   
    impl ::std::convert::From<ConstraintViolation>
 2239         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        2239  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
 2240   2240   
    {
 2241   2241   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 2242   2242   
            let first_validation_exception_field =
 2243   2243   
                constraint_violation.as_validation_exception_field("".to_owned());
 2244   2244   
            let validation_exception = crate::error::ValidationException {
 2245   2245   
                message: format!(
 2246   2246   
                    "1 validation error detected. {}",
 2247   2247   
                    &first_validation_exception_field.message
 2248   2248   
                ),
 2249   2249   
                field_list: Some(vec![first_validation_exception_field]),
@@ -2477,2477 +2537,2537 @@
 2497   2497   
            ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
 2498   2498   
                                                message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
 2499   2499   
                                                path: path + "/SnapshotId",
 2500   2500   
                                            },
 2501   2501   
            ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
 2502   2502   
            ConstraintViolation::Checksum(inner) => inner.as_validation_exception_field(path + "/Checksum"),
 2503   2503   
        }
 2504   2504   
        }
 2505   2505   
    }
 2506   2506   
    impl ::std::convert::From<ConstraintViolation>
 2507         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        2507  +
        for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
 2508   2508   
    {
 2509   2509   
        fn from(constraint_violation: ConstraintViolation) -> Self {
 2510   2510   
            let first_validation_exception_field =
 2511   2511   
                constraint_violation.as_validation_exception_field("".to_owned());
 2512   2512   
            let validation_exception = crate::error::ValidationException {
 2513   2513   
                message: format!(
 2514   2514   
                    "1 validation error detected. {}",
 2515   2515   
                    &first_validation_exception_field.message
 2516   2516   
                ),
 2517   2517   
                field_list: Some(vec![first_validation_exception_field]),

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

@@ -48,48 +147,148 @@
   68     68   
//!
   69     69   
//! # let app = Ebs::builder(
   70     70   
//! #     EbsConfig::builder()
   71     71   
//! #         .build()
   72     72   
//! # ).build_unchecked();
   73     73   
//! let server = app.into_make_service();
   74     74   
//! let bind: SocketAddr = "127.0.0.1:6969".parse()
   75     75   
//!     .expect("unable to parse the server bind address and port");
   76     76   
//! ::hyper::Server::bind(&bind).serve(server).await.unwrap();
   77     77   
//! # }
          78  +
//!
   78     79   
//! ```
   79     80   
//!
   80     81   
//! ### Running on Lambda
   81     82   
//!
   82     83   
//! ```rust,ignore
   83     84   
//! use ebs::server::routing::LambdaHandler;
   84     85   
//! use ebs::Ebs;
   85     86   
//!
   86     87   
//! # async fn dummy() {
   87     88   
//! # let app = Ebs::builder(
   88     89   
//! #     EbsConfig::builder()
   89     90   
//! #         .build()
   90     91   
//! # ).build_unchecked();
   91     92   
//! let handler = LambdaHandler::new(app);
   92     93   
//! lambda_http::run(handler).await.unwrap();
   93     94   
//! # }
   94     95   
//! ```
   95     96   
//!
   96     97   
//! # Building the Ebs
   97     98   
//!
   98     99   
//! To construct [`Ebs`] we use [`EbsBuilder`] returned by [`Ebs::builder`].
   99    100   
//!
  100    101   
//! ## Plugins
  101    102   
//!
  102    103   
//! The [`Ebs::builder`] method, returning [`EbsBuilder`],
  103    104   
//! accepts a config object on which plugins can be registered.
  104    105   
//! Plugins allow you to build middleware which is aware of the operation it is being applied to.
  105    106   
//!
  106    107   
//! ```rust,no_run
  107    108   
//! # use ebs::server::plugin::IdentityPlugin as LoggingPlugin;
  108    109   
//! # use ebs::server::plugin::IdentityPlugin as MetricsPlugin;
  109    110   
//! # use ::hyper::Body;
  110    111   
//! use ebs::server::plugin::HttpPlugins;
  111    112   
//! use ebs::{Ebs, EbsConfig, EbsBuilder};
  112    113   
//!
  113    114   
//! let http_plugins = HttpPlugins::new()
  114    115   
//!         .push(LoggingPlugin)
  115    116   
//!         .push(MetricsPlugin);
  116    117   
//! let config = EbsConfig::builder().build();
  117         -
//! let builder: EbsBuilder<Body, _, _, _> = Ebs::builder(config);
         118  +
//! let builder: EbsBuilder<::hyper::Body, _, _, _> = Ebs::builder(config);
  118    119   
//! ```
  119    120   
//!
  120    121   
//! Check out [`crate::server::plugin`] to learn more about plugins.
  121    122   
//!
  122    123   
//! ## Handlers
  123    124   
//!
  124    125   
//! [`EbsBuilder`] provides a setter method for each operation in your Smithy model. The setter methods expect an async function as input, matching the signature for the corresponding operation in your Smithy model.
  125    126   
//! We call these async functions **handlers**. This is where your application business logic lives.
  126    127   
//!
  127    128   
//! Every handler must take an `Input`, and optional [`extractor arguments`](crate::server::request), while returning:
@@ -208,209 +304,305 @@
  228    229   
//!     todo!()
  229    230   
//! }
  230    231   
//!
  231    232   
//! async fn start_snapshot(input: input::StartSnapshotInput) -> Result<output::StartSnapshotOutput, error::StartSnapshotError> {
  232    233   
//!     todo!()
  233    234   
//! }
  234    235   
//!
  235    236   
//! ```
  236    237   
//!
  237    238   
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
         239  +
//! [hyper server]: https://docs.rs/hyper/0.14.26/hyper/server/index.html
  238    240   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  239    241   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  240    242   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  241         -
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  242    243   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
  243    244   
pub use crate::service::{Ebs, EbsBuilder, EbsConfig, EbsConfigBuilder, MissingOperationsError};
  244    245   
  245    246   
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  246    247   
pub mod server {
  247    248   
    // Re-export all types from the `aws-smithy-http-server` crate.
  248         -
    pub use ::aws_smithy_http_server::*;
         249  +
    pub use ::aws_smithy_legacy_http_server::*;
  249    250   
}
  250    251   
  251    252   
/// Crate version number.
  252    253   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  253    254   
  254    255   
/// Constrained types for constrained shapes.
  255    256   
mod constrained;
  256    257   
  257    258   
/// All error types that operations can return. Documentation on these types is copied from the model.
  258    259   
pub mod error;
  259    260   
  260    261   
/// Input structures for operations. Documentation on these types is copied from the model.
  261    262   
pub mod input;
  262    263   
  263    264   
/// Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
  264    265   
pub mod model;
  265    266   
  266    267   
/// All operations that this crate can perform.
  267    268   
pub mod operation;
  268    269   
  269    270   
/// A collection of types representing each operation defined in the service closure.
  270    271   
///
  271         -
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
         272  +
/// The [plugin system](::aws_smithy_legacy_http_server::plugin) makes use of these
  272    273   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  273         -
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  274         -
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
         274  +
/// parameterize [`Plugin`](::aws_smithy_legacy_http_server::plugin::Plugin) implementations. Their traits, such as
         275  +
/// [`OperationShape`](::aws_smithy_legacy_http_server::operation::OperationShape), can be used to provide
  275    276   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  276    277   
pub mod operation_shape;
  277    278   
  278    279   
/// Output structures for operations. Documentation on these types is copied from the model.
  279    280   
pub mod output;
  280    281   
  281    282   
/// Export PyO3 symbols in the shared library
  282    283   
pub mod python_module_export;
  283    284   
  284    285   
/// Operation adapters that delegate to Python handlers.

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

@@ -1,1 +627,621 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4      4   
    /// [`StartSnapshotInput`](crate::input::StartSnapshotInput) using modelled bindings.
    5      5   
    pub struct StartSnapshotInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StartSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StartSnapshotInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10     10   
impl std::future::Future for StartSnapshotInputFuture {
   11     11   
    type Output = Result<
   12     12   
        crate::input::StartSnapshotInput,
   13         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
          13  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26         -
    ::aws_smithy_http_server::request::FromRequest<
   27         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          26  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
          27  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   28     28   
        B,
   29     29   
    > for crate::input::StartSnapshotInput
   30     30   
where
   31         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          31  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   36         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          35  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          36  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
          38  +
    type Rejection =
          39  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
   39     40   
    type Future = StartSnapshotInputFuture;
   40     41   
   41     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   42     43   
        let fut = async move {
   43         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
          44  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
   44     45   
                request.headers(),
   45     46   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
   46     47   
            ) {
   47         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
          48  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   48     49   
            }
   49     50   
            crate::protocol_serde::shape_start_snapshot::de_start_snapshot_http_request(request)
   50     51   
                .await
   51     52   
        };
   52     53   
        use ::futures_util::future::TryFutureExt;
   53         -
        let fut = fut.map_err(
   54         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
          54  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   55     55   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
   56         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   57         -
                    e,
   58         -
                )
   59         -
            },
   60         -
        );
          56  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
          57  +
                    });
   61     58   
        StartSnapshotInputFuture {
   62     59   
            inner: Box::pin(fut),
   63     60   
        }
   64     61   
    }
   65     62   
}
   66     63   
impl
   67         -
    ::aws_smithy_http_server::response::IntoResponse<
   68         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          64  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          65  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   69     66   
    > for crate::output::StartSnapshotOutput
   70     67   
{
   71         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          68  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   72     69   
        match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_response(self) {
   73     70   
            Ok(response) => response,
   74     71   
            Err(e) => {
   75     72   
                ::tracing::error!(error = %e, "failed to serialize response");
   76         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
          73  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   77     74   
            }
   78     75   
        }
   79     76   
    }
   80     77   
}
   81     78   
impl
   82         -
    ::aws_smithy_http_server::response::IntoResponse<
   83         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
          79  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
          80  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   84     81   
    > for crate::error::StartSnapshotError
   85     82   
{
   86         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
          83  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   87     84   
        match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_error(&self) {
   88     85   
            Ok(mut response) => {
   89     86   
                response.extensions_mut().insert(
   90         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
          87  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
          88  +
                        self.name(),
          89  +
                    ),
   91     90   
                );
   92     91   
                response
   93     92   
            }
   94     93   
            Err(e) => {
   95     94   
                ::tracing::error!(error = %e, "failed to serialize response");
   96         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
          95  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   97     96   
            }
   98     97   
        }
   99     98   
    }
  100     99   
}
  101    100   
  102    101   
::pin_project_lite::pin_project! {
  103    102   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  104    103   
    /// [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput) using modelled bindings.
  105    104   
    pub struct PutSnapshotBlockInputFuture {
  106         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         105  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutSnapshotBlockInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  107    106   
    }
  108    107   
}
  109    108   
  110    109   
impl std::future::Future for PutSnapshotBlockInputFuture {
  111    110   
    type Output = Result<
  112    111   
        crate::input::PutSnapshotBlockInput,
  113         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         112  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  114    113   
    >;
  115    114   
  116    115   
    fn poll(
  117    116   
        self: std::pin::Pin<&mut Self>,
  118    117   
        cx: &mut std::task::Context<'_>,
  119    118   
    ) -> std::task::Poll<Self::Output> {
  120    119   
        let this = self.project();
  121    120   
        this.inner.as_mut().poll(cx)
  122    121   
    }
  123    122   
}
  124    123   
  125    124   
impl<B>
  126         -
    ::aws_smithy_http_server::request::FromRequest<
  127         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         125  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         126  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  128    127   
        B,
  129    128   
    > for crate::input::PutSnapshotBlockInput
  130    129   
where
  131         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         130  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  132    131   
    B: 'static,
  133    132   
  134    133   
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
  135    134   
    B::Data: Send,
  136         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  137         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         135  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         136  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  138    137   
{
  139         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         138  +
    type Rejection =
         139  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  140    140   
    type Future = PutSnapshotBlockInputFuture;
  141    141   
  142    142   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  143    143   
        let fut = async move {
  144         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         144  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  145    145   
                request.headers(),
  146    146   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  147    147   
            ) {
  148         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         148  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  149    149   
            }
  150    150   
            crate::protocol_serde::shape_put_snapshot_block::de_put_snapshot_block_http_request(
  151    151   
                request,
  152    152   
            )
  153    153   
            .await
  154    154   
        };
  155    155   
        use ::futures_util::future::TryFutureExt;
  156         -
        let fut = fut.map_err(
  157         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         156  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  158    157   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  159         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  160         -
                    e,
  161         -
                )
  162         -
            },
  163         -
        );
         158  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         159  +
                    });
  164    160   
        PutSnapshotBlockInputFuture {
  165    161   
            inner: Box::pin(fut),
  166    162   
        }
  167    163   
    }
  168    164   
}
  169    165   
impl
  170         -
    ::aws_smithy_http_server::response::IntoResponse<
  171         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         166  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         167  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  172    168   
    > for crate::output::PutSnapshotBlockOutput
  173    169   
{
  174         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         170  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  175    171   
        match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_response(
  176    172   
            self,
  177    173   
        ) {
  178    174   
            Ok(response) => response,
  179    175   
            Err(e) => {
  180    176   
                ::tracing::error!(error = %e, "failed to serialize response");
  181         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         177  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  182    178   
            }
  183    179   
        }
  184    180   
    }
  185    181   
}
  186    182   
impl
  187         -
    ::aws_smithy_http_server::response::IntoResponse<
  188         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         183  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         184  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  189    185   
    > for crate::error::PutSnapshotBlockError
  190    186   
{
  191         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         187  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  192    188   
        match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_error(
  193    189   
            &self,
  194    190   
        ) {
  195    191   
            Ok(mut response) => {
  196    192   
                response.extensions_mut().insert(
  197         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         193  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         194  +
                        self.name(),
         195  +
                    ),
  198    196   
                );
  199    197   
                response
  200    198   
            }
  201    199   
            Err(e) => {
  202    200   
                ::tracing::error!(error = %e, "failed to serialize response");
  203         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         201  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  204    202   
            }
  205    203   
        }
  206    204   
    }
  207    205   
}
  208    206   
  209    207   
::pin_project_lite::pin_project! {
  210    208   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  211    209   
    /// [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput) using modelled bindings.
  212    210   
    pub struct ListSnapshotBlocksInputFuture {
  213         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListSnapshotBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         211  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListSnapshotBlocksInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  214    212   
    }
  215    213   
}
  216    214   
  217    215   
impl std::future::Future for ListSnapshotBlocksInputFuture {
  218    216   
    type Output = Result<
  219    217   
        crate::input::ListSnapshotBlocksInput,
  220         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         218  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  221    219   
    >;
  222    220   
  223    221   
    fn poll(
  224    222   
        self: std::pin::Pin<&mut Self>,
  225    223   
        cx: &mut std::task::Context<'_>,
  226    224   
    ) -> std::task::Poll<Self::Output> {
  227    225   
        let this = self.project();
  228    226   
        this.inner.as_mut().poll(cx)
  229    227   
    }
  230    228   
}
  231    229   
  232    230   
impl<B>
  233         -
    ::aws_smithy_http_server::request::FromRequest<
  234         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         231  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         232  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  235    233   
        B,
  236    234   
    > for crate::input::ListSnapshotBlocksInput
  237    235   
where
  238         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         236  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  239    237   
    B: 'static,
  240    238   
  241    239   
    B::Data: Send,
  242         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  243         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         240  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         241  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  244    242   
{
  245         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         243  +
    type Rejection =
         244  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  246    245   
    type Future = ListSnapshotBlocksInputFuture;
  247    246   
  248    247   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  249    248   
        let fut = async move {
  250         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         249  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  251    250   
                request.headers(),
  252    251   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  253    252   
            ) {
  254         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         253  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  255    254   
            }
  256    255   
            crate::protocol_serde::shape_list_snapshot_blocks::de_list_snapshot_blocks_http_request(
  257    256   
                request,
  258    257   
            )
  259    258   
            .await
  260    259   
        };
  261    260   
        use ::futures_util::future::TryFutureExt;
  262         -
        let fut = fut.map_err(
  263         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         261  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  264    262   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  265         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  266         -
                    e,
  267         -
                )
  268         -
            },
  269         -
        );
         263  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         264  +
                    });
  270    265   
        ListSnapshotBlocksInputFuture {
  271    266   
            inner: Box::pin(fut),
  272    267   
        }
  273    268   
    }
  274    269   
}
  275    270   
impl
  276         -
    ::aws_smithy_http_server::response::IntoResponse<
  277         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         271  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         272  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  278    273   
    > for crate::output::ListSnapshotBlocksOutput
  279    274   
{
  280         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         275  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  281    276   
        match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_response(self) {
  282    277   
                        Ok(response) => response,
  283    278   
                        Err(e) => {
  284    279   
                            ::tracing::error!(error = %e, "failed to serialize response");
  285         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         280  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  286    281   
                        }
  287    282   
                    }
  288    283   
    }
  289    284   
}
  290    285   
impl
  291         -
    ::aws_smithy_http_server::response::IntoResponse<
  292         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         286  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         287  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  293    288   
    > for crate::error::ListSnapshotBlocksError
  294    289   
{
  295         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         290  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  296    291   
        match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_error(
  297    292   
            &self,
  298    293   
        ) {
  299    294   
            Ok(mut response) => {
  300    295   
                response.extensions_mut().insert(
  301         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         296  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         297  +
                        self.name(),
         298  +
                    ),
  302    299   
                );
  303    300   
                response
  304    301   
            }
  305    302   
            Err(e) => {
  306    303   
                ::tracing::error!(error = %e, "failed to serialize response");
  307         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         304  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  308    305   
            }
  309    306   
        }
  310    307   
    }
  311    308   
}
  312    309   
  313    310   
::pin_project_lite::pin_project! {
  314    311   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  315    312   
    /// [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput) using modelled bindings.
  316    313   
    pub struct ListChangedBlocksInputFuture {
  317         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListChangedBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         314  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListChangedBlocksInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  318    315   
    }
  319    316   
}
  320    317   
  321    318   
impl std::future::Future for ListChangedBlocksInputFuture {
  322    319   
    type Output = Result<
  323    320   
        crate::input::ListChangedBlocksInput,
  324         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         321  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  325    322   
    >;
  326    323   
  327    324   
    fn poll(
  328    325   
        self: std::pin::Pin<&mut Self>,
  329    326   
        cx: &mut std::task::Context<'_>,
  330    327   
    ) -> std::task::Poll<Self::Output> {
  331    328   
        let this = self.project();
  332    329   
        this.inner.as_mut().poll(cx)
  333    330   
    }
  334    331   
}
  335    332   
  336    333   
impl<B>
  337         -
    ::aws_smithy_http_server::request::FromRequest<
  338         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         334  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         335  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  339    336   
        B,
  340    337   
    > for crate::input::ListChangedBlocksInput
  341    338   
where
  342         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         339  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  343    340   
    B: 'static,
  344    341   
  345    342   
    B::Data: Send,
  346         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  347         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         343  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         344  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  348    345   
{
  349         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         346  +
    type Rejection =
         347  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  350    348   
    type Future = ListChangedBlocksInputFuture;
  351    349   
  352    350   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  353    351   
        let fut = async move {
  354         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         352  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  355    353   
                request.headers(),
  356    354   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  357    355   
            ) {
  358         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         356  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  359    357   
            }
  360    358   
            crate::protocol_serde::shape_list_changed_blocks::de_list_changed_blocks_http_request(
  361    359   
                request,
  362    360   
            )
  363    361   
            .await
  364    362   
        };
  365    363   
        use ::futures_util::future::TryFutureExt;
  366         -
        let fut = fut.map_err(
  367         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         364  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  368    365   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  369         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  370         -
                    e,
  371         -
                )
  372         -
            },
  373         -
        );
         366  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         367  +
                    });
  374    368   
        ListChangedBlocksInputFuture {
  375    369   
            inner: Box::pin(fut),
  376    370   
        }
  377    371   
    }
  378    372   
}
  379    373   
impl
  380         -
    ::aws_smithy_http_server::response::IntoResponse<
  381         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         374  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         375  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  382    376   
    > for crate::output::ListChangedBlocksOutput
  383    377   
{
  384         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         378  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  385    379   
        match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_response(self) {
  386    380   
                        Ok(response) => response,
  387    381   
                        Err(e) => {
  388    382   
                            ::tracing::error!(error = %e, "failed to serialize response");
  389         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         383  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  390    384   
                        }
  391    385   
                    }
  392    386   
    }
  393    387   
}
  394    388   
impl
  395         -
    ::aws_smithy_http_server::response::IntoResponse<
  396         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         389  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         390  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  397    391   
    > for crate::error::ListChangedBlocksError
  398    392   
{
  399         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         393  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  400    394   
        match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_error(
  401    395   
            &self,
  402    396   
        ) {
  403    397   
            Ok(mut response) => {
  404    398   
                response.extensions_mut().insert(
  405         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         399  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         400  +
                        self.name(),
         401  +
                    ),
  406    402   
                );
  407    403   
                response
  408    404   
            }
  409    405   
            Err(e) => {
  410    406   
                ::tracing::error!(error = %e, "failed to serialize response");
  411         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         407  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  412    408   
            }
  413    409   
        }
  414    410   
    }
  415    411   
}
  416    412   
  417    413   
::pin_project_lite::pin_project! {
  418    414   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  419    415   
    /// [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput) using modelled bindings.
  420    416   
    pub struct GetSnapshotBlockInputFuture {
  421         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         417  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetSnapshotBlockInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  422    418   
    }
  423    419   
}
  424    420   
  425    421   
impl std::future::Future for GetSnapshotBlockInputFuture {
  426    422   
    type Output = Result<
  427    423   
        crate::input::GetSnapshotBlockInput,
  428         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         424  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  429    425   
    >;
  430    426   
  431    427   
    fn poll(
  432    428   
        self: std::pin::Pin<&mut Self>,
  433    429   
        cx: &mut std::task::Context<'_>,
  434    430   
    ) -> std::task::Poll<Self::Output> {
  435    431   
        let this = self.project();
  436    432   
        this.inner.as_mut().poll(cx)
  437    433   
    }
  438    434   
}
  439    435   
  440    436   
impl<B>
  441         -
    ::aws_smithy_http_server::request::FromRequest<
  442         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         437  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         438  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  443    439   
        B,
  444    440   
    > for crate::input::GetSnapshotBlockInput
  445    441   
where
  446         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         442  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  447    443   
    B: 'static,
  448    444   
  449    445   
    B::Data: Send,
  450         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  451         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         446  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         447  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  452    448   
{
  453         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         449  +
    type Rejection =
         450  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  454    451   
    type Future = GetSnapshotBlockInputFuture;
  455    452   
  456    453   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  457    454   
        let fut = async move {
  458         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         455  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  459    456   
                request.headers(),
  460    457   
                &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
  461    458   
            ) {
  462         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         459  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  463    460   
            }
  464    461   
            crate::protocol_serde::shape_get_snapshot_block::de_get_snapshot_block_http_request(
  465    462   
                request,
  466    463   
            )
  467    464   
            .await
  468    465   
        };
  469    466   
        use ::futures_util::future::TryFutureExt;
  470         -
        let fut = fut.map_err(
  471         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         467  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  472    468   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  473         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  474         -
                    e,
  475         -
                )
  476         -
            },
  477         -
        );
         469  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         470  +
                    });
  478    471   
        GetSnapshotBlockInputFuture {
  479    472   
            inner: Box::pin(fut),
  480    473   
        }
  481    474   
    }
  482    475   
}
  483    476   
impl
  484         -
    ::aws_smithy_http_server::response::IntoResponse<
  485         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         477  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         478  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  486    479   
    > for crate::output::GetSnapshotBlockOutput
  487    480   
{
  488         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         481  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  489    482   
        match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_response(
  490    483   
            self,
  491    484   
        ) {
  492    485   
            Ok(response) => response,
  493    486   
            Err(e) => {
  494    487   
                ::tracing::error!(error = %e, "failed to serialize response");
  495         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         488  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  496    489   
            }
  497    490   
        }
  498    491   
    }
  499    492   
}
  500    493   
impl
  501         -
    ::aws_smithy_http_server::response::IntoResponse<
  502         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         494  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         495  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  503    496   
    > for crate::error::GetSnapshotBlockError
  504    497   
{
  505         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         498  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  506    499   
        match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_error(
  507    500   
            &self,
  508    501   
        ) {
  509    502   
            Ok(mut response) => {
  510    503   
                response.extensions_mut().insert(
  511         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         504  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         505  +
                        self.name(),
         506  +
                    ),
  512    507   
                );
  513    508   
                response
  514    509   
            }
  515    510   
            Err(e) => {
  516    511   
                ::tracing::error!(error = %e, "failed to serialize response");
  517         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         512  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  518    513   
            }
  519    514   
        }
  520    515   
    }
  521    516   
}
  522    517   
  523    518   
::pin_project_lite::pin_project! {
  524    519   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  525    520   
    /// [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput) using modelled bindings.
  526    521   
    pub struct CompleteSnapshotInputFuture {
  527         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CompleteSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         522  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CompleteSnapshotInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  528    523   
    }
  529    524   
}
  530    525   
  531    526   
impl std::future::Future for CompleteSnapshotInputFuture {
  532    527   
    type Output = Result<
  533    528   
        crate::input::CompleteSnapshotInput,
  534         -
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
         529  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  535    530   
    >;
  536    531   
  537    532   
    fn poll(
  538    533   
        self: std::pin::Pin<&mut Self>,
  539    534   
        cx: &mut std::task::Context<'_>,
  540    535   
    ) -> std::task::Poll<Self::Output> {
  541    536   
        let this = self.project();
  542    537   
        this.inner.as_mut().poll(cx)
  543    538   
    }
  544    539   
}
  545    540   
  546    541   
impl<B>
  547         -
    ::aws_smithy_http_server::request::FromRequest<
  548         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         542  +
    ::aws_smithy_legacy_http_server::request::FromRequest<
         543  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  549    544   
        B,
  550    545   
    > for crate::input::CompleteSnapshotInput
  551    546   
where
  552         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
         547  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  553    548   
    B: 'static,
  554    549   
  555    550   
    B::Data: Send,
  556         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  557         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
         551  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
         552  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  558    553   
{
  559         -
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
         554  +
    type Rejection =
         555  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  560    556   
    type Future = CompleteSnapshotInputFuture;
  561    557   
  562    558   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  563    559   
        let fut = async move {
  564         -
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
         560  +
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  565    561   
                request.headers(),
  566    562   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  567    563   
            ) {
  568         -
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
         564  +
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  569    565   
            }
  570    566   
            crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_request(
  571    567   
                request,
  572    568   
            )
  573    569   
            .await
  574    570   
        };
  575    571   
        use ::futures_util::future::TryFutureExt;
  576         -
        let fut = fut.map_err(
  577         -
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
         572  +
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  578    573   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  579         -
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  580         -
                    e,
  581         -
                )
  582         -
            },
  583         -
        );
         574  +
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
         575  +
                    });
  584    576   
        CompleteSnapshotInputFuture {
  585    577   
            inner: Box::pin(fut),
  586    578   
        }
  587    579   
    }
  588    580   
}
  589    581   
impl
  590         -
    ::aws_smithy_http_server::response::IntoResponse<
  591         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         582  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         583  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  592    584   
    > for crate::output::CompleteSnapshotOutput
  593    585   
{
  594         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         586  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  595    587   
        match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_response(
  596    588   
            self,
  597    589   
        ) {
  598    590   
            Ok(response) => response,
  599    591   
            Err(e) => {
  600    592   
                ::tracing::error!(error = %e, "failed to serialize response");
  601         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         593  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  602    594   
            }
  603    595   
        }
  604    596   
    }
  605    597   
}
  606    598   
impl
  607         -
    ::aws_smithy_http_server::response::IntoResponse<
  608         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         599  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         600  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  609    601   
    > for crate::error::CompleteSnapshotError
  610    602   
{
  611         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         603  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  612    604   
        match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_error(
  613    605   
            &self,
  614    606   
        ) {
  615    607   
            Ok(mut response) => {
  616    608   
                response.extensions_mut().insert(
  617         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         609  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         610  +
                        self.name(),
         611  +
                    ),
  618    612   
                );
  619    613   
                response
  620    614   
            }
  621    615   
            Err(e) => {
  622    616   
                ::tracing::error!(error = %e, "failed to serialize response");
  623         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         617  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  624    618   
            }
  625    619   
        }
  626    620   
    }
  627    621   
}

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

@@ -1,1 +231,241 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3      3   
/// <p>Creates a new Amazon EBS snapshot. The new snapshot enters the <code>pending</code> state after the request completes.</p>
    4      4   
/// <p>After creating the snapshot, use <a href="https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html"> PutSnapshotBlock</a> to write blocks of data to the snapshot.</p>
    5      5   
pub struct StartSnapshot;
    6      6   
    7         -
impl ::aws_smithy_http_server::operation::OperationShape for StartSnapshot {
    8         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    9         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
           7  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StartSnapshot {
           8  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           9  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   10     10   
            "com.amazonaws.ebs#StartSnapshot",
   11     11   
            "com.amazonaws.ebs",
   12     12   
            "StartSnapshot",
   13     13   
        );
   14     14   
   15     15   
    type Input = crate::input::StartSnapshotInput;
   16     16   
    type Output = crate::output::StartSnapshotOutput;
   17     17   
    type Error = crate::error::StartSnapshotError;
   18     18   
}
   19     19   
   20         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StartSnapshot {
   21         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   22         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   23         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   24         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   25         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          20  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for StartSnapshot {
          21  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          23  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          24  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          25  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   26     26   
        >,
   27     27   
    >;
   28         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   29         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   30         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          28  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          29  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          30  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   31     31   
    >;
   32     32   
   33     33   
    fn request_fmt() -> Self::RequestFmt {
   34         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          34  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   35     35   
    }
   36     36   
   37     37   
    fn response_fmt() -> Self::ResponseFmt {
   38         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          38  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   39     39   
    }
   40     40   
}
   41     41   
   42     42   
/// <p>Writes a block of data to a snapshot. If the specified block contains data, the existing data is overwritten. The target snapshot must be in the <code>pending</code> state.</p>
   43     43   
/// <p>Data written to a snapshot must be aligned with 512-byte sectors.</p>
   44     44   
pub struct PutSnapshotBlock;
   45     45   
   46         -
impl ::aws_smithy_http_server::operation::OperationShape for PutSnapshotBlock {
   47         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   48         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          46  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for PutSnapshotBlock {
          47  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          48  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   49     49   
            "com.amazonaws.ebs#PutSnapshotBlock",
   50     50   
            "com.amazonaws.ebs",
   51     51   
            "PutSnapshotBlock",
   52     52   
        );
   53     53   
   54     54   
    type Input = crate::input::PutSnapshotBlockInput;
   55     55   
    type Output = crate::output::PutSnapshotBlockOutput;
   56     56   
    type Error = crate::error::PutSnapshotBlockError;
   57     57   
}
   58     58   
   59         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for PutSnapshotBlock {
   60         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   61         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   62         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   63         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          59  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          60  +
    for PutSnapshotBlock
          61  +
{
          62  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          63  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          64  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          65  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          66  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   65     67   
        >,
   66     68   
    >;
   67         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   68         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   69         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          69  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          70  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          71  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   70     72   
    >;
   71     73   
   72     74   
    fn request_fmt() -> Self::RequestFmt {
   73         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          75  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   74     76   
    }
   75     77   
   76     78   
    fn response_fmt() -> Self::ResponseFmt {
   77         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          79  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   78     80   
    }
   79     81   
}
   80     82   
   81     83   
/// <p>Returns information about the blocks in an Amazon Elastic Block Store snapshot.</p>
   82     84   
pub struct ListSnapshotBlocks;
   83     85   
   84         -
impl ::aws_smithy_http_server::operation::OperationShape for ListSnapshotBlocks {
   85         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   86         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          86  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ListSnapshotBlocks {
          87  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          88  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   87     89   
            "com.amazonaws.ebs#ListSnapshotBlocks",
   88     90   
            "com.amazonaws.ebs",
   89     91   
            "ListSnapshotBlocks",
   90     92   
        );
   91     93   
   92     94   
    type Input = crate::input::ListSnapshotBlocksInput;
   93     95   
    type Output = crate::output::ListSnapshotBlocksOutput;
   94     96   
    type Error = crate::error::ListSnapshotBlocksError;
   95     97   
}
   96     98   
   97         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ListSnapshotBlocks {
   98         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   99         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  100         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  101         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  102         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          99  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         100  +
    for ListSnapshotBlocks
         101  +
{
         102  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         103  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         104  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         105  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         106  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  103    107   
        >,
  104    108   
    >;
  105         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  106         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  107         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         109  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         110  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         111  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  108    112   
    >;
  109    113   
  110    114   
    fn request_fmt() -> Self::RequestFmt {
  111         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         115  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  112    116   
    }
  113    117   
  114    118   
    fn response_fmt() -> Self::ResponseFmt {
  115         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         119  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  116    120   
    }
  117    121   
}
  118    122   
  119    123   
/// <p>Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.</p>
  120    124   
pub struct ListChangedBlocks;
  121    125   
  122         -
impl ::aws_smithy_http_server::operation::OperationShape for ListChangedBlocks {
  123         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  124         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         126  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ListChangedBlocks {
         127  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         128  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  125    129   
            "com.amazonaws.ebs#ListChangedBlocks",
  126    130   
            "com.amazonaws.ebs",
  127    131   
            "ListChangedBlocks",
  128    132   
        );
  129    133   
  130    134   
    type Input = crate::input::ListChangedBlocksInput;
  131    135   
    type Output = crate::output::ListChangedBlocksOutput;
  132    136   
    type Error = crate::error::ListChangedBlocksError;
  133    137   
}
  134    138   
  135         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ListChangedBlocks {
  136         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  137         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  138         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  139         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  140         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         139  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         140  +
    for ListChangedBlocks
         141  +
{
         142  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         143  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         144  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         145  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         146  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  141    147   
        >,
  142    148   
    >;
  143         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  144         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  145         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         149  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         150  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         151  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  146    152   
    >;
  147    153   
  148    154   
    fn request_fmt() -> Self::RequestFmt {
  149         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         155  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  150    156   
    }
  151    157   
  152    158   
    fn response_fmt() -> Self::ResponseFmt {
  153         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         159  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  154    160   
    }
  155    161   
}
  156    162   
  157    163   
/// <p>Returns the data in a block in an Amazon Elastic Block Store snapshot.</p>
  158    164   
pub struct GetSnapshotBlock;
  159    165   
  160         -
impl ::aws_smithy_http_server::operation::OperationShape for GetSnapshotBlock {
  161         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  162         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         166  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetSnapshotBlock {
         167  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         168  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  163    169   
            "com.amazonaws.ebs#GetSnapshotBlock",
  164    170   
            "com.amazonaws.ebs",
  165    171   
            "GetSnapshotBlock",
  166    172   
        );
  167    173   
  168    174   
    type Input = crate::input::GetSnapshotBlockInput;
  169    175   
    type Output = crate::output::GetSnapshotBlockOutput;
  170    176   
    type Error = crate::error::GetSnapshotBlockError;
  171    177   
}
  172    178   
  173         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetSnapshotBlock {
  174         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  175         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  176         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  177         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  178         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         179  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         180  +
    for GetSnapshotBlock
         181  +
{
         182  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         183  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         184  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         185  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         186  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  179    187   
        >,
  180    188   
    >;
  181         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  182         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  183         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         189  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         190  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         191  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  184    192   
    >;
  185    193   
  186    194   
    fn request_fmt() -> Self::RequestFmt {
  187         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         195  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  188    196   
    }
  189    197   
  190    198   
    fn response_fmt() -> Self::ResponseFmt {
  191         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         199  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  192    200   
    }
  193    201   
}
  194    202   
  195    203   
/// <p>Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to <code>completed</code>. You cannot write new blocks to a snapshot after it has been completed.</p>
  196    204   
pub struct CompleteSnapshot;
  197    205   
  198         -
impl ::aws_smithy_http_server::operation::OperationShape for CompleteSnapshot {
  199         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  200         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         206  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for CompleteSnapshot {
         207  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         208  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  201    209   
            "com.amazonaws.ebs#CompleteSnapshot",
  202    210   
            "com.amazonaws.ebs",
  203    211   
            "CompleteSnapshot",
  204    212   
        );
  205    213   
  206    214   
    type Input = crate::input::CompleteSnapshotInput;
  207    215   
    type Output = crate::output::CompleteSnapshotOutput;
  208    216   
    type Error = crate::error::CompleteSnapshotError;
  209    217   
}
  210    218   
  211         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CompleteSnapshot {
  212         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  213         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  214         -
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  215         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  216         -
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         219  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         220  +
    for CompleteSnapshot
         221  +
{
         222  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         223  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         224  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         225  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         226  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  217    227   
        >,
  218    228   
    >;
  219         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  220         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  221         -
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         229  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         230  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         231  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  222    232   
    >;
  223    233   
  224    234   
    fn request_fmt() -> Self::RequestFmt {
  225         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         235  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  226    236   
    }
  227    237   
  228    238   
    fn response_fmt() -> Self::ResponseFmt {
  229         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         239  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  230    240   
    }
  231    241   
}

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

@@ -1,1 +43,43 @@
    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_complete_snapshot_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::CompleteSnapshotInput,
    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::complete_snapshot_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_complete_snapshot_input::de_changed_blocks_count_header(
@@ -45,45 +281,281 @@
   65     65   
            crate::protocol_serde::shape_complete_snapshot_input::de_snapshot_id(m2)?,
   66     66   
        );
   67     67   
        input.build()?
   68     68   
    })
   69     69   
}
   70     70   
   71     71   
#[allow(clippy::unnecessary_wraps)]
   72     72   
pub fn ser_complete_snapshot_http_response(
   73     73   
    #[allow(unused_variables)] output: crate::output::CompleteSnapshotOutput,
   74     74   
) -> std::result::Result<
   75         -
    ::aws_smithy_http_server::response::Response,
   76         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          75  +
    ::aws_smithy_legacy_http_server::response::Response,
          76  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   77     77   
> {
   78     78   
    Ok({
   79     79   
        #[allow(unused_mut)]
   80     80   
        let mut builder = ::http::Response::builder();
   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_TYPE,
   84     84   
            "application/json",
   85     85   
        );
   86     86   
        let http_status: u16 = 202;
   87     87   
        builder = builder.status(http_status);
   88     88   
        let payload =
   89     89   
            crate::protocol_serde::shape_complete_snapshot_output::ser_complete_snapshot_output_output_output(&output)?
   90     90   
        ;
   91     91   
        let content_length = payload.len();
   92         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          92  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   93     93   
            builder,
   94     94   
            ::http::header::CONTENT_LENGTH,
   95     95   
            content_length,
   96     96   
        );
   97         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          97  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   98     98   
        builder.body(body)?
   99     99   
    })
  100    100   
}
  101    101   
  102    102   
#[allow(clippy::unnecessary_wraps)]
  103    103   
pub fn ser_complete_snapshot_http_error(
  104    104   
    error: &crate::error::CompleteSnapshotError,
  105    105   
) -> std::result::Result<
  106         -
    ::aws_smithy_http_server::response::Response,
  107         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         106  +
    ::aws_smithy_legacy_http_server::response::Response,
         107  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  108    108   
> {
  109    109   
    Ok({
  110    110   
        match error {
  111    111   
            crate::error::CompleteSnapshotError::InternalServerException(output) => {
  112    112   
                let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
  113    113   
                #[allow(unused_mut)]
  114    114   
                let mut builder = ::http::Response::builder();
  115         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         115  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  116    116   
                    builder,
  117    117   
                    ::http::header::CONTENT_TYPE,
  118    118   
                    "application/json",
  119    119   
                );
  120         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         120  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  121    121   
                    builder,
  122    122   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  123    123   
                    "InternalServerException",
  124    124   
                );
  125    125   
                let content_length = payload.len();
  126         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         126  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  127    127   
                    builder,
  128    128   
                    ::http::header::CONTENT_LENGTH,
  129    129   
                    content_length,
  130    130   
                );
  131    131   
                builder
  132    132   
                    .status(500)
  133         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         133  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  134    134   
            }
  135    135   
            crate::error::CompleteSnapshotError::ResourceNotFoundException(output) => {
  136    136   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
  137    137   
                #[allow(unused_mut)]
  138    138   
                let mut builder = ::http::Response::builder();
  139         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         139  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  140    140   
                    builder,
  141    141   
                    ::http::header::CONTENT_TYPE,
  142    142   
                    "application/json",
  143    143   
                );
  144         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         144  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  145    145   
                    builder,
  146    146   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  147    147   
                    "ResourceNotFoundException",
  148    148   
                );
  149    149   
                let content_length = payload.len();
  150         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         150  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  151    151   
                    builder,
  152    152   
                    ::http::header::CONTENT_LENGTH,
  153    153   
                    content_length,
  154    154   
                );
  155    155   
                builder
  156    156   
                    .status(404)
  157         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         157  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  158    158   
            }
  159    159   
            crate::error::CompleteSnapshotError::AccessDeniedException(output) => {
  160    160   
                let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
  161    161   
                #[allow(unused_mut)]
  162    162   
                let mut builder = ::http::Response::builder();
  163         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         163  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  164    164   
                    builder,
  165    165   
                    ::http::header::CONTENT_TYPE,
  166    166   
                    "application/json",
  167    167   
                );
  168         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         168  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  169    169   
                    builder,
  170    170   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  171    171   
                    "AccessDeniedException",
  172    172   
                );
  173    173   
                let content_length = payload.len();
  174         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         174  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  175    175   
                    builder,
  176    176   
                    ::http::header::CONTENT_LENGTH,
  177    177   
                    content_length,
  178    178   
                );
  179    179   
                builder
  180    180   
                    .status(403)
  181         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         181  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  182    182   
            }
  183    183   
            crate::error::CompleteSnapshotError::RequestThrottledException(output) => {
  184    184   
                let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
  185    185   
                #[allow(unused_mut)]
  186    186   
                let mut builder = ::http::Response::builder();
  187         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         187  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  188    188   
                    builder,
  189    189   
                    ::http::header::CONTENT_TYPE,
  190    190   
                    "application/json",
  191    191   
                );
  192         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         192  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  193    193   
                    builder,
  194    194   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  195    195   
                    "RequestThrottledException",
  196    196   
                );
  197    197   
                let content_length = payload.len();
  198         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         198  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  199    199   
                    builder,
  200    200   
                    ::http::header::CONTENT_LENGTH,
  201    201   
                    content_length,
  202    202   
                );
  203    203   
                builder
  204    204   
                    .status(400)
  205         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         205  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  206    206   
            }
  207    207   
            crate::error::CompleteSnapshotError::ServiceQuotaExceededException(output) => {
  208    208   
                let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
  209    209   
                #[allow(unused_mut)]
  210    210   
                let mut builder = ::http::Response::builder();
  211         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         211  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  212    212   
                    builder,
  213    213   
                    ::http::header::CONTENT_TYPE,
  214    214   
                    "application/json",
  215    215   
                );
  216         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         216  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  217    217   
                    builder,
  218    218   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  219    219   
                    "ServiceQuotaExceededException",
  220    220   
                );
  221    221   
                let content_length = payload.len();
  222         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         222  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  223    223   
                    builder,
  224    224   
                    ::http::header::CONTENT_LENGTH,
  225    225   
                    content_length,
  226    226   
                );
  227    227   
                builder
  228    228   
                    .status(402)
  229         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         229  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  230    230   
            }
  231    231   
            crate::error::CompleteSnapshotError::ValidationException(output) => {
  232    232   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  233    233   
                #[allow(unused_mut)]
  234    234   
                let mut builder = ::http::Response::builder();
  235         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         235  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  236    236   
                    builder,
  237    237   
                    ::http::header::CONTENT_TYPE,
  238    238   
                    "application/json",
  239    239   
                );
  240         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         240  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  241    241   
                    builder,
  242    242   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  243    243   
                    "ValidationException",
  244    244   
                );
  245    245   
                let content_length = payload.len();
  246         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         246  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  247    247   
                    builder,
  248    248   
                    ::http::header::CONTENT_LENGTH,
  249    249   
                    content_length,
  250    250   
                );
  251    251   
                builder
  252    252   
                    .status(400)
  253         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         253  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  254    254   
            }
  255    255   
            crate::error::CompleteSnapshotError::InternalServerError(output) => {
  256    256   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  257    257   
                #[allow(unused_mut)]
  258    258   
                let mut builder = ::http::Response::builder();
  259         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         259  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  260    260   
                    builder,
  261    261   
                    ::http::header::CONTENT_TYPE,
  262    262   
                    "application/json",
  263    263   
                );
  264         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         264  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  265    265   
                    builder,
  266    266   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  267    267   
                    "InternalServerError",
  268    268   
                );
  269    269   
                let content_length = payload.len();
  270         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         270  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  271    271   
                    builder,
  272    272   
                    ::http::header::CONTENT_LENGTH,
  273    273   
                    content_length,
  274    274   
                );
  275    275   
                builder
  276    276   
                    .status(500)
  277         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         277  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  278    278   
            }
  279    279   
        }
  280    280   
    })
  281    281   
}

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

@@ -1,1 +58,59 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_changed_blocks_count_header(
    3      3   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4         -
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_http::header::ParseError> {
           4  +
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_legacy_http::header::ParseError>
           5  +
{
    5      6   
    let headers = header_map.get_all("x-amz-ChangedBlocksCount");
    6         -
    let var_1 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
           7  +
    let var_1 = ::aws_smithy_legacy_http::header::read_many_primitive::<i32>(headers)?;
    7      8   
    if var_1.len() > 1 {
    8         -
        Err(::aws_smithy_http::header::ParseError::new(format!(
           9  +
        Err(::aws_smithy_legacy_http::header::ParseError::new(format!(
    9     10   
            "expected one item but found {}",
   10     11   
            var_1.len()
   11     12   
        )))
   12     13   
    } else {
   13     14   
        let mut var_1 = var_1;
   14     15   
        Ok(var_1.pop())
   15     16   
    }
   16     17   
}
   17     18   
   18     19   
pub(crate) fn de_checksum_header(
   19     20   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   20     21   
) -> ::std::result::Result<
   21     22   
    ::std::option::Option<::std::string::String>,
   22         -
    ::aws_smithy_http::header::ParseError,
          23  +
    ::aws_smithy_legacy_http::header::ParseError,
   23     24   
> {
   24     25   
    let headers = header_map.get_all("x-amz-Checksum");
   25         -
    ::aws_smithy_http::header::one_or_none(headers)
          26  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   26     27   
}
   27     28   
   28     29   
pub(crate) fn de_checksum_aggregation_method_header(
   29     30   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   30     31   
) -> ::std::result::Result<
   31     32   
    ::std::option::Option<::std::string::String>,
   32         -
    ::aws_smithy_http::header::ParseError,
          33  +
    ::aws_smithy_legacy_http::header::ParseError,
   33     34   
> {
   34     35   
    let headers = header_map.get_all("x-amz-Checksum-Aggregation-Method");
   35         -
    ::aws_smithy_http::header::one_or_none(headers)
          36  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   36     37   
}
   37     38   
   38     39   
pub(crate) fn de_checksum_algorithm_header(
   39     40   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   40     41   
) -> ::std::result::Result<
   41     42   
    ::std::option::Option<::std::string::String>,
   42         -
    ::aws_smithy_http::header::ParseError,
          43  +
    ::aws_smithy_legacy_http::header::ParseError,
   43     44   
> {
   44     45   
    let headers = header_map.get_all("x-amz-Checksum-Algorithm");
   45         -
    ::aws_smithy_http::header::one_or_none(headers)
          46  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   46     47   
}
   47     48   
   48     49   
pub fn de_snapshot_id(
   49     50   
    value: &str,
   50     51   
) -> std::result::Result<
   51     52   
    ::std::string::String,
   52         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          53  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   53     54   
> {
   54     55   
    let value = ::percent_encoding::percent_decode_str(value)
   55     56   
        .decode_utf8()?
   56     57   
        .into_owned();
   57     58   
    Ok(value)
   58     59   
}

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

@@ -1,1 +302,302 @@
    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_snapshot_block_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GetSnapshotBlockInput,
    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_snapshot_block_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, _, m3)) =
   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>>("snapshots"),
   28     28   
                ),
   29     29   
                ::nom::sequence::preceded(
   30     30   
                    ::nom::bytes::complete::tag("/"),
   31     31   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   32     32   
                        ::nom::bytes::complete::take_until("/"),
   33     33   
                        ::nom::combinator::rest,
   34     34   
                    )),
   35     35   
                ),
   36     36   
                ::nom::sequence::preceded(
   37     37   
                    ::nom::bytes::complete::tag("/"),
   38     38   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("blocks"),
   39     39   
                ),
   40     40   
                ::nom::sequence::preceded(
   41     41   
                    ::nom::bytes::complete::tag("/"),
   42     42   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   43     43   
                        ::nom::bytes::complete::take_until("/"),
   44     44   
                        ::nom::combinator::rest,
   45     45   
                    )),
   46     46   
                ),
   47     47   
            ))(input_string)?;
   48     48   
        debug_assert_eq!("", input_string);
   49     49   
        input = input.set_snapshot_id(
   50     50   
            crate::protocol_serde::shape_get_snapshot_block_input::de_snapshot_id(m1)?,
   51     51   
        );
   52     52   
        input = input.set_block_index(
   53     53   
            crate::protocol_serde::shape_get_snapshot_block_input::de_block_index(m3)?,
   54     54   
        );
   55     55   
        let query_string = uri.query().unwrap_or("");
   56     56   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
   57     57   
        let mut block_token_seen = false;
   58     58   
        for (k, v) in pairs {
   59     59   
            if !block_token_seen && k == "blockToken" {
   60     60   
                input = input.set_block_token(
   61     61   
                    crate::protocol_serde::shape_get_snapshot_block_input::de_block_token(&v)?,
   62     62   
                );
   63     63   
                block_token_seen = true;
   64     64   
            }
   65     65   
        }
   66     66   
        input.build()?
   67     67   
    })
   68     68   
}
   69     69   
   70     70   
#[allow(clippy::unnecessary_wraps)]
   71     71   
pub fn ser_get_snapshot_block_http_response(
   72     72   
    #[allow(unused_variables)] output: crate::output::GetSnapshotBlockOutput,
   73     73   
) -> std::result::Result<
   74         -
    ::aws_smithy_http_server::response::Response,
   75         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          74  +
    ::aws_smithy_legacy_http_server::response::Response,
          75  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   76     76   
> {
   77     77   
    Ok({
   78     78   
        #[allow(unused_mut)]
   79     79   
        let mut builder = ::http::Response::builder();
   80     80   
        builder = crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_headers(
   81     81   
            &output, builder,
   82     82   
        )?;
   83         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
            builder,
   85     85   
            ::http::header::CONTENT_TYPE,
   86     86   
            "application/octet-stream",
   87     87   
        );
   88     88   
        let http_status: u16 = 200;
   89     89   
        builder = builder.status(http_status);
   90         -
        let body = ::aws_smithy_http_server::body::boxed(::aws_smithy_http_server::body::Body::wrap_stream(
          90  +
        let body = ::aws_smithy_legacy_http_server::body::boxed(::aws_smithy_legacy_http_server::body::Body::wrap_stream(
   91     91   
            crate::protocol_serde::shape_get_snapshot_block_output::ser_block_data_http_payload( output.block_data)?
   92     92   
        ));
   93     93   
        builder.body(body)?
   94     94   
    })
   95     95   
}
   96     96   
   97     97   
#[allow(clippy::unnecessary_wraps)]
   98     98   
pub fn ser_get_snapshot_block_http_error(
   99     99   
    error: &crate::error::GetSnapshotBlockError,
  100    100   
) -> std::result::Result<
  101         -
    ::aws_smithy_http_server::response::Response,
  102         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         101  +
    ::aws_smithy_legacy_http_server::response::Response,
         102  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  103    103   
> {
  104    104   
    Ok({
  105    105   
        match error {
  106    106   
            crate::error::GetSnapshotBlockError::InternalServerException(output) => {
  107    107   
                let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
  108    108   
                #[allow(unused_mut)]
  109    109   
                let mut builder = ::http::Response::builder();
  110         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         110  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  111    111   
                    builder,
  112    112   
                    ::http::header::CONTENT_TYPE,
  113    113   
                    "application/octet-stream",
  114    114   
                );
  115         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         115  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  116    116   
                    builder,
  117    117   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  118    118   
                    "InternalServerException",
  119    119   
                );
  120    120   
                let content_length = payload.len();
  121         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         121  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  122    122   
                    builder,
  123    123   
                    ::http::header::CONTENT_LENGTH,
  124    124   
                    content_length,
  125    125   
                );
  126    126   
                builder
  127    127   
                    .status(500)
  128         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         128  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  129    129   
            }
  130    130   
            crate::error::GetSnapshotBlockError::ResourceNotFoundException(output) => {
  131    131   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
  132    132   
                #[allow(unused_mut)]
  133    133   
                let mut builder = ::http::Response::builder();
  134         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         134  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  135    135   
                    builder,
  136    136   
                    ::http::header::CONTENT_TYPE,
  137    137   
                    "application/octet-stream",
  138    138   
                );
  139         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         139  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  140    140   
                    builder,
  141    141   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  142    142   
                    "ResourceNotFoundException",
  143    143   
                );
  144    144   
                let content_length = payload.len();
  145         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         145  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  146    146   
                    builder,
  147    147   
                    ::http::header::CONTENT_LENGTH,
  148    148   
                    content_length,
  149    149   
                );
  150    150   
                builder
  151    151   
                    .status(404)
  152         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         152  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  153    153   
            }
  154    154   
            crate::error::GetSnapshotBlockError::AccessDeniedException(output) => {
  155    155   
                let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
  156    156   
                #[allow(unused_mut)]
  157    157   
                let mut builder = ::http::Response::builder();
  158         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         158  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  159    159   
                    builder,
  160    160   
                    ::http::header::CONTENT_TYPE,
  161    161   
                    "application/octet-stream",
  162    162   
                );
  163         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         163  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  164    164   
                    builder,
  165    165   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  166    166   
                    "AccessDeniedException",
  167    167   
                );
  168    168   
                let content_length = payload.len();
  169         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         169  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  170    170   
                    builder,
  171    171   
                    ::http::header::CONTENT_LENGTH,
  172    172   
                    content_length,
  173    173   
                );
  174    174   
                builder
  175    175   
                    .status(403)
  176         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         176  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  177    177   
            }
  178    178   
            crate::error::GetSnapshotBlockError::RequestThrottledException(output) => {
  179    179   
                let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
  180    180   
                #[allow(unused_mut)]
  181    181   
                let mut builder = ::http::Response::builder();
  182         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         182  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  183    183   
                    builder,
  184    184   
                    ::http::header::CONTENT_TYPE,
  185    185   
                    "application/octet-stream",
  186    186   
                );
  187         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         187  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  188    188   
                    builder,
  189    189   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  190    190   
                    "RequestThrottledException",
  191    191   
                );
  192    192   
                let content_length = payload.len();
  193         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         193  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  194    194   
                    builder,
  195    195   
                    ::http::header::CONTENT_LENGTH,
  196    196   
                    content_length,
  197    197   
                );
  198    198   
                builder
  199    199   
                    .status(400)
  200         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         200  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  201    201   
            }
  202    202   
            crate::error::GetSnapshotBlockError::ServiceQuotaExceededException(output) => {
  203    203   
                let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
  204    204   
                #[allow(unused_mut)]
  205    205   
                let mut builder = ::http::Response::builder();
  206         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         206  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  207    207   
                    builder,
  208    208   
                    ::http::header::CONTENT_TYPE,
  209    209   
                    "application/octet-stream",
  210    210   
                );
  211         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         211  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  212    212   
                    builder,
  213    213   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  214    214   
                    "ServiceQuotaExceededException",
  215    215   
                );
  216    216   
                let content_length = payload.len();
  217         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         217  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  218    218   
                    builder,
  219    219   
                    ::http::header::CONTENT_LENGTH,
  220    220   
                    content_length,
  221    221   
                );
  222    222   
                builder
  223    223   
                    .status(402)
  224         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         224  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  225    225   
            }
  226    226   
            crate::error::GetSnapshotBlockError::ValidationException(output) => {
  227    227   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  228    228   
                #[allow(unused_mut)]
  229    229   
                let mut builder = ::http::Response::builder();
  230         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         230  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  231    231   
                    builder,
  232    232   
                    ::http::header::CONTENT_TYPE,
  233    233   
                    "application/octet-stream",
  234    234   
                );
  235         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         235  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  236    236   
                    builder,
  237    237   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  238    238   
                    "ValidationException",
  239    239   
                );
  240    240   
                let content_length = payload.len();
  241         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         241  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  242    242   
                    builder,
  243    243   
                    ::http::header::CONTENT_LENGTH,
  244    244   
                    content_length,
  245    245   
                );
  246    246   
                builder
  247    247   
                    .status(400)
  248         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         248  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  249    249   
            }
  250    250   
            crate::error::GetSnapshotBlockError::InternalServerError(output) => {
  251    251   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  252    252   
                #[allow(unused_mut)]
  253    253   
                let mut builder = ::http::Response::builder();
  254         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         254  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  255    255   
                    builder,
  256    256   
                    ::http::header::CONTENT_TYPE,
  257    257   
                    "application/octet-stream",
  258    258   
                );
  259         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         259  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  260    260   
                    builder,
  261    261   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  262    262   
                    "InternalServerError",
  263    263   
                );
  264    264   
                let content_length = payload.len();
  265         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         265  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  266    266   
                    builder,
  267    267   
                    ::http::header::CONTENT_LENGTH,
  268    268   
                    content_length,
  269    269   
                );
  270    270   
                builder
  271    271   
                    .status(500)
  272         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         272  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  273    273   
            }
  274    274   
        }
  275    275   
    })
  276    276   
}
  277    277   
  278    278   
pub fn ser_get_snapshot_block_headers(
  279    279   
    input: &crate::output::GetSnapshotBlockOutput,
  280    280   
    mut builder: ::http::response::Builder,
  281    281   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
  282    282   
{

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

@@ -1,1 +32,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn de_snapshot_id(
    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   
}
   13     13   
   14     14   
pub fn de_block_index(
   15     15   
    value: &str,
   16     16   
) -> std::result::Result<
   17     17   
    i32,
   18         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          18  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   19     19   
> {
   20     20   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   21     21   
    Ok(value)
   22     22   
}
   23     23   
   24     24   
pub fn de_block_token(
   25     25   
    value: &str,
   26     26   
) -> std::result::Result<
   27     27   
    ::std::string::String,
   28         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          28  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   29     29   
> {
   30     30   
    let value = value.to_owned();
   31     31   
    Ok(value)
   32     32   
}

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

@@ -1,1 +43,43 @@
    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_list_changed_blocks_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ListChangedBlocksInput,
    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::list_changed_blocks_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, _)) =
@@ -57,57 +293,293 @@
   77     77   
            }
   78     78   
        }
   79     79   
        input.build()?
   80     80   
    })
   81     81   
}
   82     82   
   83     83   
#[allow(clippy::unnecessary_wraps)]
   84     84   
pub fn ser_list_changed_blocks_http_response(
   85     85   
    #[allow(unused_variables)] output: crate::output::ListChangedBlocksOutput,
   86     86   
) -> std::result::Result<
   87         -
    ::aws_smithy_http_server::response::Response,
   88         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          87  +
    ::aws_smithy_legacy_http_server::response::Response,
          88  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   89     89   
> {
   90     90   
    Ok({
   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     98   
        let http_status: u16 = 200;
   99     99   
        builder = builder.status(http_status);
  100    100   
        let payload =
  101    101   
            crate::protocol_serde::shape_list_changed_blocks_output::ser_list_changed_blocks_output_output_output(&output)?
  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         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         109  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
  110    110   
        builder.body(body)?
  111    111   
    })
  112    112   
}
  113    113   
  114    114   
#[allow(clippy::unnecessary_wraps)]
  115    115   
pub fn ser_list_changed_blocks_http_error(
  116    116   
    error: &crate::error::ListChangedBlocksError,
  117    117   
) -> std::result::Result<
  118         -
    ::aws_smithy_http_server::response::Response,
  119         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         118  +
    ::aws_smithy_legacy_http_server::response::Response,
         119  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  120    120   
> {
  121    121   
    Ok({
  122    122   
        match error {
  123    123   
            crate::error::ListChangedBlocksError::InternalServerException(output) => {
  124    124   
                let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
  125    125   
                #[allow(unused_mut)]
  126    126   
                let mut builder = ::http::Response::builder();
  127         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         127  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  128    128   
                    builder,
  129    129   
                    ::http::header::CONTENT_TYPE,
  130    130   
                    "application/json",
  131    131   
                );
  132         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         132  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  133    133   
                    builder,
  134    134   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  135    135   
                    "InternalServerException",
  136    136   
                );
  137    137   
                let content_length = payload.len();
  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_LENGTH,
  141    141   
                    content_length,
  142    142   
                );
  143    143   
                builder
  144    144   
                    .status(500)
  145         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         145  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  146    146   
            }
  147    147   
            crate::error::ListChangedBlocksError::ResourceNotFoundException(output) => {
  148    148   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
  149    149   
                #[allow(unused_mut)]
  150    150   
                let mut builder = ::http::Response::builder();
  151         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         151  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  152    152   
                    builder,
  153    153   
                    ::http::header::CONTENT_TYPE,
  154    154   
                    "application/json",
  155    155   
                );
  156         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         156  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  157    157   
                    builder,
  158    158   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  159    159   
                    "ResourceNotFoundException",
  160    160   
                );
  161    161   
                let content_length = payload.len();
  162         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         162  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  163    163   
                    builder,
  164    164   
                    ::http::header::CONTENT_LENGTH,
  165    165   
                    content_length,
  166    166   
                );
  167    167   
                builder
  168    168   
                    .status(404)
  169         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         169  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  170    170   
            }
  171    171   
            crate::error::ListChangedBlocksError::AccessDeniedException(output) => {
  172    172   
                let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
  173    173   
                #[allow(unused_mut)]
  174    174   
                let mut builder = ::http::Response::builder();
  175         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         175  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  176    176   
                    builder,
  177    177   
                    ::http::header::CONTENT_TYPE,
  178    178   
                    "application/json",
  179    179   
                );
  180         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         180  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  181    181   
                    builder,
  182    182   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  183    183   
                    "AccessDeniedException",
  184    184   
                );
  185    185   
                let content_length = payload.len();
  186         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         186  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  187    187   
                    builder,
  188    188   
                    ::http::header::CONTENT_LENGTH,
  189    189   
                    content_length,
  190    190   
                );
  191    191   
                builder
  192    192   
                    .status(403)
  193         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         193  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  194    194   
            }
  195    195   
            crate::error::ListChangedBlocksError::RequestThrottledException(output) => {
  196    196   
                let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
  197    197   
                #[allow(unused_mut)]
  198    198   
                let mut builder = ::http::Response::builder();
  199         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         199  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  200    200   
                    builder,
  201    201   
                    ::http::header::CONTENT_TYPE,
  202    202   
                    "application/json",
  203    203   
                );
  204         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         204  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  205    205   
                    builder,
  206    206   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  207    207   
                    "RequestThrottledException",
  208    208   
                );
  209    209   
                let content_length = payload.len();
  210         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         210  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  211    211   
                    builder,
  212    212   
                    ::http::header::CONTENT_LENGTH,
  213    213   
                    content_length,
  214    214   
                );
  215    215   
                builder
  216    216   
                    .status(400)
  217         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         217  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  218    218   
            }
  219    219   
            crate::error::ListChangedBlocksError::ServiceQuotaExceededException(output) => {
  220    220   
                let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
  221    221   
                #[allow(unused_mut)]
  222    222   
                let mut builder = ::http::Response::builder();
  223         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         223  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  224    224   
                    builder,
  225    225   
                    ::http::header::CONTENT_TYPE,
  226    226   
                    "application/json",
  227    227   
                );
  228         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         228  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  229    229   
                    builder,
  230    230   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  231    231   
                    "ServiceQuotaExceededException",
  232    232   
                );
  233    233   
                let content_length = payload.len();
  234         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         234  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  235    235   
                    builder,
  236    236   
                    ::http::header::CONTENT_LENGTH,
  237    237   
                    content_length,
  238    238   
                );
  239    239   
                builder
  240    240   
                    .status(402)
  241         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         241  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  242    242   
            }
  243    243   
            crate::error::ListChangedBlocksError::ValidationException(output) => {
  244    244   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  245    245   
                #[allow(unused_mut)]
  246    246   
                let mut builder = ::http::Response::builder();
  247         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         247  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  248    248   
                    builder,
  249    249   
                    ::http::header::CONTENT_TYPE,
  250    250   
                    "application/json",
  251    251   
                );
  252         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         252  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  253    253   
                    builder,
  254    254   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  255    255   
                    "ValidationException",
  256    256   
                );
  257    257   
                let content_length = payload.len();
  258         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         258  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  259    259   
                    builder,
  260    260   
                    ::http::header::CONTENT_LENGTH,
  261    261   
                    content_length,
  262    262   
                );
  263    263   
                builder
  264    264   
                    .status(400)
  265         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         265  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  266    266   
            }
  267    267   
            crate::error::ListChangedBlocksError::InternalServerError(output) => {
  268    268   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  269    269   
                #[allow(unused_mut)]
  270    270   
                let mut builder = ::http::Response::builder();
  271         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         271  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  272    272   
                    builder,
  273    273   
                    ::http::header::CONTENT_TYPE,
  274    274   
                    "application/json",
  275    275   
                );
  276         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         276  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  277    277   
                    builder,
  278    278   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  279    279   
                    "InternalServerError",
  280    280   
                );
  281    281   
                let content_length = payload.len();
  282         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         282  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  283    283   
                    builder,
  284    284   
                    ::http::header::CONTENT_LENGTH,
  285    285   
                    content_length,
  286    286   
                );
  287    287   
                builder
  288    288   
                    .status(500)
  289         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         289  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  290    290   
            }
  291    291   
        }
  292    292   
    })
  293    293   
}

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

@@ -1,1 +52,52 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn de_second_snapshot_id(
    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   
}
   13     13   
   14     14   
pub fn de_first_snapshot_id(
   15     15   
    value: &str,
   16     16   
) -> std::result::Result<
   17     17   
    ::std::option::Option<::std::string::String>,
   18         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          18  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   19     19   
> {
   20     20   
    let value = value.to_owned();
   21     21   
    Ok(Some(value))
   22     22   
}
   23     23   
   24     24   
pub fn de_max_results(
   25     25   
    value: &str,
   26     26   
) -> std::result::Result<
   27     27   
    ::std::option::Option<i32>,
   28         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          28  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   29     29   
> {
   30     30   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   31     31   
    Ok(Some(value))
   32     32   
}
   33     33   
   34     34   
pub fn de_next_token(
   35     35   
    value: &str,
   36     36   
) -> std::result::Result<
   37     37   
    ::std::option::Option<::std::string::String>,
   38         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          38  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   39     39   
> {
   40     40   
    let value = value.to_owned();
   41     41   
    Ok(Some(value))
   42     42   
}
   43     43   
   44     44   
pub fn de_starting_block_index(
   45     45   
    value: &str,
   46     46   
) -> std::result::Result<
   47     47   
    ::std::option::Option<i32>,
   48         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          48  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   49     49   
> {
   50     50   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   51     51   
    Ok(Some(value))
   52     52   
}

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

@@ -1,1 +43,43 @@
    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_list_snapshot_blocks_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ListSnapshotBlocksInput,
    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::list_snapshot_blocks_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, _)) =
@@ -48,48 +284,284 @@
   68     68   
            }
   69     69   
        }
   70     70   
        input.build()?
   71     71   
    })
   72     72   
}
   73     73   
   74     74   
#[allow(clippy::unnecessary_wraps)]
   75     75   
pub fn ser_list_snapshot_blocks_http_response(
   76     76   
    #[allow(unused_variables)] output: crate::output::ListSnapshotBlocksOutput,
   77     77   
) -> std::result::Result<
   78         -
    ::aws_smithy_http_server::response::Response,
   79         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          78  +
    ::aws_smithy_legacy_http_server::response::Response,
          79  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   80     80   
> {
   81     81   
    Ok({
   82     82   
        #[allow(unused_mut)]
   83     83   
        let mut builder = ::http::Response::builder();
   84         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          84  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   85     85   
            builder,
   86     86   
            ::http::header::CONTENT_TYPE,
   87     87   
            "application/json",
   88     88   
        );
   89     89   
        let http_status: u16 = 200;
   90     90   
        builder = builder.status(http_status);
   91     91   
        let payload =
   92     92   
            crate::protocol_serde::shape_list_snapshot_blocks_output::ser_list_snapshot_blocks_output_output_output(&output)?
   93     93   
        ;
   94     94   
        let content_length = payload.len();
   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::CONTENT_LENGTH,
   98     98   
            content_length,
   99     99   
        );
  100         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         100  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
  101    101   
        builder.body(body)?
  102    102   
    })
  103    103   
}
  104    104   
  105    105   
#[allow(clippy::unnecessary_wraps)]
  106    106   
pub fn ser_list_snapshot_blocks_http_error(
  107    107   
    error: &crate::error::ListSnapshotBlocksError,
  108    108   
) -> std::result::Result<
  109         -
    ::aws_smithy_http_server::response::Response,
  110         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         109  +
    ::aws_smithy_legacy_http_server::response::Response,
         110  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  111    111   
> {
  112    112   
    Ok({
  113    113   
        match error {
  114    114   
            crate::error::ListSnapshotBlocksError::InternalServerException(output) => {
  115    115   
                let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
  116    116   
                #[allow(unused_mut)]
  117    117   
                let mut builder = ::http::Response::builder();
  118         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         118  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  119    119   
                    builder,
  120    120   
                    ::http::header::CONTENT_TYPE,
  121    121   
                    "application/json",
  122    122   
                );
  123         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         123  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  124    124   
                    builder,
  125    125   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  126    126   
                    "InternalServerException",
  127    127   
                );
  128    128   
                let content_length = payload.len();
  129         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         129  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  130    130   
                    builder,
  131    131   
                    ::http::header::CONTENT_LENGTH,
  132    132   
                    content_length,
  133    133   
                );
  134    134   
                builder
  135    135   
                    .status(500)
  136         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         136  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  137    137   
            }
  138    138   
            crate::error::ListSnapshotBlocksError::ResourceNotFoundException(output) => {
  139    139   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
  140    140   
                #[allow(unused_mut)]
  141    141   
                let mut builder = ::http::Response::builder();
  142         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         142  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  143    143   
                    builder,
  144    144   
                    ::http::header::CONTENT_TYPE,
  145    145   
                    "application/json",
  146    146   
                );
  147         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         147  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  148    148   
                    builder,
  149    149   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  150    150   
                    "ResourceNotFoundException",
  151    151   
                );
  152    152   
                let content_length = payload.len();
  153         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         153  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  154    154   
                    builder,
  155    155   
                    ::http::header::CONTENT_LENGTH,
  156    156   
                    content_length,
  157    157   
                );
  158    158   
                builder
  159    159   
                    .status(404)
  160         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         160  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  161    161   
            }
  162    162   
            crate::error::ListSnapshotBlocksError::AccessDeniedException(output) => {
  163    163   
                let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
  164    164   
                #[allow(unused_mut)]
  165    165   
                let mut builder = ::http::Response::builder();
  166         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         166  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  167    167   
                    builder,
  168    168   
                    ::http::header::CONTENT_TYPE,
  169    169   
                    "application/json",
  170    170   
                );
  171         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         171  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  172    172   
                    builder,
  173    173   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  174    174   
                    "AccessDeniedException",
  175    175   
                );
  176    176   
                let content_length = payload.len();
  177         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         177  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  178    178   
                    builder,
  179    179   
                    ::http::header::CONTENT_LENGTH,
  180    180   
                    content_length,
  181    181   
                );
  182    182   
                builder
  183    183   
                    .status(403)
  184         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         184  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  185    185   
            }
  186    186   
            crate::error::ListSnapshotBlocksError::RequestThrottledException(output) => {
  187    187   
                let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
  188    188   
                #[allow(unused_mut)]
  189    189   
                let mut builder = ::http::Response::builder();
  190         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         190  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  191    191   
                    builder,
  192    192   
                    ::http::header::CONTENT_TYPE,
  193    193   
                    "application/json",
  194    194   
                );
  195         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         195  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  196    196   
                    builder,
  197    197   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  198    198   
                    "RequestThrottledException",
  199    199   
                );
  200    200   
                let content_length = payload.len();
  201         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         201  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  202    202   
                    builder,
  203    203   
                    ::http::header::CONTENT_LENGTH,
  204    204   
                    content_length,
  205    205   
                );
  206    206   
                builder
  207    207   
                    .status(400)
  208         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         208  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  209    209   
            }
  210    210   
            crate::error::ListSnapshotBlocksError::ServiceQuotaExceededException(output) => {
  211    211   
                let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
  212    212   
                #[allow(unused_mut)]
  213    213   
                let mut builder = ::http::Response::builder();
  214         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         214  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  215    215   
                    builder,
  216    216   
                    ::http::header::CONTENT_TYPE,
  217    217   
                    "application/json",
  218    218   
                );
  219         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         219  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  220    220   
                    builder,
  221    221   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  222    222   
                    "ServiceQuotaExceededException",
  223    223   
                );
  224    224   
                let content_length = payload.len();
  225         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         225  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  226    226   
                    builder,
  227    227   
                    ::http::header::CONTENT_LENGTH,
  228    228   
                    content_length,
  229    229   
                );
  230    230   
                builder
  231    231   
                    .status(402)
  232         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         232  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  233    233   
            }
  234    234   
            crate::error::ListSnapshotBlocksError::ValidationException(output) => {
  235    235   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  236    236   
                #[allow(unused_mut)]
  237    237   
                let mut builder = ::http::Response::builder();
  238         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         238  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  239    239   
                    builder,
  240    240   
                    ::http::header::CONTENT_TYPE,
  241    241   
                    "application/json",
  242    242   
                );
  243         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         243  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  244    244   
                    builder,
  245    245   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  246    246   
                    "ValidationException",
  247    247   
                );
  248    248   
                let content_length = payload.len();
  249         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         249  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  250    250   
                    builder,
  251    251   
                    ::http::header::CONTENT_LENGTH,
  252    252   
                    content_length,
  253    253   
                );
  254    254   
                builder
  255    255   
                    .status(400)
  256         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         256  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  257    257   
            }
  258    258   
            crate::error::ListSnapshotBlocksError::InternalServerError(output) => {
  259    259   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  260    260   
                #[allow(unused_mut)]
  261    261   
                let mut builder = ::http::Response::builder();
  262         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         262  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  263    263   
                    builder,
  264    264   
                    ::http::header::CONTENT_TYPE,
  265    265   
                    "application/json",
  266    266   
                );
  267         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         267  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  268    268   
                    builder,
  269    269   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  270    270   
                    "InternalServerError",
  271    271   
                );
  272    272   
                let content_length = payload.len();
  273         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         273  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  274    274   
                    builder,
  275    275   
                    ::http::header::CONTENT_LENGTH,
  276    276   
                    content_length,
  277    277   
                );
  278    278   
                builder
  279    279   
                    .status(500)
  280         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         280  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  281    281   
            }
  282    282   
        }
  283    283   
    })
  284    284   
}

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

@@ -1,1 +42,42 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub fn de_snapshot_id(
    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   
}
   13     13   
   14     14   
pub fn de_max_results(
   15     15   
    value: &str,
   16     16   
) -> std::result::Result<
   17     17   
    ::std::option::Option<i32>,
   18         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          18  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   19     19   
> {
   20     20   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   21     21   
    Ok(Some(value))
   22     22   
}
   23     23   
   24     24   
pub fn de_next_token(
   25     25   
    value: &str,
   26     26   
) -> std::result::Result<
   27     27   
    ::std::option::Option<::std::string::String>,
   28         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          28  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   29     29   
> {
   30     30   
    let value = value.to_owned();
   31     31   
    Ok(Some(value))
   32     32   
}
   33     33   
   34     34   
pub fn de_starting_block_index(
   35     35   
    value: &str,
   36     36   
) -> std::result::Result<
   37     37   
    ::std::option::Option<i32>,
   38         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          38  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   39     39   
> {
   40     40   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   41     41   
    Ok(Some(value))
   42     42   
}

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

@@ -1,1 +44,44 @@
    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_put_snapshot_block_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::PutSnapshotBlockInput,
    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: Into<::aws_smithy_types::byte_stream::ByteStream>,
   12     12   
    B::Data: Send,
   13         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   14         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          13  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          14  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   15     15   
{
   16     16   
    Ok({
   17     17   
        #[allow(unused_mut)]
   18     18   
        let mut input = crate::input::put_snapshot_block_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        if let Some(value) = {
   24     24   
            Some(
@@ -65,65 +330,330 @@
   85     85   
            crate::protocol_serde::shape_put_snapshot_block_input::de_block_index(m3)?,
   86     86   
        );
   87     87   
        input.build()?
   88     88   
    })
   89     89   
}
   90     90   
   91     91   
#[allow(clippy::unnecessary_wraps)]
   92     92   
pub fn ser_put_snapshot_block_http_response(
   93     93   
    #[allow(unused_variables)] output: crate::output::PutSnapshotBlockOutput,
   94     94   
) -> std::result::Result<
   95         -
    ::aws_smithy_http_server::response::Response,
   96         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          95  +
    ::aws_smithy_legacy_http_server::response::Response,
          96  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   97     97   
> {
   98     98   
    Ok({
   99     99   
        #[allow(unused_mut)]
  100    100   
        let mut builder = ::http::Response::builder();
  101    101   
        builder = crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_headers(
  102    102   
            &output, builder,
  103    103   
        )?;
  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_TYPE,
  107    107   
            "application/json",
  108    108   
        );
  109    109   
        let http_status: u16 = 201;
  110    110   
        builder = builder.status(http_status);
  111    111   
        let payload =
  112    112   
            crate::protocol_serde::shape_put_snapshot_block_output::ser_put_snapshot_block_output_output_output(&output)?
  113    113   
        ;
  114    114   
        let content_length = payload.len();
  115         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
         115  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  116    116   
            builder,
  117    117   
            ::http::header::CONTENT_LENGTH,
  118    118   
            content_length,
  119    119   
        );
  120         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         120  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
  121    121   
        builder.body(body)?
  122    122   
    })
  123    123   
}
  124    124   
  125    125   
#[allow(clippy::unnecessary_wraps)]
  126    126   
pub fn ser_put_snapshot_block_http_error(
  127    127   
    error: &crate::error::PutSnapshotBlockError,
  128    128   
) -> std::result::Result<
  129         -
    ::aws_smithy_http_server::response::Response,
  130         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         129  +
    ::aws_smithy_legacy_http_server::response::Response,
         130  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  131    131   
> {
  132    132   
    Ok({
  133    133   
        match error {
  134    134   
            crate::error::PutSnapshotBlockError::InternalServerException(output) => {
  135    135   
                let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_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   
                    "InternalServerException",
  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   
            crate::error::PutSnapshotBlockError::ResourceNotFoundException(output) => {
  159    159   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
  160    160   
                #[allow(unused_mut)]
  161    161   
                let mut builder = ::http::Response::builder();
  162         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         162  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  163    163   
                    builder,
  164    164   
                    ::http::header::CONTENT_TYPE,
  165    165   
                    "application/json",
  166    166   
                );
  167         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         167  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  168    168   
                    builder,
  169    169   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  170    170   
                    "ResourceNotFoundException",
  171    171   
                );
  172    172   
                let content_length = payload.len();
  173         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         173  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  174    174   
                    builder,
  175    175   
                    ::http::header::CONTENT_LENGTH,
  176    176   
                    content_length,
  177    177   
                );
  178    178   
                builder
  179    179   
                    .status(404)
  180         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         180  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  181    181   
            }
  182    182   
            crate::error::PutSnapshotBlockError::AccessDeniedException(output) => {
  183    183   
                let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
  184    184   
                #[allow(unused_mut)]
  185    185   
                let mut builder = ::http::Response::builder();
  186         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         186  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  187    187   
                    builder,
  188    188   
                    ::http::header::CONTENT_TYPE,
  189    189   
                    "application/json",
  190    190   
                );
  191         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         191  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  192    192   
                    builder,
  193    193   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  194    194   
                    "AccessDeniedException",
  195    195   
                );
  196    196   
                let content_length = payload.len();
  197         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         197  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  198    198   
                    builder,
  199    199   
                    ::http::header::CONTENT_LENGTH,
  200    200   
                    content_length,
  201    201   
                );
  202    202   
                builder
  203    203   
                    .status(403)
  204         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         204  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  205    205   
            }
  206    206   
            crate::error::PutSnapshotBlockError::RequestThrottledException(output) => {
  207    207   
                let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
  208    208   
                #[allow(unused_mut)]
  209    209   
                let mut builder = ::http::Response::builder();
  210         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         210  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  211    211   
                    builder,
  212    212   
                    ::http::header::CONTENT_TYPE,
  213    213   
                    "application/json",
  214    214   
                );
  215         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         215  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  216    216   
                    builder,
  217    217   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  218    218   
                    "RequestThrottledException",
  219    219   
                );
  220    220   
                let content_length = payload.len();
  221         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         221  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  222    222   
                    builder,
  223    223   
                    ::http::header::CONTENT_LENGTH,
  224    224   
                    content_length,
  225    225   
                );
  226    226   
                builder
  227    227   
                    .status(400)
  228         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         228  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  229    229   
            }
  230    230   
            crate::error::PutSnapshotBlockError::ServiceQuotaExceededException(output) => {
  231    231   
                let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
  232    232   
                #[allow(unused_mut)]
  233    233   
                let mut builder = ::http::Response::builder();
  234         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         234  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  235    235   
                    builder,
  236    236   
                    ::http::header::CONTENT_TYPE,
  237    237   
                    "application/json",
  238    238   
                );
  239         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         239  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  240    240   
                    builder,
  241    241   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  242    242   
                    "ServiceQuotaExceededException",
  243    243   
                );
  244    244   
                let content_length = payload.len();
  245         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         245  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  246    246   
                    builder,
  247    247   
                    ::http::header::CONTENT_LENGTH,
  248    248   
                    content_length,
  249    249   
                );
  250    250   
                builder
  251    251   
                    .status(402)
  252         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         252  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  253    253   
            }
  254    254   
            crate::error::PutSnapshotBlockError::ValidationException(output) => {
  255    255   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
  256    256   
                #[allow(unused_mut)]
  257    257   
                let mut builder = ::http::Response::builder();
  258         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         258  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  259    259   
                    builder,
  260    260   
                    ::http::header::CONTENT_TYPE,
  261    261   
                    "application/json",
  262    262   
                );
  263         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         263  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  264    264   
                    builder,
  265    265   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  266    266   
                    "ValidationException",
  267    267   
                );
  268    268   
                let content_length = payload.len();
  269         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         269  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  270    270   
                    builder,
  271    271   
                    ::http::header::CONTENT_LENGTH,
  272    272   
                    content_length,
  273    273   
                );
  274    274   
                builder
  275    275   
                    .status(400)
  276         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         276  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  277    277   
            }
  278    278   
            crate::error::PutSnapshotBlockError::InternalServerError(output) => {
  279    279   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  280    280   
                #[allow(unused_mut)]
  281    281   
                let mut builder = ::http::Response::builder();
  282         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         282  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  283    283   
                    builder,
  284    284   
                    ::http::header::CONTENT_TYPE,
  285    285   
                    "application/json",
  286    286   
                );
  287         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         287  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  288    288   
                    builder,
  289    289   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  290    290   
                    "InternalServerError",
  291    291   
                );
  292    292   
                let content_length = payload.len();
  293         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         293  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  294    294   
                    builder,
  295    295   
                    ::http::header::CONTENT_LENGTH,
  296    296   
                    content_length,
  297    297   
                );
  298    298   
                builder
  299    299   
                    .status(500)
  300         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         300  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  301    301   
            }
  302    302   
        }
  303    303   
    })
  304    304   
}
  305    305   
  306    306   
pub fn ser_put_snapshot_block_headers(
  307    307   
    input: &crate::output::PutSnapshotBlockOutput,
  308    308   
    mut builder: ::http::response::Builder,
  309    309   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
  310    310   
{

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

@@ -1,1 +87,89 @@
    9      9   
    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
   10     10   
    Ok(::aws_smithy_http_server_python::types::ByteStream::new(
   11     11   
        body,
   12     12   
    ))
   13     13   
}
   14     14   
   15     15   
pub(crate) fn de_checksum_header(
   16     16   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   17     17   
) -> ::std::result::Result<
   18     18   
    ::std::option::Option<::std::string::String>,
   19         -
    ::aws_smithy_http::header::ParseError,
          19  +
    ::aws_smithy_legacy_http::header::ParseError,
   20     20   
> {
   21     21   
    let headers = header_map.get_all("x-amz-Checksum");
   22         -
    ::aws_smithy_http::header::one_or_none(headers)
          22  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   23     23   
}
   24     24   
   25     25   
pub(crate) fn de_checksum_algorithm_header(
   26     26   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   27     27   
) -> ::std::result::Result<
   28     28   
    ::std::option::Option<::std::string::String>,
   29         -
    ::aws_smithy_http::header::ParseError,
          29  +
    ::aws_smithy_legacy_http::header::ParseError,
   30     30   
> {
   31     31   
    let headers = header_map.get_all("x-amz-Checksum-Algorithm");
   32         -
    ::aws_smithy_http::header::one_or_none(headers)
          32  +
    ::aws_smithy_legacy_http::header::one_or_none(headers)
   33     33   
}
   34     34   
   35     35   
pub(crate) fn de_data_length_header(
   36     36   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   37         -
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_http::header::ParseError> {
          37  +
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_legacy_http::header::ParseError>
          38  +
{
   38     39   
    let headers = header_map.get_all("x-amz-Data-Length");
   39         -
    let var_1 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
          40  +
    let var_1 = ::aws_smithy_legacy_http::header::read_many_primitive::<i32>(headers)?;
   40     41   
    if var_1.len() > 1 {
   41         -
        Err(::aws_smithy_http::header::ParseError::new(format!(
          42  +
        Err(::aws_smithy_legacy_http::header::ParseError::new(format!(
   42     43   
            "expected one item but found {}",
   43     44   
            var_1.len()
   44     45   
        )))
   45     46   
    } else {
   46     47   
        let mut var_1 = var_1;
   47     48   
        Ok(var_1.pop())
   48     49   
    }
   49     50   
}
   50     51   
   51     52   
pub(crate) fn de_progress_header(
   52     53   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   53         -
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_http::header::ParseError> {
          54  +
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_legacy_http::header::ParseError>
          55  +
{
   54     56   
    let headers = header_map.get_all("x-amz-Progress");
   55         -
    let var_2 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
          57  +
    let var_2 = ::aws_smithy_legacy_http::header::read_many_primitive::<i32>(headers)?;
   56     58   
    if var_2.len() > 1 {
   57         -
        Err(::aws_smithy_http::header::ParseError::new(format!(
          59  +
        Err(::aws_smithy_legacy_http::header::ParseError::new(format!(
   58     60   
            "expected one item but found {}",
   59     61   
            var_2.len()
   60     62   
        )))
   61     63   
    } else {
   62     64   
        let mut var_2 = var_2;
   63     65   
        Ok(var_2.pop())
   64     66   
    }
   65     67   
}
   66     68   
   67     69   
pub fn de_snapshot_id(
   68     70   
    value: &str,
   69     71   
) -> std::result::Result<
   70     72   
    ::std::string::String,
   71         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          73  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   72     74   
> {
   73     75   
    let value = ::percent_encoding::percent_decode_str(value)
   74     76   
        .decode_utf8()?
   75     77   
        .into_owned();
   76     78   
    Ok(value)
   77     79   
}
   78     80   
   79     81   
pub fn de_block_index(
   80     82   
    value: &str,
   81     83   
) -> std::result::Result<
   82     84   
    i32,
   83         -
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          85  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
   84     86   
> {
   85     87   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
   86     88   
    Ok(value)
   87     89   
}