Server Test Python

Server Test Python

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

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

@@ -1,1 +482,528 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
pub struct QueryIncompatibleOperation;
    4      4   
    5         -
impl ::aws_smithy_http_server::operation::OperationShape for QueryIncompatibleOperation {
    6         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
           5  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for QueryIncompatibleOperation {
           6  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           7  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
    8      8   
            "aws.protocoltests.json10#QueryIncompatibleOperation",
    9      9   
            "aws.protocoltests.json10",
   10     10   
            "QueryIncompatibleOperation",
   11     11   
        );
   12     12   
   13     13   
    type Input = crate::input::QueryIncompatibleOperationInput;
   14     14   
    type Output = crate::output::QueryIncompatibleOperationOutput;
   15     15   
    type Error = crate::error::QueryIncompatibleOperationError;
   16     16   
}
   17     17   
   18         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          18  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   19     19   
    for QueryIncompatibleOperation
   20     20   
{
   21         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   22         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          21  +
    type RequestFmt =
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          23  +
    type ResponseFmt =
          24  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   23     25   
   24     26   
    fn request_fmt() -> Self::RequestFmt {
   25         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          27  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   26     28   
    }
   27     29   
   28     30   
    fn response_fmt() -> Self::ResponseFmt {
   29         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          31  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   30     32   
    }
   31     33   
}
   32     34   
   33     35   
#[allow(missing_docs)] // documentation missing in model
   34     36   
pub struct OperationWithRequiredMembersWithDefaults;
   35     37   
   36         -
impl ::aws_smithy_http_server::operation::OperationShape
          38  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape
   37     39   
    for OperationWithRequiredMembersWithDefaults
   38     40   
{
   39         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   40         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          41  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          42  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   41     43   
            "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaults",
   42     44   
            "aws.protocoltests.json10",
   43     45   
            "OperationWithRequiredMembersWithDefaults",
   44     46   
        );
   45     47   
   46     48   
    type Input = crate::input::OperationWithRequiredMembersWithDefaultsInput;
   47     49   
    type Output = crate::output::OperationWithRequiredMembersWithDefaultsOutput;
   48     50   
    type Error = crate::error::OperationWithRequiredMembersWithDefaultsError;
   49     51   
}
   50     52   
   51         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          53  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   52     54   
    for OperationWithRequiredMembersWithDefaults
   53     55   
{
   54         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   55         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          56  +
    type RequestFmt =
          57  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          58  +
    type ResponseFmt =
          59  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   56     60   
   57     61   
    fn request_fmt() -> Self::RequestFmt {
   58         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          62  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   59     63   
    }
   60     64   
   61     65   
    fn response_fmt() -> Self::ResponseFmt {
   62         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          66  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   63     67   
    }
   64     68   
}
   65     69   
   66     70   
#[allow(missing_docs)] // documentation missing in model
   67     71   
pub struct OperationWithNestedStructure;
   68     72   
   69         -
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithNestedStructure {
   70         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   71         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          73  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for OperationWithNestedStructure {
          74  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          75  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   72     76   
            "aws.protocoltests.json10#OperationWithNestedStructure",
   73     77   
            "aws.protocoltests.json10",
   74     78   
            "OperationWithNestedStructure",
   75     79   
        );
   76     80   
   77     81   
    type Input = crate::input::OperationWithNestedStructureInput;
   78     82   
    type Output = crate::output::OperationWithNestedStructureOutput;
   79     83   
    type Error = crate::error::OperationWithNestedStructureError;
   80     84   
}
   81     85   
   82         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          86  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   83     87   
    for OperationWithNestedStructure
   84     88   
{
   85         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   86         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          89  +
    type RequestFmt =
          90  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          91  +
    type ResponseFmt =
          92  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   87     93   
   88     94   
    fn request_fmt() -> Self::RequestFmt {
   89         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          95  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   90     96   
    }
   91     97   
   92     98   
    fn response_fmt() -> Self::ResponseFmt {
   93         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          99  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   94    100   
    }
   95    101   
}
   96    102   
   97    103   
#[allow(missing_docs)] // documentation missing in model
   98    104   
pub struct OperationWithRequiredMembers;
   99    105   
  100         -
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithRequiredMembers {
  101         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  102         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         106  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for OperationWithRequiredMembers {
         107  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         108  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  103    109   
            "aws.protocoltests.json10#OperationWithRequiredMembers",
  104    110   
            "aws.protocoltests.json10",
  105    111   
            "OperationWithRequiredMembers",
  106    112   
        );
  107    113   
  108    114   
    type Input = crate::input::OperationWithRequiredMembersInput;
  109    115   
    type Output = crate::output::OperationWithRequiredMembersOutput;
  110    116   
    type Error = crate::error::OperationWithRequiredMembersError;
  111    117   
}
  112    118   
  113         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         119  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  114    120   
    for OperationWithRequiredMembers
  115    121   
{
  116         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  117         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         122  +
    type RequestFmt =
         123  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         124  +
    type ResponseFmt =
         125  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  118    126   
  119    127   
    fn request_fmt() -> Self::RequestFmt {
  120         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         128  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  121    129   
    }
  122    130   
  123    131   
    fn response_fmt() -> Self::ResponseFmt {
  124         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         132  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  125    133   
    }
  126    134   
}
  127    135   
  128    136   
#[allow(missing_docs)] // documentation missing in model
  129    137   
pub struct OperationWithDefaults;
  130    138   
  131         -
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithDefaults {
  132         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  133         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         139  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for OperationWithDefaults {
         140  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         141  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  134    142   
            "aws.protocoltests.json10#OperationWithDefaults",
  135    143   
            "aws.protocoltests.json10",
  136    144   
            "OperationWithDefaults",
  137    145   
        );
  138    146   
  139    147   
    type Input = crate::input::OperationWithDefaultsInput;
  140    148   
    type Output = crate::output::OperationWithDefaultsOutput;
  141    149   
    type Error = crate::error::OperationWithDefaultsError;
  142    150   
}
  143    151   
  144         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for OperationWithDefaults {
  145         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  146         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         152  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         153  +
    for OperationWithDefaults
         154  +
{
         155  +
    type RequestFmt =
         156  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         157  +
    type ResponseFmt =
         158  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  147    159   
  148    160   
    fn request_fmt() -> Self::RequestFmt {
  149         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         161  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  150    162   
    }
  151    163   
  152    164   
    fn response_fmt() -> Self::ResponseFmt {
  153         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         165  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  154    166   
    }
  155    167   
}
  156    168   
  157    169   
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
  158    170   
pub struct ContentTypeParameters;
  159    171   
  160         -
impl ::aws_smithy_http_server::operation::OperationShape for ContentTypeParameters {
  161         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  162         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         172  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ContentTypeParameters {
         173  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         174  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  163    175   
            "aws.protocoltests.json10#ContentTypeParameters",
  164    176   
            "aws.protocoltests.json10",
  165    177   
            "ContentTypeParameters",
  166    178   
        );
  167    179   
  168    180   
    type Input = crate::input::ContentTypeParametersInput;
  169    181   
    type Output = crate::output::ContentTypeParametersOutput;
  170    182   
    type Error = crate::error::ContentTypeParametersError;
  171    183   
}
  172    184   
  173         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ContentTypeParameters {
  174         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  175         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         185  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         186  +
    for ContentTypeParameters
         187  +
{
         188  +
    type RequestFmt =
         189  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         190  +
    type ResponseFmt =
         191  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  176    192   
  177    193   
    fn request_fmt() -> Self::RequestFmt {
  178         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         194  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  179    195   
    }
  180    196   
  181    197   
    fn response_fmt() -> Self::ResponseFmt {
  182         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         198  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  183    199   
    }
  184    200   
}
  185    201   
  186    202   
#[allow(missing_docs)] // documentation missing in model
  187    203   
pub struct PutWithContentEncoding;
  188    204   
  189         -
impl ::aws_smithy_http_server::operation::OperationShape for PutWithContentEncoding {
  190         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  191         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         205  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for PutWithContentEncoding {
         206  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         207  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  192    208   
            "aws.protocoltests.json10#PutWithContentEncoding",
  193    209   
            "aws.protocoltests.json10",
  194    210   
            "PutWithContentEncoding",
  195    211   
        );
  196    212   
  197    213   
    type Input = crate::input::PutWithContentEncodingInput;
  198    214   
    type Output = crate::output::PutWithContentEncodingOutput;
  199    215   
    type Error = crate::error::PutWithContentEncodingError;
  200    216   
}
  201    217   
  202         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         218  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  203    219   
    for PutWithContentEncoding
  204    220   
{
  205         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  206         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         221  +
    type RequestFmt =
         222  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         223  +
    type ResponseFmt =
         224  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  207    225   
  208    226   
    fn request_fmt() -> Self::RequestFmt {
  209         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         227  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  210    228   
    }
  211    229   
  212    230   
    fn response_fmt() -> Self::ResponseFmt {
  213         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         231  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  214    232   
    }
  215    233   
}
  216    234   
  217    235   
#[allow(missing_docs)] // documentation missing in model
  218    236   
pub struct HostWithPathOperation;
  219    237   
  220         -
impl ::aws_smithy_http_server::operation::OperationShape for HostWithPathOperation {
  221         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  222         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         238  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for HostWithPathOperation {
         239  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         240  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  223    241   
            "aws.protocoltests.json10#HostWithPathOperation",
  224    242   
            "aws.protocoltests.json10",
  225    243   
            "HostWithPathOperation",
  226    244   
        );
  227    245   
  228    246   
    type Input = crate::input::HostWithPathOperationInput;
  229    247   
    type Output = crate::output::HostWithPathOperationOutput;
  230    248   
    type Error = crate::error::HostWithPathOperationError;
  231    249   
}
  232    250   
  233         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for HostWithPathOperation {
  234         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  235         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         251  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         252  +
    for HostWithPathOperation
         253  +
{
         254  +
    type RequestFmt =
         255  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         256  +
    type ResponseFmt =
         257  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  236    258   
  237    259   
    fn request_fmt() -> Self::RequestFmt {
  238         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         260  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  239    261   
    }
  240    262   
  241    263   
    fn response_fmt() -> Self::ResponseFmt {
  242         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         264  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  243    265   
    }
  244    266   
}
  245    267   
  246    268   
#[allow(missing_docs)] // documentation missing in model
  247    269   
pub struct EndpointWithHostLabelOperation;
  248    270   
  249         -
impl ::aws_smithy_http_server::operation::OperationShape for EndpointWithHostLabelOperation {
  250         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  251         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         271  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EndpointWithHostLabelOperation {
         272  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         273  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  252    274   
            "aws.protocoltests.json10#EndpointWithHostLabelOperation",
  253    275   
            "aws.protocoltests.json10",
  254    276   
            "EndpointWithHostLabelOperation",
  255    277   
        );
  256    278   
  257    279   
    type Input = crate::input::EndpointWithHostLabelOperationInput;
  258    280   
    type Output = crate::output::EndpointWithHostLabelOperationOutput;
  259    281   
    type Error = crate::error::EndpointWithHostLabelOperationError;
  260    282   
}
  261    283   
  262         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         284  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  263    285   
    for EndpointWithHostLabelOperation
  264    286   
{
  265         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  266         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         287  +
    type RequestFmt =
         288  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         289  +
    type ResponseFmt =
         290  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  267    291   
  268    292   
    fn request_fmt() -> Self::RequestFmt {
  269         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         293  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  270    294   
    }
  271    295   
  272    296   
    fn response_fmt() -> Self::ResponseFmt {
  273         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         297  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  274    298   
    }
  275    299   
}
  276    300   
  277    301   
#[allow(missing_docs)] // documentation missing in model
  278    302   
pub struct EndpointOperation;
  279    303   
  280         -
impl ::aws_smithy_http_server::operation::OperationShape for EndpointOperation {
  281         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  282         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         304  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EndpointOperation {
         305  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         306  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  283    307   
            "aws.protocoltests.json10#EndpointOperation",
  284    308   
            "aws.protocoltests.json10",
  285    309   
            "EndpointOperation",
  286    310   
        );
  287    311   
  288    312   
    type Input = crate::input::EndpointOperationInput;
  289    313   
    type Output = crate::output::EndpointOperationOutput;
  290    314   
    type Error = crate::error::EndpointOperationError;
  291    315   
}
  292    316   
  293         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EndpointOperation {
  294         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  295         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         317  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         318  +
    for EndpointOperation
         319  +
{
         320  +
    type RequestFmt =
         321  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         322  +
    type ResponseFmt =
         323  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  296    324   
  297    325   
    fn request_fmt() -> Self::RequestFmt {
  298         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         326  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  299    327   
    }
  300    328   
  301    329   
    fn response_fmt() -> Self::ResponseFmt {
  302         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         330  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  303    331   
    }
  304    332   
}
  305    333   
  306    334   
/// This operation uses unions for inputs and outputs.
  307    335   
pub struct JsonUnions;
  308    336   
  309         -
impl ::aws_smithy_http_server::operation::OperationShape for JsonUnions {
  310         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  311         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         337  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for JsonUnions {
         338  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         339  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  312    340   
            "aws.protocoltests.json10#JsonUnions",
  313    341   
            "aws.protocoltests.json10",
  314    342   
            "JsonUnions",
  315    343   
        );
  316    344   
  317    345   
    type Input = crate::input::JsonUnionsInput;
  318    346   
    type Output = crate::output::JsonUnionsOutput;
  319    347   
    type Error = crate::error::JsonUnionsError;
  320    348   
}
  321    349   
  322         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for JsonUnions {
  323         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  324         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         350  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for JsonUnions {
         351  +
    type RequestFmt =
         352  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         353  +
    type ResponseFmt =
         354  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  325    355   
  326    356   
    fn request_fmt() -> Self::RequestFmt {
  327         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         357  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  328    358   
    }
  329    359   
  330    360   
    fn response_fmt() -> Self::ResponseFmt {
  331         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         361  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  332    362   
    }
  333    363   
}
  334    364   
  335    365   
/// This operation has three possible return values: 1. A successful response in the form of GreetingWithErrorsOutput 2. An InvalidGreeting error. 3. A ComplexError error. Implementations must be able to successfully take a response and properly deserialize successful and error responses.
  336    366   
pub struct GreetingWithErrors;
  337    367   
  338         -
impl ::aws_smithy_http_server::operation::OperationShape for GreetingWithErrors {
  339         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  340         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         368  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GreetingWithErrors {
         369  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         370  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  341    371   
            "aws.protocoltests.json10#GreetingWithErrors",
  342    372   
            "aws.protocoltests.json10",
  343    373   
            "GreetingWithErrors",
  344    374   
        );
  345    375   
  346    376   
    type Input = crate::input::GreetingWithErrorsInput;
  347    377   
    type Output = crate::output::GreetingWithErrorsOutput;
  348    378   
    type Error = crate::error::GreetingWithErrorsError;
  349    379   
}
  350    380   
  351         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GreetingWithErrors {
  352         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  353         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         381  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         382  +
    for GreetingWithErrors
         383  +
{
         384  +
    type RequestFmt =
         385  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         386  +
    type ResponseFmt =
         387  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  354    388   
  355    389   
    fn request_fmt() -> Self::RequestFmt {
  356         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         390  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  357    391   
    }
  358    392   
  359    393   
    fn response_fmt() -> Self::ResponseFmt {
  360         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         394  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  361    395   
    }
  362    396   
}
  363    397   
  364    398   
#[allow(missing_docs)] // documentation missing in model
  365    399   
pub struct SimpleScalarProperties;
  366    400   
  367         -
impl ::aws_smithy_http_server::operation::OperationShape for SimpleScalarProperties {
  368         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  369         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         401  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for SimpleScalarProperties {
         402  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         403  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  370    404   
            "aws.protocoltests.json10#SimpleScalarProperties",
  371    405   
            "aws.protocoltests.json10",
  372    406   
            "SimpleScalarProperties",
  373    407   
        );
  374    408   
  375    409   
    type Input = crate::input::SimpleScalarPropertiesInput;
  376    410   
    type Output = crate::output::SimpleScalarPropertiesOutput;
  377    411   
    type Error = crate::error::SimpleScalarPropertiesError;
  378    412   
}
  379    413   
  380         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         414  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  381    415   
    for SimpleScalarProperties
  382    416   
{
  383         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  384         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         417  +
    type RequestFmt =
         418  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         419  +
    type ResponseFmt =
         420  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  385    421   
  386    422   
    fn request_fmt() -> Self::RequestFmt {
  387         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         423  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  388    424   
    }
  389    425   
  390    426   
    fn response_fmt() -> Self::ResponseFmt {
  391         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         427  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  392    428   
    }
  393    429   
}
  394    430   
  395    431   
/// The example tests how requests and responses are serialized when there's no request or response payload because the operation has an empty input and empty output structure that reuses the same shape. While this should be rare, code generators must support this.
  396    432   
pub struct EmptyInputAndEmptyOutput;
  397    433   
  398         -
impl ::aws_smithy_http_server::operation::OperationShape for EmptyInputAndEmptyOutput {
  399         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  400         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         434  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for EmptyInputAndEmptyOutput {
         435  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         436  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  401    437   
            "aws.protocoltests.json10#EmptyInputAndEmptyOutput",
  402    438   
            "aws.protocoltests.json10",
  403    439   
            "EmptyInputAndEmptyOutput",
  404    440   
        );
  405    441   
  406    442   
    type Input = crate::input::EmptyInputAndEmptyOutputInput;
  407    443   
    type Output = crate::output::EmptyInputAndEmptyOutputOutput;
  408    444   
    type Error = crate::error::EmptyInputAndEmptyOutputError;
  409    445   
}
  410    446   
  411         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         447  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  412    448   
    for EmptyInputAndEmptyOutput
  413    449   
{
  414         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  415         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         450  +
    type RequestFmt =
         451  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         452  +
    type ResponseFmt =
         453  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  416    454   
  417    455   
    fn request_fmt() -> Self::RequestFmt {
  418         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         456  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  419    457   
    }
  420    458   
  421    459   
    fn response_fmt() -> Self::ResponseFmt {
  422         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         460  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  423    461   
    }
  424    462   
}
  425    463   
  426    464   
/// The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.
  427    465   
pub struct NoInputAndOutput;
  428    466   
  429         -
impl ::aws_smithy_http_server::operation::OperationShape for NoInputAndOutput {
  430         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  431         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         467  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for NoInputAndOutput {
         468  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         469  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  432    470   
            "aws.protocoltests.json10#NoInputAndOutput",
  433    471   
            "aws.protocoltests.json10",
  434    472   
            "NoInputAndOutput",
  435    473   
        );
  436    474   
  437    475   
    type Input = crate::input::NoInputAndOutputInput;
  438    476   
    type Output = crate::output::NoInputAndOutputOutput;
  439    477   
    type Error = crate::error::NoInputAndOutputError;
  440    478   
}
  441    479   
  442         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for NoInputAndOutput {
  443         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  444         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         480  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         481  +
    for NoInputAndOutput
         482  +
{
         483  +
    type RequestFmt =
         484  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         485  +
    type ResponseFmt =
         486  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  445    487   
  446    488   
    fn request_fmt() -> Self::RequestFmt {
  447         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         489  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  448    490   
    }
  449    491   
  450    492   
    fn response_fmt() -> Self::ResponseFmt {
  451         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         493  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  452    494   
    }
  453    495   
}
  454    496   
  455    497   
/// The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.
  456    498   
pub struct NoInputAndNoOutput;
  457    499   
  458         -
impl ::aws_smithy_http_server::operation::OperationShape for NoInputAndNoOutput {
  459         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  460         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         500  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for NoInputAndNoOutput {
         501  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         502  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  461    503   
            "aws.protocoltests.json10#NoInputAndNoOutput",
  462    504   
            "aws.protocoltests.json10",
  463    505   
            "NoInputAndNoOutput",
  464    506   
        );
  465    507   
  466    508   
    type Input = crate::input::NoInputAndNoOutputInput;
  467    509   
    type Output = crate::output::NoInputAndNoOutputOutput;
  468    510   
    type Error = crate::error::NoInputAndNoOutputError;
  469    511   
}
  470    512   
  471         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for NoInputAndNoOutput {
  472         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
  473         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         513  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         514  +
    for NoInputAndNoOutput
         515  +
{
         516  +
    type RequestFmt =
         517  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         518  +
    type ResponseFmt =
         519  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
  474    520   
  475    521   
    fn request_fmt() -> Self::RequestFmt {
  476         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         522  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  477    523   
    }
  478    524   
  479    525   
    fn response_fmt() -> Self::ResponseFmt {
  480         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         526  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  481    527   
    }
  482    528   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_content_type_parameters.rs

@@ -1,1 +125,125 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_content_type_parameters_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::ContentTypeParametersInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::content_type_parameters_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.0"),
   27     27   
            )?;
   28     28   
            input =
   29     29   
                crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters(
   30     30   
                    bytes.as_ref(),
   31     31   
                    input,
   32     32   
                )?;
   33     33   
        }
   34     34   
        input.build()
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
#[allow(clippy::unnecessary_wraps)]
   39     39   
pub fn ser_content_type_parameters_http_response(
   40     40   
    #[allow(unused_variables)] output: crate::output::ContentTypeParametersOutput,
   41     41   
) -> std::result::Result<
   42         -
    ::aws_smithy_http_server::response::Response,
   43         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          42  +
    ::aws_smithy_legacy_http_server::response::Response,
          43  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   44     44   
> {
   45     45   
    Ok({
   46     46   
        #[allow(unused_mut)]
   47     47   
        let mut builder = ::http::Response::builder();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_TYPE,
   51     51   
            "application/x-amz-json-1.0",
   52     52   
        );
   53     53   
        let http_status: u16 = 200;
   54     54   
        builder = builder.status(http_status);
   55     55   
        let payload =
   56     56   
            crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
   57     57   
        ;
   58     58   
        let content_length = payload.len();
   59         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          59  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   60     60   
            builder,
   61     61   
            ::http::header::CONTENT_LENGTH,
   62     62   
            content_length,
   63     63   
        );
   64         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          64  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   65     65   
        builder.body(body)?
   66     66   
    })
   67     67   
}
   68     68   
   69     69   
#[allow(clippy::unnecessary_wraps)]
   70     70   
pub fn ser_content_type_parameters_http_error(
   71     71   
    error: &crate::error::ContentTypeParametersError,
   72     72   
) -> std::result::Result<
   73         -
    ::aws_smithy_http_server::response::Response,
   74         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          73  +
    ::aws_smithy_legacy_http_server::response::Response,
          74  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   75     75   
> {
   76     76   
    Ok({
   77     77   
        match error {
   78     78   
            crate::error::ContentTypeParametersError::InternalServerError(output) => {
   79     79   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   80     80   
                #[allow(unused_mut)]
   81     81   
                let mut builder = ::http::Response::builder();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_TYPE,
   85     85   
                    "application/x-amz-json-1.0",
   86     86   
                );
   87     87   
                let content_length = payload.len();
   88         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   89     89   
                    builder,
   90     90   
                    ::http::header::CONTENT_LENGTH,
   91     91   
                    content_length,
   92     92   
                );
   93     93   
                builder
   94     94   
                    .status(500)
   95         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          95  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   96     96   
            }
   97     97   
        }
   98     98   
    })
   99     99   
}
  100    100   
  101    101   
pub(crate) fn de_content_type_parameters(
  102    102   
    value: &[u8],
  103    103   
    mut builder: crate::input::content_type_parameters_input_internal::Builder,
  104    104   
) -> ::std::result::Result<
  105    105   
    crate::input::content_type_parameters_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_empty_input_and_empty_output.rs

@@ -1,1 +88,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_empty_input_and_empty_output_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EmptyInputAndEmptyOutputInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::empty_input_and_empty_output_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_empty_input_and_empty_output_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::EmptyInputAndEmptyOutputOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/x-amz-json-1.0",
   41     41   
        );
   42     42   
        let http_status: u16 = 200;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload =
   45     45   
            crate::protocol_serde::shape_empty_input_and_empty_output_output::ser_empty_input_and_empty_output_output_output_output(&output)?
   46     46   
        ;
   47     47   
        let content_length = payload.len();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_LENGTH,
   51     51   
            content_length,
   52     52   
        );
   53         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   54     54   
        builder.body(body)?
   55     55   
    })
   56     56   
}
   57     57   
   58     58   
#[allow(clippy::unnecessary_wraps)]
   59     59   
pub fn ser_empty_input_and_empty_output_http_error(
   60     60   
    error: &crate::error::EmptyInputAndEmptyOutputError,
   61     61   
) -> std::result::Result<
   62         -
    ::aws_smithy_http_server::response::Response,
   63         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          62  +
    ::aws_smithy_legacy_http_server::response::Response,
          63  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   64     64   
> {
   65     65   
    Ok({
   66     66   
        match error {
   67     67   
            crate::error::EmptyInputAndEmptyOutputError::InternalServerError(output) => {
   68     68   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   69     69   
                #[allow(unused_mut)]
   70     70   
                let mut builder = ::http::Response::builder();
   71         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          71  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   72     72   
                    builder,
   73     73   
                    ::http::header::CONTENT_TYPE,
   74     74   
                    "application/x-amz-json-1.0",
   75     75   
                );
   76     76   
                let content_length = payload.len();
   77         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          77  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   78     78   
                    builder,
   79     79   
                    ::http::header::CONTENT_LENGTH,
   80     80   
                    content_length,
   81     81   
                );
   82     82   
                builder
   83     83   
                    .status(500)
   84         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          84  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   85     85   
            }
   86     86   
        }
   87     87   
    })
   88     88   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_endpoint_operation.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_endpoint_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EndpointOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::endpoint_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_endpoint_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::EndpointOperationOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.0",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_endpoint_operation_http_error(
   57     57   
    error: &crate::error::EndpointOperationError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::EndpointOperationError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.0",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_endpoint_with_host_label_operation.rs

@@ -1,1 +139,139 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_endpoint_with_host_label_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::EndpointWithHostLabelOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::endpoint_with_host_label_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/x-amz-json-1.0"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_endpoint_with_host_label_operation::de_endpoint_with_host_label_operation(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_endpoint_with_host_label_operation_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::EndpointWithHostLabelOperationOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.0",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload = "";
   53     53   
        let content_length = payload.len();
   54         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          54  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   55     55   
            builder,
   56     56   
            ::http::header::CONTENT_LENGTH,
   57     57   
            content_length,
   58     58   
        );
   59         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          59  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   60     60   
        builder.body(body)?
   61     61   
    })
   62     62   
}
   63     63   
   64     64   
#[allow(clippy::unnecessary_wraps)]
   65     65   
pub fn ser_endpoint_with_host_label_operation_http_error(
   66     66   
    error: &crate::error::EndpointWithHostLabelOperationError,
   67     67   
) -> std::result::Result<
   68         -
    ::aws_smithy_http_server::response::Response,
   69         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          68  +
    ::aws_smithy_legacy_http_server::response::Response,
          69  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   70     70   
> {
   71     71   
    Ok({
   72     72   
        match error {
   73     73   
            crate::error::EndpointWithHostLabelOperationError::ValidationException(output) => {
   74     74   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   75     75   
                #[allow(unused_mut)]
   76     76   
                let mut builder = ::http::Response::builder();
   77         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          77  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   78     78   
                    builder,
   79     79   
                    ::http::header::CONTENT_TYPE,
   80     80   
                    "application/x-amz-json-1.0",
   81     81   
                );
   82     82   
                let content_length = payload.len();
   83         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   84     84   
                    builder,
   85     85   
                    ::http::header::CONTENT_LENGTH,
   86     86   
                    content_length,
   87     87   
                );
   88     88   
                builder
   89     89   
                    .status(400)
   90         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          90  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   91     91   
            }
   92     92   
            crate::error::EndpointWithHostLabelOperationError::InternalServerError(output) => {
   93     93   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   94     94   
                #[allow(unused_mut)]
   95     95   
                let mut builder = ::http::Response::builder();
   96         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          96  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   97     97   
                    builder,
   98     98   
                    ::http::header::CONTENT_TYPE,
   99     99   
                    "application/x-amz-json-1.0",
  100    100   
                );
  101    101   
                let content_length = payload.len();
  102         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         102  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  103    103   
                    builder,
  104    104   
                    ::http::header::CONTENT_LENGTH,
  105    105   
                    content_length,
  106    106   
                );
  107    107   
                builder
  108    108   
                    .status(500)
  109         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         109  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  110    110   
            }
  111    111   
        }
  112    112   
    })
  113    113   
}
  114    114   
  115    115   
pub(crate) fn de_endpoint_with_host_label_operation(
  116    116   
    value: &[u8],
  117    117   
    mut builder: crate::input::endpoint_with_host_label_operation_input_internal::Builder,
  118    118   
) -> ::std::result::Result<
  119    119   
    crate::input::endpoint_with_host_label_operation_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_greeting_with_errors.rs

@@ -1,1 +185,185 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_greeting_with_errors_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::GreetingWithErrorsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::greeting_with_errors_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.0"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors(
   29     29   
                bytes.as_ref(),
   30     30   
                input,
   31     31   
            )?;
   32     32   
        }
   33     33   
        input.build()
   34     34   
    })
   35     35   
}
   36     36   
   37     37   
#[allow(clippy::unnecessary_wraps)]
   38     38   
pub fn ser_greeting_with_errors_http_response(
   39     39   
    #[allow(unused_variables)] output: crate::output::GreetingWithErrorsOutput,
   40     40   
) -> std::result::Result<
   41         -
    ::aws_smithy_http_server::response::Response,
   42         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          41  +
    ::aws_smithy_legacy_http_server::response::Response,
          42  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   43     43   
> {
   44     44   
    Ok({
   45     45   
        #[allow(unused_mut)]
   46     46   
        let mut builder = ::http::Response::builder();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_TYPE,
   50     50   
            "application/x-amz-json-1.0",
   51     51   
        );
   52     52   
        let http_status: u16 = 200;
   53     53   
        builder = builder.status(http_status);
   54     54   
        let payload =
   55     55   
            crate::protocol_serde::shape_greeting_with_errors_output::ser_greeting_with_errors_output_output_output(&output)?
   56     56   
        ;
   57     57   
        let content_length = payload.len();
   58         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          58  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   59     59   
            builder,
   60     60   
            ::http::header::CONTENT_LENGTH,
   61     61   
            content_length,
   62     62   
        );
   63         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          63  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   64     64   
        builder.body(body)?
   65     65   
    })
   66     66   
}
   67     67   
   68     68   
#[allow(clippy::unnecessary_wraps)]
   69     69   
pub fn ser_greeting_with_errors_http_error(
   70     70   
    error: &crate::error::GreetingWithErrorsError,
   71     71   
) -> std::result::Result<
   72         -
    ::aws_smithy_http_server::response::Response,
   73         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          72  +
    ::aws_smithy_legacy_http_server::response::Response,
          73  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   74     74   
> {
   75     75   
    Ok({
   76     76   
        match error {
   77     77   
            crate::error::GreetingWithErrorsError::InvalidGreeting(output) => {
   78     78   
                let payload =
   79     79   
                    crate::protocol_serde::shape_invalid_greeting::ser_invalid_greeting_error(
   80     80   
                        output,
   81     81   
                    )?;
   82     82   
                #[allow(unused_mut)]
   83     83   
                let mut builder = ::http::Response::builder();
   84         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          84  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   85     85   
                    builder,
   86     86   
                    ::http::header::CONTENT_TYPE,
   87     87   
                    "application/x-amz-json-1.0",
   88     88   
                );
   89     89   
                let content_length = payload.len();
   90         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   91     91   
                    builder,
   92     92   
                    ::http::header::CONTENT_LENGTH,
   93     93   
                    content_length,
   94     94   
                );
   95     95   
                builder
   96     96   
                    .status(400)
   97         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          97  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   98     98   
            }
   99     99   
            crate::error::GreetingWithErrorsError::ComplexError(output) => {
  100    100   
                let payload =
  101    101   
                    crate::protocol_serde::shape_complex_error::ser_complex_error_error(output)?;
  102    102   
                #[allow(unused_mut)]
  103    103   
                let mut builder = ::http::Response::builder();
  104         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         104  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  105    105   
                    builder,
  106    106   
                    ::http::header::CONTENT_TYPE,
  107    107   
                    "application/x-amz-json-1.0",
  108    108   
                );
  109    109   
                let content_length = payload.len();
  110         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         110  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  111    111   
                    builder,
  112    112   
                    ::http::header::CONTENT_LENGTH,
  113    113   
                    content_length,
  114    114   
                );
  115    115   
                builder
  116    116   
                    .status(400)
  117         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         117  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  118    118   
            }
  119    119   
            crate::error::GreetingWithErrorsError::FooError(output) => {
  120    120   
                let payload = crate::protocol_serde::shape_foo_error::ser_foo_error_error(output)?;
  121    121   
                #[allow(unused_mut)]
  122    122   
                let mut builder = ::http::Response::builder();
  123         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         123  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  124    124   
                    builder,
  125    125   
                    ::http::header::CONTENT_TYPE,
  126    126   
                    "application/x-amz-json-1.0",
  127    127   
                );
  128    128   
                let content_length = payload.len();
  129         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         129  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  130    130   
                    builder,
  131    131   
                    ::http::header::CONTENT_LENGTH,
  132    132   
                    content_length,
  133    133   
                );
  134    134   
                builder
  135    135   
                    .status(500)
  136         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         136  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  137    137   
            }
  138    138   
            crate::error::GreetingWithErrorsError::InternalServerError(output) => {
  139    139   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
  140    140   
                #[allow(unused_mut)]
  141    141   
                let mut builder = ::http::Response::builder();
  142         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         142  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  143    143   
                    builder,
  144    144   
                    ::http::header::CONTENT_TYPE,
  145    145   
                    "application/x-amz-json-1.0",
  146    146   
                );
  147    147   
                let content_length = payload.len();
  148         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         148  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  149    149   
                    builder,
  150    150   
                    ::http::header::CONTENT_LENGTH,
  151    151   
                    content_length,
  152    152   
                );
  153    153   
                builder
  154    154   
                    .status(500)
  155         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         155  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  156    156   
            }
  157    157   
        }
  158    158   
    })
  159    159   
}
  160    160   
  161    161   
pub(crate) fn de_greeting_with_errors(
  162    162   
    value: &[u8],
  163    163   
    mut builder: crate::input::greeting_with_errors_input_internal::Builder,
  164    164   
) -> ::std::result::Result<
  165    165   
    crate::input::greeting_with_errors_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_host_with_path_operation.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_host_with_path_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::HostWithPathOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::host_with_path_operation_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_host_with_path_operation_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::HostWithPathOperationOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.0",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_host_with_path_operation_http_error(
   57     57   
    error: &crate::error::HostWithPathOperationError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::HostWithPathOperationError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.0",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_json_unions.rs

@@ -1,1 +142,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_json_unions_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::JsonUnionsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::json_unions_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.0"),
   27     27   
            )?;
   28     28   
            input =
   29     29   
                crate::protocol_serde::shape_json_unions::de_json_unions(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_json_unions_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::JsonUnionsOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.0",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_json_unions_output::ser_json_unions_output_output_output(
   54     54   
                &output,
   55     55   
            )?;
   56     56   
        let content_length = payload.len();
   57         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          57  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   58     58   
            builder,
   59     59   
            ::http::header::CONTENT_LENGTH,
   60     60   
            content_length,
   61     61   
        );
   62         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          62  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   63     63   
        builder.body(body)?
   64     64   
    })
   65     65   
}
   66     66   
   67     67   
#[allow(clippy::unnecessary_wraps)]
   68     68   
pub fn ser_json_unions_http_error(
   69     69   
    error: &crate::error::JsonUnionsError,
   70     70   
) -> std::result::Result<
   71         -
    ::aws_smithy_http_server::response::Response,
   72         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          71  +
    ::aws_smithy_legacy_http_server::response::Response,
          72  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   73     73   
> {
   74     74   
    Ok({
   75     75   
        match error {
   76     76   
            crate::error::JsonUnionsError::ValidationException(output) => {
   77     77   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   78     78   
                #[allow(unused_mut)]
   79     79   
                let mut builder = ::http::Response::builder();
   80         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          80  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   81     81   
                    builder,
   82     82   
                    ::http::header::CONTENT_TYPE,
   83     83   
                    "application/x-amz-json-1.0",
   84     84   
                );
   85     85   
                let content_length = payload.len();
   86         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          86  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   87     87   
                    builder,
   88     88   
                    ::http::header::CONTENT_LENGTH,
   89     89   
                    content_length,
   90     90   
                );
   91     91   
                builder
   92     92   
                    .status(400)
   93         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          93  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   94     94   
            }
   95     95   
            crate::error::JsonUnionsError::InternalServerError(output) => {
   96     96   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   97     97   
                #[allow(unused_mut)]
   98     98   
                let mut builder = ::http::Response::builder();
   99         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          99  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  100    100   
                    builder,
  101    101   
                    ::http::header::CONTENT_TYPE,
  102    102   
                    "application/x-amz-json-1.0",
  103    103   
                );
  104    104   
                let content_length = payload.len();
  105         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         105  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  106    106   
                    builder,
  107    107   
                    ::http::header::CONTENT_LENGTH,
  108    108   
                    content_length,
  109    109   
                );
  110    110   
                builder
  111    111   
                    .status(500)
  112         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         112  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  113    113   
            }
  114    114   
        }
  115    115   
    })
  116    116   
}
  117    117   
  118    118   
pub(crate) fn de_json_unions(
  119    119   
    value: &[u8],
  120    120   
    mut builder: crate::input::json_unions_input_internal::Builder,
  121    121   
) -> ::std::result::Result<
  122    122   
    crate::input::json_unions_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_no_input_and_no_output.rs

@@ -1,1 +85,85 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_no_input_and_no_output_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::NoInputAndNoOutputInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::no_input_and_no_output_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_no_input_and_no_output_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::NoInputAndNoOutputOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.0",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload = "";
   44     44   
        let content_length = payload.len();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_LENGTH,
   48     48   
            content_length,
   49     49   
        );
   50         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   51     51   
        builder.body(body)?
   52     52   
    })
   53     53   
}
   54     54   
   55     55   
#[allow(clippy::unnecessary_wraps)]
   56     56   
pub fn ser_no_input_and_no_output_http_error(
   57     57   
    error: &crate::error::NoInputAndNoOutputError,
   58     58   
) -> std::result::Result<
   59         -
    ::aws_smithy_http_server::response::Response,
   60         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     61   
> {
   62     62   
    Ok({
   63     63   
        match error {
   64     64   
            crate::error::NoInputAndNoOutputError::InternalServerError(output) => {
   65     65   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   66     66   
                #[allow(unused_mut)]
   67     67   
                let mut builder = ::http::Response::builder();
   68         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          68  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   69     69   
                    builder,
   70     70   
                    ::http::header::CONTENT_TYPE,
   71     71   
                    "application/x-amz-json-1.0",
   72     72   
                );
   73     73   
                let content_length = payload.len();
   74         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          74  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   75     75   
                    builder,
   76     76   
                    ::http::header::CONTENT_LENGTH,
   77     77   
                    content_length,
   78     78   
                );
   79     79   
                builder
   80     80   
                    .status(500)
   81         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          81  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   82     82   
            }
   83     83   
        }
   84     84   
    })
   85     85   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_no_input_and_output.rs

@@ -1,1 +87,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_no_input_and_output_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::NoInputAndOutputInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::no_input_and_output_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_no_input_and_output_http_response(
   28     28   
    #[allow(unused_variables)] output: crate::output::NoInputAndOutputOutput,
   29     29   
) -> std::result::Result<
   30         -
    ::aws_smithy_http_server::response::Response,
   31         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     32   
> {
   33     33   
    Ok({
   34     34   
        #[allow(unused_mut)]
   35     35   
        let mut builder = ::http::Response::builder();
   36         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   37     37   
            builder,
   38     38   
            ::http::header::CONTENT_TYPE,
   39     39   
            "application/x-amz-json-1.0",
   40     40   
        );
   41     41   
        let http_status: u16 = 200;
   42     42   
        builder = builder.status(http_status);
   43     43   
        let payload =
   44     44   
            crate::protocol_serde::shape_no_input_and_output_output::ser_no_input_and_output_output_output_output(&output)?
   45     45   
        ;
   46     46   
        let content_length = payload.len();
   47         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          47  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   48     48   
            builder,
   49     49   
            ::http::header::CONTENT_LENGTH,
   50     50   
            content_length,
   51     51   
        );
   52         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          52  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   53     53   
        builder.body(body)?
   54     54   
    })
   55     55   
}
   56     56   
   57     57   
#[allow(clippy::unnecessary_wraps)]
   58     58   
pub fn ser_no_input_and_output_http_error(
   59     59   
    error: &crate::error::NoInputAndOutputError,
   60     60   
) -> std::result::Result<
   61         -
    ::aws_smithy_http_server::response::Response,
   62         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          61  +
    ::aws_smithy_legacy_http_server::response::Response,
          62  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   63     63   
> {
   64     64   
    Ok({
   65     65   
        match error {
   66     66   
            crate::error::NoInputAndOutputError::InternalServerError(output) => {
   67     67   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   68     68   
                #[allow(unused_mut)]
   69     69   
                let mut builder = ::http::Response::builder();
   70         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          70  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   71     71   
                    builder,
   72     72   
                    ::http::header::CONTENT_TYPE,
   73     73   
                    "application/x-amz-json-1.0",
   74     74   
                );
   75     75   
                let content_length = payload.len();
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::CONTENT_LENGTH,
   79     79   
                    content_length,
   80     80   
                );
   81     81   
                builder
   82     82   
                    .status(500)
   83         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          83  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   84     84   
            }
   85     85   
        }
   86     86   
    })
   87     87   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_operation_with_defaults.rs

@@ -1,1 +144,144 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_defaults_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithDefaultsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::operation_with_defaults_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.0"),
   27     27   
            )?;
   28     28   
            input =
   29     29   
                crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults(
   30     30   
                    bytes.as_ref(),
   31     31   
                    input,
   32     32   
                )?;
   33     33   
        }
   34     34   
        input.build()?
   35     35   
    })
   36     36   
}
   37     37   
   38     38   
#[allow(clippy::unnecessary_wraps)]
   39     39   
pub fn ser_operation_with_defaults_http_response(
   40     40   
    #[allow(unused_variables)] output: crate::output::OperationWithDefaultsOutput,
   41     41   
) -> std::result::Result<
   42         -
    ::aws_smithy_http_server::response::Response,
   43         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          42  +
    ::aws_smithy_legacy_http_server::response::Response,
          43  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   44     44   
> {
   45     45   
    Ok({
   46     46   
        #[allow(unused_mut)]
   47     47   
        let mut builder = ::http::Response::builder();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_TYPE,
   51     51   
            "application/x-amz-json-1.0",
   52     52   
        );
   53     53   
        let http_status: u16 = 200;
   54     54   
        builder = builder.status(http_status);
   55     55   
        let payload =
   56     56   
            crate::protocol_serde::shape_operation_with_defaults_output::ser_operation_with_defaults_output_output_output(&output)?
   57     57   
        ;
   58     58   
        let content_length = payload.len();
   59         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          59  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   60     60   
            builder,
   61     61   
            ::http::header::CONTENT_LENGTH,
   62     62   
            content_length,
   63     63   
        );
   64         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          64  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   65     65   
        builder.body(body)?
   66     66   
    })
   67     67   
}
   68     68   
   69     69   
#[allow(clippy::unnecessary_wraps)]
   70     70   
pub fn ser_operation_with_defaults_http_error(
   71     71   
    error: &crate::error::OperationWithDefaultsError,
   72     72   
) -> std::result::Result<
   73         -
    ::aws_smithy_http_server::response::Response,
   74         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          73  +
    ::aws_smithy_legacy_http_server::response::Response,
          74  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   75     75   
> {
   76     76   
    Ok({
   77     77   
        match error {
   78     78   
            crate::error::OperationWithDefaultsError::ValidationException(output) => {
   79     79   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   80     80   
                #[allow(unused_mut)]
   81     81   
                let mut builder = ::http::Response::builder();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_TYPE,
   85     85   
                    "application/x-amz-json-1.0",
   86     86   
                );
   87     87   
                let content_length = payload.len();
   88         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   89     89   
                    builder,
   90     90   
                    ::http::header::CONTENT_LENGTH,
   91     91   
                    content_length,
   92     92   
                );
   93     93   
                builder
   94     94   
                    .status(400)
   95         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          95  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   96     96   
            }
   97     97   
            crate::error::OperationWithDefaultsError::InternalServerError(output) => {
   98     98   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   99     99   
                #[allow(unused_mut)]
  100    100   
                let mut builder = ::http::Response::builder();
  101         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         101  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  102    102   
                    builder,
  103    103   
                    ::http::header::CONTENT_TYPE,
  104    104   
                    "application/x-amz-json-1.0",
  105    105   
                );
  106    106   
                let content_length = payload.len();
  107         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         107  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  108    108   
                    builder,
  109    109   
                    ::http::header::CONTENT_LENGTH,
  110    110   
                    content_length,
  111    111   
                );
  112    112   
                builder
  113    113   
                    .status(500)
  114         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         114  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  115    115   
            }
  116    116   
        }
  117    117   
    })
  118    118   
}
  119    119   
  120    120   
pub(crate) fn de_operation_with_defaults(
  121    121   
    value: &[u8],
  122    122   
    mut builder: crate::input::operation_with_defaults_input_internal::Builder,
  123    123   
) -> ::std::result::Result<
  124    124   
    crate::input::operation_with_defaults_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_operation_with_nested_structure.rs

@@ -1,1 +141,141 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_nested_structure_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithNestedStructureInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::operation_with_nested_structure_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        let bytes = ::hyper::body::to_bytes(body).await?;
   24     24   
        if !bytes.is_empty() {
   25         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   26     26   
                &headers,
   27     27   
                Some("application/x-amz-json-1.0"),
   28     28   
            )?;
   29     29   
            input = crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure(bytes.as_ref(), input)?;
   30     30   
        }
   31     31   
        input.build()?
   32     32   
    })
   33     33   
}
   34     34   
   35     35   
#[allow(clippy::unnecessary_wraps)]
   36     36   
pub fn ser_operation_with_nested_structure_http_response(
   37     37   
    #[allow(unused_variables)] output: crate::output::OperationWithNestedStructureOutput,
   38     38   
) -> std::result::Result<
   39         -
    ::aws_smithy_http_server::response::Response,
   40         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          39  +
    ::aws_smithy_legacy_http_server::response::Response,
          40  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   41     41   
> {
   42     42   
    Ok({
   43     43   
        #[allow(unused_mut)]
   44     44   
        let mut builder = ::http::Response::builder();
   45         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   46     46   
            builder,
   47     47   
            ::http::header::CONTENT_TYPE,
   48     48   
            "application/x-amz-json-1.0",
   49     49   
        );
   50     50   
        let http_status: u16 = 200;
   51     51   
        builder = builder.status(http_status);
   52     52   
        let payload =
   53     53   
            crate::protocol_serde::shape_operation_with_nested_structure_output::ser_operation_with_nested_structure_output_output_output(&output)?
   54     54   
        ;
   55     55   
        let content_length = payload.len();
   56         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   57     57   
            builder,
   58     58   
            ::http::header::CONTENT_LENGTH,
   59     59   
            content_length,
   60     60   
        );
   61         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          61  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   62     62   
        builder.body(body)?
   63     63   
    })
   64     64   
}
   65     65   
   66     66   
#[allow(clippy::unnecessary_wraps)]
   67     67   
pub fn ser_operation_with_nested_structure_http_error(
   68     68   
    error: &crate::error::OperationWithNestedStructureError,
   69     69   
) -> std::result::Result<
   70         -
    ::aws_smithy_http_server::response::Response,
   71         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          70  +
    ::aws_smithy_legacy_http_server::response::Response,
          71  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   72     72   
> {
   73     73   
    Ok({
   74     74   
        match error {
   75     75   
            crate::error::OperationWithNestedStructureError::ValidationException(output) => {
   76     76   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   77     77   
                #[allow(unused_mut)]
   78     78   
                let mut builder = ::http::Response::builder();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_TYPE,
   82     82   
                    "application/x-amz-json-1.0",
   83     83   
                );
   84     84   
                let content_length = payload.len();
   85         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   86     86   
                    builder,
   87     87   
                    ::http::header::CONTENT_LENGTH,
   88     88   
                    content_length,
   89     89   
                );
   90     90   
                builder
   91     91   
                    .status(400)
   92         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          92  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   93     93   
            }
   94     94   
            crate::error::OperationWithNestedStructureError::InternalServerError(output) => {
   95     95   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   96     96   
                #[allow(unused_mut)]
   97     97   
                let mut builder = ::http::Response::builder();
   98         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          98  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   99     99   
                    builder,
  100    100   
                    ::http::header::CONTENT_TYPE,
  101    101   
                    "application/x-amz-json-1.0",
  102    102   
                );
  103    103   
                let content_length = payload.len();
  104         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         104  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
  105    105   
                    builder,
  106    106   
                    ::http::header::CONTENT_LENGTH,
  107    107   
                    content_length,
  108    108   
                );
  109    109   
                builder
  110    110   
                    .status(500)
  111         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         111  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
  112    112   
            }
  113    113   
        }
  114    114   
    })
  115    115   
}
  116    116   
  117    117   
pub(crate) fn de_operation_with_nested_structure(
  118    118   
    value: &[u8],
  119    119   
    mut builder: crate::input::operation_with_nested_structure_input_internal::Builder,
  120    120   
) -> ::std::result::Result<
  121    121   
    crate::input::operation_with_nested_structure_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_operation_with_required_members.rs

@@ -1,1 +88,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_required_members_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithRequiredMembersInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::operation_with_required_members_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_operation_with_required_members_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::OperationWithRequiredMembersOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/x-amz-json-1.0",
   41     41   
        );
   42     42   
        let http_status: u16 = 200;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload =
   45     45   
            crate::protocol_serde::shape_operation_with_required_members_output::ser_operation_with_required_members_output_output_output(&output)?
   46     46   
        ;
   47     47   
        let content_length = payload.len();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_LENGTH,
   51     51   
            content_length,
   52     52   
        );
   53         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   54     54   
        builder.body(body)?
   55     55   
    })
   56     56   
}
   57     57   
   58     58   
#[allow(clippy::unnecessary_wraps)]
   59     59   
pub fn ser_operation_with_required_members_http_error(
   60     60   
    error: &crate::error::OperationWithRequiredMembersError,
   61     61   
) -> std::result::Result<
   62         -
    ::aws_smithy_http_server::response::Response,
   63         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          62  +
    ::aws_smithy_legacy_http_server::response::Response,
          63  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   64     64   
> {
   65     65   
    Ok({
   66     66   
        match error {
   67     67   
            crate::error::OperationWithRequiredMembersError::InternalServerError(output) => {
   68     68   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   69     69   
                #[allow(unused_mut)]
   70     70   
                let mut builder = ::http::Response::builder();
   71         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          71  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   72     72   
                    builder,
   73     73   
                    ::http::header::CONTENT_TYPE,
   74     74   
                    "application/x-amz-json-1.0",
   75     75   
                );
   76     76   
                let content_length = payload.len();
   77         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          77  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   78     78   
                    builder,
   79     79   
                    ::http::header::CONTENT_LENGTH,
   80     80   
                    content_length,
   81     81   
                );
   82     82   
                builder
   83     83   
                    .status(500)
   84         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          84  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   85     85   
            }
   86     86   
        }
   87     87   
    })
   88     88   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_operation_with_required_members_with_defaults.rs

@@ -1,1 +90,90 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_operation_with_required_members_with_defaults_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::OperationWithRequiredMembersWithDefaultsInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::operation_with_required_members_with_defaults_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        input.build()
   23     23   
    })
   24     24   
}
   25     25   
   26     26   
#[allow(clippy::unnecessary_wraps)]
   27     27   
pub fn ser_operation_with_required_members_with_defaults_http_response(
   28     28   
    #[allow(unused_variables)]
   29     29   
    output: crate::output::OperationWithRequiredMembersWithDefaultsOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/x-amz-json-1.0",
   41     41   
        );
   42     42   
        let http_status: u16 = 200;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload =
   45     45   
            crate::protocol_serde::shape_operation_with_required_members_with_defaults_output::ser_operation_with_required_members_with_defaults_output_output_output(&output)?
   46     46   
        ;
   47     47   
        let content_length = payload.len();
   48         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          48  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   49     49   
            builder,
   50     50   
            ::http::header::CONTENT_LENGTH,
   51     51   
            content_length,
   52     52   
        );
   53         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          53  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   54     54   
        builder.body(body)?
   55     55   
    })
   56     56   
}
   57     57   
   58     58   
#[allow(clippy::unnecessary_wraps)]
   59     59   
pub fn ser_operation_with_required_members_with_defaults_http_error(
   60     60   
    error: &crate::error::OperationWithRequiredMembersWithDefaultsError,
   61     61   
) -> std::result::Result<
   62         -
    ::aws_smithy_http_server::response::Response,
   63         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          62  +
    ::aws_smithy_legacy_http_server::response::Response,
          63  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   64     64   
> {
   65     65   
    Ok({
   66     66   
        match error {
   67     67   
            crate::error::OperationWithRequiredMembersWithDefaultsError::InternalServerError(
   68     68   
                output,
   69     69   
            ) => {
   70     70   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   71     71   
                #[allow(unused_mut)]
   72     72   
                let mut builder = ::http::Response::builder();
   73         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          73  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   74     74   
                    builder,
   75     75   
                    ::http::header::CONTENT_TYPE,
   76     76   
                    "application/x-amz-json-1.0",
   77     77   
                );
   78     78   
                let content_length = payload.len();
   79         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          79  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   80     80   
                    builder,
   81     81   
                    ::http::header::CONTENT_LENGTH,
   82     82   
                    content_length,
   83     83   
                );
   84     84   
                builder
   85     85   
                    .status(500)
   86         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          86  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   87     87   
            }
   88     88   
        }
   89     89   
    })
   90     90   
}

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_put_with_content_encoding.rs

@@ -1,1 +119,119 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_put_with_content_encoding_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::PutWithContentEncodingInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input = crate::input::put_with_content_encoding_input_internal::Builder::default();
   18     18   
        #[allow(unused_variables)]
   19     19   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     20   
            uri, headers, body, ..
   21     21   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   22     22   
        let bytes = ::hyper::body::to_bytes(body).await?;
   23     23   
        if !bytes.is_empty() {
   24         -
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
   25     25   
                &headers,
   26     26   
                Some("application/x-amz-json-1.0"),
   27     27   
            )?;
   28     28   
            input = crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding(bytes.as_ref(), input)?;
   29     29   
        }
   30     30   
        input.build()
   31     31   
    })
   32     32   
}
   33     33   
   34     34   
#[allow(clippy::unnecessary_wraps)]
   35     35   
pub fn ser_put_with_content_encoding_http_response(
   36     36   
    #[allow(unused_variables)] output: crate::output::PutWithContentEncodingOutput,
   37     37   
) -> std::result::Result<
   38         -
    ::aws_smithy_http_server::response::Response,
   39         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   40     40   
> {
   41     41   
    Ok({
   42     42   
        #[allow(unused_mut)]
   43     43   
        let mut builder = ::http::Response::builder();
   44         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   45     45   
            builder,
   46     46   
            ::http::header::CONTENT_TYPE,
   47     47   
            "application/x-amz-json-1.0",
   48     48   
        );
   49     49   
        let http_status: u16 = 200;
   50     50   
        builder = builder.status(http_status);
   51     51   
        let payload = "";
   52     52   
        let content_length = payload.len();
   53         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          53  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   54     54   
            builder,
   55     55   
            ::http::header::CONTENT_LENGTH,
   56     56   
            content_length,
   57     57   
        );
   58         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          58  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   59     59   
        builder.body(body)?
   60     60   
    })
   61     61   
}
   62     62   
   63     63   
#[allow(clippy::unnecessary_wraps)]
   64     64   
pub fn ser_put_with_content_encoding_http_error(
   65     65   
    error: &crate::error::PutWithContentEncodingError,
   66     66   
) -> std::result::Result<
   67         -
    ::aws_smithy_http_server::response::Response,
   68         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          67  +
    ::aws_smithy_legacy_http_server::response::Response,
          68  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   69     69   
> {
   70     70   
    Ok({
   71     71   
        match error {
   72     72   
            crate::error::PutWithContentEncodingError::InternalServerError(output) => {
   73     73   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   74     74   
                #[allow(unused_mut)]
   75     75   
                let mut builder = ::http::Response::builder();
   76         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   77     77   
                    builder,
   78     78   
                    ::http::header::CONTENT_TYPE,
   79     79   
                    "application/x-amz-json-1.0",
   80     80   
                );
   81     81   
                let content_length = payload.len();
   82         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   83     83   
                    builder,
   84     84   
                    ::http::header::CONTENT_LENGTH,
   85     85   
                    content_length,
   86     86   
                );
   87     87   
                builder
   88     88   
                    .status(500)
   89         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   90     90   
            }
   91     91   
        }
   92     92   
    })
   93     93   
}
   94     94   
   95     95   
pub(crate) fn de_put_with_content_encoding(
   96     96   
    value: &[u8],
   97     97   
    mut builder: crate::input::put_with_content_encoding_input_internal::Builder,
   98     98   
) -> ::std::result::Result<
   99     99   
    crate::input::put_with_content_encoding_input_internal::Builder,

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/protocol_serde/shape_query_incompatible_operation.rs

@@ -1,1 +86,86 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(clippy::unnecessary_wraps)]
    3      3   
pub async fn de_query_incompatible_operation_http_request<B>(
    4      4   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      5   
) -> std::result::Result<
    6      6   
    crate::input::QueryIncompatibleOperationInput,
    7         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
    8      8   
>
    9      9   
where
   10         -
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   11     11   
    B::Data: Send,
   12         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13         -
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   14     14   
{
   15     15   
    Ok({
   16     16   
        #[allow(unused_mut)]
   17     17   
        let mut input =
   18     18   
            crate::input::query_incompatible_operation_input_internal::Builder::default();
   19     19   
        #[allow(unused_variables)]
   20     20   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     21   
            uri, headers, body, ..
   22     22   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
   23     23   
        input.build()
   24     24   
    })
   25     25   
}
   26     26   
   27     27   
#[allow(clippy::unnecessary_wraps)]
   28     28   
pub fn ser_query_incompatible_operation_http_response(
   29     29   
    #[allow(unused_variables)] output: crate::output::QueryIncompatibleOperationOutput,
   30     30   
) -> std::result::Result<
   31         -
    ::aws_smithy_http_server::response::Response,
   32         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          31  +
    ::aws_smithy_legacy_http_server::response::Response,
          32  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   33     33   
> {
   34     34   
    Ok({
   35     35   
        #[allow(unused_mut)]
   36     36   
        let mut builder = ::http::Response::builder();
   37         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          37  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   38     38   
            builder,
   39     39   
            ::http::header::CONTENT_TYPE,
   40     40   
            "application/x-amz-json-1.0",
   41     41   
        );
   42     42   
        let http_status: u16 = 200;
   43     43   
        builder = builder.status(http_status);
   44     44   
        let payload = "";
   45     45   
        let content_length = payload.len();
   46         -
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          46  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   47     47   
            builder,
   48     48   
            ::http::header::CONTENT_LENGTH,
   49     49   
            content_length,
   50     50   
        );
   51         -
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          51  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
   52     52   
        builder.body(body)?
   53     53   
    })
   54     54   
}
   55     55   
   56     56   
#[allow(clippy::unnecessary_wraps)]
   57     57   
pub fn ser_query_incompatible_operation_http_error(
   58     58   
    error: &crate::error::QueryIncompatibleOperationError,
   59     59   
) -> std::result::Result<
   60         -
    ::aws_smithy_http_server::response::Response,
   61         -
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
          60  +
    ::aws_smithy_legacy_http_server::response::Response,
          61  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
   62     62   
> {
   63     63   
    Ok({
   64     64   
        match error {
   65     65   
            crate::error::QueryIncompatibleOperationError::InternalServerError(output) => {
   66     66   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
   67     67   
                #[allow(unused_mut)]
   68     68   
                let mut builder = ::http::Response::builder();
   69         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          69  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   70     70   
                    builder,
   71     71   
                    ::http::header::CONTENT_TYPE,
   72     72   
                    "application/x-amz-json-1.0",
   73     73   
                );
   74     74   
                let content_length = payload.len();
   75         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          75  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
   76     76   
                    builder,
   77     77   
                    ::http::header::CONTENT_LENGTH,
   78     78   
                    content_length,
   79     79   
                );
   80     80   
                builder
   81     81   
                    .status(500)
   82         -
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
          82  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
   83     83   
            }
   84     84   
        }
   85     85   
    })
   86     86   
}