Server Test

Server Test

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/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/rpcv2Cbor_extras_no_initial_response-http0x/rust-server-codegen/Cargo.toml

@@ -0,1 +0,59 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "rpcv2cbor_extras_no_initial_response-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 = "smithy.protocols#rpcv2Cbor"
          12  +
[dependencies.aws-smithy-cbor]
          13  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-cbor"
          14  +
[dependencies.aws-smithy-eventstream]
          15  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-eventstream"
          16  +
[dependencies.aws-smithy-legacy-http]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http"
          18  +
features = ["event-stream"]
          19  +
[dependencies.aws-smithy-legacy-http-server]
          20  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-legacy-http-server"
          21  +
[dependencies.aws-smithy-runtime-api]
          22  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          23  +
features = ["http-02x", "client", "http-1x"]
          24  +
[dependencies.aws-smithy-types]
          25  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          26  +
features = ["http-body-0-4-x"]
          27  +
[dependencies.futures-util]
          28  +
version = "0.3"
          29  +
[dependencies.http]
          30  +
version = "0.2.9"
          31  +
[dependencies.hyper]
          32  +
version = "0.14.26"
          33  +
[dependencies.mime]
          34  +
version = "0.3"
          35  +
[dependencies.pin-project-lite]
          36  +
version = "0.2"
          37  +
[dependencies.tower]
          38  +
version = "0.4"
          39  +
[dependencies.tracing]
          40  +
version = "0.1"
          41  +
[dev-dependencies.aws-smithy-protocol-test]
          42  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
          43  +
[dev-dependencies.bytes]
          44  +
version = "1.4.0"
          45  +
[dev-dependencies.pretty_assertions]
          46  +
version = "1.3.0"
          47  +
[dev-dependencies.tokio]
          48  +
version = "1.23.1"
          49  +
features = ["macros", "test-util", "rt-multi-thread"]
          50  +
[dev-dependencies.tracing-test]
          51  +
version = "0.2.5"
          52  +
features = ["no-env-filter"]
          53  +
[features]
          54  +
rt-tokio = ["aws-smithy-types/rt-tokio"]
          55  +
aws-lambda = ["aws-smithy-legacy-http-server/aws-lambda"]
          56  +
request-id = ["aws-smithy-legacy-http-server/request-id"]
          57  +
default = ["rt-tokio", "request-id"]
          58  +
          59  +

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

@@ -0,1 +0,107 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
pub(crate) mod complex_map_constrained {
           4  +
           5  +
    #[derive(Debug, Clone)]
           6  +
    pub(crate) struct ComplexMapConstrained(
           7  +
        pub(crate) std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
           8  +
    );
           9  +
          10  +
    impl crate::constrained::Constrained for ComplexMapConstrained {
          11  +
        type Unconstrained =
          12  +
            crate::unconstrained::complex_map_unconstrained::ComplexMapUnconstrained;
          13  +
    }
          14  +
    impl
          15  +
        ::std::convert::From<
          16  +
            ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          17  +
        > for ComplexMapConstrained
          18  +
    {
          19  +
        fn from(
          20  +
            v: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          21  +
        ) -> Self {
          22  +
            Self(v)
          23  +
        }
          24  +
    }
          25  +
          26  +
    impl ::std::convert::From<ComplexMapConstrained>
          27  +
        for ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>
          28  +
    {
          29  +
        fn from(v: ComplexMapConstrained) -> Self {
          30  +
            v.0
          31  +
        }
          32  +
    }
          33  +
}
          34  +
pub(crate) mod complex_list_constrained {
          35  +
          36  +
    #[derive(Debug, Clone)]
          37  +
    pub(crate) struct ComplexListConstrained(
          38  +
        pub(crate) std::vec::Vec<crate::constrained::complex_map_constrained::ComplexMapConstrained>,
          39  +
    );
          40  +
          41  +
    impl crate::constrained::Constrained for ComplexListConstrained {
          42  +
        type Unconstrained =
          43  +
            crate::unconstrained::complex_list_unconstrained::ComplexListUnconstrained;
          44  +
    }
          45  +
    impl
          46  +
        ::std::convert::From<
          47  +
            ::std::vec::Vec<
          48  +
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          49  +
            >,
          50  +
        > for ComplexListConstrained
          51  +
    {
          52  +
        fn from(
          53  +
            v: ::std::vec::Vec<
          54  +
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          55  +
            >,
          56  +
        ) -> Self {
          57  +
            Self(v.into_iter().map(|item| item.into()).collect())
          58  +
        }
          59  +
    }
          60  +
          61  +
    impl ::std::convert::From<ComplexListConstrained>
          62  +
        for ::std::vec::Vec<
          63  +
            ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
          64  +
        >
          65  +
    {
          66  +
        fn from(v: ComplexListConstrained) -> Self {
          67  +
            v.0.into_iter().map(|item| item.into()).collect()
          68  +
        }
          69  +
    }
          70  +
}
          71  +
pub(crate) mod struct_list_constrained {
          72  +
          73  +
    #[derive(Debug, Clone)]
          74  +
    pub(crate) struct StructListConstrained(pub(crate) std::vec::Vec<crate::model::SimpleStruct>);
          75  +
          76  +
    impl crate::constrained::Constrained for StructListConstrained {
          77  +
        type Unconstrained =
          78  +
            crate::unconstrained::struct_list_unconstrained::StructListUnconstrained;
          79  +
    }
          80  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::SimpleStruct>> for StructListConstrained {
          81  +
        fn from(v: ::std::vec::Vec<crate::model::SimpleStruct>) -> Self {
          82  +
            Self(v)
          83  +
        }
          84  +
    }
          85  +
          86  +
    impl ::std::convert::From<StructListConstrained> for ::std::vec::Vec<crate::model::SimpleStruct> {
          87  +
        fn from(v: StructListConstrained) -> Self {
          88  +
            v.0
          89  +
        }
          90  +
    }
          91  +
}
          92  +
          93  +
/*
          94  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
          95  +
 * SPDX-License-Identifier: Apache-2.0
          96  +
 */
          97  +
          98  +
pub(crate) trait Constrained {
          99  +
    type Unconstrained;
         100  +
}
         101  +
         102  +
#[derive(Debug, Clone)]
         103  +
#[allow(dead_code)]
         104  +
pub(crate) enum MaybeConstrained<T: Constrained> {
         105  +
    Constrained(T),
         106  +
    Unconstrained(T::Unconstrained),
         107  +
}

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

@@ -0,1 +0,423 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Error type for the `StreamingOperationWithOptionalData` operation.
           3  +
/// Each variant represents an error that can occur for the `StreamingOperationWithOptionalData` operation.
           4  +
#[derive(::std::fmt::Debug)]
           5  +
pub enum StreamingOperationWithOptionalDataError {
           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 StreamingOperationWithOptionalDataError {
          10  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          11  +
        match &self {
          12  +
            StreamingOperationWithOptionalDataError::ValidationException(_inner) => _inner.fmt(f),
          13  +
        }
          14  +
    }
          15  +
}
          16  +
impl StreamingOperationWithOptionalDataError {
          17  +
    /// Returns `true` if the error kind is `StreamingOperationWithOptionalDataError::ValidationException`.
          18  +
    pub fn is_validation_exception(&self) -> bool {
          19  +
        matches!(
          20  +
            &self,
          21  +
            StreamingOperationWithOptionalDataError::ValidationException(_)
          22  +
        )
          23  +
    }
          24  +
    /// Returns the error name string by matching the correct variant.
          25  +
    pub fn name(&self) -> &'static str {
          26  +
        match &self {
          27  +
            StreamingOperationWithOptionalDataError::ValidationException(_inner) => _inner.name(),
          28  +
        }
          29  +
    }
          30  +
}
          31  +
impl ::std::error::Error for StreamingOperationWithOptionalDataError {
          32  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          33  +
        match &self {
          34  +
            StreamingOperationWithOptionalDataError::ValidationException(_inner) => Some(_inner),
          35  +
        }
          36  +
    }
          37  +
}
          38  +
impl ::std::convert::From<crate::error::ValidationException>
          39  +
    for crate::error::StreamingOperationWithOptionalDataError
          40  +
{
          41  +
    fn from(
          42  +
        variant: crate::error::ValidationException,
          43  +
    ) -> crate::error::StreamingOperationWithOptionalDataError {
          44  +
        Self::ValidationException(variant)
          45  +
    }
          46  +
}
          47  +
          48  +
/// 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.
          49  +
#[derive(
          50  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          51  +
)]
          52  +
pub struct ValidationException {
          53  +
    /// A summary of the validation failure.
          54  +
    pub message: ::std::string::String,
          55  +
    /// 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.
          56  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          57  +
}
          58  +
impl ValidationException {
          59  +
    /// 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.
          60  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
          61  +
        self.field_list.as_deref()
          62  +
    }
          63  +
}
          64  +
impl ValidationException {
          65  +
    /// Returns the error message.
          66  +
    pub fn message(&self) -> &str {
          67  +
        &self.message
          68  +
    }
          69  +
    #[doc(hidden)]
          70  +
    /// Returns the error name.
          71  +
    pub fn name(&self) -> &'static str {
          72  +
        "ValidationException"
          73  +
    }
          74  +
}
          75  +
impl ::std::fmt::Display for ValidationException {
          76  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          77  +
        ::std::write!(f, "ValidationException")?;
          78  +
        {
          79  +
            ::std::write!(f, ": {}", &self.message)?;
          80  +
        }
          81  +
        Ok(())
          82  +
    }
          83  +
}
          84  +
impl ::std::error::Error for ValidationException {}
          85  +
impl ValidationException {
          86  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
          87  +
    pub fn builder() -> crate::error::validation_exception::Builder {
          88  +
        crate::error::validation_exception::Builder::default()
          89  +
    }
          90  +
}
          91  +
          92  +
/// Error type for the `StreamingOperationWithInitialResponse` operation.
          93  +
/// Each variant represents an error that can occur for the `StreamingOperationWithInitialResponse` operation.
          94  +
#[derive(::std::fmt::Debug)]
          95  +
pub enum StreamingOperationWithInitialResponseError {
          96  +
    /// 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.
          97  +
    ValidationException(crate::error::ValidationException),
          98  +
}
          99  +
impl ::std::fmt::Display for StreamingOperationWithInitialResponseError {
         100  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         101  +
        match &self {
         102  +
            StreamingOperationWithInitialResponseError::ValidationException(_inner) => {
         103  +
                _inner.fmt(f)
         104  +
            }
         105  +
        }
         106  +
    }
         107  +
}
         108  +
impl StreamingOperationWithInitialResponseError {
         109  +
    /// Returns `true` if the error kind is `StreamingOperationWithInitialResponseError::ValidationException`.
         110  +
    pub fn is_validation_exception(&self) -> bool {
         111  +
        matches!(
         112  +
            &self,
         113  +
            StreamingOperationWithInitialResponseError::ValidationException(_)
         114  +
        )
         115  +
    }
         116  +
    /// Returns the error name string by matching the correct variant.
         117  +
    pub fn name(&self) -> &'static str {
         118  +
        match &self {
         119  +
            StreamingOperationWithInitialResponseError::ValidationException(_inner) => {
         120  +
                _inner.name()
         121  +
            }
         122  +
        }
         123  +
    }
         124  +
}
         125  +
impl ::std::error::Error for StreamingOperationWithInitialResponseError {
         126  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         127  +
        match &self {
         128  +
            StreamingOperationWithInitialResponseError::ValidationException(_inner) => Some(_inner),
         129  +
        }
         130  +
    }
         131  +
}
         132  +
impl ::std::convert::From<crate::error::ValidationException>
         133  +
    for crate::error::StreamingOperationWithInitialResponseError
         134  +
{
         135  +
    fn from(
         136  +
        variant: crate::error::ValidationException,
         137  +
    ) -> crate::error::StreamingOperationWithInitialResponseError {
         138  +
        Self::ValidationException(variant)
         139  +
    }
         140  +
}
         141  +
         142  +
/// Error type for the `StreamingOperationWithInitialData` operation.
         143  +
/// Each variant represents an error that can occur for the `StreamingOperationWithInitialData` operation.
         144  +
#[derive(::std::fmt::Debug)]
         145  +
pub enum StreamingOperationWithInitialDataError {
         146  +
    /// 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.
         147  +
    ValidationException(crate::error::ValidationException),
         148  +
}
         149  +
impl ::std::fmt::Display for StreamingOperationWithInitialDataError {
         150  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         151  +
        match &self {
         152  +
            StreamingOperationWithInitialDataError::ValidationException(_inner) => _inner.fmt(f),
         153  +
        }
         154  +
    }
         155  +
}
         156  +
impl StreamingOperationWithInitialDataError {
         157  +
    /// Returns `true` if the error kind is `StreamingOperationWithInitialDataError::ValidationException`.
         158  +
    pub fn is_validation_exception(&self) -> bool {
         159  +
        matches!(
         160  +
            &self,
         161  +
            StreamingOperationWithInitialDataError::ValidationException(_)
         162  +
        )
         163  +
    }
         164  +
    /// Returns the error name string by matching the correct variant.
         165  +
    pub fn name(&self) -> &'static str {
         166  +
        match &self {
         167  +
            StreamingOperationWithInitialDataError::ValidationException(_inner) => _inner.name(),
         168  +
        }
         169  +
    }
         170  +
}
         171  +
impl ::std::error::Error for StreamingOperationWithInitialDataError {
         172  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         173  +
        match &self {
         174  +
            StreamingOperationWithInitialDataError::ValidationException(_inner) => Some(_inner),
         175  +
        }
         176  +
    }
         177  +
}
         178  +
impl ::std::convert::From<crate::error::ValidationException>
         179  +
    for crate::error::StreamingOperationWithInitialDataError
         180  +
{
         181  +
    fn from(
         182  +
        variant: crate::error::ValidationException,
         183  +
    ) -> crate::error::StreamingOperationWithInitialDataError {
         184  +
        Self::ValidationException(variant)
         185  +
    }
         186  +
}
         187  +
         188  +
/// Error type for the `StreamingOperation` operation.
         189  +
/// Each variant represents an error that can occur for the `StreamingOperation` operation.
         190  +
#[derive(::std::fmt::Debug)]
         191  +
pub enum StreamingOperationError {
         192  +
    /// 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.
         193  +
    ValidationException(crate::error::ValidationException),
         194  +
}
         195  +
impl ::std::fmt::Display for StreamingOperationError {
         196  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         197  +
        match &self {
         198  +
            StreamingOperationError::ValidationException(_inner) => _inner.fmt(f),
         199  +
        }
         200  +
    }
         201  +
}
         202  +
impl StreamingOperationError {
         203  +
    /// Returns `true` if the error kind is `StreamingOperationError::ValidationException`.
         204  +
    pub fn is_validation_exception(&self) -> bool {
         205  +
        matches!(&self, StreamingOperationError::ValidationException(_))
         206  +
    }
         207  +
    /// Returns the error name string by matching the correct variant.
         208  +
    pub fn name(&self) -> &'static str {
         209  +
        match &self {
         210  +
            StreamingOperationError::ValidationException(_inner) => _inner.name(),
         211  +
        }
         212  +
    }
         213  +
}
         214  +
impl ::std::error::Error for StreamingOperationError {
         215  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         216  +
        match &self {
         217  +
            StreamingOperationError::ValidationException(_inner) => Some(_inner),
         218  +
        }
         219  +
    }
         220  +
}
         221  +
impl ::std::convert::From<crate::error::ValidationException>
         222  +
    for crate::error::StreamingOperationError
         223  +
{
         224  +
    fn from(variant: crate::error::ValidationException) -> crate::error::StreamingOperationError {
         225  +
        Self::ValidationException(variant)
         226  +
    }
         227  +
}
         228  +
         229  +
/// Error type for the `ComplexStructOperation` operation.
         230  +
/// Each variant represents an error that can occur for the `ComplexStructOperation` operation.
         231  +
#[derive(::std::fmt::Debug)]
         232  +
pub enum ComplexStructOperationError {
         233  +
    /// 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.
         234  +
    ValidationException(crate::error::ValidationException),
         235  +
}
         236  +
impl ::std::fmt::Display for ComplexStructOperationError {
         237  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         238  +
        match &self {
         239  +
            ComplexStructOperationError::ValidationException(_inner) => _inner.fmt(f),
         240  +
        }
         241  +
    }
         242  +
}
         243  +
impl ComplexStructOperationError {
         244  +
    /// Returns `true` if the error kind is `ComplexStructOperationError::ValidationException`.
         245  +
    pub fn is_validation_exception(&self) -> bool {
         246  +
        matches!(&self, ComplexStructOperationError::ValidationException(_))
         247  +
    }
         248  +
    /// Returns the error name string by matching the correct variant.
         249  +
    pub fn name(&self) -> &'static str {
         250  +
        match &self {
         251  +
            ComplexStructOperationError::ValidationException(_inner) => _inner.name(),
         252  +
        }
         253  +
    }
         254  +
}
         255  +
impl ::std::error::Error for ComplexStructOperationError {
         256  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         257  +
        match &self {
         258  +
            ComplexStructOperationError::ValidationException(_inner) => Some(_inner),
         259  +
        }
         260  +
    }
         261  +
}
         262  +
impl ::std::convert::From<crate::error::ValidationException>
         263  +
    for crate::error::ComplexStructOperationError
         264  +
{
         265  +
    fn from(
         266  +
        variant: crate::error::ValidationException,
         267  +
    ) -> crate::error::ComplexStructOperationError {
         268  +
        Self::ValidationException(variant)
         269  +
    }
         270  +
}
         271  +
         272  +
/// Error type for the `ErrorSerializationOperation` operation.
         273  +
/// Each variant represents an error that can occur for the `ErrorSerializationOperation` operation.
         274  +
#[derive(::std::fmt::Debug)]
         275  +
pub enum ErrorSerializationOperationError {
         276  +
    /// 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.
         277  +
    ValidationException(crate::error::ValidationException),
         278  +
}
         279  +
impl ::std::fmt::Display for ErrorSerializationOperationError {
         280  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         281  +
        match &self {
         282  +
            ErrorSerializationOperationError::ValidationException(_inner) => _inner.fmt(f),
         283  +
        }
         284  +
    }
         285  +
}
         286  +
impl ErrorSerializationOperationError {
         287  +
    /// Returns `true` if the error kind is `ErrorSerializationOperationError::ValidationException`.
         288  +
    pub fn is_validation_exception(&self) -> bool {
         289  +
        matches!(
         290  +
            &self,
         291  +
            ErrorSerializationOperationError::ValidationException(_)
         292  +
        )
         293  +
    }
         294  +
    /// Returns the error name string by matching the correct variant.
         295  +
    pub fn name(&self) -> &'static str {
         296  +
        match &self {
         297  +
            ErrorSerializationOperationError::ValidationException(_inner) => _inner.name(),
         298  +
        }
         299  +
    }
         300  +
}
         301  +
impl ::std::error::Error for ErrorSerializationOperationError {
         302  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         303  +
        match &self {
         304  +
            ErrorSerializationOperationError::ValidationException(_inner) => Some(_inner),
         305  +
        }
         306  +
    }
         307  +
}
         308  +
impl ::std::convert::From<crate::error::ValidationException>
         309  +
    for crate::error::ErrorSerializationOperationError
         310  +
{
         311  +
    fn from(
         312  +
        variant: crate::error::ValidationException,
         313  +
    ) -> crate::error::ErrorSerializationOperationError {
         314  +
        Self::ValidationException(variant)
         315  +
    }
         316  +
}
         317  +
         318  +
/// Error type for the `SimpleStructOperation` operation.
         319  +
/// Each variant represents an error that can occur for the `SimpleStructOperation` operation.
         320  +
#[derive(::std::fmt::Debug)]
         321  +
pub enum SimpleStructOperationError {
         322  +
    /// 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.
         323  +
    ValidationException(crate::error::ValidationException),
         324  +
}
         325  +
impl ::std::fmt::Display for SimpleStructOperationError {
         326  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         327  +
        match &self {
         328  +
            SimpleStructOperationError::ValidationException(_inner) => _inner.fmt(f),
         329  +
        }
         330  +
    }
         331  +
}
         332  +
impl SimpleStructOperationError {
         333  +
    /// Returns `true` if the error kind is `SimpleStructOperationError::ValidationException`.
         334  +
    pub fn is_validation_exception(&self) -> bool {
         335  +
        matches!(&self, SimpleStructOperationError::ValidationException(_))
         336  +
    }
         337  +
    /// Returns the error name string by matching the correct variant.
         338  +
    pub fn name(&self) -> &'static str {
         339  +
        match &self {
         340  +
            SimpleStructOperationError::ValidationException(_inner) => _inner.name(),
         341  +
        }
         342  +
    }
         343  +
}
         344  +
impl ::std::error::Error for SimpleStructOperationError {
         345  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         346  +
        match &self {
         347  +
            SimpleStructOperationError::ValidationException(_inner) => Some(_inner),
         348  +
        }
         349  +
    }
         350  +
}
         351  +
impl ::std::convert::From<crate::error::ValidationException>
         352  +
    for crate::error::SimpleStructOperationError
         353  +
{
         354  +
    fn from(
         355  +
        variant: crate::error::ValidationException,
         356  +
    ) -> crate::error::SimpleStructOperationError {
         357  +
        Self::ValidationException(variant)
         358  +
    }
         359  +
}
         360  +
/// See [`ValidationException`](crate::error::ValidationException).
         361  +
pub mod validation_exception {
         362  +
         363  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         364  +
    /// Holds one variant for each of the ways the builder can fail.
         365  +
    #[non_exhaustive]
         366  +
    #[allow(clippy::enum_variant_names)]
         367  +
    pub enum ConstraintViolation {
         368  +
        /// `message` was not provided but it is required when building `ValidationException`.
         369  +
        MissingMessage,
         370  +
    }
         371  +
    impl ::std::fmt::Display for ConstraintViolation {
         372  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         373  +
            match self {
         374  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         375  +
            }
         376  +
        }
         377  +
    }
         378  +
    impl ::std::error::Error for ConstraintViolation {}
         379  +
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
         380  +
        type Error = ConstraintViolation;
         381  +
         382  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         383  +
            builder.build()
         384  +
        }
         385  +
    }
         386  +
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         387  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         388  +
    pub struct Builder {
         389  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         390  +
        pub(crate) field_list:
         391  +
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         392  +
    }
         393  +
    impl Builder {
         394  +
        /// A summary of the validation failure.
         395  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         396  +
            self.message = Some(input);
         397  +
            self
         398  +
        }
         399  +
        /// 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.
         400  +
        pub fn field_list(
         401  +
            mut self,
         402  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         403  +
        ) -> Self {
         404  +
            self.field_list = input;
         405  +
            self
         406  +
        }
         407  +
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         408  +
        ///
         409  +
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
         410  +
        ///
         411  +
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
         412  +
            self.build_enforcing_all_constraints()
         413  +
        }
         414  +
        fn build_enforcing_all_constraints(
         415  +
            self,
         416  +
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
         417  +
            Ok(crate::error::ValidationException {
         418  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         419  +
                field_list: self.field_list,
         420  +
            })
         421  +
        }
         422  +
    }
         423  +
}

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

@@ -0,1 +0,160 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[non_exhaustive]
           3  +
#[derive(Debug)]
           4  +
pub struct EventsErrorMarshaller;
           5  +
           6  +
impl EventsErrorMarshaller {
           7  +
    pub fn new() -> Self {
           8  +
        EventsErrorMarshaller
           9  +
    }
          10  +
}
          11  +
impl ::aws_smithy_eventstream::frame::MarshallMessage for EventsErrorMarshaller {
          12  +
    type Input = ::aws_smithy_legacy_http::event_stream::MessageStreamError;
          13  +
    fn marshall(
          14  +
        &self,
          15  +
        _input: Self::Input,
          16  +
    ) -> std::result::Result<
          17  +
        ::aws_smithy_types::event_stream::Message,
          18  +
        ::aws_smithy_eventstream::error::Error,
          19  +
    > {
          20  +
        let mut headers = Vec::new();
          21  +
        headers.push(::aws_smithy_types::event_stream::Header::new(
          22  +
            ":message-type",
          23  +
            ::aws_smithy_types::event_stream::HeaderValue::String("exception".into()),
          24  +
        ));
          25  +
        let payload = Vec::new();
          26  +
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(
          27  +
            headers, payload,
          28  +
        ))
          29  +
    }
          30  +
}
          31  +
          32  +
#[non_exhaustive]
          33  +
#[derive(Debug)]
          34  +
pub struct EventsMarshaller;
          35  +
          36  +
impl EventsMarshaller {
          37  +
    pub fn new() -> Self {
          38  +
        EventsMarshaller
          39  +
    }
          40  +
}
          41  +
impl ::aws_smithy_eventstream::frame::MarshallMessage for EventsMarshaller {
          42  +
    type Input = crate::model::Events;
          43  +
    fn marshall(
          44  +
        &self,
          45  +
        input: Self::Input,
          46  +
    ) -> std::result::Result<
          47  +
        ::aws_smithy_types::event_stream::Message,
          48  +
        ::aws_smithy_eventstream::error::Error,
          49  +
    > {
          50  +
        let mut headers = Vec::new();
          51  +
        headers.push(::aws_smithy_types::event_stream::Header::new(
          52  +
            ":message-type",
          53  +
            ::aws_smithy_types::event_stream::HeaderValue::String("event".into()),
          54  +
        ));
          55  +
        let payload = match input {
          56  +
            Self::Input::A(inner) => {
          57  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          58  +
                    ":event-type",
          59  +
                    ::aws_smithy_types::event_stream::HeaderValue::String("A".into()),
          60  +
                ));
          61  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          62  +
                    ":content-type",
          63  +
                    ::aws_smithy_types::event_stream::HeaderValue::String(
          64  +
                        "application/cbor".into(),
          65  +
                    ),
          66  +
                ));
          67  +
                crate::protocol_serde::shape_events::ser_a_payload(&inner).map_err(|err| {
          68  +
                    ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}"))
          69  +
                })?
          70  +
            }
          71  +
            Self::Input::B(inner) => {
          72  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          73  +
                    ":event-type",
          74  +
                    ::aws_smithy_types::event_stream::HeaderValue::String("B".into()),
          75  +
                ));
          76  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          77  +
                    ":content-type",
          78  +
                    ::aws_smithy_types::event_stream::HeaderValue::String(
          79  +
                        "application/cbor".into(),
          80  +
                    ),
          81  +
                ));
          82  +
                crate::protocol_serde::shape_events::ser_b_payload(&inner).map_err(|err| {
          83  +
                    ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}"))
          84  +
                })?
          85  +
            }
          86  +
            Self::Input::C(inner) => {
          87  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          88  +
                    ":event-type",
          89  +
                    ::aws_smithy_types::event_stream::HeaderValue::String("C".into()),
          90  +
                ));
          91  +
                headers.push(::aws_smithy_types::event_stream::Header::new(
          92  +
                    ":content-type",
          93  +
                    ::aws_smithy_types::event_stream::HeaderValue::String(
          94  +
                        "application/cbor".into(),
          95  +
                    ),
          96  +
                ));
          97  +
                crate::protocol_serde::shape_events::ser_c_payload(&inner).map_err(|err| {
          98  +
                    ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}"))
          99  +
                })?
         100  +
            }
         101  +
        };
         102  +
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(
         103  +
            headers, payload,
         104  +
        ))
         105  +
    }
         106  +
}
         107  +
         108  +
#[non_exhaustive]
         109  +
#[derive(Debug)]
         110  +
pub struct EventsUnmarshaller;
         111  +
         112  +
impl EventsUnmarshaller {
         113  +
    pub fn new() -> Self {
         114  +
        EventsUnmarshaller
         115  +
    }
         116  +
}
         117  +
impl ::aws_smithy_eventstream::frame::UnmarshallMessage for EventsUnmarshaller {
         118  +
    type Output = crate::model::Events;
         119  +
    type Error = ::aws_smithy_legacy_http::event_stream::MessageStreamError;
         120  +
    fn unmarshall(
         121  +
        &self,
         122  +
        message: &::aws_smithy_types::event_stream::Message,
         123  +
    ) -> std::result::Result<
         124  +
        ::aws_smithy_eventstream::frame::UnmarshalledMessage<Self::Output, Self::Error>,
         125  +
        ::aws_smithy_eventstream::error::Error,
         126  +
    > {
         127  +
        let response_headers = ::aws_smithy_eventstream::smithy::parse_response_headers(message)?;
         128  +
        match response_headers.message_type.as_str() {
         129  +
            "event" => match response_headers.smithy_type.as_str() {
         130  +
                "A" => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         131  +
                    crate::model::Events::A(crate::model::Event::builder().build()),
         132  +
                )),
         133  +
                "B" => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         134  +
                    crate::model::Events::B(crate::model::Event::builder().build()),
         135  +
                )),
         136  +
                "C" => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         137  +
                    crate::model::Events::C(crate::model::Event::builder().build()),
         138  +
                )),
         139  +
                _unknown_variant => {
         140  +
                    return Err(::aws_smithy_eventstream::error::Error::unmarshalling(
         141  +
                        format!("unrecognized :event-type: {_unknown_variant}"),
         142  +
                    ));
         143  +
                }
         144  +
            },
         145  +
            "exception" => {
         146  +
                return Err(aws_smithy_eventstream::error::Error::unmarshalling(
         147  +
                    format!(
         148  +
                        "unrecognized exception: {}",
         149  +
                        response_headers.smithy_type.as_str()
         150  +
                    ),
         151  +
                ));
         152  +
            }
         153  +
            value => {
         154  +
                return Err(::aws_smithy_eventstream::error::Error::unmarshalling(
         155  +
                    format!("unrecognized :message-type: {value}"),
         156  +
                ));
         157  +
            }
         158  +
        }
         159  +
    }
         160  +
}

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

@@ -0,1 +0,2625 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(::std::fmt::Debug)]
           4  +
pub struct StreamingOperationWithOptionalDataInput {
           5  +
    #[allow(missing_docs)] // documentation missing in model
           6  +
    pub optional_data: ::std::option::Option<::std::string::String>,
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub events: crate::sigv4_event_stream::SigV4Receiver<
           9  +
        crate::model::Events,
          10  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          11  +
    >,
          12  +
}
          13  +
impl StreamingOperationWithOptionalDataInput {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn optional_data(&self) -> ::std::option::Option<&str> {
          16  +
        self.optional_data.as_deref()
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn events(
          20  +
        &self,
          21  +
    ) -> &crate::sigv4_event_stream::SigV4Receiver<
          22  +
        crate::model::Events,
          23  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          24  +
    > {
          25  +
        &self.events
          26  +
    }
          27  +
}
          28  +
impl StreamingOperationWithOptionalDataInput {
          29  +
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithOptionalDataInput`](crate::input::StreamingOperationWithOptionalDataInput).
          30  +
    pub fn builder() -> crate::input::streaming_operation_with_optional_data_input::Builder {
          31  +
        crate::input::streaming_operation_with_optional_data_input::Builder::default()
          32  +
    }
          33  +
}
          34  +
impl crate::constrained::Constrained for crate::input::StreamingOperationWithOptionalDataInput {
          35  +
    type Unconstrained = crate::input::streaming_operation_with_optional_data_input::Builder;
          36  +
}
          37  +
          38  +
#[allow(missing_docs)] // documentation missing in model
          39  +
#[derive(::std::fmt::Debug)]
          40  +
pub struct StreamingOperationWithInitialResponseInput {
          41  +
    #[allow(missing_docs)] // documentation missing in model
          42  +
    pub events: crate::sigv4_event_stream::SigV4Receiver<
          43  +
        crate::model::Events,
          44  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          45  +
    >,
          46  +
}
          47  +
impl StreamingOperationWithInitialResponseInput {
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn events(
          50  +
        &self,
          51  +
    ) -> &crate::sigv4_event_stream::SigV4Receiver<
          52  +
        crate::model::Events,
          53  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          54  +
    > {
          55  +
        &self.events
          56  +
    }
          57  +
}
          58  +
impl StreamingOperationWithInitialResponseInput {
          59  +
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialResponseInput`](crate::input::StreamingOperationWithInitialResponseInput).
          60  +
    pub fn builder() -> crate::input::streaming_operation_with_initial_response_input::Builder {
          61  +
        crate::input::streaming_operation_with_initial_response_input::Builder::default()
          62  +
    }
          63  +
}
          64  +
impl crate::constrained::Constrained for crate::input::StreamingOperationWithInitialResponseInput {
          65  +
    type Unconstrained = crate::input::streaming_operation_with_initial_response_input::Builder;
          66  +
}
          67  +
          68  +
#[allow(missing_docs)] // documentation missing in model
          69  +
#[derive(::std::fmt::Debug)]
          70  +
pub struct StreamingOperationWithInitialDataInput {
          71  +
    #[allow(missing_docs)] // documentation missing in model
          72  +
    pub initial_data: ::std::string::String,
          73  +
    #[allow(missing_docs)] // documentation missing in model
          74  +
    pub events: crate::sigv4_event_stream::SigV4Receiver<
          75  +
        crate::model::Events,
          76  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          77  +
    >,
          78  +
}
          79  +
impl StreamingOperationWithInitialDataInput {
          80  +
    #[allow(missing_docs)] // documentation missing in model
          81  +
    pub fn initial_data(&self) -> &str {
          82  +
        use std::ops::Deref;
          83  +
        self.initial_data.deref()
          84  +
    }
          85  +
    #[allow(missing_docs)] // documentation missing in model
          86  +
    pub fn events(
          87  +
        &self,
          88  +
    ) -> &crate::sigv4_event_stream::SigV4Receiver<
          89  +
        crate::model::Events,
          90  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
          91  +
    > {
          92  +
        &self.events
          93  +
    }
          94  +
}
          95  +
impl StreamingOperationWithInitialDataInput {
          96  +
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialDataInput`](crate::input::StreamingOperationWithInitialDataInput).
          97  +
    pub fn builder() -> crate::input::streaming_operation_with_initial_data_input::Builder {
          98  +
        crate::input::streaming_operation_with_initial_data_input::Builder::default()
          99  +
    }
         100  +
}
         101  +
impl crate::constrained::Constrained for crate::input::StreamingOperationWithInitialDataInput {
         102  +
    type Unconstrained = crate::input::streaming_operation_with_initial_data_input::Builder;
         103  +
}
         104  +
         105  +
#[allow(missing_docs)] // documentation missing in model
         106  +
#[derive(::std::fmt::Debug)]
         107  +
pub struct StreamingOperationInput {
         108  +
    #[allow(missing_docs)] // documentation missing in model
         109  +
    pub events: crate::sigv4_event_stream::SigV4Receiver<
         110  +
        crate::model::Events,
         111  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         112  +
    >,
         113  +
}
         114  +
impl StreamingOperationInput {
         115  +
    #[allow(missing_docs)] // documentation missing in model
         116  +
    pub fn events(
         117  +
        &self,
         118  +
    ) -> &crate::sigv4_event_stream::SigV4Receiver<
         119  +
        crate::model::Events,
         120  +
        ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         121  +
    > {
         122  +
        &self.events
         123  +
    }
         124  +
}
         125  +
impl StreamingOperationInput {
         126  +
    /// Creates a new builder-style object to manufacture [`StreamingOperationInput`](crate::input::StreamingOperationInput).
         127  +
    pub fn builder() -> crate::input::streaming_operation_input::Builder {
         128  +
        crate::input::streaming_operation_input::Builder::default()
         129  +
    }
         130  +
}
         131  +
impl crate::constrained::Constrained for crate::input::StreamingOperationInput {
         132  +
    type Unconstrained = crate::input::streaming_operation_input::Builder;
         133  +
}
         134  +
         135  +
#[allow(missing_docs)] // documentation missing in model
         136  +
#[derive(
         137  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         138  +
)]
         139  +
pub struct RecursiveUnionOperationInput {
         140  +
    #[allow(missing_docs)] // documentation missing in model
         141  +
    pub nested: ::std::option::Option<crate::model::RecursiveOperationInputOutputNested1>,
         142  +
}
         143  +
impl RecursiveUnionOperationInput {
         144  +
    #[allow(missing_docs)] // documentation missing in model
         145  +
    pub fn nested(
         146  +
        &self,
         147  +
    ) -> ::std::option::Option<&crate::model::RecursiveOperationInputOutputNested1> {
         148  +
        self.nested.as_ref()
         149  +
    }
         150  +
}
         151  +
impl RecursiveUnionOperationInput {
         152  +
    /// Creates a new builder-style object to manufacture [`RecursiveUnionOperationInput`](crate::input::RecursiveUnionOperationInput).
         153  +
    pub fn builder() -> crate::input::recursive_union_operation_input::Builder {
         154  +
        crate::input::recursive_union_operation_input::Builder::default()
         155  +
    }
         156  +
}
         157  +
impl crate::constrained::Constrained for crate::input::RecursiveUnionOperationInput {
         158  +
    type Unconstrained = crate::input::recursive_union_operation_input::Builder;
         159  +
}
         160  +
         161  +
#[allow(missing_docs)] // documentation missing in model
         162  +
#[derive(
         163  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         164  +
)]
         165  +
pub struct SingleMemberStructOperationInput {
         166  +
    #[allow(missing_docs)] // documentation missing in model
         167  +
    pub message: ::std::option::Option<::std::string::String>,
         168  +
}
         169  +
impl SingleMemberStructOperationInput {
         170  +
    #[allow(missing_docs)] // documentation missing in model
         171  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         172  +
        self.message.as_deref()
         173  +
    }
         174  +
}
         175  +
impl SingleMemberStructOperationInput {
         176  +
    /// Creates a new builder-style object to manufacture [`SingleMemberStructOperationInput`](crate::input::SingleMemberStructOperationInput).
         177  +
    pub fn builder() -> crate::input::single_member_struct_operation_input::Builder {
         178  +
        crate::input::single_member_struct_operation_input::Builder::default()
         179  +
    }
         180  +
}
         181  +
impl crate::constrained::Constrained for crate::input::SingleMemberStructOperationInput {
         182  +
    type Unconstrained = crate::input::single_member_struct_operation_input::Builder;
         183  +
}
         184  +
         185  +
#[allow(missing_docs)] // documentation missing in model
         186  +
#[derive(
         187  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         188  +
)]
         189  +
pub struct EmptyStructOperationInput {}
         190  +
impl EmptyStructOperationInput {
         191  +
    /// Creates a new builder-style object to manufacture [`EmptyStructOperationInput`](crate::input::EmptyStructOperationInput).
         192  +
    pub fn builder() -> crate::input::empty_struct_operation_input::Builder {
         193  +
        crate::input::empty_struct_operation_input::Builder::default()
         194  +
    }
         195  +
}
         196  +
impl crate::constrained::Constrained for crate::input::EmptyStructOperationInput {
         197  +
    type Unconstrained = crate::input::empty_struct_operation_input::Builder;
         198  +
}
         199  +
         200  +
#[allow(missing_docs)] // documentation missing in model
         201  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         202  +
pub struct ComplexStructOperationInput {
         203  +
    #[allow(missing_docs)] // documentation missing in model
         204  +
    pub structure: ::std::option::Option<crate::model::SimpleStruct>,
         205  +
    #[allow(missing_docs)] // documentation missing in model
         206  +
    pub empty_structure: ::std::option::Option<crate::model::EmptyStruct>,
         207  +
    #[allow(missing_docs)] // documentation missing in model
         208  +
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         209  +
    #[allow(missing_docs)] // documentation missing in model
         210  +
    pub map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
         211  +
    #[allow(missing_docs)] // documentation missing in model
         212  +
    pub union: ::std::option::Option<crate::model::SimpleUnion>,
         213  +
    #[allow(missing_docs)] // documentation missing in model
         214  +
    pub unit_union: ::std::option::Option<crate::model::UnitUnion>,
         215  +
    #[allow(missing_docs)] // documentation missing in model
         216  +
    pub structure_list: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
         217  +
    #[allow(missing_docs)] // documentation missing in model
         218  +
    pub complex_list: ::std::vec::Vec<
         219  +
        ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
         220  +
    >,
         221  +
    #[allow(missing_docs)] // documentation missing in model
         222  +
    pub complex_map: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
         223  +
    #[allow(missing_docs)] // documentation missing in model
         224  +
    pub complex_union: ::std::boxed::Box<crate::model::ComplexUnion>,
         225  +
}
         226  +
impl ComplexStructOperationInput {
         227  +
    #[allow(missing_docs)] // documentation missing in model
         228  +
    pub fn structure(&self) -> ::std::option::Option<&crate::model::SimpleStruct> {
         229  +
        self.structure.as_ref()
         230  +
    }
         231  +
    #[allow(missing_docs)] // documentation missing in model
         232  +
    pub fn empty_structure(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
         233  +
        self.empty_structure.as_ref()
         234  +
    }
         235  +
    #[allow(missing_docs)] // documentation missing in model
         236  +
    pub fn list(&self) -> ::std::option::Option<&[::std::string::String]> {
         237  +
        self.list.as_deref()
         238  +
    }
         239  +
    #[allow(missing_docs)] // documentation missing in model
         240  +
    pub fn map(
         241  +
        &self,
         242  +
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
         243  +
        self.map.as_ref()
         244  +
    }
         245  +
    #[allow(missing_docs)] // documentation missing in model
         246  +
    pub fn union(&self) -> ::std::option::Option<&crate::model::SimpleUnion> {
         247  +
        self.union.as_ref()
         248  +
    }
         249  +
    #[allow(missing_docs)] // documentation missing in model
         250  +
    pub fn unit_union(&self) -> ::std::option::Option<&crate::model::UnitUnion> {
         251  +
        self.unit_union.as_ref()
         252  +
    }
         253  +
    #[allow(missing_docs)] // documentation missing in model
         254  +
    pub fn structure_list(&self) -> ::std::option::Option<&[crate::model::SimpleStruct]> {
         255  +
        self.structure_list.as_deref()
         256  +
    }
         257  +
    #[allow(missing_docs)] // documentation missing in model
         258  +
    pub fn complex_list(
         259  +
        &self,
         260  +
    ) -> &[::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>] {
         261  +
        use std::ops::Deref;
         262  +
        self.complex_list.deref()
         263  +
    }
         264  +
    #[allow(missing_docs)] // documentation missing in model
         265  +
    pub fn complex_map(
         266  +
        &self,
         267  +
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion> {
         268  +
        &self.complex_map
         269  +
    }
         270  +
    #[allow(missing_docs)] // documentation missing in model
         271  +
    pub fn complex_union(&self) -> &crate::model::ComplexUnion {
         272  +
        use std::ops::Deref;
         273  +
        self.complex_union.deref()
         274  +
    }
         275  +
}
         276  +
impl ComplexStructOperationInput {
         277  +
    /// Creates a new builder-style object to manufacture [`ComplexStructOperationInput`](crate::input::ComplexStructOperationInput).
         278  +
    pub fn builder() -> crate::input::complex_struct_operation_input::Builder {
         279  +
        crate::input::complex_struct_operation_input::Builder::default()
         280  +
    }
         281  +
}
         282  +
impl crate::constrained::Constrained for crate::input::ComplexStructOperationInput {
         283  +
    type Unconstrained = crate::input::complex_struct_operation_input::Builder;
         284  +
}
         285  +
         286  +
#[allow(missing_docs)] // documentation missing in model
         287  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         288  +
pub struct ErrorSerializationOperationInput {
         289  +
    #[allow(missing_docs)] // documentation missing in model
         290  +
    pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
         291  +
    #[allow(missing_docs)] // documentation missing in model
         292  +
    pub boolean: ::std::option::Option<bool>,
         293  +
    #[allow(missing_docs)] // documentation missing in model
         294  +
    pub string: ::std::option::Option<::std::string::String>,
         295  +
    #[allow(missing_docs)] // documentation missing in model
         296  +
    pub byte: ::std::option::Option<i8>,
         297  +
    #[allow(missing_docs)] // documentation missing in model
         298  +
    pub short: ::std::option::Option<i16>,
         299  +
    #[allow(missing_docs)] // documentation missing in model
         300  +
    pub integer: ::std::option::Option<i32>,
         301  +
    #[allow(missing_docs)] // documentation missing in model
         302  +
    pub long: ::std::option::Option<i64>,
         303  +
    #[allow(missing_docs)] // documentation missing in model
         304  +
    pub float: ::std::option::Option<f32>,
         305  +
    #[allow(missing_docs)] // documentation missing in model
         306  +
    pub double: ::std::option::Option<f64>,
         307  +
    #[allow(missing_docs)] // documentation missing in model
         308  +
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         309  +
    #[allow(missing_docs)] // documentation missing in model
         310  +
    pub r#enum: ::std::option::Option<crate::model::Suit>,
         311  +
    #[allow(missing_docs)] // documentation missing in model
         312  +
    pub required_blob: ::aws_smithy_types::Blob,
         313  +
    #[allow(missing_docs)] // documentation missing in model
         314  +
    pub required_boolean: bool,
         315  +
    #[allow(missing_docs)] // documentation missing in model
         316  +
    pub required_string: ::std::string::String,
         317  +
    #[allow(missing_docs)] // documentation missing in model
         318  +
    pub required_byte: i8,
         319  +
    #[allow(missing_docs)] // documentation missing in model
         320  +
    pub required_short: i16,
         321  +
    #[allow(missing_docs)] // documentation missing in model
         322  +
    pub required_integer: i32,
         323  +
    #[allow(missing_docs)] // documentation missing in model
         324  +
    pub required_long: i64,
         325  +
    #[allow(missing_docs)] // documentation missing in model
         326  +
    pub required_float: f32,
         327  +
    #[allow(missing_docs)] // documentation missing in model
         328  +
    pub required_double: f64,
         329  +
    #[allow(missing_docs)] // documentation missing in model
         330  +
    pub required_timestamp: ::aws_smithy_types::DateTime,
         331  +
    #[allow(missing_docs)] // documentation missing in model
         332  +
    pub required_enum: crate::model::Suit,
         333  +
}
         334  +
impl ErrorSerializationOperationInput {
         335  +
    #[allow(missing_docs)] // documentation missing in model
         336  +
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
         337  +
        self.blob.as_ref()
         338  +
    }
         339  +
    #[allow(missing_docs)] // documentation missing in model
         340  +
    pub fn boolean(&self) -> ::std::option::Option<bool> {
         341  +
        self.boolean
         342  +
    }
         343  +
    #[allow(missing_docs)] // documentation missing in model
         344  +
    pub fn string(&self) -> ::std::option::Option<&str> {
         345  +
        self.string.as_deref()
         346  +
    }
         347  +
    #[allow(missing_docs)] // documentation missing in model
         348  +
    pub fn byte(&self) -> ::std::option::Option<i8> {
         349  +
        self.byte
         350  +
    }
         351  +
    #[allow(missing_docs)] // documentation missing in model
         352  +
    pub fn short(&self) -> ::std::option::Option<i16> {
         353  +
        self.short
         354  +
    }
         355  +
    #[allow(missing_docs)] // documentation missing in model
         356  +
    pub fn integer(&self) -> ::std::option::Option<i32> {
         357  +
        self.integer
         358  +
    }
         359  +
    #[allow(missing_docs)] // documentation missing in model
         360  +
    pub fn long(&self) -> ::std::option::Option<i64> {
         361  +
        self.long
         362  +
    }
         363  +
    #[allow(missing_docs)] // documentation missing in model
         364  +
    pub fn float(&self) -> ::std::option::Option<f32> {
         365  +
        self.float
         366  +
    }
         367  +
    #[allow(missing_docs)] // documentation missing in model
         368  +
    pub fn double(&self) -> ::std::option::Option<f64> {
         369  +
        self.double
         370  +
    }
         371  +
    #[allow(missing_docs)] // documentation missing in model
         372  +
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         373  +
        self.timestamp.as_ref()
         374  +
    }
         375  +
    #[allow(missing_docs)] // documentation missing in model
         376  +
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::Suit> {
         377  +
        self.r#enum.as_ref()
         378  +
    }
         379  +
    #[allow(missing_docs)] // documentation missing in model
         380  +
    pub fn required_blob(&self) -> &::aws_smithy_types::Blob {
         381  +
        &self.required_blob
         382  +
    }
         383  +
    #[allow(missing_docs)] // documentation missing in model
         384  +
    pub fn required_boolean(&self) -> bool {
         385  +
        self.required_boolean
         386  +
    }
         387  +
    #[allow(missing_docs)] // documentation missing in model
         388  +
    pub fn required_string(&self) -> &str {
         389  +
        use std::ops::Deref;
         390  +
        self.required_string.deref()
         391  +
    }
         392  +
    #[allow(missing_docs)] // documentation missing in model
         393  +
    pub fn required_byte(&self) -> i8 {
         394  +
        self.required_byte
         395  +
    }
         396  +
    #[allow(missing_docs)] // documentation missing in model
         397  +
    pub fn required_short(&self) -> i16 {
         398  +
        self.required_short
         399  +
    }
         400  +
    #[allow(missing_docs)] // documentation missing in model
         401  +
    pub fn required_integer(&self) -> i32 {
         402  +
        self.required_integer
         403  +
    }
         404  +
    #[allow(missing_docs)] // documentation missing in model
         405  +
    pub fn required_long(&self) -> i64 {
         406  +
        self.required_long
         407  +
    }
         408  +
    #[allow(missing_docs)] // documentation missing in model
         409  +
    pub fn required_float(&self) -> f32 {
         410  +
        self.required_float
         411  +
    }
         412  +
    #[allow(missing_docs)] // documentation missing in model
         413  +
    pub fn required_double(&self) -> f64 {
         414  +
        self.required_double
         415  +
    }
         416  +
    #[allow(missing_docs)] // documentation missing in model
         417  +
    pub fn required_timestamp(&self) -> &::aws_smithy_types::DateTime {
         418  +
        &self.required_timestamp
         419  +
    }
         420  +
    #[allow(missing_docs)] // documentation missing in model
         421  +
    pub fn required_enum(&self) -> &crate::model::Suit {
         422  +
        &self.required_enum
         423  +
    }
         424  +
}
         425  +
impl ErrorSerializationOperationInput {
         426  +
    /// Creates a new builder-style object to manufacture [`ErrorSerializationOperationInput`](crate::input::ErrorSerializationOperationInput).
         427  +
    pub fn builder() -> crate::input::error_serialization_operation_input::Builder {
         428  +
        crate::input::error_serialization_operation_input::Builder::default()
         429  +
    }
         430  +
}
         431  +
impl crate::constrained::Constrained for crate::input::ErrorSerializationOperationInput {
         432  +
    type Unconstrained = crate::input::error_serialization_operation_input::Builder;
         433  +
}
         434  +
         435  +
#[allow(missing_docs)] // documentation missing in model
         436  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         437  +
pub struct SimpleStructOperationInput {
         438  +
    #[allow(missing_docs)] // documentation missing in model
         439  +
    pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
         440  +
    #[allow(missing_docs)] // documentation missing in model
         441  +
    pub boolean: ::std::option::Option<bool>,
         442  +
    #[allow(missing_docs)] // documentation missing in model
         443  +
    pub string: ::std::option::Option<::std::string::String>,
         444  +
    #[allow(missing_docs)] // documentation missing in model
         445  +
    pub byte: ::std::option::Option<i8>,
         446  +
    #[allow(missing_docs)] // documentation missing in model
         447  +
    pub short: ::std::option::Option<i16>,
         448  +
    #[allow(missing_docs)] // documentation missing in model
         449  +
    pub integer: ::std::option::Option<i32>,
         450  +
    #[allow(missing_docs)] // documentation missing in model
         451  +
    pub long: ::std::option::Option<i64>,
         452  +
    #[allow(missing_docs)] // documentation missing in model
         453  +
    pub float: ::std::option::Option<f32>,
         454  +
    #[allow(missing_docs)] // documentation missing in model
         455  +
    pub double: ::std::option::Option<f64>,
         456  +
    #[allow(missing_docs)] // documentation missing in model
         457  +
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         458  +
    #[allow(missing_docs)] // documentation missing in model
         459  +
    pub r#enum: ::std::option::Option<crate::model::Suit>,
         460  +
    #[allow(missing_docs)] // documentation missing in model
         461  +
    pub required_blob: ::aws_smithy_types::Blob,
         462  +
    #[allow(missing_docs)] // documentation missing in model
         463  +
    pub required_boolean: bool,
         464  +
    #[allow(missing_docs)] // documentation missing in model
         465  +
    pub required_string: ::std::string::String,
         466  +
    #[allow(missing_docs)] // documentation missing in model
         467  +
    pub required_byte: i8,
         468  +
    #[allow(missing_docs)] // documentation missing in model
         469  +
    pub required_short: i16,
         470  +
    #[allow(missing_docs)] // documentation missing in model
         471  +
    pub required_integer: i32,
         472  +
    #[allow(missing_docs)] // documentation missing in model
         473  +
    pub required_long: i64,
         474  +
    #[allow(missing_docs)] // documentation missing in model
         475  +
    pub required_float: f32,
         476  +
    #[allow(missing_docs)] // documentation missing in model
         477  +
    pub required_double: f64,
         478  +
    #[allow(missing_docs)] // documentation missing in model
         479  +
    pub required_timestamp: ::aws_smithy_types::DateTime,
         480  +
    #[allow(missing_docs)] // documentation missing in model
         481  +
    pub required_enum: crate::model::Suit,
         482  +
}
         483  +
impl SimpleStructOperationInput {
         484  +
    #[allow(missing_docs)] // documentation missing in model
         485  +
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
         486  +
        self.blob.as_ref()
         487  +
    }
         488  +
    #[allow(missing_docs)] // documentation missing in model
         489  +
    pub fn boolean(&self) -> ::std::option::Option<bool> {
         490  +
        self.boolean
         491  +
    }
         492  +
    #[allow(missing_docs)] // documentation missing in model
         493  +
    pub fn string(&self) -> ::std::option::Option<&str> {
         494  +
        self.string.as_deref()
         495  +
    }
         496  +
    #[allow(missing_docs)] // documentation missing in model
         497  +
    pub fn byte(&self) -> ::std::option::Option<i8> {
         498  +
        self.byte
         499  +
    }
         500  +
    #[allow(missing_docs)] // documentation missing in model
         501  +
    pub fn short(&self) -> ::std::option::Option<i16> {
         502  +
        self.short
         503  +
    }
         504  +
    #[allow(missing_docs)] // documentation missing in model
         505  +
    pub fn integer(&self) -> ::std::option::Option<i32> {
         506  +
        self.integer
         507  +
    }
         508  +
    #[allow(missing_docs)] // documentation missing in model
         509  +
    pub fn long(&self) -> ::std::option::Option<i64> {
         510  +
        self.long
         511  +
    }
         512  +
    #[allow(missing_docs)] // documentation missing in model
         513  +
    pub fn float(&self) -> ::std::option::Option<f32> {
         514  +
        self.float
         515  +
    }
         516  +
    #[allow(missing_docs)] // documentation missing in model
         517  +
    pub fn double(&self) -> ::std::option::Option<f64> {
         518  +
        self.double
         519  +
    }
         520  +
    #[allow(missing_docs)] // documentation missing in model
         521  +
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         522  +
        self.timestamp.as_ref()
         523  +
    }
         524  +
    #[allow(missing_docs)] // documentation missing in model
         525  +
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::Suit> {
         526  +
        self.r#enum.as_ref()
         527  +
    }
         528  +
    #[allow(missing_docs)] // documentation missing in model
         529  +
    pub fn required_blob(&self) -> &::aws_smithy_types::Blob {
         530  +
        &self.required_blob
         531  +
    }
         532  +
    #[allow(missing_docs)] // documentation missing in model
         533  +
    pub fn required_boolean(&self) -> bool {
         534  +
        self.required_boolean
         535  +
    }
         536  +
    #[allow(missing_docs)] // documentation missing in model
         537  +
    pub fn required_string(&self) -> &str {
         538  +
        use std::ops::Deref;
         539  +
        self.required_string.deref()
         540  +
    }
         541  +
    #[allow(missing_docs)] // documentation missing in model
         542  +
    pub fn required_byte(&self) -> i8 {
         543  +
        self.required_byte
         544  +
    }
         545  +
    #[allow(missing_docs)] // documentation missing in model
         546  +
    pub fn required_short(&self) -> i16 {
         547  +
        self.required_short
         548  +
    }
         549  +
    #[allow(missing_docs)] // documentation missing in model
         550  +
    pub fn required_integer(&self) -> i32 {
         551  +
        self.required_integer
         552  +
    }
         553  +
    #[allow(missing_docs)] // documentation missing in model
         554  +
    pub fn required_long(&self) -> i64 {
         555  +
        self.required_long
         556  +
    }
         557  +
    #[allow(missing_docs)] // documentation missing in model
         558  +
    pub fn required_float(&self) -> f32 {
         559  +
        self.required_float
         560  +
    }
         561  +
    #[allow(missing_docs)] // documentation missing in model
         562  +
    pub fn required_double(&self) -> f64 {
         563  +
        self.required_double
         564  +
    }
         565  +
    #[allow(missing_docs)] // documentation missing in model
         566  +
    pub fn required_timestamp(&self) -> &::aws_smithy_types::DateTime {
         567  +
        &self.required_timestamp
         568  +
    }
         569  +
    #[allow(missing_docs)] // documentation missing in model
         570  +
    pub fn required_enum(&self) -> &crate::model::Suit {
         571  +
        &self.required_enum
         572  +
    }
         573  +
}
         574  +
impl SimpleStructOperationInput {
         575  +
    /// Creates a new builder-style object to manufacture [`SimpleStructOperationInput`](crate::input::SimpleStructOperationInput).
         576  +
    pub fn builder() -> crate::input::simple_struct_operation_input::Builder {
         577  +
        crate::input::simple_struct_operation_input::Builder::default()
         578  +
    }
         579  +
}
         580  +
impl crate::constrained::Constrained for crate::input::SimpleStructOperationInput {
         581  +
    type Unconstrained = crate::input::simple_struct_operation_input::Builder;
         582  +
}
         583  +
/// See [`StreamingOperationWithOptionalDataInput`](crate::input::StreamingOperationWithOptionalDataInput).
         584  +
pub mod streaming_operation_with_optional_data_input {
         585  +
         586  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         587  +
    /// Holds one variant for each of the ways the builder can fail.
         588  +
    #[non_exhaustive]
         589  +
    #[allow(clippy::enum_variant_names)]
         590  +
    pub enum ConstraintViolation {
         591  +
        /// `events` was not provided but it is required when building `StreamingOperationWithOptionalDataInput`.
         592  +
        MissingEvents,
         593  +
    }
         594  +
    impl ::std::fmt::Display for ConstraintViolation {
         595  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         596  +
            match self {
         597  +
                ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `StreamingOperationWithOptionalDataInput`"),
         598  +
            }
         599  +
        }
         600  +
    }
         601  +
    impl ::std::error::Error for ConstraintViolation {}
         602  +
    impl ConstraintViolation {
         603  +
        pub(crate) fn as_validation_exception_field(
         604  +
            self,
         605  +
            path: ::std::string::String,
         606  +
        ) -> crate::model::ValidationExceptionField {
         607  +
            match self {
         608  +
            ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
         609  +
                                                message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
         610  +
                                                path: path + "/events",
         611  +
                                            },
         612  +
        }
         613  +
        }
         614  +
    }
         615  +
    impl ::std::convert::From<ConstraintViolation>
         616  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
         617  +
    {
         618  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         619  +
            let first_validation_exception_field =
         620  +
                constraint_violation.as_validation_exception_field("".to_owned());
         621  +
            let validation_exception = crate::error::ValidationException {
         622  +
                message: format!(
         623  +
                    "1 validation error detected. {}",
         624  +
                    &first_validation_exception_field.message
         625  +
                ),
         626  +
                field_list: Some(vec![first_validation_exception_field]),
         627  +
            };
         628  +
            Self::ConstraintViolation(
         629  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         630  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         631  +
                            )
         632  +
        }
         633  +
    }
         634  +
    impl ::std::convert::From<Builder>
         635  +
        for crate::constrained::MaybeConstrained<
         636  +
            crate::input::StreamingOperationWithOptionalDataInput,
         637  +
        >
         638  +
    {
         639  +
        fn from(builder: Builder) -> Self {
         640  +
            Self::Unconstrained(builder)
         641  +
        }
         642  +
    }
         643  +
    impl ::std::convert::TryFrom<Builder> for crate::input::StreamingOperationWithOptionalDataInput {
         644  +
        type Error = ConstraintViolation;
         645  +
         646  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         647  +
            builder.build()
         648  +
        }
         649  +
    }
         650  +
    /// A builder for [`StreamingOperationWithOptionalDataInput`](crate::input::StreamingOperationWithOptionalDataInput).
         651  +
    #[derive(::std::default::Default, ::std::fmt::Debug)]
         652  +
    pub struct Builder {
         653  +
        pub(crate) optional_data: ::std::option::Option<::std::string::String>,
         654  +
        pub(crate) events: ::std::option::Option<
         655  +
            crate::sigv4_event_stream::SigV4Receiver<
         656  +
                crate::model::Events,
         657  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         658  +
            >,
         659  +
        >,
         660  +
    }
         661  +
    impl Builder {
         662  +
        #[allow(missing_docs)] // documentation missing in model
         663  +
        pub fn optional_data(
         664  +
            mut self,
         665  +
            input: ::std::option::Option<::std::string::String>,
         666  +
        ) -> Self {
         667  +
            self.optional_data = input;
         668  +
            self
         669  +
        }
         670  +
        #[allow(missing_docs)] // documentation missing in model
         671  +
        pub(crate) fn set_optional_data(
         672  +
            mut self,
         673  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         674  +
        ) -> Self {
         675  +
            self.optional_data = input.map(|v| v.into());
         676  +
            self
         677  +
        }
         678  +
        #[allow(missing_docs)] // documentation missing in model
         679  +
        pub fn events(
         680  +
            mut self,
         681  +
            input: crate::sigv4_event_stream::SigV4Receiver<
         682  +
                crate::model::Events,
         683  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         684  +
            >,
         685  +
        ) -> Self {
         686  +
            self.events = Some(input);
         687  +
            self
         688  +
        }
         689  +
        #[allow(missing_docs)] // documentation missing in model
         690  +
        pub(crate) fn set_events(
         691  +
            mut self,
         692  +
            input: impl ::std::convert::Into<
         693  +
                crate::sigv4_event_stream::SigV4Receiver<
         694  +
                    crate::model::Events,
         695  +
                    ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         696  +
                >,
         697  +
            >,
         698  +
        ) -> Self {
         699  +
            self.events = Some(input.into());
         700  +
            self
         701  +
        }
         702  +
        /// Consumes the builder and constructs a [`StreamingOperationWithOptionalDataInput`](crate::input::StreamingOperationWithOptionalDataInput).
         703  +
        ///
         704  +
        /// The builder fails to construct a [`StreamingOperationWithOptionalDataInput`](crate::input::StreamingOperationWithOptionalDataInput) if a [`ConstraintViolation`] occurs.
         705  +
        ///
         706  +
        pub fn build(
         707  +
            self,
         708  +
        ) -> Result<crate::input::StreamingOperationWithOptionalDataInput, ConstraintViolation>
         709  +
        {
         710  +
            self.build_enforcing_all_constraints()
         711  +
        }
         712  +
        fn build_enforcing_all_constraints(
         713  +
            self,
         714  +
        ) -> Result<crate::input::StreamingOperationWithOptionalDataInput, ConstraintViolation>
         715  +
        {
         716  +
            Ok(crate::input::StreamingOperationWithOptionalDataInput {
         717  +
                optional_data: self.optional_data,
         718  +
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
         719  +
            })
         720  +
        }
         721  +
    }
         722  +
}
         723  +
/// See [`StreamingOperationWithInitialResponseInput`](crate::input::StreamingOperationWithInitialResponseInput).
         724  +
pub mod streaming_operation_with_initial_response_input {
         725  +
         726  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         727  +
    /// Holds one variant for each of the ways the builder can fail.
         728  +
    #[non_exhaustive]
         729  +
    #[allow(clippy::enum_variant_names)]
         730  +
    pub enum ConstraintViolation {
         731  +
        /// `events` was not provided but it is required when building `StreamingOperationWithInitialResponseInput`.
         732  +
        MissingEvents,
         733  +
    }
         734  +
    impl ::std::fmt::Display for ConstraintViolation {
         735  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         736  +
            match self {
         737  +
                ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `StreamingOperationWithInitialResponseInput`"),
         738  +
            }
         739  +
        }
         740  +
    }
         741  +
    impl ::std::error::Error for ConstraintViolation {}
         742  +
    impl ConstraintViolation {
         743  +
        pub(crate) fn as_validation_exception_field(
         744  +
            self,
         745  +
            path: ::std::string::String,
         746  +
        ) -> crate::model::ValidationExceptionField {
         747  +
            match self {
         748  +
            ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
         749  +
                                                message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
         750  +
                                                path: path + "/events",
         751  +
                                            },
         752  +
        }
         753  +
        }
         754  +
    }
         755  +
    impl ::std::convert::From<ConstraintViolation>
         756  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
         757  +
    {
         758  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         759  +
            let first_validation_exception_field =
         760  +
                constraint_violation.as_validation_exception_field("".to_owned());
         761  +
            let validation_exception = crate::error::ValidationException {
         762  +
                message: format!(
         763  +
                    "1 validation error detected. {}",
         764  +
                    &first_validation_exception_field.message
         765  +
                ),
         766  +
                field_list: Some(vec![first_validation_exception_field]),
         767  +
            };
         768  +
            Self::ConstraintViolation(
         769  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         770  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         771  +
                            )
         772  +
        }
         773  +
    }
         774  +
    impl ::std::convert::From<Builder>
         775  +
        for crate::constrained::MaybeConstrained<
         776  +
            crate::input::StreamingOperationWithInitialResponseInput,
         777  +
        >
         778  +
    {
         779  +
        fn from(builder: Builder) -> Self {
         780  +
            Self::Unconstrained(builder)
         781  +
        }
         782  +
    }
         783  +
    impl ::std::convert::TryFrom<Builder> for crate::input::StreamingOperationWithInitialResponseInput {
         784  +
        type Error = ConstraintViolation;
         785  +
         786  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         787  +
            builder.build()
         788  +
        }
         789  +
    }
         790  +
    /// A builder for [`StreamingOperationWithInitialResponseInput`](crate::input::StreamingOperationWithInitialResponseInput).
         791  +
    #[derive(::std::default::Default, ::std::fmt::Debug)]
         792  +
    pub struct Builder {
         793  +
        pub(crate) events: ::std::option::Option<
         794  +
            crate::sigv4_event_stream::SigV4Receiver<
         795  +
                crate::model::Events,
         796  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         797  +
            >,
         798  +
        >,
         799  +
    }
         800  +
    impl Builder {
         801  +
        #[allow(missing_docs)] // documentation missing in model
         802  +
        pub fn events(
         803  +
            mut self,
         804  +
            input: crate::sigv4_event_stream::SigV4Receiver<
         805  +
                crate::model::Events,
         806  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         807  +
            >,
         808  +
        ) -> Self {
         809  +
            self.events = Some(input);
         810  +
            self
         811  +
        }
         812  +
        #[allow(missing_docs)] // documentation missing in model
         813  +
        pub(crate) fn set_events(
         814  +
            mut self,
         815  +
            input: impl ::std::convert::Into<
         816  +
                crate::sigv4_event_stream::SigV4Receiver<
         817  +
                    crate::model::Events,
         818  +
                    ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         819  +
                >,
         820  +
            >,
         821  +
        ) -> Self {
         822  +
            self.events = Some(input.into());
         823  +
            self
         824  +
        }
         825  +
        /// Consumes the builder and constructs a [`StreamingOperationWithInitialResponseInput`](crate::input::StreamingOperationWithInitialResponseInput).
         826  +
        ///
         827  +
        /// The builder fails to construct a [`StreamingOperationWithInitialResponseInput`](crate::input::StreamingOperationWithInitialResponseInput) if a [`ConstraintViolation`] occurs.
         828  +
        ///
         829  +
        pub fn build(
         830  +
            self,
         831  +
        ) -> Result<crate::input::StreamingOperationWithInitialResponseInput, ConstraintViolation>
         832  +
        {
         833  +
            self.build_enforcing_all_constraints()
         834  +
        }
         835  +
        fn build_enforcing_all_constraints(
         836  +
            self,
         837  +
        ) -> Result<crate::input::StreamingOperationWithInitialResponseInput, ConstraintViolation>
         838  +
        {
         839  +
            Ok(crate::input::StreamingOperationWithInitialResponseInput {
         840  +
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
         841  +
            })
         842  +
        }
         843  +
    }
         844  +
}
         845  +
/// See [`StreamingOperationWithInitialDataInput`](crate::input::StreamingOperationWithInitialDataInput).
         846  +
pub mod streaming_operation_with_initial_data_input {
         847  +
         848  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         849  +
    /// Holds one variant for each of the ways the builder can fail.
         850  +
    #[non_exhaustive]
         851  +
    #[allow(clippy::enum_variant_names)]
         852  +
    pub enum ConstraintViolation {
         853  +
        /// `initial_data` was not provided but it is required when building `StreamingOperationWithInitialDataInput`.
         854  +
        MissingInitialData,
         855  +
        /// `events` was not provided but it is required when building `StreamingOperationWithInitialDataInput`.
         856  +
        MissingEvents,
         857  +
    }
         858  +
    impl ::std::fmt::Display for ConstraintViolation {
         859  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         860  +
            match self {
         861  +
                ConstraintViolation::MissingInitialData => write!(f, "`initial_data` was not provided but it is required when building `StreamingOperationWithInitialDataInput`"),
         862  +
                ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `StreamingOperationWithInitialDataInput`"),
         863  +
            }
         864  +
        }
         865  +
    }
         866  +
    impl ::std::error::Error for ConstraintViolation {}
         867  +
    impl ConstraintViolation {
         868  +
        pub(crate) fn as_validation_exception_field(
         869  +
            self,
         870  +
            path: ::std::string::String,
         871  +
        ) -> crate::model::ValidationExceptionField {
         872  +
            match self {
         873  +
            ConstraintViolation::MissingInitialData => crate::model::ValidationExceptionField {
         874  +
                                                message: format!("Value at '{}/initialData' failed to satisfy constraint: Member must not be null", path),
         875  +
                                                path: path + "/initialData",
         876  +
                                            },
         877  +
            ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
         878  +
                                                message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
         879  +
                                                path: path + "/events",
         880  +
                                            },
         881  +
        }
         882  +
        }
         883  +
    }
         884  +
    impl ::std::convert::From<ConstraintViolation>
         885  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
         886  +
    {
         887  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         888  +
            let first_validation_exception_field =
         889  +
                constraint_violation.as_validation_exception_field("".to_owned());
         890  +
            let validation_exception = crate::error::ValidationException {
         891  +
                message: format!(
         892  +
                    "1 validation error detected. {}",
         893  +
                    &first_validation_exception_field.message
         894  +
                ),
         895  +
                field_list: Some(vec![first_validation_exception_field]),
         896  +
            };
         897  +
            Self::ConstraintViolation(
         898  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         899  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         900  +
                            )
         901  +
        }
         902  +
    }
         903  +
    impl ::std::convert::From<Builder>
         904  +
        for crate::constrained::MaybeConstrained<
         905  +
            crate::input::StreamingOperationWithInitialDataInput,
         906  +
        >
         907  +
    {
         908  +
        fn from(builder: Builder) -> Self {
         909  +
            Self::Unconstrained(builder)
         910  +
        }
         911  +
    }
         912  +
    impl ::std::convert::TryFrom<Builder> for crate::input::StreamingOperationWithInitialDataInput {
         913  +
        type Error = ConstraintViolation;
         914  +
         915  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         916  +
            builder.build()
         917  +
        }
         918  +
    }
         919  +
    /// A builder for [`StreamingOperationWithInitialDataInput`](crate::input::StreamingOperationWithInitialDataInput).
         920  +
    #[derive(::std::default::Default, ::std::fmt::Debug)]
         921  +
    pub struct Builder {
         922  +
        pub(crate) initial_data: ::std::option::Option<::std::string::String>,
         923  +
        pub(crate) events: ::std::option::Option<
         924  +
            crate::sigv4_event_stream::SigV4Receiver<
         925  +
                crate::model::Events,
         926  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         927  +
            >,
         928  +
        >,
         929  +
    }
         930  +
    impl Builder {
         931  +
        #[allow(missing_docs)] // documentation missing in model
         932  +
        pub fn initial_data(mut self, input: ::std::string::String) -> Self {
         933  +
            self.initial_data = Some(input);
         934  +
            self
         935  +
        }
         936  +
        #[allow(missing_docs)] // documentation missing in model
         937  +
        pub(crate) fn set_initial_data(
         938  +
            mut self,
         939  +
            input: impl ::std::convert::Into<::std::string::String>,
         940  +
        ) -> Self {
         941  +
            self.initial_data = Some(input.into());
         942  +
            self
         943  +
        }
         944  +
        #[allow(missing_docs)] // documentation missing in model
         945  +
        pub fn events(
         946  +
            mut self,
         947  +
            input: crate::sigv4_event_stream::SigV4Receiver<
         948  +
                crate::model::Events,
         949  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         950  +
            >,
         951  +
        ) -> Self {
         952  +
            self.events = Some(input);
         953  +
            self
         954  +
        }
         955  +
        #[allow(missing_docs)] // documentation missing in model
         956  +
        pub(crate) fn set_events(
         957  +
            mut self,
         958  +
            input: impl ::std::convert::Into<
         959  +
                crate::sigv4_event_stream::SigV4Receiver<
         960  +
                    crate::model::Events,
         961  +
                    ::aws_smithy_legacy_http::event_stream::MessageStreamError,
         962  +
                >,
         963  +
            >,
         964  +
        ) -> Self {
         965  +
            self.events = Some(input.into());
         966  +
            self
         967  +
        }
         968  +
        /// Consumes the builder and constructs a [`StreamingOperationWithInitialDataInput`](crate::input::StreamingOperationWithInitialDataInput).
         969  +
        ///
         970  +
        /// The builder fails to construct a [`StreamingOperationWithInitialDataInput`](crate::input::StreamingOperationWithInitialDataInput) if a [`ConstraintViolation`] occurs.
         971  +
        ///
         972  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         973  +
        pub fn build(
         974  +
            self,
         975  +
        ) -> Result<crate::input::StreamingOperationWithInitialDataInput, ConstraintViolation>
         976  +
        {
         977  +
            self.build_enforcing_all_constraints()
         978  +
        }
         979  +
        fn build_enforcing_all_constraints(
         980  +
            self,
         981  +
        ) -> Result<crate::input::StreamingOperationWithInitialDataInput, ConstraintViolation>
         982  +
        {
         983  +
            Ok(crate::input::StreamingOperationWithInitialDataInput {
         984  +
                initial_data: self
         985  +
                    .initial_data
         986  +
                    .ok_or(ConstraintViolation::MissingInitialData)?,
         987  +
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
         988  +
            })
         989  +
        }
         990  +
    }
         991  +
}
         992  +
/// See [`StreamingOperationInput`](crate::input::StreamingOperationInput).
         993  +
pub mod streaming_operation_input {
         994  +
         995  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         996  +
    /// Holds one variant for each of the ways the builder can fail.
         997  +
    #[non_exhaustive]
         998  +
    #[allow(clippy::enum_variant_names)]
         999  +
    pub enum ConstraintViolation {
        1000  +
        /// `events` was not provided but it is required when building `StreamingOperationInput`.
        1001  +
        MissingEvents,
        1002  +
    }
        1003  +
    impl ::std::fmt::Display for ConstraintViolation {
        1004  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1005  +
            match self {
        1006  +
                ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `StreamingOperationInput`"),
        1007  +
            }
        1008  +
        }
        1009  +
    }
        1010  +
    impl ::std::error::Error for ConstraintViolation {}
        1011  +
    impl ConstraintViolation {
        1012  +
        pub(crate) fn as_validation_exception_field(
        1013  +
            self,
        1014  +
            path: ::std::string::String,
        1015  +
        ) -> crate::model::ValidationExceptionField {
        1016  +
            match self {
        1017  +
            ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
        1018  +
                                                message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
        1019  +
                                                path: path + "/events",
        1020  +
                                            },
        1021  +
        }
        1022  +
        }
        1023  +
    }
        1024  +
    impl ::std::convert::From<ConstraintViolation>
        1025  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
        1026  +
    {
        1027  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
        1028  +
            let first_validation_exception_field =
        1029  +
                constraint_violation.as_validation_exception_field("".to_owned());
        1030  +
            let validation_exception = crate::error::ValidationException {
        1031  +
                message: format!(
        1032  +
                    "1 validation error detected. {}",
        1033  +
                    &first_validation_exception_field.message
        1034  +
                ),
        1035  +
                field_list: Some(vec![first_validation_exception_field]),
        1036  +
            };
        1037  +
            Self::ConstraintViolation(
        1038  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
        1039  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
        1040  +
                            )
        1041  +
        }
        1042  +
    }
        1043  +
    impl ::std::convert::From<Builder>
        1044  +
        for crate::constrained::MaybeConstrained<crate::input::StreamingOperationInput>
        1045  +
    {
        1046  +
        fn from(builder: Builder) -> Self {
        1047  +
            Self::Unconstrained(builder)
        1048  +
        }
        1049  +
    }
        1050  +
    impl ::std::convert::TryFrom<Builder> for crate::input::StreamingOperationInput {
        1051  +
        type Error = ConstraintViolation;
        1052  +
        1053  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        1054  +
            builder.build()
        1055  +
        }
        1056  +
    }
        1057  +
    /// A builder for [`StreamingOperationInput`](crate::input::StreamingOperationInput).
        1058  +
    #[derive(::std::default::Default, ::std::fmt::Debug)]
        1059  +
    pub struct Builder {
        1060  +
        pub(crate) events: ::std::option::Option<
        1061  +
            crate::sigv4_event_stream::SigV4Receiver<
        1062  +
                crate::model::Events,
        1063  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
        1064  +
            >,
        1065  +
        >,
        1066  +
    }
        1067  +
    impl Builder {
        1068  +
        #[allow(missing_docs)] // documentation missing in model
        1069  +
        pub fn events(
        1070  +
            mut self,
        1071  +
            input: crate::sigv4_event_stream::SigV4Receiver<
        1072  +
                crate::model::Events,
        1073  +
                ::aws_smithy_legacy_http::event_stream::MessageStreamError,
        1074  +
            >,
        1075  +
        ) -> Self {
        1076  +
            self.events = Some(input);
        1077  +
            self
        1078  +
        }
        1079  +
        #[allow(missing_docs)] // documentation missing in model
        1080  +
        pub(crate) fn set_events(
        1081  +
            mut self,
        1082  +
            input: impl ::std::convert::Into<
        1083  +
                crate::sigv4_event_stream::SigV4Receiver<
        1084  +
                    crate::model::Events,
        1085  +
                    ::aws_smithy_legacy_http::event_stream::MessageStreamError,
        1086  +
                >,
        1087  +
            >,
        1088  +
        ) -> Self {
        1089  +
            self.events = Some(input.into());
        1090  +
            self
        1091  +
        }
        1092  +
        /// Consumes the builder and constructs a [`StreamingOperationInput`](crate::input::StreamingOperationInput).
        1093  +
        ///
        1094  +
        /// The builder fails to construct a [`StreamingOperationInput`](crate::input::StreamingOperationInput) if a [`ConstraintViolation`] occurs.
        1095  +
        ///
        1096  +
        pub fn build(self) -> Result<crate::input::StreamingOperationInput, ConstraintViolation> {
        1097  +
            self.build_enforcing_all_constraints()
        1098  +
        }
        1099  +
        fn build_enforcing_all_constraints(
        1100  +
            self,
        1101  +
        ) -> Result<crate::input::StreamingOperationInput, ConstraintViolation> {
        1102  +
            Ok(crate::input::StreamingOperationInput {
        1103  +
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
        1104  +
            })
        1105  +
        }
        1106  +
    }
        1107  +
}
        1108  +
/// See [`RecursiveUnionOperationInput`](crate::input::RecursiveUnionOperationInput).
        1109  +
pub mod recursive_union_operation_input {
        1110  +
        1111  +
    impl ::std::convert::From<Builder> for crate::input::RecursiveUnionOperationInput {
        1112  +
        fn from(builder: Builder) -> Self {
        1113  +
            builder.build()
        1114  +
        }
        1115  +
    }
        1116  +
    /// A builder for [`RecursiveUnionOperationInput`](crate::input::RecursiveUnionOperationInput).
        1117  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1118  +
    pub struct Builder {
        1119  +
        pub(crate) nested:
        1120  +
            ::std::option::Option<crate::model::RecursiveOperationInputOutputNested1>,
        1121  +
    }
        1122  +
    impl Builder {
        1123  +
        #[allow(missing_docs)] // documentation missing in model
        1124  +
        pub fn nested(
        1125  +
            mut self,
        1126  +
            input: ::std::option::Option<crate::model::RecursiveOperationInputOutputNested1>,
        1127  +
        ) -> Self {
        1128  +
            self.nested = input;
        1129  +
            self
        1130  +
        }
        1131  +
        #[allow(missing_docs)] // documentation missing in model
        1132  +
        pub(crate) fn set_nested(
        1133  +
            mut self,
        1134  +
            input: Option<
        1135  +
                impl ::std::convert::Into<crate::model::RecursiveOperationInputOutputNested1>,
        1136  +
            >,
        1137  +
        ) -> Self {
        1138  +
            self.nested = input.map(|v| v.into());
        1139  +
            self
        1140  +
        }
        1141  +
        /// Consumes the builder and constructs a [`RecursiveUnionOperationInput`](crate::input::RecursiveUnionOperationInput).
        1142  +
        pub fn build(self) -> crate::input::RecursiveUnionOperationInput {
        1143  +
            self.build_enforcing_all_constraints()
        1144  +
        }
        1145  +
        fn build_enforcing_all_constraints(self) -> crate::input::RecursiveUnionOperationInput {
        1146  +
            crate::input::RecursiveUnionOperationInput {
        1147  +
                nested: self.nested,
        1148  +
            }
        1149  +
        }
        1150  +
    }
        1151  +
}
        1152  +
/// See [`SingleMemberStructOperationInput`](crate::input::SingleMemberStructOperationInput).
        1153  +
pub mod single_member_struct_operation_input {
        1154  +
        1155  +
    impl ::std::convert::From<Builder> for crate::input::SingleMemberStructOperationInput {
        1156  +
        fn from(builder: Builder) -> Self {
        1157  +
            builder.build()
        1158  +
        }
        1159  +
    }
        1160  +
    /// A builder for [`SingleMemberStructOperationInput`](crate::input::SingleMemberStructOperationInput).
        1161  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1162  +
    pub struct Builder {
        1163  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
        1164  +
    }
        1165  +
    impl Builder {
        1166  +
        #[allow(missing_docs)] // documentation missing in model
        1167  +
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        1168  +
            self.message = input;
        1169  +
            self
        1170  +
        }
        1171  +
        #[allow(missing_docs)] // documentation missing in model
        1172  +
        pub(crate) fn set_message(
        1173  +
            mut self,
        1174  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        1175  +
        ) -> Self {
        1176  +
            self.message = input.map(|v| v.into());
        1177  +
            self
        1178  +
        }
        1179  +
        /// Consumes the builder and constructs a [`SingleMemberStructOperationInput`](crate::input::SingleMemberStructOperationInput).
        1180  +
        pub fn build(self) -> crate::input::SingleMemberStructOperationInput {
        1181  +
            self.build_enforcing_all_constraints()
        1182  +
        }
        1183  +
        fn build_enforcing_all_constraints(self) -> crate::input::SingleMemberStructOperationInput {
        1184  +
            crate::input::SingleMemberStructOperationInput {
        1185  +
                message: self.message,
        1186  +
            }
        1187  +
        }
        1188  +
    }
        1189  +
}
        1190  +
/// See [`EmptyStructOperationInput`](crate::input::EmptyStructOperationInput).
        1191  +
pub mod empty_struct_operation_input {
        1192  +
        1193  +
    impl ::std::convert::From<Builder> for crate::input::EmptyStructOperationInput {
        1194  +
        fn from(builder: Builder) -> Self {
        1195  +
            builder.build()
        1196  +
        }
        1197  +
    }
        1198  +
    /// A builder for [`EmptyStructOperationInput`](crate::input::EmptyStructOperationInput).
        1199  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1200  +
    pub struct Builder {}
        1201  +
    impl Builder {
        1202  +
        /// Consumes the builder and constructs a [`EmptyStructOperationInput`](crate::input::EmptyStructOperationInput).
        1203  +
        pub fn build(self) -> crate::input::EmptyStructOperationInput {
        1204  +
            self.build_enforcing_all_constraints()
        1205  +
        }
        1206  +
        fn build_enforcing_all_constraints(self) -> crate::input::EmptyStructOperationInput {
        1207  +
            crate::input::EmptyStructOperationInput {}
        1208  +
        }
        1209  +
    }
        1210  +
}
        1211  +
/// See [`ComplexStructOperationInput`](crate::input::ComplexStructOperationInput).
        1212  +
pub mod complex_struct_operation_input {
        1213  +
        1214  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        1215  +
    /// Holds one variant for each of the ways the builder can fail.
        1216  +
    #[non_exhaustive]
        1217  +
    #[allow(clippy::enum_variant_names)]
        1218  +
    pub enum ConstraintViolation {
        1219  +
        /// Constraint violation occurred building member `structure` when building `ComplexStructOperationInput`.
        1220  +
        #[doc(hidden)]
        1221  +
        Structure(crate::model::simple_struct::ConstraintViolation),
        1222  +
        /// Constraint violation occurred building member `structure_list` when building `ComplexStructOperationInput`.
        1223  +
        #[doc(hidden)]
        1224  +
        StructureList(crate::model::struct_list::ConstraintViolation),
        1225  +
        /// `complex_list` was not provided but it is required when building `ComplexStructOperationInput`.
        1226  +
        MissingComplexList,
        1227  +
        /// Constraint violation occurred building member `complex_list` when building `ComplexStructOperationInput`.
        1228  +
        #[doc(hidden)]
        1229  +
        ComplexList(crate::model::complex_list::ConstraintViolation),
        1230  +
        /// `complex_map` was not provided but it is required when building `ComplexStructOperationInput`.
        1231  +
        MissingComplexMap,
        1232  +
        /// Constraint violation occurred building member `complex_map` when building `ComplexStructOperationInput`.
        1233  +
        #[doc(hidden)]
        1234  +
        ComplexMap(crate::model::complex_map::ConstraintViolation),
        1235  +
        /// `complex_union` was not provided but it is required when building `ComplexStructOperationInput`.
        1236  +
        MissingComplexUnion,
        1237  +
        /// Constraint violation occurred building member `complex_union` when building `ComplexStructOperationInput`.
        1238  +
        #[doc(hidden)]
        1239  +
        ComplexUnion(::std::boxed::Box<crate::model::complex_union::ConstraintViolation>),
        1240  +
    }
        1241  +
    impl ::std::fmt::Display for ConstraintViolation {
        1242  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1243  +
            match self {
        1244  +
                ConstraintViolation::Structure(_) => write!(f, "constraint violation occurred building member `structure` when building `ComplexStructOperationInput`"),
        1245  +
                ConstraintViolation::StructureList(_) => write!(f, "constraint violation occurred building member `structure_list` when building `ComplexStructOperationInput`"),
        1246  +
                ConstraintViolation::MissingComplexList => write!(f, "`complex_list` was not provided but it is required when building `ComplexStructOperationInput`"),
        1247  +
                ConstraintViolation::ComplexList(_) => write!(f, "constraint violation occurred building member `complex_list` when building `ComplexStructOperationInput`"),
        1248  +
                ConstraintViolation::MissingComplexMap => write!(f, "`complex_map` was not provided but it is required when building `ComplexStructOperationInput`"),
        1249  +
                ConstraintViolation::ComplexMap(_) => write!(f, "constraint violation occurred building member `complex_map` when building `ComplexStructOperationInput`"),
        1250  +
                ConstraintViolation::MissingComplexUnion => write!(f, "`complex_union` was not provided but it is required when building `ComplexStructOperationInput`"),
        1251  +
                ConstraintViolation::ComplexUnion(_) => write!(f, "constraint violation occurred building member `complex_union` when building `ComplexStructOperationInput`"),
        1252  +
            }
        1253  +
        }
        1254  +
    }
        1255  +
    impl ::std::error::Error for ConstraintViolation {}
        1256  +
    impl ConstraintViolation {
        1257  +
        pub(crate) fn as_validation_exception_field(
        1258  +
            self,
        1259  +
            path: ::std::string::String,
        1260  +
        ) -> crate::model::ValidationExceptionField {
        1261  +
            match self {
        1262  +
            ConstraintViolation::Structure(inner) => inner.as_validation_exception_field(path + "/structure"),
        1263  +
            ConstraintViolation::StructureList(inner) => inner.as_validation_exception_field(path + "/structureList"),
        1264  +
            ConstraintViolation::MissingComplexList => crate::model::ValidationExceptionField {
        1265  +
                                                message: format!("Value at '{}/complexList' failed to satisfy constraint: Member must not be null", path),
        1266  +
                                                path: path + "/complexList",
        1267  +
                                            },
        1268  +
            ConstraintViolation::ComplexList(inner) => inner.as_validation_exception_field(path + "/complexList"),
        1269  +
            ConstraintViolation::MissingComplexMap => crate::model::ValidationExceptionField {
        1270  +
                                                message: format!("Value at '{}/complexMap' failed to satisfy constraint: Member must not be null", path),
        1271  +
                                                path: path + "/complexMap",
        1272  +
                                            },
        1273  +
            ConstraintViolation::ComplexMap(inner) => inner.as_validation_exception_field(path + "/complexMap"),
        1274  +
            ConstraintViolation::MissingComplexUnion => crate::model::ValidationExceptionField {
        1275  +
                                                message: format!("Value at '{}/complexUnion' failed to satisfy constraint: Member must not be null", path),
        1276  +
                                                path: path + "/complexUnion",
        1277  +
                                            },
        1278  +
            ConstraintViolation::ComplexUnion(inner) => inner.as_validation_exception_field(path + "/complexUnion"),
        1279  +
        }
        1280  +
        }
        1281  +
    }
        1282  +
    impl ::std::convert::From<ConstraintViolation>
        1283  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
        1284  +
    {
        1285  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
        1286  +
            let first_validation_exception_field =
        1287  +
                constraint_violation.as_validation_exception_field("".to_owned());
        1288  +
            let validation_exception = crate::error::ValidationException {
        1289  +
                message: format!(
        1290  +
                    "1 validation error detected. {}",
        1291  +
                    &first_validation_exception_field.message
        1292  +
                ),
        1293  +
                field_list: Some(vec![first_validation_exception_field]),
        1294  +
            };
        1295  +
            Self::ConstraintViolation(
        1296  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
        1297  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
        1298  +
                            )
        1299  +
        }
        1300  +
    }
        1301  +
    impl ::std::convert::From<Builder>
        1302  +
        for crate::constrained::MaybeConstrained<crate::input::ComplexStructOperationInput>
        1303  +
    {
        1304  +
        fn from(builder: Builder) -> Self {
        1305  +
            Self::Unconstrained(builder)
        1306  +
        }
        1307  +
    }
        1308  +
    impl ::std::convert::TryFrom<Builder> for crate::input::ComplexStructOperationInput {
        1309  +
        type Error = ConstraintViolation;
        1310  +
        1311  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        1312  +
            builder.build()
        1313  +
        }
        1314  +
    }
        1315  +
    /// A builder for [`ComplexStructOperationInput`](crate::input::ComplexStructOperationInput).
        1316  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1317  +
    pub struct Builder {
        1318  +
        pub(crate) structure:
        1319  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SimpleStruct>>,
        1320  +
        pub(crate) empty_structure: ::std::option::Option<crate::model::EmptyStruct>,
        1321  +
        pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
        1322  +
        pub(crate) map:
        1323  +
            ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
        1324  +
        pub(crate) union: ::std::option::Option<crate::model::SimpleUnion>,
        1325  +
        pub(crate) unit_union: ::std::option::Option<crate::model::UnitUnion>,
        1326  +
        pub(crate) structure_list: ::std::option::Option<
        1327  +
            crate::constrained::MaybeConstrained<
        1328  +
                crate::constrained::struct_list_constrained::StructListConstrained,
        1329  +
            >,
        1330  +
        >,
        1331  +
        pub(crate) complex_list: ::std::option::Option<
        1332  +
            crate::constrained::MaybeConstrained<
        1333  +
                crate::constrained::complex_list_constrained::ComplexListConstrained,
        1334  +
            >,
        1335  +
        >,
        1336  +
        pub(crate) complex_map: ::std::option::Option<
        1337  +
            crate::constrained::MaybeConstrained<
        1338  +
                crate::constrained::complex_map_constrained::ComplexMapConstrained,
        1339  +
            >,
        1340  +
        >,
        1341  +
        pub(crate) complex_union: ::std::option::Option<
        1342  +
            ::std::boxed::Box<crate::constrained::MaybeConstrained<crate::model::ComplexUnion>>,
        1343  +
        >,
        1344  +
    }
        1345  +
    impl Builder {
        1346  +
        #[allow(missing_docs)] // documentation missing in model
        1347  +
        pub fn structure(
        1348  +
            mut self,
        1349  +
            input: ::std::option::Option<crate::model::SimpleStruct>,
        1350  +
        ) -> Self {
        1351  +
            self.structure = input.map(crate::constrained::MaybeConstrained::Constrained);
        1352  +
            self
        1353  +
        }
        1354  +
        #[allow(missing_docs)] // documentation missing in model
        1355  +
        pub(crate) fn set_structure(
        1356  +
            mut self,
        1357  +
            input: Option<
        1358  +
                impl ::std::convert::Into<
        1359  +
                    crate::constrained::MaybeConstrained<crate::model::SimpleStruct>,
        1360  +
                >,
        1361  +
            >,
        1362  +
        ) -> Self {
        1363  +
            self.structure = input.map(|v| v.into());
        1364  +
            self
        1365  +
        }
        1366  +
        #[allow(missing_docs)] // documentation missing in model
        1367  +
        pub fn empty_structure(
        1368  +
            mut self,
        1369  +
            input: ::std::option::Option<crate::model::EmptyStruct>,
        1370  +
        ) -> Self {
        1371  +
            self.empty_structure = input;
        1372  +
            self
        1373  +
        }
        1374  +
        #[allow(missing_docs)] // documentation missing in model
        1375  +
        pub(crate) fn set_empty_structure(
        1376  +
            mut self,
        1377  +
            input: Option<impl ::std::convert::Into<crate::model::EmptyStruct>>,
        1378  +
        ) -> Self {
        1379  +
            self.empty_structure = input.map(|v| v.into());
        1380  +
            self
        1381  +
        }
        1382  +
        #[allow(missing_docs)] // documentation missing in model
        1383  +
        pub fn list(
        1384  +
            mut self,
        1385  +
            input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
        1386  +
        ) -> Self {
        1387  +
            self.list = input;
        1388  +
            self
        1389  +
        }
        1390  +
        #[allow(missing_docs)] // documentation missing in model
        1391  +
        pub(crate) fn set_list(
        1392  +
            mut self,
        1393  +
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
        1394  +
        ) -> Self {
        1395  +
            self.list = input.map(|v| v.into());
        1396  +
            self
        1397  +
        }
        1398  +
        #[allow(missing_docs)] // documentation missing in model
        1399  +
        pub fn map(
        1400  +
            mut self,
        1401  +
            input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
        1402  +
        ) -> Self {
        1403  +
            self.map = input;
        1404  +
            self
        1405  +
        }
        1406  +
        #[allow(missing_docs)] // documentation missing in model
        1407  +
        pub(crate) fn set_map(
        1408  +
            mut self,
        1409  +
            input: Option<
        1410  +
                impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, i32>>,
        1411  +
            >,
        1412  +
        ) -> Self {
        1413  +
            self.map = input.map(|v| v.into());
        1414  +
            self
        1415  +
        }
        1416  +
        #[allow(missing_docs)] // documentation missing in model
        1417  +
        pub fn union(mut self, input: ::std::option::Option<crate::model::SimpleUnion>) -> Self {
        1418  +
            self.union = input;
        1419  +
            self
        1420  +
        }
        1421  +
        #[allow(missing_docs)] // documentation missing in model
        1422  +
        pub(crate) fn set_union(
        1423  +
            mut self,
        1424  +
            input: Option<impl ::std::convert::Into<crate::model::SimpleUnion>>,
        1425  +
        ) -> Self {
        1426  +
            self.union = input.map(|v| v.into());
        1427  +
            self
        1428  +
        }
        1429  +
        #[allow(missing_docs)] // documentation missing in model
        1430  +
        pub fn unit_union(mut self, input: ::std::option::Option<crate::model::UnitUnion>) -> Self {
        1431  +
            self.unit_union = input;
        1432  +
            self
        1433  +
        }
        1434  +
        #[allow(missing_docs)] // documentation missing in model
        1435  +
        pub(crate) fn set_unit_union(
        1436  +
            mut self,
        1437  +
            input: Option<impl ::std::convert::Into<crate::model::UnitUnion>>,
        1438  +
        ) -> Self {
        1439  +
            self.unit_union = input.map(|v| v.into());
        1440  +
            self
        1441  +
        }
        1442  +
        #[allow(missing_docs)] // documentation missing in model
        1443  +
        pub fn structure_list(
        1444  +
            mut self,
        1445  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
        1446  +
        ) -> Self {
        1447  +
            self.structure_list =
        1448  +
                input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
        1449  +
            self
        1450  +
        }
        1451  +
        #[allow(missing_docs)] // documentation missing in model
        1452  +
        pub(crate) fn set_structure_list(
        1453  +
            mut self,
        1454  +
            input: Option<
        1455  +
                impl ::std::convert::Into<
        1456  +
                    crate::constrained::MaybeConstrained<
        1457  +
                        crate::constrained::struct_list_constrained::StructListConstrained,
        1458  +
                    >,
        1459  +
                >,
        1460  +
            >,
        1461  +
        ) -> Self {
        1462  +
            self.structure_list = input.map(|v| v.into());
        1463  +
            self
        1464  +
        }
        1465  +
        #[allow(missing_docs)] // documentation missing in model
        1466  +
        pub fn complex_list(
        1467  +
            mut self,
        1468  +
            input: ::std::vec::Vec<
        1469  +
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
        1470  +
            >,
        1471  +
        ) -> Self {
        1472  +
            self.complex_list = Some(crate::constrained::MaybeConstrained::Constrained(
        1473  +
                (input).into(),
        1474  +
            ));
        1475  +
            self
        1476  +
        }
        1477  +
        #[allow(missing_docs)] // documentation missing in model
        1478  +
        pub(crate) fn set_complex_list(
        1479  +
            mut self,
        1480  +
            input: impl ::std::convert::Into<
        1481  +
                crate::constrained::MaybeConstrained<
        1482  +
                    crate::constrained::complex_list_constrained::ComplexListConstrained,
        1483  +
                >,
        1484  +
            >,
        1485  +
        ) -> Self {
        1486  +
            self.complex_list = Some(input.into());
        1487  +
            self
        1488  +
        }
        1489  +
        #[allow(missing_docs)] // documentation missing in model
        1490  +
        pub fn complex_map(
        1491  +
            mut self,
        1492  +
            input: ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
        1493  +
        ) -> Self {
        1494  +
            self.complex_map = Some(crate::constrained::MaybeConstrained::Constrained(
        1495  +
                (input).into(),
        1496  +
            ));
        1497  +
            self
        1498  +
        }
        1499  +
        #[allow(missing_docs)] // documentation missing in model
        1500  +
        pub(crate) fn set_complex_map(
        1501  +
            mut self,
        1502  +
            input: impl ::std::convert::Into<
        1503  +
                crate::constrained::MaybeConstrained<
        1504  +
                    crate::constrained::complex_map_constrained::ComplexMapConstrained,
        1505  +
                >,
        1506  +
            >,
        1507  +
        ) -> Self {
        1508  +
            self.complex_map = Some(input.into());
        1509  +
            self
        1510  +
        }
        1511  +
        #[allow(missing_docs)] // documentation missing in model
        1512  +
        #[allow(clippy::boxed_local)]
        1513  +
        pub fn complex_union(
        1514  +
            mut self,
        1515  +
            input: ::std::boxed::Box<crate::model::ComplexUnion>,
        1516  +
        ) -> Self {
        1517  +
            self.complex_union = Some(Box::new(crate::constrained::MaybeConstrained::Constrained(
        1518  +
                *input,
        1519  +
            )));
        1520  +
            self
        1521  +
        }
        1522  +
        #[allow(missing_docs)] // documentation missing in model
        1523  +
        pub(crate) fn set_complex_union(
        1524  +
            mut self,
        1525  +
            input: impl ::std::convert::Into<
        1526  +
                ::std::boxed::Box<crate::constrained::MaybeConstrained<crate::model::ComplexUnion>>,
        1527  +
            >,
        1528  +
        ) -> Self {
        1529  +
            self.complex_union = Some(input.into());
        1530  +
            self
        1531  +
        }
        1532  +
        /// Consumes the builder and constructs a [`ComplexStructOperationInput`](crate::input::ComplexStructOperationInput).
        1533  +
        ///
        1534  +
        /// The builder fails to construct a [`ComplexStructOperationInput`](crate::input::ComplexStructOperationInput) if a [`ConstraintViolation`] occurs.
        1535  +
        ///
        1536  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1537  +
        pub fn build(
        1538  +
            self,
        1539  +
        ) -> Result<crate::input::ComplexStructOperationInput, ConstraintViolation> {
        1540  +
            self.build_enforcing_all_constraints()
        1541  +
        }
        1542  +
        fn build_enforcing_all_constraints(
        1543  +
            self,
        1544  +
        ) -> Result<crate::input::ComplexStructOperationInput, ConstraintViolation> {
        1545  +
            Ok(crate::input::ComplexStructOperationInput {
        1546  +
                structure: self
        1547  +
                    .structure
        1548  +
                    .map(|v| match v {
        1549  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        1550  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        1551  +
                    })
        1552  +
                    .map(|res| res.map_err(ConstraintViolation::Structure))
        1553  +
                    .transpose()?,
        1554  +
                empty_structure: self.empty_structure,
        1555  +
                list: self.list,
        1556  +
                map: self.map,
        1557  +
                union: self.union,
        1558  +
                unit_union: self.unit_union,
        1559  +
                structure_list: self
        1560  +
                    .structure_list
        1561  +
                    .map(|v| match v {
        1562  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        1563  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        1564  +
                    })
        1565  +
                    .map(|res| {
        1566  +
                        res.map(|v| v.into())
        1567  +
                            .map_err(ConstraintViolation::StructureList)
        1568  +
                    })
        1569  +
                    .transpose()?,
        1570  +
                complex_list: self
        1571  +
                    .complex_list
        1572  +
                    .map(|v| match v {
        1573  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        1574  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        1575  +
                    })
        1576  +
                    .map(|res| {
        1577  +
                        res.map(|v| v.into())
        1578  +
                            .map_err(ConstraintViolation::ComplexList)
        1579  +
                    })
        1580  +
                    .transpose()?
        1581  +
                    .ok_or(ConstraintViolation::MissingComplexList)?,
        1582  +
                complex_map: self
        1583  +
                    .complex_map
        1584  +
                    .map(|v| match v {
        1585  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        1586  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        1587  +
                    })
        1588  +
                    .map(|res| {
        1589  +
                        res.map(|v| v.into())
        1590  +
                            .map_err(ConstraintViolation::ComplexMap)
        1591  +
                    })
        1592  +
                    .transpose()?
        1593  +
                    .ok_or(ConstraintViolation::MissingComplexMap)?,
        1594  +
                complex_union: self
        1595  +
                    .complex_union
        1596  +
                    .map(|v| match *v {
        1597  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(Box::new(x)),
        1598  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => {
        1599  +
                            Ok(Box::new(x.try_into()?))
        1600  +
                        }
        1601  +
                    })
        1602  +
                    .map(|res| {
        1603  +
                        res.map_err(Box::new)
        1604  +
                            .map_err(ConstraintViolation::ComplexUnion)
        1605  +
                    })
        1606  +
                    .transpose()?
        1607  +
                    .ok_or(ConstraintViolation::MissingComplexUnion)?,
        1608  +
            })
        1609  +
        }
        1610  +
    }
        1611  +
}
        1612  +
/// See [`ErrorSerializationOperationInput`](crate::input::ErrorSerializationOperationInput).
        1613  +
pub mod error_serialization_operation_input {
        1614  +
        1615  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        1616  +
    /// Holds one variant for each of the ways the builder can fail.
        1617  +
    #[non_exhaustive]
        1618  +
    #[allow(clippy::enum_variant_names)]
        1619  +
    pub enum ConstraintViolation {
        1620  +
        /// Constraint violation occurred building member `r#enum` when building `ErrorSerializationOperationInput`.
        1621  +
        #[doc(hidden)]
        1622  +
        Enum(crate::model::suit::ConstraintViolation),
        1623  +
        /// `required_blob` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1624  +
        MissingRequiredBlob,
        1625  +
        /// `required_boolean` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1626  +
        MissingRequiredBoolean,
        1627  +
        /// `required_string` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1628  +
        MissingRequiredString,
        1629  +
        /// `required_byte` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1630  +
        MissingRequiredByte,
        1631  +
        /// `required_short` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1632  +
        MissingRequiredShort,
        1633  +
        /// `required_integer` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1634  +
        MissingRequiredInteger,
        1635  +
        /// `required_long` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1636  +
        MissingRequiredLong,
        1637  +
        /// `required_float` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1638  +
        MissingRequiredFloat,
        1639  +
        /// `required_double` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1640  +
        MissingRequiredDouble,
        1641  +
        /// `required_timestamp` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1642  +
        MissingRequiredTimestamp,
        1643  +
        /// `required_enum` was not provided but it is required when building `ErrorSerializationOperationInput`.
        1644  +
        MissingRequiredEnum,
        1645  +
        /// Constraint violation occurred building member `required_enum` when building `ErrorSerializationOperationInput`.
        1646  +
        #[doc(hidden)]
        1647  +
        RequiredEnum(crate::model::suit::ConstraintViolation),
        1648  +
    }
        1649  +
    impl ::std::fmt::Display for ConstraintViolation {
        1650  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1651  +
            match self {
        1652  +
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `ErrorSerializationOperationInput`"),
        1653  +
                ConstraintViolation::MissingRequiredBlob => write!(f, "`required_blob` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1654  +
                ConstraintViolation::MissingRequiredBoolean => write!(f, "`required_boolean` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1655  +
                ConstraintViolation::MissingRequiredString => write!(f, "`required_string` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1656  +
                ConstraintViolation::MissingRequiredByte => write!(f, "`required_byte` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1657  +
                ConstraintViolation::MissingRequiredShort => write!(f, "`required_short` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1658  +
                ConstraintViolation::MissingRequiredInteger => write!(f, "`required_integer` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1659  +
                ConstraintViolation::MissingRequiredLong => write!(f, "`required_long` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1660  +
                ConstraintViolation::MissingRequiredFloat => write!(f, "`required_float` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1661  +
                ConstraintViolation::MissingRequiredDouble => write!(f, "`required_double` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1662  +
                ConstraintViolation::MissingRequiredTimestamp => write!(f, "`required_timestamp` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1663  +
                ConstraintViolation::MissingRequiredEnum => write!(f, "`required_enum` was not provided but it is required when building `ErrorSerializationOperationInput`"),
        1664  +
                ConstraintViolation::RequiredEnum(_) => write!(f, "constraint violation occurred building member `required_enum` when building `ErrorSerializationOperationInput`"),
        1665  +
            }
        1666  +
        }
        1667  +
    }
        1668  +
    impl ::std::error::Error for ConstraintViolation {}
        1669  +
    impl ConstraintViolation {
        1670  +
        pub(crate) fn as_validation_exception_field(
        1671  +
            self,
        1672  +
            path: ::std::string::String,
        1673  +
        ) -> crate::model::ValidationExceptionField {
        1674  +
            match self {
        1675  +
            ConstraintViolation::Enum(inner) => inner.as_validation_exception_field(path + "/enum"),
        1676  +
            ConstraintViolation::MissingRequiredBlob => crate::model::ValidationExceptionField {
        1677  +
                                                message: format!("Value at '{}/requiredBlob' failed to satisfy constraint: Member must not be null", path),
        1678  +
                                                path: path + "/requiredBlob",
        1679  +
                                            },
        1680  +
            ConstraintViolation::MissingRequiredBoolean => crate::model::ValidationExceptionField {
        1681  +
                                                message: format!("Value at '{}/requiredBoolean' failed to satisfy constraint: Member must not be null", path),
        1682  +
                                                path: path + "/requiredBoolean",
        1683  +
                                            },
        1684  +
            ConstraintViolation::MissingRequiredString => crate::model::ValidationExceptionField {
        1685  +
                                                message: format!("Value at '{}/requiredString' failed to satisfy constraint: Member must not be null", path),
        1686  +
                                                path: path + "/requiredString",
        1687  +
                                            },
        1688  +
            ConstraintViolation::MissingRequiredByte => crate::model::ValidationExceptionField {
        1689  +
                                                message: format!("Value at '{}/requiredByte' failed to satisfy constraint: Member must not be null", path),
        1690  +
                                                path: path + "/requiredByte",
        1691  +
                                            },
        1692  +
            ConstraintViolation::MissingRequiredShort => crate::model::ValidationExceptionField {
        1693  +
                                                message: format!("Value at '{}/requiredShort' failed to satisfy constraint: Member must not be null", path),
        1694  +
                                                path: path + "/requiredShort",
        1695  +
                                            },
        1696  +
            ConstraintViolation::MissingRequiredInteger => crate::model::ValidationExceptionField {
        1697  +
                                                message: format!("Value at '{}/requiredInteger' failed to satisfy constraint: Member must not be null", path),
        1698  +
                                                path: path + "/requiredInteger",
        1699  +
                                            },
        1700  +
            ConstraintViolation::MissingRequiredLong => crate::model::ValidationExceptionField {
        1701  +
                                                message: format!("Value at '{}/requiredLong' failed to satisfy constraint: Member must not be null", path),
        1702  +
                                                path: path + "/requiredLong",
        1703  +
                                            },
        1704  +
            ConstraintViolation::MissingRequiredFloat => crate::model::ValidationExceptionField {
        1705  +
                                                message: format!("Value at '{}/requiredFloat' failed to satisfy constraint: Member must not be null", path),
        1706  +
                                                path: path + "/requiredFloat",
        1707  +
                                            },
        1708  +
            ConstraintViolation::MissingRequiredDouble => crate::model::ValidationExceptionField {
        1709  +
                                                message: format!("Value at '{}/requiredDouble' failed to satisfy constraint: Member must not be null", path),
        1710  +
                                                path: path + "/requiredDouble",
        1711  +
                                            },
        1712  +
            ConstraintViolation::MissingRequiredTimestamp => crate::model::ValidationExceptionField {
        1713  +
                                                message: format!("Value at '{}/requiredTimestamp' failed to satisfy constraint: Member must not be null", path),
        1714  +
                                                path: path + "/requiredTimestamp",
        1715  +
                                            },
        1716  +
            ConstraintViolation::MissingRequiredEnum => crate::model::ValidationExceptionField {
        1717  +
                                                message: format!("Value at '{}/requiredEnum' failed to satisfy constraint: Member must not be null", path),
        1718  +
                                                path: path + "/requiredEnum",
        1719  +
                                            },
        1720  +
            ConstraintViolation::RequiredEnum(inner) => inner.as_validation_exception_field(path + "/requiredEnum"),
        1721  +
        }
        1722  +
        }
        1723  +
    }
        1724  +
    impl ::std::convert::From<ConstraintViolation>
        1725  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
        1726  +
    {
        1727  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
        1728  +
            let first_validation_exception_field =
        1729  +
                constraint_violation.as_validation_exception_field("".to_owned());
        1730  +
            let validation_exception = crate::error::ValidationException {
        1731  +
                message: format!(
        1732  +
                    "1 validation error detected. {}",
        1733  +
                    &first_validation_exception_field.message
        1734  +
                ),
        1735  +
                field_list: Some(vec![first_validation_exception_field]),
        1736  +
            };
        1737  +
            Self::ConstraintViolation(
        1738  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
        1739  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
        1740  +
                            )
        1741  +
        }
        1742  +
    }
        1743  +
    impl ::std::convert::From<Builder>
        1744  +
        for crate::constrained::MaybeConstrained<crate::input::ErrorSerializationOperationInput>
        1745  +
    {
        1746  +
        fn from(builder: Builder) -> Self {
        1747  +
            Self::Unconstrained(builder)
        1748  +
        }
        1749  +
    }
        1750  +
    impl ::std::convert::TryFrom<Builder> for crate::input::ErrorSerializationOperationInput {
        1751  +
        type Error = ConstraintViolation;
        1752  +
        1753  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        1754  +
            builder.build()
        1755  +
        }
        1756  +
    }
        1757  +
    /// A builder for [`ErrorSerializationOperationInput`](crate::input::ErrorSerializationOperationInput).
        1758  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1759  +
    pub struct Builder {
        1760  +
        pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
        1761  +
        pub(crate) boolean: ::std::option::Option<bool>,
        1762  +
        pub(crate) string: ::std::option::Option<::std::string::String>,
        1763  +
        pub(crate) byte: ::std::option::Option<i8>,
        1764  +
        pub(crate) short: ::std::option::Option<i16>,
        1765  +
        pub(crate) integer: ::std::option::Option<i32>,
        1766  +
        pub(crate) long: ::std::option::Option<i64>,
        1767  +
        pub(crate) float: ::std::option::Option<f32>,
        1768  +
        pub(crate) double: ::std::option::Option<f64>,
        1769  +
        pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        1770  +
        pub(crate) r#enum:
        1771  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        1772  +
        pub(crate) required_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        1773  +
        pub(crate) required_boolean: ::std::option::Option<bool>,
        1774  +
        pub(crate) required_string: ::std::option::Option<::std::string::String>,
        1775  +
        pub(crate) required_byte: ::std::option::Option<i8>,
        1776  +
        pub(crate) required_short: ::std::option::Option<i16>,
        1777  +
        pub(crate) required_integer: ::std::option::Option<i32>,
        1778  +
        pub(crate) required_long: ::std::option::Option<i64>,
        1779  +
        pub(crate) required_float: ::std::option::Option<f32>,
        1780  +
        pub(crate) required_double: ::std::option::Option<f64>,
        1781  +
        pub(crate) required_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        1782  +
        pub(crate) required_enum:
        1783  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        1784  +
    }
        1785  +
    impl Builder {
        1786  +
        #[allow(missing_docs)] // documentation missing in model
        1787  +
        pub fn blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        1788  +
            self.blob = input;
        1789  +
            self
        1790  +
        }
        1791  +
        #[allow(missing_docs)] // documentation missing in model
        1792  +
        pub(crate) fn set_blob(
        1793  +
            mut self,
        1794  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
        1795  +
        ) -> Self {
        1796  +
            self.blob = input.map(|v| v.into());
        1797  +
            self
        1798  +
        }
        1799  +
        #[allow(missing_docs)] // documentation missing in model
        1800  +
        pub fn boolean(mut self, input: ::std::option::Option<bool>) -> Self {
        1801  +
            self.boolean = input;
        1802  +
            self
        1803  +
        }
        1804  +
        #[allow(missing_docs)] // documentation missing in model
        1805  +
        pub(crate) fn set_boolean(
        1806  +
            mut self,
        1807  +
            input: Option<impl ::std::convert::Into<bool>>,
        1808  +
        ) -> Self {
        1809  +
            self.boolean = input.map(|v| v.into());
        1810  +
            self
        1811  +
        }
        1812  +
        #[allow(missing_docs)] // documentation missing in model
        1813  +
        pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        1814  +
            self.string = input;
        1815  +
            self
        1816  +
        }
        1817  +
        #[allow(missing_docs)] // documentation missing in model
        1818  +
        pub(crate) fn set_string(
        1819  +
            mut self,
        1820  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        1821  +
        ) -> Self {
        1822  +
            self.string = input.map(|v| v.into());
        1823  +
            self
        1824  +
        }
        1825  +
        #[allow(missing_docs)] // documentation missing in model
        1826  +
        pub fn byte(mut self, input: ::std::option::Option<i8>) -> Self {
        1827  +
            self.byte = input;
        1828  +
            self
        1829  +
        }
        1830  +
        #[allow(missing_docs)] // documentation missing in model
        1831  +
        pub(crate) fn set_byte(mut self, input: Option<impl ::std::convert::Into<i8>>) -> Self {
        1832  +
            self.byte = input.map(|v| v.into());
        1833  +
            self
        1834  +
        }
        1835  +
        #[allow(missing_docs)] // documentation missing in model
        1836  +
        pub fn short(mut self, input: ::std::option::Option<i16>) -> Self {
        1837  +
            self.short = input;
        1838  +
            self
        1839  +
        }
        1840  +
        #[allow(missing_docs)] // documentation missing in model
        1841  +
        pub(crate) fn set_short(mut self, input: Option<impl ::std::convert::Into<i16>>) -> Self {
        1842  +
            self.short = input.map(|v| v.into());
        1843  +
            self
        1844  +
        }
        1845  +
        #[allow(missing_docs)] // documentation missing in model
        1846  +
        pub fn integer(mut self, input: ::std::option::Option<i32>) -> Self {
        1847  +
            self.integer = input;
        1848  +
            self
        1849  +
        }
        1850  +
        #[allow(missing_docs)] // documentation missing in model
        1851  +
        pub(crate) fn set_integer(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        1852  +
            self.integer = input.map(|v| v.into());
        1853  +
            self
        1854  +
        }
        1855  +
        #[allow(missing_docs)] // documentation missing in model
        1856  +
        pub fn long(mut self, input: ::std::option::Option<i64>) -> Self {
        1857  +
            self.long = input;
        1858  +
            self
        1859  +
        }
        1860  +
        #[allow(missing_docs)] // documentation missing in model
        1861  +
        pub(crate) fn set_long(mut self, input: Option<impl ::std::convert::Into<i64>>) -> Self {
        1862  +
            self.long = input.map(|v| v.into());
        1863  +
            self
        1864  +
        }
        1865  +
        #[allow(missing_docs)] // documentation missing in model
        1866  +
        pub fn float(mut self, input: ::std::option::Option<f32>) -> Self {
        1867  +
            self.float = input;
        1868  +
            self
        1869  +
        }
        1870  +
        #[allow(missing_docs)] // documentation missing in model
        1871  +
        pub(crate) fn set_float(mut self, input: Option<impl ::std::convert::Into<f32>>) -> Self {
        1872  +
            self.float = input.map(|v| v.into());
        1873  +
            self
        1874  +
        }
        1875  +
        #[allow(missing_docs)] // documentation missing in model
        1876  +
        pub fn double(mut self, input: ::std::option::Option<f64>) -> Self {
        1877  +
            self.double = input;
        1878  +
            self
        1879  +
        }
        1880  +
        #[allow(missing_docs)] // documentation missing in model
        1881  +
        pub(crate) fn set_double(mut self, input: Option<impl ::std::convert::Into<f64>>) -> Self {
        1882  +
            self.double = input.map(|v| v.into());
        1883  +
            self
        1884  +
        }
        1885  +
        #[allow(missing_docs)] // documentation missing in model
        1886  +
        pub fn timestamp(
        1887  +
            mut self,
        1888  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
        1889  +
        ) -> Self {
        1890  +
            self.timestamp = input;
        1891  +
            self
        1892  +
        }
        1893  +
        #[allow(missing_docs)] // documentation missing in model
        1894  +
        pub(crate) fn set_timestamp(
        1895  +
            mut self,
        1896  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
        1897  +
        ) -> Self {
        1898  +
            self.timestamp = input.map(|v| v.into());
        1899  +
            self
        1900  +
        }
        1901  +
        #[allow(missing_docs)] // documentation missing in model
        1902  +
        pub fn r#enum(mut self, input: ::std::option::Option<crate::model::Suit>) -> Self {
        1903  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
        1904  +
            self
        1905  +
        }
        1906  +
        #[allow(missing_docs)] // documentation missing in model
        1907  +
        pub(crate) fn set_enum(
        1908  +
            mut self,
        1909  +
            input: Option<
        1910  +
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        1911  +
            >,
        1912  +
        ) -> Self {
        1913  +
            self.r#enum = input.map(|v| v.into());
        1914  +
            self
        1915  +
        }
        1916  +
        #[allow(missing_docs)] // documentation missing in model
        1917  +
        pub fn required_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        1918  +
            self.required_blob = Some(input);
        1919  +
            self
        1920  +
        }
        1921  +
        #[allow(missing_docs)] // documentation missing in model
        1922  +
        pub(crate) fn set_required_blob(
        1923  +
            mut self,
        1924  +
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
        1925  +
        ) -> Self {
        1926  +
            self.required_blob = Some(input.into());
        1927  +
            self
        1928  +
        }
        1929  +
        #[allow(missing_docs)] // documentation missing in model
        1930  +
        pub fn required_boolean(mut self, input: bool) -> Self {
        1931  +
            self.required_boolean = Some(input);
        1932  +
            self
        1933  +
        }
        1934  +
        #[allow(missing_docs)] // documentation missing in model
        1935  +
        pub(crate) fn set_required_boolean(
        1936  +
            mut self,
        1937  +
            input: impl ::std::convert::Into<bool>,
        1938  +
        ) -> Self {
        1939  +
            self.required_boolean = Some(input.into());
        1940  +
            self
        1941  +
        }
        1942  +
        #[allow(missing_docs)] // documentation missing in model
        1943  +
        pub fn required_string(mut self, input: ::std::string::String) -> Self {
        1944  +
            self.required_string = Some(input);
        1945  +
            self
        1946  +
        }
        1947  +
        #[allow(missing_docs)] // documentation missing in model
        1948  +
        pub(crate) fn set_required_string(
        1949  +
            mut self,
        1950  +
            input: impl ::std::convert::Into<::std::string::String>,
        1951  +
        ) -> Self {
        1952  +
            self.required_string = Some(input.into());
        1953  +
            self
        1954  +
        }
        1955  +
        #[allow(missing_docs)] // documentation missing in model
        1956  +
        pub fn required_byte(mut self, input: i8) -> Self {
        1957  +
            self.required_byte = Some(input);
        1958  +
            self
        1959  +
        }
        1960  +
        #[allow(missing_docs)] // documentation missing in model
        1961  +
        pub(crate) fn set_required_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        1962  +
            self.required_byte = Some(input.into());
        1963  +
            self
        1964  +
        }
        1965  +
        #[allow(missing_docs)] // documentation missing in model
        1966  +
        pub fn required_short(mut self, input: i16) -> Self {
        1967  +
            self.required_short = Some(input);
        1968  +
            self
        1969  +
        }
        1970  +
        #[allow(missing_docs)] // documentation missing in model
        1971  +
        pub(crate) fn set_required_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        1972  +
            self.required_short = Some(input.into());
        1973  +
            self
        1974  +
        }
        1975  +
        #[allow(missing_docs)] // documentation missing in model
        1976  +
        pub fn required_integer(mut self, input: i32) -> Self {
        1977  +
            self.required_integer = Some(input);
        1978  +
            self
        1979  +
        }
        1980  +
        #[allow(missing_docs)] // documentation missing in model
        1981  +
        pub(crate) fn set_required_integer(
        1982  +
            mut self,
        1983  +
            input: impl ::std::convert::Into<i32>,
        1984  +
        ) -> Self {
        1985  +
            self.required_integer = Some(input.into());
        1986  +
            self
        1987  +
        }
        1988  +
        #[allow(missing_docs)] // documentation missing in model
        1989  +
        pub fn required_long(mut self, input: i64) -> Self {
        1990  +
            self.required_long = Some(input);
        1991  +
            self
        1992  +
        }
        1993  +
        #[allow(missing_docs)] // documentation missing in model
        1994  +
        pub(crate) fn set_required_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        1995  +
            self.required_long = Some(input.into());
        1996  +
            self
        1997  +
        }
        1998  +
        #[allow(missing_docs)] // documentation missing in model
        1999  +
        pub fn required_float(mut self, input: f32) -> Self {
        2000  +
            self.required_float = Some(input);
        2001  +
            self
        2002  +
        }
        2003  +
        #[allow(missing_docs)] // documentation missing in model
        2004  +
        pub(crate) fn set_required_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        2005  +
            self.required_float = Some(input.into());
        2006  +
            self
        2007  +
        }
        2008  +
        #[allow(missing_docs)] // documentation missing in model
        2009  +
        pub fn required_double(mut self, input: f64) -> Self {
        2010  +
            self.required_double = Some(input);
        2011  +
            self
        2012  +
        }
        2013  +
        #[allow(missing_docs)] // documentation missing in model
        2014  +
        pub(crate) fn set_required_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
        2015  +
            self.required_double = Some(input.into());
        2016  +
            self
        2017  +
        }
        2018  +
        #[allow(missing_docs)] // documentation missing in model
        2019  +
        pub fn required_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        2020  +
            self.required_timestamp = Some(input);
        2021  +
            self
        2022  +
        }
        2023  +
        #[allow(missing_docs)] // documentation missing in model
        2024  +
        pub(crate) fn set_required_timestamp(
        2025  +
            mut self,
        2026  +
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
        2027  +
        ) -> Self {
        2028  +
            self.required_timestamp = Some(input.into());
        2029  +
            self
        2030  +
        }
        2031  +
        #[allow(missing_docs)] // documentation missing in model
        2032  +
        pub fn required_enum(mut self, input: crate::model::Suit) -> Self {
        2033  +
            self.required_enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
        2034  +
            self
        2035  +
        }
        2036  +
        #[allow(missing_docs)] // documentation missing in model
        2037  +
        pub(crate) fn set_required_enum(
        2038  +
            mut self,
        2039  +
            input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        2040  +
        ) -> Self {
        2041  +
            self.required_enum = Some(input.into());
        2042  +
            self
        2043  +
        }
        2044  +
        /// Consumes the builder and constructs a [`ErrorSerializationOperationInput`](crate::input::ErrorSerializationOperationInput).
        2045  +
        ///
        2046  +
        /// The builder fails to construct a [`ErrorSerializationOperationInput`](crate::input::ErrorSerializationOperationInput) if a [`ConstraintViolation`] occurs.
        2047  +
        ///
        2048  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        2049  +
        pub fn build(
        2050  +
            self,
        2051  +
        ) -> Result<crate::input::ErrorSerializationOperationInput, ConstraintViolation> {
        2052  +
            self.build_enforcing_all_constraints()
        2053  +
        }
        2054  +
        fn build_enforcing_all_constraints(
        2055  +
            self,
        2056  +
        ) -> Result<crate::input::ErrorSerializationOperationInput, ConstraintViolation> {
        2057  +
            Ok(crate::input::ErrorSerializationOperationInput {
        2058  +
                blob: self.blob,
        2059  +
                boolean: self.boolean,
        2060  +
                string: self.string,
        2061  +
                byte: self.byte,
        2062  +
                short: self.short,
        2063  +
                integer: self.integer,
        2064  +
                long: self.long,
        2065  +
                float: self.float,
        2066  +
                double: self.double,
        2067  +
                timestamp: self.timestamp,
        2068  +
                r#enum: self
        2069  +
                    .r#enum
        2070  +
                    .map(|v| match v {
        2071  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        2072  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        2073  +
                    })
        2074  +
                    .map(|res| res.map_err(ConstraintViolation::Enum))
        2075  +
                    .transpose()?,
        2076  +
                required_blob: self
        2077  +
                    .required_blob
        2078  +
                    .ok_or(ConstraintViolation::MissingRequiredBlob)?,
        2079  +
                required_boolean: self
        2080  +
                    .required_boolean
        2081  +
                    .ok_or(ConstraintViolation::MissingRequiredBoolean)?,
        2082  +
                required_string: self
        2083  +
                    .required_string
        2084  +
                    .ok_or(ConstraintViolation::MissingRequiredString)?,
        2085  +
                required_byte: self
        2086  +
                    .required_byte
        2087  +
                    .ok_or(ConstraintViolation::MissingRequiredByte)?,
        2088  +
                required_short: self
        2089  +
                    .required_short
        2090  +
                    .ok_or(ConstraintViolation::MissingRequiredShort)?,
        2091  +
                required_integer: self
        2092  +
                    .required_integer
        2093  +
                    .ok_or(ConstraintViolation::MissingRequiredInteger)?,
        2094  +
                required_long: self
        2095  +
                    .required_long
        2096  +
                    .ok_or(ConstraintViolation::MissingRequiredLong)?,
        2097  +
                required_float: self
        2098  +
                    .required_float
        2099  +
                    .ok_or(ConstraintViolation::MissingRequiredFloat)?,
        2100  +
                required_double: self
        2101  +
                    .required_double
        2102  +
                    .ok_or(ConstraintViolation::MissingRequiredDouble)?,
        2103  +
                required_timestamp: self
        2104  +
                    .required_timestamp
        2105  +
                    .ok_or(ConstraintViolation::MissingRequiredTimestamp)?,
        2106  +
                required_enum: self
        2107  +
                    .required_enum
        2108  +
                    .map(|v| match v {
        2109  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        2110  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        2111  +
                    })
        2112  +
                    .map(|res| res.map_err(ConstraintViolation::RequiredEnum))
        2113  +
                    .transpose()?
        2114  +
                    .ok_or(ConstraintViolation::MissingRequiredEnum)?,
        2115  +
            })
        2116  +
        }
        2117  +
    }
        2118  +
}
        2119  +
/// See [`SimpleStructOperationInput`](crate::input::SimpleStructOperationInput).
        2120  +
pub mod simple_struct_operation_input {
        2121  +
        2122  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        2123  +
    /// Holds one variant for each of the ways the builder can fail.
        2124  +
    #[non_exhaustive]
        2125  +
    #[allow(clippy::enum_variant_names)]
        2126  +
    pub enum ConstraintViolation {
        2127  +
        /// Constraint violation occurred building member `r#enum` when building `SimpleStructOperationInput`.
        2128  +
        #[doc(hidden)]
        2129  +
        Enum(crate::model::suit::ConstraintViolation),
        2130  +
        /// `required_blob` was not provided but it is required when building `SimpleStructOperationInput`.
        2131  +
        MissingRequiredBlob,
        2132  +
        /// `required_boolean` was not provided but it is required when building `SimpleStructOperationInput`.
        2133  +
        MissingRequiredBoolean,
        2134  +
        /// `required_string` was not provided but it is required when building `SimpleStructOperationInput`.
        2135  +
        MissingRequiredString,
        2136  +
        /// `required_byte` was not provided but it is required when building `SimpleStructOperationInput`.
        2137  +
        MissingRequiredByte,
        2138  +
        /// `required_short` was not provided but it is required when building `SimpleStructOperationInput`.
        2139  +
        MissingRequiredShort,
        2140  +
        /// `required_integer` was not provided but it is required when building `SimpleStructOperationInput`.
        2141  +
        MissingRequiredInteger,
        2142  +
        /// `required_long` was not provided but it is required when building `SimpleStructOperationInput`.
        2143  +
        MissingRequiredLong,
        2144  +
        /// `required_float` was not provided but it is required when building `SimpleStructOperationInput`.
        2145  +
        MissingRequiredFloat,
        2146  +
        /// `required_double` was not provided but it is required when building `SimpleStructOperationInput`.
        2147  +
        MissingRequiredDouble,
        2148  +
        /// `required_timestamp` was not provided but it is required when building `SimpleStructOperationInput`.
        2149  +
        MissingRequiredTimestamp,
        2150  +
        /// `required_enum` was not provided but it is required when building `SimpleStructOperationInput`.
        2151  +
        MissingRequiredEnum,
        2152  +
        /// Constraint violation occurred building member `required_enum` when building `SimpleStructOperationInput`.
        2153  +
        #[doc(hidden)]
        2154  +
        RequiredEnum(crate::model::suit::ConstraintViolation),
        2155  +
    }
        2156  +
    impl ::std::fmt::Display for ConstraintViolation {
        2157  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2158  +
            match self {
        2159  +
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `SimpleStructOperationInput`"),
        2160  +
                ConstraintViolation::MissingRequiredBlob => write!(f, "`required_blob` was not provided but it is required when building `SimpleStructOperationInput`"),
        2161  +
                ConstraintViolation::MissingRequiredBoolean => write!(f, "`required_boolean` was not provided but it is required when building `SimpleStructOperationInput`"),
        2162  +
                ConstraintViolation::MissingRequiredString => write!(f, "`required_string` was not provided but it is required when building `SimpleStructOperationInput`"),
        2163  +
                ConstraintViolation::MissingRequiredByte => write!(f, "`required_byte` was not provided but it is required when building `SimpleStructOperationInput`"),
        2164  +
                ConstraintViolation::MissingRequiredShort => write!(f, "`required_short` was not provided but it is required when building `SimpleStructOperationInput`"),
        2165  +
                ConstraintViolation::MissingRequiredInteger => write!(f, "`required_integer` was not provided but it is required when building `SimpleStructOperationInput`"),
        2166  +
                ConstraintViolation::MissingRequiredLong => write!(f, "`required_long` was not provided but it is required when building `SimpleStructOperationInput`"),
        2167  +
                ConstraintViolation::MissingRequiredFloat => write!(f, "`required_float` was not provided but it is required when building `SimpleStructOperationInput`"),
        2168  +
                ConstraintViolation::MissingRequiredDouble => write!(f, "`required_double` was not provided but it is required when building `SimpleStructOperationInput`"),
        2169  +
                ConstraintViolation::MissingRequiredTimestamp => write!(f, "`required_timestamp` was not provided but it is required when building `SimpleStructOperationInput`"),
        2170  +
                ConstraintViolation::MissingRequiredEnum => write!(f, "`required_enum` was not provided but it is required when building `SimpleStructOperationInput`"),
        2171  +
                ConstraintViolation::RequiredEnum(_) => write!(f, "constraint violation occurred building member `required_enum` when building `SimpleStructOperationInput`"),
        2172  +
            }
        2173  +
        }
        2174  +
    }
        2175  +
    impl ::std::error::Error for ConstraintViolation {}
        2176  +
    impl ConstraintViolation {
        2177  +
        pub(crate) fn as_validation_exception_field(
        2178  +
            self,
        2179  +
            path: ::std::string::String,
        2180  +
        ) -> crate::model::ValidationExceptionField {
        2181  +
            match self {
        2182  +
            ConstraintViolation::Enum(inner) => inner.as_validation_exception_field(path + "/enum"),
        2183  +
            ConstraintViolation::MissingRequiredBlob => crate::model::ValidationExceptionField {
        2184  +
                                                message: format!("Value at '{}/requiredBlob' failed to satisfy constraint: Member must not be null", path),
        2185  +
                                                path: path + "/requiredBlob",
        2186  +
                                            },
        2187  +
            ConstraintViolation::MissingRequiredBoolean => crate::model::ValidationExceptionField {
        2188  +
                                                message: format!("Value at '{}/requiredBoolean' failed to satisfy constraint: Member must not be null", path),
        2189  +
                                                path: path + "/requiredBoolean",
        2190  +
                                            },
        2191  +
            ConstraintViolation::MissingRequiredString => crate::model::ValidationExceptionField {
        2192  +
                                                message: format!("Value at '{}/requiredString' failed to satisfy constraint: Member must not be null", path),
        2193  +
                                                path: path + "/requiredString",
        2194  +
                                            },
        2195  +
            ConstraintViolation::MissingRequiredByte => crate::model::ValidationExceptionField {
        2196  +
                                                message: format!("Value at '{}/requiredByte' failed to satisfy constraint: Member must not be null", path),
        2197  +
                                                path: path + "/requiredByte",
        2198  +
                                            },
        2199  +
            ConstraintViolation::MissingRequiredShort => crate::model::ValidationExceptionField {
        2200  +
                                                message: format!("Value at '{}/requiredShort' failed to satisfy constraint: Member must not be null", path),
        2201  +
                                                path: path + "/requiredShort",
        2202  +
                                            },
        2203  +
            ConstraintViolation::MissingRequiredInteger => crate::model::ValidationExceptionField {
        2204  +
                                                message: format!("Value at '{}/requiredInteger' failed to satisfy constraint: Member must not be null", path),
        2205  +
                                                path: path + "/requiredInteger",
        2206  +
                                            },
        2207  +
            ConstraintViolation::MissingRequiredLong => crate::model::ValidationExceptionField {
        2208  +
                                                message: format!("Value at '{}/requiredLong' failed to satisfy constraint: Member must not be null", path),
        2209  +
                                                path: path + "/requiredLong",
        2210  +
                                            },
        2211  +
            ConstraintViolation::MissingRequiredFloat => crate::model::ValidationExceptionField {
        2212  +
                                                message: format!("Value at '{}/requiredFloat' failed to satisfy constraint: Member must not be null", path),
        2213  +
                                                path: path + "/requiredFloat",
        2214  +
                                            },
        2215  +
            ConstraintViolation::MissingRequiredDouble => crate::model::ValidationExceptionField {
        2216  +
                                                message: format!("Value at '{}/requiredDouble' failed to satisfy constraint: Member must not be null", path),
        2217  +
                                                path: path + "/requiredDouble",
        2218  +
                                            },
        2219  +
            ConstraintViolation::MissingRequiredTimestamp => crate::model::ValidationExceptionField {
        2220  +
                                                message: format!("Value at '{}/requiredTimestamp' failed to satisfy constraint: Member must not be null", path),
        2221  +
                                                path: path + "/requiredTimestamp",
        2222  +
                                            },
        2223  +
            ConstraintViolation::MissingRequiredEnum => crate::model::ValidationExceptionField {
        2224  +
                                                message: format!("Value at '{}/requiredEnum' failed to satisfy constraint: Member must not be null", path),
        2225  +
                                                path: path + "/requiredEnum",
        2226  +
                                            },
        2227  +
            ConstraintViolation::RequiredEnum(inner) => inner.as_validation_exception_field(path + "/requiredEnum"),
        2228  +
        }
        2229  +
        }
        2230  +
    }
        2231  +
    impl ::std::convert::From<ConstraintViolation>
        2232  +
        for ::aws_smithy_legacy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection
        2233  +
    {
        2234  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
        2235  +
            let first_validation_exception_field =
        2236  +
                constraint_violation.as_validation_exception_field("".to_owned());
        2237  +
            let validation_exception = crate::error::ValidationException {
        2238  +
                message: format!(
        2239  +
                    "1 validation error detected. {}",
        2240  +
                    &first_validation_exception_field.message
        2241  +
                ),
        2242  +
                field_list: Some(vec![first_validation_exception_field]),
        2243  +
            };
        2244  +
            Self::ConstraintViolation(
        2245  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
        2246  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
        2247  +
                            )
        2248  +
        }
        2249  +
    }
        2250  +
    impl ::std::convert::From<Builder>
        2251  +
        for crate::constrained::MaybeConstrained<crate::input::SimpleStructOperationInput>
        2252  +
    {
        2253  +
        fn from(builder: Builder) -> Self {
        2254  +
            Self::Unconstrained(builder)
        2255  +
        }
        2256  +
    }
        2257  +
    impl ::std::convert::TryFrom<Builder> for crate::input::SimpleStructOperationInput {
        2258  +
        type Error = ConstraintViolation;
        2259  +
        2260  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        2261  +
            builder.build()
        2262  +
        }
        2263  +
    }
        2264  +
    /// A builder for [`SimpleStructOperationInput`](crate::input::SimpleStructOperationInput).
        2265  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2266  +
    pub struct Builder {
        2267  +
        pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
        2268  +
        pub(crate) boolean: ::std::option::Option<bool>,
        2269  +
        pub(crate) string: ::std::option::Option<::std::string::String>,
        2270  +
        pub(crate) byte: ::std::option::Option<i8>,
        2271  +
        pub(crate) short: ::std::option::Option<i16>,
        2272  +
        pub(crate) integer: ::std::option::Option<i32>,
        2273  +
        pub(crate) long: ::std::option::Option<i64>,
        2274  +
        pub(crate) float: ::std::option::Option<f32>,
        2275  +
        pub(crate) double: ::std::option::Option<f64>,
        2276  +
        pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        2277  +
        pub(crate) r#enum:
        2278  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        2279  +
        pub(crate) required_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        2280  +
        pub(crate) required_boolean: ::std::option::Option<bool>,
        2281  +
        pub(crate) required_string: ::std::option::Option<::std::string::String>,
        2282  +
        pub(crate) required_byte: ::std::option::Option<i8>,
        2283  +
        pub(crate) required_short: ::std::option::Option<i16>,
        2284  +
        pub(crate) required_integer: ::std::option::Option<i32>,
        2285  +
        pub(crate) required_long: ::std::option::Option<i64>,
        2286  +
        pub(crate) required_float: ::std::option::Option<f32>,
        2287  +
        pub(crate) required_double: ::std::option::Option<f64>,
        2288  +
        pub(crate) required_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        2289  +
        pub(crate) required_enum:
        2290  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        2291  +
    }
        2292  +
    impl Builder {
        2293  +
        #[allow(missing_docs)] // documentation missing in model
        2294  +
        pub fn blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        2295  +
            self.blob = input;
        2296  +
            self
        2297  +
        }
        2298  +
        #[allow(missing_docs)] // documentation missing in model
        2299  +
        pub(crate) fn set_blob(
        2300  +
            mut self,
        2301  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
        2302  +
        ) -> Self {
        2303  +
            self.blob = input.map(|v| v.into());
        2304  +
            self
        2305  +
        }
        2306  +
        #[allow(missing_docs)] // documentation missing in model
        2307  +
        pub fn boolean(mut self, input: ::std::option::Option<bool>) -> Self {
        2308  +
            self.boolean = input;
        2309  +
            self
        2310  +
        }
        2311  +
        #[allow(missing_docs)] // documentation missing in model
        2312  +
        pub(crate) fn set_boolean(
        2313  +
            mut self,
        2314  +
            input: Option<impl ::std::convert::Into<bool>>,
        2315  +
        ) -> Self {
        2316  +
            self.boolean = input.map(|v| v.into());
        2317  +
            self
        2318  +
        }
        2319  +
        #[allow(missing_docs)] // documentation missing in model
        2320  +
        pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2321  +
            self.string = input;
        2322  +
            self
        2323  +
        }
        2324  +
        #[allow(missing_docs)] // documentation missing in model
        2325  +
        pub(crate) fn set_string(
        2326  +
            mut self,
        2327  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        2328  +
        ) -> Self {
        2329  +
            self.string = input.map(|v| v.into());
        2330  +
            self
        2331  +
        }
        2332  +
        #[allow(missing_docs)] // documentation missing in model
        2333  +
        pub fn byte(mut self, input: ::std::option::Option<i8>) -> Self {
        2334  +
            self.byte = input;
        2335  +
            self
        2336  +
        }
        2337  +
        #[allow(missing_docs)] // documentation missing in model
        2338  +
        pub(crate) fn set_byte(mut self, input: Option<impl ::std::convert::Into<i8>>) -> Self {
        2339  +
            self.byte = input.map(|v| v.into());
        2340  +
            self
        2341  +
        }
        2342  +
        #[allow(missing_docs)] // documentation missing in model
        2343  +
        pub fn short(mut self, input: ::std::option::Option<i16>) -> Self {
        2344  +
            self.short = input;
        2345  +
            self
        2346  +
        }
        2347  +
        #[allow(missing_docs)] // documentation missing in model
        2348  +
        pub(crate) fn set_short(mut self, input: Option<impl ::std::convert::Into<i16>>) -> Self {
        2349  +
            self.short = input.map(|v| v.into());
        2350  +
            self
        2351  +
        }
        2352  +
        #[allow(missing_docs)] // documentation missing in model
        2353  +
        pub fn integer(mut self, input: ::std::option::Option<i32>) -> Self {
        2354  +
            self.integer = input;
        2355  +
            self
        2356  +
        }
        2357  +
        #[allow(missing_docs)] // documentation missing in model
        2358  +
        pub(crate) fn set_integer(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        2359  +
            self.integer = input.map(|v| v.into());
        2360  +
            self
        2361  +
        }
        2362  +
        #[allow(missing_docs)] // documentation missing in model
        2363  +
        pub fn long(mut self, input: ::std::option::Option<i64>) -> Self {
        2364  +
            self.long = input;
        2365  +
            self
        2366  +
        }
        2367  +
        #[allow(missing_docs)] // documentation missing in model
        2368  +
        pub(crate) fn set_long(mut self, input: Option<impl ::std::convert::Into<i64>>) -> Self {
        2369  +
            self.long = input.map(|v| v.into());
        2370  +
            self
        2371  +
        }
        2372  +
        #[allow(missing_docs)] // documentation missing in model
        2373  +
        pub fn float(mut self, input: ::std::option::Option<f32>) -> Self {
        2374  +
            self.float = input;
        2375  +
            self
        2376  +
        }
        2377  +
        #[allow(missing_docs)] // documentation missing in model
        2378  +
        pub(crate) fn set_float(mut self, input: Option<impl ::std::convert::Into<f32>>) -> Self {
        2379  +
            self.float = input.map(|v| v.into());
        2380  +
            self
        2381  +
        }
        2382  +
        #[allow(missing_docs)] // documentation missing in model
        2383  +
        pub fn double(mut self, input: ::std::option::Option<f64>) -> Self {
        2384  +
            self.double = input;
        2385  +
            self
        2386  +
        }
        2387  +
        #[allow(missing_docs)] // documentation missing in model
        2388  +
        pub(crate) fn set_double(mut self, input: Option<impl ::std::convert::Into<f64>>) -> Self {
        2389  +
            self.double = input.map(|v| v.into());
        2390  +
            self
        2391  +
        }
        2392  +
        #[allow(missing_docs)] // documentation missing in model
        2393  +
        pub fn timestamp(
        2394  +
            mut self,
        2395  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
        2396  +
        ) -> Self {
        2397  +
            self.timestamp = input;
        2398  +
            self
        2399  +
        }
        2400  +
        #[allow(missing_docs)] // documentation missing in model
        2401  +
        pub(crate) fn set_timestamp(
        2402  +
            mut self,
        2403  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
        2404  +
        ) -> Self {
        2405  +
            self.timestamp = input.map(|v| v.into());
        2406  +
            self
        2407  +
        }
        2408  +
        #[allow(missing_docs)] // documentation missing in model
        2409  +
        pub fn r#enum(mut self, input: ::std::option::Option<crate::model::Suit>) -> Self {
        2410  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
        2411  +
            self
        2412  +
        }
        2413  +
        #[allow(missing_docs)] // documentation missing in model
        2414  +
        pub(crate) fn set_enum(
        2415  +
            mut self,
        2416  +
            input: Option<
        2417  +
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        2418  +
            >,
        2419  +
        ) -> Self {
        2420  +
            self.r#enum = input.map(|v| v.into());
        2421  +
            self
        2422  +
        }
        2423  +
        #[allow(missing_docs)] // documentation missing in model
        2424  +
        pub fn required_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        2425  +
            self.required_blob = Some(input);
        2426  +
            self
        2427  +
        }
        2428  +
        #[allow(missing_docs)] // documentation missing in model
        2429  +
        pub(crate) fn set_required_blob(
        2430  +
            mut self,
        2431  +
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
        2432  +
        ) -> Self {
        2433  +
            self.required_blob = Some(input.into());
        2434  +
            self
        2435  +
        }
        2436  +
        #[allow(missing_docs)] // documentation missing in model
        2437  +
        pub fn required_boolean(mut self, input: bool) -> Self {
        2438  +
            self.required_boolean = Some(input);
        2439  +
            self
        2440  +
        }
        2441  +
        #[allow(missing_docs)] // documentation missing in model
        2442  +
        pub(crate) fn set_required_boolean(
        2443  +
            mut self,
        2444  +
            input: impl ::std::convert::Into<bool>,
        2445  +
        ) -> Self {
        2446  +
            self.required_boolean = Some(input.into());
        2447  +
            self
        2448  +
        }
        2449  +
        #[allow(missing_docs)] // documentation missing in model
        2450  +
        pub fn required_string(mut self, input: ::std::string::String) -> Self {
        2451  +
            self.required_string = Some(input);
        2452  +
            self
        2453  +
        }
        2454  +
        #[allow(missing_docs)] // documentation missing in model
        2455  +
        pub(crate) fn set_required_string(
        2456  +
            mut self,
        2457  +
            input: impl ::std::convert::Into<::std::string::String>,
        2458  +
        ) -> Self {
        2459  +
            self.required_string = Some(input.into());
        2460  +
            self
        2461  +
        }
        2462  +
        #[allow(missing_docs)] // documentation missing in model
        2463  +
        pub fn required_byte(mut self, input: i8) -> Self {
        2464  +
            self.required_byte = Some(input);
        2465  +
            self
        2466  +
        }
        2467  +
        #[allow(missing_docs)] // documentation missing in model
        2468  +
        pub(crate) fn set_required_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        2469  +
            self.required_byte = Some(input.into());
        2470  +
            self
        2471  +
        }
        2472  +
        #[allow(missing_docs)] // documentation missing in model
        2473  +
        pub fn required_short(mut self, input: i16) -> Self {
        2474  +
            self.required_short = Some(input);
        2475  +
            self
        2476  +
        }
        2477  +
        #[allow(missing_docs)] // documentation missing in model
        2478  +
        pub(crate) fn set_required_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        2479  +
            self.required_short = Some(input.into());
        2480  +
            self
        2481  +
        }
        2482  +
        #[allow(missing_docs)] // documentation missing in model
        2483  +
        pub fn required_integer(mut self, input: i32) -> Self {
        2484  +
            self.required_integer = Some(input);
        2485  +
            self
        2486  +
        }
        2487  +
        #[allow(missing_docs)] // documentation missing in model
        2488  +
        pub(crate) fn set_required_integer(
        2489  +
            mut self,
        2490  +
            input: impl ::std::convert::Into<i32>,
        2491  +
        ) -> Self {
        2492  +
            self.required_integer = Some(input.into());
        2493  +
            self
        2494  +
        }
        2495  +
        #[allow(missing_docs)] // documentation missing in model
        2496  +
        pub fn required_long(mut self, input: i64) -> Self {
        2497  +
            self.required_long = Some(input);
        2498  +
            self
        2499  +
        }
        2500  +
        #[allow(missing_docs)] // documentation missing in model
        2501  +
        pub(crate) fn set_required_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        2502  +
            self.required_long = Some(input.into());
        2503  +
            self
        2504  +
        }
        2505  +
        #[allow(missing_docs)] // documentation missing in model
        2506  +
        pub fn required_float(mut self, input: f32) -> Self {
        2507  +
            self.required_float = Some(input);
        2508  +
            self
        2509  +
        }
        2510  +
        #[allow(missing_docs)] // documentation missing in model
        2511  +
        pub(crate) fn set_required_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        2512  +
            self.required_float = Some(input.into());
        2513  +
            self
        2514  +
        }
        2515  +
        #[allow(missing_docs)] // documentation missing in model
        2516  +
        pub fn required_double(mut self, input: f64) -> Self {
        2517  +
            self.required_double = Some(input);
        2518  +
            self
        2519  +
        }
        2520  +
        #[allow(missing_docs)] // documentation missing in model
        2521  +
        pub(crate) fn set_required_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
        2522  +
            self.required_double = Some(input.into());
        2523  +
            self
        2524  +
        }
        2525  +
        #[allow(missing_docs)] // documentation missing in model
        2526  +
        pub fn required_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        2527  +
            self.required_timestamp = Some(input);
        2528  +
            self
        2529  +
        }
        2530  +
        #[allow(missing_docs)] // documentation missing in model
        2531  +
        pub(crate) fn set_required_timestamp(
        2532  +
            mut self,
        2533  +
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
        2534  +
        ) -> Self {
        2535  +
            self.required_timestamp = Some(input.into());
        2536  +
            self
        2537  +
        }
        2538  +
        #[allow(missing_docs)] // documentation missing in model
        2539  +
        pub fn required_enum(mut self, input: crate::model::Suit) -> Self {
        2540  +
            self.required_enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
        2541  +
            self
        2542  +
        }
        2543  +
        #[allow(missing_docs)] // documentation missing in model
        2544  +
        pub(crate) fn set_required_enum(
        2545  +
            mut self,
        2546  +
            input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Suit>>,
        2547  +
        ) -> Self {
        2548  +
            self.required_enum = Some(input.into());
        2549  +
            self
        2550  +
        }
        2551  +
        /// Consumes the builder and constructs a [`SimpleStructOperationInput`](crate::input::SimpleStructOperationInput).
        2552  +
        ///
        2553  +
        /// The builder fails to construct a [`SimpleStructOperationInput`](crate::input::SimpleStructOperationInput) if a [`ConstraintViolation`] occurs.
        2554  +
        ///
        2555  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        2556  +
        pub fn build(
        2557  +
            self,
        2558  +
        ) -> Result<crate::input::SimpleStructOperationInput, ConstraintViolation> {
        2559  +
            self.build_enforcing_all_constraints()
        2560  +
        }
        2561  +
        fn build_enforcing_all_constraints(
        2562  +
            self,
        2563  +
        ) -> Result<crate::input::SimpleStructOperationInput, ConstraintViolation> {
        2564  +
            Ok(crate::input::SimpleStructOperationInput {
        2565  +
                blob: self.blob,
        2566  +
                boolean: self.boolean,
        2567  +
                string: self.string,
        2568  +
                byte: self.byte,
        2569  +
                short: self.short,
        2570  +
                integer: self.integer,
        2571  +
                long: self.long,
        2572  +
                float: self.float,
        2573  +
                double: self.double,
        2574  +
                timestamp: self.timestamp,
        2575  +
                r#enum: self
        2576  +
                    .r#enum
        2577  +
                    .map(|v| match v {
        2578  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        2579  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        2580  +
                    })
        2581  +
                    .map(|res| res.map_err(ConstraintViolation::Enum))
        2582  +
                    .transpose()?,
        2583  +
                required_blob: self
        2584  +
                    .required_blob
        2585  +
                    .ok_or(ConstraintViolation::MissingRequiredBlob)?,
        2586  +
                required_boolean: self
        2587  +
                    .required_boolean
        2588  +
                    .ok_or(ConstraintViolation::MissingRequiredBoolean)?,
        2589  +
                required_string: self
        2590  +
                    .required_string
        2591  +
                    .ok_or(ConstraintViolation::MissingRequiredString)?,
        2592  +
                required_byte: self
        2593  +
                    .required_byte
        2594  +
                    .ok_or(ConstraintViolation::MissingRequiredByte)?,
        2595  +
                required_short: self
        2596  +
                    .required_short
        2597  +
                    .ok_or(ConstraintViolation::MissingRequiredShort)?,
        2598  +
                required_integer: self
        2599  +
                    .required_integer
        2600  +
                    .ok_or(ConstraintViolation::MissingRequiredInteger)?,
        2601  +
                required_long: self
        2602  +
                    .required_long
        2603  +
                    .ok_or(ConstraintViolation::MissingRequiredLong)?,
        2604  +
                required_float: self
        2605  +
                    .required_float
        2606  +
                    .ok_or(ConstraintViolation::MissingRequiredFloat)?,
        2607  +
                required_double: self
        2608  +
                    .required_double
        2609  +
                    .ok_or(ConstraintViolation::MissingRequiredDouble)?,
        2610  +
                required_timestamp: self
        2611  +
                    .required_timestamp
        2612  +
                    .ok_or(ConstraintViolation::MissingRequiredTimestamp)?,
        2613  +
                required_enum: self
        2614  +
                    .required_enum
        2615  +
                    .map(|v| match v {
        2616  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        2617  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        2618  +
                    })
        2619  +
                    .map(|res| res.map_err(ConstraintViolation::RequiredEnum))
        2620  +
                    .transpose()?
        2621  +
                    .ok_or(ConstraintViolation::MissingRequiredEnum)?,
        2622  +
            })
        2623  +
        }
        2624  +
    }
        2625  +
}