Server Test

Server Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb

Files changed:

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

@@ -0,1 +0,62 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_length_map<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::length_map_unconstrained::LengthMapUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          19  +
            let mut map = ::std::collections::HashMap::new();
          20  +
            loop {
          21  +
                match tokens.next().transpose()? {
          22  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          23  +
                    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()?;
          30  +
                        match value {
          31  +
                            Some(value) => {
          32  +
                                map.insert(key, value);
          33  +
                            }
          34  +
                            None => {
          35  +
                                return Err(
          36  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          37  +
                                        "dense map cannot contain null values",
          38  +
                                    ),
          39  +
                                )
          40  +
                            }
          41  +
                        }
          42  +
                    }
          43  +
                    other => {
          44  +
                        return Err(
          45  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          46  +
                                format!("expected object key or end object, found: {other:?}"),
          47  +
                            ),
          48  +
                        )
          49  +
                    }
          50  +
                }
          51  +
            }
          52  +
            Ok(Some(
          53  +
                crate::unconstrained::length_map_unconstrained::LengthMapUnconstrained(map),
          54  +
            ))
          55  +
        }
          56  +
        _ => Err(
          57  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          58  +
                "expected start object or null",
          59  +
            ),
          60  +
        ),
          61  +
    }
          62  +
}

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

@@ -0,1 +0,40 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
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  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          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()?;
          20  +
                        if let Some(value) = value {
          21  +
                            items.push(value);
          22  +
                        } else {
          23  +
                            return Err(
          24  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                    "dense list cannot contain null values",
          26  +
                                ),
          27  +
                            );
          28  +
                        }
          29  +
                    }
          30  +
                }
          31  +
            }
          32  +
            Ok(Some(crate::unconstrained::length_set_of_pattern_string_unconstrained::LengthSetOfPatternStringUnconstrained(items)))
          33  +
        }
          34  +
        _ => Err(
          35  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                "expected start array or null",
          37  +
            ),
          38  +
        ),
          39  +
    }
          40  +
}

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

@@ -0,1 +0,50 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_length_blob<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::list_of_length_blob_unconstrained::ListOfLengthBlobUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          19  +
            let mut items = Vec::new();
          20  +
            loop {
          21  +
                match tokens.peek() {
          22  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          23  +
                        tokens.next().transpose().unwrap();
          24  +
                        break;
          25  +
                    }
          26  +
                    _ => {
          27  +
                        let value = ::aws_smithy_json::deserialize::token::expect_blob_or_null(
          28  +
                            tokens.next(),
          29  +
                        )?;
          30  +
                        if let Some(value) = value {
          31  +
                            items.push(value);
          32  +
                        } else {
          33  +
                            return Err(
          34  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          35  +
                                    "dense list cannot contain null values",
          36  +
                                ),
          37  +
                            );
          38  +
                        }
          39  +
                    }
          40  +
                }
          41  +
            }
          42  +
            Ok(Some(crate::unconstrained::list_of_length_blob_unconstrained::ListOfLengthBlobUnconstrained(items)))
          43  +
        }
          44  +
        _ => Err(
          45  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          46  +
                "expected start array or null",
          47  +
            ),
          48  +
        ),
          49  +
    }
          50  +
}

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

@@ -0,1 +0,40 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
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  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          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()?;
          20  +
                        if let Some(value) = value {
          21  +
                            items.push(value);
          22  +
                        } else {
          23  +
                            return Err(
          24  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                    "dense list cannot contain null values",
          26  +
                                ),
          27  +
                            );
          28  +
                        }
          29  +
                    }
          30  +
                }
          31  +
            }
          32  +
            Ok(Some(crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained(items)))
          33  +
        }
          34  +
        _ => Err(
          35  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                "expected start array or null",
          37  +
            ),
          38  +
        ),
          39  +
    }
          40  +
}

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

@@ -0,1 +0,54 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_length_string<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained,
           7  +
    >,
           8  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           9  +
>
          10  +
where
          11  +
    I: Iterator<
          12  +
        Item = Result<
          13  +
            ::aws_smithy_json::deserialize::Token<'a>,
          14  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          15  +
        >,
          16  +
    >,
          17  +
{
          18  +
    match tokens.next().transpose()? {
          19  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          20  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          21  +
            let mut items = Vec::new();
          22  +
            loop {
          23  +
                match tokens.peek() {
          24  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          25  +
                        tokens.next().transpose().unwrap();
          26  +
                        break;
          27  +
                    }
          28  +
                    _ => {
          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()?;
          34  +
                        if let Some(value) = value {
          35  +
                            items.push(value);
          36  +
                        } else {
          37  +
                            return Err(
          38  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          39  +
                                    "dense list cannot contain null values",
          40  +
                                ),
          41  +
                            );
          42  +
                        }
          43  +
                    }
          44  +
                }
          45  +
            }
          46  +
            Ok(Some(crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(items)))
          47  +
        }
          48  +
        _ => Err(
          49  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          50  +
                "expected start array or null",
          51  +
            ),
          52  +
        ),
          53  +
    }
          54  +
}

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

@@ -0,1 +0,40 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
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  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          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()?;
          20  +
                        if let Some(value) = value {
          21  +
                            items.push(value);
          22  +
                        } else {
          23  +
                            return Err(
          24  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                    "dense list cannot contain null values",
          26  +
                                ),
          27  +
                            );
          28  +
                        }
          29  +
                    }
          30  +
                }
          31  +
            }
          32  +
            Ok(Some(crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained(items)))
          33  +
        }
          34  +
        _ => Err(
          35  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                "expected start array or null",
          37  +
            ),
          38  +
        ),
          39  +
    }
          40  +
}

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

@@ -0,1 +0,52 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_range_byte<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          19  +
            let mut items = Vec::new();
          20  +
            loop {
          21  +
                match tokens.peek() {
          22  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          23  +
                        tokens.next().transpose().unwrap();
          24  +
                        break;
          25  +
                    }
          26  +
                    _ => {
          27  +
                        let value = ::aws_smithy_json::deserialize::token::expect_number_or_null(
          28  +
                            tokens.next(),
          29  +
                        )?
          30  +
                        .map(i8::try_from)
          31  +
                        .transpose()?;
          32  +
                        if let Some(value) = value {
          33  +
                            items.push(value);
          34  +
                        } else {
          35  +
                            return Err(
          36  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          37  +
                                    "dense list cannot contain null values",
          38  +
                                ),
          39  +
                            );
          40  +
                        }
          41  +
                    }
          42  +
                }
          43  +
            }
          44  +
            Ok(Some(crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(items)))
          45  +
        }
          46  +
        _ => Err(
          47  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                "expected start array or null",
          49  +
            ),
          50  +
        ),
          51  +
    }
          52  +
}

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

@@ -0,1 +0,54 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_range_integer<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained,
           7  +
    >,
           8  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           9  +
>
          10  +
where
          11  +
    I: Iterator<
          12  +
        Item = Result<
          13  +
            ::aws_smithy_json::deserialize::Token<'a>,
          14  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          15  +
        >,
          16  +
    >,
          17  +
{
          18  +
    match tokens.next().transpose()? {
          19  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          20  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          21  +
            let mut items = Vec::new();
          22  +
            loop {
          23  +
                match tokens.peek() {
          24  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          25  +
                        tokens.next().transpose().unwrap();
          26  +
                        break;
          27  +
                    }
          28  +
                    _ => {
          29  +
                        let value = ::aws_smithy_json::deserialize::token::expect_number_or_null(
          30  +
                            tokens.next(),
          31  +
                        )?
          32  +
                        .map(i32::try_from)
          33  +
                        .transpose()?;
          34  +
                        if let Some(value) = value {
          35  +
                            items.push(value);
          36  +
                        } else {
          37  +
                            return Err(
          38  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          39  +
                                    "dense list cannot contain null values",
          40  +
                                ),
          41  +
                            );
          42  +
                        }
          43  +
                    }
          44  +
                }
          45  +
            }
          46  +
            Ok(Some(crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(items)))
          47  +
        }
          48  +
        _ => Err(
          49  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          50  +
                "expected start array or null",
          51  +
            ),
          52  +
        ),
          53  +
    }
          54  +
}

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

@@ -0,1 +0,52 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_range_long<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          19  +
            let mut items = Vec::new();
          20  +
            loop {
          21  +
                match tokens.peek() {
          22  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          23  +
                        tokens.next().transpose().unwrap();
          24  +
                        break;
          25  +
                    }
          26  +
                    _ => {
          27  +
                        let value = ::aws_smithy_json::deserialize::token::expect_number_or_null(
          28  +
                            tokens.next(),
          29  +
                        )?
          30  +
                        .map(i64::try_from)
          31  +
                        .transpose()?;
          32  +
                        if let Some(value) = value {
          33  +
                            items.push(value);
          34  +
                        } else {
          35  +
                            return Err(
          36  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          37  +
                                    "dense list cannot contain null values",
          38  +
                                ),
          39  +
                            );
          40  +
                        }
          41  +
                    }
          42  +
                }
          43  +
            }
          44  +
            Ok(Some(crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(items)))
          45  +
        }
          46  +
        _ => Err(
          47  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                "expected start array or null",
          49  +
            ),
          50  +
        ),
          51  +
    }
          52  +
}

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

@@ -0,1 +0,52 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_of_range_short<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          19  +
            let mut items = Vec::new();
          20  +
            loop {
          21  +
                match tokens.peek() {
          22  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          23  +
                        tokens.next().transpose().unwrap();
          24  +
                        break;
          25  +
                    }
          26  +
                    _ => {
          27  +
                        let value = ::aws_smithy_json::deserialize::token::expect_number_or_null(
          28  +
                            tokens.next(),
          29  +
                        )?
          30  +
                        .map(i16::try_from)
          31  +
                        .transpose()?;
          32  +
                        if let Some(value) = value {
          33  +
                            items.push(value);
          34  +
                        } else {
          35  +
                            return Err(
          36  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          37  +
                                    "dense list cannot contain null values",
          38  +
                                ),
          39  +
                            );
          40  +
                        }
          41  +
                    }
          42  +
                }
          43  +
            }
          44  +
            Ok(Some(crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(items)))
          45  +
        }
          46  +
        _ => Err(
          47  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                "expected start array or null",
          49  +
            ),
          50  +
        ),
          51  +
    }
          52  +
}

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

@@ -0,1 +0,58 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_length_blob<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::map_of_length_blob_unconstrained::MapOfLengthBlobUnconstrained>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          19  +
            let mut map = ::std::collections::HashMap::new();
          20  +
            loop {
          21  +
                match tokens.next().transpose()? {
          22  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          23  +
                    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  +
                        )?;
          28  +
                        match value {
          29  +
                            Some(value) => {
          30  +
                                map.insert(key, value);
          31  +
                            }
          32  +
                            None => {
          33  +
                                return Err(
          34  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          35  +
                                        "dense map cannot contain null values",
          36  +
                                    ),
          37  +
                                )
          38  +
                            }
          39  +
                        }
          40  +
                    }
          41  +
                    other => {
          42  +
                        return Err(
          43  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          44  +
                                format!("expected object key or end object, found: {other:?}"),
          45  +
                            ),
          46  +
                        )
          47  +
                    }
          48  +
                }
          49  +
            }
          50  +
            Ok(Some(crate::unconstrained::map_of_length_blob_unconstrained::MapOfLengthBlobUnconstrained(map)))
          51  +
        }
          52  +
        _ => Err(
          53  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          54  +
                "expected start object or null",
          55  +
            ),
          56  +
        ),
          57  +
    }
          58  +
}

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

@@ -0,1 +0,48 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_length_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::map_of_length_pattern_string_unconstrained::MapOfLengthPatternStringUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
           7  +
            let mut map = ::std::collections::HashMap::new();
           8  +
            loop {
           9  +
                match tokens.next().transpose()? {
          10  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          11  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          12  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          13  +
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
          14  +
                            tokens.next(),
          15  +
                        )?
          16  +
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          17  +
                        .transpose()?;
          18  +
                        match value {
          19  +
                            Some(value) => {
          20  +
                                map.insert(key, value);
          21  +
                            }
          22  +
                            None => {
          23  +
                                return Err(
          24  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                        "dense map cannot contain null values",
          26  +
                                    ),
          27  +
                                )
          28  +
                            }
          29  +
                        }
          30  +
                    }
          31  +
                    other => {
          32  +
                        return Err(
          33  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          34  +
                                format!("expected object key or end object, found: {other:?}"),
          35  +
                            ),
          36  +
                        )
          37  +
                    }
          38  +
                }
          39  +
            }
          40  +
            Ok(Some(crate::unconstrained::map_of_length_pattern_string_unconstrained::MapOfLengthPatternStringUnconstrained(map)))
          41  +
        }
          42  +
        _ => Err(
          43  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          44  +
                "expected start object or null",
          45  +
            ),
          46  +
        ),
          47  +
    }
          48  +
}

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

@@ -0,1 +0,62 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_length_string<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::map_of_length_string_unconstrained::MapOfLengthStringUnconstrained,
           7  +
    >,
           8  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           9  +
>
          10  +
where
          11  +
    I: Iterator<
          12  +
        Item = Result<
          13  +
            ::aws_smithy_json::deserialize::Token<'a>,
          14  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          15  +
        >,
          16  +
    >,
          17  +
{
          18  +
    match tokens.next().transpose()? {
          19  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          20  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          21  +
            let mut map = ::std::collections::HashMap::new();
          22  +
            loop {
          23  +
                match tokens.next().transpose()? {
          24  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          25  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          26  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          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()?;
          32  +
                        match value {
          33  +
                            Some(value) => {
          34  +
                                map.insert(key, value);
          35  +
                            }
          36  +
                            None => {
          37  +
                                return Err(
          38  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          39  +
                                        "dense map cannot contain null values",
          40  +
                                    ),
          41  +
                                )
          42  +
                            }
          43  +
                        }
          44  +
                    }
          45  +
                    other => {
          46  +
                        return Err(
          47  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                                format!("expected object key or end object, found: {other:?}"),
          49  +
                            ),
          50  +
                        )
          51  +
                    }
          52  +
                }
          53  +
            }
          54  +
            Ok(Some(crate::unconstrained::map_of_length_string_unconstrained::MapOfLengthStringUnconstrained(map)))
          55  +
        }
          56  +
        _ => Err(
          57  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          58  +
                "expected start object or null",
          59  +
            ),
          60  +
        ),
          61  +
    }
          62  +
}

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

@@ -0,1 +0,44 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_list_of_list_of_con_b<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::map_of_list_of_list_of_con_b_unconstrained::MapOfListOfListOfConBUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
           7  +
            let mut map = ::std::collections::HashMap::new();
           8  +
            loop {
           9  +
                match tokens.next().transpose()? {
          10  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          11  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          12  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          13  +
                        let value = crate::protocol_serde::shape_con_b_list::de_con_b_list(tokens)?;
          14  +
                        match value {
          15  +
                            Some(value) => {
          16  +
                                map.insert(key, value);
          17  +
                            }
          18  +
                            None => {
          19  +
                                return Err(
          20  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          21  +
                                        "dense map cannot contain null values",
          22  +
                                    ),
          23  +
                                )
          24  +
                            }
          25  +
                        }
          26  +
                    }
          27  +
                    other => {
          28  +
                        return Err(
          29  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          30  +
                                format!("expected object key or end object, found: {other:?}"),
          31  +
                            ),
          32  +
                        )
          33  +
                    }
          34  +
                }
          35  +
            }
          36  +
            Ok(Some(crate::unconstrained::map_of_list_of_list_of_con_b_unconstrained::MapOfListOfListOfConBUnconstrained(map)))
          37  +
        }
          38  +
        _ => Err(
          39  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          40  +
                "expected start object or null",
          41  +
            ),
          42  +
        ),
          43  +
    }
          44  +
}

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

@@ -0,1 +0,46 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_map_of_list_of_list_of_con_b<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::map_of_map_of_list_of_list_of_con_b_unconstrained::MapOfMapOfListOfListOfConBUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
           7  +
            let mut map = ::std::collections::HashMap::new();
           8  +
            loop {
           9  +
                match tokens.next().transpose()? {
          10  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          11  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          12  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          13  +
                        let value =
          14  +
                            crate::protocol_serde::shape_map_of_list_of_list_of_con_b::de_map_of_list_of_list_of_con_b(tokens)?
          15  +
                        ;
          16  +
                        match value {
          17  +
                            Some(value) => {
          18  +
                                map.insert(key, value);
          19  +
                            }
          20  +
                            None => {
          21  +
                                return Err(
          22  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          23  +
                                        "dense map cannot contain null values",
          24  +
                                    ),
          25  +
                                )
          26  +
                            }
          27  +
                        }
          28  +
                    }
          29  +
                    other => {
          30  +
                        return Err(
          31  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          32  +
                                format!("expected object key or end object, found: {other:?}"),
          33  +
                            ),
          34  +
                        )
          35  +
                    }
          36  +
                }
          37  +
            }
          38  +
            Ok(Some(crate::unconstrained::map_of_map_of_list_of_list_of_con_b_unconstrained::MapOfMapOfListOfListOfConBUnconstrained(map)))
          39  +
        }
          40  +
        _ => Err(
          41  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          42  +
                "expected start object or null",
          43  +
            ),
          44  +
        ),
          45  +
    }
          46  +
}

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

@@ -0,1 +0,62 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_map_of_pattern_string<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::map_of_pattern_string_unconstrained::MapOfPatternStringUnconstrained,
           7  +
    >,
           8  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           9  +
>
          10  +
where
          11  +
    I: Iterator<
          12  +
        Item = Result<
          13  +
            ::aws_smithy_json::deserialize::Token<'a>,
          14  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          15  +
        >,
          16  +
    >,
          17  +
{
          18  +
    match tokens.next().transpose()? {
          19  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          20  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          21  +
            let mut map = ::std::collections::HashMap::new();
          22  +
            loop {
          23  +
                match tokens.next().transpose()? {
          24  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          25  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          26  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          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()?;
          32  +
                        match value {
          33  +
                            Some(value) => {
          34  +
                                map.insert(key, value);
          35  +
                            }
          36  +
                            None => {
          37  +
                                return Err(
          38  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          39  +
                                        "dense map cannot contain null values",
          40  +
                                    ),
          41  +
                                )
          42  +
                            }
          43  +
                        }
          44  +
                    }
          45  +
                    other => {
          46  +
                        return Err(
          47  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                                format!("expected object key or end object, found: {other:?}"),
          49  +
                            ),
          50  +
                        )
          51  +
                    }
          52  +
                }
          53  +
            }
          54  +
            Ok(Some(crate::unconstrained::map_of_pattern_string_unconstrained::MapOfPatternStringUnconstrained(map)))
          55  +
        }
          56  +
        _ => Err(
          57  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          58  +
                "expected start object or null",
          59  +
            ),
          60  +
        ),
          61  +
    }
          62  +
}