Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +66,93 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_streaming_traits_require_length_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::StreamingTraitsRequireLengthInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
   12     14   
    B::Data: Send,
   13     15   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   14     16   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     17   
{
          18  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   16     19   
    Ok({
          20  +
        /* RustType.kt:516 */
   17     21   
        #[allow(unused_mut)]
          22  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   18     23   
        let mut input = crate::input::streaming_traits_require_length_input::Builder::default();
          24  +
        /* RustType.kt:516 */
   19     25   
        #[allow(unused_variables)]
          26  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   20     27   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     28   
            uri, headers, body, ..
   22     29   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          30  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   23     31   
        if let Some(value) = {
   24     32   
            Some(crate::protocol_serde::shape_streaming_traits_require_length_input::de_blob_payload(&mut body.into().into_inner())?)
   25     33   
        } {
   26     34   
            input = input.set_blob(value)
   27     35   
        }
          36  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   28     37   
        if let Some(value) =
   29     38   
            crate::protocol_serde::shape_streaming_traits_require_length_input::de_foo_header(
   30     39   
                &headers,
   31     40   
            )?
   32     41   
        {
   33     42   
            input = input.set_foo(Some(value))
   34     43   
        }
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   35     45   
        input.build()
          46  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   36     47   
    })
          48  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   37     49   
}
   38     50   
          51  +
/* RustType.kt:516 */
   39     52   
#[allow(clippy::unnecessary_wraps)]
          53  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   40     54   
pub fn ser_streaming_traits_require_length_http_response(
   41     55   
    #[allow(unused_variables)] output: crate::output::StreamingTraitsRequireLengthOutput,
   42     56   
) -> std::result::Result<
   43     57   
    ::aws_smithy_http_server::response::Response,
   44     58   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   45     59   
> {
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   46     61   
    Ok({
          62  +
        /* RustType.kt:516 */
   47     63   
        #[allow(unused_mut)]
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   48     65   
        let mut builder = ::http::Response::builder();
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   49     67   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   50     68   
            builder,
   51     69   
            ::http::header::CONTENT_TYPE,
   52     70   
            "application/json",
   53     71   
        );
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   54     73   
        let http_status: u16 = 200;
   55     74   
        builder = builder.status(http_status);
   56         -
        let payload = "";
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          76  +
        let payload =
          77  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          78  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   57     80   
        let content_length = payload.len();
   58     81   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   59     82   
            builder,
   60     83   
            ::http::header::CONTENT_LENGTH,
   61     84   
            content_length,
   62     85   
        );
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   63     87   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          88  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   64     89   
        builder.body(body)?
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   65     91   
    })
          92  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   66     93   
}

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

@@ -1,1 +21,27 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:230 */
    2      3   
pub fn de_blob_payload(
    3      4   
    body: &mut ::aws_smithy_types::body::SdkBody,
    4      5   
) -> std::result::Result<
    5      6   
    ::aws_smithy_types::byte_stream::ByteStream,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
> {
    8         -
    // replace the body with an empty body
           9  +
    /* HttpBindingGenerator.kt:299 */// replace the body with an empty body
    9     10   
    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
   10     11   
    Ok(::aws_smithy_types::byte_stream::ByteStream::new(body))
          12  +
    /* HttpBindingGenerator.kt:230 */
   11     13   
}
   12     14   
          15  +
/* HttpBindingGenerator.kt:153 */
   13     16   
pub(crate) fn de_foo_header(
   14     17   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   15     18   
) -> ::std::result::Result<
   16     19   
    ::std::option::Option<::std::string::String>,
   17     20   
    ::aws_smithy_http::header::ParseError,
   18     21   
> {
          22  +
    /* HttpBindingGenerator.kt:160 */
   19     23   
    let headers = header_map.get_all("X-Foo");
          24  +
    /* HttpBindingGenerator.kt:375 */
   20     25   
    ::aws_smithy_http::header::one_or_none(headers)
          26  +
    /* HttpBindingGenerator.kt:153 */
   21     27   
}

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

@@ -1,1 +88,121 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_streaming_traits_with_media_type_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::StreamingTraitsWithMediaTypeInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
   12     14   
    B::Data: Send,
   13     15   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   14     16   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   15     17   
{
          18  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   16     19   
    Ok({
          20  +
        /* RustType.kt:516 */
   17     21   
        #[allow(unused_mut)]
          22  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   18     23   
        let mut input = crate::input::streaming_traits_with_media_type_input::Builder::default();
          24  +
        /* RustType.kt:516 */
   19     25   
        #[allow(unused_variables)]
          26  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   20     27   
        let ::aws_smithy_runtime_api::http::RequestParts {
   21     28   
            uri, headers, body, ..
   22     29   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          30  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   23     31   
        if let Some(value) = {
   24     32   
            Some(crate::protocol_serde::shape_streaming_traits_with_media_type_input::de_blob_payload(&mut body.into().into_inner())?)
   25     33   
        } {
   26     34   
            input = input.set_blob(value)
   27     35   
        }
          36  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   28     37   
        if let Some(value) =
   29     38   
            crate::protocol_serde::shape_streaming_traits_with_media_type_input::de_foo_header(
   30     39   
                &headers,
   31     40   
            )?
   32     41   
        {
   33     42   
            input = input.set_foo(Some(value))
   34     43   
        }
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   35     45   
        input.build()
          46  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   36     47   
    })
          48  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   37     49   
}
   38     50   
          51  +
/* RustType.kt:516 */
   39     52   
#[allow(clippy::unnecessary_wraps)]
          53  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   40     54   
pub fn ser_streaming_traits_with_media_type_http_response(
   41     55   
    #[allow(unused_variables)] output: crate::output::StreamingTraitsWithMediaTypeOutput,
   42     56   
) -> std::result::Result<
   43     57   
    ::aws_smithy_http_server::response::Response,
   44     58   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   45     59   
> {
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   46     61   
    Ok({
          62  +
        /* RustType.kt:516 */
   47     63   
        #[allow(unused_mut)]
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   48     65   
        let mut builder = ::http::Response::builder();
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:629 */
   49     67   
        builder = crate::protocol_serde::shape_streaming_traits_with_media_type::ser_streaming_traits_with_media_type_headers(&output, builder)?;
          68  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   50     69   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   51     70   
            builder,
   52     71   
            ::http::header::CONTENT_TYPE,
   53     72   
            "text/plain",
   54     73   
        );
          74  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   55     75   
        let http_status: u16 = 200;
   56     76   
        builder = builder.status(http_status);
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:543 */
   57     78   
        let body = ::aws_smithy_http_server::body::boxed(::aws_smithy_http_server::body::Body::wrap_stream(
   58         -
            ::aws_smithy_http::futures_stream_adapter::FuturesStreamCompatByteStream::new(
   59         -
                crate::protocol_serde::shape_streaming_traits_with_media_type_output::ser_blob_http_payload( output.blob)?
   60         -
            )
   61         -
        ));
          79  +
            /* ServerProtocolLoader.kt:36 */::aws_smithy_http::futures_stream_adapter::FuturesStreamCompatByteStream::new(
          80  +
                /* HttpBoundProtocolPayloadGenerator.kt:350 */crate::protocol_serde::shape_streaming_traits_with_media_type_output::ser_blob_http_payload( output.blob)?
          81  +
            /* ServerProtocolLoader.kt:36 */)
          82  +
        /* ServerHttpBoundProtocolGenerator.kt:543 */));
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   62     84   
        builder.body(body)?
          85  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   63     86   
    })
          87  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   64     88   
}
   65     89   
          90  +
/* HttpBindingGenerator.kt:542 */
   66     91   
pub fn ser_streaming_traits_with_media_type_headers(
   67     92   
    input: &crate::output::StreamingTraitsWithMediaTypeOutput,
   68     93   
    mut builder: ::http::response::Builder,
   69     94   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
   70     95   
{
          96  +
    /* HttpBindingGenerator.kt:592 */
   71     97   
    if let ::std::option::Option::Some(inner_1) = &input.foo {
          98  +
        /* HttpBindingGenerator.kt:704 */
   72     99   
        let formatted_2 = inner_1.as_str();
         100  +
        /* HttpBindingGenerator.kt:705 */
   73    101   
        if !formatted_2.is_empty() {
         102  +
            /* HttpBindingGenerator.kt:706 */
   74    103   
            let header_value = formatted_2;
   75    104   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   76    105   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   77    106   
                    "foo",
   78    107   
                    format!(
   79    108   
                        "`{}` cannot be used as a header value: {}",
   80    109   
                        &header_value, err
   81    110   
                    ),
   82    111   
                )
   83    112   
            })?;
   84    113   
            builder = builder.header("X-Foo", header_value);
         114  +
            /* HttpBindingGenerator.kt:705 */
   85    115   
        }
         116  +
        /* HttpBindingGenerator.kt:592 */
   86    117   
    }
         118  +
    /* HttpBindingGenerator.kt:555 */
   87    119   
    Ok(builder)
         120  +
    /* HttpBindingGenerator.kt:542 */
   88    121   
}

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

@@ -1,1 +21,27 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:230 */
    2      3   
pub fn de_blob_payload(
    3      4   
    body: &mut ::aws_smithy_types::body::SdkBody,
    4      5   
) -> std::result::Result<
    5      6   
    ::aws_smithy_types::byte_stream::ByteStream,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
> {
    8         -
    // replace the body with an empty body
           9  +
    /* HttpBindingGenerator.kt:299 */// replace the body with an empty body
    9     10   
    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
   10     11   
    Ok(::aws_smithy_types::byte_stream::ByteStream::new(body))
          12  +
    /* HttpBindingGenerator.kt:230 */
   11     13   
}
   12     14   
          15  +
/* HttpBindingGenerator.kt:153 */
   13     16   
pub(crate) fn de_foo_header(
   14     17   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   15     18   
) -> ::std::result::Result<
   16     19   
    ::std::option::Option<::std::string::String>,
   17     20   
    ::aws_smithy_http::header::ParseError,
   18     21   
> {
          22  +
    /* HttpBindingGenerator.kt:160 */
   19     23   
    let headers = header_map.get_all("X-Foo");
          24  +
    /* HttpBindingGenerator.kt:375 */
   20     25   
    ::aws_smithy_http::header::one_or_none(headers)
          26  +
    /* HttpBindingGenerator.kt:153 */
   21     27   
}

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

@@ -1,1 +9,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:311 */
    2      3   
pub fn ser_blob_http_payload(
    3      4   
    payload: ::aws_smithy_types::byte_stream::ByteStream,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_types::byte_stream::ByteStream,
    6      7   
    ::aws_smithy_types::error::operation::BuildError,
    7      8   
> {
    8         -
    Ok(payload)
           9  +
    /* HttpBoundProtocolPayloadGenerator.kt:345 */
          10  +
    Ok(
          11  +
        /* HttpBoundProtocolPayloadGenerator.kt:374 */
          12  +
        payload, /* HttpBoundProtocolPayloadGenerator.kt:345 */
          13  +
    )
          14  +
    /* HttpBoundProtocolPayloadGenerator.kt:311 */
    9     15   
}

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/protocol_serde/shape_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_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   
                        }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   41     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   42     61   
            }
   43         -
            }
          62  +
            /* JsonParserGenerator.kt:446 */
   44     63   
            Ok(Some(items))
          64  +
            /* JsonParserGenerator.kt:713 */
   45     65   
        }
   46         -
        _ => Err(
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
   47     70   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48     71   
                    "expected start array or null",
   49     72   
                ),
   50         -
        ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   51     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   52     78   
}

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

@@ -1,1 +60,87 @@
    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_string_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, ::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::StartObject { .. }) => {
          22  +
            /* JsonParserGenerator.kt:469 */
   19     23   
            let mut map = ::std::collections::HashMap::new();
          24  +
            /* JsonParserGenerator.kt:684 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:685 */
   21     27   
                match tokens.next().transpose()? {
          28  +
                    /* JsonParserGenerator.kt:686 */
   22     29   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   23     30   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   24         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   25         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   26         -
                            tokens.next(),
   27         -
                        )?
   28         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                        .transpose()?;
          31  +
                        /* JsonParserGenerator.kt:471 */
          32  +
                        let key =
          33  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          34  +
                                /* JsonParserGenerator.kt:348 */u.into_owned()
          35  +
                            /* JsonParserGenerator.kt:339 */)
          36  +
                        /* JsonParserGenerator.kt:471 */?;
          37  +
                        /* JsonParserGenerator.kt:474 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */)
          43  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                        /* JsonParserGenerator.kt:474 */;
          45  +
                        /* JsonParserGenerator.kt:481 */
   30     46   
                        match value {
   31     47   
                            Some(value) => {
   32     48   
                                map.insert(key, value);
   33     49   
                            }
   34     50   
                            None => {
   35     51   
                                return Err(
   36     52   
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                        "dense map cannot contain null values",
   38     54   
                                    ),
   39     55   
                                )
   40     56   
                            }
   41     57   
                        }
          58  +
                        /* JsonParserGenerator.kt:686 */
   42     59   
                    }
          60  +
                    /* JsonParserGenerator.kt:695 */
   43     61   
                    other => {
   44     62   
                        return Err(
   45     63   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     64   
                                format!("expected object key or end object, found: {:?}", other),
   47     65   
                            ),
   48     66   
                        )
          67  +
                    } /* JsonParserGenerator.kt:685 */
   49     68   
                }
          69  +
                /* JsonParserGenerator.kt:684 */
   50     70   
            }
   51         -
            }
          71  +
            /* JsonParserGenerator.kt:504 */
   52     72   
            Ok(Some(map))
          73  +
            /* JsonParserGenerator.kt:713 */
   53     74   
        }
   54         -
        _ => Err(
          75  +
        /* JsonParserGenerator.kt:722 */
          76  +
        _ => {
          77  +
            /* JsonParserGenerator.kt:723 */
          78  +
            Err(
   55     79   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   56     80   
                    "expected start object or null",
   57     81   
                ),
   58         -
        ),
          82  +
            )
          83  +
            /* JsonParserGenerator.kt:722 */
          84  +
        } /* JsonParserGenerator.kt:712 */
   59     85   
    }
          86  +
    /* JsonParserGenerator.kt:460 */
   60     87   
}

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

@@ -1,1 +54,80 @@
    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_string_set<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::string_set_unconstrained::StringSetUnconstrained>,
    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   
                        }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   41     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   42     61   
            }
   43         -
            }
          62  +
            /* JsonParserGenerator.kt:444 */
   44     63   
            Ok(Some(
   45     64   
                crate::unconstrained::string_set_unconstrained::StringSetUnconstrained(items),
   46     65   
            ))
          66  +
            /* JsonParserGenerator.kt:713 */
   47     67   
        }
   48         -
        _ => Err(
          68  +
        /* JsonParserGenerator.kt:722 */
          69  +
        _ => {
          70  +
            /* JsonParserGenerator.kt:723 */
          71  +
            Err(
   49     72   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   50     73   
                    "expected start array or null",
   51     74   
                ),
   52         -
        ),
          75  +
            )
          76  +
            /* JsonParserGenerator.kt:722 */
          77  +
        } /* JsonParserGenerator.kt:712 */
   53     78   
    }
          79  +
    /* JsonParserGenerator.kt:398 */
   54     80   
}

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

@@ -1,1 +50,74 @@
    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_structure_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<crate::model::StructureListMember>>,
    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   
                    _ => {
          37  +
                        /* JsonParserGenerator.kt:419 */
   27     38   
                        let value =
   28         -
                            crate::protocol_serde::shape_structure_list_member::de_structure_list_member(tokens)?
   29         -
                        ;
          39  +
                            /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_structure_list_member::de_structure_list_member(tokens)?
          40  +
                        /* JsonParserGenerator.kt:419 */;
          41  +
                        /* JsonParserGenerator.kt:422 */
   30     42   
                        if let Some(value) = value {
   31     43   
                            items.push(value);
   32         -
                        } else {
          44  +
                        }
          45  +
                        /* JsonParserGenerator.kt:430 */
          46  +
                        else {
   33     47   
                            return Err(
   34     48   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   35     49   
                                    "dense list cannot contain null values",
   36     50   
                                ),
   37     51   
                            );
   38     52   
                        }
          53  +
                        /* JsonParserGenerator.kt:413 */
          54  +
                    } /* JsonParserGenerator.kt:409 */
   39     55   
                }
          56  +
                /* JsonParserGenerator.kt:408 */
   40     57   
            }
   41         -
            }
          58  +
            /* JsonParserGenerator.kt:446 */
   42     59   
            Ok(Some(items))
          60  +
            /* JsonParserGenerator.kt:713 */
   43     61   
        }
   44         -
        _ => Err(
          62  +
        /* JsonParserGenerator.kt:722 */
          63  +
        _ => {
          64  +
            /* JsonParserGenerator.kt:723 */
          65  +
            Err(
   45     66   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     67   
                    "expected start array or null",
   47     68   
                ),
   48         -
        ),
          69  +
            )
          70  +
            /* JsonParserGenerator.kt:722 */
          71  +
        } /* JsonParserGenerator.kt:712 */
   49     72   
    }
          73  +
    /* JsonParserGenerator.kt:398 */
   50     74   
}

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

@@ -1,1 +77,113 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_structure_list_member(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::model::StructureListMember,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.a {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("value").string(var_1.as_str());
          11  +
        /* JsonSerializerGenerator.kt:382 */
    8     12   
    }
          13  +
    /* JsonSerializerGenerator.kt:382 */
    9     14   
    if let Some(var_2) = &input.b {
          15  +
        /* JsonSerializerGenerator.kt:423 */
   10     16   
        object.key("other").string(var_2.as_str());
          17  +
        /* JsonSerializerGenerator.kt:382 */
   11     18   
    }
          19  +
    /* JsonSerializerGenerator.kt:372 */
   12     20   
    Ok(())
          21  +
    /* JsonSerializerGenerator.kt:358 */
   13     22   
}
   14     23   
          24  +
/* JsonParserGenerator.kt:516 */
   15     25   
pub(crate) fn de_structure_list_member<'a, I>(
   16     26   
    tokens: &mut ::std::iter::Peekable<I>,
   17     27   
) -> ::std::result::Result<
   18     28   
    Option<crate::model::StructureListMember>,
   19     29   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   20     30   
>
   21     31   
where
   22     32   
    I: Iterator<
   23     33   
        Item = Result<
   24     34   
            ::aws_smithy_json::deserialize::Token<'a>,
   25     35   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   26     36   
        >,
   27     37   
    >,
   28     38   
{
          39  +
    /* JsonParserGenerator.kt:712 */
   29     40   
    match tokens.next().transpose()? {
          41  +
        /* JsonParserGenerator.kt:713 */
   30     42   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   31     43   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          44  +
            /* RustType.kt:516 */
   32     45   
            #[allow(unused_mut)]
          46  +
            /* JsonParserGenerator.kt:526 */
   33     47   
            let mut builder = crate::model::structure_list_member::Builder::default();
          48  +
            /* JsonParserGenerator.kt:684 */
   34     49   
            loop {
          50  +
                /* JsonParserGenerator.kt:685 */
   35     51   
                match tokens.next().transpose()? {
          52  +
                    /* JsonParserGenerator.kt:686 */
   36     53   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   37     54   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          55  +
                        /* JsonParserGenerator.kt:260 */
   38     56   
                        match key.to_unescaped()?.as_ref() {
          57  +
                            /* JsonParserGenerator.kt:262 */
   39     58   
                            "value" => {
          59  +
                                /* JsonParserGenerator.kt:272 */
   40     60   
                                builder = builder.set_a(
   41         -
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
   42         -
                                        tokens.next(),
   43         -
                                    )?
   44         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   45         -
                                    .transpose()?,
   46         -
                                );
          61  +
                                    /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          62  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          63  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          64  +
                                        /* JsonParserGenerator.kt:339 */)
          65  +
                                    /* JsonParserGenerator.kt:354 */).transpose()?
          66  +
                                /* JsonParserGenerator.kt:272 */);
          67  +
                                /* JsonParserGenerator.kt:262 */
   47     68   
                            }
          69  +
                            /* JsonParserGenerator.kt:262 */
   48     70   
                            "other" => {
          71  +
                                /* JsonParserGenerator.kt:272 */
   49     72   
                                builder = builder.set_b(
   50         -
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
   51         -
                                        tokens.next(),
   52         -
                                    )?
   53         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   54         -
                                    .transpose()?,
   55         -
                                );
          73  +
                                    /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          74  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          75  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          76  +
                                        /* JsonParserGenerator.kt:339 */)
          77  +
                                    /* JsonParserGenerator.kt:354 */).transpose()?
          78  +
                                /* JsonParserGenerator.kt:272 */);
          79  +
                                /* JsonParserGenerator.kt:262 */
   56     80   
                            }
   57         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          81  +
                            /* JsonParserGenerator.kt:290 */
          82  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   58     83   
                        }
          84  +
                        /* JsonParserGenerator.kt:686 */
   59     85   
                    }
          86  +
                    /* JsonParserGenerator.kt:695 */
   60     87   
                    other => {
   61     88   
                        return Err(
   62     89   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63     90   
                                format!("expected object key or end object, found: {:?}", other),
   64     91   
                            ),
   65     92   
                        )
          93  +
                    } /* JsonParserGenerator.kt:685 */
   66     94   
                }
          95  +
                /* JsonParserGenerator.kt:684 */
   67     96   
            }
   68         -
            }
          97  +
            /* JsonParserGenerator.kt:540 */
   69     98   
            Ok(Some(builder.build()))
          99  +
            /* JsonParserGenerator.kt:713 */
   70    100   
        }
   71         -
        _ => Err(
         101  +
        /* JsonParserGenerator.kt:722 */
         102  +
        _ => {
         103  +
            /* JsonParserGenerator.kt:723 */
         104  +
            Err(
   72    105   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   73    106   
                    "expected start object or null",
   74    107   
                ),
   75         -
        ),
         108  +
            )
         109  +
            /* JsonParserGenerator.kt:722 */
         110  +
        } /* JsonParserGenerator.kt:712 */
   76    111   
    }
         112  +
    /* JsonParserGenerator.kt:516 */
   77    113   
}

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

@@ -1,1 +144,200 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_test_body_structure_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::TestBodyStructureInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::test_body_structure_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:745 */
   22     30   
        let bytes = ::hyper::body::to_bytes(body).await?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:768 */
   23     32   
        if !bytes.is_empty() {
          33  +
            /* ServerHttpBoundProtocolGenerator.kt:769 */
   24     34   
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
   25     35   
                &headers,
   26     36   
                Some("application/json"),
   27     37   
            )?;
   28     38   
            input = crate::protocol_serde::shape_test_body_structure::de_test_body_structure(
   29     39   
                bytes.as_ref(),
   30     40   
                input,
   31     41   
            )?;
          42  +
            /* ServerHttpBoundProtocolGenerator.kt:768 */
   32     43   
        }
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   33     45   
        if let Some(value) =
   34     46   
            crate::protocol_serde::shape_test_body_structure_input::de_test_id_header(&headers)?
   35     47   
        {
   36     48   
            input = input.set_test_id(Some(value))
   37     49   
        }
          50  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   38     51   
        input.build()
          52  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   39     53   
    })
          54  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   40     55   
}
   41     56   
          57  +
/* RustType.kt:516 */
   42     58   
#[allow(clippy::unnecessary_wraps)]
          59  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   43     60   
pub fn ser_test_body_structure_http_response(
   44     61   
    #[allow(unused_variables)] output: crate::output::TestBodyStructureOutput,
   45     62   
) -> std::result::Result<
   46     63   
    ::aws_smithy_http_server::response::Response,
   47     64   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   48     65   
> {
          66  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   49     67   
    Ok({
          68  +
        /* RustType.kt:516 */
   50     69   
        #[allow(unused_mut)]
          70  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   51     71   
        let mut builder = ::http::Response::builder();
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:629 */
   52     73   
        builder =
   53     74   
            crate::protocol_serde::shape_test_body_structure::ser_test_body_structure_headers(
   54     75   
                &output, builder,
   55     76   
            )?;
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   56     78   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     79   
            builder,
   58     80   
            ::http::header::CONTENT_TYPE,
   59     81   
            "application/json",
   60     82   
        );
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   61     84   
        let http_status: u16 = 200;
   62     85   
        builder = builder.status(http_status);
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   63     87   
        let payload =
   64         -
            crate::protocol_serde::shape_test_body_structure_output::ser_test_body_structure_output_output_output(&output)?
   65         -
        ;
          88  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_test_body_structure_output::ser_test_body_structure_output_output_output(&output)?
          89  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   66     91   
        let content_length = payload.len();
   67     92   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   68     93   
            builder,
   69     94   
            ::http::header::CONTENT_LENGTH,
   70     95   
            content_length,
   71     96   
        );
          97  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   72     98   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          99  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   73    100   
        builder.body(body)?
         101  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   74    102   
    })
         103  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   75    104   
}
   76    105   
         106  +
/* JsonParserGenerator.kt:148 */
   77    107   
pub(crate) fn de_test_body_structure(
   78    108   
    value: &[u8],
   79    109   
    mut builder: crate::input::test_body_structure_input::Builder,
   80    110   
) -> ::std::result::Result<
   81    111   
    crate::input::test_body_structure_input::Builder,
   82    112   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   83    113   
> {
         114  +
    /* JsonParserGenerator.kt:153 */
   84    115   
    let mut tokens_owned =
   85    116   
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
   86    117   
            .peekable();
   87    118   
    let tokens = &mut tokens_owned;
   88    119   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         120  +
    /* JsonParserGenerator.kt:684 */
   89    121   
    loop {
         122  +
        /* JsonParserGenerator.kt:685 */
   90    123   
        match tokens.next().transpose()? {
         124  +
            /* JsonParserGenerator.kt:686 */
   91    125   
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   92    126   
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         127  +
                /* JsonParserGenerator.kt:260 */
   93    128   
                match key.to_unescaped()?.as_ref() {
         129  +
                    /* JsonParserGenerator.kt:262 */
   94    130   
                    "testConfig" => {
         131  +
                        /* JsonParserGenerator.kt:272 */
   95    132   
                        builder = builder.set_test_config(
   96         -
                            crate::protocol_serde::shape_test_config::de_test_config(tokens)?,
   97         -
                        );
         133  +
                            /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_test_config::de_test_config(tokens)?
         134  +
                        /* JsonParserGenerator.kt:272 */);
         135  +
                        /* JsonParserGenerator.kt:262 */
   98    136   
                    }
   99         -
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         137  +
                    /* JsonParserGenerator.kt:290 */
         138  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  100    139   
                }
         140  +
                /* JsonParserGenerator.kt:686 */
  101    141   
            }
         142  +
            /* JsonParserGenerator.kt:695 */
  102    143   
            other => {
  103    144   
                return Err(
  104    145   
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  105    146   
                        "expected object key or end object, found: {:?}",
  106    147   
                        other
  107    148   
                    )),
  108    149   
                )
         150  +
            } /* JsonParserGenerator.kt:685 */
  109    151   
        }
         152  +
        /* JsonParserGenerator.kt:684 */
  110    153   
    }
  111         -
    }
         154  +
    /* JsonParserGenerator.kt:250 */
  112    155   
    if tokens.next().is_some() {
         156  +
        /* JsonParserGenerator.kt:251 */
  113    157   
        return Err(
  114    158   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  115    159   
                "found more JSON tokens after completing parsing",
  116    160   
            ),
  117    161   
        );
         162  +
        /* JsonParserGenerator.kt:250 */
  118    163   
    }
         164  +
    /* JsonParserGenerator.kt:163 */
  119    165   
    Ok(builder)
         166  +
    /* JsonParserGenerator.kt:148 */
  120    167   
}
  121    168   
         169  +
/* HttpBindingGenerator.kt:542 */
  122    170   
pub fn ser_test_body_structure_headers(
  123    171   
    input: &crate::output::TestBodyStructureOutput,
  124    172   
    mut builder: ::http::response::Builder,
  125    173   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
  126    174   
{
         175  +
    /* HttpBindingGenerator.kt:592 */
  127    176   
    if let ::std::option::Option::Some(inner_1) = &input.test_id {
         177  +
        /* HttpBindingGenerator.kt:704 */
  128    178   
        let formatted_2 = inner_1.as_str();
         179  +
        /* HttpBindingGenerator.kt:705 */
  129    180   
        if !formatted_2.is_empty() {
         181  +
            /* HttpBindingGenerator.kt:706 */
  130    182   
            let header_value = formatted_2;
  131    183   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  132    184   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  133    185   
                    "test_id",
  134    186   
                    format!(
  135    187   
                        "`{}` cannot be used as a header value: {}",
  136    188   
                        &header_value, err
  137    189   
                    ),
  138    190   
                )
  139    191   
            })?;
  140    192   
            builder = builder.header("x-amz-test-id", header_value);
         193  +
            /* HttpBindingGenerator.kt:705 */
  141    194   
        }
         195  +
        /* HttpBindingGenerator.kt:592 */
  142    196   
    }
         197  +
    /* HttpBindingGenerator.kt:555 */
  143    198   
    Ok(builder)
         199  +
    /* HttpBindingGenerator.kt:542 */
  144    200   
}

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

@@ -1,1 +10,14 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:153 */
    2      3   
pub(crate) fn de_test_id_header(
    3      4   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::std::option::Option<::std::string::String>,
    6      7   
    ::aws_smithy_http::header::ParseError,
    7      8   
> {
           9  +
    /* HttpBindingGenerator.kt:160 */
    8     10   
    let headers = header_map.get_all("x-amz-test-id");
          11  +
    /* HttpBindingGenerator.kt:375 */
    9     12   
    ::aws_smithy_http::header::one_or_none(headers)
          13  +
    /* HttpBindingGenerator.kt:153 */
   10     14   
}

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

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

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

@@ -1,1 +68,99 @@
    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_test_config<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::TestConfig>,
    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::test_config::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   
                            "timeout" => {
          37  +
                                /* JsonParserGenerator.kt:272 */
   27     38   
                                builder = builder.set_timeout(
          39  +
                                    /* JsonParserGenerator.kt:365 */
   28     40   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
   29     41   
                                        tokens.next(),
   30     42   
                                    )?
   31     43   
                                    .map(i32::try_from)
   32         -
                                    .transpose()?,
          44  +
                                    .transpose()?, /* JsonParserGenerator.kt:272 */
   33     45   
                                );
          46  +
                                /* JsonParserGenerator.kt:262 */
   34     47   
                            }
   35         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          48  +
                            /* JsonParserGenerator.kt:290 */
          49  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   36     50   
                        }
          51  +
                        /* JsonParserGenerator.kt:686 */
   37     52   
                    }
          53  +
                    /* JsonParserGenerator.kt:695 */
   38     54   
                    other => {
   39     55   
                        return Err(
   40     56   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   41     57   
                                format!("expected object key or end object, found: {:?}", other),
   42     58   
                            ),
   43     59   
                        )
          60  +
                    } /* JsonParserGenerator.kt:685 */
   44     61   
                }
          62  +
                /* JsonParserGenerator.kt:684 */
   45     63   
            }
   46         -
            }
          64  +
            /* JsonParserGenerator.kt:540 */
   47     65   
            Ok(Some(builder.build()))
          66  +
            /* JsonParserGenerator.kt:713 */
   48     67   
        }
   49         -
        _ => Err(
          68  +
        /* JsonParserGenerator.kt:722 */
          69  +
        _ => {
          70  +
            /* JsonParserGenerator.kt:723 */
          71  +
            Err(
   50     72   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51     73   
                    "expected start object or null",
   52     74   
                ),
   53         -
        ),
          75  +
            )
          76  +
            /* JsonParserGenerator.kt:722 */
          77  +
        } /* JsonParserGenerator.kt:712 */
   54     78   
    }
          79  +
    /* JsonParserGenerator.kt:516 */
   55     80   
}
   56     81   
          82  +
/* JsonSerializerGenerator.kt:358 */
   57     83   
pub fn ser_test_config(
   58     84   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   59     85   
    input: &crate::model::TestConfig,
   60     86   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          87  +
    /* JsonSerializerGenerator.kt:382 */
   61     88   
    if let Some(var_1) = &input.timeout {
          89  +
        /* JsonSerializerGenerator.kt:432 */
   62     90   
        object.key("timeout").number(
   63     91   
            #[allow(clippy::useless_conversion)]
   64     92   
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   65     93   
        );
          94  +
        /* JsonSerializerGenerator.kt:382 */
   66     95   
    }
          96  +
    /* JsonSerializerGenerator.kt:372 */
   67     97   
    Ok(())
          98  +
    /* JsonSerializerGenerator.kt:358 */
   68     99   
}

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

@@ -1,1 +81,115 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_test_get_no_input_no_payload_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::TestGetNoInputNoPayloadInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::test_get_no_input_no_payload_input::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:811 */
   22     30   
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   23     32   
        input.build()
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   24     34   
    })
          35  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   25     36   
}
   26     37   
          38  +
/* RustType.kt:516 */
   27     39   
#[allow(clippy::unnecessary_wraps)]
          40  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   28     41   
pub fn ser_test_get_no_input_no_payload_http_response(
   29     42   
    #[allow(unused_variables)] output: crate::output::TestGetNoInputNoPayloadOutput,
   30     43   
) -> std::result::Result<
   31     44   
    ::aws_smithy_http_server::response::Response,
   32     45   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     46   
> {
          47  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   34     48   
    Ok({
          49  +
        /* RustType.kt:516 */
   35     50   
        #[allow(unused_mut)]
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   36     52   
        let mut builder = ::http::Response::builder();
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:629 */
   37     54   
        builder = crate::protocol_serde::shape_test_get_no_input_no_payload::ser_test_get_no_input_no_payload_headers(&output, builder)?;
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   38     56   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   39     57   
            builder,
   40     58   
            ::http::header::CONTENT_TYPE,
   41     59   
            "application/json",
   42     60   
        );
          61  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   43     62   
        let http_status: u16 = 200;
   44     63   
        builder = builder.status(http_status);
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   45     65   
        let payload =
   46         -
            crate::protocol_serde::shape_test_get_no_input_no_payload_output::ser_test_get_no_input_no_payload_output_output_output(&output)?
   47         -
        ;
          66  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_test_get_no_input_no_payload_output::ser_test_get_no_input_no_payload_output_output_output(&output)?
          67  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          68  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   48     69   
        let content_length = payload.len();
   49     70   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   50     71   
            builder,
   51     72   
            ::http::header::CONTENT_LENGTH,
   52     73   
            content_length,
   53     74   
        );
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   54     76   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   55     78   
        builder.body(body)?
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   56     80   
    })
          81  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   57     82   
}
   58     83   
          84  +
/* HttpBindingGenerator.kt:542 */
   59     85   
pub fn ser_test_get_no_input_no_payload_headers(
   60     86   
    input: &crate::output::TestGetNoInputNoPayloadOutput,
   61     87   
    mut builder: ::http::response::Builder,
   62     88   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
   63     89   
{
          90  +
    /* HttpBindingGenerator.kt:592 */
   64     91   
    if let ::std::option::Option::Some(inner_1) = &input.test_id {
          92  +
        /* HttpBindingGenerator.kt:704 */
   65     93   
        let formatted_2 = inner_1.as_str();
          94  +
        /* HttpBindingGenerator.kt:705 */
   66     95   
        if !formatted_2.is_empty() {
          96  +
            /* HttpBindingGenerator.kt:706 */
   67     97   
            let header_value = formatted_2;
   68     98   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
   69     99   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
   70    100   
                    "test_id",
   71    101   
                    format!(
   72    102   
                        "`{}` cannot be used as a header value: {}",
   73    103   
                        &header_value, err
   74    104   
                    ),
   75    105   
                )
   76    106   
            })?;
   77    107   
            builder = builder.header("X-Amz-Test-Id", header_value);
         108  +
            /* HttpBindingGenerator.kt:705 */
   78    109   
        }
         110  +
        /* HttpBindingGenerator.kt:592 */
   79    111   
    }
         112  +
    /* HttpBindingGenerator.kt:555 */
   80    113   
    Ok(builder)
         114  +
    /* HttpBindingGenerator.kt:542 */
   81    115   
}

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

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