Server Test

Server Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json_extras/rust-server-codegen/src/protocol_serde/shape_string_payload.rs

@@ -1,1 +105,108 @@
    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_string_payload_http_request<B>(
    4         -
    #[allow(unused_variables)] request: ::http::Request<B>,
           4  +
    #[allow(unused_variables)] request: ::http_1x::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::StringPayloadInput,
    7      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10     10   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12     12   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     13   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::string_payload_input::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         -
            let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
            let bytes = {
          24  +
                use ::http_body_util::BodyExt;
          25  +
                body.collect().await?.to_bytes()
          26  +
            };
   24     27   
            if !bytes.is_empty() {
   25     28   
                ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   26     29   
                    &headers,
   27     30   
                    Some("text/plain"),
   28     31   
                )?;
   29     32   
            }
   30     33   
            crate::protocol_serde::shape_string_payload_input::de_payload_payload(&bytes)?
   31     34   
        } {
   32     35   
            input = input.set_payload(Some(value))
   33     36   
        }
   34     37   
        input.build()
   35     38   
    })
   36     39   
}
   37     40   
   38     41   
#[allow(clippy::unnecessary_wraps)]
   39     42   
pub fn ser_string_payload_http_response(
   40     43   
    #[allow(unused_variables)] output: crate::output::StringPayloadOutput,
   41     44   
) -> std::result::Result<
   42     45   
    ::aws_smithy_http_server::response::Response,
   43     46   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   44     47   
> {
   45     48   
    Ok({
   46     49   
        #[allow(unused_mut)]
   47         -
        let mut builder = ::http::Response::builder();
          50  +
        let mut builder = ::http_1x::Response::builder();
   48     51   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     52   
            builder,
   50         -
            ::http::header::CONTENT_TYPE,
          53  +
            ::http_1x::header::CONTENT_TYPE,
   51     54   
            "text/plain",
   52     55   
        );
   53     56   
        let http_status: u16 = 200;
   54     57   
        builder = builder.status(http_status);
   55     58   
        let payload = crate::protocol_serde::shape_string_payload_output::ser_payload_http_payload(
   56     59   
            output.payload,
   57     60   
        )?;
   58     61   
        let content_length = payload.len();
   59     62   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   60     63   
            builder,
   61         -
            ::http::header::CONTENT_LENGTH,
          64  +
            ::http_1x::header::CONTENT_LENGTH,
   62     65   
            content_length,
   63     66   
        );
   64     67   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
   65     68   
        builder.body(body)?
   66     69   
    })
   67     70   
}
   68     71   
   69     72   
#[allow(clippy::unnecessary_wraps)]
   70     73   
pub fn ser_string_payload_http_error(
   71     74   
    error: &crate::error::StringPayloadError,
   72     75   
) -> std::result::Result<
   73     76   
    ::aws_smithy_http_server::response::Response,
   74     77   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   75     78   
> {
   76     79   
    Ok({
   77     80   
        match error {
   78     81   
            crate::error::StringPayloadError::ExtraError(output) => {
   79     82   
                let payload =
   80     83   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
   81     84   
                #[allow(unused_mut)]
   82         -
                let mut builder = ::http::Response::builder();
          85  +
                let mut builder = ::http_1x::Response::builder();
   83     86   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   84     87   
                    builder,
   85         -
                    ::http::header::CONTENT_TYPE,
          88  +
                    ::http_1x::header::CONTENT_TYPE,
   86     89   
                    "text/plain",
   87     90   
                );
   88     91   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   89     92   
                    builder,
   90         -
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
          93  +
                    ::http_1x::header::HeaderName::from_static("x-amzn-errortype"),
   91     94   
                    "ExtraError",
   92     95   
                );
   93     96   
                let content_length = payload.len();
   94     97   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   95     98   
                    builder,
   96         -
                    ::http::header::CONTENT_LENGTH,
          99  +
                    ::http_1x::header::CONTENT_LENGTH,
   97    100   
                    content_length,
   98    101   
                );
   99    102   
                builder
  100    103   
                    .status(500)
  101    104   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  102    105   
            }
  103    106   
        }
  104    107   
    })
  105    108   
}

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

@@ -46,46 +107,107 @@
   66     66   
                            <
   67     67   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   68     68   
                                as ::aws_smithy_http_server::plugin::Plugin<
   69     69   
                                    RestJsonExtras<L>,
   70     70   
                                    crate::operation_shape::CaseInsensitiveErrorOperation,
   71     71   
                                    ModelPl::Output
   72     72   
                                >
   73     73   
                            >::Output
   74     74   
                        >,
   75     75   
   76         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   77         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
          76  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
          77  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
   78     78   
   79     79   
                    {
   80     80   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   81     81   
        use ::aws_smithy_http_server::plugin::Plugin;
   82     82   
        let svc = crate::operation_shape::CaseInsensitiveErrorOperation::from_handler(handler);
   83     83   
        let svc = self.model_plugin.apply(svc);
   84     84   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   85     85   
            .apply(svc);
   86     86   
        let svc = self.http_plugin.apply(svc);
   87     87   
        self.case_insensitive_error_operation_custom(svc)
@@ -113,113 +193,193 @@
  133    133   
                            <
  134    134   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  135    135   
                                as ::aws_smithy_http_server::plugin::Plugin<
  136    136   
                                    RestJsonExtras<L>,
  137    137   
                                    crate::operation_shape::CaseInsensitiveErrorOperation,
  138    138   
                                    ModelPl::Output
  139    139   
                                >
  140    140   
                            >::Output
  141    141   
                        >,
  142    142   
  143         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  144         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         143  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         144  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  145    145   
  146    146   
                    {
  147    147   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  148    148   
        use ::aws_smithy_http_server::plugin::Plugin;
  149    149   
        let svc = crate::operation_shape::CaseInsensitiveErrorOperation::from_service(service);
  150    150   
        let svc = self.model_plugin.apply(svc);
  151    151   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  152    152   
            .apply(svc);
  153    153   
        let svc = self.http_plugin.apply(svc);
  154    154   
        self.case_insensitive_error_operation_custom(svc)
  155    155   
    }
  156    156   
  157    157   
    /// Sets the [`CaseInsensitiveErrorOperation`](crate::operation_shape::CaseInsensitiveErrorOperation) to a custom [`Service`](tower::Service).
  158    158   
    /// not constrained by the Smithy contract.
  159    159   
    fn case_insensitive_error_operation_custom<S>(mut self, svc: S) -> Self
  160    160   
    where
  161    161   
        S: ::tower::Service<
  162         -
                ::http::Request<Body>,
  163         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         162  +
                ::http_1x::Request<Body>,
         163  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  164    164   
                Error = ::std::convert::Infallible,
  165    165   
            > + Clone
  166    166   
            + Send
  167    167   
            + 'static,
  168    168   
        S::Future: Send + 'static,
  169    169   
    {
  170    170   
        self.case_insensitive_error_operation =
  171    171   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  172    172   
        self
  173    173   
    }
@@ -197,197 +258,258 @@
  217    217   
                            <
  218    218   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  219    219   
                                as ::aws_smithy_http_server::plugin::Plugin<
  220    220   
                                    RestJsonExtras<L>,
  221    221   
                                    crate::operation_shape::EmptyStructWithContentOnWireOp,
  222    222   
                                    ModelPl::Output
  223    223   
                                >
  224    224   
                            >::Output
  225    225   
                        >,
  226    226   
  227         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  228         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         227  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         228  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  229    229   
  230    230   
                    {
  231    231   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  232    232   
        use ::aws_smithy_http_server::plugin::Plugin;
  233    233   
        let svc = crate::operation_shape::EmptyStructWithContentOnWireOp::from_handler(handler);
  234    234   
        let svc = self.model_plugin.apply(svc);
  235    235   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  236    236   
            .apply(svc);
  237    237   
        let svc = self.http_plugin.apply(svc);
  238    238   
        self.empty_struct_with_content_on_wire_op_custom(svc)
@@ -264,264 +344,344 @@
  284    284   
                            <
  285    285   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  286    286   
                                as ::aws_smithy_http_server::plugin::Plugin<
  287    287   
                                    RestJsonExtras<L>,
  288    288   
                                    crate::operation_shape::EmptyStructWithContentOnWireOp,
  289    289   
                                    ModelPl::Output
  290    290   
                                >
  291    291   
                            >::Output
  292    292   
                        >,
  293    293   
  294         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  295         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         294  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         295  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  296    296   
  297    297   
                    {
  298    298   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  299    299   
        use ::aws_smithy_http_server::plugin::Plugin;
  300    300   
        let svc = crate::operation_shape::EmptyStructWithContentOnWireOp::from_service(service);
  301    301   
        let svc = self.model_plugin.apply(svc);
  302    302   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  303    303   
            .apply(svc);
  304    304   
        let svc = self.http_plugin.apply(svc);
  305    305   
        self.empty_struct_with_content_on_wire_op_custom(svc)
  306    306   
    }
  307    307   
  308    308   
    /// Sets the [`EmptyStructWithContentOnWireOp`](crate::operation_shape::EmptyStructWithContentOnWireOp) to a custom [`Service`](tower::Service).
  309    309   
    /// not constrained by the Smithy contract.
  310    310   
    fn empty_struct_with_content_on_wire_op_custom<S>(mut self, svc: S) -> Self
  311    311   
    where
  312    312   
        S: ::tower::Service<
  313         -
                ::http::Request<Body>,
  314         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         313  +
                ::http_1x::Request<Body>,
         314  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  315    315   
                Error = ::std::convert::Infallible,
  316    316   
            > + Clone
  317    317   
            + Send
  318    318   
            + 'static,
  319    319   
        S::Future: Send + 'static,
  320    320   
    {
  321    321   
        self.empty_struct_with_content_on_wire_op =
  322    322   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  323    323   
        self
  324    324   
    }
@@ -348,348 +409,409 @@
  368    368   
                            <
  369    369   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  370    370   
                                as ::aws_smithy_http_server::plugin::Plugin<
  371    371   
                                    RestJsonExtras<L>,
  372    372   
                                    crate::operation_shape::EnumQuery,
  373    373   
                                    ModelPl::Output
  374    374   
                                >
  375    375   
                            >::Output
  376    376   
                        >,
  377    377   
  378         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  379         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         378  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         379  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  380    380   
  381    381   
                    {
  382    382   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  383    383   
        use ::aws_smithy_http_server::plugin::Plugin;
  384    384   
        let svc = crate::operation_shape::EnumQuery::from_handler(handler);
  385    385   
        let svc = self.model_plugin.apply(svc);
  386    386   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  387    387   
            .apply(svc);
  388    388   
        let svc = self.http_plugin.apply(svc);
  389    389   
        self.enum_query_custom(svc)
@@ -415,415 +495,495 @@
  435    435   
                            <
  436    436   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  437    437   
                                as ::aws_smithy_http_server::plugin::Plugin<
  438    438   
                                    RestJsonExtras<L>,
  439    439   
                                    crate::operation_shape::EnumQuery,
  440    440   
                                    ModelPl::Output
  441    441   
                                >
  442    442   
                            >::Output
  443    443   
                        >,
  444    444   
  445         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  446         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         445  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         446  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  447    447   
  448    448   
                    {
  449    449   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  450    450   
        use ::aws_smithy_http_server::plugin::Plugin;
  451    451   
        let svc = crate::operation_shape::EnumQuery::from_service(service);
  452    452   
        let svc = self.model_plugin.apply(svc);
  453    453   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  454    454   
            .apply(svc);
  455    455   
        let svc = self.http_plugin.apply(svc);
  456    456   
        self.enum_query_custom(svc)
  457    457   
    }
  458    458   
  459    459   
    /// Sets the [`EnumQuery`](crate::operation_shape::EnumQuery) to a custom [`Service`](tower::Service).
  460    460   
    /// not constrained by the Smithy contract.
  461    461   
    fn enum_query_custom<S>(mut self, svc: S) -> Self
  462    462   
    where
  463    463   
        S: ::tower::Service<
  464         -
                ::http::Request<Body>,
  465         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         464  +
                ::http_1x::Request<Body>,
         465  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  466    466   
                Error = ::std::convert::Infallible,
  467    467   
            > + Clone
  468    468   
            + Send
  469    469   
            + 'static,
  470    470   
        S::Future: Send + 'static,
  471    471   
    {
  472    472   
        self.enum_query = Some(::aws_smithy_http_server::routing::Route::new(svc));
  473    473   
        self
  474    474   
    }
  475    475   
@@ -498,498 +559,559 @@
  518    518   
                            <
  519    519   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  520    520   
                                as ::aws_smithy_http_server::plugin::Plugin<
  521    521   
                                    RestJsonExtras<L>,
  522    522   
                                    crate::operation_shape::EscapedStringValues,
  523    523   
                                    ModelPl::Output
  524    524   
                                >
  525    525   
                            >::Output
  526    526   
                        >,
  527    527   
  528         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  529         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         528  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         529  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  530    530   
  531    531   
                    {
  532    532   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  533    533   
        use ::aws_smithy_http_server::plugin::Plugin;
  534    534   
        let svc = crate::operation_shape::EscapedStringValues::from_handler(handler);
  535    535   
        let svc = self.model_plugin.apply(svc);
  536    536   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  537    537   
            .apply(svc);
  538    538   
        let svc = self.http_plugin.apply(svc);
  539    539   
        self.escaped_string_values_custom(svc)
@@ -565,565 +645,645 @@
  585    585   
                            <
  586    586   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  587    587   
                                as ::aws_smithy_http_server::plugin::Plugin<
  588    588   
                                    RestJsonExtras<L>,
  589    589   
                                    crate::operation_shape::EscapedStringValues,
  590    590   
                                    ModelPl::Output
  591    591   
                                >
  592    592   
                            >::Output
  593    593   
                        >,
  594    594   
  595         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  596         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         595  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         596  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  597    597   
  598    598   
                    {
  599    599   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  600    600   
        use ::aws_smithy_http_server::plugin::Plugin;
  601    601   
        let svc = crate::operation_shape::EscapedStringValues::from_service(service);
  602    602   
        let svc = self.model_plugin.apply(svc);
  603    603   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  604    604   
            .apply(svc);
  605    605   
        let svc = self.http_plugin.apply(svc);
  606    606   
        self.escaped_string_values_custom(svc)
  607    607   
    }
  608    608   
  609    609   
    /// Sets the [`EscapedStringValues`](crate::operation_shape::EscapedStringValues) to a custom [`Service`](tower::Service).
  610    610   
    /// not constrained by the Smithy contract.
  611    611   
    fn escaped_string_values_custom<S>(mut self, svc: S) -> Self
  612    612   
    where
  613    613   
        S: ::tower::Service<
  614         -
                ::http::Request<Body>,
  615         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         614  +
                ::http_1x::Request<Body>,
         615  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  616    616   
                Error = ::std::convert::Infallible,
  617    617   
            > + Clone
  618    618   
            + Send
  619    619   
            + 'static,
  620    620   
        S::Future: Send + 'static,
  621    621   
    {
  622    622   
        self.escaped_string_values = Some(::aws_smithy_http_server::routing::Route::new(svc));
  623    623   
        self
  624    624   
    }
  625    625   
@@ -648,648 +709,709 @@
  668    668   
                            <
  669    669   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  670    670   
                                as ::aws_smithy_http_server::plugin::Plugin<
  671    671   
                                    RestJsonExtras<L>,
  672    672   
                                    crate::operation_shape::HttpQueryParamsOnlyOperation,
  673    673   
                                    ModelPl::Output
  674    674   
                                >
  675    675   
                            >::Output
  676    676   
                        >,
  677    677   
  678         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  679         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         678  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         679  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  680    680   
  681    681   
                    {
  682    682   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  683    683   
        use ::aws_smithy_http_server::plugin::Plugin;
  684    684   
        let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_handler(handler);
  685    685   
        let svc = self.model_plugin.apply(svc);
  686    686   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  687    687   
            .apply(svc);
  688    688   
        let svc = self.http_plugin.apply(svc);
  689    689   
        self.http_query_params_only_operation_custom(svc)
@@ -715,715 +795,795 @@
  735    735   
                            <
  736    736   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  737    737   
                                as ::aws_smithy_http_server::plugin::Plugin<
  738    738   
                                    RestJsonExtras<L>,
  739    739   
                                    crate::operation_shape::HttpQueryParamsOnlyOperation,
  740    740   
                                    ModelPl::Output
  741    741   
                                >
  742    742   
                            >::Output
  743    743   
                        >,
  744    744   
  745         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  746         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         745  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         746  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  747    747   
  748    748   
                    {
  749    749   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  750    750   
        use ::aws_smithy_http_server::plugin::Plugin;
  751    751   
        let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_service(service);
  752    752   
        let svc = self.model_plugin.apply(svc);
  753    753   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  754    754   
            .apply(svc);
  755    755   
        let svc = self.http_plugin.apply(svc);
  756    756   
        self.http_query_params_only_operation_custom(svc)
  757    757   
    }
  758    758   
  759    759   
    /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) to a custom [`Service`](tower::Service).
  760    760   
    /// not constrained by the Smithy contract.
  761    761   
    fn http_query_params_only_operation_custom<S>(mut self, svc: S) -> Self
  762    762   
    where
  763    763   
        S: ::tower::Service<
  764         -
                ::http::Request<Body>,
  765         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         764  +
                ::http_1x::Request<Body>,
         765  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  766    766   
                Error = ::std::convert::Infallible,
  767    767   
            > + Clone
  768    768   
            + Send
  769    769   
            + 'static,
  770    770   
        S::Future: Send + 'static,
  771    771   
    {
  772    772   
        self.http_query_params_only_operation =
  773    773   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  774    774   
        self
  775    775   
    }
@@ -799,799 +860,860 @@
  819    819   
                            <
  820    820   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  821    821   
                                as ::aws_smithy_http_server::plugin::Plugin<
  822    822   
                                    RestJsonExtras<L>,
  823    823   
                                    crate::operation_shape::MapWithEnumKeyOp,
  824    824   
                                    ModelPl::Output
  825    825   
                                >
  826    826   
                            >::Output
  827    827   
                        >,
  828    828   
  829         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  830         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         829  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         830  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  831    831   
  832    832   
                    {
  833    833   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  834    834   
        use ::aws_smithy_http_server::plugin::Plugin;
  835    835   
        let svc = crate::operation_shape::MapWithEnumKeyOp::from_handler(handler);
  836    836   
        let svc = self.model_plugin.apply(svc);
  837    837   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  838    838   
            .apply(svc);
  839    839   
        let svc = self.http_plugin.apply(svc);
  840    840   
        self.map_with_enum_key_op_custom(svc)
@@ -866,866 +946,946 @@
  886    886   
                            <
  887    887   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  888    888   
                                as ::aws_smithy_http_server::plugin::Plugin<
  889    889   
                                    RestJsonExtras<L>,
  890    890   
                                    crate::operation_shape::MapWithEnumKeyOp,
  891    891   
                                    ModelPl::Output
  892    892   
                                >
  893    893   
                            >::Output
  894    894   
                        >,
  895    895   
  896         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  897         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         896  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         897  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  898    898   
  899    899   
                    {
  900    900   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  901    901   
        use ::aws_smithy_http_server::plugin::Plugin;
  902    902   
        let svc = crate::operation_shape::MapWithEnumKeyOp::from_service(service);
  903    903   
        let svc = self.model_plugin.apply(svc);
  904    904   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  905    905   
            .apply(svc);
  906    906   
        let svc = self.http_plugin.apply(svc);
  907    907   
        self.map_with_enum_key_op_custom(svc)
  908    908   
    }
  909    909   
  910    910   
    /// Sets the [`MapWithEnumKeyOp`](crate::operation_shape::MapWithEnumKeyOp) to a custom [`Service`](tower::Service).
  911    911   
    /// not constrained by the Smithy contract.
  912    912   
    fn map_with_enum_key_op_custom<S>(mut self, svc: S) -> Self
  913    913   
    where
  914    914   
        S: ::tower::Service<
  915         -
                ::http::Request<Body>,
  916         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         915  +
                ::http_1x::Request<Body>,
         916  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  917    917   
                Error = ::std::convert::Infallible,
  918    918   
            > + Clone
  919    919   
            + Send
  920    920   
            + 'static,
  921    921   
        S::Future: Send + 'static,
  922    922   
    {
  923    923   
        self.map_with_enum_key_op = Some(::aws_smithy_http_server::routing::Route::new(svc));
  924    924   
        self
  925    925   
    }
  926    926   
@@ -949,949 +1010,1010 @@
  969    969   
                            <
  970    970   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  971    971   
                                as ::aws_smithy_http_server::plugin::Plugin<
  972    972   
                                    RestJsonExtras<L>,
  973    973   
                                    crate::operation_shape::NullInNonSparse,
  974    974   
                                    ModelPl::Output
  975    975   
                                >
  976    976   
                            >::Output
  977    977   
                        >,
  978    978   
  979         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  980         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         979  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         980  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  981    981   
  982    982   
                    {
  983    983   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  984    984   
        use ::aws_smithy_http_server::plugin::Plugin;
  985    985   
        let svc = crate::operation_shape::NullInNonSparse::from_handler(handler);
  986    986   
        let svc = self.model_plugin.apply(svc);
  987    987   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  988    988   
            .apply(svc);
  989    989   
        let svc = self.http_plugin.apply(svc);
  990    990   
        self.null_in_non_sparse_custom(svc)
@@ -1016,1016 +1096,1096 @@
 1036   1036   
                            <
 1037   1037   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1038   1038   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1039   1039   
                                    RestJsonExtras<L>,
 1040   1040   
                                    crate::operation_shape::NullInNonSparse,
 1041   1041   
                                    ModelPl::Output
 1042   1042   
                                >
 1043   1043   
                            >::Output
 1044   1044   
                        >,
 1045   1045   
 1046         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1047         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1046  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1047  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1048   1048   
 1049   1049   
                    {
 1050   1050   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1051   1051   
        use ::aws_smithy_http_server::plugin::Plugin;
 1052   1052   
        let svc = crate::operation_shape::NullInNonSparse::from_service(service);
 1053   1053   
        let svc = self.model_plugin.apply(svc);
 1054   1054   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1055   1055   
            .apply(svc);
 1056   1056   
        let svc = self.http_plugin.apply(svc);
 1057   1057   
        self.null_in_non_sparse_custom(svc)
 1058   1058   
    }
 1059   1059   
 1060   1060   
    /// Sets the [`NullInNonSparse`](crate::operation_shape::NullInNonSparse) to a custom [`Service`](tower::Service).
 1061   1061   
    /// not constrained by the Smithy contract.
 1062   1062   
    fn null_in_non_sparse_custom<S>(mut self, svc: S) -> Self
 1063   1063   
    where
 1064   1064   
        S: ::tower::Service<
 1065         -
                ::http::Request<Body>,
 1066         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1065  +
                ::http_1x::Request<Body>,
        1066  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1067   1067   
                Error = ::std::convert::Infallible,
 1068   1068   
            > + Clone
 1069   1069   
            + Send
 1070   1070   
            + 'static,
 1071   1071   
        S::Future: Send + 'static,
 1072   1072   
    {
 1073   1073   
        self.null_in_non_sparse = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1074   1074   
        self
 1075   1075   
    }
 1076   1076   
@@ -1099,1099 +1160,1160 @@
 1119   1119   
                            <
 1120   1120   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1121   1121   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1122   1122   
                                    RestJsonExtras<L>,
 1123   1123   
                                    crate::operation_shape::PrimitiveIntHeader,
 1124   1124   
                                    ModelPl::Output
 1125   1125   
                                >
 1126   1126   
                            >::Output
 1127   1127   
                        >,
 1128   1128   
 1129         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1130         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1129  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1130  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1131   1131   
 1132   1132   
                    {
 1133   1133   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1134   1134   
        use ::aws_smithy_http_server::plugin::Plugin;
 1135   1135   
        let svc = crate::operation_shape::PrimitiveIntHeader::from_handler(handler);
 1136   1136   
        let svc = self.model_plugin.apply(svc);
 1137   1137   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1138   1138   
            .apply(svc);
 1139   1139   
        let svc = self.http_plugin.apply(svc);
 1140   1140   
        self.primitive_int_header_custom(svc)
@@ -1166,1166 +1246,1246 @@
 1186   1186   
                            <
 1187   1187   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1188   1188   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1189   1189   
                                    RestJsonExtras<L>,
 1190   1190   
                                    crate::operation_shape::PrimitiveIntHeader,
 1191   1191   
                                    ModelPl::Output
 1192   1192   
                                >
 1193   1193   
                            >::Output
 1194   1194   
                        >,
 1195   1195   
 1196         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1197         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1196  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1197  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1198   1198   
 1199   1199   
                    {
 1200   1200   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1201   1201   
        use ::aws_smithy_http_server::plugin::Plugin;
 1202   1202   
        let svc = crate::operation_shape::PrimitiveIntHeader::from_service(service);
 1203   1203   
        let svc = self.model_plugin.apply(svc);
 1204   1204   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1205   1205   
            .apply(svc);
 1206   1206   
        let svc = self.http_plugin.apply(svc);
 1207   1207   
        self.primitive_int_header_custom(svc)
 1208   1208   
    }
 1209   1209   
 1210   1210   
    /// Sets the [`PrimitiveIntHeader`](crate::operation_shape::PrimitiveIntHeader) to a custom [`Service`](tower::Service).
 1211   1211   
    /// not constrained by the Smithy contract.
 1212   1212   
    fn primitive_int_header_custom<S>(mut self, svc: S) -> Self
 1213   1213   
    where
 1214   1214   
        S: ::tower::Service<
 1215         -
                ::http::Request<Body>,
 1216         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1215  +
                ::http_1x::Request<Body>,
        1216  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1217   1217   
                Error = ::std::convert::Infallible,
 1218   1218   
            > + Clone
 1219   1219   
            + Send
 1220   1220   
            + 'static,
 1221   1221   
        S::Future: Send + 'static,
 1222   1222   
    {
 1223   1223   
        self.primitive_int_header = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1224   1224   
        self
 1225   1225   
    }
 1226   1226   
@@ -1249,1249 +1310,1310 @@
 1269   1269   
                            <
 1270   1270   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1271   1271   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1272   1272   
                                    RestJsonExtras<L>,
 1273   1273   
                                    crate::operation_shape::PrimitiveIntOp,
 1274   1274   
                                    ModelPl::Output
 1275   1275   
                                >
 1276   1276   
                            >::Output
 1277   1277   
                        >,
 1278   1278   
 1279         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1280         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1279  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1280  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1281   1281   
 1282   1282   
                    {
 1283   1283   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1284   1284   
        use ::aws_smithy_http_server::plugin::Plugin;
 1285   1285   
        let svc = crate::operation_shape::PrimitiveIntOp::from_handler(handler);
 1286   1286   
        let svc = self.model_plugin.apply(svc);
 1287   1287   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1288   1288   
            .apply(svc);
 1289   1289   
        let svc = self.http_plugin.apply(svc);
 1290   1290   
        self.primitive_int_op_custom(svc)
@@ -1316,1316 +1396,1396 @@
 1336   1336   
                            <
 1337   1337   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1338   1338   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1339   1339   
                                    RestJsonExtras<L>,
 1340   1340   
                                    crate::operation_shape::PrimitiveIntOp,
 1341   1341   
                                    ModelPl::Output
 1342   1342   
                                >
 1343   1343   
                            >::Output
 1344   1344   
                        >,
 1345   1345   
 1346         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1347         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1346  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1347  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1348   1348   
 1349   1349   
                    {
 1350   1350   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1351   1351   
        use ::aws_smithy_http_server::plugin::Plugin;
 1352   1352   
        let svc = crate::operation_shape::PrimitiveIntOp::from_service(service);
 1353   1353   
        let svc = self.model_plugin.apply(svc);
 1354   1354   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1355   1355   
            .apply(svc);
 1356   1356   
        let svc = self.http_plugin.apply(svc);
 1357   1357   
        self.primitive_int_op_custom(svc)
 1358   1358   
    }
 1359   1359   
 1360   1360   
    /// Sets the [`PrimitiveIntOp`](crate::operation_shape::PrimitiveIntOp) to a custom [`Service`](tower::Service).
 1361   1361   
    /// not constrained by the Smithy contract.
 1362   1362   
    fn primitive_int_op_custom<S>(mut self, svc: S) -> Self
 1363   1363   
    where
 1364   1364   
        S: ::tower::Service<
 1365         -
                ::http::Request<Body>,
 1366         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1365  +
                ::http_1x::Request<Body>,
        1366  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1367   1367   
                Error = ::std::convert::Infallible,
 1368   1368   
            > + Clone
 1369   1369   
            + Send
 1370   1370   
            + 'static,
 1371   1371   
        S::Future: Send + 'static,
 1372   1372   
    {
 1373   1373   
        self.primitive_int_op = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1374   1374   
        self
 1375   1375   
    }
 1376   1376   
@@ -1399,1399 +1460,1460 @@
 1419   1419   
                            <
 1420   1420   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1421   1421   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1422   1422   
                                    RestJsonExtras<L>,
 1423   1423   
                                    crate::operation_shape::QueryPrecedence,
 1424   1424   
                                    ModelPl::Output
 1425   1425   
                                >
 1426   1426   
                            >::Output
 1427   1427   
                        >,
 1428   1428   
 1429         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1430         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1429  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1430  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1431   1431   
 1432   1432   
                    {
 1433   1433   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1434   1434   
        use ::aws_smithy_http_server::plugin::Plugin;
 1435   1435   
        let svc = crate::operation_shape::QueryPrecedence::from_handler(handler);
 1436   1436   
        let svc = self.model_plugin.apply(svc);
 1437   1437   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1438   1438   
            .apply(svc);
 1439   1439   
        let svc = self.http_plugin.apply(svc);
 1440   1440   
        self.query_precedence_custom(svc)
@@ -1466,1466 +1546,1546 @@
 1486   1486   
                            <
 1487   1487   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1488   1488   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1489   1489   
                                    RestJsonExtras<L>,
 1490   1490   
                                    crate::operation_shape::QueryPrecedence,
 1491   1491   
                                    ModelPl::Output
 1492   1492   
                                >
 1493   1493   
                            >::Output
 1494   1494   
                        >,
 1495   1495   
 1496         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1497         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1496  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1497  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1498   1498   
 1499   1499   
                    {
 1500   1500   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1501   1501   
        use ::aws_smithy_http_server::plugin::Plugin;
 1502   1502   
        let svc = crate::operation_shape::QueryPrecedence::from_service(service);
 1503   1503   
        let svc = self.model_plugin.apply(svc);
 1504   1504   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1505   1505   
            .apply(svc);
 1506   1506   
        let svc = self.http_plugin.apply(svc);
 1507   1507   
        self.query_precedence_custom(svc)
 1508   1508   
    }
 1509   1509   
 1510   1510   
    /// Sets the [`QueryPrecedence`](crate::operation_shape::QueryPrecedence) to a custom [`Service`](tower::Service).
 1511   1511   
    /// not constrained by the Smithy contract.
 1512   1512   
    fn query_precedence_custom<S>(mut self, svc: S) -> Self
 1513   1513   
    where
 1514   1514   
        S: ::tower::Service<
 1515         -
                ::http::Request<Body>,
 1516         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1515  +
                ::http_1x::Request<Body>,
        1516  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1517   1517   
                Error = ::std::convert::Infallible,
 1518   1518   
            > + Clone
 1519   1519   
            + Send
 1520   1520   
            + 'static,
 1521   1521   
        S::Future: Send + 'static,
 1522   1522   
    {
 1523   1523   
        self.query_precedence = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1524   1524   
        self
 1525   1525   
    }
 1526   1526   
@@ -1549,1549 +1610,1610 @@
 1569   1569   
                            <
 1570   1570   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1571   1571   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1572   1572   
                                    RestJsonExtras<L>,
 1573   1573   
                                    crate::operation_shape::StatusResponse,
 1574   1574   
                                    ModelPl::Output
 1575   1575   
                                >
 1576   1576   
                            >::Output
 1577   1577   
                        >,
 1578   1578   
 1579         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1580         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1579  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1580  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1581   1581   
 1582   1582   
                    {
 1583   1583   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1584   1584   
        use ::aws_smithy_http_server::plugin::Plugin;
 1585   1585   
        let svc = crate::operation_shape::StatusResponse::from_handler(handler);
 1586   1586   
        let svc = self.model_plugin.apply(svc);
 1587   1587   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1588   1588   
            .apply(svc);
 1589   1589   
        let svc = self.http_plugin.apply(svc);
 1590   1590   
        self.status_response_custom(svc)
@@ -1616,1616 +1696,1696 @@
 1636   1636   
                            <
 1637   1637   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1638   1638   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1639   1639   
                                    RestJsonExtras<L>,
 1640   1640   
                                    crate::operation_shape::StatusResponse,
 1641   1641   
                                    ModelPl::Output
 1642   1642   
                                >
 1643   1643   
                            >::Output
 1644   1644   
                        >,
 1645   1645   
 1646         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1647         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1646  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1647  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1648   1648   
 1649   1649   
                    {
 1650   1650   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1651   1651   
        use ::aws_smithy_http_server::plugin::Plugin;
 1652   1652   
        let svc = crate::operation_shape::StatusResponse::from_service(service);
 1653   1653   
        let svc = self.model_plugin.apply(svc);
 1654   1654   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1655   1655   
            .apply(svc);
 1656   1656   
        let svc = self.http_plugin.apply(svc);
 1657   1657   
        self.status_response_custom(svc)
 1658   1658   
    }
 1659   1659   
 1660   1660   
    /// Sets the [`StatusResponse`](crate::operation_shape::StatusResponse) to a custom [`Service`](tower::Service).
 1661   1661   
    /// not constrained by the Smithy contract.
 1662   1662   
    fn status_response_custom<S>(mut self, svc: S) -> Self
 1663   1663   
    where
 1664   1664   
        S: ::tower::Service<
 1665         -
                ::http::Request<Body>,
 1666         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1665  +
                ::http_1x::Request<Body>,
        1666  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1667   1667   
                Error = ::std::convert::Infallible,
 1668   1668   
            > + Clone
 1669   1669   
            + Send
 1670   1670   
            + 'static,
 1671   1671   
        S::Future: Send + 'static,
 1672   1672   
    {
 1673   1673   
        self.status_response = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1674   1674   
        self
 1675   1675   
    }
 1676   1676   
@@ -1699,1699 +1760,1760 @@
 1719   1719   
                            <
 1720   1720   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1721   1721   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1722   1722   
                                    RestJsonExtras<L>,
 1723   1723   
                                    crate::operation_shape::StringPayload,
 1724   1724   
                                    ModelPl::Output
 1725   1725   
                                >
 1726   1726   
                            >::Output
 1727   1727   
                        >,
 1728   1728   
 1729         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1730         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1729  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1730  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1731   1731   
 1732   1732   
                    {
 1733   1733   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1734   1734   
        use ::aws_smithy_http_server::plugin::Plugin;
 1735   1735   
        let svc = crate::operation_shape::StringPayload::from_handler(handler);
 1736   1736   
        let svc = self.model_plugin.apply(svc);
 1737   1737   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1738   1738   
            .apply(svc);
 1739   1739   
        let svc = self.http_plugin.apply(svc);
 1740   1740   
        self.string_payload_custom(svc)
@@ -1766,1766 +1846,1846 @@
 1786   1786   
                            <
 1787   1787   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1788   1788   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1789   1789   
                                    RestJsonExtras<L>,
 1790   1790   
                                    crate::operation_shape::StringPayload,
 1791   1791   
                                    ModelPl::Output
 1792   1792   
                                >
 1793   1793   
                            >::Output
 1794   1794   
                        >,
 1795   1795   
 1796         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1797         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1796  +
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
        1797  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1798   1798   
 1799   1799   
                    {
 1800   1800   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1801   1801   
        use ::aws_smithy_http_server::plugin::Plugin;
 1802   1802   
        let svc = crate::operation_shape::StringPayload::from_service(service);
 1803   1803   
        let svc = self.model_plugin.apply(svc);
 1804   1804   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1805   1805   
            .apply(svc);
 1806   1806   
        let svc = self.http_plugin.apply(svc);
 1807   1807   
        self.string_payload_custom(svc)
 1808   1808   
    }
 1809   1809   
 1810   1810   
    /// Sets the [`StringPayload`](crate::operation_shape::StringPayload) to a custom [`Service`](tower::Service).
 1811   1811   
    /// not constrained by the Smithy contract.
 1812   1812   
    fn string_payload_custom<S>(mut self, svc: S) -> Self
 1813   1813   
    where
 1814   1814   
        S: ::tower::Service<
 1815         -
                ::http::Request<Body>,
 1816         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1815  +
                ::http_1x::Request<Body>,
        1816  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1817   1817   
                Error = ::std::convert::Infallible,
 1818   1818   
            > + Clone
 1819   1819   
            + Send
 1820   1820   
            + 'static,
 1821   1821   
        S::Future: Send + 'static,
 1822   1822   
    {
 1823   1823   
        self.string_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1824   1824   
        self
 1825   1825   
    }
 1826   1826   
}
@@ -2128,2128 +2351,2351 @@
 2148   2148   
        Ok(())
 2149   2149   
    }
 2150   2150   
}
 2151   2151   
 2152   2152   
impl std::error::Error for MissingOperationsError {}
 2153   2153   
 2154   2154   
mod request_specs {
 2155   2155   
    pub(super) fn case_insensitive_error_operation(
 2156   2156   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2157   2157   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2158         -
                    ::http::Method::POST,
        2158  +
                    ::http_1x::Method::POST,
 2159   2159   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2160   2160   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2161   2161   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2162   2162   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("error-sensitive")),
 2163   2163   
]),
 2164   2164   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2165   2165   
])
 2166   2166   
                        )
 2167   2167   
                    ),
 2168   2168   
                )
 2169   2169   
    }
 2170   2170   
    pub(super) fn empty_struct_with_content_on_wire_op(
 2171   2171   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2172   2172   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2173         -
                    ::http::Method::GET,
        2173  +
                    ::http_1x::Method::GET,
 2174   2174   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2175   2175   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2176   2176   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2177   2177   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("empty-struct-with-content-on-wire-op")),
 2178   2178   
]),
 2179   2179   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2180   2180   
])
 2181   2181   
                        )
 2182   2182   
                    ),
 2183   2183   
                )
 2184   2184   
    }
 2185   2185   
    pub(super) fn enum_query() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2186   2186   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2187         -
                    ::http::Method::GET,
        2187  +
                    ::http_1x::Method::GET,
 2188   2188   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2189   2189   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2190   2190   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2191   2191   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("foo")),
 2192   2192   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Label,
 2193   2193   
]),
 2194   2194   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2195   2195   
])
 2196   2196   
                        )
 2197   2197   
                    ),
 2198   2198   
                )
 2199   2199   
    }
 2200   2200   
    pub(super) fn escaped_string_values(
 2201   2201   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2202   2202   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2203         -
                    ::http::Method::POST,
        2203  +
                    ::http_1x::Method::POST,
 2204   2204   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2205   2205   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2206   2206   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2207   2207   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("escaped-string-values")),
 2208   2208   
]),
 2209   2209   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2210   2210   
])
 2211   2211   
                        )
 2212   2212   
                    ),
 2213   2213   
                )
 2214   2214   
    }
 2215   2215   
    pub(super) fn http_query_params_only_operation(
 2216   2216   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2217   2217   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2218         -
                    ::http::Method::GET,
        2218  +
                    ::http_1x::Method::GET,
 2219   2219   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2220   2220   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2221   2221   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2222   2222   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("http-query-params-only")),
 2223   2223   
]),
 2224   2224   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2225   2225   
])
 2226   2226   
                        )
 2227   2227   
                    ),
 2228   2228   
                )
 2229   2229   
    }
 2230   2230   
    pub(super) fn map_with_enum_key_op(
 2231   2231   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2232   2232   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2233         -
                    ::http::Method::POST,
        2233  +
                    ::http_1x::Method::POST,
 2234   2234   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2235   2235   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2236   2236   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2237   2237   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("map-with-enum-key")),
 2238   2238   
]),
 2239   2239   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2240   2240   
])
 2241   2241   
                        )
 2242   2242   
                    ),
 2243   2243   
                )
 2244   2244   
    }
 2245   2245   
    pub(super) fn null_in_non_sparse(
 2246   2246   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2247   2247   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2248         -
                    ::http::Method::POST,
        2248  +
                    ::http_1x::Method::POST,
 2249   2249   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2250   2250   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2251   2251   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2252   2252   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("null-in-non-sparse")),
 2253   2253   
]),
 2254   2254   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2255   2255   
])
 2256   2256   
                        )
 2257   2257   
                    ),
 2258   2258   
                )
 2259   2259   
    }
 2260   2260   
    pub(super) fn primitive_int_header(
 2261   2261   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2262   2262   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2263         -
                    ::http::Method::POST,
        2263  +
                    ::http_1x::Method::POST,
 2264   2264   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2265   2265   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2266   2266   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2267   2267   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("primitive")),
 2268   2268   
]),
 2269   2269   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2270   2270   
])
 2271   2271   
                        )
 2272   2272   
                    ),
 2273   2273   
                )
 2274   2274   
    }
 2275   2275   
    pub(super) fn primitive_int_op() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2276   2276   
    {
 2277   2277   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2278         -
                    ::http::Method::POST,
        2278  +
                    ::http_1x::Method::POST,
 2279   2279   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2280   2280   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2281   2281   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2282   2282   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("primitive-document")),
 2283   2283   
]),
 2284   2284   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2285   2285   
])
 2286   2286   
                        )
 2287   2287   
                    ),
 2288   2288   
                )
 2289   2289   
    }
 2290   2290   
    pub(super) fn query_precedence() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2291   2291   
    {
 2292   2292   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2293         -
                    ::http::Method::POST,
        2293  +
                    ::http_1x::Method::POST,
 2294   2294   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2295   2295   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2296   2296   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2297   2297   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("Precedence")),
 2298   2298   
]),
 2299   2299   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2300   2300   
])
 2301   2301   
                        )
 2302   2302   
                    ),
 2303   2303   
                )
 2304   2304   
    }
 2305   2305   
    pub(super) fn status_response() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec
 2306   2306   
    {
 2307   2307   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2308         -
                    ::http::Method::POST,
        2308  +
                    ::http_1x::Method::POST,
 2309   2309   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2310   2310   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2311   2311   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2312   2312   
]),
 2313   2313   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2314   2314   
])
 2315   2315   
                        )
 2316   2316   
                    ),
 2317   2317   
                )
 2318   2318   
    }
 2319   2319   
    pub(super) fn string_payload() -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2320   2320   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2321         -
                    ::http::Method::POST,
        2321  +
                    ::http_1x::Method::POST,
 2322   2322   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2323   2323   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2324   2324   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2325   2325   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("StringPayload")),
 2326   2326   
]),
 2327   2327   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2328   2328   
])
 2329   2329   
                        )
 2330   2330   
                    ),
 2331   2331   
                )
@@ -2470,2470 +2531,2531 @@
 2490   2490   
    ) -> RestJsonExtras<
 2491   2491   
        ::aws_smithy_http_server::routing::RoutingService<
 2492   2492   
            ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 2493   2493   
                ::aws_smithy_http_server::routing::Route<B>,
 2494   2494   
            >,
 2495   2495   
            ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2496   2496   
        >,
 2497   2497   
    >
 2498   2498   
    where
 2499   2499   
        S: ::tower::Service<
 2500         -
            ::http::Request<B>,
 2501         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        2500  +
            ::http_1x::Request<B>,
        2501  +
            Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 2502   2502   
            Error = std::convert::Infallible,
 2503   2503   
        >,
 2504   2504   
        S: Clone + Send + 'static,
 2505   2505   
        S::Future: Send + 'static,
 2506   2506   
    {
 2507   2507   
        self.layer(&::tower::layer::layer_fn(
 2508   2508   
            ::aws_smithy_http_server::routing::Route::new,
 2509   2509   
        ))
 2510   2510   
    }
 2511   2511   
}

tmp-codegen-diff/codegen-server-test/rest_json_validation-http0x/rust-server-codegen/Cargo.toml

@@ -0,1 +0,60 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "rest_json_validation-http0x"
           4  +
version = "0.0.1"
           5  +
authors = ["protocoltest@example.com"]
           6  +
description = "test"
           7  +
edition = "2021"
           8  +
           9  +
[package.metadata.smithy]
          10  +
codegen-version = "ci"
          11  +
protocol = "aws.protocols#restJson1"
          12  +
[dependencies.aws-smithy-json]
          13  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
          14  +
[dependencies.aws-smithy-legacy-http]
          15  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          16  +
[dependencies.aws-smithy-legacy-http-server]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
          18  +
[dependencies.aws-smithy-runtime-api]
          19  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          20  +
features = ["http-02x"]
          21  +
[dependencies.aws-smithy-types]
          22  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          23  +
features = ["http-body-0-4-x"]
          24  +
[dependencies.form_urlencoded]
          25  +
version = "1"
          26  +
[dependencies.futures-util]
          27  +
version = "0.3"
          28  +
[dependencies.http]
          29  +
version = "0.2.9"
          30  +
[dependencies.hyper]
          31  +
version = "0.14.26"
          32  +
[dependencies.mime]
          33  +
version = "0.3"
          34  +
[dependencies.pin-project-lite]
          35  +
version = "0.2"
          36  +
[dependencies.regex]
          37  +
version = "1.5.5"
          38  +
[dependencies.tower]
          39  +
version = "0.4"
          40  +
[dependencies.tracing]
          41  +
version = "0.1"
          42  +
[dev-dependencies.aws-smithy-protocol-test]
          43  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
          44  +
[dev-dependencies.bytes]
          45  +
version = "1.4.0"
          46  +
[dev-dependencies.pretty_assertions]
          47  +
version = "1.3.0"
          48  +
[dev-dependencies.tokio]
          49  +
version = "1.23.1"
          50  +
features = ["macros", "test-util", "rt-multi-thread"]
          51  +
[dev-dependencies.tracing-test]
          52  +
version = "0.2.5"
          53  +
features = ["no-env-filter"]
          54  +
[features]
          55  +
rt-tokio = ["aws-smithy-types/rt-tokio"]
          56  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          57  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
          58  +
default = ["rt-tokio", "request-id"]
          59  +
          60  +

tmp-codegen-diff/codegen-server-test/rest_json_validation-http0x/rust-server-codegen/src/constrained.rs

@@ -0,1 +0,192 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
pub(crate) mod pattern_map_override_constrained {
           4  +
           5  +
    #[derive(Debug, Clone)]
           6  +
    pub(crate) struct PatternMapOverrideConstrained(
           7  +
        pub(crate)  std::collections::HashMap<
           8  +
            crate::model::pattern_map_override::Key,
           9  +
            crate::model::pattern_map_override::Value,
          10  +
        >,
          11  +
    );
          12  +
          13  +
    impl crate::constrained::Constrained for PatternMapOverrideConstrained {
          14  +
        type Unconstrained = crate::unconstrained::pattern_map_override_unconstrained::PatternMapOverrideUnconstrained;
          15  +
    }
          16  +
    impl
          17  +
        ::std::convert::From<
          18  +
            ::std::collections::HashMap<
          19  +
                crate::model::pattern_map_override::Key,
          20  +
                crate::model::pattern_map_override::Value,
          21  +
            >,
          22  +
        > for PatternMapOverrideConstrained
          23  +
    {
          24  +
        fn from(
          25  +
            v: ::std::collections::HashMap<
          26  +
                crate::model::pattern_map_override::Key,
          27  +
                crate::model::pattern_map_override::Value,
          28  +
            >,
          29  +
        ) -> Self {
          30  +
            Self(v)
          31  +
        }
          32  +
    }
          33  +
          34  +
    impl ::std::convert::From<PatternMapOverrideConstrained>
          35  +
        for ::std::collections::HashMap<
          36  +
            crate::model::pattern_map_override::Key,
          37  +
            crate::model::pattern_map_override::Value,
          38  +
        >
          39  +
    {
          40  +
        fn from(v: PatternMapOverrideConstrained) -> Self {
          41  +
            v.0
          42  +
        }
          43  +
    }
          44  +
}
          45  +
pub(crate) mod pattern_list_override_constrained {
          46  +
          47  +
    #[derive(Debug, Clone)]
          48  +
    pub(crate) struct PatternListOverrideConstrained(
          49  +
        pub(crate) std::vec::Vec<crate::model::pattern_list_override::Member>,
          50  +
    );
          51  +
          52  +
    impl crate::constrained::Constrained for PatternListOverrideConstrained {
          53  +
        type Unconstrained = crate::unconstrained::pattern_list_override_unconstrained::PatternListOverrideUnconstrained;
          54  +
    }
          55  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::pattern_list_override::Member>>
          56  +
        for PatternListOverrideConstrained
          57  +
    {
          58  +
        fn from(v: ::std::vec::Vec<crate::model::pattern_list_override::Member>) -> Self {
          59  +
            Self(v)
          60  +
        }
          61  +
    }
          62  +
          63  +
    impl ::std::convert::From<PatternListOverrideConstrained>
          64  +
        for ::std::vec::Vec<crate::model::pattern_list_override::Member>
          65  +
    {
          66  +
        fn from(v: PatternListOverrideConstrained) -> Self {
          67  +
            v.0
          68  +
        }
          69  +
    }
          70  +
}
          71  +
pub(crate) mod pattern_map_constrained {
          72  +
          73  +
    #[derive(Debug, Clone)]
          74  +
    pub(crate) struct PatternMapConstrained(
          75  +
        pub(crate) 
          76  +
            std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
          77  +
    );
          78  +
          79  +
    impl crate::constrained::Constrained for PatternMapConstrained {
          80  +
        type Unconstrained =
          81  +
            crate::unconstrained::pattern_map_unconstrained::PatternMapUnconstrained;
          82  +
    }
          83  +
    impl
          84  +
        ::std::convert::From<
          85  +
            ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
          86  +
        > for PatternMapConstrained
          87  +
    {
          88  +
        fn from(
          89  +
            v: ::std::collections::HashMap<
          90  +
                crate::model::PatternString,
          91  +
                crate::model::PatternString,
          92  +
            >,
          93  +
        ) -> Self {
          94  +
            Self(v)
          95  +
        }
          96  +
    }
          97  +
          98  +
    impl ::std::convert::From<PatternMapConstrained>
          99  +
        for ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>
         100  +
    {
         101  +
        fn from(v: PatternMapConstrained) -> Self {
         102  +
            v.0
         103  +
        }
         104  +
    }
         105  +
}
         106  +
pub(crate) mod pattern_list_constrained {
         107  +
         108  +
    #[derive(Debug, Clone)]
         109  +
    pub(crate) struct PatternListConstrained(pub(crate) std::vec::Vec<crate::model::PatternString>);
         110  +
         111  +
    impl crate::constrained::Constrained for PatternListConstrained {
         112  +
        type Unconstrained =
         113  +
            crate::unconstrained::pattern_list_unconstrained::PatternListUnconstrained;
         114  +
    }
         115  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::PatternString>> for PatternListConstrained {
         116  +
        fn from(v: ::std::vec::Vec<crate::model::PatternString>) -> Self {
         117  +
            Self(v)
         118  +
        }
         119  +
    }
         120  +
         121  +
    impl ::std::convert::From<PatternListConstrained> for ::std::vec::Vec<crate::model::PatternString> {
         122  +
        fn from(v: PatternListConstrained) -> Self {
         123  +
            v.0
         124  +
        }
         125  +
    }
         126  +
}
         127  +
pub(crate) mod enum_map_constrained {
         128  +
         129  +
    #[derive(Debug, Clone)]
         130  +
    pub(crate) struct EnumMapConstrained(
         131  +
        pub(crate) std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
         132  +
    );
         133  +
         134  +
    impl crate::constrained::Constrained for EnumMapConstrained {
         135  +
        type Unconstrained = crate::unconstrained::enum_map_unconstrained::EnumMapUnconstrained;
         136  +
    }
         137  +
    impl
         138  +
        ::std::convert::From<
         139  +
            ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
         140  +
        > for EnumMapConstrained
         141  +
    {
         142  +
        fn from(
         143  +
            v: ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
         144  +
        ) -> Self {
         145  +
            Self(v)
         146  +
        }
         147  +
    }
         148  +
         149  +
    impl ::std::convert::From<EnumMapConstrained>
         150  +
        for ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>
         151  +
    {
         152  +
        fn from(v: EnumMapConstrained) -> Self {
         153  +
            v.0
         154  +
        }
         155  +
    }
         156  +
}
         157  +
pub(crate) mod enum_list_constrained {
         158  +
         159  +
    #[derive(Debug, Clone)]
         160  +
    pub(crate) struct EnumListConstrained(pub(crate) std::vec::Vec<crate::model::EnumString>);
         161  +
         162  +
    impl crate::constrained::Constrained for EnumListConstrained {
         163  +
        type Unconstrained = crate::unconstrained::enum_list_unconstrained::EnumListUnconstrained;
         164  +
    }
         165  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::EnumString>> for EnumListConstrained {
         166  +
        fn from(v: ::std::vec::Vec<crate::model::EnumString>) -> Self {
         167  +
            Self(v)
         168  +
        }
         169  +
    }
         170  +
         171  +
    impl ::std::convert::From<EnumListConstrained> for ::std::vec::Vec<crate::model::EnumString> {
         172  +
        fn from(v: EnumListConstrained) -> Self {
         173  +
            v.0
         174  +
        }
         175  +
    }
         176  +
}
         177  +
         178  +
/*
         179  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
         180  +
 * SPDX-License-Identifier: Apache-2.0
         181  +
 */
         182  +
         183  +
pub(crate) trait Constrained {
         184  +
    type Unconstrained;
         185  +
}
         186  +
         187  +
#[derive(Debug, Clone)]
         188  +
#[allow(dead_code)]
         189  +
pub(crate) enum MaybeConstrained<T: Constrained> {
         190  +
    Constrained(T),
         191  +
    Unconstrained(T::Unconstrained),
         192  +
}

tmp-codegen-diff/codegen-server-test/rest_json_validation-http0x/rust-server-codegen/src/error.rs

@@ -0,1 +0,607 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Error type for the `SensitiveValidation` operation.
           3  +
/// Each variant represents an error that can occur for the `SensitiveValidation` operation.
           4  +
#[derive(::std::fmt::Debug)]
           5  +
pub enum SensitiveValidationError {
           6  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           7  +
    ValidationException(crate::error::ValidationException),
           8  +
}
           9  +
impl ::std::fmt::Display for SensitiveValidationError {
          10  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          11  +
        match &self {
          12  +
            SensitiveValidationError::ValidationException(_inner) => _inner.fmt(f),
          13  +
        }
          14  +
    }
          15  +
}
          16  +
impl SensitiveValidationError {
          17  +
    /// Returns `true` if the error kind is `SensitiveValidationError::ValidationException`.
          18  +
    pub fn is_validation_exception(&self) -> bool {
          19  +
        matches!(&self, SensitiveValidationError::ValidationException(_))
          20  +
    }
          21  +
    /// Returns the error name string by matching the correct variant.
          22  +
    pub fn name(&self) -> &'static str {
          23  +
        match &self {
          24  +
            SensitiveValidationError::ValidationException(_inner) => _inner.name(),
          25  +
        }
          26  +
    }
          27  +
}
          28  +
impl ::std::error::Error for SensitiveValidationError {
          29  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          30  +
        match &self {
          31  +
            SensitiveValidationError::ValidationException(_inner) => Some(_inner),
          32  +
        }
          33  +
    }
          34  +
}
          35  +
impl ::std::convert::From<crate::error::ValidationException>
          36  +
    for crate::error::SensitiveValidationError
          37  +
{
          38  +
    fn from(variant: crate::error::ValidationException) -> crate::error::SensitiveValidationError {
          39  +
        Self::ValidationException(variant)
          40  +
    }
          41  +
}
          42  +
          43  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          44  +
#[derive(
          45  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          46  +
)]
          47  +
pub struct ValidationException {
          48  +
    /// A summary of the validation failure.
          49  +
    pub message: ::std::string::String,
          50  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          51  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          52  +
}
          53  +
impl ValidationException {
          54  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          55  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
          56  +
        self.field_list.as_deref()
          57  +
    }
          58  +
}
          59  +
impl ValidationException {
          60  +
    /// Returns the error message.
          61  +
    pub fn message(&self) -> &str {
          62  +
        &self.message
          63  +
    }
          64  +
    #[doc(hidden)]
          65  +
    /// Returns the error name.
          66  +
    pub fn name(&self) -> &'static str {
          67  +
        "ValidationException"
          68  +
    }
          69  +
}
          70  +
impl ::std::fmt::Display for ValidationException {
          71  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          72  +
        ::std::write!(f, "ValidationException")?;
          73  +
        {
          74  +
            ::std::write!(f, ": {}", &self.message)?;
          75  +
        }
          76  +
        Ok(())
          77  +
    }
          78  +
}
          79  +
impl ::std::error::Error for ValidationException {}
          80  +
impl ValidationException {
          81  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
          82  +
    pub fn builder() -> crate::error::validation_exception::Builder {
          83  +
        crate::error::validation_exception::Builder::default()
          84  +
    }
          85  +
}
          86  +
          87  +
/// Error type for the `RecursiveStructures` operation.
          88  +
/// Each variant represents an error that can occur for the `RecursiveStructures` operation.
          89  +
#[derive(::std::fmt::Debug)]
          90  +
pub enum RecursiveStructuresError {
          91  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          92  +
    ValidationException(crate::error::ValidationException),
          93  +
}
          94  +
impl ::std::fmt::Display for RecursiveStructuresError {
          95  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          96  +
        match &self {
          97  +
            RecursiveStructuresError::ValidationException(_inner) => _inner.fmt(f),
          98  +
        }
          99  +
    }
         100  +
}
         101  +
impl RecursiveStructuresError {
         102  +
    /// Returns `true` if the error kind is `RecursiveStructuresError::ValidationException`.
         103  +
    pub fn is_validation_exception(&self) -> bool {
         104  +
        matches!(&self, RecursiveStructuresError::ValidationException(_))
         105  +
    }
         106  +
    /// Returns the error name string by matching the correct variant.
         107  +
    pub fn name(&self) -> &'static str {
         108  +
        match &self {
         109  +
            RecursiveStructuresError::ValidationException(_inner) => _inner.name(),
         110  +
        }
         111  +
    }
         112  +
}
         113  +
impl ::std::error::Error for RecursiveStructuresError {
         114  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         115  +
        match &self {
         116  +
            RecursiveStructuresError::ValidationException(_inner) => Some(_inner),
         117  +
        }
         118  +
    }
         119  +
}
         120  +
impl ::std::convert::From<crate::error::ValidationException>
         121  +
    for crate::error::RecursiveStructuresError
         122  +
{
         123  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RecursiveStructuresError {
         124  +
        Self::ValidationException(variant)
         125  +
    }
         126  +
}
         127  +
         128  +
/// Error type for the `MalformedUniqueItems` operation.
         129  +
/// Each variant represents an error that can occur for the `MalformedUniqueItems` operation.
         130  +
#[derive(::std::fmt::Debug)]
         131  +
pub enum MalformedUniqueItemsError {
         132  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         133  +
    ValidationException(crate::error::ValidationException),
         134  +
}
         135  +
impl ::std::fmt::Display for MalformedUniqueItemsError {
         136  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         137  +
        match &self {
         138  +
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.fmt(f),
         139  +
        }
         140  +
    }
         141  +
}
         142  +
impl MalformedUniqueItemsError {
         143  +
    /// Returns `true` if the error kind is `MalformedUniqueItemsError::ValidationException`.
         144  +
    pub fn is_validation_exception(&self) -> bool {
         145  +
        matches!(&self, MalformedUniqueItemsError::ValidationException(_))
         146  +
    }
         147  +
    /// Returns the error name string by matching the correct variant.
         148  +
    pub fn name(&self) -> &'static str {
         149  +
        match &self {
         150  +
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.name(),
         151  +
        }
         152  +
    }
         153  +
}
         154  +
impl ::std::error::Error for MalformedUniqueItemsError {
         155  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         156  +
        match &self {
         157  +
            MalformedUniqueItemsError::ValidationException(_inner) => Some(_inner),
         158  +
        }
         159  +
    }
         160  +
}
         161  +
impl ::std::convert::From<crate::error::ValidationException>
         162  +
    for crate::error::MalformedUniqueItemsError
         163  +
{
         164  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedUniqueItemsError {
         165  +
        Self::ValidationException(variant)
         166  +
    }
         167  +
}
         168  +
         169  +
/// Error type for the `MalformedRequired` operation.
         170  +
/// Each variant represents an error that can occur for the `MalformedRequired` operation.
         171  +
#[derive(::std::fmt::Debug)]
         172  +
pub enum MalformedRequiredError {
         173  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         174  +
    ValidationException(crate::error::ValidationException),
         175  +
}
         176  +
impl ::std::fmt::Display for MalformedRequiredError {
         177  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         178  +
        match &self {
         179  +
            MalformedRequiredError::ValidationException(_inner) => _inner.fmt(f),
         180  +
        }
         181  +
    }
         182  +
}
         183  +
impl MalformedRequiredError {
         184  +
    /// Returns `true` if the error kind is `MalformedRequiredError::ValidationException`.
         185  +
    pub fn is_validation_exception(&self) -> bool {
         186  +
        matches!(&self, MalformedRequiredError::ValidationException(_))
         187  +
    }
         188  +
    /// Returns the error name string by matching the correct variant.
         189  +
    pub fn name(&self) -> &'static str {
         190  +
        match &self {
         191  +
            MalformedRequiredError::ValidationException(_inner) => _inner.name(),
         192  +
        }
         193  +
    }
         194  +
}
         195  +
impl ::std::error::Error for MalformedRequiredError {
         196  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         197  +
        match &self {
         198  +
            MalformedRequiredError::ValidationException(_inner) => Some(_inner),
         199  +
        }
         200  +
    }
         201  +
}
         202  +
impl ::std::convert::From<crate::error::ValidationException>
         203  +
    for crate::error::MalformedRequiredError
         204  +
{
         205  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedRequiredError {
         206  +
        Self::ValidationException(variant)
         207  +
    }
         208  +
}
         209  +
         210  +
/// Error type for the `MalformedRangeOverride` operation.
         211  +
/// Each variant represents an error that can occur for the `MalformedRangeOverride` operation.
         212  +
#[derive(::std::fmt::Debug)]
         213  +
pub enum MalformedRangeOverrideError {
         214  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         215  +
    ValidationException(crate::error::ValidationException),
         216  +
}
         217  +
impl ::std::fmt::Display for MalformedRangeOverrideError {
         218  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         219  +
        match &self {
         220  +
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.fmt(f),
         221  +
        }
         222  +
    }
         223  +
}
         224  +
impl MalformedRangeOverrideError {
         225  +
    /// Returns `true` if the error kind is `MalformedRangeOverrideError::ValidationException`.
         226  +
    pub fn is_validation_exception(&self) -> bool {
         227  +
        matches!(&self, MalformedRangeOverrideError::ValidationException(_))
         228  +
    }
         229  +
    /// Returns the error name string by matching the correct variant.
         230  +
    pub fn name(&self) -> &'static str {
         231  +
        match &self {
         232  +
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.name(),
         233  +
        }
         234  +
    }
         235  +
}
         236  +
impl ::std::error::Error for MalformedRangeOverrideError {
         237  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         238  +
        match &self {
         239  +
            MalformedRangeOverrideError::ValidationException(_inner) => Some(_inner),
         240  +
        }
         241  +
    }
         242  +
}
         243  +
impl ::std::convert::From<crate::error::ValidationException>
         244  +
    for crate::error::MalformedRangeOverrideError
         245  +
{
         246  +
    fn from(
         247  +
        variant: crate::error::ValidationException,
         248  +
    ) -> crate::error::MalformedRangeOverrideError {
         249  +
        Self::ValidationException(variant)
         250  +
    }
         251  +
}
         252  +
         253  +
/// Error type for the `MalformedRange` operation.
         254  +
/// Each variant represents an error that can occur for the `MalformedRange` operation.
         255  +
#[derive(::std::fmt::Debug)]
         256  +
pub enum MalformedRangeError {
         257  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         258  +
    ValidationException(crate::error::ValidationException),
         259  +
}
         260  +
impl ::std::fmt::Display for MalformedRangeError {
         261  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         262  +
        match &self {
         263  +
            MalformedRangeError::ValidationException(_inner) => _inner.fmt(f),
         264  +
        }
         265  +
    }
         266  +
}
         267  +
impl MalformedRangeError {
         268  +
    /// Returns `true` if the error kind is `MalformedRangeError::ValidationException`.
         269  +
    pub fn is_validation_exception(&self) -> bool {
         270  +
        matches!(&self, MalformedRangeError::ValidationException(_))
         271  +
    }
         272  +
    /// Returns the error name string by matching the correct variant.
         273  +
    pub fn name(&self) -> &'static str {
         274  +
        match &self {
         275  +
            MalformedRangeError::ValidationException(_inner) => _inner.name(),
         276  +
        }
         277  +
    }
         278  +
}
         279  +
impl ::std::error::Error for MalformedRangeError {
         280  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         281  +
        match &self {
         282  +
            MalformedRangeError::ValidationException(_inner) => Some(_inner),
         283  +
        }
         284  +
    }
         285  +
}
         286  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MalformedRangeError {
         287  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedRangeError {
         288  +
        Self::ValidationException(variant)
         289  +
    }
         290  +
}
         291  +
         292  +
/// Error type for the `MalformedPatternOverride` operation.
         293  +
/// Each variant represents an error that can occur for the `MalformedPatternOverride` operation.
         294  +
#[derive(::std::fmt::Debug)]
         295  +
pub enum MalformedPatternOverrideError {
         296  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         297  +
    ValidationException(crate::error::ValidationException),
         298  +
}
         299  +
impl ::std::fmt::Display for MalformedPatternOverrideError {
         300  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         301  +
        match &self {
         302  +
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.fmt(f),
         303  +
        }
         304  +
    }
         305  +
}
         306  +
impl MalformedPatternOverrideError {
         307  +
    /// Returns `true` if the error kind is `MalformedPatternOverrideError::ValidationException`.
         308  +
    pub fn is_validation_exception(&self) -> bool {
         309  +
        matches!(&self, MalformedPatternOverrideError::ValidationException(_))
         310  +
    }
         311  +
    /// Returns the error name string by matching the correct variant.
         312  +
    pub fn name(&self) -> &'static str {
         313  +
        match &self {
         314  +
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.name(),
         315  +
        }
         316  +
    }
         317  +
}
         318  +
impl ::std::error::Error for MalformedPatternOverrideError {
         319  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         320  +
        match &self {
         321  +
            MalformedPatternOverrideError::ValidationException(_inner) => Some(_inner),
         322  +
        }
         323  +
    }
         324  +
}
         325  +
impl ::std::convert::From<crate::error::ValidationException>
         326  +
    for crate::error::MalformedPatternOverrideError
         327  +
{
         328  +
    fn from(
         329  +
        variant: crate::error::ValidationException,
         330  +
    ) -> crate::error::MalformedPatternOverrideError {
         331  +
        Self::ValidationException(variant)
         332  +
    }
         333  +
}
         334  +
         335  +
/// Error type for the `MalformedPattern` operation.
         336  +
/// Each variant represents an error that can occur for the `MalformedPattern` operation.
         337  +
#[derive(::std::fmt::Debug)]
         338  +
pub enum MalformedPatternError {
         339  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         340  +
    ValidationException(crate::error::ValidationException),
         341  +
}
         342  +
impl ::std::fmt::Display for MalformedPatternError {
         343  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         344  +
        match &self {
         345  +
            MalformedPatternError::ValidationException(_inner) => _inner.fmt(f),
         346  +
        }
         347  +
    }
         348  +
}
         349  +
impl MalformedPatternError {
         350  +
    /// Returns `true` if the error kind is `MalformedPatternError::ValidationException`.
         351  +
    pub fn is_validation_exception(&self) -> bool {
         352  +
        matches!(&self, MalformedPatternError::ValidationException(_))
         353  +
    }
         354  +
    /// Returns the error name string by matching the correct variant.
         355  +
    pub fn name(&self) -> &'static str {
         356  +
        match &self {
         357  +
            MalformedPatternError::ValidationException(_inner) => _inner.name(),
         358  +
        }
         359  +
    }
         360  +
}
         361  +
impl ::std::error::Error for MalformedPatternError {
         362  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         363  +
        match &self {
         364  +
            MalformedPatternError::ValidationException(_inner) => Some(_inner),
         365  +
        }
         366  +
    }
         367  +
}
         368  +
impl ::std::convert::From<crate::error::ValidationException>
         369  +
    for crate::error::MalformedPatternError
         370  +
{
         371  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedPatternError {
         372  +
        Self::ValidationException(variant)
         373  +
    }
         374  +
}
         375  +
         376  +
/// Error type for the `MalformedLengthQueryString` operation.
         377  +
/// Each variant represents an error that can occur for the `MalformedLengthQueryString` operation.
         378  +
#[derive(::std::fmt::Debug)]
         379  +
pub enum MalformedLengthQueryStringError {
         380  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         381  +
    ValidationException(crate::error::ValidationException),
         382  +
}
         383  +
impl ::std::fmt::Display for MalformedLengthQueryStringError {
         384  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         385  +
        match &self {
         386  +
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.fmt(f),
         387  +
        }
         388  +
    }
         389  +
}
         390  +
impl MalformedLengthQueryStringError {
         391  +
    /// Returns `true` if the error kind is `MalformedLengthQueryStringError::ValidationException`.
         392  +
    pub fn is_validation_exception(&self) -> bool {
         393  +
        matches!(
         394  +
            &self,
         395  +
            MalformedLengthQueryStringError::ValidationException(_)
         396  +
        )
         397  +
    }
         398  +
    /// Returns the error name string by matching the correct variant.
         399  +
    pub fn name(&self) -> &'static str {
         400  +
        match &self {
         401  +
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.name(),
         402  +
        }
         403  +
    }
         404  +
}
         405  +
impl ::std::error::Error for MalformedLengthQueryStringError {
         406  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         407  +
        match &self {
         408  +
            MalformedLengthQueryStringError::ValidationException(_inner) => Some(_inner),
         409  +
        }
         410  +
    }
         411  +
}
         412  +
impl ::std::convert::From<crate::error::ValidationException>
         413  +
    for crate::error::MalformedLengthQueryStringError
         414  +
{
         415  +
    fn from(
         416  +
        variant: crate::error::ValidationException,
         417  +
    ) -> crate::error::MalformedLengthQueryStringError {
         418  +
        Self::ValidationException(variant)
         419  +
    }
         420  +
}
         421  +
         422  +
/// Error type for the `MalformedLengthOverride` operation.
         423  +
/// Each variant represents an error that can occur for the `MalformedLengthOverride` operation.
         424  +
#[derive(::std::fmt::Debug)]
         425  +
pub enum MalformedLengthOverrideError {
         426  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         427  +
    ValidationException(crate::error::ValidationException),
         428  +
}
         429  +
impl ::std::fmt::Display for MalformedLengthOverrideError {
         430  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         431  +
        match &self {
         432  +
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.fmt(f),
         433  +
        }
         434  +
    }
         435  +
}
         436  +
impl MalformedLengthOverrideError {
         437  +
    /// Returns `true` if the error kind is `MalformedLengthOverrideError::ValidationException`.
         438  +
    pub fn is_validation_exception(&self) -> bool {
         439  +
        matches!(&self, MalformedLengthOverrideError::ValidationException(_))
         440  +
    }
         441  +
    /// Returns the error name string by matching the correct variant.
         442  +
    pub fn name(&self) -> &'static str {
         443  +
        match &self {
         444  +
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.name(),
         445  +
        }
         446  +
    }
         447  +
}
         448  +
impl ::std::error::Error for MalformedLengthOverrideError {
         449  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         450  +
        match &self {
         451  +
            MalformedLengthOverrideError::ValidationException(_inner) => Some(_inner),
         452  +
        }
         453  +
    }
         454  +
}
         455  +
impl ::std::convert::From<crate::error::ValidationException>
         456  +
    for crate::error::MalformedLengthOverrideError
         457  +
{
         458  +
    fn from(
         459  +
        variant: crate::error::ValidationException,
         460  +
    ) -> crate::error::MalformedLengthOverrideError {
         461  +
        Self::ValidationException(variant)
         462  +
    }
         463  +
}
         464  +
         465  +
/// Error type for the `MalformedLength` operation.
         466  +
/// Each variant represents an error that can occur for the `MalformedLength` operation.
         467  +
#[derive(::std::fmt::Debug)]
         468  +
pub enum MalformedLengthError {
         469  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         470  +
    ValidationException(crate::error::ValidationException),
         471  +
}
         472  +
impl ::std::fmt::Display for MalformedLengthError {
         473  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         474  +
        match &self {
         475  +
            MalformedLengthError::ValidationException(_inner) => _inner.fmt(f),
         476  +
        }
         477  +
    }
         478  +
}
         479  +
impl MalformedLengthError {
         480  +
    /// Returns `true` if the error kind is `MalformedLengthError::ValidationException`.
         481  +
    pub fn is_validation_exception(&self) -> bool {
         482  +
        matches!(&self, MalformedLengthError::ValidationException(_))
         483  +
    }
         484  +
    /// Returns the error name string by matching the correct variant.
         485  +
    pub fn name(&self) -> &'static str {
         486  +
        match &self {
         487  +
            MalformedLengthError::ValidationException(_inner) => _inner.name(),
         488  +
        }
         489  +
    }
         490  +
}
         491  +
impl ::std::error::Error for MalformedLengthError {
         492  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         493  +
        match &self {
         494  +
            MalformedLengthError::ValidationException(_inner) => Some(_inner),
         495  +
        }
         496  +
    }
         497  +
}
         498  +
impl ::std::convert::From<crate::error::ValidationException>
         499  +
    for crate::error::MalformedLengthError
         500  +
{
         501  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedLengthError {
         502  +
        Self::ValidationException(variant)
         503  +
    }
         504  +
}
         505  +
         506  +
/// Error type for the `MalformedEnum` operation.
         507  +
/// Each variant represents an error that can occur for the `MalformedEnum` operation.
         508  +
#[derive(::std::fmt::Debug)]
         509  +
pub enum MalformedEnumError {
         510  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         511  +
    ValidationException(crate::error::ValidationException),
         512  +
}
         513  +
impl ::std::fmt::Display for MalformedEnumError {
         514  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         515  +
        match &self {
         516  +
            MalformedEnumError::ValidationException(_inner) => _inner.fmt(f),
         517  +
        }
         518  +
    }
         519  +
}
         520  +
impl MalformedEnumError {
         521  +
    /// Returns `true` if the error kind is `MalformedEnumError::ValidationException`.
         522  +
    pub fn is_validation_exception(&self) -> bool {
         523  +
        matches!(&self, MalformedEnumError::ValidationException(_))
         524  +
    }
         525  +
    /// Returns the error name string by matching the correct variant.
         526  +
    pub fn name(&self) -> &'static str {
         527  +
        match &self {
         528  +
            MalformedEnumError::ValidationException(_inner) => _inner.name(),
         529  +
        }
         530  +
    }
         531  +
}
         532  +
impl ::std::error::Error for MalformedEnumError {
         533  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         534  +
        match &self {
         535  +
            MalformedEnumError::ValidationException(_inner) => Some(_inner),
         536  +
        }
         537  +
    }
         538  +
}
         539  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MalformedEnumError {
         540  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedEnumError {
         541  +
        Self::ValidationException(variant)
         542  +
    }
         543  +
}
         544  +
/// See [`ValidationException`](crate::error::ValidationException).
         545  +
pub mod validation_exception {
         546  +
         547  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         548  +
    /// Holds one variant for each of the ways the builder can fail.
         549  +
    #[non_exhaustive]
         550  +
    #[allow(clippy::enum_variant_names)]
         551  +
    pub enum ConstraintViolation {
         552  +
        /// `message` was not provided but it is required when building `ValidationException`.
         553  +
        MissingMessage,
         554  +
    }
         555  +
    impl ::std::fmt::Display for ConstraintViolation {
         556  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         557  +
            match self {
         558  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         559  +
            }
         560  +
        }
         561  +
    }
         562  +
    impl ::std::error::Error for ConstraintViolation {}
         563  +
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
         564  +
        type Error = ConstraintViolation;
         565  +
         566  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         567  +
            builder.build()
         568  +
        }
         569  +
    }
         570  +
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         571  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         572  +
    pub struct Builder {
         573  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         574  +
        pub(crate) field_list:
         575  +
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         576  +
    }
         577  +
    impl Builder {
         578  +
        /// A summary of the validation failure.
         579  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         580  +
            self.message = Some(input);
         581  +
            self
         582  +
        }
         583  +
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         584  +
        pub fn field_list(
         585  +
            mut self,
         586  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         587  +
        ) -> Self {
         588  +
            self.field_list = input;
         589  +
            self
         590  +
        }
         591  +
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         592  +
        ///
         593  +
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
         594  +
        ///
         595  +
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
         596  +
            self.build_enforcing_all_constraints()
         597  +
        }
         598  +
        fn build_enforcing_all_constraints(
         599  +
            self,
         600  +
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
         601  +
            Ok(crate::error::ValidationException {
         602  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         603  +
                field_list: self.field_list,
         604  +
            })
         605  +
        }
         606  +
    }
         607  +
}