Server Test

Server Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,52 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_sensitive_length_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::sensitive_length_list_unconstrained::SensitiveLengthListUnconstrained,
           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 =
          30  +
                            crate::protocol_serde::shape_sensitive_structure::de_sensitive_structure(tokens)?
          31  +
                        ;
          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::sensitive_length_list_unconstrained::SensitiveLengthListUnconstrained(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_sensitive_structure.rs

@@ -0,1 +0,37 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_sensitive_structure(
           3  +
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    #[allow(unused_variables)] input: &crate::model::SensitiveStructure,
           5  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    Ok(())
           7  +
}
           8  +
           9  +
pub(crate) fn de_sensitive_structure<'a, I>(
          10  +
    tokens: &mut ::std::iter::Peekable<I>,
          11  +
) -> ::std::result::Result<
          12  +
    Option<crate::model::SensitiveStructure>,
          13  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
          14  +
>
          15  +
where
          16  +
    I: Iterator<
          17  +
        Item = Result<
          18  +
            ::aws_smithy_json::deserialize::Token<'a>,
          19  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          20  +
        >,
          21  +
    >,
          22  +
{
          23  +
    match tokens.next().transpose()? {
          24  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          25  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          26  +
            #[allow(unused_mut)]
          27  +
            let mut builder = crate::model::sensitive_structure_internal::Builder::default();
          28  +
            ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
          29  +
            Ok(Some(builder.build()))
          30  +
        }
          31  +
        _ => Err(
          32  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          33  +
                "expected start object or null",
          34  +
            ),
          35  +
        ),
          36  +
    }
          37  +
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types-http0x/rust-server-codegen/src/protocol_serde/shape_set_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_set_of_length_pattern_string<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> ::std::result::Result<Option<crate::unconstrained::set_of_length_pattern_string_unconstrained::SetOfLengthPatternStringUnconstrained>, ::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::set_of_length_pattern_string_unconstrained::SetOfLengthPatternStringUnconstrained(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_set_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_set_of_length_string<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained,
           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::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(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_set_of_pattern_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_set_of_pattern_string<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::set_of_pattern_string_unconstrained::SetOfPatternStringUnconstrained,
           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::set_of_pattern_string_unconstrained::SetOfPatternStringUnconstrained(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_set_of_range_byte.rs

@@ -0,1 +0,56 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_set_of_range_byte<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained>,
           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(
          45  +
                crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
          46  +
                    items,
          47  +
                ),
          48  +
            ))
          49  +
        }
          50  +
        _ => Err(
          51  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          52  +
                "expected start array or null",
          53  +
            ),
          54  +
        ),
          55  +
    }
          56  +
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types-http0x/rust-server-codegen/src/protocol_serde/shape_set_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_set_of_range_integer<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<
           6  +
        crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained,
           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::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(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_set_of_range_long.rs

@@ -0,1 +0,56 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_set_of_range_long<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained>,
           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(
          45  +
                crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
          46  +
                    items,
          47  +
                ),
          48  +
            ))
          49  +
        }
          50  +
        _ => Err(
          51  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          52  +
                "expected start array or null",
          53  +
            ),
          54  +
        ),
          55  +
    }
          56  +
}

tmp-codegen-diff/codegen-server-test/constraints_without_public_constrained_types-http0x/rust-server-codegen/src/protocol_serde/shape_set_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_set_of_range_short<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained>,
           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::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(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_sparse_length_list.rs

@@ -0,1 +0,45 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_sparse_length_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::sparse_length_list_unconstrained::SparseLengthListUnconstrained>,
           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  +
                        items.push(
          28  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
          29  +
                                tokens.next(),
          30  +
                            )?
          31  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          32  +
                            .transpose()?,
          33  +
                        );
          34  +
                    }
          35  +
                }
          36  +
            }
          37  +
            Ok(Some(crate::unconstrained::sparse_length_list_unconstrained::SparseLengthListUnconstrained(items)))
          38  +
        }
          39  +
        _ => Err(
          40  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          41  +
                "expected start array or null",
          42  +
            ),
          43  +
        ),
          44  +
    }
          45  +
}

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

@@ -0,1 +0,53 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_sparse_length_map<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::sparse_length_map_unconstrained::SparseLengthMapUnconstrained>,
           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  +
                        map.insert(key, value);
          31  +
                    }
          32  +
                    other => {
          33  +
                        return Err(
          34  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          35  +
                                format!("expected object key or end object, found: {other:?}"),
          36  +
                            ),
          37  +
                        )
          38  +
                    }
          39  +
                }
          40  +
            }
          41  +
            Ok(Some(
          42  +
                crate::unconstrained::sparse_length_map_unconstrained::SparseLengthMapUnconstrained(
          43  +
                    map,
          44  +
                ),
          45  +
            ))
          46  +
        }
          47  +
        _ => Err(
          48  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
                "expected start object or null",
          50  +
            ),
          51  +
        ),
          52  +
    }
          53  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_sparse_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::sparse_list_unconstrained::SparseListUnconstrained>,
           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  +
                        items.push(
          28  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
          29  +
                                tokens.next(),
          30  +
                            )?
          31  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          32  +
                            .transpose()?,
          33  +
                        );
          34  +
                    }
          35  +
                }
          36  +
            }
          37  +
            Ok(Some(
          38  +
                crate::unconstrained::sparse_list_unconstrained::SparseListUnconstrained(items),
          39  +
            ))
          40  +
        }
          41  +
        _ => Err(
          42  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          43  +
                "expected start array or null",
          44  +
            ),
          45  +
        ),
          46  +
    }
          47  +
}

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

@@ -0,1 +0,50 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_sparse_map<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::sparse_map_unconstrained::SparseMapUnconstrained>,
           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 =
          26  +
                            crate::protocol_serde::shape_unique_items_list::de_unique_items_list(
          27  +
                                tokens,
          28  +
                            )?;
          29  +
                        map.insert(key, value);
          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(
          41  +
                crate::unconstrained::sparse_map_unconstrained::SparseMapUnconstrained(map),
          42  +
            ))
          43  +
        }
          44  +
        _ => Err(
          45  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          46  +
                "expected start object 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_streaming_blob_operation.rs

@@ -0,1 +0,56 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_streaming_blob_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::StreamingBlobOperationInput,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          11  +
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
          12  +
    B::Data: Send,
          13  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          14  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          15  +
{
          16  +
    Ok({
          17  +
        #[allow(unused_mut)]
          18  +
        let mut input = crate::input::streaming_blob_operation_input_internal::Builder::default();
          19  +
        #[allow(unused_variables)]
          20  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          21  +
            uri, headers, body, ..
          22  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          23  +
        if let Some(value) = {
          24  +
            Some(crate::protocol_serde::shape_streaming_blob_operation_input::de_streaming_blob_payload(&mut body.into().into_inner())?)
          25  +
        } {
          26  +
            input = input.set_streaming_blob(value)
          27  +
        }
          28  +
        input.build()
          29  +
    })
          30  +
}
          31  +
          32  +
#[allow(clippy::unnecessary_wraps)]
          33  +
pub fn ser_streaming_blob_operation_http_response(
          34  +
    #[allow(unused_variables)] output: crate::output::StreamingBlobOperationOutput,
          35  +
) -> std::result::Result<
          36  +
    ::aws_smithy_legacy_http_server::response::Response,
          37  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          38  +
> {
          39  +
    Ok({
          40  +
        #[allow(unused_mut)]
          41  +
        let mut builder = ::http::Response::builder();
          42  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          43  +
            builder,
          44  +
            ::http::header::CONTENT_TYPE,
          45  +
            "application/octet-stream",
          46  +
        );
          47  +
        let http_status: u16 = 200;
          48  +
        builder = builder.status(http_status);
          49  +
        let body = ::aws_smithy_legacy_http_server::body::boxed(::aws_smithy_legacy_http_server::body::Body::wrap_stream(
          50  +
            ::aws_smithy_legacy_http::futures_stream_adapter::FuturesStreamCompatByteStream::new(
          51  +
                crate::protocol_serde::shape_streaming_blob_operation_output::ser_streaming_blob_http_payload( output.streaming_blob)?
          52  +
            )
          53  +
        ));
          54  +
        builder.body(body)?
          55  +
    })
          56  +
}

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

@@ -0,1 +0,11 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn de_streaming_blob_payload(
           3  +
    body: &mut ::aws_smithy_types::body::SdkBody,
           4  +
) -> std::result::Result<
           5  +
    ::aws_smithy_types::byte_stream::ByteStream,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
> {
           8  +
    // replace the body with an empty body
           9  +
    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
          10  +
    Ok(::aws_smithy_types::byte_stream::ByteStream::new(body))
          11  +
}

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

@@ -0,1 +0,9 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_streaming_blob_http_payload(
           3  +
    payload: ::aws_smithy_types::byte_stream::ByteStream,
           4  +
) -> ::std::result::Result<
           5  +
    ::aws_smithy_types::byte_stream::ByteStream,
           6  +
    ::aws_smithy_types::error::operation::BuildError,
           7  +
> {
           8  +
    Ok(payload)
           9  +
}