Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-server-test/misc/rust-server-codegen/src/operation.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
    2      3   
const CONTENT_TYPE_RESPONSECODEDEFAULTOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
    3      4   
::pin_project_lite::pin_project! {
    4      5   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    5      6   
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
    6      7   
    pub struct ResponseCodeDefaultOperationInputFuture {
    7      8   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    8      9   
    }
    9     10   
}
   10     11   
   11     12   
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
@@ -38,39 +131,139 @@
   58     59   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     60   
                    e,
   60     61   
                )
   61     62   
            },
   62     63   
        );
   63     64   
        ResponseCodeDefaultOperationInputFuture {
   64     65   
            inner: Box::pin(fut),
   65     66   
        }
   66     67   
    }
   67     68   
}
          69  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
   68     70   
impl
   69     71   
    ::aws_smithy_http_server::response::IntoResponse<
   70     72   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   71     73   
    > for crate::output::ResponseCodeDefaultOperationOutput
   72     74   
{
   73     75   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   74     76   
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
   75     77   
                        Ok(response) => response,
   76     78   
                        Err(e) => {
   77     79   
                            ::tracing::error!(error = %e, "failed to serialize response");
   78     80   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   79     81   
                        }
   80     82   
                    }
   81     83   
    }
   82     84   
}
   83     85   
          86  +
/* RustType.kt:516 */
   84     87   
#[allow(unreachable_code, unused_variables)]
          88  +
/* RustType.kt:516 */
   85     89   
#[cfg(test)]
          90  +
/* ProtocolTestGenerator.kt:98 */
   86     91   
mod response_code_default_operation_test {
   87     92   
   88     93   
    /// Test ID: ResponseCodeDefaultOperation
   89     94   
    #[::tokio::test]
   90     95   
    #[::tracing_test::traced_test]
   91     96   
    async fn response_code_default_operation_response() {
   92     97   
        let output = crate::output::ResponseCodeDefaultOperationOutput {};
   93     98   
        use ::aws_smithy_http_server::response::IntoResponse;
   94     99   
        let http_response = output.into_response();
   95    100   
        ::pretty_assertions::assert_eq!(
   96    101   
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
   97    102   
            http_response.status()
   98    103   
        );
   99    104   
    }
         105  +
         106  +
    /* ProtocolTestGenerator.kt:98 */
  100    107   
}
  101    108   
         109  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  102    110   
const CONTENT_TYPE_RESPONSECODEHTTPFALLBACKOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  103    111   
::pin_project_lite::pin_project! {
  104    112   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  105    113   
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
  106    114   
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
  107    115   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  108    116   
    }
  109    117   
}
  110    118   
  111    119   
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
@@ -138,146 +236,251 @@
  158    166   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  159    167   
                    e,
  160    168   
                )
  161    169   
            },
  162    170   
        );
  163    171   
        ResponseCodeHttpFallbackOperationInputFuture {
  164    172   
            inner: Box::pin(fut),
  165    173   
        }
  166    174   
    }
  167    175   
}
         176  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  168    177   
impl
  169    178   
    ::aws_smithy_http_server::response::IntoResponse<
  170    179   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  171    180   
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
  172    181   
{
  173    182   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  174    183   
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
  175    184   
                        Ok(response) => response,
  176    185   
                        Err(e) => {
  177    186   
                            ::tracing::error!(error = %e, "failed to serialize response");
  178    187   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  179    188   
                        }
  180    189   
                    }
  181    190   
    }
  182    191   
}
  183    192   
         193  +
/* RustType.kt:516 */
  184    194   
#[allow(unreachable_code, unused_variables)]
         195  +
/* RustType.kt:516 */
  185    196   
#[cfg(test)]
         197  +
/* ProtocolTestGenerator.kt:98 */
  186    198   
mod response_code_http_fallback_operation_test {
  187    199   
  188    200   
    /// Test ID: ResponseCodeHttpFallbackOperation
  189    201   
    #[::tokio::test]
  190    202   
    #[::tracing_test::traced_test]
  191    203   
    async fn response_code_http_fallback_operation_response() {
  192    204   
        let output = crate::output::ResponseCodeHttpFallbackOperationOutput {};
  193    205   
        use ::aws_smithy_http_server::response::IntoResponse;
  194    206   
        let http_response = output.into_response();
  195    207   
        ::pretty_assertions::assert_eq!(
  196    208   
            http::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
  197    209   
            http_response.status()
  198    210   
        );
  199    211   
        let expected_headers = [("Content-Length", "2")];
  200    212   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  201    213   
            http_response.headers(),
  202    214   
            expected_headers,
  203    215   
        ));
  204    216   
    }
         217  +
         218  +
    /* ProtocolTestGenerator.kt:98 */
  205    219   
}
  206    220   
         221  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  207    222   
const CONTENT_TYPE_RESPONSECODEREQUIREDOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  208    223   
::pin_project_lite::pin_project! {
  209    224   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  210    225   
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
  211    226   
    pub struct ResponseCodeRequiredOperationInputFuture {
  212    227   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  213    228   
    }
  214    229   
}
  215    230   
  216    231   
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
@@ -243,258 +341,363 @@
  263    278   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  264    279   
                    e,
  265    280   
                )
  266    281   
            },
  267    282   
        );
  268    283   
        ResponseCodeRequiredOperationInputFuture {
  269    284   
            inner: Box::pin(fut),
  270    285   
        }
  271    286   
    }
  272    287   
}
         288  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  273    289   
impl
  274    290   
    ::aws_smithy_http_server::response::IntoResponse<
  275    291   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  276    292   
    > for crate::output::ResponseCodeRequiredOperationOutput
  277    293   
{
  278    294   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  279    295   
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
  280    296   
                        Ok(response) => response,
  281    297   
                        Err(e) => {
  282    298   
                            ::tracing::error!(error = %e, "failed to serialize response");
  283    299   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  284    300   
                        }
  285    301   
                    }
  286    302   
    }
  287    303   
}
  288    304   
         305  +
/* RustType.kt:516 */
  289    306   
#[allow(unreachable_code, unused_variables)]
         307  +
/* RustType.kt:516 */
  290    308   
#[cfg(test)]
         309  +
/* ProtocolTestGenerator.kt:98 */
  291    310   
mod response_code_required_operation_test {
  292    311   
  293    312   
    /// Test ID: ResponseCodeRequiredOperation
  294    313   
    #[::tokio::test]
  295    314   
    #[::tracing_test::traced_test]
  296    315   
    async fn response_code_required_operation_response() {
  297    316   
        let output = crate::output::ResponseCodeRequiredOperationOutput { response_code: 201 };
  298    317   
        use ::aws_smithy_http_server::response::IntoResponse;
  299    318   
        let http_response = output.into_response();
  300    319   
        ::pretty_assertions::assert_eq!(
  301    320   
            http::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
  302    321   
            http_response.status()
  303    322   
        );
  304    323   
        let expected_headers = [("Content-Length", "2")];
  305    324   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  306    325   
            http_response.headers(),
  307    326   
            expected_headers,
  308    327   
        ));
  309    328   
    }
         329  +
         330  +
    /* ProtocolTestGenerator.kt:98 */
  310    331   
}
  311    332   
         333  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  312    334   
const CONTENT_TYPE_REQUIREDHEADERCOLLECTIONOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  313    335   
::pin_project_lite::pin_project! {
  314    336   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  315    337   
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
  316    338   
    pub struct RequiredHeaderCollectionOperationInputFuture {
  317    339   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  318    340   
    }
  319    341   
}
  320    342   
  321    343   
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
@@ -348,370 +441,466 @@
  368    390   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  369    391   
                    e,
  370    392   
                )
  371    393   
            },
  372    394   
        );
  373    395   
        RequiredHeaderCollectionOperationInputFuture {
  374    396   
            inner: Box::pin(fut),
  375    397   
        }
  376    398   
    }
  377    399   
}
         400  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  378    401   
impl
  379    402   
    ::aws_smithy_http_server::response::IntoResponse<
  380    403   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  381    404   
    > for crate::output::RequiredHeaderCollectionOperationOutput
  382    405   
{
  383    406   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  384    407   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
  385    408   
                        Ok(response) => response,
  386    409   
                        Err(e) => {
  387    410   
                            ::tracing::error!(error = %e, "failed to serialize response");
  388    411   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  389    412   
                        }
  390    413   
                    }
  391    414   
    }
  392    415   
}
         416  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  393    417   
impl
  394    418   
    ::aws_smithy_http_server::response::IntoResponse<
  395    419   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  396    420   
    > for crate::error::RequiredHeaderCollectionOperationError
  397    421   
{
  398    422   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  399    423   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
  400    424   
            Ok(mut response) => {
  401    425   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  402    426   
                response
  403    427   
            },
  404    428   
            Err(e) => {
  405    429   
                ::tracing::error!(error = %e, "failed to serialize response");
  406    430   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  407    431   
            }
  408    432   
        }
  409    433   
    }
  410    434   
}
  411    435   
         436  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  412    437   
const CONTENT_TYPE_REQUIREDINNERSHAPEOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  413    438   
::pin_project_lite::pin_project! {
  414    439   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  415    440   
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
  416    441   
    pub struct RequiredInnerShapeOperationInputFuture {
  417    442   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  418    443   
    }
  419    444   
}
  420    445   
  421    446   
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
@@ -448,473 +541,569 @@
  468    493   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  469    494   
                    e,
  470    495   
                )
  471    496   
            },
  472    497   
        );
  473    498   
        RequiredInnerShapeOperationInputFuture {
  474    499   
            inner: Box::pin(fut),
  475    500   
        }
  476    501   
    }
  477    502   
}
         503  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  478    504   
impl
  479    505   
    ::aws_smithy_http_server::response::IntoResponse<
  480    506   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  481    507   
    > for crate::output::RequiredInnerShapeOperationOutput
  482    508   
{
  483    509   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  484    510   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
  485    511   
                        Ok(response) => response,
  486    512   
                        Err(e) => {
  487    513   
                            ::tracing::error!(error = %e, "failed to serialize response");
  488    514   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  489    515   
                        }
  490    516   
                    }
  491    517   
    }
  492    518   
}
         519  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  493    520   
impl
  494    521   
    ::aws_smithy_http_server::response::IntoResponse<
  495    522   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  496    523   
    > for crate::error::RequiredInnerShapeOperationError
  497    524   
{
  498    525   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  499    526   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
  500    527   
            Ok(mut response) => {
  501    528   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  502    529   
                response
  503    530   
            },
  504    531   
            Err(e) => {
  505    532   
                ::tracing::error!(error = %e, "failed to serialize response");
  506    533   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  507    534   
            }
  508    535   
        }
  509    536   
    }
  510    537   
}
  511    538   
         539  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  512    540   
const CONTENT_TYPE_TYPECOMPLEXITYOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  513    541   
::pin_project_lite::pin_project! {
  514    542   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  515    543   
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
  516    544   
    pub struct TypeComplexityOperationInputFuture {
  517    545   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  518    546   
    }
  519    547   
}
  520    548   
  521    549   
impl std::future::Future for TypeComplexityOperationInputFuture {
@@ -548,576 +592,621 @@
  568    596   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  569    597   
                    e,
  570    598   
                )
  571    599   
            },
  572    600   
        );
  573    601   
        TypeComplexityOperationInputFuture {
  574    602   
            inner: Box::pin(fut),
  575    603   
        }
  576    604   
    }
  577    605   
}
         606  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  578    607   
impl
  579    608   
    ::aws_smithy_http_server::response::IntoResponse<
  580    609   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  581    610   
    > for crate::output::TypeComplexityOperationOutput
  582    611   
{
  583    612   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  584    613   
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
  585    614   
                        Ok(response) => response,
  586    615   
                        Err(e) => {
  587    616   
                            ::tracing::error!(error = %e, "failed to serialize response");

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

@@ -1,1 +0,254 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This operation tests that the response code defaults to 200 when no other code is set.
           2  +
/* ServerOperationGenerator.kt:48 */
           3  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that the response code defaults to 200 when no other code is set.
           4  +
/* ServerOperationGenerator.kt:55 */
    4      5   
pub struct ResponseCodeDefaultOperation;
    5      6   
    6      7   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
    7      8   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8      9   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    9     10   
            "aws.protocoltests.misc#ResponseCodeDefaultOperation",
   10     11   
            "aws.protocoltests.misc",
   11     12   
            "ResponseCodeDefaultOperation",
   12     13   
        );
   13     14   
   14     15   
    type Input = crate::input::ResponseCodeDefaultOperationInput;
   15     16   
    type Output = crate::output::ResponseCodeDefaultOperationOutput;
   16     17   
    type Error = std::convert::Infallible;
   17     18   
}
   18     19   
   19     20   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   20     21   
    for ResponseCodeDefaultOperation
   21     22   
{
   22     23   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   23     24   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     25   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   25     26   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   26     27   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   27     28   
        >,
   28     29   
    >;
   29     30   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   30     31   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   31     32   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   32     33   
    >;
   33     34   
   34     35   
    fn request_fmt() -> Self::RequestFmt {
   35     36   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   36     37   
    }
   37     38   
   38     39   
    fn response_fmt() -> Self::ResponseFmt {
   39     40   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   40     41   
    }
   41     42   
}
          43  +
/* ServerOperationGenerator.kt:88 */
   42     44   
   43         -
/// This operation tests that the response code defaults to `@http`'s code.
          45  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that the response code defaults to `@http`'s code.
          46  +
/* ServerOperationGenerator.kt:55 */
   44     47   
pub struct ResponseCodeHttpFallbackOperation;
   45     48   
   46     49   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeHttpFallbackOperation {
   47     50   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   48     51   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   49     52   
            "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
   50     53   
            "aws.protocoltests.misc",
   51     54   
            "ResponseCodeHttpFallbackOperation",
   52     55   
        );
   53     56   
   54     57   
    type Input = crate::input::ResponseCodeHttpFallbackOperationInput;
   55     58   
    type Output = crate::output::ResponseCodeHttpFallbackOperationOutput;
   56     59   
    type Error = std::convert::Infallible;
   57     60   
}
   58     61   
   59     62   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   60     63   
    for ResponseCodeHttpFallbackOperation
   61     64   
{
   62     65   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   63     66   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64     67   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   65     68   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   66     69   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   67     70   
        >,
   68     71   
    >;
   69     72   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   70     73   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   71     74   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   72     75   
    >;
   73     76   
   74     77   
    fn request_fmt() -> Self::RequestFmt {
   75     78   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   76     79   
    }
   77     80   
   78     81   
    fn response_fmt() -> Self::ResponseFmt {
   79     82   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   80     83   
    }
   81     84   
}
          85  +
/* ServerOperationGenerator.kt:88 */
   82     86   
   83         -
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          87  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          88  +
/* ServerOperationGenerator.kt:55 */
   84     89   
pub struct ResponseCodeRequiredOperation;
   85     90   
   86     91   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
   87     92   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   88     93   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   89     94   
            "aws.protocoltests.misc#ResponseCodeRequiredOperation",
   90     95   
            "aws.protocoltests.misc",
   91     96   
            "ResponseCodeRequiredOperation",
   92     97   
        );
   93     98   
   94     99   
    type Input = crate::input::ResponseCodeRequiredOperationInput;
   95    100   
    type Output = crate::output::ResponseCodeRequiredOperationOutput;
   96    101   
    type Error = std::convert::Infallible;
   97    102   
}
   98    103   
   99    104   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  100    105   
    for ResponseCodeRequiredOperation
  101    106   
{
  102    107   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  103    108   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104    109   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  105    110   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  106    111   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  107    112   
        >,
  108    113   
    >;
  109    114   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  110    115   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  111    116   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  112    117   
    >;
  113    118   
  114    119   
    fn request_fmt() -> Self::RequestFmt {
  115    120   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  116    121   
    }
  117    122   
  118    123   
    fn response_fmt() -> Self::ResponseFmt {
  119    124   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  120    125   
    }
  121    126   
}
         127  +
/* ServerOperationGenerator.kt:88 */
  122    128   
         129  +
/* ServerOperationGenerator.kt:48 */
  123    130   
#[allow(missing_docs)] // documentation missing in model
         131  +
                       /* ServerOperationGenerator.kt:55 */
  124    132   
pub struct RequiredHeaderCollectionOperation;
  125    133   
  126    134   
impl ::aws_smithy_http_server::operation::OperationShape for RequiredHeaderCollectionOperation {
  127    135   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  128    136   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  129    137   
            "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
  130    138   
            "aws.protocoltests.misc",
  131    139   
            "RequiredHeaderCollectionOperation",
  132    140   
        );
  133    141   
  134    142   
    type Input = crate::input::RequiredHeaderCollectionOperationInput;
  135    143   
    type Output = crate::output::RequiredHeaderCollectionOperationOutput;
  136    144   
    type Error = crate::error::RequiredHeaderCollectionOperationError;
  137    145   
}
  138    146   
  139    147   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  140    148   
    for RequiredHeaderCollectionOperation
  141    149   
{
  142    150   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  143    151   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  144    152   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  145    153   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146    154   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  147    155   
        >,
  148    156   
    >;
  149    157   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  150    158   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  151    159   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  152    160   
    >;
  153    161   
  154    162   
    fn request_fmt() -> Self::RequestFmt {
  155    163   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  156    164   
    }
  157    165   
  158    166   
    fn response_fmt() -> Self::ResponseFmt {
  159    167   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  160    168   
    }
  161    169   
}
         170  +
/* ServerOperationGenerator.kt:88 */
  162    171   
  163         -
/// This operation tests that (de)serializing required values from a nested shape works correctly.
         172  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that (de)serializing required values from a nested shape works correctly.
         173  +
/* ServerOperationGenerator.kt:55 */
  164    174   
pub struct RequiredInnerShapeOperation;
  165    175   
  166    176   
impl ::aws_smithy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
  167    177   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  168    178   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  169    179   
            "aws.protocoltests.misc#RequiredInnerShapeOperation",
  170    180   
            "aws.protocoltests.misc",
  171    181   
            "RequiredInnerShapeOperation",
  172    182   
        );
  173    183   
  174    184   
    type Input = crate::input::RequiredInnerShapeOperationInput;
  175    185   
    type Output = crate::output::RequiredInnerShapeOperationOutput;
  176    186   
    type Error = crate::error::RequiredInnerShapeOperationError;
  177    187   
}
  178    188   
  179    189   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  180    190   
    for RequiredInnerShapeOperation
  181    191   
{
  182    192   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  183    193   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184    194   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  185    195   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  186    196   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  187    197   
        >,
  188    198   
    >;
  189    199   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  190    200   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  191    201   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  192    202   
    >;
  193    203   
  194    204   
    fn request_fmt() -> Self::RequestFmt {
  195    205   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  196    206   
    }
  197    207   
  198    208   
    fn response_fmt() -> Self::ResponseFmt {
  199    209   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  200    210   
    }
  201    211   
}
         212  +
/* ServerOperationGenerator.kt:88 */
  202    213   
  203         -
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
         214  +
/// /* ServerOperationGenerator.kt:48 */An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
         215  +
/* ServerOperationGenerator.kt:55 */
  204    216   
pub struct TypeComplexityOperation;
  205    217   
  206    218   
impl ::aws_smithy_http_server::operation::OperationShape for TypeComplexityOperation {
  207    219   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  208    220   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  209    221   
            "aws.protocoltests.misc#TypeComplexityOperation",
  210    222   
            "aws.protocoltests.misc",
  211    223   
            "TypeComplexityOperation",
  212    224   
        );
  213    225   
  214    226   
    type Input = crate::input::TypeComplexityOperationInput;
  215    227   
    type Output = crate::output::TypeComplexityOperationOutput;
  216    228   
    type Error = std::convert::Infallible;
  217    229   
}
  218    230   
  219    231   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  220    232   
    for TypeComplexityOperation
  221    233   
{
  222    234   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  223    235   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  224    236   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  225    237   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  226    238   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  227    239   
        >,
  228    240   
    >;
  229    241   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  230    242   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  231    243   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  232    244   
    >;
  233    245   
  234    246   
    fn request_fmt() -> Self::RequestFmt {
  235    247   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  236    248   
    }
  237    249   
  238    250   
    fn response_fmt() -> Self::ResponseFmt {
  239    251   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  240    252   
    }
  241    253   
}
         254  +
/* ServerOperationGenerator.kt:88 */

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

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

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

@@ -1,1 +47,48 @@
    8      8   
pub(crate) mod shape_response_code_http_fallback_operation;
    9      9   
   10     10   
pub(crate) mod shape_response_code_required_operation;
   11     11   
   12     12   
pub(crate) mod shape_type_complexity_operation;
   13     13   
   14     14   
pub(crate) mod shape_required_header_collection_operation_input;
   15     15   
   16     16   
pub(crate) mod shape_required_header_collection_operation_output;
   17     17   
          18  +
/* JsonParserGenerator.kt:227 */
   18     19   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   19     20   
    if data.is_empty() {
   20     21   
        b"{}"
   21     22   
    } else {
   22     23   
        data
   23     24   
    }
   24     25   
}
   25     26   
   26     27   
pub(crate) mod shape_required_inner_shape_operation_output;
   27     28   

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

@@ -1,1 +60,83 @@
    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_a_map<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>>,
    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())?;
          31  +
                        /* JsonParserGenerator.kt:471 */
          32  +
                        let key =
          33  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          34  +
                                /* JsonParserGenerator.kt:348 */u.into_owned()
          35  +
                            /* JsonParserGenerator.kt:339 */)
          36  +
                        /* JsonParserGenerator.kt:471 */?;
          37  +
                        /* JsonParserGenerator.kt:474 */
   25     38   
                        let value =
   26         -
                            ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   27         -
                                tokens.next(),
   28         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   29         -
                            )?;
          39  +
                            /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          40  +
                        /* JsonParserGenerator.kt:474 */;
          41  +
                        /* JsonParserGenerator.kt:481 */
   30     42   
                        match value {
   31     43   
                            Some(value) => {
   32     44   
                                map.insert(key, value);
   33     45   
                            }
   34     46   
                            None => {
   35     47   
                                return Err(
   36     48   
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     49   
                                        "dense map cannot contain null values",
   38     50   
                                    ),
   39     51   
                                )
   40     52   
                            }
   41     53   
                        }
          54  +
                        /* JsonParserGenerator.kt:686 */
   42     55   
                    }
          56  +
                    /* JsonParserGenerator.kt:695 */
   43     57   
                    other => {
   44     58   
                        return Err(
   45     59   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     60   
                                format!("expected object key or end object, found: {:?}", other),
   47     61   
                            ),
   48     62   
                        )
   49         -
                    }
          63  +
                    } /* JsonParserGenerator.kt:685 */
   50     64   
                }
          65  +
                /* JsonParserGenerator.kt:684 */
   51     66   
            }
          67  +
            /* JsonParserGenerator.kt:504 */
   52     68   
            Ok(Some(map))
          69  +
            /* JsonParserGenerator.kt:713 */
   53     70   
        }
   54         -
        _ => Err(
   55         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   56         -
                "expected start object or null",
   57         -
            ),
   58         -
        ),
          71  +
        /* JsonParserGenerator.kt:722 */
          72  +
        _ => {
          73  +
            /* JsonParserGenerator.kt:723 */
          74  +
            Err(
          75  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          76  +
                    "expected start object or null",
          77  +
                ),
          78  +
            )
          79  +
            /* JsonParserGenerator.kt:722 */
          80  +
        } /* JsonParserGenerator.kt:712 */
   59     81   
    }
          82  +
    /* JsonParserGenerator.kt:460 */
   60     83   
}

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

@@ -1,1 +52,78 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::string::String>>,
    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::StartArray { .. }) => {
          22  +
            /* JsonParserGenerator.kt:407 */
   19     23   
            let mut items = Vec::new();
          24  +
            /* JsonParserGenerator.kt:408 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:409 */
   21     27   
                match tokens.peek() {
          28  +
                    /* JsonParserGenerator.kt:410 */
   22     29   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          30  +
                        /* JsonParserGenerator.kt:411 */
   23     31   
                        tokens.next().transpose().unwrap();
   24     32   
                        break;
          33  +
                        /* JsonParserGenerator.kt:410 */
   25     34   
                    }
          35  +
                    /* JsonParserGenerator.kt:413 */
   26     36   
                    _ => {
   27         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?
   30         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   31         -
                        .transpose()?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          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:419 */;
          45  +
                        /* JsonParserGenerator.kt:422 */
   32     46   
                        if let Some(value) = value {
   33     47   
                            items.push(value);
   34         -
                        } else {
          48  +
                        }
          49  +
                        /* JsonParserGenerator.kt:430 */
          50  +
                        else {
   35     51   
                            return Err(
   36     52   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                    "dense list cannot contain null values",
   38     54   
                                ),
   39     55   
                            );
   40     56   
                        }
   41         -
                    }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   42     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   43     61   
            }
          62  +
            /* JsonParserGenerator.kt:446 */
   44     63   
            Ok(Some(items))
          64  +
            /* JsonParserGenerator.kt:713 */
   45     65   
        }
   46         -
        _ => Err(
   47         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
                "expected start array or null",
   49         -
            ),
   50         -
        ),
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
          70  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          71  +
                    "expected start array or null",
          72  +
                ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   51     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   52     78   
}

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

@@ -1,1 +52,78 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_set<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::string::String>>,
    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::StartArray { .. }) => {
          22  +
            /* JsonParserGenerator.kt:407 */
   19     23   
            let mut items = Vec::new();
          24  +
            /* JsonParserGenerator.kt:408 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:409 */
   21     27   
                match tokens.peek() {
          28  +
                    /* JsonParserGenerator.kt:410 */
   22     29   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          30  +
                        /* JsonParserGenerator.kt:411 */
   23     31   
                        tokens.next().transpose().unwrap();
   24     32   
                        break;
          33  +
                        /* JsonParserGenerator.kt:410 */
   25     34   
                    }
          35  +
                    /* JsonParserGenerator.kt:413 */
   26     36   
                    _ => {
   27         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?
   30         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   31         -
                        .transpose()?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          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:419 */;
          45  +
                        /* JsonParserGenerator.kt:422 */
   32     46   
                        if let Some(value) = value {
   33     47   
                            items.push(value);
   34         -
                        } else {
          48  +
                        }
          49  +
                        /* JsonParserGenerator.kt:430 */
          50  +
                        else {
   35     51   
                            return Err(
   36     52   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                    "dense list cannot contain null values",
   38     54   
                                ),
   39     55   
                            );
   40     56   
                        }
   41         -
                    }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   42     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   43     61   
            }
          62  +
            /* JsonParserGenerator.kt:446 */
   44     63   
            Ok(Some(items))
          64  +
            /* JsonParserGenerator.kt:713 */
   45     65   
        }
   46         -
        _ => Err(
   47         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
                "expected start array or null",
   49         -
            ),
   50         -
        ),
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
          70  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          71  +
                    "expected start array or null",
          72  +
                ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   51     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   52     78   
}

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

@@ -1,1 +136,180 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:551 */
    2      3   
pub(crate) fn de_a_union<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::AUnion>,
    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:565 */
   16     18   
    let mut variant = None;
          19  +
    /* JsonParserGenerator.kt:567 */
   17     20   
    match tokens.next().transpose()? {
          21  +
        /* JsonParserGenerator.kt:568 */
   18     22   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   19         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   20         -
            match tokens.next().transpose()? {
   21         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   22         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   23         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(
   24         -
                        ::aws_smithy_json::deserialize::Token::ValueNull { .. },
   25         -
                    )) = tokens.peek()
   26         -
                    {
   27         -
                        let _ = tokens.next().expect("peek returned a token")?;
   28         -
                        continue;
   29         -
                    }
   30         -
                    let key = key.to_unescaped()?;
   31         -
                    if key == "__type" {
   32         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   33         -
                        continue;
   34         -
                    }
   35         -
                    if variant.is_some() {
   36         -
                        return Err(
   37         -
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
                                "encountered mixed variants in union",
   39         -
                            ),
   40         -
                        );
   41         -
                    }
   42         -
                    variant = match key.as_ref() {
   43         -
                        "i32" => Some(crate::model::AUnion::I32(
   44         -
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
   45         -
                                tokens.next(),
   46         -
                            )?
   47         -
                            .map(i32::try_from)
   48         -
                            .transpose()?
   49         -
                            .ok_or_else(|| {
   50         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51         -
                                    "value for 'i32' cannot be null",
   52         -
                                )
   53         -
                            })?,
   54         -
                        )),
   55         -
                        "string" => Some(crate::model::AUnion::String(
   56         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
   57         -
                                tokens.next(),
   58         -
                            )?
   59         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   60         -
                            .transpose()?
   61         -
                            .ok_or_else(|| {
   62         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63         -
                                    "value for 'string' cannot be null",
   64         -
                                )
   65         -
                            })?,
   66         -
                        )),
   67         -
                        "time" => Some(crate::model::AUnion::Time(
   68         -
                            ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   69         -
                                tokens.next(),
   70         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   71         -
                            )?
   72         -
                            .ok_or_else(|| {
   73         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   74         -
                                    "value for 'time' cannot be null",
   75         -
                                )
   76         -
                            })?,
   77         -
                        )),
   78         -
                        variant => {
          23  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          24  +
            /* JsonParserGenerator.kt:684 */
          25  +
            loop {
          26  +
                /* JsonParserGenerator.kt:685 */
          27  +
                match tokens.next().transpose()? {
          28  +
                    /* JsonParserGenerator.kt:686 */
          29  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          30  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          31  +
                        /* JsonParserGenerator.kt:576 */
          32  +
                        if let ::std::option::Option::Some(::std::result::Result::Ok(
          33  +
                            ::aws_smithy_json::deserialize::Token::ValueNull { .. },
          34  +
                        )) = tokens.peek()
          35  +
                        {
          36  +
                            let _ = tokens.next().expect("peek returned a token")?;
          37  +
                            continue;
          38  +
                        }
          39  +
                        /* JsonParserGenerator.kt:585 */
          40  +
                        let key = key.to_unescaped()?;
          41  +
                        if key == "__type" {
          42  +
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
          43  +
                            continue;
          44  +
                        }
          45  +
                        if variant.is_some() {
   79     46   
                            return Err(
   80     47   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   81         -
                                    format!("unexpected union variant: {}", variant),
          48  +
                                    "encountered mixed variants in union",
   82     49   
                                ),
   83         -
                            )
          50  +
                            );
   84     51   
                        }
   85         -
                    };
   86         -
                }
   87         -
                other => {
   88         -
                    return Err(
   89         -
                        ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   90         -
                            "expected object key or end object, found: {:?}",
   91         -
                            other
   92         -
                        )),
   93         -
                    )
          52  +
                        /* JsonParserGenerator.kt:598 */
          53  +
                        variant = match key.as_ref() {
          54  +
                            /* JsonParserGenerator.kt:601 */
          55  +
                            "i32" => {
          56  +
                                /* JsonParserGenerator.kt:611 */
          57  +
                                Some(crate::model::AUnion::I32(
          58  +
                                    /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          59  +
                                                        .map(i32::try_from)
          60  +
                                                        .transpose()?
          61  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'i32' cannot be null"))?
          62  +
                                /* JsonParserGenerator.kt:611 */))
          63  +
                                /* JsonParserGenerator.kt:601 */
          64  +
                            }
          65  +
                            /* JsonParserGenerator.kt:601 */
          66  +
                            "string" => {
          67  +
                                /* JsonParserGenerator.kt:611 */
          68  +
                                Some(crate::model::AUnion::String(
          69  +
                                    /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          70  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          71  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          72  +
                                        /* JsonParserGenerator.kt:339 */)
          73  +
                                    /* JsonParserGenerator.kt:354 */).transpose()?
          74  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'string' cannot be null"))?
          75  +
                                /* JsonParserGenerator.kt:611 */))
          76  +
                                /* JsonParserGenerator.kt:601 */
          77  +
                            }
          78  +
                            /* JsonParserGenerator.kt:601 */
          79  +
                            "time" => {
          80  +
                                /* JsonParserGenerator.kt:611 */
          81  +
                                Some(crate::model::AUnion::Time(
          82  +
                                    /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          83  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'time' cannot be null"))?
          84  +
                                /* JsonParserGenerator.kt:611 */))
          85  +
                                /* JsonParserGenerator.kt:601 */
          86  +
                            }
          87  +
                            /* JsonParserGenerator.kt:634 */
          88  +
                            variant => {
          89  +
                                return Err(
          90  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          91  +
                                        format!("unexpected union variant: {}", variant),
          92  +
                                    ),
          93  +
                                )
          94  +
                            } /* JsonParserGenerator.kt:598 */
          95  +
                        };
          96  +
                        /* JsonParserGenerator.kt:686 */
          97  +
                    }
          98  +
                    /* JsonParserGenerator.kt:695 */
          99  +
                    other => {
         100  +
                        return Err(
         101  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         102  +
                                format!("expected object key or end object, found: {:?}", other),
         103  +
                            ),
         104  +
                        )
         105  +
                    } /* JsonParserGenerator.kt:685 */
   94    106   
                }
         107  +
                /* JsonParserGenerator.kt:684 */
   95    108   
            }
   96         -
        },
         109  +
            /* JsonParserGenerator.kt:568 */
         110  +
        }
         111  +
        /* JsonParserGenerator.kt:642 */
   97    112   
        _ => {
   98    113   
            return Err(
   99    114   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  100    115   
                    "expected start object or null",
  101    116   
                ),
  102    117   
            )
  103         -
        }
         118  +
        } /* JsonParserGenerator.kt:567 */
  104    119   
    }
         120  +
    /* JsonParserGenerator.kt:649 */
  105    121   
    if variant.is_none() {
  106    122   
        return Err(
  107    123   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  108    124   
                "Union did not contain a valid variant.",
  109    125   
            ),
  110    126   
        );
  111    127   
    }
         128  +
    /* JsonParserGenerator.kt:657 */
  112    129   
    Ok(variant)
         130  +
    /* JsonParserGenerator.kt:551 */
  113    131   
}
  114    132   
         133  +
/* JsonSerializerGenerator.kt:547 */
  115    134   
pub fn ser_a_union(
  116    135   
    object_8: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  117    136   
    input: &crate::model::AUnion,
  118    137   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         138  +
    /* JsonSerializerGenerator.kt:556 */
  119    139   
    match input {
         140  +
        /* JsonSerializerGenerator.kt:564 */
  120    141   
        crate::model::AUnion::I32(inner) => {
  121         -
            object_8.key("i32").number(
  122         -
                #[allow(clippy::useless_conversion)]
  123         -
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  124         -
            );
         142  +
            /* SerializerUtil.kt:42 */
         143  +
            {
         144  +
                /* JsonSerializerGenerator.kt:432 */
         145  +
                object_8.key("i32").number(
         146  +
                    #[allow(clippy::useless_conversion)]
         147  +
                    ::aws_smithy_types::Number::NegInt((*inner).into()),
         148  +
                );
         149  +
                /* SerializerUtil.kt:42 */
         150  +
            }
         151  +
            /* JsonSerializerGenerator.kt:564 */
  125    152   
        }
         153  +
        /* JsonSerializerGenerator.kt:564 */
  126    154   
        crate::model::AUnion::String(inner) => {
  127         -
            object_8.key("string").string(inner.as_str());
         155  +
            /* SerializerUtil.kt:42 */
         156  +
            {
         157  +
                /* JsonSerializerGenerator.kt:423 */
         158  +
                object_8.key("string").string(inner.as_str());
         159  +
                /* SerializerUtil.kt:42 */
         160  +
            }
         161  +
            /* JsonSerializerGenerator.kt:564 */
  128    162   
        }
         163  +
        /* JsonSerializerGenerator.kt:564 */
  129    164   
        crate::model::AUnion::Time(inner) => {
  130         -
            object_8
  131         -
                .key("time")
  132         -
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         165  +
            /* SerializerUtil.kt:42 */
         166  +
            {
         167  +
                /* JsonSerializerGenerator.kt:448 */
         168  +
                object_8
         169  +
                    .key("time")
         170  +
                    .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         171  +
                /* SerializerUtil.kt:42 */
         172  +
            }
         173  +
            /* JsonSerializerGenerator.kt:564 */
  133    174   
        }
         175  +
        /* JsonSerializerGenerator.kt:556 */
  134    176   
    }
         177  +
    /* JsonSerializerGenerator.kt:576 */
  135    178   
    Ok(())
         179  +
    /* JsonSerializerGenerator.kt:547 */
  136    180   
}

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

@@ -1,1 +37,54 @@
    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_structure(
    3      4   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    #[allow(unused_variables)] input: &crate::model::EmptyStructure,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:372 */
    6      8   
    Ok(())
           9  +
    /* JsonSerializerGenerator.kt:358 */
    7     10   
}
    8     11   
          12  +
/* JsonParserGenerator.kt:516 */
    9     13   
pub(crate) fn de_empty_structure<'a, I>(
   10     14   
    tokens: &mut ::std::iter::Peekable<I>,
   11     15   
) -> ::std::result::Result<
   12     16   
    Option<crate::model::EmptyStructure>,
   13     17   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   14     18   
>
   15     19   
where
   16     20   
    I: Iterator<
   17     21   
        Item = Result<
   18     22   
            ::aws_smithy_json::deserialize::Token<'a>,
   19     23   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   20     24   
        >,
   21     25   
    >,
   22     26   
{
          27  +
    /* JsonParserGenerator.kt:712 */
   23     28   
    match tokens.next().transpose()? {
          29  +
        /* JsonParserGenerator.kt:713 */
   24     30   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   25     31   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          32  +
            /* RustType.kt:516 */
   26     33   
            #[allow(unused_mut)]
          34  +
            /* JsonParserGenerator.kt:526 */
   27     35   
            let mut builder = crate::model::empty_structure::Builder::default();
          36  +
            /* JsonParserGenerator.kt:682 */
   28     37   
            ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
          38  +
            /* JsonParserGenerator.kt:540 */
   29     39   
            Ok(Some(builder.build()))
          40  +
            /* JsonParserGenerator.kt:713 */
   30     41   
        }
   31         -
        _ => Err(
   32         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   33         -
                "expected start object or null",
   34         -
            ),
   35         -
        ),
          42  +
        /* JsonParserGenerator.kt:722 */
          43  +
        _ => {
          44  +
            /* JsonParserGenerator.kt:723 */
          45  +
            Err(
          46  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          47  +
                    "expected start object or null",
          48  +
                ),
          49  +
            )
          50  +
            /* JsonParserGenerator.kt:722 */
          51  +
        } /* JsonParserGenerator.kt:712 */
   36     52   
    }
          53  +
    /* JsonParserGenerator.kt:516 */
   37     54   
}

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

@@ -1,1 +69,102 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_inner_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::inner_shape::Builder>,
    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  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::inner_shape::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     32   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
   25     34   
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
   26     36   
                            "requiredInnerMostShape" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
   27     38   
                                if let Some(v) =
   28         -
                                crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?
   29         -
                                {
          39  +
                                /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?
          40  +
                                /* JsonParserGenerator.kt:278 */{
   30     41   
                                                                            builder = builder.set_required_inner_most_shape(v);
   31     42   
                                                                        }
          43  +
                                /* JsonParserGenerator.kt:262 */
   32     44   
                            }
   33         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          45  +
                            /* JsonParserGenerator.kt:290 */
          46  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   34     47   
                        }
          48  +
                        /* JsonParserGenerator.kt:686 */
   35     49   
                    }
          50  +
                    /* JsonParserGenerator.kt:695 */
   36     51   
                    other => {
   37     52   
                        return Err(
   38     53   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     54   
                                format!("expected object key or end object, found: {:?}", other),
   40     55   
                            ),
   41     56   
                        )
   42         -
                    }
          57  +
                    } /* JsonParserGenerator.kt:685 */
   43     58   
                }
          59  +
                /* JsonParserGenerator.kt:684 */
   44     60   
            }
          61  +
            /* JsonParserGenerator.kt:540 */
   45     62   
            Ok(Some(builder))
          63  +
            /* JsonParserGenerator.kt:713 */
   46     64   
        }
   47         -
        _ => Err(
   48         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   49         -
                "expected start object or null",
   50         -
            ),
   51         -
        ),
          65  +
        /* JsonParserGenerator.kt:722 */
          66  +
        _ => {
          67  +
            /* JsonParserGenerator.kt:723 */
          68  +
            Err(
          69  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          70  +
                    "expected start object or null",
          71  +
                ),
          72  +
            )
          73  +
            /* JsonParserGenerator.kt:722 */
          74  +
        } /* JsonParserGenerator.kt:712 */
   52     75   
    }
          76  +
    /* JsonParserGenerator.kt:516 */
   53     77   
}
   54     78   
          79  +
/* JsonSerializerGenerator.kt:358 */
   55     80   
pub fn ser_inner_shape(
   56     81   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   57     82   
    input: &crate::model::InnerShape,
   58     83   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          84  +
    /* SerializerUtil.kt:42 */
   59     85   
    {
          86  +
        /* JsonSerializerGenerator.kt:495 */
   60     87   
        #[allow(unused_mut)]
          88  +
        /* JsonSerializerGenerator.kt:496 */
   61     89   
        let mut object_1 = object.key("requiredInnerMostShape").start_object();
          90  +
        /* JsonSerializerGenerator.kt:375 */
   62     91   
        crate::protocol_serde::shape_innermost_shape::ser_innermost_shape(
   63     92   
            &mut object_1,
   64     93   
            &input.required_inner_most_shape,
   65     94   
        )?;
          95  +
        /* JsonSerializerGenerator.kt:515 */
   66     96   
        object_1.finish();
          97  +
        /* SerializerUtil.kt:42 */
   67     98   
    }
          99  +
    /* JsonSerializerGenerator.kt:372 */
   68    100   
    Ok(())
         101  +
    /* JsonSerializerGenerator.kt:358 */
   69    102   
}

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

@@ -1,1 +290,405 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_innermost_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::innermost_shape::Builder>,
    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  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::innermost_shape::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key
   25         -
                        .to_unescaped()?
   26         -
                        .as_ref()
   27         -
                    {
   28         -
                        "aString" => {
   29         -
                            if let Some(v) =
   30         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(
   31         -
                                    tokens.next(),
   32         -
                                )?
   33         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   34         -
                                .transpose()?
   35         -
                            {
   36         -
                                builder = builder.set_a_string(v);
          32  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
          34  +
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
          36  +
                            "aString" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
          38  +
                                if let Some(v) =
          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:278 */{
          45  +
                                                                            builder = builder.set_a_string(v);
          46  +
                                                                        }
          47  +
                                /* JsonParserGenerator.kt:262 */
   37     48   
                            }
   38         -
                        }
   39         -
                        "aBoolean" => {
   40         -
                            if let Some(v) =
   41         -
                                ::aws_smithy_json::deserialize::token::expect_bool_or_null(
   42         -
                                    tokens.next(),
   43         -
                                )?
   44         -
                            {
   45         -
                                builder = builder.set_a_boolean(v);
          49  +
                            /* JsonParserGenerator.kt:262 */
          50  +
                            "aBoolean" => {
          51  +
                                /* JsonParserGenerator.kt:276 */
          52  +
                                if let Some(v) =
          53  +
                                /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
          54  +
                                /* JsonParserGenerator.kt:278 */{
          55  +
                                                                            builder = builder.set_a_boolean(v);
          56  +
                                                                        }
          57  +
                                /* JsonParserGenerator.kt:262 */
   46     58   
                            }
   47         -
                        }
   48         -
                        "aByte" => {
   49         -
                            if let Some(v) =
   50         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   51         -
                                    tokens.next(),
   52         -
                                )?
   53         -
                                .map(i8::try_from)
   54         -
                                .transpose()?
   55         -
                            {
   56         -
                                builder = builder.set_a_byte(v);
          59  +
                            /* JsonParserGenerator.kt:262 */
          60  +
                            "aByte" => {
          61  +
                                /* JsonParserGenerator.kt:276 */
          62  +
                                if let Some(v) =
          63  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          64  +
                                                    .map(i8::try_from)
          65  +
                                                    .transpose()?
          66  +
                                /* JsonParserGenerator.kt:278 */{
          67  +
                                                                            builder = builder.set_a_byte(v);
          68  +
                                                                        }
          69  +
                                /* JsonParserGenerator.kt:262 */
   57     70   
                            }
   58         -
                        }
   59         -
                        "aShort" => {
   60         -
                            if let Some(v) =
   61         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   62         -
                                    tokens.next(),
   63         -
                                )?
   64         -
                                .map(i16::try_from)
   65         -
                                .transpose()?
   66         -
                            {
   67         -
                                builder = builder.set_a_short(v);
          71  +
                            /* JsonParserGenerator.kt:262 */
          72  +
                            "aShort" => {
          73  +
                                /* JsonParserGenerator.kt:276 */
          74  +
                                if let Some(v) =
          75  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          76  +
                                                    .map(i16::try_from)
          77  +
                                                    .transpose()?
          78  +
                                /* JsonParserGenerator.kt:278 */{
          79  +
                                                                            builder = builder.set_a_short(v);
          80  +
                                                                        }
          81  +
                                /* JsonParserGenerator.kt:262 */
   68     82   
                            }
   69         -
                        }
   70         -
                        "anInt" => {
   71         -
                            if let Some(v) =
   72         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   73         -
                                    tokens.next(),
   74         -
                                )?
   75         -
                                .map(i32::try_from)
   76         -
                                .transpose()?
   77         -
                            {
   78         -
                                builder = builder.set_an_int(v);
          83  +
                            /* JsonParserGenerator.kt:262 */
          84  +
                            "anInt" => {
          85  +
                                /* JsonParserGenerator.kt:276 */
          86  +
                                if let Some(v) =
          87  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          88  +
                                                    .map(i32::try_from)
          89  +
                                                    .transpose()?
          90  +
                                /* JsonParserGenerator.kt:278 */{
          91  +
                                                                            builder = builder.set_an_int(v);
          92  +
                                                                        }
          93  +
                                /* JsonParserGenerator.kt:262 */
   79     94   
                            }
   80         -
                        }
   81         -
                        "aLong" => {
   82         -
                            if let Some(v) =
   83         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   84         -
                                    tokens.next(),
   85         -
                                )?
   86         -
                                .map(i64::try_from)
   87         -
                                .transpose()?
   88         -
                            {
   89         -
                                builder = builder.set_a_long(v);
          95  +
                            /* JsonParserGenerator.kt:262 */
          96  +
                            "aLong" => {
          97  +
                                /* JsonParserGenerator.kt:276 */
          98  +
                                if let Some(v) =
          99  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         100  +
                                                    .map(i64::try_from)
         101  +
                                                    .transpose()?
         102  +
                                /* JsonParserGenerator.kt:278 */{
         103  +
                                                                            builder = builder.set_a_long(v);
         104  +
                                                                        }
         105  +
                                /* JsonParserGenerator.kt:262 */
   90    106   
                            }
   91         -
                        }
   92         -
                        "aFloat" => {
   93         -
                            if let Some(v) =
   94         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   95         -
                                    tokens.next(),
   96         -
                                )?
   97         -
                                .map(|v| v.to_f32_lossy())
   98         -
                            {
   99         -
                                builder = builder.set_a_float(v);
         107  +
                            /* JsonParserGenerator.kt:262 */
         108  +
                            "aFloat" => {
         109  +
                                /* JsonParserGenerator.kt:276 */
         110  +
                                if let Some(v) =
         111  +
                                /* JsonParserGenerator.kt:361 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy())
         112  +
                                /* JsonParserGenerator.kt:278 */{
         113  +
                                                                            builder = builder.set_a_float(v);
         114  +
                                                                        }
         115  +
                                /* JsonParserGenerator.kt:262 */
  100    116   
                            }
  101         -
                        }
  102         -
                        "aDouble" => {
  103         -
                            if let Some(v) =
  104         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
  105         -
                                    tokens.next(),
  106         -
                                )?
  107         -
                                .map(|v| v.to_f64_lossy())
  108         -
                            {
  109         -
                                builder = builder.set_a_double(v);
         117  +
                            /* JsonParserGenerator.kt:262 */
         118  +
                            "aDouble" => {
         119  +
                                /* JsonParserGenerator.kt:276 */
         120  +
                                if let Some(v) =
         121  +
                                /* JsonParserGenerator.kt:363 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())
         122  +
                                /* JsonParserGenerator.kt:278 */{
         123  +
                                                                            builder = builder.set_a_double(v);
         124  +
                                                                        }
         125  +
                                /* JsonParserGenerator.kt:262 */
  110    126   
                            }
  111         -
                        }
  112         -
                        "aTimestamp" => {
  113         -
                            if let Some(v) =
  114         -
                                ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  115         -
                                    tokens.next(),
  116         -
                                    ::aws_smithy_types::date_time::Format::EpochSeconds,
  117         -
                                )?
  118         -
                            {
  119         -
                                builder = builder.set_a_timestamp(v);
         127  +
                            /* JsonParserGenerator.kt:262 */
         128  +
                            "aTimestamp" => {
         129  +
                                /* JsonParserGenerator.kt:276 */
         130  +
                                if let Some(v) =
         131  +
                                /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
         132  +
                                /* JsonParserGenerator.kt:278 */{
         133  +
                                                                            builder = builder.set_a_timestamp(v);
         134  +
                                                                        }
         135  +
                                /* JsonParserGenerator.kt:262 */
  120    136   
                            }
  121         -
                        }
  122         -
                        "aDocument" => {
  123         -
                            if let Some(v) =
  124         -
                                ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  125         -
                                    tokens.next(),
  126         -
                                    ::aws_smithy_types::date_time::Format::EpochSeconds,
  127         -
                                )?
  128         -
                            {
  129         -
                                builder = builder.set_a_document(v);
         137  +
                            /* JsonParserGenerator.kt:262 */
         138  +
                            "aDocument" => {
         139  +
                                /* JsonParserGenerator.kt:276 */
         140  +
                                if let Some(v) =
         141  +
                                /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
         142  +
                                /* JsonParserGenerator.kt:278 */{
         143  +
                                                                            builder = builder.set_a_document(v);
         144  +
                                                                        }
         145  +
                                /* JsonParserGenerator.kt:262 */
  130    146   
                            }
  131         -
                        }
  132         -
                        "aStringList" => {
  133         -
                            if let Some(v) =
  134         -
                                crate::protocol_serde::shape_a_string_list::de_a_string_list(
  135         -
                                    tokens,
  136         -
                                )?
  137         -
                            {
  138         -
                                builder = builder.set_a_string_list(v);
         147  +
                            /* JsonParserGenerator.kt:262 */
         148  +
                            "aStringList" => {
         149  +
                                /* JsonParserGenerator.kt:276 */
         150  +
                                if let Some(v) =
         151  +
                                /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_a_string_list::de_a_string_list(tokens)?
         152  +
                                /* JsonParserGenerator.kt:278 */{
         153  +
                                                                            builder = builder.set_a_string_list(v);
         154  +
                                                                        }
         155  +
                                /* JsonParserGenerator.kt:262 */
  139    156   
                            }
  140         -
                        }
  141         -
                        "aStringMap" => {
  142         -
                            if let Some(v) = crate::protocol_serde::shape_a_map::de_a_map(tokens)? {
  143         -
                                builder = builder.set_a_string_map(v);
         157  +
                            /* JsonParserGenerator.kt:262 */
         158  +
                            "aStringMap" => {
         159  +
                                /* JsonParserGenerator.kt:276 */
         160  +
                                if let Some(v) =
         161  +
                                    /* JsonParserGenerator.kt:509 */
         162  +
                                    crate::protocol_serde::shape_a_map::de_a_map(tokens)?
         163  +
                                /* JsonParserGenerator.kt:278 */
         164  +
                                {
         165  +
                                    builder = builder.set_a_string_map(v);
         166  +
                                }
         167  +
                                /* JsonParserGenerator.kt:262 */
  144    168   
                            }
  145         -
                        }
  146         -
                        "aStringSet" => {
  147         -
                            if let Some(v) =
  148         -
                                crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?
  149         -
                            {
  150         -
                                builder = builder.set_a_string_set(v);
         169  +
                            /* JsonParserGenerator.kt:262 */
         170  +
                            "aStringSet" => {
         171  +
                                /* JsonParserGenerator.kt:276 */
         172  +
                                if let Some(v) =
         173  +
                                /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?
         174  +
                                /* JsonParserGenerator.kt:278 */{
         175  +
                                                                            builder = builder.set_a_string_set(v);
         176  +
                                                                        }
         177  +
                                /* JsonParserGenerator.kt:262 */
  151    178   
                            }
  152         -
                        }
  153         -
                        "aBlob" => {
  154         -
                            if let Some(v) =
  155         -
                                ::aws_smithy_json::deserialize::token::expect_blob_or_null(
  156         -
                                    tokens.next(),
  157         -
                                )?
  158         -
                            {
  159         -
                                builder = builder.set_a_blob(v);
         179  +
                            /* JsonParserGenerator.kt:262 */
         180  +
                            "aBlob" => {
         181  +
                                /* JsonParserGenerator.kt:276 */
         182  +
                                if let Some(v) =
         183  +
                                /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
         184  +
                                /* JsonParserGenerator.kt:278 */{
         185  +
                                                                            builder = builder.set_a_blob(v);
         186  +
                                                                        }
         187  +
                                /* JsonParserGenerator.kt:262 */
  160    188   
                            }
  161         -
                        }
  162         -
                        "aUnion" => {
  163         -
                            if let Some(v) =
  164         -
                                crate::protocol_serde::shape_a_union::de_a_union(tokens)?
  165         -
                            {
  166         -
                                builder = builder.set_a_union(v);
         189  +
                            /* JsonParserGenerator.kt:262 */
         190  +
                            "aUnion" => {
         191  +
                                /* JsonParserGenerator.kt:276 */
         192  +
                                if let Some(v) =
         193  +
                                    /* JsonParserGenerator.kt:660 */
         194  +
                                    crate::protocol_serde::shape_a_union::de_a_union(tokens)?
         195  +
                                /* JsonParserGenerator.kt:278 */
         196  +
                                {
         197  +
                                    builder = builder.set_a_union(v);
         198  +
                                }
         199  +
                                /* JsonParserGenerator.kt:262 */
  167    200   
                            }
         201  +
                            /* JsonParserGenerator.kt:290 */
         202  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  168    203   
                        }
  169         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  170         -
                    },
         204  +
                        /* JsonParserGenerator.kt:686 */
         205  +
                    }
         206  +
                    /* JsonParserGenerator.kt:695 */
  171    207   
                    other => {
  172    208   
                        return Err(
  173    209   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  174    210   
                                format!("expected object key or end object, found: {:?}", other),
  175    211   
                            ),
  176    212   
                        )
  177         -
                    }
         213  +
                    } /* JsonParserGenerator.kt:685 */
  178    214   
                }
         215  +
                /* JsonParserGenerator.kt:684 */
  179    216   
            }
         217  +
            /* JsonParserGenerator.kt:540 */
  180    218   
            Ok(Some(builder))
         219  +
            /* JsonParserGenerator.kt:713 */
  181    220   
        }
  182         -
        _ => Err(
  183         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  184         -
                "expected start object or null",
  185         -
            ),
  186         -
        ),
         221  +
        /* JsonParserGenerator.kt:722 */
         222  +
        _ => {
         223  +
            /* JsonParserGenerator.kt:723 */
         224  +
            Err(
         225  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         226  +
                    "expected start object or null",
         227  +
                ),
         228  +
            )
         229  +
            /* JsonParserGenerator.kt:722 */
         230  +
        } /* JsonParserGenerator.kt:712 */
  187    231   
    }
         232  +
    /* JsonParserGenerator.kt:516 */
  188    233   
}
  189    234   
         235  +
/* JsonSerializerGenerator.kt:358 */
  190    236   
pub fn ser_innermost_shape(
  191    237   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  192    238   
    input: &crate::model::InnermostShape,
  193    239   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         240  +
    /* SerializerUtil.kt:42 */
  194    241   
    {
         242  +
        /* JsonSerializerGenerator.kt:423 */
  195    243   
        object.key("aString").string(input.a_string.as_str());
         244  +
        /* SerializerUtil.kt:42 */
  196    245   
    }
         246  +
    /* SerializerUtil.kt:42 */
  197    247   
    {
         248  +
        /* JsonSerializerGenerator.kt:424 */
  198    249   
        object.key("aBoolean").boolean(input.a_boolean);
         250  +
        /* SerializerUtil.kt:42 */
  199    251   
    }
         252  +
    /* SerializerUtil.kt:42 */
  200    253   
    {
         254  +
        /* JsonSerializerGenerator.kt:432 */
  201    255   
        object.key("aByte").number(
  202    256   
            #[allow(clippy::useless_conversion)]
  203    257   
            ::aws_smithy_types::Number::NegInt((input.a_byte).into()),
  204    258   
        );
         259  +
        /* SerializerUtil.kt:42 */
  205    260   
    }
         261  +
    /* SerializerUtil.kt:42 */
  206    262   
    {
         263  +
        /* JsonSerializerGenerator.kt:432 */
  207    264   
        object.key("aShort").number(
  208    265   
            #[allow(clippy::useless_conversion)]
  209    266   
            ::aws_smithy_types::Number::NegInt((input.a_short).into()),
  210    267   
        );
         268  +
        /* SerializerUtil.kt:42 */
  211    269   
    }
         270  +
    /* SerializerUtil.kt:42 */
  212    271   
    {
         272  +
        /* JsonSerializerGenerator.kt:432 */
  213    273   
        object.key("anInt").number(
  214    274   
            #[allow(clippy::useless_conversion)]
  215    275   
            ::aws_smithy_types::Number::NegInt((input.an_int).into()),
  216    276   
        );
         277  +
        /* SerializerUtil.kt:42 */
  217    278   
    }
         279  +
    /* SerializerUtil.kt:42 */
  218    280   
    {
         281  +
        /* JsonSerializerGenerator.kt:432 */
  219    282   
        object.key("aLong").number(
  220    283   
            #[allow(clippy::useless_conversion)]
  221    284   
            ::aws_smithy_types::Number::NegInt((input.a_long).into()),
  222    285   
        );
         286  +
        /* SerializerUtil.kt:42 */
  223    287   
    }
         288  +
    /* SerializerUtil.kt:42 */
  224    289   
    {
         290  +
        /* JsonSerializerGenerator.kt:432 */
  225    291   
        object.key("aFloat").number(
  226    292   
            #[allow(clippy::useless_conversion)]
  227    293   
            ::aws_smithy_types::Number::Float((input.a_float).into()),
  228    294   
        );
         295  +
        /* SerializerUtil.kt:42 */
  229    296   
    }
         297  +
    /* SerializerUtil.kt:42 */
  230    298   
    {
         299  +
        /* JsonSerializerGenerator.kt:432 */
  231    300   
        object.key("aDouble").number(
  232    301   
            #[allow(clippy::useless_conversion)]
  233    302   
            ::aws_smithy_types::Number::Float((input.a_double).into()),
  234    303   
        );
         304  +
        /* SerializerUtil.kt:42 */
  235    305   
    }
         306  +
    /* SerializerUtil.kt:42 */
  236    307   
    {
         308  +
        /* JsonSerializerGenerator.kt:448 */
  237    309   
        object.key("aTimestamp").date_time(
  238    310   
            &input.a_timestamp,
  239    311   
            ::aws_smithy_types::date_time::Format::EpochSeconds,
  240    312   
        )?;
         313  +
        /* SerializerUtil.kt:42 */
  241    314   
    }
         315  +
    /* SerializerUtil.kt:42 */
  242    316   
    {
         317  +
        /* JsonSerializerGenerator.kt:448 */
  243    318   
        object.key("aDocument").date_time(
  244    319   
            &input.a_document,
  245    320   
            ::aws_smithy_types::date_time::Format::EpochSeconds,
  246    321   
        )?;
         322  +
        /* SerializerUtil.kt:42 */
  247    323   
    }
         324  +
    /* SerializerUtil.kt:42 */
  248    325   
    {
         326  +
        /* JsonSerializerGenerator.kt:484 */
  249    327   
        let mut array_1 = object.key("aStringList").start_array();
         328  +
        /* JsonSerializerGenerator.kt:524 */
  250    329   
        for item_2 in &input.a_string_list {
         330  +
            /* SerializerUtil.kt:42 */
  251    331   
            {
         332  +
                /* JsonSerializerGenerator.kt:423 */
  252    333   
                array_1.value().string(item_2.as_str());
         334  +
                /* SerializerUtil.kt:42 */
  253    335   
            }
         336  +
            /* JsonSerializerGenerator.kt:524 */
  254    337   
        }
         338  +
        /* JsonSerializerGenerator.kt:486 */
  255    339   
        array_1.finish();
         340  +
        /* SerializerUtil.kt:42 */
  256    341   
    }
         342  +
    /* SerializerUtil.kt:42 */
  257    343   
    {
         344  +
        /* JsonSerializerGenerator.kt:495 */
  258    345   
        #[allow(unused_mut)]
         346  +
        /* JsonSerializerGenerator.kt:496 */
  259    347   
        let mut object_3 = object.key("aStringMap").start_object();
         348  +
        /* JsonSerializerGenerator.kt:537 */
  260    349   
        for (key_4, value_5) in &input.a_string_map {
         350  +
            /* SerializerUtil.kt:42 */
  261    351   
            {
         352  +
                /* JsonSerializerGenerator.kt:448 */
  262    353   
                object_3
  263    354   
                    .key(key_4.as_str())
  264    355   
                    .date_time(value_5, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         356  +
                /* SerializerUtil.kt:42 */
  265    357   
            }
         358  +
            /* JsonSerializerGenerator.kt:537 */
  266    359   
        }
         360  +
        /* JsonSerializerGenerator.kt:515 */
  267    361   
        object_3.finish();
         362  +
        /* SerializerUtil.kt:42 */
  268    363   
    }
         364  +
    /* SerializerUtil.kt:42 */
  269    365   
    {
         366  +
        /* JsonSerializerGenerator.kt:484 */
  270    367   
        let mut array_6 = object.key("aStringSet").start_array();
         368  +
        /* JsonSerializerGenerator.kt:524 */
  271    369   
        for item_7 in &input.a_string_set {
         370  +
            /* SerializerUtil.kt:42 */
  272    371   
            {
         372  +
                /* JsonSerializerGenerator.kt:423 */
  273    373   
                array_6.value().string(item_7.as_str());
         374  +
                /* SerializerUtil.kt:42 */
  274    375   
            }
         376  +
            /* JsonSerializerGenerator.kt:524 */
  275    377   
        }
         378  +
        /* JsonSerializerGenerator.kt:486 */
  276    379   
        array_6.finish();
         380  +
        /* SerializerUtil.kt:42 */
  277    381   
    }
         382  +
    /* SerializerUtil.kt:42 */
  278    383   
    {
         384  +
        /* JsonSerializerGenerator.kt:439 */
  279    385   
        object
  280    386   
            .key("aBlob")
  281    387   
            .string_unchecked(&::aws_smithy_types::base64::encode(&input.a_blob));
         388  +
        /* SerializerUtil.kt:42 */
  282    389   
    }
         390  +
    /* SerializerUtil.kt:42 */
  283    391   
    {
         392  +
        /* JsonSerializerGenerator.kt:495 */
  284    393   
        #[allow(unused_mut)]
         394  +
        /* JsonSerializerGenerator.kt:496 */
  285    395   
        let mut object_8 = object.key("aUnion").start_object();
         396  +
        /* JsonSerializerGenerator.kt:579 */
  286    397   
        crate::protocol_serde::shape_a_union::ser_a_union(&mut object_8, &input.a_union)?;
         398  +
        /* JsonSerializerGenerator.kt:515 */
  287    399   
        object_8.finish();
         400  +
        /* SerializerUtil.kt:42 */
  288    401   
    }
         402  +
    /* JsonSerializerGenerator.kt:372 */
  289    403   
    Ok(())
         404  +
    /* JsonSerializerGenerator.kt:358 */
  290    405   
}