Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +124,162 @@
    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_http_prefix_headers_targeting_length_map_operation_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
    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)]
   17         -
        let mut input = crate::input::http_prefix_headers_targeting_length_map_operation_input_internal::Builder::default();
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */let mut input = crate::input::http_prefix_headers_targeting_length_map_operation_input_internal::Builder::default();
          22  +
        /* RustType.kt:516 */
   18     23   
        #[allow(unused_variables)]
          24  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     25   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     26   
            uri, headers, body, ..
   21     27   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          28  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   22     29   
        if let Some(value) = crate::protocol_serde::shape_http_prefix_headers_targeting_length_map_operation_input::de_length_map_prefix_header(&headers)? {
   23     30   
                                input = input.set_length_map(Some(value))
   24     31   
                            }
          32  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   25     33   
        input.build()?
          34  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   26     35   
    })
          36  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   27     37   
}
   28     38   
          39  +
/* RustType.kt:516 */
   29     40   
#[allow(clippy::unnecessary_wraps)]
          41  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   30     42   
pub fn ser_http_prefix_headers_targeting_length_map_operation_http_response(
   31     43   
    #[allow(unused_variables)]
   32     44   
    output: crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput,
   33     45   
) -> std::result::Result<
   34     46   
    ::aws_smithy_http_server::response::Response,
   35     47   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   36     48   
> {
          49  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   37     50   
    Ok({
          51  +
        /* RustType.kt:516 */
   38     52   
        #[allow(unused_mut)]
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   39     54   
        let mut builder = ::http::Response::builder();
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:629 */
   40     56   
        builder = crate::protocol_serde::shape_http_prefix_headers_targeting_length_map_operation::ser_http_prefix_headers_targeting_length_map_operation_headers(&output, builder)?;
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   41     58   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   42     59   
            builder,
   43     60   
            ::http::header::CONTENT_TYPE,
   44     61   
            "application/json",
   45     62   
        );
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   46     64   
        let http_status: u16 = 200;
   47     65   
        builder = builder.status(http_status);
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   48     67   
        let payload =
   49         -
            crate::protocol_serde::shape_http_prefix_headers_targeting_length_map_operation_output::ser_http_prefix_headers_targeting_length_map_operation_output_output_output(&output)?
   50         -
        ;
          68  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_http_prefix_headers_targeting_length_map_operation_output::ser_http_prefix_headers_targeting_length_map_operation_output_output_output(&output)?
          69  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          70  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   51     71   
        let content_length = payload.len();
   52     72   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   53     73   
            builder,
   54     74   
            ::http::header::CONTENT_LENGTH,
   55     75   
            content_length,
   56     76   
        );
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   57     78   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   58     80   
        builder.body(body)?
          81  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   59     82   
    })
          83  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   60     84   
}
   61     85   
          86  +
/* RustType.kt:516 */
   62     87   
#[allow(clippy::unnecessary_wraps)]
          88  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   63     89   
pub fn ser_http_prefix_headers_targeting_length_map_operation_http_error(
   64     90   
    error: &crate::error::HttpPrefixHeadersTargetingLengthMapOperationError,
   65     91   
) -> std::result::Result<
   66     92   
    ::aws_smithy_http_server::response::Response,
   67     93   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   68     94   
> {
          95  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   69     96   
    Ok({
          97  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   70     98   
        match error {
   71         -
            crate::error::HttpPrefixHeadersTargetingLengthMapOperationError::ValidationException(output) => {
   72         -
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
   73         -
                #[allow(unused_mut)]
   74         -
                let mut builder = ::http::Response::builder();
   75         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          99  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */crate::error::HttpPrefixHeadersTargetingLengthMapOperationError::ValidationException(output) => {
         100  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         101  +
                /* RustType.kt:516 */#[allow(unused_mut)]
         102  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */let mut builder = ::http::Response::builder();
         103  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */builder = ::aws_smithy_http::header::set_response_header_if_absent(
   76    104   
                                builder,
   77    105   
                                ::http::header::CONTENT_TYPE,
   78    106   
                                "application/json",
   79    107   
                            );
   80         -
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         108  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */builder = ::aws_smithy_http::header::set_response_header_if_absent(
   81    109   
                                builder,
   82    110   
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
   83    111   
                                "ValidationException",
   84    112   
                            );
   85         -
                let content_length = payload.len();
         113  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */let content_length = payload.len();
   86    114   
                            builder = ::aws_smithy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
   87         -
                builder.status(400).body(::aws_smithy_http_server::body::to_boxed(payload))?
   88         -
            }
   89         -
        }
         115  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */builder.status(400).body(::aws_smithy_http_server::body::to_boxed(payload))?
         116  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */}
         117  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */}
         118  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   90    119   
    })
         120  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   91    121   
}
   92    122   
         123  +
/* HttpBindingGenerator.kt:542 */
   93    124   
pub fn ser_http_prefix_headers_targeting_length_map_operation_headers(
   94    125   
    input: &crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput,
   95    126   
    mut builder: ::http::response::Builder,
   96    127   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
   97    128   
{
         129  +
    /* HttpBindingGenerator.kt:741 */
   98    130   
    if let ::std::option::Option::Some(inner_1) = &input.length_map {
         131  +
        /* HttpBindingGenerator.kt:741 */
   99    132   
        {
         133  +
            /* HttpBindingGenerator.kt:747 */
  100    134   
            for (k, v) in inner_1 {
  101    135   
                use std::str::FromStr;
  102    136   
                let header_name = http::header::HeaderName::from_str(&format!(
  103    137   
                    "{}{}",
  104    138   
                    "X-Prefix-Headers-LengthMap-", &k
  105    139   
                ))
  106    140   
                .map_err(|err| {
  107    141   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  108    142   
                        "length_map",
  109    143   
                        format!("`{k}` cannot be used as a header name: {err}"),
  110    144   
                    )
  111    145   
                })?;
  112    146   
                let header_value = v.as_str();
  113    147   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  114    148   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  115    149   
                        "length_map",
  116    150   
                        format!("`{}` cannot be used as a header value: {}", v, err),
  117    151   
                    )
  118    152   
                })?;
  119    153   
                builder = builder.header(header_name, header_value);
  120    154   
            }
         155  +
            /* HttpBindingGenerator.kt:741 */
  121    156   
        }
         157  +
        /* HttpBindingGenerator.kt:741 */
  122    158   
    }
         159  +
    /* HttpBindingGenerator.kt:555 */
  123    160   
    Ok(builder)
         161  +
    /* HttpBindingGenerator.kt:542 */
  124    162   
}

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

@@ -1,1 +26,34 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:184 */
    2      3   
pub(crate) fn de_length_map_prefix_header(
    3      4   
    header_map: &::aws_smithy_runtime_api::http::Headers,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::option::Option<crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained>,
    6      7   
    ::aws_smithy_http::header::ParseError,
    7      8   
> {
           9  +
    /* HttpBindingGenerator.kt:190 */
    8     10   
    let headers = ::aws_smithy_http::header::headers_for_prefix(
    9     11   
        header_map.iter().map(|(k, _)| k),
   10     12   
        "X-Prefix-Headers-LengthMap-",
   11     13   
    );
   12     14   
    let out: std::result::Result<_, _> = headers.map(|(key, header_name)| {
   13     15   
                            let values = header_map.get_all(header_name);
   14     16   
                            crate::protocol_serde::shape_http_prefix_headers_targeting_length_map_operation_input::de_length_map_inner(values).map(|v| (key.to_string(), v.expect(
   15     17   
                                "we have checked there is at least one value for this header name; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"
   16     18   
                            )))
   17     19   
                        }).collect();
          20  +
    /* ServerRequestBindingGenerator.kt:79 */
   18     21   
    let out = out.map(crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained);
          22  +
    /* HttpBindingGenerator.kt:211 */
   19     23   
    out.map(Some)
          24  +
    /* HttpBindingGenerator.kt:184 */
   20     25   
}
   21     26   
          27  +
/* HttpBindingGenerator.kt:173 */
   22     28   
pub fn de_length_map_inner<'a>(
   23     29   
    headers: impl ::std::iter::Iterator<Item = &'a str>,
   24     30   
) -> std::result::Result<Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
          31  +
    /* HttpBindingGenerator.kt:375 */
   25     32   
    ::aws_smithy_http::header::one_or_none(headers)
          33  +
    /* HttpBindingGenerator.kt:173 */
   26     34   
}

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

@@ -1,1 +18,26 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_http_prefix_headers_targeting_length_map_operation_output_output_output(
    3      4   
    value: &crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput,
    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_http_prefix_headers_targeting_length_map_operation_output::ser_http_prefix_headers_targeting_length_map_operation_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_http_prefix_headers_targeting_length_map_operation_output_output(
   13     19   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    #[allow(unused_variables)]
   15     21   
    input: &crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput,
   16     22   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          23  +
    /* JsonSerializerGenerator.kt:372 */
   17     24   
    Ok(())
          25  +
    /* JsonSerializerGenerator.kt:358 */
   18     26   
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_length_list.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_length_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::length_list_unconstrained::LengthListUnconstrained>,
    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::length_list_unconstrained::LengthListUnconstrained(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/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_length_list_of_pattern_string.rs

@@ -1,1 +40,66 @@
    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_length_list_of_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
    3      4   
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           5  +
    /* JsonParserGenerator.kt:712 */
    4      6   
    match tokens.next().transpose()? {
           7  +
        /* JsonParserGenerator.kt:713 */
    5      8   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
    6      9   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          10  +
            /* JsonParserGenerator.kt:407 */
    7     11   
            let mut items = Vec::new();
          12  +
            /* JsonParserGenerator.kt:408 */
    8     13   
            loop {
          14  +
                /* JsonParserGenerator.kt:409 */
    9     15   
                match tokens.peek() {
          16  +
                    /* JsonParserGenerator.kt:410 */
   10     17   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          18  +
                        /* JsonParserGenerator.kt:411 */
   11     19   
                        tokens.next().transpose().unwrap();
   12     20   
                        break;
          21  +
                        /* JsonParserGenerator.kt:410 */
   13     22   
                    }
          23  +
                    /* JsonParserGenerator.kt:413 */
   14     24   
                    _ => {
   15         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   16         -
                            tokens.next(),
   17         -
                        )?
   18         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   19         -
                        .transpose()?;
          25  +
                        /* JsonParserGenerator.kt:419 */
          26  +
                        let value =
          27  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          28  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          29  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          30  +
                                /* JsonParserGenerator.kt:339 */)
          31  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          32  +
                        /* JsonParserGenerator.kt:419 */;
          33  +
                        /* JsonParserGenerator.kt:422 */
   20     34   
                        if let Some(value) = value {
   21     35   
                            items.push(value);
   22         -
                        } else {
          36  +
                        }
          37  +
                        /* JsonParserGenerator.kt:430 */
          38  +
                        else {
   23     39   
                            return Err(
   24     40   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25     41   
                                    "dense list cannot contain null values",
   26     42   
                                ),
   27     43   
                            );
   28     44   
                        }
          45  +
                        /* JsonParserGenerator.kt:413 */
          46  +
                    } /* JsonParserGenerator.kt:409 */
   29     47   
                }
          48  +
                /* JsonParserGenerator.kt:408 */
   30     49   
            }
   31         -
            }
          50  +
            /* JsonParserGenerator.kt:444 */
   32     51   
            Ok(Some(crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(items)))
          52  +
            /* JsonParserGenerator.kt:713 */
   33     53   
        }
   34         -
        _ => Err(
          54  +
        /* JsonParserGenerator.kt:722 */
          55  +
        _ => {
          56  +
            /* JsonParserGenerator.kt:723 */
          57  +
            Err(
   35     58   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     59   
                    "expected start array or null",
   37     60   
                ),
   38         -
        ),
          61  +
            )
          62  +
            /* JsonParserGenerator.kt:722 */
          63  +
        } /* JsonParserGenerator.kt:712 */
   39     64   
    }
          65  +
    /* JsonParserGenerator.kt:398 */
   40     66   
}

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

@@ -1,1 +62,89 @@
    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_length_map<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::length_map_unconstrained::LengthMapUnconstrained>,
    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:502 */
   52     72   
            Ok(Some(
   53     73   
                crate::unconstrained::length_map_unconstrained::LengthMapUnconstrained(map),
   54     74   
            ))
          75  +
            /* JsonParserGenerator.kt:713 */
   55     76   
        }
   56         -
        _ => Err(
          77  +
        /* JsonParserGenerator.kt:722 */
          78  +
        _ => {
          79  +
            /* JsonParserGenerator.kt:723 */
          80  +
            Err(
   57     81   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   58     82   
                    "expected start object or null",
   59     83   
                ),
   60         -
        ),
          84  +
            )
          85  +
            /* JsonParserGenerator.kt:722 */
          86  +
        } /* JsonParserGenerator.kt:712 */
   61     87   
    }
          88  +
    /* JsonParserGenerator.kt:460 */
   62     89   
}

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

@@ -1,1 +40,66 @@
    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_length_set_of_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::length_set_of_pattern_string_unconstrained::LengthSetOfPatternStringUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
    3      4   
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           5  +
    /* JsonParserGenerator.kt:712 */
    4      6   
    match tokens.next().transpose()? {
           7  +
        /* JsonParserGenerator.kt:713 */
    5      8   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
    6      9   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          10  +
            /* JsonParserGenerator.kt:407 */
    7     11   
            let mut items = Vec::new();
          12  +
            /* JsonParserGenerator.kt:408 */
    8     13   
            loop {
          14  +
                /* JsonParserGenerator.kt:409 */
    9     15   
                match tokens.peek() {
          16  +
                    /* JsonParserGenerator.kt:410 */
   10     17   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          18  +
                        /* JsonParserGenerator.kt:411 */
   11     19   
                        tokens.next().transpose().unwrap();
   12     20   
                        break;
          21  +
                        /* JsonParserGenerator.kt:410 */
   13     22   
                    }
          23  +
                    /* JsonParserGenerator.kt:413 */
   14     24   
                    _ => {
   15         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   16         -
                            tokens.next(),
   17         -
                        )?
   18         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   19         -
                        .transpose()?;
          25  +
                        /* JsonParserGenerator.kt:419 */
          26  +
                        let value =
          27  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          28  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          29  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          30  +
                                /* JsonParserGenerator.kt:339 */)
          31  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          32  +
                        /* JsonParserGenerator.kt:419 */;
          33  +
                        /* JsonParserGenerator.kt:422 */
   20     34   
                        if let Some(value) = value {
   21     35   
                            items.push(value);
   22         -
                        } else {
          36  +
                        }
          37  +
                        /* JsonParserGenerator.kt:430 */
          38  +
                        else {
   23     39   
                            return Err(
   24     40   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25     41   
                                    "dense list cannot contain null values",
   26     42   
                                ),
   27     43   
                            );
   28     44   
                        }
          45  +
                        /* JsonParserGenerator.kt:413 */
          46  +
                    } /* JsonParserGenerator.kt:409 */
   29     47   
                }
          48  +
                /* JsonParserGenerator.kt:408 */
   30     49   
            }
   31         -
            }
          50  +
            /* JsonParserGenerator.kt:444 */
   32     51   
            Ok(Some(crate::unconstrained::length_set_of_pattern_string_unconstrained::LengthSetOfPatternStringUnconstrained(items)))
          52  +
            /* JsonParserGenerator.kt:713 */
   33     53   
        }
   34         -
        _ => Err(
          54  +
        /* JsonParserGenerator.kt:722 */
          55  +
        _ => {
          56  +
            /* JsonParserGenerator.kt:723 */
          57  +
            Err(
   35     58   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     59   
                    "expected start array or null",
   37     60   
                ),
   38         -
        ),
          61  +
            )
          62  +
            /* JsonParserGenerator.kt:722 */
          63  +
        } /* JsonParserGenerator.kt:712 */
   39     64   
    }
          65  +
    /* JsonParserGenerator.kt:398 */
   40     66   
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_list_of_length_blob.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_list_of_length_blob<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::list_of_length_blob_unconstrained::ListOfLengthBlobUnconstrained>,
    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_blob_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
          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:444 */
   42     59   
            Ok(Some(crate::unconstrained::list_of_length_blob_unconstrained::ListOfLengthBlobUnconstrained(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/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_list_of_length_pattern_string.rs

@@ -1,1 +40,66 @@
    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_list_of_length_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
    3      4   
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           5  +
    /* JsonParserGenerator.kt:712 */
    4      6   
    match tokens.next().transpose()? {
           7  +
        /* JsonParserGenerator.kt:713 */
    5      8   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
    6      9   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          10  +
            /* JsonParserGenerator.kt:407 */
    7     11   
            let mut items = Vec::new();
          12  +
            /* JsonParserGenerator.kt:408 */
    8     13   
            loop {
          14  +
                /* JsonParserGenerator.kt:409 */
    9     15   
                match tokens.peek() {
          16  +
                    /* JsonParserGenerator.kt:410 */
   10     17   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          18  +
                        /* JsonParserGenerator.kt:411 */
   11     19   
                        tokens.next().transpose().unwrap();
   12     20   
                        break;
          21  +
                        /* JsonParserGenerator.kt:410 */
   13     22   
                    }
          23  +
                    /* JsonParserGenerator.kt:413 */
   14     24   
                    _ => {
   15         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   16         -
                            tokens.next(),
   17         -
                        )?
   18         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   19         -
                        .transpose()?;
          25  +
                        /* JsonParserGenerator.kt:419 */
          26  +
                        let value =
          27  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          28  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          29  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          30  +
                                /* JsonParserGenerator.kt:339 */)
          31  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          32  +
                        /* JsonParserGenerator.kt:419 */;
          33  +
                        /* JsonParserGenerator.kt:422 */
   20     34   
                        if let Some(value) = value {
   21     35   
                            items.push(value);
   22         -
                        } else {
          36  +
                        }
          37  +
                        /* JsonParserGenerator.kt:430 */
          38  +
                        else {
   23     39   
                            return Err(
   24     40   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25     41   
                                    "dense list cannot contain null values",
   26     42   
                                ),
   27     43   
                            );
   28     44   
                        }
          45  +
                        /* JsonParserGenerator.kt:413 */
          46  +
                    } /* JsonParserGenerator.kt:409 */
   29     47   
                }
          48  +
                /* JsonParserGenerator.kt:408 */
   30     49   
            }
   31         -
            }
          50  +
            /* JsonParserGenerator.kt:444 */
   32     51   
            Ok(Some(crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained(items)))
          52  +
            /* JsonParserGenerator.kt:713 */
   33     53   
        }
   34         -
        _ => Err(
          54  +
        /* JsonParserGenerator.kt:722 */
          55  +
        _ => {
          56  +
            /* JsonParserGenerator.kt:723 */
          57  +
            Err(
   35     58   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     59   
                    "expected start array or null",
   37     60   
                ),
   38         -
        ),
          61  +
            )
          62  +
            /* JsonParserGenerator.kt:722 */
          63  +
        } /* JsonParserGenerator.kt:712 */
   39     64   
    }
          65  +
    /* JsonParserGenerator.kt:398 */
   40     66   
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_list_of_length_string.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_list_of_length_string<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<
    6      7   
        crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained,
    7      8   
    >,
    8      9   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    9     10   
>
   10     11   
where
   11     12   
    I: Iterator<
   12     13   
        Item = Result<
   13     14   
            ::aws_smithy_json::deserialize::Token<'a>,
   14     15   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   15     16   
        >,
   16     17   
    >,
   17     18   
{
          19  +
    /* JsonParserGenerator.kt:712 */
   18     20   
    match tokens.next().transpose()? {
          21  +
        /* JsonParserGenerator.kt:713 */
   19     22   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   20     23   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          24  +
            /* JsonParserGenerator.kt:407 */
   21     25   
            let mut items = Vec::new();
          26  +
            /* JsonParserGenerator.kt:408 */
   22     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:409 */
   23     29   
                match tokens.peek() {
          30  +
                    /* JsonParserGenerator.kt:410 */
   24     31   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          32  +
                        /* JsonParserGenerator.kt:411 */
   25     33   
                        tokens.next().transpose().unwrap();
   26     34   
                        break;
          35  +
                        /* JsonParserGenerator.kt:410 */
   27     36   
                    }
          37  +
                    /* JsonParserGenerator.kt:413 */
   28     38   
                    _ => {
   29         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   30         -
                            tokens.next(),
   31         -
                        )?
   32         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   33         -
                        .transpose()?;
          39  +
                        /* JsonParserGenerator.kt:419 */
          40  +
                        let value =
          41  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          42  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          43  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          44  +
                                /* JsonParserGenerator.kt:339 */)
          45  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          46  +
                        /* JsonParserGenerator.kt:419 */;
          47  +
                        /* JsonParserGenerator.kt:422 */
   34     48   
                        if let Some(value) = value {
   35     49   
                            items.push(value);
   36         -
                        } else {
          50  +
                        }
          51  +
                        /* JsonParserGenerator.kt:430 */
          52  +
                        else {
   37     53   
                            return Err(
   38     54   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     55   
                                    "dense list cannot contain null values",
   40     56   
                                ),
   41     57   
                            );
   42     58   
                        }
          59  +
                        /* JsonParserGenerator.kt:413 */
          60  +
                    } /* JsonParserGenerator.kt:409 */
   43     61   
                }
          62  +
                /* JsonParserGenerator.kt:408 */
   44     63   
            }
   45         -
            }
          64  +
            /* JsonParserGenerator.kt:444 */
   46     65   
            Ok(Some(crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(items)))
          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/constraints_without_public_constrained_types/rust-server-codegen/src/protocol_serde/shape_list_of_pattern_string.rs

@@ -1,1 +40,66 @@
    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_list_of_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
    3      4   
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           5  +
    /* JsonParserGenerator.kt:712 */
    4      6   
    match tokens.next().transpose()? {
           7  +
        /* JsonParserGenerator.kt:713 */
    5      8   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
    6      9   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          10  +
            /* JsonParserGenerator.kt:407 */
    7     11   
            let mut items = Vec::new();
          12  +
            /* JsonParserGenerator.kt:408 */
    8     13   
            loop {
          14  +
                /* JsonParserGenerator.kt:409 */
    9     15   
                match tokens.peek() {
          16  +
                    /* JsonParserGenerator.kt:410 */
   10     17   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          18  +
                        /* JsonParserGenerator.kt:411 */
   11     19   
                        tokens.next().transpose().unwrap();
   12     20   
                        break;
          21  +
                        /* JsonParserGenerator.kt:410 */
   13     22   
                    }
          23  +
                    /* JsonParserGenerator.kt:413 */
   14     24   
                    _ => {
   15         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   16         -
                            tokens.next(),
   17         -
                        )?
   18         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   19         -
                        .transpose()?;
          25  +
                        /* JsonParserGenerator.kt:419 */
          26  +
                        let value =
          27  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          28  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          29  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          30  +
                                /* JsonParserGenerator.kt:339 */)
          31  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          32  +
                        /* JsonParserGenerator.kt:419 */;
          33  +
                        /* JsonParserGenerator.kt:422 */
   20     34   
                        if let Some(value) = value {
   21     35   
                            items.push(value);
   22         -
                        } else {
          36  +
                        }
          37  +
                        /* JsonParserGenerator.kt:430 */
          38  +
                        else {
   23     39   
                            return Err(
   24     40   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25     41   
                                    "dense list cannot contain null values",
   26     42   
                                ),
   27     43   
                            );
   28     44   
                        }
          45  +
                        /* JsonParserGenerator.kt:413 */
          46  +
                    } /* JsonParserGenerator.kt:409 */
   29     47   
                }
          48  +
                /* JsonParserGenerator.kt:408 */
   30     49   
            }
   31         -
            }
          50  +
            /* JsonParserGenerator.kt:444 */
   32     51   
            Ok(Some(crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained(items)))
          52  +
            /* JsonParserGenerator.kt:713 */
   33     53   
        }
   34         -
        _ => Err(
          54  +
        /* JsonParserGenerator.kt:722 */
          55  +
        _ => {
          56  +
            /* JsonParserGenerator.kt:723 */
          57  +
            Err(
   35     58   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     59   
                    "expected start array or null",
   37     60   
                ),
   38         -
        ),
          61  +
            )
          62  +
            /* JsonParserGenerator.kt:722 */
          63  +
        } /* JsonParserGenerator.kt:712 */
   39     64   
    }
          65  +
    /* JsonParserGenerator.kt:398 */
   40     66   
}

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

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

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

@@ -1,1 +54,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_list_of_range_integer<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<
    6      7   
        crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained,
    7      8   
    >,
    8      9   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    9     10   
>
   10     11   
where
   11     12   
    I: Iterator<
   12     13   
        Item = Result<
   13     14   
            ::aws_smithy_json::deserialize::Token<'a>,
   14     15   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   15     16   
        >,
   16     17   
    >,
   17     18   
{
          19  +
    /* JsonParserGenerator.kt:712 */
   18     20   
    match tokens.next().transpose()? {
          21  +
        /* JsonParserGenerator.kt:713 */
   19     22   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   20     23   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          24  +
            /* JsonParserGenerator.kt:407 */
   21     25   
            let mut items = Vec::new();
          26  +
            /* JsonParserGenerator.kt:408 */
   22     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:409 */
   23     29   
                match tokens.peek() {
          30  +
                    /* JsonParserGenerator.kt:410 */
   24     31   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          32  +
                        /* JsonParserGenerator.kt:411 */
   25     33   
                        tokens.next().transpose().unwrap();
   26     34   
                        break;
          35  +
                        /* JsonParserGenerator.kt:410 */
   27     36   
                    }
          37  +
                    /* JsonParserGenerator.kt:413 */
   28     38   
                    _ => {
   29         -
                        let value = ::aws_smithy_json::deserialize::token::expect_number_or_null(
   30         -
                            tokens.next(),
   31         -
                        )?
          39  +
                        /* JsonParserGenerator.kt:419 */
          40  +
                        let value =
          41  +
                            /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   32     42   
                                                .map(i32::try_from)
   33         -
                        .transpose()?;
          43  +
                                                .transpose()?
          44  +
                        /* JsonParserGenerator.kt:419 */;
          45  +
                        /* JsonParserGenerator.kt:422 */
   34     46   
                        if let Some(value) = value {
   35     47   
                            items.push(value);
   36         -
                        } else {
          48  +
                        }
          49  +
                        /* JsonParserGenerator.kt:430 */
          50  +
                        else {
   37     51   
                            return Err(
   38     52   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     53   
                                    "dense list cannot contain null values",
   40     54   
                                ),
   41     55   
                            );
   42     56   
                        }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   43     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   44     61   
            }
   45         -
            }
          62  +
            /* JsonParserGenerator.kt:444 */
   46     63   
            Ok(Some(crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(items)))
          64  +
            /* JsonParserGenerator.kt:713 */
   47     65   
        }
   48         -
        _ => Err(
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
   49     70   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   50     71   
                    "expected start array or null",
   51     72   
                ),
   52         -
        ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   53     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   54     78   
}

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

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

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

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

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

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