Server Test

Server Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb

Files changed:

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

@@ -45,45 +106,106 @@
   65     65   
                            <
   66     66   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
   67     67   
                                as ::aws_smithy_http_server::plugin::Plugin<
   68     68   
                                    RpcV2CborService<L>,
   69     69   
                                    crate::operation_shape::ComplexStructOperation,
   70     70   
                                    ModelPl::Output
   71     71   
                                >
   72     72   
                            >::Output
   73     73   
                        >,
   74     74   
   75         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
   76         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
          75  +
                        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,
          76  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
   77     77   
   78     78   
                    {
   79     79   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
   80     80   
        use ::aws_smithy_http_server::plugin::Plugin;
   81     81   
        let svc = crate::operation_shape::ComplexStructOperation::from_handler(handler);
   82     82   
        let svc = self.model_plugin.apply(svc);
   83     83   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
   84     84   
            .apply(svc);
   85     85   
        let svc = self.http_plugin.apply(svc);
   86     86   
        self.complex_struct_operation_custom(svc)
@@ -112,112 +192,192 @@
  132    132   
                            <
  133    133   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  134    134   
                                as ::aws_smithy_http_server::plugin::Plugin<
  135    135   
                                    RpcV2CborService<L>,
  136    136   
                                    crate::operation_shape::ComplexStructOperation,
  137    137   
                                    ModelPl::Output
  138    138   
                                >
  139    139   
                            >::Output
  140    140   
                        >,
  141    141   
  142         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  143         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         142  +
                        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,
         143  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  144    144   
  145    145   
                    {
  146    146   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  147    147   
        use ::aws_smithy_http_server::plugin::Plugin;
  148    148   
        let svc = crate::operation_shape::ComplexStructOperation::from_service(service);
  149    149   
        let svc = self.model_plugin.apply(svc);
  150    150   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  151    151   
            .apply(svc);
  152    152   
        let svc = self.http_plugin.apply(svc);
  153    153   
        self.complex_struct_operation_custom(svc)
  154    154   
    }
  155    155   
  156    156   
    /// Sets the [`ComplexStructOperation`](crate::operation_shape::ComplexStructOperation) to a custom [`Service`](tower::Service).
  157    157   
    /// not constrained by the Smithy contract.
  158    158   
    fn complex_struct_operation_custom<S>(mut self, svc: S) -> Self
  159    159   
    where
  160    160   
        S: ::tower::Service<
  161         -
                ::http::Request<Body>,
  162         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         161  +
                ::http_1x::Request<Body>,
         162  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  163    163   
                Error = ::std::convert::Infallible,
  164    164   
            > + Clone
  165    165   
            + Send
  166    166   
            + 'static,
  167    167   
        S::Future: Send + 'static,
  168    168   
    {
  169    169   
        self.complex_struct_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
  170    170   
        self
  171    171   
    }
  172    172   
@@ -195,195 +256,256 @@
  215    215   
                            <
  216    216   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  217    217   
                                as ::aws_smithy_http_server::plugin::Plugin<
  218    218   
                                    RpcV2CborService<L>,
  219    219   
                                    crate::operation_shape::EmptyStructOperation,
  220    220   
                                    ModelPl::Output
  221    221   
                                >
  222    222   
                            >::Output
  223    223   
                        >,
  224    224   
  225         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  226         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         225  +
                        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,
         226  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  227    227   
  228    228   
                    {
  229    229   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  230    230   
        use ::aws_smithy_http_server::plugin::Plugin;
  231    231   
        let svc = crate::operation_shape::EmptyStructOperation::from_handler(handler);
  232    232   
        let svc = self.model_plugin.apply(svc);
  233    233   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  234    234   
            .apply(svc);
  235    235   
        let svc = self.http_plugin.apply(svc);
  236    236   
        self.empty_struct_operation_custom(svc)
@@ -262,262 +342,342 @@
  282    282   
                            <
  283    283   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  284    284   
                                as ::aws_smithy_http_server::plugin::Plugin<
  285    285   
                                    RpcV2CborService<L>,
  286    286   
                                    crate::operation_shape::EmptyStructOperation,
  287    287   
                                    ModelPl::Output
  288    288   
                                >
  289    289   
                            >::Output
  290    290   
                        >,
  291    291   
  292         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  293         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         292  +
                        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,
         293  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  294    294   
  295    295   
                    {
  296    296   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  297    297   
        use ::aws_smithy_http_server::plugin::Plugin;
  298    298   
        let svc = crate::operation_shape::EmptyStructOperation::from_service(service);
  299    299   
        let svc = self.model_plugin.apply(svc);
  300    300   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  301    301   
            .apply(svc);
  302    302   
        let svc = self.http_plugin.apply(svc);
  303    303   
        self.empty_struct_operation_custom(svc)
  304    304   
    }
  305    305   
  306    306   
    /// Sets the [`EmptyStructOperation`](crate::operation_shape::EmptyStructOperation) to a custom [`Service`](tower::Service).
  307    307   
    /// not constrained by the Smithy contract.
  308    308   
    fn empty_struct_operation_custom<S>(mut self, svc: S) -> Self
  309    309   
    where
  310    310   
        S: ::tower::Service<
  311         -
                ::http::Request<Body>,
  312         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         311  +
                ::http_1x::Request<Body>,
         312  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  313    313   
                Error = ::std::convert::Infallible,
  314    314   
            > + Clone
  315    315   
            + Send
  316    316   
            + 'static,
  317    317   
        S::Future: Send + 'static,
  318    318   
    {
  319    319   
        self.empty_struct_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
  320    320   
        self
  321    321   
    }
  322    322   
@@ -345,345 +406,406 @@
  365    365   
                            <
  366    366   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  367    367   
                                as ::aws_smithy_http_server::plugin::Plugin<
  368    368   
                                    RpcV2CborService<L>,
  369    369   
                                    crate::operation_shape::ErrorSerializationOperation,
  370    370   
                                    ModelPl::Output
  371    371   
                                >
  372    372   
                            >::Output
  373    373   
                        >,
  374    374   
  375         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  376         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         375  +
                        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,
         376  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  377    377   
  378    378   
                    {
  379    379   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  380    380   
        use ::aws_smithy_http_server::plugin::Plugin;
  381    381   
        let svc = crate::operation_shape::ErrorSerializationOperation::from_handler(handler);
  382    382   
        let svc = self.model_plugin.apply(svc);
  383    383   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  384    384   
            .apply(svc);
  385    385   
        let svc = self.http_plugin.apply(svc);
  386    386   
        self.error_serialization_operation_custom(svc)
@@ -412,412 +492,492 @@
  432    432   
                            <
  433    433   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  434    434   
                                as ::aws_smithy_http_server::plugin::Plugin<
  435    435   
                                    RpcV2CborService<L>,
  436    436   
                                    crate::operation_shape::ErrorSerializationOperation,
  437    437   
                                    ModelPl::Output
  438    438   
                                >
  439    439   
                            >::Output
  440    440   
                        >,
  441    441   
  442         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  443         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         442  +
                        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,
         443  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  444    444   
  445    445   
                    {
  446    446   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  447    447   
        use ::aws_smithy_http_server::plugin::Plugin;
  448    448   
        let svc = crate::operation_shape::ErrorSerializationOperation::from_service(service);
  449    449   
        let svc = self.model_plugin.apply(svc);
  450    450   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  451    451   
            .apply(svc);
  452    452   
        let svc = self.http_plugin.apply(svc);
  453    453   
        self.error_serialization_operation_custom(svc)
  454    454   
    }
  455    455   
  456    456   
    /// Sets the [`ErrorSerializationOperation`](crate::operation_shape::ErrorSerializationOperation) to a custom [`Service`](tower::Service).
  457    457   
    /// not constrained by the Smithy contract.
  458    458   
    fn error_serialization_operation_custom<S>(mut self, svc: S) -> Self
  459    459   
    where
  460    460   
        S: ::tower::Service<
  461         -
                ::http::Request<Body>,
  462         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         461  +
                ::http_1x::Request<Body>,
         462  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  463    463   
                Error = ::std::convert::Infallible,
  464    464   
            > + Clone
  465    465   
            + Send
  466    466   
            + 'static,
  467    467   
        S::Future: Send + 'static,
  468    468   
    {
  469    469   
        self.error_serialization_operation =
  470    470   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  471    471   
        self
  472    472   
    }
@@ -496,496 +557,557 @@
  516    516   
                            <
  517    517   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  518    518   
                                as ::aws_smithy_http_server::plugin::Plugin<
  519    519   
                                    RpcV2CborService<L>,
  520    520   
                                    crate::operation_shape::RecursiveUnionOperation,
  521    521   
                                    ModelPl::Output
  522    522   
                                >
  523    523   
                            >::Output
  524    524   
                        >,
  525    525   
  526         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  527         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         526  +
                        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,
         527  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  528    528   
  529    529   
                    {
  530    530   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  531    531   
        use ::aws_smithy_http_server::plugin::Plugin;
  532    532   
        let svc = crate::operation_shape::RecursiveUnionOperation::from_handler(handler);
  533    533   
        let svc = self.model_plugin.apply(svc);
  534    534   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  535    535   
            .apply(svc);
  536    536   
        let svc = self.http_plugin.apply(svc);
  537    537   
        self.recursive_union_operation_custom(svc)
@@ -563,563 +643,643 @@
  583    583   
                            <
  584    584   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  585    585   
                                as ::aws_smithy_http_server::plugin::Plugin<
  586    586   
                                    RpcV2CborService<L>,
  587    587   
                                    crate::operation_shape::RecursiveUnionOperation,
  588    588   
                                    ModelPl::Output
  589    589   
                                >
  590    590   
                            >::Output
  591    591   
                        >,
  592    592   
  593         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  594         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         593  +
                        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,
         594  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  595    595   
  596    596   
                    {
  597    597   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  598    598   
        use ::aws_smithy_http_server::plugin::Plugin;
  599    599   
        let svc = crate::operation_shape::RecursiveUnionOperation::from_service(service);
  600    600   
        let svc = self.model_plugin.apply(svc);
  601    601   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  602    602   
            .apply(svc);
  603    603   
        let svc = self.http_plugin.apply(svc);
  604    604   
        self.recursive_union_operation_custom(svc)
  605    605   
    }
  606    606   
  607    607   
    /// Sets the [`RecursiveUnionOperation`](crate::operation_shape::RecursiveUnionOperation) to a custom [`Service`](tower::Service).
  608    608   
    /// not constrained by the Smithy contract.
  609    609   
    fn recursive_union_operation_custom<S>(mut self, svc: S) -> Self
  610    610   
    where
  611    611   
        S: ::tower::Service<
  612         -
                ::http::Request<Body>,
  613         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         612  +
                ::http_1x::Request<Body>,
         613  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  614    614   
                Error = ::std::convert::Infallible,
  615    615   
            > + Clone
  616    616   
            + Send
  617    617   
            + 'static,
  618    618   
        S::Future: Send + 'static,
  619    619   
    {
  620    620   
        self.recursive_union_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
  621    621   
        self
  622    622   
    }
  623    623   
@@ -646,646 +707,707 @@
  666    666   
                            <
  667    667   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  668    668   
                                as ::aws_smithy_http_server::plugin::Plugin<
  669    669   
                                    RpcV2CborService<L>,
  670    670   
                                    crate::operation_shape::SimpleStructOperation,
  671    671   
                                    ModelPl::Output
  672    672   
                                >
  673    673   
                            >::Output
  674    674   
                        >,
  675    675   
  676         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  677         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         676  +
                        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,
         677  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  678    678   
  679    679   
                    {
  680    680   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  681    681   
        use ::aws_smithy_http_server::plugin::Plugin;
  682    682   
        let svc = crate::operation_shape::SimpleStructOperation::from_handler(handler);
  683    683   
        let svc = self.model_plugin.apply(svc);
  684    684   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  685    685   
            .apply(svc);
  686    686   
        let svc = self.http_plugin.apply(svc);
  687    687   
        self.simple_struct_operation_custom(svc)
@@ -713,713 +793,793 @@
  733    733   
                            <
  734    734   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  735    735   
                                as ::aws_smithy_http_server::plugin::Plugin<
  736    736   
                                    RpcV2CborService<L>,
  737    737   
                                    crate::operation_shape::SimpleStructOperation,
  738    738   
                                    ModelPl::Output
  739    739   
                                >
  740    740   
                            >::Output
  741    741   
                        >,
  742    742   
  743         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  744         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         743  +
                        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,
         744  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  745    745   
  746    746   
                    {
  747    747   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  748    748   
        use ::aws_smithy_http_server::plugin::Plugin;
  749    749   
        let svc = crate::operation_shape::SimpleStructOperation::from_service(service);
  750    750   
        let svc = self.model_plugin.apply(svc);
  751    751   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  752    752   
            .apply(svc);
  753    753   
        let svc = self.http_plugin.apply(svc);
  754    754   
        self.simple_struct_operation_custom(svc)
  755    755   
    }
  756    756   
  757    757   
    /// Sets the [`SimpleStructOperation`](crate::operation_shape::SimpleStructOperation) to a custom [`Service`](tower::Service).
  758    758   
    /// not constrained by the Smithy contract.
  759    759   
    fn simple_struct_operation_custom<S>(mut self, svc: S) -> Self
  760    760   
    where
  761    761   
        S: ::tower::Service<
  762         -
                ::http::Request<Body>,
  763         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         762  +
                ::http_1x::Request<Body>,
         763  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  764    764   
                Error = ::std::convert::Infallible,
  765    765   
            > + Clone
  766    766   
            + Send
  767    767   
            + 'static,
  768    768   
        S::Future: Send + 'static,
  769    769   
    {
  770    770   
        self.simple_struct_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
  771    771   
        self
  772    772   
    }
  773    773   
@@ -796,796 +857,857 @@
  816    816   
                            <
  817    817   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  818    818   
                                as ::aws_smithy_http_server::plugin::Plugin<
  819    819   
                                    RpcV2CborService<L>,
  820    820   
                                    crate::operation_shape::SingleMemberStructOperation,
  821    821   
                                    ModelPl::Output
  822    822   
                                >
  823    823   
                            >::Output
  824    824   
                        >,
  825    825   
  826         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  827         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         826  +
                        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,
         827  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  828    828   
  829    829   
                    {
  830    830   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  831    831   
        use ::aws_smithy_http_server::plugin::Plugin;
  832    832   
        let svc = crate::operation_shape::SingleMemberStructOperation::from_handler(handler);
  833    833   
        let svc = self.model_plugin.apply(svc);
  834    834   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  835    835   
            .apply(svc);
  836    836   
        let svc = self.http_plugin.apply(svc);
  837    837   
        self.single_member_struct_operation_custom(svc)
@@ -863,863 +943,943 @@
  883    883   
                            <
  884    884   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  885    885   
                                as ::aws_smithy_http_server::plugin::Plugin<
  886    886   
                                    RpcV2CborService<L>,
  887    887   
                                    crate::operation_shape::SingleMemberStructOperation,
  888    888   
                                    ModelPl::Output
  889    889   
                                >
  890    890   
                            >::Output
  891    891   
                        >,
  892    892   
  893         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  894         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         893  +
                        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,
         894  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  895    895   
  896    896   
                    {
  897    897   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  898    898   
        use ::aws_smithy_http_server::plugin::Plugin;
  899    899   
        let svc = crate::operation_shape::SingleMemberStructOperation::from_service(service);
  900    900   
        let svc = self.model_plugin.apply(svc);
  901    901   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  902    902   
            .apply(svc);
  903    903   
        let svc = self.http_plugin.apply(svc);
  904    904   
        self.single_member_struct_operation_custom(svc)
  905    905   
    }
  906    906   
  907    907   
    /// Sets the [`SingleMemberStructOperation`](crate::operation_shape::SingleMemberStructOperation) to a custom [`Service`](tower::Service).
  908    908   
    /// not constrained by the Smithy contract.
  909    909   
    fn single_member_struct_operation_custom<S>(mut self, svc: S) -> Self
  910    910   
    where
  911    911   
        S: ::tower::Service<
  912         -
                ::http::Request<Body>,
  913         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         912  +
                ::http_1x::Request<Body>,
         913  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  914    914   
                Error = ::std::convert::Infallible,
  915    915   
            > + Clone
  916    916   
            + Send
  917    917   
            + 'static,
  918    918   
        S::Future: Send + 'static,
  919    919   
    {
  920    920   
        self.single_member_struct_operation =
  921    921   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  922    922   
        self
  923    923   
    }
@@ -947,947 +1008,1008 @@
  967    967   
                            <
  968    968   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  969    969   
                                as ::aws_smithy_http_server::plugin::Plugin<
  970    970   
                                    RpcV2CborService<L>,
  971    971   
                                    crate::operation_shape::StreamingOperation,
  972    972   
                                    ModelPl::Output
  973    973   
                                >
  974    974   
                            >::Output
  975    975   
                        >,
  976    976   
  977         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  978         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         977  +
                        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,
         978  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  979    979   
  980    980   
                    {
  981    981   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  982    982   
        use ::aws_smithy_http_server::plugin::Plugin;
  983    983   
        let svc = crate::operation_shape::StreamingOperation::from_handler(handler);
  984    984   
        let svc = self.model_plugin.apply(svc);
  985    985   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  986    986   
            .apply(svc);
  987    987   
        let svc = self.http_plugin.apply(svc);
  988    988   
        self.streaming_operation_custom(svc)
@@ -1014,1014 +1094,1094 @@
 1034   1034   
                            <
 1035   1035   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1036   1036   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1037   1037   
                                    RpcV2CborService<L>,
 1038   1038   
                                    crate::operation_shape::StreamingOperation,
 1039   1039   
                                    ModelPl::Output
 1040   1040   
                                >
 1041   1041   
                            >::Output
 1042   1042   
                        >,
 1043   1043   
 1044         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1045         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1044  +
                        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,
        1045  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1046   1046   
 1047   1047   
                    {
 1048   1048   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1049   1049   
        use ::aws_smithy_http_server::plugin::Plugin;
 1050   1050   
        let svc = crate::operation_shape::StreamingOperation::from_service(service);
 1051   1051   
        let svc = self.model_plugin.apply(svc);
 1052   1052   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1053   1053   
            .apply(svc);
 1054   1054   
        let svc = self.http_plugin.apply(svc);
 1055   1055   
        self.streaming_operation_custom(svc)
 1056   1056   
    }
 1057   1057   
 1058   1058   
    /// Sets the [`StreamingOperation`](crate::operation_shape::StreamingOperation) to a custom [`Service`](tower::Service).
 1059   1059   
    /// not constrained by the Smithy contract.
 1060   1060   
    fn streaming_operation_custom<S>(mut self, svc: S) -> Self
 1061   1061   
    where
 1062   1062   
        S: ::tower::Service<
 1063         -
                ::http::Request<Body>,
 1064         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1063  +
                ::http_1x::Request<Body>,
        1064  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1065   1065   
                Error = ::std::convert::Infallible,
 1066   1066   
            > + Clone
 1067   1067   
            + Send
 1068   1068   
            + 'static,
 1069   1069   
        S::Future: Send + 'static,
 1070   1070   
    {
 1071   1071   
        self.streaming_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
 1072   1072   
        self
 1073   1073   
    }
 1074   1074   
@@ -1097,1097 +1158,1158 @@
 1117   1117   
                            <
 1118   1118   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1119   1119   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1120   1120   
                                    RpcV2CborService<L>,
 1121   1121   
                                    crate::operation_shape::StreamingOperationWithInitialData,
 1122   1122   
                                    ModelPl::Output
 1123   1123   
                                >
 1124   1124   
                            >::Output
 1125   1125   
                        >,
 1126   1126   
 1127         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1128         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1127  +
                        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,
        1128  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1129   1129   
 1130   1130   
                    {
 1131   1131   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1132   1132   
        use ::aws_smithy_http_server::plugin::Plugin;
 1133   1133   
        let svc = crate::operation_shape::StreamingOperationWithInitialData::from_handler(handler);
 1134   1134   
        let svc = self.model_plugin.apply(svc);
 1135   1135   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1136   1136   
            .apply(svc);
 1137   1137   
        let svc = self.http_plugin.apply(svc);
 1138   1138   
        self.streaming_operation_with_initial_data_custom(svc)
@@ -1164,1164 +1244,1244 @@
 1184   1184   
                            <
 1185   1185   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1186   1186   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1187   1187   
                                    RpcV2CborService<L>,
 1188   1188   
                                    crate::operation_shape::StreamingOperationWithInitialData,
 1189   1189   
                                    ModelPl::Output
 1190   1190   
                                >
 1191   1191   
                            >::Output
 1192   1192   
                        >,
 1193   1193   
 1194         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1195         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1194  +
                        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,
        1195  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1196   1196   
 1197   1197   
                    {
 1198   1198   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1199   1199   
        use ::aws_smithy_http_server::plugin::Plugin;
 1200   1200   
        let svc = crate::operation_shape::StreamingOperationWithInitialData::from_service(service);
 1201   1201   
        let svc = self.model_plugin.apply(svc);
 1202   1202   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1203   1203   
            .apply(svc);
 1204   1204   
        let svc = self.http_plugin.apply(svc);
 1205   1205   
        self.streaming_operation_with_initial_data_custom(svc)
 1206   1206   
    }
 1207   1207   
 1208   1208   
    /// Sets the [`StreamingOperationWithInitialData`](crate::operation_shape::StreamingOperationWithInitialData) to a custom [`Service`](tower::Service).
 1209   1209   
    /// not constrained by the Smithy contract.
 1210   1210   
    fn streaming_operation_with_initial_data_custom<S>(mut self, svc: S) -> Self
 1211   1211   
    where
 1212   1212   
        S: ::tower::Service<
 1213         -
                ::http::Request<Body>,
 1214         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1213  +
                ::http_1x::Request<Body>,
        1214  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1215   1215   
                Error = ::std::convert::Infallible,
 1216   1216   
            > + Clone
 1217   1217   
            + Send
 1218   1218   
            + 'static,
 1219   1219   
        S::Future: Send + 'static,
 1220   1220   
    {
 1221   1221   
        self.streaming_operation_with_initial_data =
 1222   1222   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
 1223   1223   
        self
 1224   1224   
    }
@@ -1248,1248 +1309,1309 @@
 1268   1268   
                            <
 1269   1269   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1270   1270   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1271   1271   
                                    RpcV2CborService<L>,
 1272   1272   
                                    crate::operation_shape::StreamingOperationWithInitialResponse,
 1273   1273   
                                    ModelPl::Output
 1274   1274   
                                >
 1275   1275   
                            >::Output
 1276   1276   
                        >,
 1277   1277   
 1278         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1279         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1278  +
                        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,
        1279  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1280   1280   
 1281   1281   
                    {
 1282   1282   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1283   1283   
        use ::aws_smithy_http_server::plugin::Plugin;
 1284   1284   
        let svc =
 1285   1285   
            crate::operation_shape::StreamingOperationWithInitialResponse::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);
@@ -1316,1316 +1397,1397 @@
 1336   1336   
                            <
 1337   1337   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1338   1338   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1339   1339   
                                    RpcV2CborService<L>,
 1340   1340   
                                    crate::operation_shape::StreamingOperationWithInitialResponse,
 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 =
 1353   1353   
            crate::operation_shape::StreamingOperationWithInitialResponse::from_service(service);
 1354   1354   
        let svc = self.model_plugin.apply(svc);
 1355   1355   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1356   1356   
            .apply(svc);
 1357   1357   
        let svc = self.http_plugin.apply(svc);
 1358   1358   
        self.streaming_operation_with_initial_response_custom(svc)
 1359   1359   
    }
 1360   1360   
 1361   1361   
    /// Sets the [`StreamingOperationWithInitialResponse`](crate::operation_shape::StreamingOperationWithInitialResponse) to a custom [`Service`](tower::Service).
 1362   1362   
    /// not constrained by the Smithy contract.
 1363   1363   
    fn streaming_operation_with_initial_response_custom<S>(mut self, svc: S) -> Self
 1364   1364   
    where
 1365   1365   
        S: ::tower::Service<
 1366         -
                ::http::Request<Body>,
 1367         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1366  +
                ::http_1x::Request<Body>,
        1367  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1368   1368   
                Error = ::std::convert::Infallible,
 1369   1369   
            > + Clone
 1370   1370   
            + Send
 1371   1371   
            + 'static,
 1372   1372   
        S::Future: Send + 'static,
 1373   1373   
    {
 1374   1374   
        self.streaming_operation_with_initial_response =
 1375   1375   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
 1376   1376   
        self
 1377   1377   
    }
@@ -1401,1401 +1462,1462 @@
 1421   1421   
                            <
 1422   1422   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1423   1423   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1424   1424   
                                    RpcV2CborService<L>,
 1425   1425   
                                    crate::operation_shape::StreamingOperationWithOptionalData,
 1426   1426   
                                    ModelPl::Output
 1427   1427   
                                >
 1428   1428   
                            >::Output
 1429   1429   
                        >,
 1430   1430   
 1431         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1432         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1431  +
                        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,
        1432  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1433   1433   
 1434   1434   
                    {
 1435   1435   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1436   1436   
        use ::aws_smithy_http_server::plugin::Plugin;
 1437   1437   
        let svc = crate::operation_shape::StreamingOperationWithOptionalData::from_handler(handler);
 1438   1438   
        let svc = self.model_plugin.apply(svc);
 1439   1439   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1440   1440   
            .apply(svc);
 1441   1441   
        let svc = self.http_plugin.apply(svc);
 1442   1442   
        self.streaming_operation_with_optional_data_custom(svc)
@@ -1468,1468 +1548,1548 @@
 1488   1488   
                            <
 1489   1489   
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
 1490   1490   
                                as ::aws_smithy_http_server::plugin::Plugin<
 1491   1491   
                                    RpcV2CborService<L>,
 1492   1492   
                                    crate::operation_shape::StreamingOperationWithOptionalData,
 1493   1493   
                                    ModelPl::Output
 1494   1494   
                                >
 1495   1495   
                            >::Output
 1496   1496   
                        >,
 1497   1497   
 1498         -
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
 1499         -
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
        1498  +
                        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,
        1499  +
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
 1500   1500   
 1501   1501   
                    {
 1502   1502   
        use ::aws_smithy_http_server::operation::OperationShapeExt;
 1503   1503   
        use ::aws_smithy_http_server::plugin::Plugin;
 1504   1504   
        let svc = crate::operation_shape::StreamingOperationWithOptionalData::from_service(service);
 1505   1505   
        let svc = self.model_plugin.apply(svc);
 1506   1506   
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
 1507   1507   
            .apply(svc);
 1508   1508   
        let svc = self.http_plugin.apply(svc);
 1509   1509   
        self.streaming_operation_with_optional_data_custom(svc)
 1510   1510   
    }
 1511   1511   
 1512   1512   
    /// Sets the [`StreamingOperationWithOptionalData`](crate::operation_shape::StreamingOperationWithOptionalData) to a custom [`Service`](tower::Service).
 1513   1513   
    /// not constrained by the Smithy contract.
 1514   1514   
    fn streaming_operation_with_optional_data_custom<S>(mut self, svc: S) -> Self
 1515   1515   
    where
 1516   1516   
        S: ::tower::Service<
 1517         -
                ::http::Request<Body>,
 1518         -
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        1517  +
                ::http_1x::Request<Body>,
        1518  +
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 1519   1519   
                Error = ::std::convert::Infallible,
 1520   1520   
            > + Clone
 1521   1521   
            + Send
 1522   1522   
            + 'static,
 1523   1523   
        S::Future: Send + 'static,
 1524   1524   
    {
 1525   1525   
        self.streaming_operation_with_optional_data =
 1526   1526   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
 1527   1527   
        self
 1528   1528   
    }
@@ -1992,1992 +2053,2053 @@
 2012   2012   
    ) -> RpcV2CborService<
 2013   2013   
        ::aws_smithy_http_server::routing::RoutingService<
 2014   2014   
            ::aws_smithy_http_server::protocol::rpc_v2_cbor::router::RpcV2CborRouter<
 2015   2015   
                ::aws_smithy_http_server::routing::Route<B>,
 2016   2016   
            >,
 2017   2017   
            ::aws_smithy_http_server::protocol::rpc_v2_cbor::RpcV2Cbor,
 2018   2018   
        >,
 2019   2019   
    >
 2020   2020   
    where
 2021   2021   
        S: ::tower::Service<
 2022         -
            ::http::Request<B>,
 2023         -
            Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
        2022  +
            ::http_1x::Request<B>,
        2023  +
            Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
 2024   2024   
            Error = std::convert::Infallible,
 2025   2025   
        >,
 2026   2026   
        S: Clone + Send + 'static,
 2027   2027   
        S::Future: Send + 'static,
 2028   2028   
    {
 2029   2029   
        self.layer(&::tower::layer::layer_fn(
 2030   2030   
            ::aws_smithy_http_server::routing::Route::new,
 2031   2031   
        ))
 2032   2032   
    }
 2033   2033   
}

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

@@ -0,1 +0,62 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "s3-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#restXml"
          12  +
[dependencies.aws-smithy-legacy-http]
          13  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          14  +
[dependencies.aws-smithy-legacy-http-server]
          15  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
          16  +
[dependencies.aws-smithy-runtime-api]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          18  +
features = ["http-02x"]
          19  +
[dependencies.aws-smithy-types]
          20  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          21  +
features = ["http-body-0-4-x"]
          22  +
[dependencies.aws-smithy-xml]
          23  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-xml"
          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.mime]
          31  +
version = "0.3"
          32  +
[dependencies.nom]
          33  +
version = "7"
          34  +
[dependencies.percent-encoding]
          35  +
version = "2.0.0"
          36  +
[dependencies.pin-project-lite]
          37  +
version = "0.2"
          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.hyper]
          47  +
version = "0.14.26"
          48  +
[dev-dependencies.pretty_assertions]
          49  +
version = "1.3.0"
          50  +
[dev-dependencies.tokio]
          51  +
version = "1.23.1"
          52  +
features = ["macros", "test-util", "rt-multi-thread"]
          53  +
[dev-dependencies.tracing-test]
          54  +
version = "0.2.5"
          55  +
features = ["no-env-filter"]
          56  +
[features]
          57  +
rt-tokio = ["aws-smithy-types/rt-tokio"]
          58  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          59  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
          60  +
default = ["rt-tokio", "request-id"]
          61  +
          62  +

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

@@ -0,1 +0,16 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
pub(crate) trait Constrained {
           8  +
    type Unconstrained;
           9  +
}
          10  +
          11  +
#[derive(Debug, Clone)]
          12  +
#[allow(dead_code)]
          13  +
pub(crate) enum MaybeConstrained<T: Constrained> {
          14  +
    Constrained(T),
          15  +
    Unconstrained(T::Unconstrained),
          16  +
}

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

@@ -0,1 +0,329 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Error type for the `GetObject` operation.
           3  +
/// Each variant represents an error that can occur for the `GetObject` operation.
           4  +
#[derive(::std::fmt::Debug)]
           5  +
pub enum GetObjectError {
           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 GetObjectError {
          10  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          11  +
        match &self {
          12  +
            GetObjectError::ValidationException(_inner) => _inner.fmt(f),
          13  +
        }
          14  +
    }
          15  +
}
          16  +
impl GetObjectError {
          17  +
    /// Returns `true` if the error kind is `GetObjectError::ValidationException`.
          18  +
    pub fn is_validation_exception(&self) -> bool {
          19  +
        matches!(&self, GetObjectError::ValidationException(_))
          20  +
    }
          21  +
    /// Returns the error name string by matching the correct variant.
          22  +
    pub fn name(&self) -> &'static str {
          23  +
        match &self {
          24  +
            GetObjectError::ValidationException(_inner) => _inner.name(),
          25  +
        }
          26  +
    }
          27  +
}
          28  +
impl ::std::error::Error for GetObjectError {
          29  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          30  +
        match &self {
          31  +
            GetObjectError::ValidationException(_inner) => Some(_inner),
          32  +
        }
          33  +
    }
          34  +
}
          35  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetObjectError {
          36  +
    fn from(variant: crate::error::ValidationException) -> crate::error::GetObjectError {
          37  +
        Self::ValidationException(variant)
          38  +
    }
          39  +
}
          40  +
          41  +
/// 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.
          42  +
#[derive(
          43  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          44  +
)]
          45  +
pub struct ValidationException {
          46  +
    /// A summary of the validation failure.
          47  +
    pub message: ::std::string::String,
          48  +
    /// 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.
          49  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          50  +
}
          51  +
impl ValidationException {
          52  +
    /// 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.
          53  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
          54  +
        self.field_list.as_deref()
          55  +
    }
          56  +
}
          57  +
impl ValidationException {
          58  +
    /// Returns the error message.
          59  +
    pub fn message(&self) -> &str {
          60  +
        &self.message
          61  +
    }
          62  +
    #[doc(hidden)]
          63  +
    /// Returns the error name.
          64  +
    pub fn name(&self) -> &'static str {
          65  +
        "ValidationException"
          66  +
    }
          67  +
}
          68  +
impl ::std::fmt::Display for ValidationException {
          69  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          70  +
        ::std::write!(f, "ValidationException")?;
          71  +
        {
          72  +
            ::std::write!(f, ": {}", &self.message)?;
          73  +
        }
          74  +
        Ok(())
          75  +
    }
          76  +
}
          77  +
impl ::std::error::Error for ValidationException {}
          78  +
impl ValidationException {
          79  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
          80  +
    pub fn builder() -> crate::error::validation_exception::Builder {
          81  +
        crate::error::validation_exception::Builder::default()
          82  +
    }
          83  +
}
          84  +
          85  +
/// Error type for the `DeleteObjectTagging` operation.
          86  +
/// Each variant represents an error that can occur for the `DeleteObjectTagging` operation.
          87  +
#[derive(::std::fmt::Debug)]
          88  +
pub enum DeleteObjectTaggingError {
          89  +
    /// 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.
          90  +
    ValidationException(crate::error::ValidationException),
          91  +
}
          92  +
impl ::std::fmt::Display for DeleteObjectTaggingError {
          93  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          94  +
        match &self {
          95  +
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.fmt(f),
          96  +
        }
          97  +
    }
          98  +
}
          99  +
impl DeleteObjectTaggingError {
         100  +
    /// Returns `true` if the error kind is `DeleteObjectTaggingError::ValidationException`.
         101  +
    pub fn is_validation_exception(&self) -> bool {
         102  +
        matches!(&self, DeleteObjectTaggingError::ValidationException(_))
         103  +
    }
         104  +
    /// Returns the error name string by matching the correct variant.
         105  +
    pub fn name(&self) -> &'static str {
         106  +
        match &self {
         107  +
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.name(),
         108  +
        }
         109  +
    }
         110  +
}
         111  +
impl ::std::error::Error for DeleteObjectTaggingError {
         112  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         113  +
        match &self {
         114  +
            DeleteObjectTaggingError::ValidationException(_inner) => Some(_inner),
         115  +
        }
         116  +
    }
         117  +
}
         118  +
impl ::std::convert::From<crate::error::ValidationException>
         119  +
    for crate::error::DeleteObjectTaggingError
         120  +
{
         121  +
    fn from(variant: crate::error::ValidationException) -> crate::error::DeleteObjectTaggingError {
         122  +
        Self::ValidationException(variant)
         123  +
    }
         124  +
}
         125  +
         126  +
/// Error type for the `GetBucketLocation` operation.
         127  +
/// Each variant represents an error that can occur for the `GetBucketLocation` operation.
         128  +
#[derive(::std::fmt::Debug)]
         129  +
pub enum GetBucketLocationError {
         130  +
    /// 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.
         131  +
    ValidationException(crate::error::ValidationException),
         132  +
}
         133  +
impl ::std::fmt::Display for GetBucketLocationError {
         134  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         135  +
        match &self {
         136  +
            GetBucketLocationError::ValidationException(_inner) => _inner.fmt(f),
         137  +
        }
         138  +
    }
         139  +
}
         140  +
impl GetBucketLocationError {
         141  +
    /// Returns `true` if the error kind is `GetBucketLocationError::ValidationException`.
         142  +
    pub fn is_validation_exception(&self) -> bool {
         143  +
        matches!(&self, GetBucketLocationError::ValidationException(_))
         144  +
    }
         145  +
    /// Returns the error name string by matching the correct variant.
         146  +
    pub fn name(&self) -> &'static str {
         147  +
        match &self {
         148  +
            GetBucketLocationError::ValidationException(_inner) => _inner.name(),
         149  +
        }
         150  +
    }
         151  +
}
         152  +
impl ::std::error::Error for GetBucketLocationError {
         153  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         154  +
        match &self {
         155  +
            GetBucketLocationError::ValidationException(_inner) => Some(_inner),
         156  +
        }
         157  +
    }
         158  +
}
         159  +
impl ::std::convert::From<crate::error::ValidationException>
         160  +
    for crate::error::GetBucketLocationError
         161  +
{
         162  +
    fn from(variant: crate::error::ValidationException) -> crate::error::GetBucketLocationError {
         163  +
        Self::ValidationException(variant)
         164  +
    }
         165  +
}
         166  +
         167  +
/// Error type for the `ListObjectsV2` operation.
         168  +
/// Each variant represents an error that can occur for the `ListObjectsV2` operation.
         169  +
#[derive(::std::fmt::Debug)]
         170  +
pub enum ListObjectsV2Error {
         171  +
    #[allow(missing_docs)] // documentation missing in model
         172  +
    NoSuchBucket(crate::error::NoSuchBucket),
         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 ListObjectsV2Error {
         177  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         178  +
        match &self {
         179  +
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.fmt(f),
         180  +
            ListObjectsV2Error::ValidationException(_inner) => _inner.fmt(f),
         181  +
        }
         182  +
    }
         183  +
}
         184  +
impl ListObjectsV2Error {
         185  +
    /// Returns `true` if the error kind is `ListObjectsV2Error::NoSuchBucket`.
         186  +
    pub fn is_no_such_bucket(&self) -> bool {
         187  +
        matches!(&self, ListObjectsV2Error::NoSuchBucket(_))
         188  +
    }
         189  +
    /// Returns `true` if the error kind is `ListObjectsV2Error::ValidationException`.
         190  +
    pub fn is_validation_exception(&self) -> bool {
         191  +
        matches!(&self, ListObjectsV2Error::ValidationException(_))
         192  +
    }
         193  +
    /// Returns the error name string by matching the correct variant.
         194  +
    pub fn name(&self) -> &'static str {
         195  +
        match &self {
         196  +
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.name(),
         197  +
            ListObjectsV2Error::ValidationException(_inner) => _inner.name(),
         198  +
        }
         199  +
    }
         200  +
}
         201  +
impl ::std::error::Error for ListObjectsV2Error {
         202  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         203  +
        match &self {
         204  +
            ListObjectsV2Error::NoSuchBucket(_inner) => Some(_inner),
         205  +
            ListObjectsV2Error::ValidationException(_inner) => Some(_inner),
         206  +
        }
         207  +
    }
         208  +
}
         209  +
impl ::std::convert::From<crate::error::NoSuchBucket> for crate::error::ListObjectsV2Error {
         210  +
    fn from(variant: crate::error::NoSuchBucket) -> crate::error::ListObjectsV2Error {
         211  +
        Self::NoSuchBucket(variant)
         212  +
    }
         213  +
}
         214  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::ListObjectsV2Error {
         215  +
    fn from(variant: crate::error::ValidationException) -> crate::error::ListObjectsV2Error {
         216  +
        Self::ValidationException(variant)
         217  +
    }
         218  +
}
         219  +
         220  +
#[allow(missing_docs)] // documentation missing in model
         221  +
#[derive(
         222  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         223  +
)]
         224  +
pub struct NoSuchBucket {}
         225  +
impl NoSuchBucket {
         226  +
    #[doc(hidden)]
         227  +
    /// Returns the error name.
         228  +
    pub fn name(&self) -> &'static str {
         229  +
        "NoSuchBucket"
         230  +
    }
         231  +
}
         232  +
impl ::std::fmt::Display for NoSuchBucket {
         233  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         234  +
        ::std::write!(f, "NoSuchBucket")?;
         235  +
        Ok(())
         236  +
    }
         237  +
}
         238  +
impl ::std::error::Error for NoSuchBucket {}
         239  +
impl NoSuchBucket {
         240  +
    /// Creates a new builder-style object to manufacture [`NoSuchBucket`](crate::error::NoSuchBucket).
         241  +
    pub fn builder() -> crate::error::no_such_bucket::Builder {
         242  +
        crate::error::no_such_bucket::Builder::default()
         243  +
    }
         244  +
}
         245  +
/// See [`ValidationException`](crate::error::ValidationException).
         246  +
pub mod validation_exception {
         247  +
         248  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         249  +
    /// Holds one variant for each of the ways the builder can fail.
         250  +
    #[non_exhaustive]
         251  +
    #[allow(clippy::enum_variant_names)]
         252  +
    pub enum ConstraintViolation {
         253  +
        /// `message` was not provided but it is required when building `ValidationException`.
         254  +
        MissingMessage,
         255  +
    }
         256  +
    impl ::std::fmt::Display for ConstraintViolation {
         257  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         258  +
            match self {
         259  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         260  +
            }
         261  +
        }
         262  +
    }
         263  +
    impl ::std::error::Error for ConstraintViolation {}
         264  +
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
         265  +
        type Error = ConstraintViolation;
         266  +
         267  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         268  +
            builder.build()
         269  +
        }
         270  +
    }
         271  +
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         272  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         273  +
    pub struct Builder {
         274  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         275  +
        pub(crate) field_list:
         276  +
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         277  +
    }
         278  +
    impl Builder {
         279  +
        /// A summary of the validation failure.
         280  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         281  +
            self.message = Some(input);
         282  +
            self
         283  +
        }
         284  +
        /// 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.
         285  +
        pub fn field_list(
         286  +
            mut self,
         287  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         288  +
        ) -> Self {
         289  +
            self.field_list = input;
         290  +
            self
         291  +
        }
         292  +
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         293  +
        ///
         294  +
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
         295  +
        ///
         296  +
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
         297  +
            self.build_enforcing_all_constraints()
         298  +
        }
         299  +
        fn build_enforcing_all_constraints(
         300  +
            self,
         301  +
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
         302  +
            Ok(crate::error::ValidationException {
         303  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         304  +
                field_list: self.field_list,
         305  +
            })
         306  +
        }
         307  +
    }
         308  +
}
         309  +
/// See [`NoSuchBucket`](crate::error::NoSuchBucket).
         310  +
pub mod no_such_bucket {
         311  +
         312  +
    impl ::std::convert::From<Builder> for crate::error::NoSuchBucket {
         313  +
        fn from(builder: Builder) -> Self {
         314  +
            builder.build()
         315  +
        }
         316  +
    }
         317  +
    /// A builder for [`NoSuchBucket`](crate::error::NoSuchBucket).
         318  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         319  +
    pub struct Builder {}
         320  +
    impl Builder {
         321  +
        /// Consumes the builder and constructs a [`NoSuchBucket`](crate::error::NoSuchBucket).
         322  +
        pub fn build(self) -> crate::error::NoSuchBucket {
         323  +
            self.build_enforcing_all_constraints()
         324  +
        }
         325  +
        fn build_enforcing_all_constraints(self) -> crate::error::NoSuchBucket {
         326  +
            crate::error::NoSuchBucket {}
         327  +
        }
         328  +
    }
         329  +
}

tmp-codegen-diff/codegen-server-test/s3-http0x/rust-server-codegen/src/input.rs

@@ -0,1 +0,871 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(
           4  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
           5  +
)]
           6  +
pub struct GetObjectInput {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub bucket: ::std::string::String,
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub key: crate::model::ObjectKey,
          11  +
}
          12  +
impl GetObjectInput {
          13  +
    #[allow(missing_docs)] // documentation missing in model
          14  +
    pub fn bucket(&self) -> &str {
          15  +
        use std::ops::Deref;
          16  +
        self.bucket.deref()
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn key(&self) -> &crate::model::ObjectKey {
          20  +
        &self.key
          21  +
    }
          22  +
}
          23  +
impl GetObjectInput {
          24  +
    /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
          25  +
    pub fn builder() -> crate::input::get_object_input::Builder {
          26  +
        crate::input::get_object_input::Builder::default()
          27  +
    }
          28  +
}
          29  +
impl crate::constrained::Constrained for crate::input::GetObjectInput {
          30  +
    type Unconstrained = crate::input::get_object_input::Builder;
          31  +
}
          32  +
          33  +
#[allow(missing_docs)] // documentation missing in model
          34  +
#[derive(
          35  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          36  +
)]
          37  +
pub struct DeleteObjectTaggingInput {
          38  +
    #[allow(missing_docs)] // documentation missing in model
          39  +
    pub bucket: ::std::string::String,
          40  +
    #[allow(missing_docs)] // documentation missing in model
          41  +
    pub key: crate::model::ObjectKey,
          42  +
    #[allow(missing_docs)] // documentation missing in model
          43  +
    pub version_id: ::std::option::Option<::std::string::String>,
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
          46  +
}
          47  +
impl DeleteObjectTaggingInput {
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn bucket(&self) -> &str {
          50  +
        use std::ops::Deref;
          51  +
        self.bucket.deref()
          52  +
    }
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub fn key(&self) -> &crate::model::ObjectKey {
          55  +
        &self.key
          56  +
    }
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    pub fn version_id(&self) -> ::std::option::Option<&str> {
          59  +
        self.version_id.as_deref()
          60  +
    }
          61  +
    #[allow(missing_docs)] // documentation missing in model
          62  +
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
          63  +
        self.expected_bucket_owner.as_deref()
          64  +
    }
          65  +
}
          66  +
impl DeleteObjectTaggingInput {
          67  +
    /// Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
          68  +
    pub fn builder() -> crate::input::delete_object_tagging_input::Builder {
          69  +
        crate::input::delete_object_tagging_input::Builder::default()
          70  +
    }
          71  +
}
          72  +
impl crate::constrained::Constrained for crate::input::DeleteObjectTaggingInput {
          73  +
    type Unconstrained = crate::input::delete_object_tagging_input::Builder;
          74  +
}
          75  +
          76  +
#[allow(missing_docs)] // documentation missing in model
          77  +
#[derive(
          78  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          79  +
)]
          80  +
pub struct GetBucketLocationInput {
          81  +
    #[allow(missing_docs)] // documentation missing in model
          82  +
    pub bucket: ::std::string::String,
          83  +
}
          84  +
impl GetBucketLocationInput {
          85  +
    #[allow(missing_docs)] // documentation missing in model
          86  +
    pub fn bucket(&self) -> &str {
          87  +
        use std::ops::Deref;
          88  +
        self.bucket.deref()
          89  +
    }
          90  +
}
          91  +
impl GetBucketLocationInput {
          92  +
    /// Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
          93  +
    pub fn builder() -> crate::input::get_bucket_location_input::Builder {
          94  +
        crate::input::get_bucket_location_input::Builder::default()
          95  +
    }
          96  +
}
          97  +
impl crate::constrained::Constrained for crate::input::GetBucketLocationInput {
          98  +
    type Unconstrained = crate::input::get_bucket_location_input::Builder;
          99  +
}
         100  +
         101  +
#[allow(missing_docs)] // documentation missing in model
         102  +
#[derive(
         103  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         104  +
)]
         105  +
pub struct ListObjectsV2Input {
         106  +
    #[allow(missing_docs)] // documentation missing in model
         107  +
    pub bucket: ::std::string::String,
         108  +
    #[allow(missing_docs)] // documentation missing in model
         109  +
    pub delimiter: ::std::option::Option<::std::string::String>,
         110  +
    #[allow(missing_docs)] // documentation missing in model
         111  +
    pub encoding_type: ::std::option::Option<crate::model::EncodingType>,
         112  +
    #[allow(missing_docs)] // documentation missing in model
         113  +
    pub max_keys: ::std::option::Option<i32>,
         114  +
    #[allow(missing_docs)] // documentation missing in model
         115  +
    pub prefix: ::std::option::Option<::std::string::String>,
         116  +
    #[allow(missing_docs)] // documentation missing in model
         117  +
    pub continuation_token: ::std::option::Option<::std::string::String>,
         118  +
    #[allow(missing_docs)] // documentation missing in model
         119  +
    pub fetch_owner: ::std::option::Option<bool>,
         120  +
    #[allow(missing_docs)] // documentation missing in model
         121  +
    pub start_after: ::std::option::Option<::std::string::String>,
         122  +
    #[allow(missing_docs)] // documentation missing in model
         123  +
    pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
         124  +
    #[allow(missing_docs)] // documentation missing in model
         125  +
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
         126  +
}
         127  +
impl ListObjectsV2Input {
         128  +
    #[allow(missing_docs)] // documentation missing in model
         129  +
    pub fn bucket(&self) -> &str {
         130  +
        use std::ops::Deref;
         131  +
        self.bucket.deref()
         132  +
    }
         133  +
    #[allow(missing_docs)] // documentation missing in model
         134  +
    pub fn delimiter(&self) -> ::std::option::Option<&str> {
         135  +
        self.delimiter.as_deref()
         136  +
    }
         137  +
    #[allow(missing_docs)] // documentation missing in model
         138  +
    pub fn encoding_type(&self) -> ::std::option::Option<&crate::model::EncodingType> {
         139  +
        self.encoding_type.as_ref()
         140  +
    }
         141  +
    #[allow(missing_docs)] // documentation missing in model
         142  +
    pub fn max_keys(&self) -> ::std::option::Option<i32> {
         143  +
        self.max_keys
         144  +
    }
         145  +
    #[allow(missing_docs)] // documentation missing in model
         146  +
    pub fn prefix(&self) -> ::std::option::Option<&str> {
         147  +
        self.prefix.as_deref()
         148  +
    }
         149  +
    #[allow(missing_docs)] // documentation missing in model
         150  +
    pub fn continuation_token(&self) -> ::std::option::Option<&str> {
         151  +
        self.continuation_token.as_deref()
         152  +
    }
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
         155  +
        self.fetch_owner
         156  +
    }
         157  +
    #[allow(missing_docs)] // documentation missing in model
         158  +
    pub fn start_after(&self) -> ::std::option::Option<&str> {
         159  +
        self.start_after.as_deref()
         160  +
    }
         161  +
    #[allow(missing_docs)] // documentation missing in model
         162  +
    pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
         163  +
        self.request_payer.as_ref()
         164  +
    }
         165  +
    #[allow(missing_docs)] // documentation missing in model
         166  +
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
         167  +
        self.expected_bucket_owner.as_deref()
         168  +
    }
         169  +
}
         170  +
impl ListObjectsV2Input {
         171  +
    /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         172  +
    pub fn builder() -> crate::input::list_objects_v2_input::Builder {
         173  +
        crate::input::list_objects_v2_input::Builder::default()
         174  +
    }
         175  +
}
         176  +
impl crate::constrained::Constrained for crate::input::ListObjectsV2Input {
         177  +
    type Unconstrained = crate::input::list_objects_v2_input::Builder;
         178  +
}
         179  +
/// See [`GetObjectInput`](crate::input::GetObjectInput).
         180  +
pub mod get_object_input {
         181  +
         182  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         183  +
    /// Holds one variant for each of the ways the builder can fail.
         184  +
    #[non_exhaustive]
         185  +
    #[allow(clippy::enum_variant_names)]
         186  +
    pub enum ConstraintViolation {
         187  +
        /// `bucket` was not provided but it is required when building `GetObjectInput`.
         188  +
        MissingBucket,
         189  +
        /// `key` was not provided but it is required when building `GetObjectInput`.
         190  +
        MissingKey,
         191  +
        /// Constraint violation occurred building member `key` when building `GetObjectInput`.
         192  +
        #[doc(hidden)]
         193  +
        Key(crate::model::object_key::ConstraintViolation),
         194  +
    }
         195  +
    impl ::std::fmt::Display for ConstraintViolation {
         196  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         197  +
            match self {
         198  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
         199  +
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
         200  +
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
         201  +
            }
         202  +
        }
         203  +
    }
         204  +
    impl ::std::error::Error for ConstraintViolation {}
         205  +
    impl ConstraintViolation {
         206  +
        pub(crate) fn as_validation_exception_field(
         207  +
            self,
         208  +
            path: ::std::string::String,
         209  +
        ) -> crate::model::ValidationExceptionField {
         210  +
            match self {
         211  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         212  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         213  +
                                                path: path + "/Bucket",
         214  +
                                            },
         215  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         216  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         217  +
                                                path: path + "/Key",
         218  +
                                            },
         219  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         220  +
        }
         221  +
        }
         222  +
    }
         223  +
    impl ::std::convert::From<ConstraintViolation>
         224  +
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
         225  +
    {
         226  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         227  +
            let first_validation_exception_field =
         228  +
                constraint_violation.as_validation_exception_field("".to_owned());
         229  +
            let validation_exception = crate::error::ValidationException {
         230  +
                message: format!(
         231  +
                    "1 validation error detected. {}",
         232  +
                    &first_validation_exception_field.message
         233  +
                ),
         234  +
                field_list: Some(vec![first_validation_exception_field]),
         235  +
            };
         236  +
            Self::ConstraintViolation(
         237  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         238  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         239  +
                            )
         240  +
        }
         241  +
    }
         242  +
    impl ::std::convert::From<Builder>
         243  +
        for crate::constrained::MaybeConstrained<crate::input::GetObjectInput>
         244  +
    {
         245  +
        fn from(builder: Builder) -> Self {
         246  +
            Self::Unconstrained(builder)
         247  +
        }
         248  +
    }
         249  +
    impl ::std::convert::TryFrom<Builder> for crate::input::GetObjectInput {
         250  +
        type Error = ConstraintViolation;
         251  +
         252  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         253  +
            builder.build()
         254  +
        }
         255  +
    }
         256  +
    /// A builder for [`GetObjectInput`](crate::input::GetObjectInput).
         257  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         258  +
    pub struct Builder {
         259  +
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         260  +
        pub(crate) key:
         261  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         262  +
    }
         263  +
    impl Builder {
         264  +
        #[allow(missing_docs)] // documentation missing in model
         265  +
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
         266  +
            self.bucket = Some(input);
         267  +
            self
         268  +
        }
         269  +
        #[allow(missing_docs)] // documentation missing in model
         270  +
        pub(crate) fn set_bucket(
         271  +
            mut self,
         272  +
            input: impl ::std::convert::Into<::std::string::String>,
         273  +
        ) -> Self {
         274  +
            self.bucket = Some(input.into());
         275  +
            self
         276  +
        }
         277  +
        #[allow(missing_docs)] // documentation missing in model
         278  +
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
         279  +
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         280  +
            self
         281  +
        }
         282  +
        #[allow(missing_docs)] // documentation missing in model
         283  +
        pub(crate) fn set_key(
         284  +
            mut self,
         285  +
            input: impl ::std::convert::Into<
         286  +
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
         287  +
            >,
         288  +
        ) -> Self {
         289  +
            self.key = Some(input.into());
         290  +
            self
         291  +
        }
         292  +
        /// Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
         293  +
        ///
         294  +
        /// The builder fails to construct a [`GetObjectInput`](crate::input::GetObjectInput) if a [`ConstraintViolation`] occurs.
         295  +
        ///
         296  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         297  +
        pub fn build(self) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
         298  +
            self.build_enforcing_all_constraints()
         299  +
        }
         300  +
        fn build_enforcing_all_constraints(
         301  +
            self,
         302  +
        ) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
         303  +
            Ok(crate::input::GetObjectInput {
         304  +
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         305  +
                key: self
         306  +
                    .key
         307  +
                    .map(|v| match v {
         308  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         309  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         310  +
                    })
         311  +
                    .map(|res| res.map_err(ConstraintViolation::Key))
         312  +
                    .transpose()?
         313  +
                    .ok_or(ConstraintViolation::MissingKey)?,
         314  +
            })
         315  +
        }
         316  +
    }
         317  +
}
         318  +
/// See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         319  +
pub mod delete_object_tagging_input {
         320  +
         321  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         322  +
    /// Holds one variant for each of the ways the builder can fail.
         323  +
    #[non_exhaustive]
         324  +
    #[allow(clippy::enum_variant_names)]
         325  +
    pub enum ConstraintViolation {
         326  +
        /// `bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
         327  +
        MissingBucket,
         328  +
        /// `key` was not provided but it is required when building `DeleteObjectTaggingInput`.
         329  +
        MissingKey,
         330  +
        /// Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
         331  +
        #[doc(hidden)]
         332  +
        Key(crate::model::object_key::ConstraintViolation),
         333  +
    }
         334  +
    impl ::std::fmt::Display for ConstraintViolation {
         335  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         336  +
            match self {
         337  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         338  +
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         339  +
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
         340  +
            }
         341  +
        }
         342  +
    }
         343  +
    impl ::std::error::Error for ConstraintViolation {}
         344  +
    impl ConstraintViolation {
         345  +
        pub(crate) fn as_validation_exception_field(
         346  +
            self,
         347  +
            path: ::std::string::String,
         348  +
        ) -> crate::model::ValidationExceptionField {
         349  +
            match self {
         350  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         351  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         352  +
                                                path: path + "/Bucket",
         353  +
                                            },
         354  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         355  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         356  +
                                                path: path + "/Key",
         357  +
                                            },
         358  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         359  +
        }
         360  +
        }
         361  +
    }
         362  +
    impl ::std::convert::From<ConstraintViolation>
         363  +
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
         364  +
    {
         365  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         366  +
            let first_validation_exception_field =
         367  +
                constraint_violation.as_validation_exception_field("".to_owned());
         368  +
            let validation_exception = crate::error::ValidationException {
         369  +
                message: format!(
         370  +
                    "1 validation error detected. {}",
         371  +
                    &first_validation_exception_field.message
         372  +
                ),
         373  +
                field_list: Some(vec![first_validation_exception_field]),
         374  +
            };
         375  +
            Self::ConstraintViolation(
         376  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         377  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         378  +
                            )
         379  +
        }
         380  +
    }
         381  +
    impl ::std::convert::From<Builder>
         382  +
        for crate::constrained::MaybeConstrained<crate::input::DeleteObjectTaggingInput>
         383  +
    {
         384  +
        fn from(builder: Builder) -> Self {
         385  +
            Self::Unconstrained(builder)
         386  +
        }
         387  +
    }
         388  +
    impl ::std::convert::TryFrom<Builder> for crate::input::DeleteObjectTaggingInput {
         389  +
        type Error = ConstraintViolation;
         390  +
         391  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         392  +
            builder.build()
         393  +
        }
         394  +
    }
         395  +
    /// A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         396  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         397  +
    pub struct Builder {
         398  +
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         399  +
        pub(crate) key:
         400  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         401  +
        pub(crate) version_id: ::std::option::Option<::std::string::String>,
         402  +
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
         403  +
    }
         404  +
    impl Builder {
         405  +
        #[allow(missing_docs)] // documentation missing in model
         406  +
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
         407  +
            self.bucket = Some(input);
         408  +
            self
         409  +
        }
         410  +
        #[allow(missing_docs)] // documentation missing in model
         411  +
        pub(crate) fn set_bucket(
         412  +
            mut self,
         413  +
            input: impl ::std::convert::Into<::std::string::String>,
         414  +
        ) -> Self {
         415  +
            self.bucket = Some(input.into());
         416  +
            self
         417  +
        }
         418  +
        #[allow(missing_docs)] // documentation missing in model
         419  +
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
         420  +
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         421  +
            self
         422  +
        }
         423  +
        #[allow(missing_docs)] // documentation missing in model
         424  +
        pub(crate) fn set_key(
         425  +
            mut self,
         426  +
            input: impl ::std::convert::Into<
         427  +
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
         428  +
            >,
         429  +
        ) -> Self {
         430  +
            self.key = Some(input.into());
         431  +
            self
         432  +
        }
         433  +
        #[allow(missing_docs)] // documentation missing in model
         434  +
        pub fn version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         435  +
            self.version_id = input;
         436  +
            self
         437  +
        }
         438  +
        #[allow(missing_docs)] // documentation missing in model
         439  +
        pub(crate) fn set_version_id(
         440  +
            mut self,
         441  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         442  +
        ) -> Self {
         443  +
            self.version_id = input.map(|v| v.into());
         444  +
            self
         445  +
        }
         446  +
        #[allow(missing_docs)] // documentation missing in model
         447  +
        pub fn expected_bucket_owner(
         448  +
            mut self,
         449  +
            input: ::std::option::Option<::std::string::String>,
         450  +
        ) -> Self {
         451  +
            self.expected_bucket_owner = input;
         452  +
            self
         453  +
        }
         454  +
        #[allow(missing_docs)] // documentation missing in model
         455  +
        pub(crate) fn set_expected_bucket_owner(
         456  +
            mut self,
         457  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         458  +
        ) -> Self {
         459  +
            self.expected_bucket_owner = input.map(|v| v.into());
         460  +
            self
         461  +
        }
         462  +
        /// Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         463  +
        ///
         464  +
        /// The builder fails to construct a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput) if a [`ConstraintViolation`] occurs.
         465  +
        ///
         466  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         467  +
        pub fn build(self) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
         468  +
            self.build_enforcing_all_constraints()
         469  +
        }
         470  +
        fn build_enforcing_all_constraints(
         471  +
            self,
         472  +
        ) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
         473  +
            Ok(crate::input::DeleteObjectTaggingInput {
         474  +
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         475  +
                key: self
         476  +
                    .key
         477  +
                    .map(|v| match v {
         478  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         479  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         480  +
                    })
         481  +
                    .map(|res| res.map_err(ConstraintViolation::Key))
         482  +
                    .transpose()?
         483  +
                    .ok_or(ConstraintViolation::MissingKey)?,
         484  +
                version_id: self.version_id,
         485  +
                expected_bucket_owner: self.expected_bucket_owner,
         486  +
            })
         487  +
        }
         488  +
    }
         489  +
}
         490  +
/// See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         491  +
pub mod get_bucket_location_input {
         492  +
         493  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         494  +
    /// Holds one variant for each of the ways the builder can fail.
         495  +
    #[non_exhaustive]
         496  +
    #[allow(clippy::enum_variant_names)]
         497  +
    pub enum ConstraintViolation {
         498  +
        /// `bucket` was not provided but it is required when building `GetBucketLocationInput`.
         499  +
        MissingBucket,
         500  +
    }
         501  +
    impl ::std::fmt::Display for ConstraintViolation {
         502  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         503  +
            match self {
         504  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetBucketLocationInput`"),
         505  +
            }
         506  +
        }
         507  +
    }
         508  +
    impl ::std::error::Error for ConstraintViolation {}
         509  +
    impl ConstraintViolation {
         510  +
        pub(crate) fn as_validation_exception_field(
         511  +
            self,
         512  +
            path: ::std::string::String,
         513  +
        ) -> crate::model::ValidationExceptionField {
         514  +
            match self {
         515  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         516  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         517  +
                                                path: path + "/Bucket",
         518  +
                                            },
         519  +
        }
         520  +
        }
         521  +
    }
         522  +
    impl ::std::convert::From<ConstraintViolation>
         523  +
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
         524  +
    {
         525  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         526  +
            let first_validation_exception_field =
         527  +
                constraint_violation.as_validation_exception_field("".to_owned());
         528  +
            let validation_exception = crate::error::ValidationException {
         529  +
                message: format!(
         530  +
                    "1 validation error detected. {}",
         531  +
                    &first_validation_exception_field.message
         532  +
                ),
         533  +
                field_list: Some(vec![first_validation_exception_field]),
         534  +
            };
         535  +
            Self::ConstraintViolation(
         536  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         537  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         538  +
                            )
         539  +
        }
         540  +
    }
         541  +
    impl ::std::convert::From<Builder>
         542  +
        for crate::constrained::MaybeConstrained<crate::input::GetBucketLocationInput>
         543  +
    {
         544  +
        fn from(builder: Builder) -> Self {
         545  +
            Self::Unconstrained(builder)
         546  +
        }
         547  +
    }
         548  +
    impl ::std::convert::TryFrom<Builder> for crate::input::GetBucketLocationInput {
         549  +
        type Error = ConstraintViolation;
         550  +
         551  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         552  +
            builder.build()
         553  +
        }
         554  +
    }
         555  +
    /// A builder for [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         556  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         557  +
    pub struct Builder {
         558  +
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         559  +
    }
         560  +
    impl Builder {
         561  +
        #[allow(missing_docs)] // documentation missing in model
         562  +
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
         563  +
            self.bucket = Some(input);
         564  +
            self
         565  +
        }
         566  +
        #[allow(missing_docs)] // documentation missing in model
         567  +
        pub(crate) fn set_bucket(
         568  +
            mut self,
         569  +
            input: impl ::std::convert::Into<::std::string::String>,
         570  +
        ) -> Self {
         571  +
            self.bucket = Some(input.into());
         572  +
            self
         573  +
        }
         574  +
        /// Consumes the builder and constructs a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         575  +
        ///
         576  +
        /// The builder fails to construct a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput) if a [`ConstraintViolation`] occurs.
         577  +
        ///
         578  +
        pub fn build(self) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
         579  +
            self.build_enforcing_all_constraints()
         580  +
        }
         581  +
        fn build_enforcing_all_constraints(
         582  +
            self,
         583  +
        ) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
         584  +
            Ok(crate::input::GetBucketLocationInput {
         585  +
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         586  +
            })
         587  +
        }
         588  +
    }
         589  +
}
         590  +
/// See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         591  +
pub mod list_objects_v2_input {
         592  +
         593  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         594  +
    /// Holds one variant for each of the ways the builder can fail.
         595  +
    #[non_exhaustive]
         596  +
    #[allow(clippy::enum_variant_names)]
         597  +
    pub enum ConstraintViolation {
         598  +
        /// `bucket` was not provided but it is required when building `ListObjectsV2Input`.
         599  +
        MissingBucket,
         600  +
        /// Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
         601  +
        #[doc(hidden)]
         602  +
        EncodingType(crate::model::encoding_type::ConstraintViolation),
         603  +
        /// Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
         604  +
        #[doc(hidden)]
         605  +
        RequestPayer(crate::model::request_payer::ConstraintViolation),
         606  +
    }
         607  +
    impl ::std::fmt::Display for ConstraintViolation {
         608  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         609  +
            match self {
         610  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
         611  +
                ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
         612  +
                ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
         613  +
            }
         614  +
        }
         615  +
    }
         616  +
    impl ::std::error::Error for ConstraintViolation {}
         617  +
    impl ConstraintViolation {
         618  +
        pub(crate) fn as_validation_exception_field(
         619  +
            self,
         620  +
            path: ::std::string::String,
         621  +
        ) -> crate::model::ValidationExceptionField {
         622  +
            match self {
         623  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         624  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         625  +
                                                path: path + "/Bucket",
         626  +
                                            },
         627  +
            ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
         628  +
            ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
         629  +
        }
         630  +
        }
         631  +
    }
         632  +
    impl ::std::convert::From<ConstraintViolation>
         633  +
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
         634  +
    {
         635  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         636  +
            let first_validation_exception_field =
         637  +
                constraint_violation.as_validation_exception_field("".to_owned());
         638  +
            let validation_exception = crate::error::ValidationException {
         639  +
                message: format!(
         640  +
                    "1 validation error detected. {}",
         641  +
                    &first_validation_exception_field.message
         642  +
                ),
         643  +
                field_list: Some(vec![first_validation_exception_field]),
         644  +
            };
         645  +
            Self::ConstraintViolation(
         646  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         647  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         648  +
                            )
         649  +
        }
         650  +
    }
         651  +
    impl ::std::convert::From<Builder>
         652  +
        for crate::constrained::MaybeConstrained<crate::input::ListObjectsV2Input>
         653  +
    {
         654  +
        fn from(builder: Builder) -> Self {
         655  +
            Self::Unconstrained(builder)
         656  +
        }
         657  +
    }
         658  +
    impl ::std::convert::TryFrom<Builder> for crate::input::ListObjectsV2Input {
         659  +
        type Error = ConstraintViolation;
         660  +
         661  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         662  +
            builder.build()
         663  +
        }
         664  +
    }
         665  +
    /// A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         666  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         667  +
    pub struct Builder {
         668  +
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         669  +
        pub(crate) delimiter: ::std::option::Option<::std::string::String>,
         670  +
        pub(crate) encoding_type:
         671  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EncodingType>>,
         672  +
        pub(crate) max_keys: ::std::option::Option<i32>,
         673  +
        pub(crate) prefix: ::std::option::Option<::std::string::String>,
         674  +
        pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
         675  +
        pub(crate) fetch_owner: ::std::option::Option<bool>,
         676  +
        pub(crate) start_after: ::std::option::Option<::std::string::String>,
         677  +
        pub(crate) request_payer:
         678  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RequestPayer>>,
         679  +
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
         680  +
    }
         681  +
    impl Builder {
         682  +
        #[allow(missing_docs)] // documentation missing in model
         683  +
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
         684  +
            self.bucket = Some(input);
         685  +
            self
         686  +
        }
         687  +
        #[allow(missing_docs)] // documentation missing in model
         688  +
        pub(crate) fn set_bucket(
         689  +
            mut self,
         690  +
            input: impl ::std::convert::Into<::std::string::String>,
         691  +
        ) -> Self {
         692  +
            self.bucket = Some(input.into());
         693  +
            self
         694  +
        }
         695  +
        #[allow(missing_docs)] // documentation missing in model
         696  +
        pub fn delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         697  +
            self.delimiter = input;
         698  +
            self
         699  +
        }
         700  +
        #[allow(missing_docs)] // documentation missing in model
         701  +
        pub(crate) fn set_delimiter(
         702  +
            mut self,
         703  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         704  +
        ) -> Self {
         705  +
            self.delimiter = input.map(|v| v.into());
         706  +
            self
         707  +
        }
         708  +
        #[allow(missing_docs)] // documentation missing in model
         709  +
        pub fn encoding_type(
         710  +
            mut self,
         711  +
            input: ::std::option::Option<crate::model::EncodingType>,
         712  +
        ) -> Self {
         713  +
            self.encoding_type = input.map(crate::constrained::MaybeConstrained::Constrained);
         714  +
            self
         715  +
        }
         716  +
        #[allow(missing_docs)] // documentation missing in model
         717  +
        pub(crate) fn set_encoding_type(
         718  +
            mut self,
         719  +
            input: Option<
         720  +
                impl ::std::convert::Into<
         721  +
                    crate::constrained::MaybeConstrained<crate::model::EncodingType>,
         722  +
                >,
         723  +
            >,
         724  +
        ) -> Self {
         725  +
            self.encoding_type = input.map(|v| v.into());
         726  +
            self
         727  +
        }
         728  +
        #[allow(missing_docs)] // documentation missing in model
         729  +
        pub fn max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
         730  +
            self.max_keys = input;
         731  +
            self
         732  +
        }
         733  +
        #[allow(missing_docs)] // documentation missing in model
         734  +
        pub(crate) fn set_max_keys(
         735  +
            mut self,
         736  +
            input: Option<impl ::std::convert::Into<i32>>,
         737  +
        ) -> Self {
         738  +
            self.max_keys = input.map(|v| v.into());
         739  +
            self
         740  +
        }
         741  +
        #[allow(missing_docs)] // documentation missing in model
         742  +
        pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         743  +
            self.prefix = input;
         744  +
            self
         745  +
        }
         746  +
        #[allow(missing_docs)] // documentation missing in model
         747  +
        pub(crate) fn set_prefix(
         748  +
            mut self,
         749  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         750  +
        ) -> Self {
         751  +
            self.prefix = input.map(|v| v.into());
         752  +
            self
         753  +
        }
         754  +
        #[allow(missing_docs)] // documentation missing in model
         755  +
        pub fn continuation_token(
         756  +
            mut self,
         757  +
            input: ::std::option::Option<::std::string::String>,
         758  +
        ) -> Self {
         759  +
            self.continuation_token = input;
         760  +
            self
         761  +
        }
         762  +
        #[allow(missing_docs)] // documentation missing in model
         763  +
        pub(crate) fn set_continuation_token(
         764  +
            mut self,
         765  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         766  +
        ) -> Self {
         767  +
            self.continuation_token = input.map(|v| v.into());
         768  +
            self
         769  +
        }
         770  +
        #[allow(missing_docs)] // documentation missing in model
         771  +
        pub fn fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
         772  +
            self.fetch_owner = input;
         773  +
            self
         774  +
        }
         775  +
        #[allow(missing_docs)] // documentation missing in model
         776  +
        pub(crate) fn set_fetch_owner(
         777  +
            mut self,
         778  +
            input: Option<impl ::std::convert::Into<bool>>,
         779  +
        ) -> Self {
         780  +
            self.fetch_owner = input.map(|v| v.into());
         781  +
            self
         782  +
        }
         783  +
        #[allow(missing_docs)] // documentation missing in model
         784  +
        pub fn start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         785  +
            self.start_after = input;
         786  +
            self
         787  +
        }
         788  +
        #[allow(missing_docs)] // documentation missing in model
         789  +
        pub(crate) fn set_start_after(
         790  +
            mut self,
         791  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         792  +
        ) -> Self {
         793  +
            self.start_after = input.map(|v| v.into());
         794  +
            self
         795  +
        }
         796  +
        #[allow(missing_docs)] // documentation missing in model
         797  +
        pub fn request_payer(
         798  +
            mut self,
         799  +
            input: ::std::option::Option<crate::model::RequestPayer>,
         800  +
        ) -> Self {
         801  +
            self.request_payer = input.map(crate::constrained::MaybeConstrained::Constrained);
         802  +
            self
         803  +
        }
         804  +
        #[allow(missing_docs)] // documentation missing in model
         805  +
        pub(crate) fn set_request_payer(
         806  +
            mut self,
         807  +
            input: Option<
         808  +
                impl ::std::convert::Into<
         809  +
                    crate::constrained::MaybeConstrained<crate::model::RequestPayer>,
         810  +
                >,
         811  +
            >,
         812  +
        ) -> Self {
         813  +
            self.request_payer = input.map(|v| v.into());
         814  +
            self
         815  +
        }
         816  +
        #[allow(missing_docs)] // documentation missing in model
         817  +
        pub fn expected_bucket_owner(
         818  +
            mut self,
         819  +
            input: ::std::option::Option<::std::string::String>,
         820  +
        ) -> Self {
         821  +
            self.expected_bucket_owner = input;
         822  +
            self
         823  +
        }
         824  +
        #[allow(missing_docs)] // documentation missing in model
         825  +
        pub(crate) fn set_expected_bucket_owner(
         826  +
            mut self,
         827  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         828  +
        ) -> Self {
         829  +
            self.expected_bucket_owner = input.map(|v| v.into());
         830  +
            self
         831  +
        }
         832  +
        /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         833  +
        ///
         834  +
        /// The builder fails to construct a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input) if a [`ConstraintViolation`] occurs.
         835  +
        ///
         836  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         837  +
        pub fn build(self) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
         838  +
            self.build_enforcing_all_constraints()
         839  +
        }
         840  +
        fn build_enforcing_all_constraints(
         841  +
            self,
         842  +
        ) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
         843  +
            Ok(crate::input::ListObjectsV2Input {
         844  +
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         845  +
                delimiter: self.delimiter,
         846  +
                encoding_type: self
         847  +
                    .encoding_type
         848  +
                    .map(|v| match v {
         849  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         850  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         851  +
                    })
         852  +
                    .map(|res| res.map_err(ConstraintViolation::EncodingType))
         853  +
                    .transpose()?,
         854  +
                max_keys: self.max_keys,
         855  +
                prefix: self.prefix,
         856  +
                continuation_token: self.continuation_token,
         857  +
                fetch_owner: self.fetch_owner,
         858  +
                start_after: self.start_after,
         859  +
                request_payer: self
         860  +
                    .request_payer
         861  +
                    .map(|v| match v {
         862  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         863  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         864  +
                    })
         865  +
                    .map(|res| res.map_err(ConstraintViolation::RequestPayer))
         866  +
                    .transpose()?,
         867  +
                expected_bucket_owner: self.expected_bucket_owner,
         868  +
            })
         869  +
        }
         870  +
    }
         871  +
}