Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +0,455 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerOperationGenerator.kt:48 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
                       /* ServerOperationGenerator.kt:55 */
    3      5   
pub struct QueryPrecedence;
    4      6   
    5      7   
impl ::aws_smithy_http_server::operation::OperationShape for QueryPrecedence {
    6      8   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7      9   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    8     10   
            "aws.protocoltests.restjson#QueryPrecedence",
    9     11   
            "aws.protocoltests.restjson",
   10     12   
            "QueryPrecedence",
   11     13   
        );
   12     14   
   13     15   
    type Input = crate::input::QueryPrecedenceInput;
   14     16   
    type Output = crate::output::QueryPrecedenceOutput;
   15     17   
    type Error = crate::error::QueryPrecedenceError;
   16     18   
}
   17     19   
   18     20   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for QueryPrecedence {
   19     21   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   20     22   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   21     23   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   22     24   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   23     25   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     26   
        >,
   25     27   
    >;
   26     28   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   27     29   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   28     30   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   29     31   
    >;
   30     32   
   31     33   
    fn request_fmt() -> Self::RequestFmt {
   32     34   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   33     35   
    }
   34     36   
   35     37   
    fn response_fmt() -> Self::ResponseFmt {
   36     38   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   37     39   
    }
   38     40   
}
          41  +
/* ServerOperationGenerator.kt:88 */
   39     42   
          43  +
/* ServerOperationGenerator.kt:48 */
   40     44   
#[allow(missing_docs)] // documentation missing in model
          45  +
                       /* ServerOperationGenerator.kt:55 */
   41     46   
pub struct EmptyStructWithContentOnWireOp;
   42     47   
   43     48   
impl ::aws_smithy_http_server::operation::OperationShape for EmptyStructWithContentOnWireOp {
   44     49   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   45     50   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   46     51   
            "aws.protocoltests.restjson#EmptyStructWithContentOnWireOp",
   47     52   
            "aws.protocoltests.restjson",
   48     53   
            "EmptyStructWithContentOnWireOp",
   49     54   
        );
   50     55   
   51     56   
    type Input = crate::input::EmptyStructWithContentOnWireOpInput;
   52     57   
    type Output = crate::output::EmptyStructWithContentOnWireOpOutput;
   53     58   
    type Error = crate::error::EmptyStructWithContentOnWireOpError;
   54     59   
}
   55     60   
   56     61   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   57     62   
    for EmptyStructWithContentOnWireOp
   58     63   
{
   59     64   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   60     65   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   61     66   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   62     67   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   63     68   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64     69   
        >,
   65     70   
    >;
   66     71   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   67     72   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   68     73   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   69     74   
    >;
   70     75   
   71     76   
    fn request_fmt() -> Self::RequestFmt {
   72     77   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   73     78   
    }
   74     79   
   75     80   
    fn response_fmt() -> Self::ResponseFmt {
   76     81   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   77     82   
    }
   78     83   
}
          84  +
/* ServerOperationGenerator.kt:88 */
   79     85   
          86  +
/* ServerOperationGenerator.kt:48 */
   80     87   
#[allow(missing_docs)] // documentation missing in model
          88  +
                       /* ServerOperationGenerator.kt:55 */
   81     89   
pub struct CaseInsensitiveErrorOperation;
   82     90   
   83     91   
impl ::aws_smithy_http_server::operation::OperationShape for CaseInsensitiveErrorOperation {
   84     92   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   85     93   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   86     94   
            "aws.protocoltests.restjson#CaseInsensitiveErrorOperation",
   87     95   
            "aws.protocoltests.restjson",
   88     96   
            "CaseInsensitiveErrorOperation",
   89     97   
        );
   90     98   
   91     99   
    type Input = crate::input::CaseInsensitiveErrorOperationInput;
   92    100   
    type Output = crate::output::CaseInsensitiveErrorOperationOutput;
   93    101   
    type Error = crate::error::CaseInsensitiveErrorOperationError;
   94    102   
}
   95    103   
   96    104   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   97    105   
    for CaseInsensitiveErrorOperation
   98    106   
{
   99    107   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  100    108   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  101    109   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  102    110   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  103    111   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104    112   
        >,
  105    113   
    >;
  106    114   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  107    115   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  108    116   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  109    117   
    >;
  110    118   
  111    119   
    fn request_fmt() -> Self::RequestFmt {
  112    120   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  113    121   
    }
  114    122   
  115    123   
    fn response_fmt() -> Self::ResponseFmt {
  116    124   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  117    125   
    }
  118    126   
}
         127  +
/* ServerOperationGenerator.kt:88 */
  119    128   
         129  +
/* ServerOperationGenerator.kt:48 */
  120    130   
#[allow(missing_docs)] // documentation missing in model
         131  +
                       /* ServerOperationGenerator.kt:55 */
  121    132   
pub struct NullInNonSparse;
  122    133   
  123    134   
impl ::aws_smithy_http_server::operation::OperationShape for NullInNonSparse {
  124    135   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  125    136   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  126    137   
            "aws.protocoltests.restjson#NullInNonSparse",
  127    138   
            "aws.protocoltests.restjson",
  128    139   
            "NullInNonSparse",
  129    140   
        );
  130    141   
  131    142   
    type Input = crate::input::NullInNonSparseInput;
  132    143   
    type Output = crate::output::NullInNonSparseOutput;
  133    144   
    type Error = crate::error::NullInNonSparseError;
  134    145   
}
  135    146   
  136    147   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for NullInNonSparse {
  137    148   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  138    149   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  139    150   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  140    151   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  141    152   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  142    153   
        >,
  143    154   
    >;
  144    155   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  145    156   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146    157   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  147    158   
    >;
  148    159   
  149    160   
    fn request_fmt() -> Self::RequestFmt {
  150    161   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  151    162   
    }
  152    163   
  153    164   
    fn response_fmt() -> Self::ResponseFmt {
  154    165   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  155    166   
    }
  156    167   
}
         168  +
/* ServerOperationGenerator.kt:88 */
  157    169   
         170  +
/* ServerOperationGenerator.kt:48 */
  158    171   
#[allow(missing_docs)] // documentation missing in model
         172  +
                       /* ServerOperationGenerator.kt:55 */
  159    173   
pub struct EscapedStringValues;
  160    174   
  161    175   
impl ::aws_smithy_http_server::operation::OperationShape for EscapedStringValues {
  162    176   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  163    177   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  164    178   
            "aws.protocoltests.restjson#EscapedStringValues",
  165    179   
            "aws.protocoltests.restjson",
  166    180   
            "EscapedStringValues",
  167    181   
        );
  168    182   
  169    183   
    type Input = crate::input::EscapedStringValuesInput;
  170    184   
    type Output = crate::output::EscapedStringValuesOutput;
  171    185   
    type Error = crate::error::EscapedStringValuesError;
  172    186   
}
  173    187   
  174    188   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EscapedStringValues {
  175    189   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  176    190   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  177    191   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  178    192   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  179    193   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  180    194   
        >,
  181    195   
    >;
  182    196   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  183    197   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184    198   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  185    199   
    >;
  186    200   
  187    201   
    fn request_fmt() -> Self::RequestFmt {
  188    202   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  189    203   
    }
  190    204   
  191    205   
    fn response_fmt() -> Self::ResponseFmt {
  192    206   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  193    207   
    }
  194    208   
}
         209  +
/* ServerOperationGenerator.kt:88 */
  195    210   
         211  +
/* ServerOperationGenerator.kt:48 */
  196    212   
#[allow(missing_docs)] // documentation missing in model
         213  +
                       /* ServerOperationGenerator.kt:55 */
  197    214   
pub struct PrimitiveIntOp;
  198    215   
  199    216   
impl ::aws_smithy_http_server::operation::OperationShape for PrimitiveIntOp {
  200    217   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  201    218   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  202    219   
            "aws.protocoltests.restjson#PrimitiveIntOp",
  203    220   
            "aws.protocoltests.restjson",
  204    221   
            "PrimitiveIntOp",
  205    222   
        );
  206    223   
  207    224   
    type Input = crate::input::PrimitiveIntOpInput;
  208    225   
    type Output = crate::output::PrimitiveIntOpOutput;
  209    226   
    type Error = crate::error::PrimitiveIntOpError;
  210    227   
}
  211    228   
  212    229   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for PrimitiveIntOp {
  213    230   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  214    231   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  215    232   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  216    233   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  217    234   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  218    235   
        >,
  219    236   
    >;
  220    237   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  221    238   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  222    239   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  223    240   
    >;
  224    241   
  225    242   
    fn request_fmt() -> Self::RequestFmt {
  226    243   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  227    244   
    }
  228    245   
  229    246   
    fn response_fmt() -> Self::ResponseFmt {
  230    247   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  231    248   
    }
  232    249   
}
         250  +
/* ServerOperationGenerator.kt:88 */
  233    251   
         252  +
/* ServerOperationGenerator.kt:48 */
  234    253   
#[allow(missing_docs)] // documentation missing in model
         254  +
                       /* ServerOperationGenerator.kt:55 */
  235    255   
pub struct MapWithEnumKeyOp;
  236    256   
  237    257   
impl ::aws_smithy_http_server::operation::OperationShape for MapWithEnumKeyOp {
  238    258   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  239    259   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  240    260   
            "aws.protocoltests.restjson#MapWithEnumKeyOp",
  241    261   
            "aws.protocoltests.restjson",
  242    262   
            "MapWithEnumKeyOp",
  243    263   
        );
  244    264   
  245    265   
    type Input = crate::input::MapWithEnumKeyOpInput;
  246    266   
    type Output = crate::output::MapWithEnumKeyOpOutput;
  247    267   
    type Error = crate::error::MapWithEnumKeyOpError;
  248    268   
}
  249    269   
  250    270   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for MapWithEnumKeyOp {
  251    271   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  252    272   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  253    273   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  254    274   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  255    275   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  256    276   
        >,
  257    277   
    >;
  258    278   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  259    279   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  260    280   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  261    281   
    >;
  262    282   
  263    283   
    fn request_fmt() -> Self::RequestFmt {
  264    284   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  265    285   
    }
  266    286   
  267    287   
    fn response_fmt() -> Self::ResponseFmt {
  268    288   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  269    289   
    }
  270    290   
}
         291  +
/* ServerOperationGenerator.kt:88 */
  271    292   
         293  +
/* ServerOperationGenerator.kt:48 */
  272    294   
#[allow(missing_docs)] // documentation missing in model
         295  +
                       /* ServerOperationGenerator.kt:55 */
  273    296   
pub struct StatusResponse;
  274    297   
  275    298   
impl ::aws_smithy_http_server::operation::OperationShape for StatusResponse {
  276    299   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  277    300   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  278    301   
            "aws.protocoltests.restjson#StatusResponse",
  279    302   
            "aws.protocoltests.restjson",
  280    303   
            "StatusResponse",
  281    304   
        );
  282    305   
  283    306   
    type Input = crate::input::StatusResponseInput;
  284    307   
    type Output = crate::output::StatusResponseOutput;
  285    308   
    type Error = crate::error::StatusResponseError;
  286    309   
}
  287    310   
  288    311   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StatusResponse {
  289    312   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  290    313   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  291    314   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  292    315   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  293    316   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  294    317   
        >,
  295    318   
    >;
  296    319   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  297    320   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  298    321   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  299    322   
    >;
  300    323   
  301    324   
    fn request_fmt() -> Self::RequestFmt {
  302    325   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  303    326   
    }
  304    327   
  305    328   
    fn response_fmt() -> Self::ResponseFmt {
  306    329   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  307    330   
    }
  308    331   
}
         332  +
/* ServerOperationGenerator.kt:88 */
  309    333   
         334  +
/* ServerOperationGenerator.kt:48 */
  310    335   
#[allow(missing_docs)] // documentation missing in model
         336  +
                       /* ServerOperationGenerator.kt:55 */
  311    337   
pub struct EnumQuery;
  312    338   
  313    339   
impl ::aws_smithy_http_server::operation::OperationShape for EnumQuery {
  314    340   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  315    341   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  316    342   
            "aws.protocoltests.restjson#EnumQuery",
  317    343   
            "aws.protocoltests.restjson",
  318    344   
            "EnumQuery",
  319    345   
        );
  320    346   
  321    347   
    type Input = crate::input::EnumQueryInput;
  322    348   
    type Output = crate::output::EnumQueryOutput;
  323    349   
    type Error = crate::error::EnumQueryError;
  324    350   
}
  325    351   
  326    352   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EnumQuery {
  327    353   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  328    354   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  329    355   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  330    356   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  331    357   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  332    358   
        >,
  333    359   
    >;
  334    360   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  335    361   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  336    362   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  337    363   
    >;
  338    364   
  339    365   
    fn request_fmt() -> Self::RequestFmt {
  340    366   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  341    367   
    }
  342    368   
  343    369   
    fn response_fmt() -> Self::ResponseFmt {
  344    370   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  345    371   
    }
  346    372   
}
         373  +
/* ServerOperationGenerator.kt:88 */
  347    374   
         375  +
/* ServerOperationGenerator.kt:48 */
  348    376   
#[allow(missing_docs)] // documentation missing in model
         377  +
                       /* ServerOperationGenerator.kt:55 */
  349    378   
pub struct PrimitiveIntHeader;
  350    379   
  351    380   
impl ::aws_smithy_http_server::operation::OperationShape for PrimitiveIntHeader {
  352    381   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  353    382   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  354    383   
            "aws.protocoltests.restjson#PrimitiveIntHeader",
  355    384   
            "aws.protocoltests.restjson",
  356    385   
            "PrimitiveIntHeader",
  357    386   
        );
  358    387   
  359    388   
    type Input = crate::input::PrimitiveIntHeaderInput;
  360    389   
    type Output = crate::output::PrimitiveIntHeaderOutput;
  361    390   
    type Error = crate::error::PrimitiveIntHeaderError;
  362    391   
}
  363    392   
  364    393   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for PrimitiveIntHeader {
  365    394   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  366    395   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  367    396   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  368    397   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  369    398   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  370    399   
        >,
  371    400   
    >;
  372    401   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  373    402   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  374    403   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  375    404   
    >;
  376    405   
  377    406   
    fn request_fmt() -> Self::RequestFmt {
  378    407   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  379    408   
    }
  380    409   
  381    410   
    fn response_fmt() -> Self::ResponseFmt {
  382    411   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  383    412   
    }
  384    413   
}
         414  +
/* ServerOperationGenerator.kt:88 */
  385    415   
         416  +
/* ServerOperationGenerator.kt:48 */
  386    417   
#[allow(missing_docs)] // documentation missing in model
         418  +
                       /* ServerOperationGenerator.kt:55 */
  387    419   
pub struct StringPayload;
  388    420   
  389    421   
impl ::aws_smithy_http_server::operation::OperationShape for StringPayload {
  390    422   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  391    423   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  392    424   
            "aws.protocoltests.restjson#StringPayload",
  393    425   
            "aws.protocoltests.restjson",
  394    426   
            "StringPayload",
  395    427   
        );
  396    428   
  397    429   
    type Input = crate::input::StringPayloadInput;
  398    430   
    type Output = crate::output::StringPayloadOutput;
  399    431   
    type Error = crate::error::StringPayloadError;
  400    432   
}
  401    433   
  402    434   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StringPayload {
  403    435   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  404    436   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  405    437   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  406    438   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  407    439   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  408    440   
        >,
  409    441   
    >;
  410    442   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  411    443   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  412    444   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  413    445   
    >;
  414    446   
  415    447   
    fn request_fmt() -> Self::RequestFmt {
  416    448   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  417    449   
    }
  418    450   
  419    451   
    fn response_fmt() -> Self::ResponseFmt {
  420    452   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  421    453   
    }
  422    454   
}
         455  +
/* ServerOperationGenerator.kt:88 */

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

@@ -1,1 +577,980 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(
    4      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      7   
)]
    6         -
pub struct QueryPrecedenceOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct QueryPrecedenceOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ServerCodegenVisitor.kt:345 */
    7     10   
impl QueryPrecedenceOutput {
    8         -
    /// Creates a new builder-style object to manufacture [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
          11  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
          12  +
    /* ServerBuilderGenerator.kt:295 */
    9     13   
    pub fn builder() -> crate::output::query_precedence_output::Builder {
          14  +
        /* ServerBuilderGenerator.kt:296 */
   10     15   
        crate::output::query_precedence_output::Builder::default()
          16  +
        /* ServerBuilderGenerator.kt:295 */
   11     17   
    }
          18  +
    /* ServerCodegenVisitor.kt:345 */
   12     19   
}
   13     20   
          21  +
/* StructureGenerator.kt:197 */
   14     22   
#[allow(missing_docs)] // documentation missing in model
          23  +
/* RustType.kt:516 */
   15     24   
#[derive(
   16     25   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   17     26   
)]
   18         -
pub struct EmptyStructWithContentOnWireOpOutput {
          27  +
pub /* StructureGenerator.kt:201 */ struct EmptyStructWithContentOnWireOpOutput {
          28  +
    /* StructureGenerator.kt:231 */
   19     29   
    #[allow(missing_docs)] // documentation missing in model
   20     30   
    pub empty: ::std::option::Option<crate::model::EmptyStruct>,
          31  +
    /* StructureGenerator.kt:201 */
   21     32   
}
          33  +
/* StructureGenerator.kt:135 */
   22     34   
impl EmptyStructWithContentOnWireOpOutput {
          35  +
    /* StructureGenerator.kt:231 */
   23     36   
    #[allow(missing_docs)] // documentation missing in model
          37  +
                           /* StructureGenerator.kt:166 */
   24     38   
    pub fn empty(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
          39  +
        /* StructureGenerator.kt:170 */
   25     40   
        self.empty.as_ref()
          41  +
        /* StructureGenerator.kt:166 */
   26     42   
    }
          43  +
    /* StructureGenerator.kt:135 */
   27     44   
}
          45  +
/* ServerCodegenVisitor.kt:345 */
   28     46   
impl EmptyStructWithContentOnWireOpOutput {
   29         -
    /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
          47  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
          48  +
    /* ServerBuilderGenerator.kt:295 */
   30     49   
    pub fn builder() -> crate::output::empty_struct_with_content_on_wire_op_output::Builder {
          50  +
        /* ServerBuilderGenerator.kt:296 */
   31     51   
        crate::output::empty_struct_with_content_on_wire_op_output::Builder::default()
          52  +
        /* ServerBuilderGenerator.kt:295 */
   32     53   
    }
          54  +
    /* ServerCodegenVisitor.kt:345 */
   33     55   
}
   34     56   
          57  +
/* StructureGenerator.kt:197 */
   35     58   
#[allow(missing_docs)] // documentation missing in model
          59  +
/* RustType.kt:516 */
   36     60   
#[derive(
   37     61   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   38     62   
)]
   39         -
pub struct CaseInsensitiveErrorOperationOutput {}
          63  +
pub /* StructureGenerator.kt:201 */ struct CaseInsensitiveErrorOperationOutput {/* StructureGenerator.kt:201 */}
          64  +
/* ServerCodegenVisitor.kt:345 */
   40     65   
impl CaseInsensitiveErrorOperationOutput {
   41         -
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
          66  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
          67  +
    /* ServerBuilderGenerator.kt:295 */
   42     68   
    pub fn builder() -> crate::output::case_insensitive_error_operation_output::Builder {
          69  +
        /* ServerBuilderGenerator.kt:296 */
   43     70   
        crate::output::case_insensitive_error_operation_output::Builder::default()
          71  +
        /* ServerBuilderGenerator.kt:295 */
   44     72   
    }
          73  +
    /* ServerCodegenVisitor.kt:345 */
   45     74   
}
   46     75   
          76  +
/* StructureGenerator.kt:197 */
   47     77   
#[allow(missing_docs)] // documentation missing in model
          78  +
/* RustType.kt:516 */
   48     79   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   49         -
pub struct NullInNonSparseOutput {
          80  +
pub /* StructureGenerator.kt:201 */ struct NullInNonSparseOutput {
          81  +
    /* StructureGenerator.kt:231 */
   50     82   
    #[allow(missing_docs)] // documentation missing in model
   51     83   
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          84  +
    /* StructureGenerator.kt:231 */
   52     85   
    #[allow(missing_docs)] // documentation missing in model
   53     86   
    pub map: ::std::option::Option<
   54     87   
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
   55     88   
    >,
          89  +
    /* StructureGenerator.kt:231 */
   56     90   
    #[allow(missing_docs)] // documentation missing in model
   57     91   
    pub union: ::std::option::Option<crate::model::SingleElementUnion>,
          92  +
    /* StructureGenerator.kt:201 */
   58     93   
}
          94  +
/* StructureGenerator.kt:135 */
   59     95   
impl NullInNonSparseOutput {
          96  +
    /* StructureGenerator.kt:231 */
   60     97   
    #[allow(missing_docs)] // documentation missing in model
          98  +
                           /* StructureGenerator.kt:166 */
   61     99   
    pub fn list(&self) -> ::std::option::Option<&[::std::string::String]> {
         100  +
        /* StructureGenerator.kt:169 */
   62    101   
        self.list.as_deref()
         102  +
        /* StructureGenerator.kt:166 */
   63    103   
    }
         104  +
    /* StructureGenerator.kt:231 */
   64    105   
    #[allow(missing_docs)] // documentation missing in model
         106  +
                           /* StructureGenerator.kt:166 */
   65    107   
    pub fn map(
   66    108   
        &self,
   67    109   
    ) -> ::std::option::Option<
   68    110   
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
   69    111   
    > {
         112  +
        /* StructureGenerator.kt:170 */
   70    113   
        self.map.as_ref()
         114  +
        /* StructureGenerator.kt:166 */
   71    115   
    }
         116  +
    /* StructureGenerator.kt:231 */
   72    117   
    #[allow(missing_docs)] // documentation missing in model
         118  +
                           /* StructureGenerator.kt:166 */
   73    119   
    pub fn union(&self) -> ::std::option::Option<&crate::model::SingleElementUnion> {
         120  +
        /* StructureGenerator.kt:170 */
   74    121   
        self.union.as_ref()
         122  +
        /* StructureGenerator.kt:166 */
   75    123   
    }
         124  +
    /* StructureGenerator.kt:135 */
   76    125   
}
         126  +
/* ServerCodegenVisitor.kt:345 */
   77    127   
impl NullInNonSparseOutput {
   78         -
    /// Creates a new builder-style object to manufacture [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         128  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         129  +
    /* ServerBuilderGenerator.kt:295 */
   79    130   
    pub fn builder() -> crate::output::null_in_non_sparse_output::Builder {
         131  +
        /* ServerBuilderGenerator.kt:296 */
   80    132   
        crate::output::null_in_non_sparse_output::Builder::default()
         133  +
        /* ServerBuilderGenerator.kt:295 */
   81    134   
    }
         135  +
    /* ServerCodegenVisitor.kt:345 */
   82    136   
}
   83    137   
         138  +
/* StructureGenerator.kt:197 */
   84    139   
#[allow(missing_docs)] // documentation missing in model
         140  +
/* RustType.kt:516 */
   85    141   
#[derive(
   86    142   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   87    143   
)]
   88         -
pub struct EscapedStringValuesOutput {
         144  +
pub /* StructureGenerator.kt:201 */ struct EscapedStringValuesOutput {
         145  +
    /* StructureGenerator.kt:231 */
   89    146   
    #[allow(missing_docs)] // documentation missing in model
   90    147   
    pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
         148  +
    /* StructureGenerator.kt:231 */
   91    149   
    #[allow(missing_docs)] // documentation missing in model
   92    150   
    pub some_string: ::std::option::Option<::std::string::String>,
         151  +
    /* StructureGenerator.kt:201 */
   93    152   
}
         153  +
/* StructureGenerator.kt:135 */
   94    154   
impl EscapedStringValuesOutput {
         155  +
    /* StructureGenerator.kt:231 */
   95    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* StructureGenerator.kt:166 */
   96    158   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
         159  +
        /* StructureGenerator.kt:170 */
   97    160   
        self.r#enum.as_ref()
         161  +
        /* StructureGenerator.kt:166 */
   98    162   
    }
         163  +
    /* StructureGenerator.kt:231 */
   99    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* StructureGenerator.kt:166 */
  100    166   
    pub fn some_string(&self) -> ::std::option::Option<&str> {
         167  +
        /* StructureGenerator.kt:169 */
  101    168   
        self.some_string.as_deref()
         169  +
        /* StructureGenerator.kt:166 */
  102    170   
    }
         171  +
    /* StructureGenerator.kt:135 */
  103    172   
}
         173  +
/* ServerCodegenVisitor.kt:345 */
  104    174   
impl EscapedStringValuesOutput {
  105         -
    /// Creates a new builder-style object to manufacture [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         175  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         176  +
    /* ServerBuilderGenerator.kt:295 */
  106    177   
    pub fn builder() -> crate::output::escaped_string_values_output::Builder {
         178  +
        /* ServerBuilderGenerator.kt:296 */
  107    179   
        crate::output::escaped_string_values_output::Builder::default()
         180  +
        /* ServerBuilderGenerator.kt:295 */
  108    181   
    }
         182  +
    /* ServerCodegenVisitor.kt:345 */
  109    183   
}
  110    184   
         185  +
/* StructureGenerator.kt:197 */
  111    186   
#[allow(missing_docs)] // documentation missing in model
         187  +
/* RustType.kt:516 */
  112    188   
#[derive(
  113    189   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  114    190   
)]
  115         -
pub struct PrimitiveIntOpOutput {
         191  +
pub /* StructureGenerator.kt:201 */ struct PrimitiveIntOpOutput {
         192  +
    /* StructureGenerator.kt:231 */
  116    193   
    #[allow(missing_docs)] // documentation missing in model
  117    194   
    pub value: i32,
         195  +
    /* StructureGenerator.kt:201 */
  118    196   
}
         197  +
/* StructureGenerator.kt:135 */
  119    198   
impl PrimitiveIntOpOutput {
         199  +
    /* StructureGenerator.kt:231 */
  120    200   
    #[allow(missing_docs)] // documentation missing in model
         201  +
                           /* StructureGenerator.kt:166 */
  121    202   
    pub fn value(&self) -> i32 {
         203  +
        /* StructureGenerator.kt:168 */
  122    204   
        self.value
         205  +
        /* StructureGenerator.kt:166 */
  123    206   
    }
         207  +
    /* StructureGenerator.kt:135 */
  124    208   
}
         209  +
/* ServerCodegenVisitor.kt:345 */
  125    210   
impl PrimitiveIntOpOutput {
  126         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         211  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         212  +
    /* ServerBuilderGenerator.kt:295 */
  127    213   
    pub fn builder() -> crate::output::primitive_int_op_output::Builder {
         214  +
        /* ServerBuilderGenerator.kt:296 */
  128    215   
        crate::output::primitive_int_op_output::Builder::default()
         216  +
        /* ServerBuilderGenerator.kt:295 */
  129    217   
    }
         218  +
    /* ServerCodegenVisitor.kt:345 */
  130    219   
}
  131    220   
         221  +
/* StructureGenerator.kt:197 */
  132    222   
#[allow(missing_docs)] // documentation missing in model
         223  +
/* RustType.kt:516 */
  133    224   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  134         -
pub struct MapWithEnumKeyOpOutput {
         225  +
pub /* StructureGenerator.kt:201 */ struct MapWithEnumKeyOpOutput {
         226  +
    /* StructureGenerator.kt:231 */
  135    227   
    #[allow(missing_docs)] // documentation missing in model
  136    228   
    pub map: ::std::option::Option<
  137    229   
        ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  138    230   
    >,
         231  +
    /* StructureGenerator.kt:201 */
  139    232   
}
         233  +
/* StructureGenerator.kt:135 */
  140    234   
impl MapWithEnumKeyOpOutput {
         235  +
    /* StructureGenerator.kt:231 */
  141    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* StructureGenerator.kt:166 */
  142    238   
    pub fn map(
  143    239   
        &self,
  144    240   
    ) -> ::std::option::Option<
  145    241   
        &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  146    242   
    > {
         243  +
        /* StructureGenerator.kt:170 */
  147    244   
        self.map.as_ref()
         245  +
        /* StructureGenerator.kt:166 */
  148    246   
    }
         247  +
    /* StructureGenerator.kt:135 */
  149    248   
}
         249  +
/* ServerCodegenVisitor.kt:345 */
  150    250   
impl MapWithEnumKeyOpOutput {
  151         -
    /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         251  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         252  +
    /* ServerBuilderGenerator.kt:295 */
  152    253   
    pub fn builder() -> crate::output::map_with_enum_key_op_output::Builder {
         254  +
        /* ServerBuilderGenerator.kt:296 */
  153    255   
        crate::output::map_with_enum_key_op_output::Builder::default()
         256  +
        /* ServerBuilderGenerator.kt:295 */
  154    257   
    }
         258  +
    /* ServerCodegenVisitor.kt:345 */
  155    259   
}
  156    260   
         261  +
/* StructureGenerator.kt:197 */
  157    262   
#[allow(missing_docs)] // documentation missing in model
         263  +
/* RustType.kt:516 */
  158    264   
#[derive(
  159    265   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  160    266   
)]
  161         -
pub struct StatusResponseOutput {
         267  +
pub /* StructureGenerator.kt:201 */ struct StatusResponseOutput {
         268  +
    /* StructureGenerator.kt:231 */
  162    269   
    #[allow(missing_docs)] // documentation missing in model
  163    270   
    pub field: i32,
         271  +
    /* StructureGenerator.kt:201 */
  164    272   
}
         273  +
/* StructureGenerator.kt:135 */
  165    274   
impl StatusResponseOutput {
         275  +
    /* StructureGenerator.kt:231 */
  166    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* StructureGenerator.kt:166 */
  167    278   
    pub fn field(&self) -> i32 {
         279  +
        /* StructureGenerator.kt:168 */
  168    280   
        self.field
         281  +
        /* StructureGenerator.kt:166 */
  169    282   
    }
         283  +
    /* StructureGenerator.kt:135 */
  170    284   
}
         285  +
/* ServerCodegenVisitor.kt:345 */
  171    286   
impl StatusResponseOutput {
  172         -
    /// Creates a new builder-style object to manufacture [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         287  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         288  +
    /* ServerBuilderGenerator.kt:295 */
  173    289   
    pub fn builder() -> crate::output::status_response_output::Builder {
         290  +
        /* ServerBuilderGenerator.kt:296 */
  174    291   
        crate::output::status_response_output::Builder::default()
         292  +
        /* ServerBuilderGenerator.kt:295 */
  175    293   
    }
         294  +
    /* ServerCodegenVisitor.kt:345 */
  176    295   
}
  177    296   
         297  +
/* StructureGenerator.kt:197 */
  178    298   
#[allow(missing_docs)] // documentation missing in model
         299  +
/* RustType.kt:516 */
  179    300   
#[derive(
  180    301   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  181    302   
)]
  182         -
pub struct EnumQueryOutput {}
         303  +
pub /* StructureGenerator.kt:201 */ struct EnumQueryOutput {/* StructureGenerator.kt:201 */}
         304  +
/* ServerCodegenVisitor.kt:345 */
  183    305   
impl EnumQueryOutput {
  184         -
    /// Creates a new builder-style object to manufacture [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         306  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         307  +
    /* ServerBuilderGenerator.kt:295 */
  185    308   
    pub fn builder() -> crate::output::enum_query_output::Builder {
         309  +
        /* ServerBuilderGenerator.kt:296 */
  186    310   
        crate::output::enum_query_output::Builder::default()
         311  +
        /* ServerBuilderGenerator.kt:295 */
  187    312   
    }
         313  +
    /* ServerCodegenVisitor.kt:345 */
  188    314   
}
  189    315   
         316  +
/* StructureGenerator.kt:197 */
  190    317   
#[allow(missing_docs)] // documentation missing in model
         318  +
/* RustType.kt:516 */
  191    319   
#[derive(
  192    320   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  193    321   
)]
  194         -
pub struct PrimitiveIntHeaderOutput {
         322  +
pub /* StructureGenerator.kt:201 */ struct PrimitiveIntHeaderOutput {
         323  +
    /* StructureGenerator.kt:231 */
  195    324   
    #[allow(missing_docs)] // documentation missing in model
  196    325   
    pub field: i32,
         326  +
    /* StructureGenerator.kt:201 */
  197    327   
}
         328  +
/* StructureGenerator.kt:135 */
  198    329   
impl PrimitiveIntHeaderOutput {
         330  +
    /* StructureGenerator.kt:231 */
  199    331   
    #[allow(missing_docs)] // documentation missing in model
         332  +
                           /* StructureGenerator.kt:166 */
  200    333   
    pub fn field(&self) -> i32 {
         334  +
        /* StructureGenerator.kt:168 */
  201    335   
        self.field
         336  +
        /* StructureGenerator.kt:166 */
  202    337   
    }
         338  +
    /* StructureGenerator.kt:135 */
  203    339   
}
         340  +
/* ServerCodegenVisitor.kt:345 */
  204    341   
impl PrimitiveIntHeaderOutput {
  205         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         342  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         343  +
    /* ServerBuilderGenerator.kt:295 */
  206    344   
    pub fn builder() -> crate::output::primitive_int_header_output::Builder {
         345  +
        /* ServerBuilderGenerator.kt:296 */
  207    346   
        crate::output::primitive_int_header_output::Builder::default()
         347  +
        /* ServerBuilderGenerator.kt:295 */
  208    348   
    }
         349  +
    /* ServerCodegenVisitor.kt:345 */
  209    350   
}
  210    351   
         352  +
/* StructureGenerator.kt:197 */
  211    353   
#[allow(missing_docs)] // documentation missing in model
         354  +
/* RustType.kt:516 */
  212    355   
#[derive(
  213    356   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  214    357   
)]
  215         -
pub struct StringPayloadOutput {
         358  +
pub /* StructureGenerator.kt:201 */ struct StringPayloadOutput {
         359  +
    /* StructureGenerator.kt:231 */
  216    360   
    #[allow(missing_docs)] // documentation missing in model
  217    361   
    pub payload: ::std::option::Option<::std::string::String>,
         362  +
    /* StructureGenerator.kt:201 */
  218    363   
}
         364  +
/* StructureGenerator.kt:135 */
  219    365   
impl StringPayloadOutput {
         366  +
    /* StructureGenerator.kt:231 */
  220    367   
    #[allow(missing_docs)] // documentation missing in model
         368  +
                           /* StructureGenerator.kt:166 */
  221    369   
    pub fn payload(&self) -> ::std::option::Option<&str> {
         370  +
        /* StructureGenerator.kt:169 */
  222    371   
        self.payload.as_deref()
         372  +
        /* StructureGenerator.kt:166 */
  223    373   
    }
         374  +
    /* StructureGenerator.kt:135 */
  224    375   
}
         376  +
/* ServerCodegenVisitor.kt:345 */
  225    377   
impl StringPayloadOutput {
  226         -
    /// Creates a new builder-style object to manufacture [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         378  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         379  +
    /* ServerBuilderGenerator.kt:295 */
  227    380   
    pub fn builder() -> crate::output::string_payload_output::Builder {
         381  +
        /* ServerBuilderGenerator.kt:296 */
  228    382   
        crate::output::string_payload_output::Builder::default()
         383  +
        /* ServerBuilderGenerator.kt:295 */
  229    384   
    }
         385  +
    /* ServerCodegenVisitor.kt:345 */
  230    386   
}
  231         -
/// See [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         387  +
/// /* ServerBuilderGenerator.kt:171 */See [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
  232    388   
pub mod query_precedence_output {
  233    389   
         390  +
    /* ServerBuilderGenerator.kt:461 */
  234    391   
    impl ::std::convert::From<Builder> for crate::output::QueryPrecedenceOutput {
  235    392   
        fn from(builder: Builder) -> Self {
  236    393   
            builder.build()
  237    394   
        }
  238    395   
    }
  239         -
    /// A builder for [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         396  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         397  +
    /* RustType.kt:516 */
  240    398   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  241         -
    pub struct Builder {}
         399  +
    /* ServerBuilderGenerator.kt:211 */
         400  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         401  +
    /* ServerBuilderGenerator.kt:215 */
  242    402   
    impl Builder {
  243         -
        /// Consumes the builder and constructs a [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         403  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         404  +
        /* ServerBuilderGenerator.kt:271 */
  244    405   
        pub fn build(self) -> crate::output::QueryPrecedenceOutput {
  245    406   
            self.build_enforcing_all_constraints()
  246    407   
        }
         408  +
        /* ServerBuilderGenerator.kt:283 */
  247    409   
        fn build_enforcing_all_constraints(self) -> crate::output::QueryPrecedenceOutput {
  248         -
            crate::output::QueryPrecedenceOutput {}
         410  +
            /* ServerBuilderGenerator.kt:542 */
         411  +
            crate::output::QueryPrecedenceOutput {
         412  +
            /* ServerBuilderGenerator.kt:542 */}
         413  +
            /* ServerBuilderGenerator.kt:283 */
  249    414   
        }
         415  +
        /* ServerBuilderGenerator.kt:215 */
  250    416   
    }
         417  +
         418  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  251    419   
}
  252         -
/// See [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         420  +
/// /* ServerBuilderGenerator.kt:171 */See [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
  253    421   
pub mod empty_struct_with_content_on_wire_op_output {
  254    422   
         423  +
    /* ServerBuilderGenerator.kt:461 */
  255    424   
    impl ::std::convert::From<Builder> for crate::output::EmptyStructWithContentOnWireOpOutput {
  256    425   
        fn from(builder: Builder) -> Self {
  257    426   
            builder.build()
  258    427   
        }
  259    428   
    }
  260         -
    /// A builder for [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         429  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         430  +
    /* RustType.kt:516 */
  261    431   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         432  +
    /* ServerBuilderGenerator.kt:211 */
  262    433   
    pub struct Builder {
         434  +
        /* ServerBuilderGenerator.kt:308 */
  263    435   
        pub(crate) empty: ::std::option::Option<crate::model::EmptyStruct>,
         436  +
        /* ServerBuilderGenerator.kt:211 */
  264    437   
    }
         438  +
    /* ServerBuilderGenerator.kt:215 */
  265    439   
    impl Builder {
         440  +
        /* ServerBuilderGenerator.kt:331 */
  266    441   
        #[allow(missing_docs)] // documentation missing in model
         442  +
                               /* ServerBuilderGenerator.kt:343 */
  267    443   
        pub fn empty(mut self, input: ::std::option::Option<crate::model::EmptyStruct>) -> Self {
  268         -
            self.empty = input;
         444  +
            /* ServerBuilderGenerator.kt:344 */
         445  +
            self.empty =
         446  +
                /* ServerBuilderGenerator.kt:376 */input
         447  +
            /* ServerBuilderGenerator.kt:344 */;
  269    448   
            self
         449  +
            /* ServerBuilderGenerator.kt:343 */
  270    450   
        }
  271         -
        /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         451  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         452  +
        /* ServerBuilderGenerator.kt:271 */
  272    453   
        pub fn build(self) -> crate::output::EmptyStructWithContentOnWireOpOutput {
  273    454   
            self.build_enforcing_all_constraints()
  274    455   
        }
         456  +
        /* ServerBuilderGenerator.kt:283 */
  275    457   
        fn build_enforcing_all_constraints(
  276    458   
            self,
  277    459   
        ) -> crate::output::EmptyStructWithContentOnWireOpOutput {
  278         -
            crate::output::EmptyStructWithContentOnWireOpOutput { empty: self.empty }
         460  +
            /* ServerBuilderGenerator.kt:542 */
         461  +
            crate::output::EmptyStructWithContentOnWireOpOutput {
         462  +
                /* ServerBuilderGenerator.kt:546 */
         463  +
                empty: self.empty,
         464  +
                /* ServerBuilderGenerator.kt:542 */
         465  +
            }
         466  +
            /* ServerBuilderGenerator.kt:283 */
  279    467   
        }
         468  +
        /* ServerBuilderGenerator.kt:215 */
  280    469   
    }
         470  +
         471  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  281    472   
}
  282         -
/// See [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         473  +
/// /* ServerBuilderGenerator.kt:171 */See [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
  283    474   
pub mod case_insensitive_error_operation_output {
  284    475   
         476  +
    /* ServerBuilderGenerator.kt:461 */
  285    477   
    impl ::std::convert::From<Builder> for crate::output::CaseInsensitiveErrorOperationOutput {
  286    478   
        fn from(builder: Builder) -> Self {
  287    479   
            builder.build()
  288    480   
        }
  289    481   
    }
  290         -
    /// A builder for [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         482  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         483  +
    /* RustType.kt:516 */
  291    484   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  292         -
    pub struct Builder {}
         485  +
    /* ServerBuilderGenerator.kt:211 */
         486  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         487  +
    /* ServerBuilderGenerator.kt:215 */
  293    488   
    impl Builder {
  294         -
        /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         489  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         490  +
        /* ServerBuilderGenerator.kt:271 */
  295    491   
        pub fn build(self) -> crate::output::CaseInsensitiveErrorOperationOutput {
  296    492   
            self.build_enforcing_all_constraints()
  297    493   
        }
         494  +
        /* ServerBuilderGenerator.kt:283 */
  298    495   
        fn build_enforcing_all_constraints(
  299    496   
            self,
  300    497   
        ) -> crate::output::CaseInsensitiveErrorOperationOutput {
  301         -
            crate::output::CaseInsensitiveErrorOperationOutput {}
         498  +
            /* ServerBuilderGenerator.kt:542 */
         499  +
            crate::output::CaseInsensitiveErrorOperationOutput {
         500  +
            /* ServerBuilderGenerator.kt:542 */}
         501  +
            /* ServerBuilderGenerator.kt:283 */
  302    502   
        }
         503  +
        /* ServerBuilderGenerator.kt:215 */
  303    504   
    }
         505  +
         506  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  304    507   
}
  305         -
/// See [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         508  +
/// /* ServerBuilderGenerator.kt:171 */See [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
  306    509   
pub mod null_in_non_sparse_output {
  307    510   
         511  +
    /* ServerBuilderGenerator.kt:461 */
  308    512   
    impl ::std::convert::From<Builder> for crate::output::NullInNonSparseOutput {
  309    513   
        fn from(builder: Builder) -> Self {
  310    514   
            builder.build()
  311    515   
        }
  312    516   
    }
  313         -
    /// A builder for [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         517  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         518  +
    /* RustType.kt:516 */
  314    519   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         520  +
    /* ServerBuilderGenerator.kt:211 */
  315    521   
    pub struct Builder {
         522  +
        /* ServerBuilderGenerator.kt:308 */
  316    523   
        pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         524  +
        /* ServerBuilderGenerator.kt:308 */
  317    525   
        pub(crate) map: ::std::option::Option<
  318    526   
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  319    527   
        >,
         528  +
        /* ServerBuilderGenerator.kt:308 */
  320    529   
        pub(crate) union: ::std::option::Option<crate::model::SingleElementUnion>,
         530  +
        /* ServerBuilderGenerator.kt:211 */
  321    531   
    }
         532  +
    /* ServerBuilderGenerator.kt:215 */
  322    533   
    impl Builder {
         534  +
        /* ServerBuilderGenerator.kt:331 */
  323    535   
        #[allow(missing_docs)] // documentation missing in model
         536  +
                               /* ServerBuilderGenerator.kt:343 */
  324    537   
        pub fn list(
  325    538   
            mut self,
  326    539   
            input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  327    540   
        ) -> Self {
  328         -
            self.list = input;
         541  +
            /* ServerBuilderGenerator.kt:344 */
         542  +
            self.list =
         543  +
                /* ServerBuilderGenerator.kt:376 */input
         544  +
            /* ServerBuilderGenerator.kt:344 */;
  329    545   
            self
         546  +
            /* ServerBuilderGenerator.kt:343 */
  330    547   
        }
         548  +
        /* ServerBuilderGenerator.kt:331 */
  331    549   
        #[allow(missing_docs)] // documentation missing in model
         550  +
                               /* ServerBuilderGenerator.kt:343 */
  332    551   
        pub fn map(
  333    552   
            mut self,
  334    553   
            input: ::std::option::Option<
  335    554   
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  336    555   
            >,
  337    556   
        ) -> Self {
  338         -
            self.map = input;
         557  +
            /* ServerBuilderGenerator.kt:344 */
         558  +
            self.map =
         559  +
                /* ServerBuilderGenerator.kt:376 */input
         560  +
            /* ServerBuilderGenerator.kt:344 */;
  339    561   
            self
         562  +
            /* ServerBuilderGenerator.kt:343 */
  340    563   
        }
         564  +
        /* ServerBuilderGenerator.kt:331 */
  341    565   
        #[allow(missing_docs)] // documentation missing in model
         566  +
                               /* ServerBuilderGenerator.kt:343 */
  342    567   
        pub fn union(
  343    568   
            mut self,
  344    569   
            input: ::std::option::Option<crate::model::SingleElementUnion>,
  345    570   
        ) -> Self {
  346         -
            self.union = input;
         571  +
            /* ServerBuilderGenerator.kt:344 */
         572  +
            self.union =
         573  +
                /* ServerBuilderGenerator.kt:376 */input
         574  +
            /* ServerBuilderGenerator.kt:344 */;
  347    575   
            self
         576  +
            /* ServerBuilderGenerator.kt:343 */
  348    577   
        }
  349         -
        /// Consumes the builder and constructs a [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         578  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         579  +
        /* ServerBuilderGenerator.kt:271 */
  350    580   
        pub fn build(self) -> crate::output::NullInNonSparseOutput {
  351    581   
            self.build_enforcing_all_constraints()
  352    582   
        }
         583  +
        /* ServerBuilderGenerator.kt:283 */
  353    584   
        fn build_enforcing_all_constraints(self) -> crate::output::NullInNonSparseOutput {
         585  +
            /* ServerBuilderGenerator.kt:542 */
  354    586   
            crate::output::NullInNonSparseOutput {
         587  +
                /* ServerBuilderGenerator.kt:546 */
  355    588   
                list: self.list,
         589  +
                /* ServerBuilderGenerator.kt:546 */
  356    590   
                map: self.map,
         591  +
                /* ServerBuilderGenerator.kt:546 */
  357    592   
                union: self.union,
         593  +
                /* ServerBuilderGenerator.kt:542 */
  358    594   
            }
         595  +
            /* ServerBuilderGenerator.kt:283 */
  359    596   
        }
         597  +
        /* ServerBuilderGenerator.kt:215 */
  360    598   
    }
         599  +
         600  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  361    601   
}
  362         -
/// See [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         602  +
/// /* ServerBuilderGenerator.kt:171 */See [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
  363    603   
pub mod escaped_string_values_output {
  364    604   
         605  +
    /* ServerBuilderGenerator.kt:461 */
  365    606   
    impl ::std::convert::From<Builder> for crate::output::EscapedStringValuesOutput {
  366    607   
        fn from(builder: Builder) -> Self {
  367    608   
            builder.build()
  368    609   
        }
  369    610   
    }
  370         -
    /// A builder for [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         611  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         612  +
    /* RustType.kt:516 */
  371    613   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         614  +
    /* ServerBuilderGenerator.kt:211 */
  372    615   
    pub struct Builder {
         616  +
        /* ServerBuilderGenerator.kt:308 */
  373    617   
        pub(crate) r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
         618  +
        /* ServerBuilderGenerator.kt:308 */
  374    619   
        pub(crate) some_string: ::std::option::Option<::std::string::String>,
         620  +
        /* ServerBuilderGenerator.kt:211 */
  375    621   
    }
         622  +
    /* ServerBuilderGenerator.kt:215 */
  376    623   
    impl Builder {
         624  +
        /* ServerBuilderGenerator.kt:331 */
  377    625   
        #[allow(missing_docs)] // documentation missing in model
         626  +
                               /* ServerBuilderGenerator.kt:343 */
  378    627   
        pub fn r#enum(
  379    628   
            mut self,
  380    629   
            input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  381    630   
        ) -> Self {
  382         -
            self.r#enum = input;
         631  +
            /* ServerBuilderGenerator.kt:344 */
         632  +
            self.r#enum =
         633  +
                /* ServerBuilderGenerator.kt:376 */input
         634  +
            /* ServerBuilderGenerator.kt:344 */;
  383    635   
            self
         636  +
            /* ServerBuilderGenerator.kt:343 */
  384    637   
        }
         638  +
        /* ServerBuilderGenerator.kt:331 */
  385    639   
        #[allow(missing_docs)] // documentation missing in model
         640  +
                               /* ServerBuilderGenerator.kt:343 */
  386    641   
        pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  387         -
            self.some_string = input;
         642  +
            /* ServerBuilderGenerator.kt:344 */
         643  +
            self.some_string =
         644  +
                /* ServerBuilderGenerator.kt:376 */input
         645  +
            /* ServerBuilderGenerator.kt:344 */;
  388    646   
            self
         647  +
            /* ServerBuilderGenerator.kt:343 */
  389    648   
        }
  390         -
        /// Consumes the builder and constructs a [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         649  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
         650  +
        /* ServerBuilderGenerator.kt:271 */
  391    651   
        pub fn build(self) -> crate::output::EscapedStringValuesOutput {
  392    652   
            self.build_enforcing_all_constraints()
  393    653   
        }
         654  +
        /* ServerBuilderGenerator.kt:283 */
  394    655   
        fn build_enforcing_all_constraints(self) -> crate::output::EscapedStringValuesOutput {
         656  +
            /* ServerBuilderGenerator.kt:542 */
  395    657   
            crate::output::EscapedStringValuesOutput {
         658  +
                /* ServerBuilderGenerator.kt:546 */
  396    659   
                r#enum: self.r#enum,
         660  +
                /* ServerBuilderGenerator.kt:546 */
  397    661   
                some_string: self.some_string,
         662  +
                /* ServerBuilderGenerator.kt:542 */
  398    663   
            }
         664  +
            /* ServerBuilderGenerator.kt:283 */
  399    665   
        }
         666  +
        /* ServerBuilderGenerator.kt:215 */
  400    667   
    }
         668  +
         669  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  401    670   
}
  402         -
/// See [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         671  +
/// /* ServerBuilderGenerator.kt:171 */See [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
  403    672   
pub mod primitive_int_op_output {
  404    673   
         674  +
    /* ServerBuilderGenerator.kt:461 */
  405    675   
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntOpOutput {
  406    676   
        fn from(builder: Builder) -> Self {
  407    677   
            builder.build()
  408    678   
        }
  409    679   
    }
  410         -
    /// A builder for [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         680  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         681  +
    /* RustType.kt:516 */
  411    682   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         683  +
    /* ServerBuilderGenerator.kt:211 */
  412    684   
    pub struct Builder {
         685  +
        /* ServerBuilderGenerator.kt:308 */
  413    686   
        pub(crate) value: ::std::option::Option<i32>,
         687  +
        /* ServerBuilderGenerator.kt:211 */
  414    688   
    }
         689  +
    /* ServerBuilderGenerator.kt:215 */
  415    690   
    impl Builder {
         691  +
        /* ServerBuilderGenerator.kt:331 */
  416    692   
        #[allow(missing_docs)] // documentation missing in model
         693  +
                               /* ServerBuilderGenerator.kt:343 */
  417    694   
        pub fn value(mut self, input: i32) -> Self {
  418         -
            self.value = Some(input);
         695  +
            /* ServerBuilderGenerator.kt:344 */
         696  +
            self.value =
         697  +
                /* ServerBuilderGenerator.kt:345 */Some(
         698  +
                    /* ServerBuilderGenerator.kt:376 */input
         699  +
                /* ServerBuilderGenerator.kt:345 */)
         700  +
            /* ServerBuilderGenerator.kt:344 */;
  419    701   
            self
         702  +
            /* ServerBuilderGenerator.kt:343 */
  420    703   
        }
  421         -
        /// Consumes the builder and constructs a [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         704  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         705  +
        /* ServerBuilderGenerator.kt:271 */
  422    706   
        pub fn build(self) -> crate::output::PrimitiveIntOpOutput {
  423    707   
            self.build_enforcing_all_constraints()
  424    708   
        }
         709  +
        /* ServerBuilderGenerator.kt:283 */
  425    710   
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntOpOutput {
         711  +
            /* ServerBuilderGenerator.kt:542 */
  426    712   
            crate::output::PrimitiveIntOpOutput {
  427         -
                value: self.value.unwrap_or(0i32),
         713  +
                /* ServerBuilderGenerator.kt:546 */
         714  +
                value: self
         715  +
                    .value
         716  +
                    /* ServerBuilderGeneratorCommon.kt:135 */
         717  +
                    .unwrap_or(0i32),
         718  +
                /* ServerBuilderGenerator.kt:542 */
  428    719   
            }
         720  +
            /* ServerBuilderGenerator.kt:283 */
  429    721   
        }
         722  +
        /* ServerBuilderGenerator.kt:215 */
  430    723   
    }
         724  +
         725  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  431    726   
}
  432         -
/// See [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         727  +
/// /* ServerBuilderGenerator.kt:171 */See [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  433    728   
pub mod map_with_enum_key_op_output {
  434    729   
         730  +
    /* ServerBuilderGenerator.kt:461 */
  435    731   
    impl ::std::convert::From<Builder> for crate::output::MapWithEnumKeyOpOutput {
  436    732   
        fn from(builder: Builder) -> Self {
  437    733   
            builder.build()
  438    734   
        }
  439    735   
    }
  440         -
    /// A builder for [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         736  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         737  +
    /* RustType.kt:516 */
  441    738   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         739  +
    /* ServerBuilderGenerator.kt:211 */
  442    740   
    pub struct Builder {
         741  +
        /* ServerBuilderGenerator.kt:308 */
  443    742   
        pub(crate) map: ::std::option::Option<
  444    743   
            ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  445    744   
        >,
         745  +
        /* ServerBuilderGenerator.kt:211 */
  446    746   
    }
         747  +
    /* ServerBuilderGenerator.kt:215 */
  447    748   
    impl Builder {
         749  +
        /* ServerBuilderGenerator.kt:331 */
  448    750   
        #[allow(missing_docs)] // documentation missing in model
         751  +
                               /* ServerBuilderGenerator.kt:343 */
  449    752   
        pub fn map(
  450    753   
            mut self,
  451    754   
            input: ::std::option::Option<
  452    755   
                ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  453    756   
            >,
  454    757   
        ) -> Self {
  455         -
            self.map = input;
         758  +
            /* ServerBuilderGenerator.kt:344 */
         759  +
            self.map =
         760  +
                /* ServerBuilderGenerator.kt:376 */input
         761  +
            /* ServerBuilderGenerator.kt:344 */;
  456    762   
            self
         763  +
            /* ServerBuilderGenerator.kt:343 */
  457    764   
        }
  458         -
        /// Consumes the builder and constructs a [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         765  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         766  +
        /* ServerBuilderGenerator.kt:271 */
  459    767   
        pub fn build(self) -> crate::output::MapWithEnumKeyOpOutput {
  460    768   
            self.build_enforcing_all_constraints()
  461    769   
        }
         770  +
        /* ServerBuilderGenerator.kt:283 */
  462    771   
        fn build_enforcing_all_constraints(self) -> crate::output::MapWithEnumKeyOpOutput {
  463         -
            crate::output::MapWithEnumKeyOpOutput { map: self.map }
         772  +
            /* ServerBuilderGenerator.kt:542 */
         773  +
            crate::output::MapWithEnumKeyOpOutput {
         774  +
                /* ServerBuilderGenerator.kt:546 */
         775  +
                map: self.map,
         776  +
                /* ServerBuilderGenerator.kt:542 */
         777  +
            }
         778  +
            /* ServerBuilderGenerator.kt:283 */
  464    779   
        }
         780  +
        /* ServerBuilderGenerator.kt:215 */
  465    781   
    }
         782  +
         783  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  466    784   
}
  467         -
/// See [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         785  +
/// /* ServerBuilderGenerator.kt:171 */See [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  468    786   
pub mod status_response_output {
  469    787   
         788  +
    /* ServerBuilderGenerator.kt:461 */
  470    789   
    impl ::std::convert::From<Builder> for crate::output::StatusResponseOutput {
  471    790   
        fn from(builder: Builder) -> Self {
  472    791   
            builder.build()
  473    792   
        }
  474    793   
    }
  475         -
    /// A builder for [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         794  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         795  +
    /* RustType.kt:516 */
  476    796   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         797  +
    /* ServerBuilderGenerator.kt:211 */
  477    798   
    pub struct Builder {
         799  +
        /* ServerBuilderGenerator.kt:308 */
  478    800   
        pub(crate) field: ::std::option::Option<i32>,
         801  +
        /* ServerBuilderGenerator.kt:211 */
  479    802   
    }
         803  +
    /* ServerBuilderGenerator.kt:215 */
  480    804   
    impl Builder {
         805  +
        /* ServerBuilderGenerator.kt:331 */
  481    806   
        #[allow(missing_docs)] // documentation missing in model
         807  +
                               /* ServerBuilderGenerator.kt:343 */
  482    808   
        pub fn field(mut self, input: i32) -> Self {
  483         -
            self.field = Some(input);
         809  +
            /* ServerBuilderGenerator.kt:344 */
         810  +
            self.field =
         811  +
                /* ServerBuilderGenerator.kt:345 */Some(
         812  +
                    /* ServerBuilderGenerator.kt:376 */input
         813  +
                /* ServerBuilderGenerator.kt:345 */)
         814  +
            /* ServerBuilderGenerator.kt:344 */;
  484    815   
            self
         816  +
            /* ServerBuilderGenerator.kt:343 */
  485    817   
        }
  486         -
        /// Consumes the builder and constructs a [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         818  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         819  +
        /* ServerBuilderGenerator.kt:271 */
  487    820   
        pub fn build(self) -> crate::output::StatusResponseOutput {
  488    821   
            self.build_enforcing_all_constraints()
  489    822   
        }
         823  +
        /* ServerBuilderGenerator.kt:283 */
  490    824   
        fn build_enforcing_all_constraints(self) -> crate::output::StatusResponseOutput {
         825  +
            /* ServerBuilderGenerator.kt:542 */
  491    826   
            crate::output::StatusResponseOutput {
  492         -
                field: self.field.unwrap_or(0i32),
         827  +
                /* ServerBuilderGenerator.kt:546 */
         828  +
                field: self
         829  +
                    .field
         830  +
                    /* ServerBuilderGeneratorCommon.kt:135 */
         831  +
                    .unwrap_or(0i32),
         832  +
                /* ServerBuilderGenerator.kt:542 */
  493    833   
            }
         834  +
            /* ServerBuilderGenerator.kt:283 */
  494    835   
        }
         836  +
        /* ServerBuilderGenerator.kt:215 */
  495    837   
    }
         838  +
         839  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  496    840   
}
  497         -
/// See [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         841  +
/// /* ServerBuilderGenerator.kt:171 */See [`EnumQueryOutput`](crate::output::EnumQueryOutput).
  498    842   
pub mod enum_query_output {
  499    843   
         844  +
    /* ServerBuilderGenerator.kt:461 */
  500    845   
    impl ::std::convert::From<Builder> for crate::output::EnumQueryOutput {
  501    846   
        fn from(builder: Builder) -> Self {
  502    847   
            builder.build()
  503    848   
        }
  504    849   
    }
  505         -
    /// A builder for [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         850  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         851  +
    /* RustType.kt:516 */
  506    852   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  507         -
    pub struct Builder {}
         853  +
    /* ServerBuilderGenerator.kt:211 */
         854  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         855  +
    /* ServerBuilderGenerator.kt:215 */
  508    856   
    impl Builder {
  509         -
        /// Consumes the builder and constructs a [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         857  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         858  +
        /* ServerBuilderGenerator.kt:271 */
  510    859   
        pub fn build(self) -> crate::output::EnumQueryOutput {
  511    860   
            self.build_enforcing_all_constraints()
  512    861   
        }
         862  +
        /* ServerBuilderGenerator.kt:283 */
  513    863   
        fn build_enforcing_all_constraints(self) -> crate::output::EnumQueryOutput {
  514         -
            crate::output::EnumQueryOutput {}
         864  +
            /* ServerBuilderGenerator.kt:542 */
         865  +
            crate::output::EnumQueryOutput {
         866  +
            /* ServerBuilderGenerator.kt:542 */}
         867  +
            /* ServerBuilderGenerator.kt:283 */
  515    868   
        }
         869  +
        /* ServerBuilderGenerator.kt:215 */
  516    870   
    }
         871  +
         872  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  517    873   
}
  518         -
/// See [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         874  +
/// /* ServerBuilderGenerator.kt:171 */See [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
  519    875   
pub mod primitive_int_header_output {
  520    876   
         877  +
    /* ServerBuilderGenerator.kt:461 */
  521    878   
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntHeaderOutput {
  522    879   
        fn from(builder: Builder) -> Self {
  523    880   
            builder.build()
  524    881   
        }
  525    882   
    }
  526         -
    /// A builder for [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         883  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         884  +
    /* RustType.kt:516 */
  527    885   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         886  +
    /* ServerBuilderGenerator.kt:211 */
  528    887   
    pub struct Builder {
         888  +
        /* ServerBuilderGenerator.kt:308 */
  529    889   
        pub(crate) field: ::std::option::Option<i32>,
         890  +
        /* ServerBuilderGenerator.kt:211 */
  530    891   
    }
         892  +
    /* ServerBuilderGenerator.kt:215 */
  531    893   
    impl Builder {
         894  +
        /* ServerBuilderGenerator.kt:331 */
  532    895   
        #[allow(missing_docs)] // documentation missing in model
         896  +
                               /* ServerBuilderGenerator.kt:343 */
  533    897   
        pub fn field(mut self, input: i32) -> Self {
  534         -
            self.field = Some(input);
         898  +
            /* ServerBuilderGenerator.kt:344 */
         899  +
            self.field =
         900  +
                /* ServerBuilderGenerator.kt:345 */Some(
         901  +
                    /* ServerBuilderGenerator.kt:376 */input
         902  +
                /* ServerBuilderGenerator.kt:345 */)
         903  +
            /* ServerBuilderGenerator.kt:344 */;
  535    904   
            self
         905  +
            /* ServerBuilderGenerator.kt:343 */
  536    906   
        }
  537         -
        /// Consumes the builder and constructs a [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         907  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         908  +
        /* ServerBuilderGenerator.kt:271 */
  538    909   
        pub fn build(self) -> crate::output::PrimitiveIntHeaderOutput {
  539    910   
            self.build_enforcing_all_constraints()
  540    911   
        }
         912  +
        /* ServerBuilderGenerator.kt:283 */
  541    913   
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntHeaderOutput {
         914  +
            /* ServerBuilderGenerator.kt:542 */
  542    915   
            crate::output::PrimitiveIntHeaderOutput {
  543         -
                field: self.field.unwrap_or(0i32),
         916  +
                /* ServerBuilderGenerator.kt:546 */
         917  +
                field: self
         918  +
                    .field
         919  +
                    /* ServerBuilderGeneratorCommon.kt:135 */
         920  +
                    .unwrap_or(0i32),
         921  +
                /* ServerBuilderGenerator.kt:542 */
  544    922   
            }
         923  +
            /* ServerBuilderGenerator.kt:283 */
  545    924   
        }
         925  +
        /* ServerBuilderGenerator.kt:215 */
  546    926   
    }
         927  +
         928  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  547    929   
}
  548         -
/// See [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         930  +
/// /* ServerBuilderGenerator.kt:171 */See [`StringPayloadOutput`](crate::output::StringPayloadOutput).
  549    931   
pub mod string_payload_output {
  550    932   
         933  +
    /* ServerBuilderGenerator.kt:461 */
  551    934   
    impl ::std::convert::From<Builder> for crate::output::StringPayloadOutput {
  552    935   
        fn from(builder: Builder) -> Self {
  553    936   
            builder.build()
  554    937   
        }
  555    938   
    }
  556         -
    /// A builder for [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         939  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         940  +
    /* RustType.kt:516 */
  557    941   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         942  +
    /* ServerBuilderGenerator.kt:211 */
  558    943   
    pub struct Builder {
         944  +
        /* ServerBuilderGenerator.kt:308 */
  559    945   
        pub(crate) payload: ::std::option::Option<::std::string::String>,
         946  +
        /* ServerBuilderGenerator.kt:211 */
  560    947   
    }
         948  +
    /* ServerBuilderGenerator.kt:215 */
  561    949   
    impl Builder {
         950  +
        /* ServerBuilderGenerator.kt:331 */
  562    951   
        #[allow(missing_docs)] // documentation missing in model
         952  +
                               /* ServerBuilderGenerator.kt:343 */
  563    953   
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  564         -
            self.payload = input;
         954  +
            /* ServerBuilderGenerator.kt:344 */
         955  +
            self.payload =
         956  +
                /* ServerBuilderGenerator.kt:376 */input
         957  +
            /* ServerBuilderGenerator.kt:344 */;
  565    958   
            self
         959  +
            /* ServerBuilderGenerator.kt:343 */
  566    960   
        }
  567         -
        /// Consumes the builder and constructs a [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         961  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         962  +
        /* ServerBuilderGenerator.kt:271 */
  568    963   
        pub fn build(self) -> crate::output::StringPayloadOutput {
  569    964   
            self.build_enforcing_all_constraints()
  570    965   
        }
         966  +
        /* ServerBuilderGenerator.kt:283 */
  571    967   
        fn build_enforcing_all_constraints(self) -> crate::output::StringPayloadOutput {
         968  +
            /* ServerBuilderGenerator.kt:542 */
  572    969   
            crate::output::StringPayloadOutput {
         970  +
                /* ServerBuilderGenerator.kt:546 */
  573    971   
                payload: self.payload,
         972  +
                /* ServerBuilderGenerator.kt:542 */
  574    973   
            }
         974  +
            /* ServerBuilderGenerator.kt:283 */
  575    975   
        }
         976  +
        /* ServerBuilderGenerator.kt:215 */
  576    977   
    }
         978  +
         979  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  577    980   
}

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

@@ -1,1 +59,60 @@
   20     20   
pub(crate) mod shape_status_response;
   21     21   
   22     22   
pub(crate) mod shape_string_payload;
   23     23   
   24     24   
pub(crate) mod shape_case_insensitive_error;
   25     25   
   26     26   
pub(crate) mod shape_empty_struct_with_content_on_wire_op_output;
   27     27   
   28     28   
pub(crate) mod shape_enum_query_input;
   29     29   
          30  +
/* JsonParserGenerator.kt:227 */
   30     31   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   31     32   
    if data.is_empty() {
   32     33   
        b"{}"
   33     34   
    } else {
   34     35   
        data
   35     36   
    }
   36     37   
}
   37     38   
   38     39   
pub(crate) mod shape_escaped_string_values_output;
   39     40   

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

@@ -1,1 +23,34 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_case_insensitive_error_error(
    3      4   
    value: &crate::error::CaseInsensitiveError,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_case_insensitive_error::ser_case_insensitive_error(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_case_insensitive_error(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::error::CaseInsensitiveError,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* JsonSerializerGenerator.kt:382 */
   19     26   
    if let Some(var_1) = &input.message {
          27  +
        /* JsonSerializerGenerator.kt:423 */
   20     28   
        object.key("message").string(var_1.as_str());
          29  +
        /* JsonSerializerGenerator.kt:382 */
   21     30   
    }
          31  +
    /* JsonSerializerGenerator.kt:372 */
   22     32   
    Ok(())
          33  +
    /* JsonSerializerGenerator.kt:358 */
   23     34   
}

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

@@ -1,1 +116,166 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_case_insensitive_error_operation_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::CaseInsensitiveErrorOperationInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::case_insensitive_error_operation_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:811 */
   22     30   
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   23     32   
        input.build()
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   24     34   
    })
          35  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   25     36   
}
   26     37   
          38  +
/* RustType.kt:516 */
   27     39   
#[allow(clippy::unnecessary_wraps)]
          40  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   28     41   
pub fn ser_case_insensitive_error_operation_http_response(
   29     42   
    #[allow(unused_variables)] output: crate::output::CaseInsensitiveErrorOperationOutput,
   30     43   
) -> std::result::Result<
   31     44   
    ::aws_smithy_http_server::response::Response,
   32     45   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     46   
> {
          47  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   34     48   
    Ok({
          49  +
        /* RustType.kt:516 */
   35     50   
        #[allow(unused_mut)]
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   36     52   
        let mut builder = ::http::Response::builder();
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   37     54   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   38     55   
            builder,
   39     56   
            ::http::header::CONTENT_TYPE,
   40     57   
            "application/json",
   41     58   
        );
          59  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   42     60   
        let http_status: u16 = 200;
   43     61   
        builder = builder.status(http_status);
   44         -
        let payload = "";
          62  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          63  +
        let payload =
          64  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   45     67   
        let content_length = payload.len();
   46     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   47     69   
            builder,
   48     70   
            ::http::header::CONTENT_LENGTH,
   49     71   
            content_length,
   50     72   
        );
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   51     74   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   52     76   
        builder.body(body)?
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   53     78   
    })
          79  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   54     80   
}
   55     81   
          82  +
/* RustType.kt:516 */
   56     83   
#[allow(clippy::unnecessary_wraps)]
          84  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   57     85   
pub fn ser_case_insensitive_error_operation_http_error(
   58     86   
    error: &crate::error::CaseInsensitiveErrorOperationError,
   59     87   
) -> std::result::Result<
   60     88   
    ::aws_smithy_http_server::response::Response,
   61     89   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   62     90   
> {
          91  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   63     92   
    Ok({
          93  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   64     94   
        match error {
          95  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   65     96   
            crate::error::CaseInsensitiveErrorOperationError::CaseInsensitiveError(output) => {
          97  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   66     98   
                let payload = crate::protocol_serde::shape_case_insensitive_error::ser_case_insensitive_error_error(output)?;
          99  +
                /* RustType.kt:516 */
   67    100   
                #[allow(unused_mut)]
         101  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   68    102   
                let mut builder = ::http::Response::builder();
         103  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   69    104   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   70    105   
                    builder,
   71    106   
                    ::http::header::CONTENT_TYPE,
   72    107   
                    "application/json",
   73    108   
                );
         109  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   74    110   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   75    111   
                    builder,
   76    112   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   77    113   
                    "CaseInsensitiveError",
   78    114   
                );
         115  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   79    116   
                let content_length = payload.len();
   80    117   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   81    118   
                    builder,
   82    119   
                    ::http::header::CONTENT_LENGTH,
   83    120   
                    content_length,
   84    121   
                );
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   85    123   
                builder
   86    124   
                    .status(500)
   87    125   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         126  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
   88    127   
            }
         128  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   89    129   
            crate::error::CaseInsensitiveErrorOperationError::ExtraError(output) => {
         130  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   90    131   
                let payload =
   91    132   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
         133  +
                /* RustType.kt:516 */
   92    134   
                #[allow(unused_mut)]
         135  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   93    136   
                let mut builder = ::http::Response::builder();
         137  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   94    138   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   95    139   
                    builder,
   96    140   
                    ::http::header::CONTENT_TYPE,
   97    141   
                    "application/json",
   98    142   
                );
         143  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   99    144   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  100    145   
                    builder,
  101    146   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  102    147   
                    "ExtraError",
  103    148   
                );
         149  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  104    150   
                let content_length = payload.len();
  105    151   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  106    152   
                    builder,
  107    153   
                    ::http::header::CONTENT_LENGTH,
  108    154   
                    content_length,
  109    155   
                );
         156  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  110    157   
                builder
  111    158   
                    .status(500)
  112    159   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  113         -
            }
         160  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         161  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  114    162   
        }
         163  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  115    164   
    })
         165  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  116    166   
}

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

@@ -1,1 +7,10 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_empty_struct(
    3      4   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    #[allow(unused_variables)] input: &crate::model::EmptyStruct,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:372 */
    6      8   
    Ok(())
           9  +
    /* JsonSerializerGenerator.kt:358 */
    7     10   
}

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

@@ -1,1 +95,134 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_empty_struct_with_content_on_wire_op_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::EmptyStructWithContentOnWireOpInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input =
   18     23   
            crate::input::empty_struct_with_content_on_wire_op_input::Builder::default();
          24  +
        /* RustType.kt:516 */
   19     25   
        #[allow(unused_variables)]
          26  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   20     27   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     28   
            uri, headers, body, ..
   22     29   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          30  +
        /* ServerHttpBoundProtocolGenerator.kt:811 */
   23     31   
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          32  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   24     33   
        input.build()
          34  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   25     35   
    })
          36  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   26     37   
}
   27     38   
          39  +
/* RustType.kt:516 */
   28     40   
#[allow(clippy::unnecessary_wraps)]
          41  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   29     42   
pub fn ser_empty_struct_with_content_on_wire_op_http_response(
   30     43   
    #[allow(unused_variables)] output: crate::output::EmptyStructWithContentOnWireOpOutput,
   31     44   
) -> std::result::Result<
   32     45   
    ::aws_smithy_http_server::response::Response,
   33     46   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   34     47   
> {
          48  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   35     49   
    Ok({
          50  +
        /* RustType.kt:516 */
   36     51   
        #[allow(unused_mut)]
          52  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   37     53   
        let mut builder = ::http::Response::builder();
          54  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   38     55   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   39     56   
            builder,
   40     57   
            ::http::header::CONTENT_TYPE,
   41     58   
            "application/json",
   42     59   
        );
          60  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   43     61   
        let http_status: u16 = 200;
   44     62   
        builder = builder.status(http_status);
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   45     64   
        let payload =
   46         -
            crate::protocol_serde::shape_empty_struct_with_content_on_wire_op_output::ser_empty_struct_with_content_on_wire_op_output_output_output(&output)?
   47         -
        ;
          65  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_empty_struct_with_content_on_wire_op_output::ser_empty_struct_with_content_on_wire_op_output_output_output(&output)?
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          67  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   48     68   
        let content_length = payload.len();
   49     69   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   50     70   
            builder,
   51     71   
            ::http::header::CONTENT_LENGTH,
   52     72   
            content_length,
   53     73   
        );
          74  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   54     75   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          76  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   55     77   
        builder.body(body)?
          78  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   56     79   
    })
          80  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   57     81   
}
   58     82   
          83  +
/* RustType.kt:516 */
   59     84   
#[allow(clippy::unnecessary_wraps)]
          85  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   60     86   
pub fn ser_empty_struct_with_content_on_wire_op_http_error(
   61     87   
    error: &crate::error::EmptyStructWithContentOnWireOpError,
   62     88   
) -> std::result::Result<
   63     89   
    ::aws_smithy_http_server::response::Response,
   64     90   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   65     91   
> {
          92  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   66     93   
    Ok({
          94  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   67     95   
        match error {
          96  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   68     97   
            crate::error::EmptyStructWithContentOnWireOpError::ExtraError(output) => {
          98  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   69     99   
                let payload =
   70    100   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
         101  +
                /* RustType.kt:516 */
   71    102   
                #[allow(unused_mut)]
         103  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   72    104   
                let mut builder = ::http::Response::builder();
         105  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   73    106   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   74    107   
                    builder,
   75    108   
                    ::http::header::CONTENT_TYPE,
   76    109   
                    "application/json",
   77    110   
                );
         111  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   78    112   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   79    113   
                    builder,
   80    114   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   81    115   
                    "ExtraError",
   82    116   
                );
         117  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   83    118   
                let content_length = payload.len();
   84    119   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   85    120   
                    builder,
   86    121   
                    ::http::header::CONTENT_LENGTH,
   87    122   
                    content_length,
   88    123   
                );
         124  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   89    125   
                builder
   90    126   
                    .status(500)
   91    127   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   92         -
            }
         128  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         129  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
   93    130   
        }
         131  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   94    132   
    })
         133  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   95    134   
}

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

@@ -1,1 +23,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_empty_struct_with_content_on_wire_op_output_output_output(
    3      4   
    value: &crate::output::EmptyStructWithContentOnWireOpOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_empty_struct_with_content_on_wire_op_output::ser_empty_struct_with_content_on_wire_op_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_empty_struct_with_content_on_wire_op_output_output(
   13     19   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    input: &crate::output::EmptyStructWithContentOnWireOpOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:382 */
   16     23   
    if let Some(var_1) = &input.empty {
          24  +
        /* JsonSerializerGenerator.kt:495 */
   17     25   
        #[allow(unused_mut)]
          26  +
        /* JsonSerializerGenerator.kt:496 */
   18     27   
        let mut object_2 = object.key("empty").start_object();
          28  +
        /* JsonSerializerGenerator.kt:375 */
   19     29   
        crate::protocol_serde::shape_empty_struct::ser_empty_struct(&mut object_2, var_1)?;
          30  +
        /* JsonSerializerGenerator.kt:515 */
   20     31   
        object_2.finish();
          32  +
        /* JsonSerializerGenerator.kt:382 */
   21     33   
    }
          34  +
    /* JsonSerializerGenerator.kt:372 */
   22     35   
    Ok(())
          36  +
    /* JsonSerializerGenerator.kt:358 */
   23     37   
}

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

@@ -1,1 +132,184 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_enum_query_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::EnumQueryInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::enum_query_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:986 */
   22     30   
        let input_string = uri.path();
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:998 */
   23     32   
        let (input_string, (_, m1)) =
   24     33   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   25     34   
                ::nom::sequence::preceded(
   26     35   
                    ::nom::bytes::complete::tag("/"),
   27     36   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("foo"),
   28     37   
                ),
   29     38   
                ::nom::sequence::preceded(
   30     39   
                    ::nom::bytes::complete::tag("/"),
   31     40   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   32     41   
                        ::nom::bytes::complete::take_until("/"),
   33     42   
                        ::nom::combinator::rest,
   34     43   
                    )),
   35     44   
                ),
   36     45   
            ))(input_string)?;
   37     46   
        debug_assert_eq!("", input_string);
          47  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
   38     48   
        input = input.set_enum(crate::protocol_serde::shape_enum_query_input::de_enum(m1)?);
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   39     50   
        input.build()?
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   40     52   
    })
          53  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   41     54   
}
   42     55   
          56  +
/* RustType.kt:516 */
   43     57   
#[allow(clippy::unnecessary_wraps)]
          58  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   44     59   
pub fn ser_enum_query_http_response(
   45     60   
    #[allow(unused_variables)] output: crate::output::EnumQueryOutput,
   46     61   
) -> std::result::Result<
   47     62   
    ::aws_smithy_http_server::response::Response,
   48     63   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   49     64   
> {
          65  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   50     66   
    Ok({
          67  +
        /* RustType.kt:516 */
   51     68   
        #[allow(unused_mut)]
          69  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   52     70   
        let mut builder = ::http::Response::builder();
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   53     72   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   54     73   
            builder,
   55     74   
            ::http::header::CONTENT_TYPE,
   56     75   
            "application/json",
   57     76   
        );
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   58     78   
        let http_status: u16 = 200;
   59     79   
        builder = builder.status(http_status);
   60         -
        let payload = "";
          80  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          81  +
        let payload =
          82  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          84  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   61     85   
        let content_length = payload.len();
   62     86   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   63     87   
            builder,
   64     88   
            ::http::header::CONTENT_LENGTH,
   65     89   
            content_length,
   66     90   
        );
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   67     92   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          93  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   68     94   
        builder.body(body)?
          95  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   69     96   
    })
          97  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   70     98   
}
   71     99   
         100  +
/* RustType.kt:516 */
   72    101   
#[allow(clippy::unnecessary_wraps)]
         102  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   73    103   
pub fn ser_enum_query_http_error(
   74    104   
    error: &crate::error::EnumQueryError,
   75    105   
) -> std::result::Result<
   76    106   
    ::aws_smithy_http_server::response::Response,
   77    107   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   78    108   
> {
         109  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   79    110   
    Ok({
         111  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   80    112   
        match error {
         113  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   81    114   
            crate::error::EnumQueryError::ValidationException(output) => {
         115  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   82    116   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         117  +
                /* RustType.kt:516 */
   83    118   
                #[allow(unused_mut)]
         119  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   84    120   
                let mut builder = ::http::Response::builder();
         121  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   85    122   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   86    123   
                    builder,
   87    124   
                    ::http::header::CONTENT_TYPE,
   88    125   
                    "application/json",
   89    126   
                );
         127  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   90    128   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   91    129   
                    builder,
   92    130   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   93    131   
                    "ValidationException",
   94    132   
                );
         133  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   95    134   
                let content_length = payload.len();
   96    135   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   97    136   
                    builder,
   98    137   
                    ::http::header::CONTENT_LENGTH,
   99    138   
                    content_length,
  100    139   
                );
         140  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  101    141   
                builder
  102    142   
                    .status(400)
  103    143   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         144  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
  104    145   
            }
         146  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  105    147   
            crate::error::EnumQueryError::ExtraError(output) => {
         148  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  106    149   
                let payload =
  107    150   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
         151  +
                /* RustType.kt:516 */
  108    152   
                #[allow(unused_mut)]
         153  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  109    154   
                let mut builder = ::http::Response::builder();
         155  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  110    156   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  111    157   
                    builder,
  112    158   
                    ::http::header::CONTENT_TYPE,
  113    159   
                    "application/json",
  114    160   
                );
         161  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  115    162   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  116    163   
                    builder,
  117    164   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  118    165   
                    "ExtraError",
  119    166   
                );
         167  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  120    168   
                let content_length = payload.len();
  121    169   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  122    170   
                    builder,
  123    171   
                    ::http::header::CONTENT_LENGTH,
  124    172   
                    content_length,
  125    173   
                );
         174  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  126    175   
                builder
  127    176   
                    .status(500)
  128    177   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  129         -
            }
         178  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         179  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  130    180   
        }
         181  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  131    182   
    })
         183  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  132    184   
}

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

@@ -1,1 +12,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
    2      3   
pub fn de_enum(
    3      4   
    value: &str,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::string::String,
    6      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      8   
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1302 */
    8     10   
    let value = ::percent_encoding::percent_decode_str(value)
    9     11   
        .decode_utf8()?
   10     12   
        .into_owned();
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   11     14   
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   12     16   
}

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

@@ -1,1 +186,266 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_escaped_string_values_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::EscapedStringValuesInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::escaped_string_values_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:745 */
   22     30   
        let bytes = ::hyper::body::to_bytes(body).await?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:768 */
   23     32   
        if !bytes.is_empty() {
          33  +
            /* ServerHttpBoundProtocolGenerator.kt:769 */
   24     34   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     35   
                &headers,
   26     36   
                Some("application/json"),
   27     37   
            )?;
   28     38   
            input = crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values(
   29     39   
                bytes.as_ref(),
   30     40   
                input,
   31     41   
            )?;
          42  +
            /* ServerHttpBoundProtocolGenerator.kt:768 */
   32     43   
        }
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   33     45   
        input.build()?
          46  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   34     47   
    })
          48  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   35     49   
}
   36     50   
          51  +
/* RustType.kt:516 */
   37     52   
#[allow(clippy::unnecessary_wraps)]
          53  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   38     54   
pub fn ser_escaped_string_values_http_response(
   39     55   
    #[allow(unused_variables)] output: crate::output::EscapedStringValuesOutput,
   40     56   
) -> std::result::Result<
   41     57   
    ::aws_smithy_http_server::response::Response,
   42     58   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   43     59   
> {
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   44     61   
    Ok({
          62  +
        /* RustType.kt:516 */
   45     63   
        #[allow(unused_mut)]
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   46     65   
        let mut builder = ::http::Response::builder();
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   47     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     68   
            builder,
   49     69   
            ::http::header::CONTENT_TYPE,
   50     70   
            "application/json",
   51     71   
        );
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   52     73   
        let http_status: u16 = 200;
   53     74   
        builder = builder.status(http_status);
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   54     76   
        let payload =
   55         -
            crate::protocol_serde::shape_escaped_string_values_output::ser_escaped_string_values_output_output_output(&output)?
   56         -
        ;
          77  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_escaped_string_values_output::ser_escaped_string_values_output_output_output(&output)?
          78  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   57     80   
        let content_length = payload.len();
   58     81   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     82   
            builder,
   60     83   
            ::http::header::CONTENT_LENGTH,
   61     84   
            content_length,
   62     85   
        );
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   63     87   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          88  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   64     89   
        builder.body(body)?
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   65     91   
    })
          92  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   66     93   
}
   67     94   
          95  +
/* RustType.kt:516 */
   68     96   
#[allow(clippy::unnecessary_wraps)]
          97  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   69     98   
pub fn ser_escaped_string_values_http_error(
   70     99   
    error: &crate::error::EscapedStringValuesError,
   71    100   
) -> std::result::Result<
   72    101   
    ::aws_smithy_http_server::response::Response,
   73    102   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   74    103   
> {
         104  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   75    105   
    Ok({
         106  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   76    107   
        match error {
         108  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   77    109   
            crate::error::EscapedStringValuesError::ValidationException(output) => {
         110  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   78    111   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         112  +
                /* RustType.kt:516 */
   79    113   
                #[allow(unused_mut)]
         114  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   80    115   
                let mut builder = ::http::Response::builder();
         116  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   81    117   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82    118   
                    builder,
   83    119   
                    ::http::header::CONTENT_TYPE,
   84    120   
                    "application/json",
   85    121   
                );
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   86    123   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87    124   
                    builder,
   88    125   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   89    126   
                    "ValidationException",
   90    127   
                );
         128  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   91    129   
                let content_length = payload.len();
   92    130   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   93    131   
                    builder,
   94    132   
                    ::http::header::CONTENT_LENGTH,
   95    133   
                    content_length,
   96    134   
                );
         135  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   97    136   
                builder
   98    137   
                    .status(400)
   99    138   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         139  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
  100    140   
            }
         141  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  101    142   
            crate::error::EscapedStringValuesError::ExtraError(output) => {
         143  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  102    144   
                let payload =
  103    145   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
         146  +
                /* RustType.kt:516 */
  104    147   
                #[allow(unused_mut)]
         148  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  105    149   
                let mut builder = ::http::Response::builder();
         150  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  106    151   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  107    152   
                    builder,
  108    153   
                    ::http::header::CONTENT_TYPE,
  109    154   
                    "application/json",
  110    155   
                );
         156  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  111    157   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  112    158   
                    builder,
  113    159   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  114    160   
                    "ExtraError",
  115    161   
                );
         162  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  116    163   
                let content_length = payload.len();
  117    164   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  118    165   
                    builder,
  119    166   
                    ::http::header::CONTENT_LENGTH,
  120    167   
                    content_length,
  121    168   
                );
         169  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  122    170   
                builder
  123    171   
                    .status(500)
  124    172   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  125         -
            }
         173  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         174  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  126    175   
        }
         176  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  127    177   
    })
         178  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  128    179   
}
  129    180   
         181  +
/* JsonParserGenerator.kt:148 */
  130    182   
pub(crate) fn de_escaped_string_values(
  131    183   
    value: &[u8],
  132    184   
    mut builder: crate::input::escaped_string_values_input::Builder,
  133    185   
) -> ::std::result::Result<
  134    186   
    crate::input::escaped_string_values_input::Builder,
  135    187   
    ::aws_smithy_json::deserialize::error::DeserializeError,
  136    188   
> {
         189  +
    /* JsonParserGenerator.kt:153 */
  137    190   
    let mut tokens_owned =
  138    191   
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
  139    192   
            .peekable();
  140    193   
    let tokens = &mut tokens_owned;
  141    194   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         195  +
    /* JsonParserGenerator.kt:684 */
  142    196   
    loop {
         197  +
        /* JsonParserGenerator.kt:685 */
  143    198   
        match tokens.next().transpose()? {
         199  +
            /* JsonParserGenerator.kt:686 */
  144    200   
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  145    201   
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         202  +
                /* JsonParserGenerator.kt:260 */
  146    203   
                match key.to_unescaped()?.as_ref() {
         204  +
                    /* JsonParserGenerator.kt:262 */
  147    205   
                    "enum" => {
         206  +
                        /* JsonParserGenerator.kt:272 */
  148    207   
                        builder = builder.set_enum(
         208  +
                            /* JsonParserGenerator.kt:354 */
  149    209   
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
  150    210   
                                tokens.next(),
  151    211   
                            )?
  152         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  153         -
                            .transpose()?,
         212  +
                            .map(|s|
         213  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
         214  +
                                    /* JsonParserGenerator.kt:343 */u.into_owned()
         215  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
         216  +
                            .transpose()?, /* JsonParserGenerator.kt:272 */
  154    217   
                        );
         218  +
                        /* JsonParserGenerator.kt:262 */
  155    219   
                    }
         220  +
                    /* JsonParserGenerator.kt:262 */
  156    221   
                    "also\"has\"quotes" => {
         222  +
                        /* JsonParserGenerator.kt:272 */
  157    223   
                        builder = builder.set_some_string(
         224  +
                            /* JsonParserGenerator.kt:354 */
  158    225   
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
  159    226   
                                tokens.next(),
  160    227   
                            )?
  161         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  162         -
                            .transpose()?,
         228  +
                            .map(|s|
         229  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
         230  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
         231  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
         232  +
                            .transpose()?, /* JsonParserGenerator.kt:272 */
  163    233   
                        );
         234  +
                        /* JsonParserGenerator.kt:262 */
  164    235   
                    }
  165         -
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         236  +
                    /* JsonParserGenerator.kt:290 */
         237  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  166    238   
                }
         239  +
                /* JsonParserGenerator.kt:686 */
  167    240   
            }
         241  +
            /* JsonParserGenerator.kt:695 */
  168    242   
            other => {
  169    243   
                return Err(
  170    244   
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  171    245   
                        "expected object key or end object, found: {:?}",
  172    246   
                        other
  173    247   
                    )),
  174    248   
                )
  175         -
            }
         249  +
            } /* JsonParserGenerator.kt:685 */
  176    250   
        }
         251  +
        /* JsonParserGenerator.kt:684 */
  177    252   
    }
         253  +
    /* JsonParserGenerator.kt:250 */
  178    254   
    if tokens.next().is_some() {
         255  +
        /* JsonParserGenerator.kt:251 */
  179    256   
        return Err(
  180    257   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  181    258   
                "found more JSON tokens after completing parsing",
  182    259   
            ),
  183    260   
        );
         261  +
        /* JsonParserGenerator.kt:250 */
  184    262   
    }
         263  +
    /* JsonParserGenerator.kt:163 */
  185    264   
    Ok(builder)
         265  +
    /* JsonParserGenerator.kt:148 */
  186    266   
}

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

@@ -1,1 +23,37 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_escaped_string_values_output_output_output(
    3      4   
    value: &crate::output::EscapedStringValuesOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_escaped_string_values_output::ser_escaped_string_values_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_escaped_string_values_output_output(
   13     19   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    input: &crate::output::EscapedStringValuesOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:382 */
   16     23   
    if let Some(var_1) = &input.r#enum {
          24  +
        /* JsonSerializerGenerator.kt:423 */
   17     25   
        object.key("enum").string(var_1.as_str());
          26  +
        /* JsonSerializerGenerator.kt:382 */
   18     27   
    }
          28  +
    /* JsonSerializerGenerator.kt:382 */
   19     29   
    if let Some(var_2) = &input.some_string {
          30  +
        /* JsonSerializerGenerator.kt:423 */
   20     31   
        object.key("also\"has\"quotes").string(var_2.as_str());
          32  +
        /* JsonSerializerGenerator.kt:382 */
   21     33   
    }
          34  +
    /* JsonSerializerGenerator.kt:372 */
   22     35   
    Ok(())
          36  +
    /* JsonSerializerGenerator.kt:358 */
   23     37   
}

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

@@ -1,1 +17,25 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_extra_error_error(
    3      4   
    value: &crate::error::ExtraError,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_extra_error::ser_extra_error(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_extra_error(
   13     19   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    #[allow(unused_variables)] input: &crate::error::ExtraError,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:372 */
   16     23   
    Ok(())
          24  +
    /* JsonSerializerGenerator.kt:358 */
   17     25   
}

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

@@ -1,1 +64,91 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:460 */
    2      3   
pub(crate) fn de_map_with_enum_key<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::map_with_enum_key_unconstrained::MapWithEnumKeyUnconstrained>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* JsonParserGenerator.kt:469 */
   19     23   
            let mut map = ::std::collections::HashMap::new();
          24  +
            /* JsonParserGenerator.kt:684 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:685 */
   21     27   
                match tokens.next().transpose()? {
          28  +
                    /* JsonParserGenerator.kt:686 */
   22     29   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   23     30   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   24         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   25         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   26         -
                            tokens.next(),
   27         -
                        )?
   28         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                        .transpose()?;
          31  +
                        /* JsonParserGenerator.kt:471 */
          32  +
                        let key =
          33  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          34  +
                                /* JsonParserGenerator.kt:343 */u.into_owned()
          35  +
                            /* JsonParserGenerator.kt:339 */)
          36  +
                        /* JsonParserGenerator.kt:471 */?;
          37  +
                        /* JsonParserGenerator.kt:474 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */)
          43  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                        /* JsonParserGenerator.kt:474 */;
          45  +
                        /* JsonParserGenerator.kt:481 */
   30     46   
                        match value {
   31     47   
                            Some(value) => {
   32     48   
                                map.insert(key, value);
   33     49   
                            }
   34     50   
                            None => {
   35     51   
                                return Err(
   36     52   
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                        "dense map cannot contain null values",
   38     54   
                                    ),
   39     55   
                                )
   40     56   
                            }
   41     57   
                        }
          58  +
                        /* JsonParserGenerator.kt:686 */
   42     59   
                    }
          60  +
                    /* JsonParserGenerator.kt:695 */
   43     61   
                    other => {
   44     62   
                        return Err(
   45     63   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     64   
                                format!("expected object key or end object, found: {:?}", other),
   47     65   
                            ),
   48     66   
                        )
   49         -
                    }
          67  +
                    } /* JsonParserGenerator.kt:685 */
   50     68   
                }
          69  +
                /* JsonParserGenerator.kt:684 */
   51     70   
            }
          71  +
            /* JsonParserGenerator.kt:502 */
   52     72   
            Ok(Some(
   53     73   
                crate::unconstrained::map_with_enum_key_unconstrained::MapWithEnumKeyUnconstrained(
   54     74   
                    map,
   55     75   
                ),
   56     76   
            ))
          77  +
            /* JsonParserGenerator.kt:713 */
   57     78   
        }
   58         -
        _ => Err(
   59         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   60         -
                "expected start object or null",
   61         -
            ),
   62         -
        ),
          79  +
        /* JsonParserGenerator.kt:722 */
          80  +
        _ => {
          81  +
            /* JsonParserGenerator.kt:723 */
          82  +
            Err(
          83  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          84  +
                    "expected start object or null",
          85  +
                ),
          86  +
            )
          87  +
            /* JsonParserGenerator.kt:722 */
          88  +
        } /* JsonParserGenerator.kt:712 */
   63     89   
    }
          90  +
    /* JsonParserGenerator.kt:460 */
   64     91   
}

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

@@ -1,1 +175,245 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_map_with_enum_key_op_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::MapWithEnumKeyOpInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::map_with_enum_key_op_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:745 */
   22     30   
        let bytes = ::hyper::body::to_bytes(body).await?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:768 */
   23     32   
        if !bytes.is_empty() {
          33  +
            /* ServerHttpBoundProtocolGenerator.kt:769 */
   24     34   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     35   
                &headers,
   26     36   
                Some("application/json"),
   27     37   
            )?;
   28     38   
            input = crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op(
   29     39   
                bytes.as_ref(),
   30     40   
                input,
   31     41   
            )?;
          42  +
            /* ServerHttpBoundProtocolGenerator.kt:768 */
   32     43   
        }
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   33     45   
        input.build()?
          46  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   34     47   
    })
          48  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   35     49   
}
   36     50   
          51  +
/* RustType.kt:516 */
   37     52   
#[allow(clippy::unnecessary_wraps)]
          53  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   38     54   
pub fn ser_map_with_enum_key_op_http_response(
   39     55   
    #[allow(unused_variables)] output: crate::output::MapWithEnumKeyOpOutput,
   40     56   
) -> std::result::Result<
   41     57   
    ::aws_smithy_http_server::response::Response,
   42     58   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   43     59   
> {
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   44     61   
    Ok({
          62  +
        /* RustType.kt:516 */
   45     63   
        #[allow(unused_mut)]
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   46     65   
        let mut builder = ::http::Response::builder();
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   47     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     68   
            builder,
   49     69   
            ::http::header::CONTENT_TYPE,
   50     70   
            "application/json",
   51     71   
        );
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   52     73   
        let http_status: u16 = 200;
   53     74   
        builder = builder.status(http_status);
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   54     76   
        let payload =
   55         -
            crate::protocol_serde::shape_map_with_enum_key_op_output::ser_map_with_enum_key_op_output_output_output(&output)?
   56         -
        ;
          77  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_map_with_enum_key_op_output::ser_map_with_enum_key_op_output_output_output(&output)?
          78  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   57     80   
        let content_length = payload.len();
   58     81   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     82   
            builder,
   60     83   
            ::http::header::CONTENT_LENGTH,
   61     84   
            content_length,
   62     85   
        );
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   63     87   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          88  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   64     89   
        builder.body(body)?
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   65     91   
    })
          92  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   66     93   
}
   67     94   
          95  +
/* RustType.kt:516 */
   68     96   
#[allow(clippy::unnecessary_wraps)]
          97  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   69     98   
pub fn ser_map_with_enum_key_op_http_error(
   70     99   
    error: &crate::error::MapWithEnumKeyOpError,
   71    100   
) -> std::result::Result<
   72    101   
    ::aws_smithy_http_server::response::Response,
   73    102   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   74    103   
> {
         104  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   75    105   
    Ok({
         106  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   76    107   
        match error {
         108  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   77    109   
            crate::error::MapWithEnumKeyOpError::ValidationException(output) => {
         110  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   78    111   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         112  +
                /* RustType.kt:516 */
   79    113   
                #[allow(unused_mut)]
         114  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   80    115   
                let mut builder = ::http::Response::builder();
         116  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   81    117   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82    118   
                    builder,
   83    119   
                    ::http::header::CONTENT_TYPE,
   84    120   
                    "application/json",
   85    121   
                );
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   86    123   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   87    124   
                    builder,
   88    125   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   89    126   
                    "ValidationException",
   90    127   
                );
         128  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   91    129   
                let content_length = payload.len();
   92    130   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   93    131   
                    builder,
   94    132   
                    ::http::header::CONTENT_LENGTH,
   95    133   
                    content_length,
   96    134   
                );
         135  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   97    136   
                builder
   98    137   
                    .status(400)
   99    138   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         139  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
  100    140   
            }
         141  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  101    142   
            crate::error::MapWithEnumKeyOpError::ExtraError(output) => {
         143  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  102    144   
                let payload =
  103    145   
                    crate::protocol_serde::shape_extra_error::ser_extra_error_error(output)?;
         146  +
                /* RustType.kt:516 */
  104    147   
                #[allow(unused_mut)]
         148  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  105    149   
                let mut builder = ::http::Response::builder();
         150  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  106    151   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  107    152   
                    builder,
  108    153   
                    ::http::header::CONTENT_TYPE,
  109    154   
                    "application/json",
  110    155   
                );
         156  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  111    157   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  112    158   
                    builder,
  113    159   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  114    160   
                    "ExtraError",
  115    161   
                );
         162  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  116    163   
                let content_length = payload.len();
  117    164   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  118    165   
                    builder,
  119    166   
                    ::http::header::CONTENT_LENGTH,
  120    167   
                    content_length,
  121    168   
                );
         169  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  122    170   
                builder
  123    171   
                    .status(500)
  124    172   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  125         -
            }
         173  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         174  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  126    175   
        }
         176  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  127    177   
    })
         178  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  128    179   
}
  129    180   
         181  +
/* JsonParserGenerator.kt:148 */
  130    182   
pub(crate) fn de_map_with_enum_key_op(
  131    183   
    value: &[u8],
  132    184   
    mut builder: crate::input::map_with_enum_key_op_input::Builder,
  133    185   
) -> ::std::result::Result<
  134    186   
    crate::input::map_with_enum_key_op_input::Builder,
  135    187   
    ::aws_smithy_json::deserialize::error::DeserializeError,
  136    188   
> {
         189  +
    /* JsonParserGenerator.kt:153 */
  137    190   
    let mut tokens_owned =
  138    191   
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
  139    192   
            .peekable();
  140    193   
    let tokens = &mut tokens_owned;
  141    194   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         195  +
    /* JsonParserGenerator.kt:684 */
  142    196   
    loop {
         197  +
        /* JsonParserGenerator.kt:685 */
  143    198   
        match tokens.next().transpose()? {
         199  +
            /* JsonParserGenerator.kt:686 */
  144    200   
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  145    201   
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         202  +
                /* JsonParserGenerator.kt:260 */
  146    203   
                match key.to_unescaped()?.as_ref() {
         204  +
                    /* JsonParserGenerator.kt:262 */
  147    205   
                    "map" => {
         206  +
                        /* JsonParserGenerator.kt:272 */
  148    207   
                        builder = builder.set_map(
         208  +
                            /* JsonParserGenerator.kt:509 */
  149    209   
                            crate::protocol_serde::shape_map_with_enum_key::de_map_with_enum_key(
  150    210   
                                tokens,
  151         -
                            )?,
         211  +
                            )?, /* JsonParserGenerator.kt:272 */
  152    212   
                        );
         213  +
                        /* JsonParserGenerator.kt:262 */
  153    214   
                    }
  154         -
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         215  +
                    /* JsonParserGenerator.kt:290 */
         216  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  155    217   
                }
         218  +
                /* JsonParserGenerator.kt:686 */
  156    219   
            }
         220  +
            /* JsonParserGenerator.kt:695 */
  157    221   
            other => {
  158    222   
                return Err(
  159    223   
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  160    224   
                        "expected object key or end object, found: {:?}",
  161    225   
                        other
  162    226   
                    )),
  163    227   
                )
  164         -
            }
         228  +
            } /* JsonParserGenerator.kt:685 */
  165    229   
        }
         230  +
        /* JsonParserGenerator.kt:684 */
  166    231   
    }
         232  +
    /* JsonParserGenerator.kt:250 */
  167    233   
    if tokens.next().is_some() {
         234  +
        /* JsonParserGenerator.kt:251 */
  168    235   
        return Err(
  169    236   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  170    237   
                "found more JSON tokens after completing parsing",
  171    238   
            ),
  172    239   
        );
         240  +
        /* JsonParserGenerator.kt:250 */
  173    241   
    }
         242  +
    /* JsonParserGenerator.kt:163 */
  174    243   
    Ok(builder)
         244  +
    /* JsonParserGenerator.kt:148 */
  175    245   
}