Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,27 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_length_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_length_string_operation_output::ser_query_params_targeting_map_of_length_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_length_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_length_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfLengthString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                object_2.key(key_3.as_str()).string(value_4.as_str());
          22  +
            }
          23  +
        }
          24  +
        object_2.finish();
          25  +
    }
          26  +
    Ok(())
          27  +
}

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

@@ -0,1 +0,99 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_list_of_enum_string_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
           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::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let query_string = uri.query().unwrap_or("");
          23  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          24  +
        let mut query_params: crate::unconstrained::map_of_list_of_enum_string_unconstrained::MapOfListOfEnumStringUnconstrained =
          25  +
            crate::unconstrained::map_of_list_of_enum_string_unconstrained::MapOfListOfEnumStringUnconstrained(
          26  +
                ::std::collections::HashMap::new()
          27  +
            )
          28  +
        ;
          29  +
        for (k, v) in pairs {
          30  +
            let entry = query_params.0.entry(String::from(k)).or_insert_with(|| crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(std::vec::Vec::new()));
          31  +
            entry.0.push(String::from(v));
          32  +
        }
          33  +
        input = input.set_map_of_list_of_enum_string(Some(query_params));
          34  +
        input.build()?
          35  +
    })
          36  +
}
          37  +
          38  +
#[allow(clippy::unnecessary_wraps)]
          39  +
pub fn ser_query_params_targeting_map_of_list_of_enum_string_operation_http_response(
          40  +
    #[allow(unused_variables)]
          41  +
    output: crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput,
          42  +
) -> std::result::Result<
          43  +
    ::aws_smithy_legacy_http_server::response::Response,
          44  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          45  +
> {
          46  +
    Ok({
          47  +
        #[allow(unused_mut)]
          48  +
        let mut builder = ::http::Response::builder();
          49  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          50  +
            builder,
          51  +
            ::http::header::CONTENT_TYPE,
          52  +
            "application/json",
          53  +
        );
          54  +
        let http_status: u16 = 200;
          55  +
        builder = builder.status(http_status);
          56  +
        let payload =
          57  +
            crate::protocol_serde::shape_query_params_targeting_map_of_list_of_enum_string_operation_output::ser_query_params_targeting_map_of_list_of_enum_string_operation_output_output_output(&output)?
          58  +
        ;
          59  +
        let content_length = payload.len();
          60  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          61  +
            builder,
          62  +
            ::http::header::CONTENT_LENGTH,
          63  +
            content_length,
          64  +
        );
          65  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          66  +
        builder.body(body)?
          67  +
    })
          68  +
}
          69  +
          70  +
#[allow(clippy::unnecessary_wraps)]
          71  +
pub fn ser_query_params_targeting_map_of_list_of_enum_string_operation_http_error(
          72  +
    error: &crate::error::QueryParamsTargetingMapOfListOfEnumStringOperationError,
          73  +
) -> std::result::Result<
          74  +
    ::aws_smithy_legacy_http_server::response::Response,
          75  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          76  +
> {
          77  +
    Ok({
          78  +
        match error {
          79  +
            crate::error::QueryParamsTargetingMapOfListOfEnumStringOperationError::ValidationException(output) => {
          80  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          81  +
                #[allow(unused_mut)]
          82  +
                let mut builder = ::http::Response::builder();
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          84  +
                                builder,
          85  +
                                ::http::header::CONTENT_TYPE,
          86  +
                                "application/json",
          87  +
                            );
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          89  +
                                builder,
          90  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          91  +
                                "ValidationException",
          92  +
                            );
          93  +
                let content_length = payload.len();
          94  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          95  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          96  +
            }
          97  +
        }
          98  +
    })
          99  +
}

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

@@ -0,1 +0,33 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_list_of_enum_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_list_of_enum_string_operation_output::ser_query_params_targeting_map_of_list_of_enum_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_list_of_enum_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_list_of_enum_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfListOfEnumString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                let mut array_5 = object_2.key(key_3.as_str()).start_array();
          22  +
                for item_6 in value_4 {
          23  +
                    {
          24  +
                        array_5.value().string(item_6.as_str());
          25  +
                    }
          26  +
                }
          27  +
                array_5.finish();
          28  +
            }
          29  +
        }
          30  +
        object_2.finish();
          31  +
    }
          32  +
    Ok(())
          33  +
}

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

@@ -0,1 +0,101 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_list_of_length_pattern_string_operation_http_request<
           4  +
    B,
           5  +
>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    Ok({
          18  +
        #[allow(unused_mut)]
          19  +
        let mut input = crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input_internal::Builder::default();
          20  +
        #[allow(unused_variables)]
          21  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          22  +
            uri, headers, body, ..
          23  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          24  +
        let query_string = uri.query().unwrap_or("");
          25  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          26  +
        let mut query_params: crate::unconstrained::map_of_list_of_length_pattern_string_unconstrained::MapOfListOfLengthPatternStringUnconstrained =
          27  +
            crate::unconstrained::map_of_list_of_length_pattern_string_unconstrained::MapOfListOfLengthPatternStringUnconstrained(
          28  +
                ::std::collections::HashMap::new()
          29  +
            )
          30  +
        ;
          31  +
        for (k, v) in pairs {
          32  +
            let entry = query_params.0.entry(String::from(k)).or_insert_with(|| crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained(std::vec::Vec::new()));
          33  +
            entry.0.push(String::from(v));
          34  +
        }
          35  +
        input = input.set_map_of_length_pattern_string(Some(query_params));
          36  +
        input.build()?
          37  +
    })
          38  +
}
          39  +
          40  +
#[allow(clippy::unnecessary_wraps)]
          41  +
pub fn ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_http_response(
          42  +
    #[allow(unused_variables)]
          43  +
    output: crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput,
          44  +
) -> std::result::Result<
          45  +
    ::aws_smithy_legacy_http_server::response::Response,
          46  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          47  +
> {
          48  +
    Ok({
          49  +
        #[allow(unused_mut)]
          50  +
        let mut builder = ::http::Response::builder();
          51  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          52  +
            builder,
          53  +
            ::http::header::CONTENT_TYPE,
          54  +
            "application/json",
          55  +
        );
          56  +
        let http_status: u16 = 200;
          57  +
        builder = builder.status(http_status);
          58  +
        let payload =
          59  +
            crate::protocol_serde::shape_query_params_targeting_map_of_list_of_length_pattern_string_operation_output::ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_output_output_output(&output)?
          60  +
        ;
          61  +
        let content_length = payload.len();
          62  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          63  +
            builder,
          64  +
            ::http::header::CONTENT_LENGTH,
          65  +
            content_length,
          66  +
        );
          67  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          68  +
        builder.body(body)?
          69  +
    })
          70  +
}
          71  +
          72  +
#[allow(clippy::unnecessary_wraps)]
          73  +
pub fn ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_http_error(
          74  +
    error: &crate::error::QueryParamsTargetingMapOfListOfLengthPatternStringOperationError,
          75  +
) -> std::result::Result<
          76  +
    ::aws_smithy_legacy_http_server::response::Response,
          77  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          78  +
> {
          79  +
    Ok({
          80  +
        match error {
          81  +
            crate::error::QueryParamsTargetingMapOfListOfLengthPatternStringOperationError::ValidationException(output) => {
          82  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          83  +
                #[allow(unused_mut)]
          84  +
                let mut builder = ::http::Response::builder();
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          86  +
                                builder,
          87  +
                                ::http::header::CONTENT_TYPE,
          88  +
                                "application/json",
          89  +
                            );
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          91  +
                                builder,
          92  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          93  +
                                "ValidationException",
          94  +
                            );
          95  +
                let content_length = payload.len();
          96  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          97  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          98  +
            }
          99  +
        }
         100  +
    })
         101  +
}

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

@@ -0,1 +0,33 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_list_of_length_pattern_string_operation_output::ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_list_of_length_pattern_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_length_pattern_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfLengthPatternString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                let mut array_5 = object_2.key(key_3.as_str()).start_array();
          22  +
                for item_6 in value_4 {
          23  +
                    {
          24  +
                        array_5.value().string(item_6.as_str());
          25  +
                    }
          26  +
                }
          27  +
                array_5.finish();
          28  +
            }
          29  +
        }
          30  +
        object_2.finish();
          31  +
    }
          32  +
    Ok(())
          33  +
}

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

@@ -0,1 +0,99 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_list_of_length_string_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
           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::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::query_params_targeting_map_of_list_of_length_string_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let query_string = uri.query().unwrap_or("");
          23  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          24  +
        let mut query_params: crate::unconstrained::map_of_list_of_length_string_unconstrained::MapOfListOfLengthStringUnconstrained =
          25  +
            crate::unconstrained::map_of_list_of_length_string_unconstrained::MapOfListOfLengthStringUnconstrained(
          26  +
                ::std::collections::HashMap::new()
          27  +
            )
          28  +
        ;
          29  +
        for (k, v) in pairs {
          30  +
            let entry = query_params.0.entry(String::from(k)).or_insert_with(|| crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(std::vec::Vec::new()));
          31  +
            entry.0.push(String::from(v));
          32  +
        }
          33  +
        input = input.set_map_of_list_of_length_string(Some(query_params));
          34  +
        input.build()?
          35  +
    })
          36  +
}
          37  +
          38  +
#[allow(clippy::unnecessary_wraps)]
          39  +
pub fn ser_query_params_targeting_map_of_list_of_length_string_operation_http_response(
          40  +
    #[allow(unused_variables)]
          41  +
    output: crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput,
          42  +
) -> std::result::Result<
          43  +
    ::aws_smithy_legacy_http_server::response::Response,
          44  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          45  +
> {
          46  +
    Ok({
          47  +
        #[allow(unused_mut)]
          48  +
        let mut builder = ::http::Response::builder();
          49  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          50  +
            builder,
          51  +
            ::http::header::CONTENT_TYPE,
          52  +
            "application/json",
          53  +
        );
          54  +
        let http_status: u16 = 200;
          55  +
        builder = builder.status(http_status);
          56  +
        let payload =
          57  +
            crate::protocol_serde::shape_query_params_targeting_map_of_list_of_length_string_operation_output::ser_query_params_targeting_map_of_list_of_length_string_operation_output_output_output(&output)?
          58  +
        ;
          59  +
        let content_length = payload.len();
          60  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          61  +
            builder,
          62  +
            ::http::header::CONTENT_LENGTH,
          63  +
            content_length,
          64  +
        );
          65  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          66  +
        builder.body(body)?
          67  +
    })
          68  +
}
          69  +
          70  +
#[allow(clippy::unnecessary_wraps)]
          71  +
pub fn ser_query_params_targeting_map_of_list_of_length_string_operation_http_error(
          72  +
    error: &crate::error::QueryParamsTargetingMapOfListOfLengthStringOperationError,
          73  +
) -> std::result::Result<
          74  +
    ::aws_smithy_legacy_http_server::response::Response,
          75  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          76  +
> {
          77  +
    Ok({
          78  +
        match error {
          79  +
            crate::error::QueryParamsTargetingMapOfListOfLengthStringOperationError::ValidationException(output) => {
          80  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          81  +
                #[allow(unused_mut)]
          82  +
                let mut builder = ::http::Response::builder();
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          84  +
                                builder,
          85  +
                                ::http::header::CONTENT_TYPE,
          86  +
                                "application/json",
          87  +
                            );
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          89  +
                                builder,
          90  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          91  +
                                "ValidationException",
          92  +
                            );
          93  +
                let content_length = payload.len();
          94  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          95  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          96  +
            }
          97  +
        }
          98  +
    })
          99  +
}

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

@@ -0,1 +0,33 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_list_of_length_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_list_of_length_string_operation_output::ser_query_params_targeting_map_of_list_of_length_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_list_of_length_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_list_of_length_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfListOfLengthString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                let mut array_5 = object_2.key(key_3.as_str()).start_array();
          22  +
                for item_6 in value_4 {
          23  +
                    {
          24  +
                        array_5.value().string(item_6.as_str());
          25  +
                    }
          26  +
                }
          27  +
                array_5.finish();
          28  +
            }
          29  +
        }
          30  +
        object_2.finish();
          31  +
    }
          32  +
    Ok(())
          33  +
}

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

@@ -0,1 +0,99 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_list_of_pattern_string_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
           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::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let query_string = uri.query().unwrap_or("");
          23  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          24  +
        let mut query_params: crate::unconstrained::map_of_list_of_pattern_string_unconstrained::MapOfListOfPatternStringUnconstrained =
          25  +
            crate::unconstrained::map_of_list_of_pattern_string_unconstrained::MapOfListOfPatternStringUnconstrained(
          26  +
                ::std::collections::HashMap::new()
          27  +
            )
          28  +
        ;
          29  +
        for (k, v) in pairs {
          30  +
            let entry = query_params.0.entry(String::from(k)).or_insert_with(|| crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained(std::vec::Vec::new()));
          31  +
            entry.0.push(String::from(v));
          32  +
        }
          33  +
        input = input.set_map_of_list_of_pattern_string(Some(query_params));
          34  +
        input.build()?
          35  +
    })
          36  +
}
          37  +
          38  +
#[allow(clippy::unnecessary_wraps)]
          39  +
pub fn ser_query_params_targeting_map_of_list_of_pattern_string_operation_http_response(
          40  +
    #[allow(unused_variables)]
          41  +
    output: crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput,
          42  +
) -> std::result::Result<
          43  +
    ::aws_smithy_legacy_http_server::response::Response,
          44  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          45  +
> {
          46  +
    Ok({
          47  +
        #[allow(unused_mut)]
          48  +
        let mut builder = ::http::Response::builder();
          49  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          50  +
            builder,
          51  +
            ::http::header::CONTENT_TYPE,
          52  +
            "application/json",
          53  +
        );
          54  +
        let http_status: u16 = 200;
          55  +
        builder = builder.status(http_status);
          56  +
        let payload =
          57  +
            crate::protocol_serde::shape_query_params_targeting_map_of_list_of_pattern_string_operation_output::ser_query_params_targeting_map_of_list_of_pattern_string_operation_output_output_output(&output)?
          58  +
        ;
          59  +
        let content_length = payload.len();
          60  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          61  +
            builder,
          62  +
            ::http::header::CONTENT_LENGTH,
          63  +
            content_length,
          64  +
        );
          65  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          66  +
        builder.body(body)?
          67  +
    })
          68  +
}
          69  +
          70  +
#[allow(clippy::unnecessary_wraps)]
          71  +
pub fn ser_query_params_targeting_map_of_list_of_pattern_string_operation_http_error(
          72  +
    error: &crate::error::QueryParamsTargetingMapOfListOfPatternStringOperationError,
          73  +
) -> std::result::Result<
          74  +
    ::aws_smithy_legacy_http_server::response::Response,
          75  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          76  +
> {
          77  +
    Ok({
          78  +
        match error {
          79  +
            crate::error::QueryParamsTargetingMapOfListOfPatternStringOperationError::ValidationException(output) => {
          80  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          81  +
                #[allow(unused_mut)]
          82  +
                let mut builder = ::http::Response::builder();
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          84  +
                                builder,
          85  +
                                ::http::header::CONTENT_TYPE,
          86  +
                                "application/json",
          87  +
                            );
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          89  +
                                builder,
          90  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          91  +
                                "ValidationException",
          92  +
                            );
          93  +
                let content_length = payload.len();
          94  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          95  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          96  +
            }
          97  +
        }
          98  +
    })
          99  +
}

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

@@ -0,1 +0,33 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_list_of_pattern_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_list_of_pattern_string_operation_output::ser_query_params_targeting_map_of_list_of_pattern_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_list_of_pattern_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_list_of_pattern_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfListOfPatternString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                let mut array_5 = object_2.key(key_3.as_str()).start_array();
          22  +
                for item_6 in value_4 {
          23  +
                    {
          24  +
                        array_5.value().string(item_6.as_str());
          25  +
                    }
          26  +
                }
          27  +
                array_5.finish();
          28  +
            }
          29  +
        }
          30  +
        object_2.finish();
          31  +
    }
          32  +
    Ok(())
          33  +
}

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

@@ -0,1 +0,101 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_pattern_string_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
           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::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::query_params_targeting_map_of_pattern_string_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let query_string = uri.query().unwrap_or("");
          23  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          24  +
        let mut query_params: crate::unconstrained::map_of_pattern_string_unconstrained::MapOfPatternStringUnconstrained =
          25  +
            crate::unconstrained::map_of_pattern_string_unconstrained::MapOfPatternStringUnconstrained(
          26  +
                ::std::collections::HashMap::new()
          27  +
            )
          28  +
        ;
          29  +
        for (k, v) in pairs {
          30  +
            query_params
          31  +
                .0
          32  +
                .entry(String::from(k))
          33  +
                .or_insert_with(|| String::from(v));
          34  +
        }
          35  +
        input = input.set_map_of_pattern_string(Some(query_params));
          36  +
        input.build()?
          37  +
    })
          38  +
}
          39  +
          40  +
#[allow(clippy::unnecessary_wraps)]
          41  +
pub fn ser_query_params_targeting_map_of_pattern_string_operation_http_response(
          42  +
    #[allow(unused_variables)]
          43  +
    output: crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput,
          44  +
) -> std::result::Result<
          45  +
    ::aws_smithy_legacy_http_server::response::Response,
          46  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          47  +
> {
          48  +
    Ok({
          49  +
        #[allow(unused_mut)]
          50  +
        let mut builder = ::http::Response::builder();
          51  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          52  +
            builder,
          53  +
            ::http::header::CONTENT_TYPE,
          54  +
            "application/json",
          55  +
        );
          56  +
        let http_status: u16 = 200;
          57  +
        builder = builder.status(http_status);
          58  +
        let payload =
          59  +
            crate::protocol_serde::shape_query_params_targeting_map_of_pattern_string_operation_output::ser_query_params_targeting_map_of_pattern_string_operation_output_output_output(&output)?
          60  +
        ;
          61  +
        let content_length = payload.len();
          62  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          63  +
            builder,
          64  +
            ::http::header::CONTENT_LENGTH,
          65  +
            content_length,
          66  +
        );
          67  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          68  +
        builder.body(body)?
          69  +
    })
          70  +
}
          71  +
          72  +
#[allow(clippy::unnecessary_wraps)]
          73  +
pub fn ser_query_params_targeting_map_of_pattern_string_operation_http_error(
          74  +
    error: &crate::error::QueryParamsTargetingMapOfPatternStringOperationError,
          75  +
) -> std::result::Result<
          76  +
    ::aws_smithy_legacy_http_server::response::Response,
          77  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          78  +
> {
          79  +
    Ok({
          80  +
        match error {
          81  +
            crate::error::QueryParamsTargetingMapOfPatternStringOperationError::ValidationException(output) => {
          82  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          83  +
                #[allow(unused_mut)]
          84  +
                let mut builder = ::http::Response::builder();
          85  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          86  +
                                builder,
          87  +
                                ::http::header::CONTENT_TYPE,
          88  +
                                "application/json",
          89  +
                            );
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          91  +
                                builder,
          92  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          93  +
                                "ValidationException",
          94  +
                            );
          95  +
                let content_length = payload.len();
          96  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          97  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          98  +
            }
          99  +
        }
         100  +
    })
         101  +
}

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

@@ -0,1 +0,27 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_pattern_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_pattern_string_operation_output::ser_query_params_targeting_map_of_pattern_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_pattern_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_pattern_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfPatternString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                object_2.key(key_3.as_str()).string(value_4.as_str());
          22  +
            }
          23  +
        }
          24  +
        object_2.finish();
          25  +
    }
          26  +
    Ok(())
          27  +
}

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

@@ -0,1 +0,99 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_query_params_targeting_map_of_set_of_length_string_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
           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::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::query_params_targeting_map_of_set_of_length_string_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let query_string = uri.query().unwrap_or("");
          23  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
          24  +
        let mut query_params: crate::unconstrained::map_of_set_of_length_string_unconstrained::MapOfSetOfLengthStringUnconstrained =
          25  +
            crate::unconstrained::map_of_set_of_length_string_unconstrained::MapOfSetOfLengthStringUnconstrained(
          26  +
                ::std::collections::HashMap::new()
          27  +
            )
          28  +
        ;
          29  +
        for (k, v) in pairs {
          30  +
            let entry = query_params.0.entry(String::from(k)).or_insert_with(|| crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(std::vec::Vec::new()));
          31  +
            entry.0.push(String::from(v));
          32  +
        }
          33  +
        input = input.set_map_of_set_of_length_string(Some(query_params));
          34  +
        input.build()?
          35  +
    })
          36  +
}
          37  +
          38  +
#[allow(clippy::unnecessary_wraps)]
          39  +
pub fn ser_query_params_targeting_map_of_set_of_length_string_operation_http_response(
          40  +
    #[allow(unused_variables)]
          41  +
    output: crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput,
          42  +
) -> std::result::Result<
          43  +
    ::aws_smithy_legacy_http_server::response::Response,
          44  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          45  +
> {
          46  +
    Ok({
          47  +
        #[allow(unused_mut)]
          48  +
        let mut builder = ::http::Response::builder();
          49  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          50  +
            builder,
          51  +
            ::http::header::CONTENT_TYPE,
          52  +
            "application/json",
          53  +
        );
          54  +
        let http_status: u16 = 200;
          55  +
        builder = builder.status(http_status);
          56  +
        let payload =
          57  +
            crate::protocol_serde::shape_query_params_targeting_map_of_set_of_length_string_operation_output::ser_query_params_targeting_map_of_set_of_length_string_operation_output_output_output(&output)?
          58  +
        ;
          59  +
        let content_length = payload.len();
          60  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          61  +
            builder,
          62  +
            ::http::header::CONTENT_LENGTH,
          63  +
            content_length,
          64  +
        );
          65  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          66  +
        builder.body(body)?
          67  +
    })
          68  +
}
          69  +
          70  +
#[allow(clippy::unnecessary_wraps)]
          71  +
pub fn ser_query_params_targeting_map_of_set_of_length_string_operation_http_error(
          72  +
    error: &crate::error::QueryParamsTargetingMapOfSetOfLengthStringOperationError,
          73  +
) -> std::result::Result<
          74  +
    ::aws_smithy_legacy_http_server::response::Response,
          75  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          76  +
> {
          77  +
    Ok({
          78  +
        match error {
          79  +
            crate::error::QueryParamsTargetingMapOfSetOfLengthStringOperationError::ValidationException(output) => {
          80  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          81  +
                #[allow(unused_mut)]
          82  +
                let mut builder = ::http::Response::builder();
          83  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          84  +
                                builder,
          85  +
                                ::http::header::CONTENT_TYPE,
          86  +
                                "application/json",
          87  +
                            );
          88  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          89  +
                                builder,
          90  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          91  +
                                "ValidationException",
          92  +
                            );
          93  +
                let content_length = payload.len();
          94  +
                            builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          95  +
                builder.status(400).body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          96  +
            }
          97  +
        }
          98  +
    })
          99  +
}

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

@@ -0,1 +0,33 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_query_params_targeting_map_of_set_of_length_string_operation_output_output_output(
           3  +
    value: &crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_query_params_targeting_map_of_set_of_length_string_operation_output::ser_query_params_targeting_map_of_set_of_length_string_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_query_params_targeting_map_of_set_of_length_string_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.map_of_set_of_length_string {
          17  +
        #[allow(unused_mut)]
          18  +
        let mut object_2 = object.key("mapOfSetOfLengthString").start_object();
          19  +
        for (key_3, value_4) in var_1 {
          20  +
            {
          21  +
                let mut array_5 = object_2.key(key_3.as_str()).start_array();
          22  +
                for item_6 in value_4 {
          23  +
                    {
          24  +
                        array_5.value().string(item_6.as_str());
          25  +
                    }
          26  +
                }
          27  +
                array_5.finish();
          28  +
            }
          29  +
        }
          30  +
        object_2.finish();
          31  +
    }
          32  +
    Ok(())
          33  +
}

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

@@ -0,1 +0,54 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_recursive_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::recursive_list_unconstrained::RecursiveListUnconstrained>,
           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 =
          28  +
                            crate::protocol_serde::shape_recursive_shapes_input_output_nested1::de_recursive_shapes_input_output_nested1(tokens)?
          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(
          43  +
                crate::unconstrained::recursive_list_unconstrained::RecursiveListUnconstrained(
          44  +
                    items,
          45  +
                ),
          46  +
            ))
          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_recursive_shapes_input_output_nested1.rs

@@ -0,1 +0,63 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_recursive_shapes_input_output_nested1<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::model::recursive_shapes_input_output_nested1_internal::Builder>,
           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  +
            #[allow(unused_mut)]
          20  +
            let mut builder =
          21  +
                crate::model::recursive_shapes_input_output_nested1_internal::Builder::default();
          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  +
                        match key.to_unescaped()?.as_ref() {
          27  +
                            "recursiveMember" => {
          28  +
                                if let Some(v) =
          29  +
                                crate::protocol_serde::shape_recursive_shapes_input_output_nested2::de_recursive_shapes_input_output_nested2(tokens)?
          30  +
                                .map(|x| x.into())
          31  +
                                .map(Box::new)
          32  +
                                {
          33  +
                                                                            builder = builder.set_recursive_member(v);
          34  +
                                                                        }
          35  +
                            }
          36  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?
          37  +
                        }
          38  +
                    }
          39  +
                    other => return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("expected object key or end object, found: {other:?}")))
          40  +
                }
          41  +
            }
          42  +
            Ok(Some(builder))
          43  +
        }
          44  +
        _ => Err(
          45  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          46  +
                "expected start object or null",
          47  +
            ),
          48  +
        ),
          49  +
    }
          50  +
}
          51  +
          52  +
pub fn ser_recursive_shapes_input_output_nested1(
          53  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          54  +
    input: &crate::model::RecursiveShapesInputOutputNested1,
          55  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          56  +
    {
          57  +
        #[allow(unused_mut)]
          58  +
        let mut object_1 = object.key("recursiveMember").start_object();
          59  +
        crate::protocol_serde::shape_recursive_shapes_input_output_nested2::ser_recursive_shapes_input_output_nested2(&mut object_1, &input.recursive_member)?;
          60  +
        object_1.finish();
          61  +
    }
          62  +
    Ok(())
          63  +
}

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

@@ -0,1 +0,65 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_recursive_shapes_input_output_nested2<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::model::recursive_shapes_input_output_nested2_internal::Builder>,
           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  +
            #[allow(unused_mut)]
          20  +
            let mut builder =
          21  +
                crate::model::recursive_shapes_input_output_nested2_internal::Builder::default();
          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  +
                        match key.to_unescaped()?.as_ref() {
          27  +
                            "recursiveMember" => {
          28  +
                                builder = builder.set_recursive_member(
          29  +
                                    crate::protocol_serde::shape_recursive_shapes_input_output_nested1::de_recursive_shapes_input_output_nested1(tokens)?
          30  +
                                );
          31  +
                            }
          32  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          33  +
                        }
          34  +
                    }
          35  +
                    other => {
          36  +
                        return Err(
          37  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          38  +
                                format!("expected object key or end object, found: {other:?}"),
          39  +
                            ),
          40  +
                        )
          41  +
                    }
          42  +
                }
          43  +
            }
          44  +
            Ok(Some(builder))
          45  +
        }
          46  +
        _ => Err(
          47  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
                "expected start object or null",
          49  +
            ),
          50  +
        ),
          51  +
    }
          52  +
}
          53  +
          54  +
pub fn ser_recursive_shapes_input_output_nested2(
          55  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          56  +
    input: &crate::model::RecursiveShapesInputOutputNested2,
          57  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          58  +
    if let Some(var_1) = &input.recursive_member {
          59  +
        #[allow(unused_mut)]
          60  +
        let mut object_2 = object.key("recursiveMember").start_object();
          61  +
        crate::protocol_serde::shape_recursive_shapes_input_output_nested1::ser_recursive_shapes_input_output_nested1(&mut object_2, var_1)?;
          62  +
        object_2.finish();
          63  +
    }
          64  +
    Ok(())
          65  +
}