Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/constraints-http0x/rust-server-codegen/src/protocol_serde/shape_con_b.rs

@@ -0,1 +0,111 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_con_b<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::model::con_b::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 = crate::model::con_b::Builder::default();
          21  +
            loop {
          22  +
                match tokens.next().transpose()? {
          23  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          24  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          25  +
                        match key.to_unescaped()?.as_ref() {
          26  +
                            "nice" => {
          27  +
                                if let Some(v) =
          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  +
                                    builder = builder.set_nice(v);
          35  +
                                }
          36  +
                            }
          37  +
                            "int" => {
          38  +
                                if let Some(v) =
          39  +
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
          40  +
                                        tokens.next(),
          41  +
                                    )?
          42  +
                                    .map(i32::try_from)
          43  +
                                    .transpose()?
          44  +
                                {
          45  +
                                    builder = builder.set_int(v);
          46  +
                                }
          47  +
                            }
          48  +
                            "optNice" => {
          49  +
                                builder = builder.set_opt_nice(
          50  +
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(
          51  +
                                        tokens.next(),
          52  +
                                    )?
          53  +
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          54  +
                                    .transpose()?,
          55  +
                                );
          56  +
                            }
          57  +
                            "optInt" => {
          58  +
                                builder = builder.set_opt_int(
          59  +
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
          60  +
                                        tokens.next(),
          61  +
                                    )?
          62  +
                                    .map(i32::try_from)
          63  +
                                    .transpose()?,
          64  +
                                );
          65  +
                            }
          66  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          67  +
                        }
          68  +
                    }
          69  +
                    other => {
          70  +
                        return Err(
          71  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          72  +
                                format!("expected object key or end object, found: {other:?}"),
          73  +
                            ),
          74  +
                        )
          75  +
                    }
          76  +
                }
          77  +
            }
          78  +
            Ok(Some(builder))
          79  +
        }
          80  +
        _ => Err(
          81  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          82  +
                "expected start object or null",
          83  +
            ),
          84  +
        ),
          85  +
    }
          86  +
}
          87  +
          88  +
pub fn ser_con_b(
          89  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          90  +
    input: &crate::model::ConB,
          91  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          92  +
    {
          93  +
        object.key("nice").string(input.nice.as_str());
          94  +
    }
          95  +
    {
          96  +
        object.key("int").number(
          97  +
            #[allow(clippy::useless_conversion)]
          98  +
            ::aws_smithy_types::Number::NegInt((input.int).into()),
          99  +
        );
         100  +
    }
         101  +
    if let Some(var_1) = &input.opt_nice {
         102  +
        object.key("optNice").string(var_1.as_str());
         103  +
    }
         104  +
    if let Some(var_2) = &input.opt_int {
         105  +
        object.key("optInt").number(
         106  +
            #[allow(clippy::useless_conversion)]
         107  +
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
         108  +
        );
         109  +
    }
         110  +
    Ok(())
         111  +
}

tmp-codegen-diff/codegen-server-test/constraints-http0x/rust-server-codegen/src/protocol_serde/shape_con_b_list.rs

@@ -0,1 +0,53 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_con_b_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::con_b_list_unconstrained::ConBListUnconstrained>,
           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_con_b_list_inner::de_con_b_list_inner(
          29  +
                                tokens,
          30  +
                            )?;
          31  +
                        if let Some(value) = value {
          32  +
                            items.push(value);
          33  +
                        } else {
          34  +
                            return Err(
          35  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                                    "dense list cannot contain null values",
          37  +
                                ),
          38  +
                            );
          39  +
                        }
          40  +
                    }
          41  +
                }
          42  +
            }
          43  +
            Ok(Some(
          44  +
                crate::unconstrained::con_b_list_unconstrained::ConBListUnconstrained(items),
          45  +
            ))
          46  +
        }
          47  +
        _ => Err(
          48  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
                "expected start array or null",
          50  +
            ),
          51  +
        ),
          52  +
    }
          53  +
}

tmp-codegen-diff/codegen-server-test/constraints-http0x/rust-server-codegen/src/protocol_serde/shape_con_b_list_inner.rs

@@ -0,1 +0,52 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_con_b_list_inner<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::con_b_list_inner_unconstrained::ConBListInnerUnconstrained>,
           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 = crate::protocol_serde::shape_con_b::de_con_b(tokens)?;
          28  +
                        if let Some(value) = value {
          29  +
                            items.push(value);
          30  +
                        } else {
          31  +
                            return Err(
          32  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          33  +
                                    "dense list cannot contain null values",
          34  +
                                ),
          35  +
                            );
          36  +
                        }
          37  +
                    }
          38  +
                }
          39  +
            }
          40  +
            Ok(Some(
          41  +
                crate::unconstrained::con_b_list_inner_unconstrained::ConBListInnerUnconstrained(
          42  +
                    items,
          43  +
                ),
          44  +
            ))
          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-http0x/rust-server-codegen/src/protocol_serde/shape_con_b_map.rs

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

tmp-codegen-diff/codegen-server-test/constraints-http0x/rust-server-codegen/src/protocol_serde/shape_con_b_set.rs

@@ -0,1 +0,53 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_con_b_set<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::con_b_set_unconstrained::ConBSetUnconstrained>,
           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_con_b_set_inner::de_con_b_set_inner(
          29  +
                                tokens,
          30  +
                            )?;
          31  +
                        if let Some(value) = value {
          32  +
                            items.push(value);
          33  +
                        } else {
          34  +
                            return Err(
          35  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                                    "dense list cannot contain null values",
          37  +
                                ),
          38  +
                            );
          39  +
                        }
          40  +
                    }
          41  +
                }
          42  +
            }
          43  +
            Ok(Some(
          44  +
                crate::unconstrained::con_b_set_unconstrained::ConBSetUnconstrained(items),
          45  +
            ))
          46  +
        }
          47  +
        _ => Err(
          48  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
                "expected start array or null",
          50  +
            ),
          51  +
        ),
          52  +
    }
          53  +
}

tmp-codegen-diff/codegen-server-test/constraints-http0x/rust-server-codegen/src/protocol_serde/shape_con_b_set_inner.rs

@@ -0,1 +0,56 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_con_b_set_inner<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> ::std::result::Result<
           5  +
    Option<crate::unconstrained::con_b_set_inner_unconstrained::ConBSetInnerUnconstrained>,
           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_string_or_null(
          28  +
                            tokens.next(),
          29  +
                        )?
          30  +
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          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::con_b_set_inner_unconstrained::ConBSetInnerUnconstrained(
          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-http0x/rust-server-codegen/src/protocol_serde/shape_constrained_http_bound_shapes_operation.rs

@@ -0,1 +0,762 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_constrained_http_bound_shapes_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::ConstrainedHttpBoundShapesOperationInput,
           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 =
          18  +
            crate::input::constrained_http_bound_shapes_operation_input::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) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_list_pattern_string_header_header(&headers)? {
          24  +
                                input = input.set_length_list_pattern_string_header(Some(value))
          25  +
                            }
          26  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_set_pattern_string_header_header(&headers)? {
          27  +
                                input = input.set_length_set_pattern_string_header(Some(value))
          28  +
                            }
          29  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_header(&headers)? {
          30  +
                                input = input.set_length_string_header(Some(value))
          31  +
                            }
          32  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_map_prefix_header(&headers)? {
          33  +
                                input = input.set_length_string_header_map(value)
          34  +
                            }
          35  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_set_header_header(&headers)? {
          36  +
                                input = input.set_length_string_set_header(Some(value))
          37  +
                            }
          38  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_list_length_string_header_header(&headers)? {
          39  +
                                input = input.set_list_length_string_header(Some(value))
          40  +
                            }
          41  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_header_header(&headers)? {
          42  +
                                input = input.set_range_byte_header(value)
          43  +
                            }
          44  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_list_header_header(&headers)? {
          45  +
                                input = input.set_range_byte_list_header(Some(value))
          46  +
                            }
          47  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_set_header_header(&headers)? {
          48  +
                                input = input.set_range_byte_set_header(Some(value))
          49  +
                            }
          50  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_header_header(&headers)? {
          51  +
                                input = input.set_range_integer_header(value)
          52  +
                            }
          53  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_list_header_header(&headers)? {
          54  +
                                input = input.set_range_integer_list_header(Some(value))
          55  +
                            }
          56  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_set_header_header(&headers)? {
          57  +
                                input = input.set_range_integer_set_header(Some(value))
          58  +
                            }
          59  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_header_header(&headers)? {
          60  +
                                input = input.set_range_long_header(value)
          61  +
                            }
          62  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_list_header_header(&headers)? {
          63  +
                                input = input.set_range_long_list_header(Some(value))
          64  +
                            }
          65  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_set_header_header(&headers)? {
          66  +
                                input = input.set_range_long_set_header(Some(value))
          67  +
                            }
          68  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_header_header(&headers)? {
          69  +
                                input = input.set_range_short_header(value)
          70  +
                            }
          71  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_list_header_header(&headers)? {
          72  +
                                input = input.set_range_short_list_header(Some(value))
          73  +
                            }
          74  +
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_set_header_header(&headers)? {
          75  +
                                input = input.set_range_short_set_header(Some(value))
          76  +
                            }
          77  +
        let input_string = uri.path();
          78  +
        let (input_string, (_, m1, m2, m3, m4, m5, m6)) =
          79  +
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
          80  +
                ::nom::sequence::preceded(
          81  +
                    ::nom::bytes::complete::tag("/"),
          82  +
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
          83  +
                        "constrained-http-bound-shapes-operation",
          84  +
                    ),
          85  +
                ),
          86  +
                ::nom::sequence::preceded(
          87  +
                    ::nom::bytes::complete::tag("/"),
          88  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          89  +
                        ::nom::bytes::complete::take_until("/"),
          90  +
                        ::nom::combinator::rest,
          91  +
                    )),
          92  +
                ),
          93  +
                ::nom::sequence::preceded(
          94  +
                    ::nom::bytes::complete::tag("/"),
          95  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          96  +
                        ::nom::bytes::complete::take_until("/"),
          97  +
                        ::nom::combinator::rest,
          98  +
                    )),
          99  +
                ),
         100  +
                ::nom::sequence::preceded(
         101  +
                    ::nom::bytes::complete::tag("/"),
         102  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
         103  +
                        ::nom::bytes::complete::take_until("/"),
         104  +
                        ::nom::combinator::rest,
         105  +
                    )),
         106  +
                ),
         107  +
                ::nom::sequence::preceded(
         108  +
                    ::nom::bytes::complete::tag("/"),
         109  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
         110  +
                        ::nom::bytes::complete::take_until("/"),
         111  +
                        ::nom::combinator::rest,
         112  +
                    )),
         113  +
                ),
         114  +
                ::nom::sequence::preceded(
         115  +
                    ::nom::bytes::complete::tag("/"),
         116  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
         117  +
                        ::nom::bytes::complete::take_until("/"),
         118  +
                        ::nom::combinator::rest,
         119  +
                    )),
         120  +
                ),
         121  +
                ::nom::sequence::preceded(
         122  +
                    ::nom::bytes::complete::tag("/"),
         123  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
         124  +
                        ::nom::bytes::complete::take_until("/"),
         125  +
                        ::nom::combinator::rest,
         126  +
                    )),
         127  +
                ),
         128  +
            ))(input_string)?;
         129  +
        debug_assert_eq!("", input_string);
         130  +
        input = input.set_range_integer_label(
         131  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_label(m1)?
         132  +
                                );
         133  +
        input = input.set_range_short_label(
         134  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_label(m2)?
         135  +
                                );
         136  +
        input = input.set_range_long_label(
         137  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_label(m3)?
         138  +
                                );
         139  +
        input = input.set_range_byte_label(
         140  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_label(m4)?
         141  +
                                );
         142  +
        input = input.set_length_string_label(
         143  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_label(m5)?
         144  +
                                );
         145  +
        input = input.set_enum_string_label(
         146  +
                                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_label(m6)?
         147  +
                                );
         148  +
        let query_string = uri.query().unwrap_or("");
         149  +
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
         150  +
        let mut enum_string_query_seen = false;
         151  +
        let mut length_string_query_seen = false;
         152  +
        let mut range_byte_query_seen = false;
         153  +
        let mut range_integer_query_seen = false;
         154  +
        let mut range_long_query_seen = false;
         155  +
        let mut range_short_query_seen = false;
         156  +
        let mut enum_string_list_query = Vec::new();
         157  +
        let mut length_list_pattern_string_query = Vec::new();
         158  +
        let mut length_string_list_query = Vec::new();
         159  +
        let mut length_string_set_query = Vec::new();
         160  +
        let mut range_byte_list_query = Vec::new();
         161  +
        let mut range_byte_set_query = Vec::new();
         162  +
        let mut range_integer_list_query = Vec::new();
         163  +
        let mut range_integer_set_query = Vec::new();
         164  +
        let mut range_long_list_query = Vec::new();
         165  +
        let mut range_long_set_query = Vec::new();
         166  +
        let mut range_short_list_query = Vec::new();
         167  +
        let mut range_short_set_query = Vec::new();
         168  +
        for (k, v) in pairs {
         169  +
            if !enum_string_query_seen && k == "enumString" {
         170  +
                input = input.set_enum_string_query(
         171  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_query(&v)?
         172  +
                );
         173  +
                enum_string_query_seen = true;
         174  +
            }
         175  +
            if !length_string_query_seen && k == "lengthString" {
         176  +
                input = input.set_length_string_query(
         177  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_query(&v)?
         178  +
                );
         179  +
                length_string_query_seen = true;
         180  +
            }
         181  +
            if !range_byte_query_seen && k == "rangeByte" {
         182  +
                input = input.set_range_byte_query(
         183  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_query(&v)?
         184  +
                );
         185  +
                range_byte_query_seen = true;
         186  +
            }
         187  +
            if !range_integer_query_seen && k == "rangeInteger" {
         188  +
                input = input.set_range_integer_query(
         189  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_query(&v)?
         190  +
                );
         191  +
                range_integer_query_seen = true;
         192  +
            }
         193  +
            if !range_long_query_seen && k == "rangeLong" {
         194  +
                input = input.set_range_long_query(
         195  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_query(&v)?
         196  +
                );
         197  +
                range_long_query_seen = true;
         198  +
            }
         199  +
            if !range_short_query_seen && k == "rangeShort" {
         200  +
                input = input.set_range_short_query(
         201  +
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_query(&v)?
         202  +
                );
         203  +
                range_short_query_seen = true;
         204  +
            }
         205  +
            if k == "enumStringList" {
         206  +
                let v = v.into_owned();
         207  +
                enum_string_list_query.push(v);
         208  +
            } else if k == "lengthListPatternString" {
         209  +
                let v = v.into_owned();
         210  +
                length_list_pattern_string_query.push(v);
         211  +
            } else if k == "lengthStringList" {
         212  +
                let v = v.into_owned();
         213  +
                length_string_list_query.push(v);
         214  +
            } else if k == "lengthStringSet" {
         215  +
                let v = v.into_owned();
         216  +
                length_string_set_query.push(v);
         217  +
            } else if k == "rangeByteList" {
         218  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         219  +
                range_byte_list_query.push(v);
         220  +
            } else if k == "rangeByteSet" {
         221  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         222  +
                range_byte_set_query.push(v);
         223  +
            } else if k == "rangeIntegerList" {
         224  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         225  +
                range_integer_list_query.push(v);
         226  +
            } else if k == "rangeIntegerSet" {
         227  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         228  +
                range_integer_set_query.push(v);
         229  +
            } else if k == "rangeLongList" {
         230  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         231  +
                range_long_list_query.push(v);
         232  +
            } else if k == "rangeLongSet" {
         233  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         234  +
                range_long_set_query.push(v);
         235  +
            } else if k == "rangeShortList" {
         236  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         237  +
                range_short_list_query.push(v);
         238  +
            } else if k == "rangeShortSet" {
         239  +
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         240  +
                range_short_set_query.push(v);
         241  +
            }
         242  +
        }
         243  +
        if !enum_string_list_query.is_empty() {
         244  +
            input = input.set_enum_string_list_query(
         245  +
                Some(
         246  +
                    crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
         247  +
                        enum_string_list_query
         248  +
                    )
         249  +
                )
         250  +
            );
         251  +
        }
         252  +
        if !length_list_pattern_string_query.is_empty() {
         253  +
            input = input.set_length_list_pattern_string_query(
         254  +
                Some(
         255  +
                    crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
         256  +
                        length_list_pattern_string_query
         257  +
                    )
         258  +
                )
         259  +
            );
         260  +
        }
         261  +
        if !length_string_list_query.is_empty() {
         262  +
            input = input.set_length_string_list_query(
         263  +
                Some(
         264  +
                    crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
         265  +
                        length_string_list_query
         266  +
                    )
         267  +
                )
         268  +
            );
         269  +
        }
         270  +
        if !length_string_set_query.is_empty() {
         271  +
            input = input.set_length_string_set_query(
         272  +
                Some(
         273  +
                    crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
         274  +
                        length_string_set_query
         275  +
                    )
         276  +
                )
         277  +
            );
         278  +
        }
         279  +
        if !range_byte_list_query.is_empty() {
         280  +
            input = input.set_range_byte_list_query(
         281  +
                Some(
         282  +
                    crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
         283  +
                        range_byte_list_query
         284  +
                    )
         285  +
                )
         286  +
            );
         287  +
        }
         288  +
        if !range_byte_set_query.is_empty() {
         289  +
            input = input.set_range_byte_set_query(Some(
         290  +
                crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
         291  +
                    range_byte_set_query,
         292  +
                ),
         293  +
            ));
         294  +
        }
         295  +
        if !range_integer_list_query.is_empty() {
         296  +
            input = input.set_range_integer_list_query(
         297  +
                Some(
         298  +
                    crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
         299  +
                        range_integer_list_query
         300  +
                    )
         301  +
                )
         302  +
            );
         303  +
        }
         304  +
        if !range_integer_set_query.is_empty() {
         305  +
            input = input.set_range_integer_set_query(
         306  +
                Some(
         307  +
                    crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
         308  +
                        range_integer_set_query
         309  +
                    )
         310  +
                )
         311  +
            );
         312  +
        }
         313  +
        if !range_long_list_query.is_empty() {
         314  +
            input = input.set_range_long_list_query(
         315  +
                Some(
         316  +
                    crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
         317  +
                        range_long_list_query
         318  +
                    )
         319  +
                )
         320  +
            );
         321  +
        }
         322  +
        if !range_long_set_query.is_empty() {
         323  +
            input = input.set_range_long_set_query(Some(
         324  +
                crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
         325  +
                    range_long_set_query,
         326  +
                ),
         327  +
            ));
         328  +
        }
         329  +
        if !range_short_list_query.is_empty() {
         330  +
            input = input.set_range_short_list_query(
         331  +
                Some(
         332  +
                    crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
         333  +
                        range_short_list_query
         334  +
                    )
         335  +
                )
         336  +
            );
         337  +
        }
         338  +
        if !range_short_set_query.is_empty() {
         339  +
            input = input.set_range_short_set_query(
         340  +
                Some(
         341  +
                    crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
         342  +
                        range_short_set_query
         343  +
                    )
         344  +
                )
         345  +
            );
         346  +
        }
         347  +
        input.build()?
         348  +
    })
         349  +
}
         350  +
         351  +
#[allow(clippy::unnecessary_wraps)]
         352  +
pub fn ser_constrained_http_bound_shapes_operation_http_response(
         353  +
    #[allow(unused_variables)] output: crate::output::ConstrainedHttpBoundShapesOperationOutput,
         354  +
) -> std::result::Result<
         355  +
    ::aws_smithy_legacy_http_server::response::Response,
         356  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         357  +
> {
         358  +
    Ok({
         359  +
        #[allow(unused_mut)]
         360  +
        let mut builder = ::http::Response::builder();
         361  +
        builder = crate::protocol_serde::shape_constrained_http_bound_shapes_operation::ser_constrained_http_bound_shapes_operation_headers(&output, builder)?;
         362  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         363  +
            builder,
         364  +
            ::http::header::CONTENT_TYPE,
         365  +
            "application/json",
         366  +
        );
         367  +
        let http_status: u16 = 200;
         368  +
        builder = builder.status(http_status);
         369  +
        let payload =
         370  +
            crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
         371  +
        ;
         372  +
        let content_length = payload.len();
         373  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         374  +
            builder,
         375  +
            ::http::header::CONTENT_LENGTH,
         376  +
            content_length,
         377  +
        );
         378  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
         379  +
        builder.body(body)?
         380  +
    })
         381  +
}
         382  +
         383  +
#[allow(clippy::unnecessary_wraps)]
         384  +
pub fn ser_constrained_http_bound_shapes_operation_http_error(
         385  +
    error: &crate::error::ConstrainedHttpBoundShapesOperationError,
         386  +
) -> std::result::Result<
         387  +
    ::aws_smithy_legacy_http_server::response::Response,
         388  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         389  +
> {
         390  +
    Ok({
         391  +
        match error {
         392  +
            crate::error::ConstrainedHttpBoundShapesOperationError::ValidationException(output) => {
         393  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         394  +
                #[allow(unused_mut)]
         395  +
                let mut builder = ::http::Response::builder();
         396  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         397  +
                    builder,
         398  +
                    ::http::header::CONTENT_TYPE,
         399  +
                    "application/json",
         400  +
                );
         401  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         402  +
                    builder,
         403  +
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
         404  +
                    "ValidationException",
         405  +
                );
         406  +
                let content_length = payload.len();
         407  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         408  +
                    builder,
         409  +
                    ::http::header::CONTENT_LENGTH,
         410  +
                    content_length,
         411  +
                );
         412  +
                builder
         413  +
                    .status(400)
         414  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
         415  +
            }
         416  +
        }
         417  +
    })
         418  +
}
         419  +
         420  +
pub fn ser_constrained_http_bound_shapes_operation_headers(
         421  +
    input: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
         422  +
    mut builder: ::http::response::Builder,
         423  +
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
         424  +
{
         425  +
    if let ::std::option::Option::Some(inner_1) = &input.length_string_header {
         426  +
        let formatted_2 = inner_1.as_str();
         427  +
        if !formatted_2.is_empty() {
         428  +
            let header_value = formatted_2;
         429  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         430  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         431  +
                    "length_string_header",
         432  +
                    format!(
         433  +
                        "`{}` cannot be used as a header value: {}",
         434  +
                        &header_value, err
         435  +
                    ),
         436  +
                )
         437  +
            })?;
         438  +
            builder = builder.header("X-Length", header_value);
         439  +
        }
         440  +
    }
         441  +
    {
         442  +
        let mut encoder =
         443  +
            ::aws_smithy_types::primitive::Encoder::from(input.range_integer_header.0);
         444  +
        let formatted_3 = encoder.encode();
         445  +
        if !formatted_3.is_empty() {
         446  +
            let header_value = formatted_3;
         447  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         448  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         449  +
                    "range_integer_header",
         450  +
                    format!(
         451  +
                        "`{}` cannot be used as a header value: {}",
         452  +
                        &header_value, err
         453  +
                    ),
         454  +
                )
         455  +
            })?;
         456  +
            builder = builder.header("X-Range-Integer", header_value);
         457  +
        }
         458  +
    }
         459  +
    {
         460  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_short_header.0);
         461  +
        let formatted_4 = encoder.encode();
         462  +
        if !formatted_4.is_empty() {
         463  +
            let header_value = formatted_4;
         464  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         465  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         466  +
                    "range_short_header",
         467  +
                    format!(
         468  +
                        "`{}` cannot be used as a header value: {}",
         469  +
                        &header_value, err
         470  +
                    ),
         471  +
                )
         472  +
            })?;
         473  +
            builder = builder.header("X-Range-Short", header_value);
         474  +
        }
         475  +
    }
         476  +
    {
         477  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_long_header.0);
         478  +
        let formatted_5 = encoder.encode();
         479  +
        if !formatted_5.is_empty() {
         480  +
            let header_value = formatted_5;
         481  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         482  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         483  +
                    "range_long_header",
         484  +
                    format!(
         485  +
                        "`{}` cannot be used as a header value: {}",
         486  +
                        &header_value, err
         487  +
                    ),
         488  +
                )
         489  +
            })?;
         490  +
            builder = builder.header("X-Range-Long", header_value);
         491  +
        }
         492  +
    }
         493  +
    {
         494  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_byte_header.0);
         495  +
        let formatted_6 = encoder.encode();
         496  +
        if !formatted_6.is_empty() {
         497  +
            let header_value = formatted_6;
         498  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         499  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         500  +
                    "range_byte_header",
         501  +
                    format!(
         502  +
                        "`{}` cannot be used as a header value: {}",
         503  +
                        &header_value, err
         504  +
                    ),
         505  +
                )
         506  +
            })?;
         507  +
            builder = builder.header("X-Range-Byte", header_value);
         508  +
        }
         509  +
    }
         510  +
    if let ::std::option::Option::Some(inner_7) = &input.length_string_set_header {
         511  +
        for inner_8 in &inner_7.0 {
         512  +
            let formatted_9 =
         513  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_8.as_str());
         514  +
            if !formatted_9.is_empty() {
         515  +
                let header_value = formatted_9;
         516  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         517  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         518  +
                        "length_string_set_header",
         519  +
                        format!(
         520  +
                            "`{}` cannot be used as a header value: {}",
         521  +
                            &header_value, err
         522  +
                        ),
         523  +
                    )
         524  +
                })?;
         525  +
                builder = builder.header("X-Length-Set", header_value);
         526  +
            }
         527  +
        }
         528  +
    }
         529  +
    if let ::std::option::Option::Some(inner_10) = &input.list_length_string_header {
         530  +
        for inner_11 in inner_10 {
         531  +
            let formatted_12 =
         532  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_11.as_str());
         533  +
            if !formatted_12.is_empty() {
         534  +
                let header_value = formatted_12;
         535  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         536  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         537  +
                        "list_length_string_header",
         538  +
                        format!(
         539  +
                            "`{}` cannot be used as a header value: {}",
         540  +
                            &header_value, err
         541  +
                        ),
         542  +
                    )
         543  +
                })?;
         544  +
                builder = builder.header("X-List-Length-String", header_value);
         545  +
            }
         546  +
        }
         547  +
    }
         548  +
    if let ::std::option::Option::Some(inner_13) = &input.length_list_pattern_string_header {
         549  +
        for inner_14 in &inner_13.0 {
         550  +
            let formatted_15 =
         551  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_14.as_str());
         552  +
            if !formatted_15.is_empty() {
         553  +
                let header_value = formatted_15;
         554  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         555  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         556  +
                        "length_list_pattern_string_header",
         557  +
                        format!(
         558  +
                            "`{}` cannot be used as a header value: {}",
         559  +
                            &header_value, err
         560  +
                        ),
         561  +
                    )
         562  +
                })?;
         563  +
                builder = builder.header("X-Length-List-Pattern-String", header_value);
         564  +
            }
         565  +
        }
         566  +
    }
         567  +
    if let ::std::option::Option::Some(inner_16) = &input.length_set_pattern_string_header {
         568  +
        for inner_17 in &inner_16.0 {
         569  +
            let formatted_18 =
         570  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_17.as_str());
         571  +
            if !formatted_18.is_empty() {
         572  +
                let header_value = formatted_18;
         573  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         574  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         575  +
                        "length_set_pattern_string_header",
         576  +
                        format!(
         577  +
                            "`{}` cannot be used as a header value: {}",
         578  +
                            &header_value, err
         579  +
                        ),
         580  +
                    )
         581  +
                })?;
         582  +
                builder = builder.header("X-Length-Set-Pattern-String", header_value);
         583  +
            }
         584  +
        }
         585  +
    }
         586  +
    if let ::std::option::Option::Some(inner_19) = &input.range_byte_set_header {
         587  +
        for inner_20 in &inner_19.0 {
         588  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_20.0);
         589  +
            let formatted_21 = encoder.encode();
         590  +
            if !formatted_21.is_empty() {
         591  +
                let header_value = formatted_21;
         592  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         593  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         594  +
                        "range_byte_set_header",
         595  +
                        format!(
         596  +
                            "`{}` cannot be used as a header value: {}",
         597  +
                            &header_value, err
         598  +
                        ),
         599  +
                    )
         600  +
                })?;
         601  +
                builder = builder.header("X-Range-Byte-Set", header_value);
         602  +
            }
         603  +
        }
         604  +
    }
         605  +
    if let ::std::option::Option::Some(inner_22) = &input.range_short_set_header {
         606  +
        for inner_23 in &inner_22.0 {
         607  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_23.0);
         608  +
            let formatted_24 = encoder.encode();
         609  +
            if !formatted_24.is_empty() {
         610  +
                let header_value = formatted_24;
         611  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         612  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         613  +
                        "range_short_set_header",
         614  +
                        format!(
         615  +
                            "`{}` cannot be used as a header value: {}",
         616  +
                            &header_value, err
         617  +
                        ),
         618  +
                    )
         619  +
                })?;
         620  +
                builder = builder.header("X-Range-Short-Set", header_value);
         621  +
            }
         622  +
        }
         623  +
    }
         624  +
    if let ::std::option::Option::Some(inner_25) = &input.range_integer_set_header {
         625  +
        for inner_26 in &inner_25.0 {
         626  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_26.0);
         627  +
            let formatted_27 = encoder.encode();
         628  +
            if !formatted_27.is_empty() {
         629  +
                let header_value = formatted_27;
         630  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         631  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         632  +
                        "range_integer_set_header",
         633  +
                        format!(
         634  +
                            "`{}` cannot be used as a header value: {}",
         635  +
                            &header_value, err
         636  +
                        ),
         637  +
                    )
         638  +
                })?;
         639  +
                builder = builder.header("X-Range-Integer-Set", header_value);
         640  +
            }
         641  +
        }
         642  +
    }
         643  +
    if let ::std::option::Option::Some(inner_28) = &input.range_long_set_header {
         644  +
        for inner_29 in &inner_28.0 {
         645  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_29.0);
         646  +
            let formatted_30 = encoder.encode();
         647  +
            if !formatted_30.is_empty() {
         648  +
                let header_value = formatted_30;
         649  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         650  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         651  +
                        "range_long_set_header",
         652  +
                        format!(
         653  +
                            "`{}` cannot be used as a header value: {}",
         654  +
                            &header_value, err
         655  +
                        ),
         656  +
                    )
         657  +
                })?;
         658  +
                builder = builder.header("X-Range-Long-Set", header_value);
         659  +
            }
         660  +
        }
         661  +
    }
         662  +
    if let ::std::option::Option::Some(inner_31) = &input.range_byte_list_header {
         663  +
        for inner_32 in inner_31 {
         664  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_32.0);
         665  +
            let formatted_33 = encoder.encode();
         666  +
            if !formatted_33.is_empty() {
         667  +
                let header_value = formatted_33;
         668  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         669  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         670  +
                        "range_byte_list_header",
         671  +
                        format!(
         672  +
                            "`{}` cannot be used as a header value: {}",
         673  +
                            &header_value, err
         674  +
                        ),
         675  +
                    )
         676  +
                })?;
         677  +
                builder = builder.header("X-Range-Byte-List", header_value);
         678  +
            }
         679  +
        }
         680  +
    }
         681  +
    if let ::std::option::Option::Some(inner_34) = &input.range_short_list_header {
         682  +
        for inner_35 in inner_34 {
         683  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_35.0);
         684  +
            let formatted_36 = encoder.encode();
         685  +
            if !formatted_36.is_empty() {
         686  +
                let header_value = formatted_36;
         687  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         688  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         689  +
                        "range_short_list_header",
         690  +
                        format!(
         691  +
                            "`{}` cannot be used as a header value: {}",
         692  +
                            &header_value, err
         693  +
                        ),
         694  +
                    )
         695  +
                })?;
         696  +
                builder = builder.header("X-Range-Short-List", header_value);
         697  +
            }
         698  +
        }
         699  +
    }
         700  +
    if let ::std::option::Option::Some(inner_37) = &input.range_integer_list_header {
         701  +
        for inner_38 in inner_37 {
         702  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_38.0);
         703  +
            let formatted_39 = encoder.encode();
         704  +
            if !formatted_39.is_empty() {
         705  +
                let header_value = formatted_39;
         706  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         707  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         708  +
                        "range_integer_list_header",
         709  +
                        format!(
         710  +
                            "`{}` cannot be used as a header value: {}",
         711  +
                            &header_value, err
         712  +
                        ),
         713  +
                    )
         714  +
                })?;
         715  +
                builder = builder.header("X-Range-Integer-List", header_value);
         716  +
            }
         717  +
        }
         718  +
    }
         719  +
    if let ::std::option::Option::Some(inner_40) = &input.range_long_list_header {
         720  +
        for inner_41 in inner_40 {
         721  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(inner_41.0);
         722  +
            let formatted_42 = encoder.encode();
         723  +
            if !formatted_42.is_empty() {
         724  +
                let header_value = formatted_42;
         725  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         726  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         727  +
                        "range_long_list_header",
         728  +
                        format!(
         729  +
                            "`{}` cannot be used as a header value: {}",
         730  +
                            &header_value, err
         731  +
                        ),
         732  +
                    )
         733  +
                })?;
         734  +
                builder = builder.header("X-Range-Long-List", header_value);
         735  +
            }
         736  +
        }
         737  +
    }
         738  +
    {
         739  +
        for (k, v) in &input.length_string_header_map {
         740  +
            use std::str::FromStr;
         741  +
            let header_name = ::http::HeaderName::from_str(&format!(
         742  +
                "{}{}",
         743  +
                "X-Length-String-Prefix-Headers-", &k
         744  +
            ))
         745  +
            .map_err(|err| {
         746  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         747  +
                    "length_string_header_map",
         748  +
                    format!("`{k}` cannot be used as a header name: {err}"),
         749  +
                )
         750  +
            })?;
         751  +
            let header_value = v.as_str();
         752  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         753  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         754  +
                    "length_string_header_map",
         755  +
                    format!("`{v}` cannot be used as a header value: {err}"),
         756  +
                )
         757  +
            })?;
         758  +
            builder = builder.header(header_name, header_value);
         759  +
        }
         760  +
    }
         761  +
    Ok(builder)
         762  +
}