Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +111,158 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_con_b<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::con_b_internal::Builder>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::con_b_internal::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     32   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
   25     34   
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
   26     36   
                            "nice" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
   27     38   
                                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         -
                                {
          39  +
                                /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                    /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                        /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                    /* JsonParserGenerator.kt:339 */)
          43  +
                                /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                                /* JsonParserGenerator.kt:278 */{
   34     45   
                                                                            builder = builder.set_nice(v);
   35     46   
                                                                        }
          47  +
                                /* JsonParserGenerator.kt:262 */
   36     48   
                            }
          49  +
                            /* JsonParserGenerator.kt:262 */
   37     50   
                            "int" => {
          51  +
                                /* JsonParserGenerator.kt:276 */
   38     52   
                                if let Some(v) =
   39         -
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
   40         -
                                        tokens.next(),
   41         -
                                    )?
          53  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   42     54   
                                                    .map(i32::try_from)
   43     55   
                                                    .transpose()?
   44         -
                                {
          56  +
                                /* JsonParserGenerator.kt:278 */{
   45     57   
                                                                            builder = builder.set_int(v);
   46     58   
                                                                        }
          59  +
                                /* JsonParserGenerator.kt:262 */
   47     60   
                            }
          61  +
                            /* JsonParserGenerator.kt:262 */
   48     62   
                            "optNice" => {
          63  +
                                /* JsonParserGenerator.kt:272 */
   49     64   
                                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         -
                            }
          65  +
                                    /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          66  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          67  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          68  +
                                        /* JsonParserGenerator.kt:339 */)
          69  +
                                    /* JsonParserGenerator.kt:354 */).transpose()?
          70  +
                                /* JsonParserGenerator.kt:272 */);
          71  +
                                /* JsonParserGenerator.kt:262 */
          72  +
                            }
          73  +
                            /* JsonParserGenerator.kt:262 */
   57     74   
                            "optInt" => {
          75  +
                                /* JsonParserGenerator.kt:272 */
   58     76   
                                builder = builder.set_opt_int(
          77  +
                                    /* JsonParserGenerator.kt:365 */
   59     78   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
   60     79   
                                        tokens.next(),
   61     80   
                                    )?
   62     81   
                                    .map(i32::try_from)
   63         -
                                    .transpose()?,
          82  +
                                    .transpose()?, /* JsonParserGenerator.kt:272 */
   64     83   
                                );
          84  +
                                /* JsonParserGenerator.kt:262 */
   65     85   
                            }
   66         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          86  +
                            /* JsonParserGenerator.kt:290 */
          87  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   67     88   
                        }
          89  +
                        /* JsonParserGenerator.kt:686 */
   68     90   
                    }
          91  +
                    /* JsonParserGenerator.kt:695 */
   69     92   
                    other => {
   70     93   
                        return Err(
   71     94   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   72     95   
                                format!("expected object key or end object, found: {:?}", other),
   73     96   
                            ),
   74     97   
                        )
          98  +
                    } /* JsonParserGenerator.kt:685 */
   75     99   
                }
         100  +
                /* JsonParserGenerator.kt:684 */
   76    101   
            }
   77         -
            }
         102  +
            /* JsonParserGenerator.kt:540 */
   78    103   
            Ok(Some(builder))
         104  +
            /* JsonParserGenerator.kt:713 */
   79    105   
        }
   80         -
        _ => Err(
         106  +
        /* JsonParserGenerator.kt:722 */
         107  +
        _ => {
         108  +
            /* JsonParserGenerator.kt:723 */
         109  +
            Err(
   81    110   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   82    111   
                    "expected start object or null",
   83    112   
                ),
   84         -
        ),
         113  +
            )
         114  +
            /* JsonParserGenerator.kt:722 */
         115  +
        } /* JsonParserGenerator.kt:712 */
   85    116   
    }
         117  +
    /* JsonParserGenerator.kt:516 */
   86    118   
}
   87    119   
         120  +
/* JsonSerializerGenerator.kt:358 */
   88    121   
pub fn ser_con_b(
   89    122   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   90    123   
    input: &crate::model::ConB,
   91    124   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         125  +
    /* SerializerUtil.kt:42 */
   92    126   
    {
         127  +
        /* JsonSerializerGenerator.kt:423 */
   93    128   
        object.key("nice").string(input.nice.as_str());
         129  +
        /* SerializerUtil.kt:42 */
   94    130   
    }
         131  +
    /* SerializerUtil.kt:42 */
   95    132   
    {
         133  +
        /* JsonSerializerGenerator.kt:432 */
   96    134   
        object.key("int").number(
   97    135   
            #[allow(clippy::useless_conversion)]
   98    136   
            ::aws_smithy_types::Number::NegInt((input.int).into()),
   99    137   
        );
         138  +
        /* SerializerUtil.kt:42 */
  100    139   
    }
         140  +
    /* JsonSerializerGenerator.kt:382 */
  101    141   
    if let Some(var_1) = &input.opt_nice {
         142  +
        /* JsonSerializerGenerator.kt:423 */
  102    143   
        object.key("optNice").string(var_1.as_str());
         144  +
        /* JsonSerializerGenerator.kt:382 */
  103    145   
    }
         146  +
    /* JsonSerializerGenerator.kt:382 */
  104    147   
    if let Some(var_2) = &input.opt_int {
         148  +
        /* JsonSerializerGenerator.kt:432 */
  105    149   
        object.key("optInt").number(
  106    150   
            #[allow(clippy::useless_conversion)]
  107    151   
            ::aws_smithy_types::Number::NegInt((*var_2).into()),
  108    152   
        );
         153  +
        /* JsonSerializerGenerator.kt:382 */
  109    154   
    }
         155  +
    /* JsonSerializerGenerator.kt:372 */
  110    156   
    Ok(())
         157  +
    /* JsonSerializerGenerator.kt:358 */
  111    158   
}

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

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

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

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

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

@@ -1,1 +62,89 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:460 */
    2      3   
pub(crate) fn de_con_b_map<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* JsonParserGenerator.kt:469 */
   19     23   
            let mut map = ::std::collections::HashMap::new();
          24  +
            /* JsonParserGenerator.kt:684 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:685 */
   21     27   
                match tokens.next().transpose()? {
          28  +
                    /* JsonParserGenerator.kt:686 */
   22     29   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   23     30   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   24         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   25         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   26         -
                            tokens.next(),
   27         -
                        )?
   28         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                        .transpose()?;
          31  +
                        /* JsonParserGenerator.kt:471 */
          32  +
                        let key =
          33  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          34  +
                                /* JsonParserGenerator.kt:348 */u.into_owned()
          35  +
                            /* JsonParserGenerator.kt:339 */)
          36  +
                        /* JsonParserGenerator.kt:471 */?;
          37  +
                        /* JsonParserGenerator.kt:474 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */)
          43  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                        /* JsonParserGenerator.kt:474 */;
          45  +
                        /* JsonParserGenerator.kt:481 */
   30     46   
                        match value {
   31     47   
                            Some(value) => {
   32     48   
                                map.insert(key, value);
   33     49   
                            }
   34     50   
                            None => {
   35     51   
                                return Err(
   36     52   
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                        "dense map cannot contain null values",
   38     54   
                                    ),
   39     55   
                                )
   40     56   
                            }
   41     57   
                        }
          58  +
                        /* JsonParserGenerator.kt:686 */
   42     59   
                    }
          60  +
                    /* JsonParserGenerator.kt:695 */
   43     61   
                    other => {
   44     62   
                        return Err(
   45     63   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   46     64   
                                format!("expected object key or end object, found: {:?}", other),
   47     65   
                            ),
   48     66   
                        )
          67  +
                    } /* JsonParserGenerator.kt:685 */
   49     68   
                }
          69  +
                /* JsonParserGenerator.kt:684 */
   50     70   
            }
   51         -
            }
          71  +
            /* JsonParserGenerator.kt:502 */
   52     72   
            Ok(Some(
   53     73   
                crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained(map),
   54     74   
            ))
          75  +
            /* JsonParserGenerator.kt:713 */
   55     76   
        }
   56         -
        _ => Err(
          77  +
        /* JsonParserGenerator.kt:722 */
          78  +
        _ => {
          79  +
            /* JsonParserGenerator.kt:723 */
          80  +
            Err(
   57     81   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   58     82   
                    "expected start object or null",
   59     83   
                ),
   60         -
        ),
          84  +
            )
          85  +
            /* JsonParserGenerator.kt:722 */
          86  +
        } /* JsonParserGenerator.kt:712 */
   61     87   
    }
          88  +
    /* JsonParserGenerator.kt:460 */
   62     89   
}

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

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

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

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

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

@@ -1,1 +758,1093 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_constrained_http_bound_shapes_operation_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::ConstrainedHttpBoundShapesOperationInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input =
   18     23   
            crate::input::constrained_http_bound_shapes_operation_input_internal::Builder::default(
   19     24   
            );
          25  +
        /* RustType.kt:516 */
   20     26   
        #[allow(unused_variables)]
          27  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   21     28   
        let ::aws_smithy_runtime_api::http::RequestParts {
   22     29   
            uri, headers, body, ..
   23     30   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   24     32   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_list_pattern_string_header_header(&headers)? {
   25     33   
                                input = input.set_length_list_pattern_string_header(Some(value))
   26     34   
                            }
          35  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   27     36   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_set_pattern_string_header_header(&headers)? {
   28     37   
                                input = input.set_length_set_pattern_string_header(Some(value))
   29     38   
                            }
          39  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   30     40   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_header(&headers)? {
   31     41   
                                input = input.set_length_string_header(Some(value))
   32     42   
                            }
          43  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   33     44   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_map_prefix_header(&headers)? {
   34     45   
                                input = input.set_length_string_header_map(value)
   35     46   
                            }
          47  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   36     48   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_set_header_header(&headers)? {
   37     49   
                                input = input.set_length_string_set_header(Some(value))
   38     50   
                            }
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   39     52   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_list_length_string_header_header(&headers)? {
   40     53   
                                input = input.set_list_length_string_header(Some(value))
   41     54   
                            }
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   42     56   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_header_header(&headers)? {
   43     57   
                                input = input.set_range_byte_header(value)
   44     58   
                            }
          59  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   45     60   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_list_header_header(&headers)? {
   46     61   
                                input = input.set_range_byte_list_header(Some(value))
   47     62   
                            }
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   48     64   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_set_header_header(&headers)? {
   49     65   
                                input = input.set_range_byte_set_header(Some(value))
   50     66   
                            }
          67  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   51     68   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_header_header(&headers)? {
   52     69   
                                input = input.set_range_integer_header(value)
   53     70   
                            }
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   54     72   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_list_header_header(&headers)? {
   55     73   
                                input = input.set_range_integer_list_header(Some(value))
   56     74   
                            }
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   57     76   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_set_header_header(&headers)? {
   58     77   
                                input = input.set_range_integer_set_header(Some(value))
   59     78   
                            }
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   60     80   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_header_header(&headers)? {
   61     81   
                                input = input.set_range_long_header(value)
   62     82   
                            }
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   63     84   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_list_header_header(&headers)? {
   64     85   
                                input = input.set_range_long_list_header(Some(value))
   65     86   
                            }
          87  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   66     88   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_set_header_header(&headers)? {
   67     89   
                                input = input.set_range_long_set_header(Some(value))
   68     90   
                            }
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   69     92   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_header_header(&headers)? {
   70     93   
                                input = input.set_range_short_header(value)
   71     94   
                            }
          95  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   72     96   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_list_header_header(&headers)? {
   73     97   
                                input = input.set_range_short_list_header(Some(value))
   74     98   
                            }
          99  +
        /* ServerHttpBoundProtocolGenerator.kt:794 */
   75    100   
        if let Some(value) = crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_set_header_header(&headers)? {
   76    101   
                                input = input.set_range_short_set_header(Some(value))
   77    102   
                            }
         103  +
        /* ServerHttpBoundProtocolGenerator.kt:986 */
   78    104   
        let input_string = uri.path();
         105  +
        /* ServerHttpBoundProtocolGenerator.kt:998 */
   79    106   
        let (input_string, (_, m1, m2, m3, m4, m5, m6)) =
   80    107   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   81    108   
                ::nom::sequence::preceded(
   82    109   
                    ::nom::bytes::complete::tag("/"),
   83    110   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
   84    111   
                        "constrained-http-bound-shapes-operation",
   85    112   
                    ),
   86    113   
                ),
   87    114   
                ::nom::sequence::preceded(
   88    115   
                    ::nom::bytes::complete::tag("/"),
   89    116   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   90    117   
                        ::nom::bytes::complete::take_until("/"),
   91    118   
                        ::nom::combinator::rest,
   92    119   
                    )),
   93    120   
                ),
   94    121   
                ::nom::sequence::preceded(
   95    122   
                    ::nom::bytes::complete::tag("/"),
   96    123   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   97    124   
                        ::nom::bytes::complete::take_until("/"),
   98    125   
                        ::nom::combinator::rest,
   99    126   
                    )),
  100    127   
                ),
  101    128   
                ::nom::sequence::preceded(
  102    129   
                    ::nom::bytes::complete::tag("/"),
  103    130   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
  104    131   
                        ::nom::bytes::complete::take_until("/"),
  105    132   
                        ::nom::combinator::rest,
  106    133   
                    )),
  107    134   
                ),
  108    135   
                ::nom::sequence::preceded(
  109    136   
                    ::nom::bytes::complete::tag("/"),
  110    137   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
  111    138   
                        ::nom::bytes::complete::take_until("/"),
  112    139   
                        ::nom::combinator::rest,
  113    140   
                    )),
  114    141   
                ),
  115    142   
                ::nom::sequence::preceded(
  116    143   
                    ::nom::bytes::complete::tag("/"),
  117    144   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
  118    145   
                        ::nom::bytes::complete::take_until("/"),
  119    146   
                        ::nom::combinator::rest,
  120    147   
                    )),
  121    148   
                ),
  122    149   
                ::nom::sequence::preceded(
  123    150   
                    ::nom::bytes::complete::tag("/"),
  124    151   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
  125    152   
                        ::nom::bytes::complete::take_until("/"),
  126    153   
                        ::nom::combinator::rest,
  127    154   
                    )),
  128    155   
                ),
  129    156   
            ))(input_string)?;
  130    157   
        debug_assert_eq!("", input_string);
         158  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  131    159   
        input = input.set_range_integer_label(
  132    160   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_label(m1)?
  133    161   
                                    );
         162  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  134    163   
        input = input.set_range_short_label(
  135    164   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_label(m2)?
  136    165   
                                    );
         166  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  137    167   
        input = input.set_range_long_label(
  138    168   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_label(m3)?
  139    169   
                                    );
         170  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  140    171   
        input = input.set_range_byte_label(
  141    172   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_label(m4)?
  142    173   
                                    );
         174  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  143    175   
        input = input.set_length_string_label(
  144    176   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_label(m5)?
  145    177   
                                    );
         178  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
  146    179   
        input = input.set_enum_string_label(
  147    180   
                                        crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_label(m6)?
  148    181   
                                    );
         182  +
        /* ServerHttpBoundProtocolGenerator.kt:1073 */
  149    183   
        let query_string = uri.query().unwrap_or("");
  150    184   
        let pairs = ::form_urlencoded::parse(query_string.as_bytes());
         185  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  151    186   
        let mut enum_string_query_seen = false;
         187  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  152    188   
        let mut length_string_query_seen = false;
         189  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  153    190   
        let mut range_byte_query_seen = false;
         191  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  154    192   
        let mut range_integer_query_seen = false;
         193  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  155    194   
        let mut range_long_query_seen = false;
         195  +
        /* ServerHttpBoundProtocolGenerator.kt:1099 */
  156    196   
        let mut range_short_query_seen = false;
         197  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  157    198   
        let mut enum_string_list_query = Vec::new();
         199  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  158    200   
        let mut length_list_pattern_string_query = Vec::new();
         201  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  159    202   
        let mut length_string_list_query = Vec::new();
         203  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  160    204   
        let mut length_string_set_query = Vec::new();
         205  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  161    206   
        let mut range_byte_list_query = Vec::new();
         207  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  162    208   
        let mut range_byte_set_query = Vec::new();
         209  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  163    210   
        let mut range_integer_list_query = Vec::new();
         211  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  164    212   
        let mut range_integer_set_query = Vec::new();
         213  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  165    214   
        let mut range_long_list_query = Vec::new();
         215  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  166    216   
        let mut range_long_set_query = Vec::new();
         217  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  167    218   
        let mut range_short_list_query = Vec::new();
         219  +
        /* ServerHttpBoundProtocolGenerator.kt:1102 */
  168    220   
        let mut range_short_set_query = Vec::new();
         221  +
        /* ServerHttpBoundProtocolGenerator.kt:1105 */
  169    222   
        for (k, v) in pairs {
         223  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  170    224   
            if !enum_string_query_seen && k == "enumString" {
  171    225   
                input = input.set_enum_string_query(
  172    226   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_enum_string_query(&v)?
  173    227   
                );
  174    228   
                enum_string_query_seen = true;
  175    229   
            }
         230  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  176    231   
            if !length_string_query_seen && k == "lengthString" {
  177    232   
                input = input.set_length_string_query(
  178    233   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_query(&v)?
  179    234   
                );
  180    235   
                length_string_query_seen = true;
  181    236   
            }
         237  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  182    238   
            if !range_byte_query_seen && k == "rangeByte" {
  183    239   
                input = input.set_range_byte_query(
  184    240   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_byte_query(&v)?
  185    241   
                );
  186    242   
                range_byte_query_seen = true;
  187    243   
            }
         244  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  188    245   
            if !range_integer_query_seen && k == "rangeInteger" {
  189    246   
                input = input.set_range_integer_query(
  190    247   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_integer_query(&v)?
  191    248   
                );
  192    249   
                range_integer_query_seen = true;
  193    250   
            }
         251  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  194    252   
            if !range_long_query_seen && k == "rangeLong" {
  195    253   
                input = input.set_range_long_query(
  196    254   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_long_query(&v)?
  197    255   
                );
  198    256   
                range_long_query_seen = true;
  199    257   
            }
         258  +
            /* ServerHttpBoundProtocolGenerator.kt:1109 */
  200    259   
            if !range_short_query_seen && k == "rangeShort" {
  201    260   
                input = input.set_range_short_query(
  202    261   
                    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_range_short_query(&v)?
  203    262   
                );
  204    263   
                range_short_query_seen = true;
  205    264   
            }
         265  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
  206    266   
            if k == "enumStringList" {
         267  +
                /* ServerHttpBoundProtocolGenerator.kt:1134 */
  207    268   
                let v = v.into_owned();
         269  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  208    270   
                enum_string_list_query.push(v);
  209         -
            } else if k == "lengthListPatternString" {
         271  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         272  +
            }
         273  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         274  +
            else if k == "lengthListPatternString" {
         275  +
                /* ServerHttpBoundProtocolGenerator.kt:1134 */
  210    276   
                let v = v.into_owned();
         277  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  211    278   
                length_list_pattern_string_query.push(v);
  212         -
            } else if k == "lengthStringList" {
         279  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         280  +
            }
         281  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         282  +
            else if k == "lengthStringList" {
         283  +
                /* ServerHttpBoundProtocolGenerator.kt:1134 */
  213    284   
                let v = v.into_owned();
         285  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  214    286   
                length_string_list_query.push(v);
  215         -
            } else if k == "lengthStringSet" {
         287  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         288  +
            }
         289  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         290  +
            else if k == "lengthStringSet" {
         291  +
                /* ServerHttpBoundProtocolGenerator.kt:1134 */
  216    292   
                let v = v.into_owned();
         293  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  217    294   
                length_string_set_query.push(v);
  218         -
            } else if k == "rangeByteList" {
         295  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         296  +
            }
         297  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         298  +
            else if k == "rangeByteList" {
         299  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  219    300   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         301  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  220    302   
                range_byte_list_query.push(v);
  221         -
            } else if k == "rangeByteSet" {
         303  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         304  +
            }
         305  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         306  +
            else if k == "rangeByteSet" {
         307  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  222    308   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         309  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  223    310   
                range_byte_set_query.push(v);
  224         -
            } else if k == "rangeIntegerList" {
         311  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         312  +
            }
         313  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         314  +
            else if k == "rangeIntegerList" {
         315  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  225    316   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         317  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  226    318   
                range_integer_list_query.push(v);
  227         -
            } else if k == "rangeIntegerSet" {
         319  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         320  +
            }
         321  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         322  +
            else if k == "rangeIntegerSet" {
         323  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  228    324   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         325  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  229    326   
                range_integer_set_query.push(v);
  230         -
            } else if k == "rangeLongList" {
         327  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         328  +
            }
         329  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         330  +
            else if k == "rangeLongList" {
         331  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  231    332   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         333  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  232    334   
                range_long_list_query.push(v);
  233         -
            } else if k == "rangeLongSet" {
         335  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         336  +
            }
         337  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         338  +
            else if k == "rangeLongSet" {
         339  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  234    340   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         341  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  235    342   
                range_long_set_query.push(v);
  236         -
            } else if k == "rangeShortList" {
         343  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         344  +
            }
         345  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         346  +
            else if k == "rangeShortList" {
         347  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  237    348   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         349  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  238    350   
                range_short_list_query.push(v);
  239         -
            } else if k == "rangeShortSet" {
         351  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         352  +
            }
         353  +
            /* ServerHttpBoundProtocolGenerator.kt:1122 */
         354  +
            else if k == "rangeShortSet" {
         355  +
                /* ServerHttpBoundProtocolGenerator.kt:1159 */
  240    356   
                let v = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(&v)?;
         357  +
                /* ServerHttpBoundProtocolGenerator.kt:1168 */
  241    358   
                range_short_set_query.push(v);
         359  +
                /* ServerHttpBoundProtocolGenerator.kt:1122 */
  242    360   
            }
         361  +
            /* ServerHttpBoundProtocolGenerator.kt:1105 */
  243    362   
        }
         363  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  244    364   
        if !enum_string_list_query.is_empty() {
         365  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  245    366   
            input = input.set_enum_string_list_query(
  246         -
                Some(
  247         -
                    crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
  248         -
                        enum_string_list_query
  249         -
                    )
  250         -
                )
  251         -
            );
  252         -
        }
         367  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         368  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained(
         369  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */enum_string_list_query
         370  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         371  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         372  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         373  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         374  +
        }
         375  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  253    376   
        if !length_list_pattern_string_query.is_empty() {
         377  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  254    378   
            input = input.set_length_list_pattern_string_query(
  255         -
                Some(
  256         -
                    crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
  257         -
                        length_list_pattern_string_query
  258         -
                    )
  259         -
                )
  260         -
            );
  261         -
        }
         379  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         380  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(
         381  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */length_list_pattern_string_query
         382  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         383  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         384  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         385  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         386  +
        }
         387  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  262    388   
        if !length_string_list_query.is_empty() {
         389  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  263    390   
            input = input.set_length_string_list_query(
  264         -
                Some(
  265         -
                    crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
  266         -
                        length_string_list_query
  267         -
                    )
  268         -
                )
  269         -
            );
  270         -
        }
         391  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         392  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(
         393  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_list_query
         394  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         395  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         396  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         397  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         398  +
        }
         399  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  271    400   
        if !length_string_set_query.is_empty() {
         401  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  272    402   
            input = input.set_length_string_set_query(
  273         -
                Some(
  274         -
                    crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
  275         -
                        length_string_set_query
  276         -
                    )
  277         -
                )
  278         -
            );
  279         -
        }
         403  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         404  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(
         405  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */length_string_set_query
         406  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         407  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         408  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         409  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         410  +
        }
         411  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  280    412   
        if !range_byte_list_query.is_empty() {
         413  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  281    414   
            input = input.set_range_byte_list_query(
  282         -
                Some(
  283         -
                    crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
  284         -
                        range_byte_list_query
  285         -
                    )
  286         -
                )
  287         -
            );
  288         -
        }
         415  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         416  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
         417  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_list_query
         418  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         419  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         420  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         421  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         422  +
        }
         423  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  289    424   
        if !range_byte_set_query.is_empty() {
  290         -
            input = input.set_range_byte_set_query(Some(
  291         -
                crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
  292         -
                    range_byte_set_query,
  293         -
                ),
  294         -
            ));
  295         -
        }
         425  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         426  +
            input = input.set_range_byte_set_query(
         427  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         428  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
         429  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_byte_set_query
         430  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         431  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         432  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         433  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         434  +
        }
         435  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  296    436   
        if !range_integer_list_query.is_empty() {
         437  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  297    438   
            input = input.set_range_integer_list_query(
  298         -
                Some(
  299         -
                    crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
  300         -
                        range_integer_list_query
  301         -
                    )
  302         -
                )
  303         -
            );
  304         -
        }
         439  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         440  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(
         441  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_list_query
         442  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         443  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         444  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         445  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         446  +
        }
         447  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  305    448   
        if !range_integer_set_query.is_empty() {
         449  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  306    450   
            input = input.set_range_integer_set_query(
  307         -
                Some(
  308         -
                    crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
  309         -
                        range_integer_set_query
  310         -
                    )
  311         -
                )
  312         -
            );
  313         -
        }
         451  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         452  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(
         453  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_integer_set_query
         454  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         455  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         456  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         457  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         458  +
        }
         459  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  314    460   
        if !range_long_list_query.is_empty() {
         461  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  315    462   
            input = input.set_range_long_list_query(
  316         -
                Some(
  317         -
                    crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
  318         -
                        range_long_list_query
  319         -
                    )
  320         -
                )
  321         -
            );
  322         -
        }
         463  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         464  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
         465  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_list_query
         466  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         467  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         468  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         469  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         470  +
        }
         471  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  323    472   
        if !range_long_set_query.is_empty() {
  324         -
            input = input.set_range_long_set_query(Some(
  325         -
                crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
  326         -
                    range_long_set_query,
  327         -
                ),
  328         -
            ));
  329         -
        }
         473  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
         474  +
            input = input.set_range_long_set_query(
         475  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         476  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
         477  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_long_set_query
         478  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         479  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         480  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         481  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         482  +
        }
         483  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  330    484   
        if !range_short_list_query.is_empty() {
         485  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  331    486   
            input = input.set_range_short_list_query(
  332         -
                Some(
  333         -
                    crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
  334         -
                        range_short_list_query
  335         -
                    )
  336         -
                )
  337         -
            );
  338         -
        }
         487  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         488  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
         489  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_list_query
         490  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         491  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         492  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         493  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         494  +
        }
         495  +
        /* ServerHttpBoundProtocolGenerator.kt:1228 */
  339    496   
        if !range_short_set_query.is_empty() {
         497  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */
  340    498   
            input = input.set_range_short_set_query(
  341         -
                Some(
  342         -
                    crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
  343         -
                        range_short_set_query
  344         -
                    )
  345         -
                )
  346         -
            );
  347         -
        }
         499  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */Some(
         500  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
         501  +
                        /* ServerHttpBoundProtocolGenerator.kt:1244 */range_short_set_query
         502  +
                    /* ServerHttpBoundProtocolGenerator.kt:1236 */)
         503  +
                /* ServerHttpBoundProtocolGenerator.kt:1235 */)
         504  +
            /* ServerHttpBoundProtocolGenerator.kt:1229 */);
         505  +
            /* ServerHttpBoundProtocolGenerator.kt:1228 */
         506  +
        }
         507  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
  348    508   
        input.build()?
         509  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
  349    510   
    })
         511  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
  350    512   
}
  351    513   
         514  +
/* RustType.kt:516 */
  352    515   
#[allow(clippy::unnecessary_wraps)]
         516  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
  353    517   
pub fn ser_constrained_http_bound_shapes_operation_http_response(
  354    518   
    #[allow(unused_variables)] output: crate::output::ConstrainedHttpBoundShapesOperationOutput,
  355    519   
) -> std::result::Result<
  356    520   
    ::aws_smithy_http_server::response::Response,
  357    521   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  358    522   
> {
         523  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
  359    524   
    Ok({
         525  +
        /* RustType.kt:516 */
  360    526   
        #[allow(unused_mut)]
         527  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
  361    528   
        let mut builder = ::http::Response::builder();
         529  +
        /* ServerHttpBoundProtocolGenerator.kt:629 */
  362    530   
        builder = crate::protocol_serde::shape_constrained_http_bound_shapes_operation::ser_constrained_http_bound_shapes_operation_headers(&output, builder)?;
         531  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
  363    532   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  364    533   
            builder,
  365    534   
            ::http::header::CONTENT_TYPE,
  366    535   
            "application/json",
  367    536   
        );
         537  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
  368    538   
        let http_status: u16 = 200;
  369    539   
        builder = builder.status(http_status);
         540  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
  370    541   
        let payload =
  371         -
            crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
  372         -
        ;
         542  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output_output(&output)?
         543  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
         544  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
  373    545   
        let content_length = payload.len();
  374    546   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
  375    547   
            builder,
  376    548   
            ::http::header::CONTENT_LENGTH,
  377    549   
            content_length,
  378    550   
        );
         551  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
  379    552   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
         553  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
  380    554   
        builder.body(body)?
         555  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
  381    556   
    })
         557  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
  382    558   
}
  383    559   
         560  +
/* RustType.kt:516 */
  384    561   
#[allow(clippy::unnecessary_wraps)]
         562  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
  385    563   
pub fn ser_constrained_http_bound_shapes_operation_http_error(
  386    564   
    error: &crate::error::ConstrainedHttpBoundShapesOperationError,
  387    565   
) -> std::result::Result<
  388    566   
    ::aws_smithy_http_server::response::Response,
  389    567   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
  390    568   
> {
         569  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
  391    570   
    Ok({
         571  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
  392    572   
        match error {
         573  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  393    574   
            crate::error::ConstrainedHttpBoundShapesOperationError::ValidationException(output) => {
         575  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  394    576   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         577  +
                /* RustType.kt:516 */
  395    578   
                #[allow(unused_mut)]
         579  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  396    580   
                let mut builder = ::http::Response::builder();
         581  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  397    582   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  398    583   
                    builder,
  399    584   
                    ::http::header::CONTENT_TYPE,
  400    585   
                    "application/json",
  401    586   
                );
         587  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  402    588   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  403    589   
                    builder,
  404    590   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  405    591   
                    "ValidationException",
  406    592   
                );
         593  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  407    594   
                let content_length = payload.len();
  408    595   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  409    596   
                    builder,
  410    597   
                    ::http::header::CONTENT_LENGTH,
  411    598   
                    content_length,
  412    599   
                );
         600  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  413    601   
                builder
  414    602   
                    .status(400)
  415    603   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         604  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         605  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  416    606   
        }
  417         -
        }
         607  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  418    608   
    })
         609  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  419    610   
}
  420    611   
         612  +
/* HttpBindingGenerator.kt:542 */
  421    613   
pub fn ser_constrained_http_bound_shapes_operation_headers(
  422    614   
    input: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
  423    615   
    mut builder: ::http::response::Builder,
  424    616   
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
  425    617   
{
         618  +
    /* HttpBindingGenerator.kt:592 */
  426    619   
    if let ::std::option::Option::Some(inner_1) = &input.length_string_header {
         620  +
        /* HttpBindingGenerator.kt:704 */
  427    621   
        let formatted_2 = inner_1.as_str();
         622  +
        /* HttpBindingGenerator.kt:705 */
  428    623   
        if !formatted_2.is_empty() {
         624  +
            /* HttpBindingGenerator.kt:706 */
  429    625   
            let header_value = formatted_2;
  430    626   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  431    627   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  432    628   
                    "length_string_header",
  433    629   
                    format!(
  434    630   
                        "`{}` cannot be used as a header value: {}",
  435    631   
                        &header_value, err
  436    632   
                    ),
  437    633   
                )
  438    634   
            })?;
  439    635   
            builder = builder.header("X-Length", header_value);
         636  +
            /* HttpBindingGenerator.kt:705 */
  440    637   
        }
         638  +
        /* HttpBindingGenerator.kt:592 */
  441    639   
    }
         640  +
    /* SerializerUtil.kt:46 */
  442    641   
    if input.range_integer_header != 0 {
         642  +
        /* HttpBindingGenerator.kt:690 */
  443    643   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_integer_header);
         644  +
        /* HttpBindingGenerator.kt:704 */
  444    645   
        let formatted_3 = encoder.encode();
         646  +
        /* HttpBindingGenerator.kt:705 */
  445    647   
        if !formatted_3.is_empty() {
         648  +
            /* HttpBindingGenerator.kt:706 */
  446    649   
            let header_value = formatted_3;
  447    650   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  448    651   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  449    652   
                    "range_integer_header",
  450    653   
                    format!(
  451    654   
                        "`{}` cannot be used as a header value: {}",
  452    655   
                        &header_value, err
  453    656   
                    ),
  454    657   
                )
  455    658   
            })?;
  456    659   
            builder = builder.header("X-Range-Integer", header_value);
         660  +
            /* HttpBindingGenerator.kt:705 */
  457    661   
        }
         662  +
        /* SerializerUtil.kt:46 */
  458    663   
    }
         664  +
    /* SerializerUtil.kt:46 */
  459    665   
    if input.range_short_header != 0 {
         666  +
        /* HttpBindingGenerator.kt:690 */
  460    667   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_short_header);
         668  +
        /* HttpBindingGenerator.kt:704 */
  461    669   
        let formatted_4 = encoder.encode();
         670  +
        /* HttpBindingGenerator.kt:705 */
  462    671   
        if !formatted_4.is_empty() {
         672  +
            /* HttpBindingGenerator.kt:706 */
  463    673   
            let header_value = formatted_4;
  464    674   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  465    675   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  466    676   
                    "range_short_header",
  467    677   
                    format!(
  468    678   
                        "`{}` cannot be used as a header value: {}",
  469    679   
                        &header_value, err
  470    680   
                    ),
  471    681   
                )
  472    682   
            })?;
  473    683   
            builder = builder.header("X-Range-Short", header_value);
         684  +
            /* HttpBindingGenerator.kt:705 */
  474    685   
        }
         686  +
        /* SerializerUtil.kt:46 */
  475    687   
    }
         688  +
    /* SerializerUtil.kt:46 */
  476    689   
    if input.range_long_header != 0 {
         690  +
        /* HttpBindingGenerator.kt:690 */
  477    691   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_long_header);
         692  +
        /* HttpBindingGenerator.kt:704 */
  478    693   
        let formatted_5 = encoder.encode();
         694  +
        /* HttpBindingGenerator.kt:705 */
  479    695   
        if !formatted_5.is_empty() {
         696  +
            /* HttpBindingGenerator.kt:706 */
  480    697   
            let header_value = formatted_5;
  481    698   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  482    699   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  483    700   
                    "range_long_header",
  484    701   
                    format!(
  485    702   
                        "`{}` cannot be used as a header value: {}",
  486    703   
                        &header_value, err
  487    704   
                    ),
  488    705   
                )
  489    706   
            })?;
  490    707   
            builder = builder.header("X-Range-Long", header_value);
         708  +
            /* HttpBindingGenerator.kt:705 */
  491    709   
        }
         710  +
        /* SerializerUtil.kt:46 */
  492    711   
    }
         712  +
    /* SerializerUtil.kt:46 */
  493    713   
    if input.range_byte_header != 0 {
         714  +
        /* HttpBindingGenerator.kt:690 */
  494    715   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(input.range_byte_header);
         716  +
        /* HttpBindingGenerator.kt:704 */
  495    717   
        let formatted_6 = encoder.encode();
         718  +
        /* HttpBindingGenerator.kt:705 */
  496    719   
        if !formatted_6.is_empty() {
         720  +
            /* HttpBindingGenerator.kt:706 */
  497    721   
            let header_value = formatted_6;
  498    722   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  499    723   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  500    724   
                    "range_byte_header",
  501    725   
                    format!(
  502    726   
                        "`{}` cannot be used as a header value: {}",
  503    727   
                        &header_value, err
  504    728   
                    ),
  505    729   
                )
  506    730   
            })?;
  507    731   
            builder = builder.header("X-Range-Byte", header_value);
         732  +
            /* HttpBindingGenerator.kt:705 */
  508    733   
        }
         734  +
        /* SerializerUtil.kt:46 */
  509    735   
    }
         736  +
    /* HttpBindingGenerator.kt:592 */
  510    737   
    if let ::std::option::Option::Some(inner_7) = &input.length_string_set_header {
         738  +
        /* HttpBindingGenerator.kt:646 */
  511    739   
        for inner_8 in inner_7 {
         740  +
            /* HttpBindingGenerator.kt:704 */
  512    741   
            let formatted_9 = ::aws_smithy_http::header::quote_header_value(inner_8.as_str());
         742  +
            /* HttpBindingGenerator.kt:705 */
  513    743   
            if !formatted_9.is_empty() {
         744  +
                /* HttpBindingGenerator.kt:706 */
  514    745   
                let header_value = formatted_9;
  515    746   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  516    747   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  517    748   
                        "length_string_set_header",
  518    749   
                        format!(
  519    750   
                            "`{}` cannot be used as a header value: {}",
  520    751   
                            &header_value, err
  521    752   
                        ),
  522    753   
                    )
  523    754   
                })?;
  524    755   
                builder = builder.header("X-Length-Set", header_value);
         756  +
                /* HttpBindingGenerator.kt:705 */
  525    757   
            }
         758  +
            /* HttpBindingGenerator.kt:646 */
  526    759   
        }
         760  +
        /* HttpBindingGenerator.kt:592 */
  527    761   
    }
         762  +
    /* HttpBindingGenerator.kt:592 */
  528    763   
    if let ::std::option::Option::Some(inner_10) = &input.list_length_string_header {
         764  +
        /* HttpBindingGenerator.kt:646 */
  529    765   
        for inner_11 in inner_10 {
         766  +
            /* HttpBindingGenerator.kt:704 */
  530    767   
            let formatted_12 = ::aws_smithy_http::header::quote_header_value(inner_11.as_str());
         768  +
            /* HttpBindingGenerator.kt:705 */
  531    769   
            if !formatted_12.is_empty() {
         770  +
                /* HttpBindingGenerator.kt:706 */
  532    771   
                let header_value = formatted_12;
  533    772   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  534    773   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  535    774   
                        "list_length_string_header",
  536    775   
                        format!(
  537    776   
                            "`{}` cannot be used as a header value: {}",
  538    777   
                            &header_value, err
  539    778   
                        ),
  540    779   
                    )
  541    780   
                })?;
  542    781   
                builder = builder.header("X-List-Length-String", header_value);
         782  +
                /* HttpBindingGenerator.kt:705 */
  543    783   
            }
         784  +
            /* HttpBindingGenerator.kt:646 */
  544    785   
        }
         786  +
        /* HttpBindingGenerator.kt:592 */
  545    787   
    }
         788  +
    /* HttpBindingGenerator.kt:592 */
  546    789   
    if let ::std::option::Option::Some(inner_13) = &input.length_list_pattern_string_header {
         790  +
        /* HttpBindingGenerator.kt:646 */
  547    791   
        for inner_14 in inner_13 {
         792  +
            /* HttpBindingGenerator.kt:704 */
  548    793   
            let formatted_15 = ::aws_smithy_http::header::quote_header_value(inner_14.as_str());
         794  +
            /* HttpBindingGenerator.kt:705 */
  549    795   
            if !formatted_15.is_empty() {
         796  +
                /* HttpBindingGenerator.kt:706 */
  550    797   
                let header_value = formatted_15;
  551    798   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  552    799   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  553    800   
                        "length_list_pattern_string_header",
  554    801   
                        format!(
  555    802   
                            "`{}` cannot be used as a header value: {}",
  556    803   
                            &header_value, err
  557    804   
                        ),
  558    805   
                    )
  559    806   
                })?;
  560    807   
                builder = builder.header("X-Length-List-Pattern-String", header_value);
         808  +
                /* HttpBindingGenerator.kt:705 */
  561    809   
            }
         810  +
            /* HttpBindingGenerator.kt:646 */
  562    811   
        }
         812  +
        /* HttpBindingGenerator.kt:592 */
  563    813   
    }
         814  +
    /* HttpBindingGenerator.kt:592 */
  564    815   
    if let ::std::option::Option::Some(inner_16) = &input.length_set_pattern_string_header {
         816  +
        /* HttpBindingGenerator.kt:646 */
  565    817   
        for inner_17 in inner_16 {
         818  +
            /* HttpBindingGenerator.kt:704 */
  566    819   
            let formatted_18 = ::aws_smithy_http::header::quote_header_value(inner_17.as_str());
         820  +
            /* HttpBindingGenerator.kt:705 */
  567    821   
            if !formatted_18.is_empty() {
         822  +
                /* HttpBindingGenerator.kt:706 */
  568    823   
                let header_value = formatted_18;
  569    824   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  570    825   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  571    826   
                        "length_set_pattern_string_header",
  572    827   
                        format!(
  573    828   
                            "`{}` cannot be used as a header value: {}",
  574    829   
                            &header_value, err
  575    830   
                        ),
  576    831   
                    )
  577    832   
                })?;
  578    833   
                builder = builder.header("X-Length-Set-Pattern-String", header_value);
         834  +
                /* HttpBindingGenerator.kt:705 */
  579    835   
            }
         836  +
            /* HttpBindingGenerator.kt:646 */
  580    837   
        }
         838  +
        /* HttpBindingGenerator.kt:592 */
  581    839   
    }
         840  +
    /* HttpBindingGenerator.kt:592 */
  582    841   
    if let ::std::option::Option::Some(inner_19) = &input.range_byte_set_header {
         842  +
        /* HttpBindingGenerator.kt:646 */
  583    843   
        for inner_20 in inner_19 {
         844  +
            /* HttpBindingGenerator.kt:690 */
  584    845   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_20);
         846  +
            /* HttpBindingGenerator.kt:704 */
  585    847   
            let formatted_21 = encoder.encode();
         848  +
            /* HttpBindingGenerator.kt:705 */
  586    849   
            if !formatted_21.is_empty() {
         850  +
                /* HttpBindingGenerator.kt:706 */
  587    851   
                let header_value = formatted_21;
  588    852   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  589    853   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  590    854   
                        "range_byte_set_header",
  591    855   
                        format!(
  592    856   
                            "`{}` cannot be used as a header value: {}",
  593    857   
                            &header_value, err
  594    858   
                        ),
  595    859   
                    )
  596    860   
                })?;
  597    861   
                builder = builder.header("X-Range-Byte-Set", header_value);
         862  +
                /* HttpBindingGenerator.kt:705 */
  598    863   
            }
         864  +
            /* HttpBindingGenerator.kt:646 */
  599    865   
        }
         866  +
        /* HttpBindingGenerator.kt:592 */
  600    867   
    }
         868  +
    /* HttpBindingGenerator.kt:592 */
  601    869   
    if let ::std::option::Option::Some(inner_22) = &input.range_short_set_header {
         870  +
        /* HttpBindingGenerator.kt:646 */
  602    871   
        for inner_23 in inner_22 {
         872  +
            /* HttpBindingGenerator.kt:690 */
  603    873   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_23);
         874  +
            /* HttpBindingGenerator.kt:704 */
  604    875   
            let formatted_24 = encoder.encode();
         876  +
            /* HttpBindingGenerator.kt:705 */
  605    877   
            if !formatted_24.is_empty() {
         878  +
                /* HttpBindingGenerator.kt:706 */
  606    879   
                let header_value = formatted_24;
  607    880   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  608    881   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  609    882   
                        "range_short_set_header",
  610    883   
                        format!(
  611    884   
                            "`{}` cannot be used as a header value: {}",
  612    885   
                            &header_value, err
  613    886   
                        ),
  614    887   
                    )
  615    888   
                })?;
  616    889   
                builder = builder.header("X-Range-Short-Set", header_value);
         890  +
                /* HttpBindingGenerator.kt:705 */
  617    891   
            }
         892  +
            /* HttpBindingGenerator.kt:646 */
  618    893   
        }
         894  +
        /* HttpBindingGenerator.kt:592 */
  619    895   
    }
         896  +
    /* HttpBindingGenerator.kt:592 */
  620    897   
    if let ::std::option::Option::Some(inner_25) = &input.range_integer_set_header {
         898  +
        /* HttpBindingGenerator.kt:646 */
  621    899   
        for inner_26 in inner_25 {
         900  +
            /* HttpBindingGenerator.kt:690 */
  622    901   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_26);
         902  +
            /* HttpBindingGenerator.kt:704 */
  623    903   
            let formatted_27 = encoder.encode();
         904  +
            /* HttpBindingGenerator.kt:705 */
  624    905   
            if !formatted_27.is_empty() {
         906  +
                /* HttpBindingGenerator.kt:706 */
  625    907   
                let header_value = formatted_27;
  626    908   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  627    909   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  628    910   
                        "range_integer_set_header",
  629    911   
                        format!(
  630    912   
                            "`{}` cannot be used as a header value: {}",
  631    913   
                            &header_value, err
  632    914   
                        ),
  633    915   
                    )
  634    916   
                })?;
  635    917   
                builder = builder.header("X-Range-Integer-Set", header_value);
         918  +
                /* HttpBindingGenerator.kt:705 */
  636    919   
            }
         920  +
            /* HttpBindingGenerator.kt:646 */
  637    921   
        }
         922  +
        /* HttpBindingGenerator.kt:592 */
  638    923   
    }
         924  +
    /* HttpBindingGenerator.kt:592 */
  639    925   
    if let ::std::option::Option::Some(inner_28) = &input.range_long_set_header {
         926  +
        /* HttpBindingGenerator.kt:646 */
  640    927   
        for inner_29 in inner_28 {
         928  +
            /* HttpBindingGenerator.kt:690 */
  641    929   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_29);
         930  +
            /* HttpBindingGenerator.kt:704 */
  642    931   
            let formatted_30 = encoder.encode();
         932  +
            /* HttpBindingGenerator.kt:705 */
  643    933   
            if !formatted_30.is_empty() {
         934  +
                /* HttpBindingGenerator.kt:706 */
  644    935   
                let header_value = formatted_30;
  645    936   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  646    937   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  647    938   
                        "range_long_set_header",
  648    939   
                        format!(
  649    940   
                            "`{}` cannot be used as a header value: {}",
  650    941   
                            &header_value, err
  651    942   
                        ),
  652    943   
                    )
  653    944   
                })?;
  654    945   
                builder = builder.header("X-Range-Long-Set", header_value);
         946  +
                /* HttpBindingGenerator.kt:705 */
  655    947   
            }
         948  +
            /* HttpBindingGenerator.kt:646 */
  656    949   
        }
         950  +
        /* HttpBindingGenerator.kt:592 */
  657    951   
    }
         952  +
    /* HttpBindingGenerator.kt:592 */
  658    953   
    if let ::std::option::Option::Some(inner_31) = &input.range_byte_list_header {
         954  +
        /* HttpBindingGenerator.kt:646 */
  659    955   
        for inner_32 in inner_31 {
         956  +
            /* HttpBindingGenerator.kt:690 */
  660    957   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_32);
         958  +
            /* HttpBindingGenerator.kt:704 */
  661    959   
            let formatted_33 = encoder.encode();
         960  +
            /* HttpBindingGenerator.kt:705 */
  662    961   
            if !formatted_33.is_empty() {
         962  +
                /* HttpBindingGenerator.kt:706 */
  663    963   
                let header_value = formatted_33;
  664    964   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  665    965   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  666    966   
                        "range_byte_list_header",
  667    967   
                        format!(
  668    968   
                            "`{}` cannot be used as a header value: {}",
  669    969   
                            &header_value, err
  670    970   
                        ),
  671    971   
                    )
  672    972   
                })?;
  673    973   
                builder = builder.header("X-Range-Byte-List", header_value);
         974  +
                /* HttpBindingGenerator.kt:705 */
  674    975   
            }
         976  +
            /* HttpBindingGenerator.kt:646 */
  675    977   
        }
         978  +
        /* HttpBindingGenerator.kt:592 */
  676    979   
    }
         980  +
    /* HttpBindingGenerator.kt:592 */
  677    981   
    if let ::std::option::Option::Some(inner_34) = &input.range_short_list_header {
         982  +
        /* HttpBindingGenerator.kt:646 */
  678    983   
        for inner_35 in inner_34 {
         984  +
            /* HttpBindingGenerator.kt:690 */
  679    985   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_35);
         986  +
            /* HttpBindingGenerator.kt:704 */
  680    987   
            let formatted_36 = encoder.encode();
         988  +
            /* HttpBindingGenerator.kt:705 */
  681    989   
            if !formatted_36.is_empty() {
         990  +
                /* HttpBindingGenerator.kt:706 */
  682    991   
                let header_value = formatted_36;
  683    992   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  684    993   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  685    994   
                        "range_short_list_header",
  686    995   
                        format!(
  687    996   
                            "`{}` cannot be used as a header value: {}",
  688    997   
                            &header_value, err
  689    998   
                        ),
  690    999   
                    )
  691   1000   
                })?;
  692   1001   
                builder = builder.header("X-Range-Short-List", header_value);
        1002  +
                /* HttpBindingGenerator.kt:705 */
  693   1003   
            }
        1004  +
            /* HttpBindingGenerator.kt:646 */
  694   1005   
        }
        1006  +
        /* HttpBindingGenerator.kt:592 */
  695   1007   
    }
        1008  +
    /* HttpBindingGenerator.kt:592 */
  696   1009   
    if let ::std::option::Option::Some(inner_37) = &input.range_integer_list_header {
        1010  +
        /* HttpBindingGenerator.kt:646 */
  697   1011   
        for inner_38 in inner_37 {
        1012  +
            /* HttpBindingGenerator.kt:690 */
  698   1013   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_38);
        1014  +
            /* HttpBindingGenerator.kt:704 */
  699   1015   
            let formatted_39 = encoder.encode();
        1016  +
            /* HttpBindingGenerator.kt:705 */
  700   1017   
            if !formatted_39.is_empty() {
        1018  +
                /* HttpBindingGenerator.kt:706 */
  701   1019   
                let header_value = formatted_39;
  702   1020   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  703   1021   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  704   1022   
                        "range_integer_list_header",
  705   1023   
                        format!(
  706   1024   
                            "`{}` cannot be used as a header value: {}",
  707   1025   
                            &header_value, err
  708   1026   
                        ),
  709   1027   
                    )
  710   1028   
                })?;
  711   1029   
                builder = builder.header("X-Range-Integer-List", header_value);
        1030  +
                /* HttpBindingGenerator.kt:705 */
  712   1031   
            }
        1032  +
            /* HttpBindingGenerator.kt:646 */
  713   1033   
        }
        1034  +
        /* HttpBindingGenerator.kt:592 */
  714   1035   
    }
        1036  +
    /* HttpBindingGenerator.kt:592 */
  715   1037   
    if let ::std::option::Option::Some(inner_40) = &input.range_long_list_header {
        1038  +
        /* HttpBindingGenerator.kt:646 */
  716   1039   
        for inner_41 in inner_40 {
        1040  +
            /* HttpBindingGenerator.kt:690 */
  717   1041   
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_41);
        1042  +
            /* HttpBindingGenerator.kt:704 */
  718   1043   
            let formatted_42 = encoder.encode();
        1044  +
            /* HttpBindingGenerator.kt:705 */
  719   1045   
            if !formatted_42.is_empty() {
        1046  +
                /* HttpBindingGenerator.kt:706 */
  720   1047   
                let header_value = formatted_42;
  721   1048   
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  722   1049   
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
  723   1050   
                        "range_long_list_header",
  724   1051   
                        format!(
  725   1052   
                            "`{}` cannot be used as a header value: {}",
  726   1053   
                            &header_value, err
  727   1054   
                        ),
  728   1055   
                    )
  729   1056   
                })?;
  730   1057   
                builder = builder.header("X-Range-Long-List", header_value);
        1058  +
                /* HttpBindingGenerator.kt:705 */
  731   1059   
            }
        1060  +
            /* HttpBindingGenerator.kt:646 */
  732   1061   
        }
        1062  +
        /* HttpBindingGenerator.kt:592 */
  733   1063   
    }
        1064  +
    /* HttpBindingGenerator.kt:741 */
  734   1065   
    {
        1066  +
        /* HttpBindingGenerator.kt:747 */
  735   1067   
        for (k, v) in &input.length_string_header_map {
  736   1068   
            use std::str::FromStr;
  737   1069   
            let header_name = http::header::HeaderName::from_str(&format!(
  738   1070   
                "{}{}",
  739   1071   
                "X-Length-String-Prefix-Headers-", &k
  740   1072   
            ))
  741   1073   
            .map_err(|err| {
  742   1074   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  743   1075   
                    "length_string_header_map",
  744   1076   
                    format!("`{k}` cannot be used as a header name: {err}"),
  745   1077   
                )
  746   1078   
            })?;
  747   1079   
            let header_value = v.as_str();
  748   1080   
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
  749   1081   
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
  750   1082   
                    "length_string_header_map",
  751   1083   
                    format!("`{}` cannot be used as a header value: {}", v, err),
  752   1084   
                )
  753   1085   
            })?;
  754   1086   
            builder = builder.header(header_name, header_value);
  755   1087   
        }
        1088  +
        /* HttpBindingGenerator.kt:741 */
  756   1089   
    }
        1090  +
    /* HttpBindingGenerator.kt:555 */
  757   1091   
    Ok(builder)
        1092  +
    /* HttpBindingGenerator.kt:542 */
  758   1093   
}

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

@@ -1,1 +442,582 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:153 */
    2      3   
pub(crate) fn de_length_list_pattern_string_header_header(header_map: &::aws_smithy_runtime_api::http::Headers) -> ::std::result::Result<::std::option::Option<crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained>, ::aws_smithy_http::header::ParseError>{
           4  +
    /* HttpBindingGenerator.kt:160 */
    3      5   
    let headers = header_map.get_all("X-Length-List-Pattern-String");
           6  +
    /* HttpBindingGenerator.kt:409 */
    4      7   
    let var_1: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
           8  +
    /* HttpBindingGenerator.kt:456 */
    5      9   
    Ok(if !var_1.is_empty() {
    6     10   
        Some(crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained(var_1))
    7     11   
    } else {
    8     12   
        None
    9     13   
    })
          14  +
    /* HttpBindingGenerator.kt:153 */
   10     15   
}
   11     16   
          17  +
/* HttpBindingGenerator.kt:153 */
   12     18   
pub(crate) fn de_length_set_pattern_string_header_header(header_map: &::aws_smithy_runtime_api::http::Headers) -> ::std::result::Result<::std::option::Option<crate::unconstrained::length_set_of_pattern_string_unconstrained::LengthSetOfPatternStringUnconstrained>, ::aws_smithy_http::header::ParseError>{
          19  +
    /* HttpBindingGenerator.kt:160 */
   13     20   
    let headers = header_map.get_all("X-Length-Set-Pattern-String");
          21  +
    /* HttpBindingGenerator.kt:409 */
   14     22   
    let var_2: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
          23  +
    /* HttpBindingGenerator.kt:456 */
   15     24   
    Ok(if !var_2.is_empty() {
   16     25   
        Some(crate::unconstrained::length_set_of_pattern_string_unconstrained::LengthSetOfPatternStringUnconstrained(var_2))
   17     26   
    } else {
   18     27   
        None
   19     28   
    })
          29  +
    /* HttpBindingGenerator.kt:153 */
   20     30   
}
   21     31   
          32  +
/* HttpBindingGenerator.kt:153 */
   22     33   
pub(crate) fn de_length_string_header_header(
   23     34   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   24     35   
) -> ::std::result::Result<
   25     36   
    ::std::option::Option<::std::string::String>,
   26     37   
    ::aws_smithy_http::header::ParseError,
   27     38   
> {
          39  +
    /* HttpBindingGenerator.kt:160 */
   28     40   
    let headers = header_map.get_all("X-Length");
          41  +
    /* HttpBindingGenerator.kt:375 */
   29     42   
    ::aws_smithy_http::header::one_or_none(headers)
          43  +
    /* HttpBindingGenerator.kt:153 */
   30     44   
}
   31     45   
          46  +
/* HttpBindingGenerator.kt:184 */
   32     47   
pub(crate) fn de_length_string_header_map_prefix_header(
   33     48   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   34     49   
) -> std::result::Result<
   35     50   
    ::std::option::Option<
   36     51   
        crate::unconstrained::map_of_length_string_unconstrained::MapOfLengthStringUnconstrained,
   37     52   
    >,
   38     53   
    ::aws_smithy_http::header::ParseError,
   39     54   
> {
          55  +
    /* HttpBindingGenerator.kt:190 */
   40     56   
    let headers = ::aws_smithy_http::header::headers_for_prefix(
   41     57   
        header_map.iter().map(|(k, _)| k),
   42     58   
        "X-Length-String-Prefix-Headers-",
   43     59   
    );
   44     60   
    let out: std::result::Result<_, _> = headers.map(|(key, header_name)| {
   45     61   
                            let values = header_map.get_all(header_name);
   46     62   
                            crate::protocol_serde::shape_constrained_http_bound_shapes_operation_input::de_length_string_header_map_inner(values).map(|v| (key.to_string(), v.expect(
   47     63   
                                "we have checked there is at least one value for this header name; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"
   48     64   
                            )))
   49     65   
                        }).collect();
          66  +
    /* ServerRequestBindingGenerator.kt:79 */
   50     67   
    let out = out.map(
   51     68   
        crate::unconstrained::map_of_length_string_unconstrained::MapOfLengthStringUnconstrained,
   52     69   
    );
          70  +
    /* HttpBindingGenerator.kt:211 */
   53     71   
    out.map(Some)
          72  +
    /* HttpBindingGenerator.kt:184 */
   54     73   
}
   55     74   
          75  +
/* HttpBindingGenerator.kt:153 */
   56     76   
pub(crate) fn de_length_string_set_header_header(
   57     77   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   58     78   
) -> ::std::result::Result<
   59     79   
    ::std::option::Option<
   60     80   
        crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained,
   61     81   
    >,
   62     82   
    ::aws_smithy_http::header::ParseError,
   63     83   
> {
          84  +
    /* HttpBindingGenerator.kt:160 */
   64     85   
    let headers = header_map.get_all("X-Length-Set");
          86  +
    /* HttpBindingGenerator.kt:409 */
   65     87   
    let var_3: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
          88  +
    /* HttpBindingGenerator.kt:456 */
   66     89   
    Ok(if !var_3.is_empty() {
   67     90   
        Some(crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained(var_3))
   68     91   
    } else {
   69     92   
        None
   70     93   
    })
          94  +
    /* HttpBindingGenerator.kt:153 */
   71     95   
}
   72     96   
          97  +
/* HttpBindingGenerator.kt:153 */
   73     98   
pub(crate) fn de_list_length_string_header_header(
   74     99   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   75    100   
) -> ::std::result::Result<
   76    101   
    ::std::option::Option<
   77    102   
        crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained,
   78    103   
    >,
   79    104   
    ::aws_smithy_http::header::ParseError,
   80    105   
> {
         106  +
    /* HttpBindingGenerator.kt:160 */
   81    107   
    let headers = header_map.get_all("X-List-Length-String");
         108  +
    /* HttpBindingGenerator.kt:409 */
   82    109   
    let var_4: Vec<::std::string::String> = ::aws_smithy_http::header::read_many_from_str(headers)?;
         110  +
    /* HttpBindingGenerator.kt:456 */
   83    111   
    Ok(if !var_4.is_empty() {
   84    112   
        Some(crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained(var_4))
   85    113   
    } else {
   86    114   
        None
   87    115   
    })
         116  +
    /* HttpBindingGenerator.kt:153 */
   88    117   
}
   89    118   
         119  +
/* HttpBindingGenerator.kt:153 */
   90    120   
pub(crate) fn de_range_byte_header_header(
   91    121   
    header_map: &::aws_smithy_runtime_api::http::Headers,
   92    122   
) -> ::std::result::Result<::std::option::Option<i8>, ::aws_smithy_http::header::ParseError> {
         123  +
    /* HttpBindingGenerator.kt:160 */
   93    124   
    let headers = header_map.get_all("X-Range-Byte");
         125  +
    /* HttpBindingGenerator.kt:404 */
   94    126   
    let var_5 = ::aws_smithy_http::header::read_many_primitive::<i8>(headers)?;
         127  +
    /* HttpBindingGenerator.kt:468 */
   95    128   
    if var_5.len() > 1 {
   96    129   
        Err(::aws_smithy_http::header::ParseError::new(format!(
   97    130   
            "expected one item but found {}",
   98    131   
            var_5.len()
   99    132   
        )))
  100    133   
    } else {
  101    134   
        let mut var_5 = var_5;
  102    135   
        Ok(var_5.pop())
  103    136   
    }
         137  +
    /* HttpBindingGenerator.kt:153 */
  104    138   
}
  105    139   
         140  +
/* HttpBindingGenerator.kt:153 */
  106    141   
pub(crate) fn de_range_byte_list_header_header(
  107    142   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  108    143   
) -> ::std::result::Result<
  109    144   
    ::std::option::Option<
  110    145   
        crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained,
  111    146   
    >,
  112    147   
    ::aws_smithy_http::header::ParseError,
  113    148   
> {
         149  +
    /* HttpBindingGenerator.kt:160 */
  114    150   
    let headers = header_map.get_all("X-Range-Byte-List");
         151  +
    /* HttpBindingGenerator.kt:404 */
  115    152   
    let var_6 = ::aws_smithy_http::header::read_many_primitive::<i8>(headers)?;
         153  +
    /* HttpBindingGenerator.kt:456 */
  116    154   
    Ok(if !var_6.is_empty() {
  117    155   
        Some(
  118    156   
            crate::unconstrained::list_of_range_byte_unconstrained::ListOfRangeByteUnconstrained(
  119    157   
                var_6,
  120    158   
            ),
  121    159   
        )
  122    160   
    } else {
  123    161   
        None
  124    162   
    })
         163  +
    /* HttpBindingGenerator.kt:153 */
  125    164   
}
  126    165   
         166  +
/* HttpBindingGenerator.kt:153 */
  127    167   
pub(crate) fn de_range_byte_set_header_header(
  128    168   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  129    169   
) -> ::std::result::Result<
  130    170   
    ::std::option::Option<
  131    171   
        crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained,
  132    172   
    >,
  133    173   
    ::aws_smithy_http::header::ParseError,
  134    174   
> {
         175  +
    /* HttpBindingGenerator.kt:160 */
  135    176   
    let headers = header_map.get_all("X-Range-Byte-Set");
         177  +
    /* HttpBindingGenerator.kt:404 */
  136    178   
    let var_7 = ::aws_smithy_http::header::read_many_primitive::<i8>(headers)?;
         179  +
    /* HttpBindingGenerator.kt:456 */
  137    180   
    Ok(if !var_7.is_empty() {
  138    181   
        Some(
  139    182   
            crate::unconstrained::set_of_range_byte_unconstrained::SetOfRangeByteUnconstrained(
  140    183   
                var_7,
  141    184   
            ),
  142    185   
        )
  143    186   
    } else {
  144    187   
        None
  145    188   
    })
         189  +
    /* HttpBindingGenerator.kt:153 */
  146    190   
}
  147    191   
         192  +
/* HttpBindingGenerator.kt:153 */
  148    193   
pub(crate) fn de_range_integer_header_header(
  149    194   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  150    195   
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_http::header::ParseError> {
         196  +
    /* HttpBindingGenerator.kt:160 */
  151    197   
    let headers = header_map.get_all("X-Range-Integer");
         198  +
    /* HttpBindingGenerator.kt:404 */
  152    199   
    let var_8 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
         200  +
    /* HttpBindingGenerator.kt:468 */
  153    201   
    if var_8.len() > 1 {
  154    202   
        Err(::aws_smithy_http::header::ParseError::new(format!(
  155    203   
            "expected one item but found {}",
  156    204   
            var_8.len()
  157    205   
        )))
  158    206   
    } else {
  159    207   
        let mut var_8 = var_8;
  160    208   
        Ok(var_8.pop())
  161    209   
    }
         210  +
    /* HttpBindingGenerator.kt:153 */
  162    211   
}
  163    212   
         213  +
/* HttpBindingGenerator.kt:153 */
  164    214   
pub(crate) fn de_range_integer_list_header_header(
  165    215   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  166    216   
) -> ::std::result::Result<
  167    217   
    ::std::option::Option<
  168    218   
        crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained,
  169    219   
    >,
  170    220   
    ::aws_smithy_http::header::ParseError,
  171    221   
> {
         222  +
    /* HttpBindingGenerator.kt:160 */
  172    223   
    let headers = header_map.get_all("X-Range-Integer-List");
         224  +
    /* HttpBindingGenerator.kt:404 */
  173    225   
    let var_9 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
         226  +
    /* HttpBindingGenerator.kt:456 */
  174    227   
    Ok(if !var_9.is_empty() {
  175    228   
        Some(crate::unconstrained::list_of_range_integer_unconstrained::ListOfRangeIntegerUnconstrained(var_9))
  176    229   
    } else {
  177    230   
        None
  178    231   
    })
         232  +
    /* HttpBindingGenerator.kt:153 */
  179    233   
}
  180    234   
         235  +
/* HttpBindingGenerator.kt:153 */
  181    236   
pub(crate) fn de_range_integer_set_header_header(
  182    237   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  183    238   
) -> ::std::result::Result<
  184    239   
    ::std::option::Option<
  185    240   
        crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained,
  186    241   
    >,
  187    242   
    ::aws_smithy_http::header::ParseError,
  188    243   
> {
         244  +
    /* HttpBindingGenerator.kt:160 */
  189    245   
    let headers = header_map.get_all("X-Range-Integer-Set");
         246  +
    /* HttpBindingGenerator.kt:404 */
  190    247   
    let var_10 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
         248  +
    /* HttpBindingGenerator.kt:456 */
  191    249   
    Ok(if !var_10.is_empty() {
  192    250   
        Some(crate::unconstrained::set_of_range_integer_unconstrained::SetOfRangeIntegerUnconstrained(var_10))
  193    251   
    } else {
  194    252   
        None
  195    253   
    })
         254  +
    /* HttpBindingGenerator.kt:153 */
  196    255   
}
  197    256   
         257  +
/* HttpBindingGenerator.kt:153 */
  198    258   
pub(crate) fn de_range_long_header_header(
  199    259   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  200    260   
) -> ::std::result::Result<::std::option::Option<i64>, ::aws_smithy_http::header::ParseError> {
         261  +
    /* HttpBindingGenerator.kt:160 */
  201    262   
    let headers = header_map.get_all("X-Range-Long");
         263  +
    /* HttpBindingGenerator.kt:404 */
  202    264   
    let var_11 = ::aws_smithy_http::header::read_many_primitive::<i64>(headers)?;
         265  +
    /* HttpBindingGenerator.kt:468 */
  203    266   
    if var_11.len() > 1 {
  204    267   
        Err(::aws_smithy_http::header::ParseError::new(format!(
  205    268   
            "expected one item but found {}",
  206    269   
            var_11.len()
  207    270   
        )))
  208    271   
    } else {
  209    272   
        let mut var_11 = var_11;
  210    273   
        Ok(var_11.pop())
  211    274   
    }
         275  +
    /* HttpBindingGenerator.kt:153 */
  212    276   
}
  213    277   
         278  +
/* HttpBindingGenerator.kt:153 */
  214    279   
pub(crate) fn de_range_long_list_header_header(
  215    280   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  216    281   
) -> ::std::result::Result<
  217    282   
    ::std::option::Option<
  218    283   
        crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained,
  219    284   
    >,
  220    285   
    ::aws_smithy_http::header::ParseError,
  221    286   
> {
         287  +
    /* HttpBindingGenerator.kt:160 */
  222    288   
    let headers = header_map.get_all("X-Range-Long-List");
         289  +
    /* HttpBindingGenerator.kt:404 */
  223    290   
    let var_12 = ::aws_smithy_http::header::read_many_primitive::<i64>(headers)?;
         291  +
    /* HttpBindingGenerator.kt:456 */
  224    292   
    Ok(if !var_12.is_empty() {
  225    293   
        Some(
  226    294   
            crate::unconstrained::list_of_range_long_unconstrained::ListOfRangeLongUnconstrained(
  227    295   
                var_12,
  228    296   
            ),
  229    297   
        )
  230    298   
    } else {
  231    299   
        None
  232    300   
    })
         301  +
    /* HttpBindingGenerator.kt:153 */
  233    302   
}
  234    303   
         304  +
/* HttpBindingGenerator.kt:153 */
  235    305   
pub(crate) fn de_range_long_set_header_header(
  236    306   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  237    307   
) -> ::std::result::Result<
  238    308   
    ::std::option::Option<
  239    309   
        crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained,
  240    310   
    >,
  241    311   
    ::aws_smithy_http::header::ParseError,
  242    312   
> {
         313  +
    /* HttpBindingGenerator.kt:160 */
  243    314   
    let headers = header_map.get_all("X-Range-Long-Set");
         315  +
    /* HttpBindingGenerator.kt:404 */
  244    316   
    let var_13 = ::aws_smithy_http::header::read_many_primitive::<i64>(headers)?;
         317  +
    /* HttpBindingGenerator.kt:456 */
  245    318   
    Ok(if !var_13.is_empty() {
  246    319   
        Some(
  247    320   
            crate::unconstrained::set_of_range_long_unconstrained::SetOfRangeLongUnconstrained(
  248    321   
                var_13,
  249    322   
            ),
  250    323   
        )
  251    324   
    } else {
  252    325   
        None
  253    326   
    })
         327  +
    /* HttpBindingGenerator.kt:153 */
  254    328   
}
  255    329   
         330  +
/* HttpBindingGenerator.kt:153 */
  256    331   
pub(crate) fn de_range_short_header_header(
  257    332   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  258    333   
) -> ::std::result::Result<::std::option::Option<i16>, ::aws_smithy_http::header::ParseError> {
         334  +
    /* HttpBindingGenerator.kt:160 */
  259    335   
    let headers = header_map.get_all("X-Range-Short");
         336  +
    /* HttpBindingGenerator.kt:404 */
  260    337   
    let var_14 = ::aws_smithy_http::header::read_many_primitive::<i16>(headers)?;
         338  +
    /* HttpBindingGenerator.kt:468 */
  261    339   
    if var_14.len() > 1 {
  262    340   
        Err(::aws_smithy_http::header::ParseError::new(format!(
  263    341   
            "expected one item but found {}",
  264    342   
            var_14.len()
  265    343   
        )))
  266    344   
    } else {
  267    345   
        let mut var_14 = var_14;
  268    346   
        Ok(var_14.pop())
  269    347   
    }
         348  +
    /* HttpBindingGenerator.kt:153 */
  270    349   
}
  271    350   
         351  +
/* HttpBindingGenerator.kt:153 */
  272    352   
pub(crate) fn de_range_short_list_header_header(
  273    353   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  274    354   
) -> ::std::result::Result<
  275    355   
    ::std::option::Option<
  276    356   
        crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained,
  277    357   
    >,
  278    358   
    ::aws_smithy_http::header::ParseError,
  279    359   
> {
         360  +
    /* HttpBindingGenerator.kt:160 */
  280    361   
    let headers = header_map.get_all("X-Range-Short-List");
         362  +
    /* HttpBindingGenerator.kt:404 */
  281    363   
    let var_15 = ::aws_smithy_http::header::read_many_primitive::<i16>(headers)?;
         364  +
    /* HttpBindingGenerator.kt:456 */
  282    365   
    Ok(if !var_15.is_empty() {
  283    366   
        Some(
  284    367   
            crate::unconstrained::list_of_range_short_unconstrained::ListOfRangeShortUnconstrained(
  285    368   
                var_15,
  286    369   
            ),
  287    370   
        )
  288    371   
    } else {
  289    372   
        None
  290    373   
    })
         374  +
    /* HttpBindingGenerator.kt:153 */
  291    375   
}
  292    376   
         377  +
/* HttpBindingGenerator.kt:153 */
  293    378   
pub(crate) fn de_range_short_set_header_header(
  294    379   
    header_map: &::aws_smithy_runtime_api::http::Headers,
  295    380   
) -> ::std::result::Result<
  296    381   
    ::std::option::Option<
  297    382   
        crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained,
  298    383   
    >,
  299    384   
    ::aws_smithy_http::header::ParseError,
  300    385   
> {
         386  +
    /* HttpBindingGenerator.kt:160 */
  301    387   
    let headers = header_map.get_all("X-Range-Short-Set");
         388  +
    /* HttpBindingGenerator.kt:404 */
  302    389   
    let var_16 = ::aws_smithy_http::header::read_many_primitive::<i16>(headers)?;
         390  +
    /* HttpBindingGenerator.kt:456 */
  303    391   
    Ok(if !var_16.is_empty() {
  304    392   
        Some(
  305    393   
            crate::unconstrained::set_of_range_short_unconstrained::SetOfRangeShortUnconstrained(
  306    394   
                var_16,
  307    395   
            ),
  308    396   
        )
  309    397   
    } else {
  310    398   
        None
  311    399   
    })
         400  +
    /* HttpBindingGenerator.kt:153 */
  312    401   
}
  313    402   
         403  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  314    404   
pub fn de_range_integer_label(
  315    405   
    value: &str,
  316    406   
) -> std::result::Result<
  317    407   
    i32,
  318    408   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  319    409   
> {
         410  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  320    411   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         412  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  321    413   
    Ok(value)
         414  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  322    415   
}
  323    416   
         417  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  324    418   
pub fn de_range_short_label(
  325    419   
    value: &str,
  326    420   
) -> std::result::Result<
  327    421   
    i16,
  328    422   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  329    423   
> {
         424  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  330    425   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         426  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  331    427   
    Ok(value)
         428  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  332    429   
}
  333    430   
         431  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  334    432   
pub fn de_range_long_label(
  335    433   
    value: &str,
  336    434   
) -> std::result::Result<
  337    435   
    i64,
  338    436   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  339    437   
> {
         438  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  340    439   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         440  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  341    441   
    Ok(value)
         442  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  342    443   
}
  343    444   
         445  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  344    446   
pub fn de_range_byte_label(
  345    447   
    value: &str,
  346    448   
) -> std::result::Result<
  347    449   
    i8,
  348    450   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  349    451   
> {
         452  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  350    453   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         454  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  351    455   
    Ok(value)
         456  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  352    457   
}
  353    458   
         459  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  354    460   
pub fn de_length_string_label(
  355    461   
    value: &str,
  356    462   
) -> std::result::Result<
  357    463   
    ::std::string::String,
  358    464   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  359    465   
> {
         466  +
    /* ServerHttpBoundProtocolGenerator.kt:1302 */
  360    467   
    let value = ::percent_encoding::percent_decode_str(value)
  361    468   
        .decode_utf8()?
  362    469   
        .into_owned();
         470  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  363    471   
    Ok(value)
         472  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  364    473   
}
  365    474   
         475  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  366    476   
pub fn de_enum_string_label(
  367    477   
    value: &str,
  368    478   
) -> std::result::Result<
  369    479   
    ::std::string::String,
  370    480   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  371    481   
> {
         482  +
    /* ServerHttpBoundProtocolGenerator.kt:1302 */
  372    483   
    let value = ::percent_encoding::percent_decode_str(value)
  373    484   
        .decode_utf8()?
  374    485   
        .into_owned();
         486  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  375    487   
    Ok(value)
         488  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  376    489   
}
  377    490   
         491  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  378    492   
pub fn de_enum_string_query(
  379    493   
    value: &str,
  380    494   
) -> std::result::Result<
  381    495   
    ::std::option::Option<::std::string::String>,
  382    496   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  383    497   
> {
         498  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
  384    499   
    let value = value.to_owned();
         500  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  385    501   
    Ok(Some(value))
         502  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  386    503   
}
  387    504   
         505  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  388    506   
pub fn de_length_string_query(
  389    507   
    value: &str,
  390    508   
) -> std::result::Result<
  391    509   
    ::std::option::Option<::std::string::String>,
  392    510   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  393    511   
> {
         512  +
    /* ServerHttpBoundProtocolGenerator.kt:1309 */
  394    513   
    let value = value.to_owned();
         514  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  395    515   
    Ok(Some(value))
         516  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  396    517   
}
  397    518   
         519  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  398    520   
pub fn de_range_byte_query(
  399    521   
    value: &str,
  400    522   
) -> std::result::Result<
  401    523   
    i8,
  402    524   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  403    525   
> {
         526  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  404    527   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         528  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  405    529   
    Ok(value)
         530  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  406    531   
}
  407    532   
         533  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  408    534   
pub fn de_range_integer_query(
  409    535   
    value: &str,
  410    536   
) -> std::result::Result<
  411    537   
    i32,
  412    538   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  413    539   
> {
         540  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  414    541   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         542  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  415    543   
    Ok(value)
         544  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  416    545   
}
  417    546   
         547  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  418    548   
pub fn de_range_long_query(
  419    549   
    value: &str,
  420    550   
) -> std::result::Result<
  421    551   
    i64,
  422    552   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  423    553   
> {
         554  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  424    555   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         556  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  425    557   
    Ok(value)
         558  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  426    559   
}
  427    560   
         561  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
  428    562   
pub fn de_range_short_query(
  429    563   
    value: &str,
  430    564   
) -> std::result::Result<
  431    565   
    i16,
  432    566   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
  433    567   
> {
         568  +
    /* ServerHttpBoundProtocolGenerator.kt:1347 */
  434    569   
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
         570  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
  435    571   
    Ok(value)
         572  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
  436    573   
}
  437    574   
         575  +
/* HttpBindingGenerator.kt:173 */
  438    576   
pub fn de_length_string_header_map_inner<'a>(
  439    577   
    headers: impl ::std::iter::Iterator<Item = &'a str>,
  440    578   
) -> std::result::Result<Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
         579  +
    /* HttpBindingGenerator.kt:375 */
  441    580   
    ::aws_smithy_http::header::one_or_none(headers)
         581  +
    /* HttpBindingGenerator.kt:173 */
  442    582   
}

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

@@ -1,1 +213,365 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_constrained_http_bound_shapes_operation_output_output_output(
    3      4   
    value: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_constrained_http_bound_shapes_operation_output::ser_constrained_http_bound_shapes_operation_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_constrained_http_bound_shapes_operation_output_output(
   13     19   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    input: &crate::output::ConstrainedHttpBoundShapesOperationOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* SerializerUtil.kt:42 */
   16     23   
    {
          24  +
        /* JsonSerializerGenerator.kt:423 */
   17     25   
        object
   18     26   
            .key("enumStringLabel")
   19     27   
            .string(input.enum_string_label.as_str());
          28  +
        /* SerializerUtil.kt:42 */
   20     29   
    }
          30  +
    /* JsonSerializerGenerator.kt:382 */
   21     31   
    if let Some(var_1) = &input.enum_string_list_query {
          32  +
        /* JsonSerializerGenerator.kt:484 */
   22     33   
        let mut array_2 = object.key("enumStringListQuery").start_array();
          34  +
        /* JsonSerializerGenerator.kt:524 */
   23     35   
        for item_3 in var_1 {
          36  +
            /* SerializerUtil.kt:42 */
   24     37   
            {
          38  +
                /* JsonSerializerGenerator.kt:423 */
   25     39   
                array_2.value().string(item_3.as_str());
          40  +
                /* SerializerUtil.kt:42 */
   26     41   
            }
          42  +
            /* JsonSerializerGenerator.kt:524 */
   27     43   
        }
          44  +
        /* JsonSerializerGenerator.kt:486 */
   28     45   
        array_2.finish();
          46  +
        /* JsonSerializerGenerator.kt:382 */
   29     47   
    }
          48  +
    /* JsonSerializerGenerator.kt:382 */
   30     49   
    if let Some(var_4) = &input.enum_string_query {
          50  +
        /* JsonSerializerGenerator.kt:423 */
   31     51   
        object.key("enumStringQuery").string(var_4.as_str());
          52  +
        /* JsonSerializerGenerator.kt:382 */
   32     53   
    }
          54  +
    /* JsonSerializerGenerator.kt:382 */
   33     55   
    if let Some(var_5) = &input.length_list_pattern_string_query {
          56  +
        /* JsonSerializerGenerator.kt:484 */
   34     57   
        let mut array_6 = object.key("lengthListPatternStringQuery").start_array();
          58  +
        /* JsonSerializerGenerator.kt:524 */
   35     59   
        for item_7 in var_5 {
          60  +
            /* SerializerUtil.kt:42 */
   36     61   
            {
          62  +
                /* JsonSerializerGenerator.kt:423 */
   37     63   
                array_6.value().string(item_7.as_str());
          64  +
                /* SerializerUtil.kt:42 */
   38     65   
            }
          66  +
            /* JsonSerializerGenerator.kt:524 */
   39     67   
        }
          68  +
        /* JsonSerializerGenerator.kt:486 */
   40     69   
        array_6.finish();
          70  +
        /* JsonSerializerGenerator.kt:382 */
   41     71   
    }
          72  +
    /* SerializerUtil.kt:42 */
   42     73   
    {
          74  +
        /* JsonSerializerGenerator.kt:423 */
   43     75   
        object
   44     76   
            .key("lengthStringLabel")
   45     77   
            .string(input.length_string_label.as_str());
          78  +
        /* SerializerUtil.kt:42 */
   46     79   
    }
          80  +
    /* JsonSerializerGenerator.kt:382 */
   47     81   
    if let Some(var_8) = &input.length_string_list_query {
          82  +
        /* JsonSerializerGenerator.kt:484 */
   48     83   
        let mut array_9 = object.key("lengthStringListQuery").start_array();
          84  +
        /* JsonSerializerGenerator.kt:524 */
   49     85   
        for item_10 in var_8 {
          86  +
            /* SerializerUtil.kt:42 */
   50     87   
            {
          88  +
                /* JsonSerializerGenerator.kt:423 */
   51     89   
                array_9.value().string(item_10.as_str());
          90  +
                /* SerializerUtil.kt:42 */
   52     91   
            }
          92  +
            /* JsonSerializerGenerator.kt:524 */
   53     93   
        }
          94  +
        /* JsonSerializerGenerator.kt:486 */
   54     95   
        array_9.finish();
          96  +
        /* JsonSerializerGenerator.kt:382 */
   55     97   
    }
          98  +
    /* JsonSerializerGenerator.kt:382 */
   56     99   
    if let Some(var_11) = &input.length_string_query {
         100  +
        /* JsonSerializerGenerator.kt:423 */
   57    101   
        object.key("lengthStringQuery").string(var_11.as_str());
         102  +
        /* JsonSerializerGenerator.kt:382 */
   58    103   
    }
         104  +
    /* JsonSerializerGenerator.kt:382 */
   59    105   
    if let Some(var_12) = &input.length_string_set_query {
         106  +
        /* JsonSerializerGenerator.kt:484 */
   60    107   
        let mut array_13 = object.key("lengthStringSetQuery").start_array();
         108  +
        /* JsonSerializerGenerator.kt:524 */
   61    109   
        for item_14 in var_12 {
         110  +
            /* SerializerUtil.kt:42 */
   62    111   
            {
         112  +
                /* JsonSerializerGenerator.kt:423 */
   63    113   
                array_13.value().string(item_14.as_str());
         114  +
                /* SerializerUtil.kt:42 */
   64    115   
            }
         116  +
            /* JsonSerializerGenerator.kt:524 */
   65    117   
        }
         118  +
        /* JsonSerializerGenerator.kt:486 */
   66    119   
        array_13.finish();
         120  +
        /* JsonSerializerGenerator.kt:382 */
   67    121   
    }
         122  +
    /* SerializerUtil.kt:42 */
   68    123   
    {
         124  +
        /* JsonSerializerGenerator.kt:432 */
   69    125   
        object.key("rangeByteLabel").number(
   70    126   
            #[allow(clippy::useless_conversion)]
   71    127   
            ::aws_smithy_types::Number::NegInt((input.range_byte_label).into()),
   72    128   
        );
         129  +
        /* SerializerUtil.kt:42 */
   73    130   
    }
         131  +
    /* JsonSerializerGenerator.kt:382 */
   74    132   
    if let Some(var_15) = &input.range_byte_list_query {
         133  +
        /* JsonSerializerGenerator.kt:484 */
   75    134   
        let mut array_16 = object.key("rangeByteListQuery").start_array();
         135  +
        /* JsonSerializerGenerator.kt:524 */
   76    136   
        for item_17 in var_15 {
         137  +
            /* SerializerUtil.kt:42 */
   77    138   
            {
         139  +
                /* JsonSerializerGenerator.kt:432 */
   78    140   
                array_16.value().number(
   79    141   
                    #[allow(clippy::useless_conversion)]
   80    142   
                    ::aws_smithy_types::Number::NegInt((*item_17).into()),
   81    143   
                );
         144  +
                /* SerializerUtil.kt:42 */
   82    145   
            }
         146  +
            /* JsonSerializerGenerator.kt:524 */
   83    147   
        }
         148  +
        /* JsonSerializerGenerator.kt:486 */
   84    149   
        array_16.finish();
         150  +
        /* JsonSerializerGenerator.kt:382 */
   85    151   
    }
         152  +
    /* SerializerUtil.kt:46 */
   86    153   
    if input.range_byte_query != 0 {
         154  +
        /* JsonSerializerGenerator.kt:432 */
   87    155   
        object.key("rangeByteQuery").number(
   88    156   
            #[allow(clippy::useless_conversion)]
   89    157   
            ::aws_smithy_types::Number::NegInt((input.range_byte_query).into()),
   90    158   
        );
         159  +
        /* SerializerUtil.kt:46 */
   91    160   
    }
         161  +
    /* JsonSerializerGenerator.kt:382 */
   92    162   
    if let Some(var_18) = &input.range_byte_set_query {
         163  +
        /* JsonSerializerGenerator.kt:484 */
   93    164   
        let mut array_19 = object.key("rangeByteSetQuery").start_array();
         165  +
        /* JsonSerializerGenerator.kt:524 */
   94    166   
        for item_20 in var_18 {
         167  +
            /* SerializerUtil.kt:42 */
   95    168   
            {
         169  +
                /* JsonSerializerGenerator.kt:432 */
   96    170   
                array_19.value().number(
   97    171   
                    #[allow(clippy::useless_conversion)]
   98    172   
                    ::aws_smithy_types::Number::NegInt((*item_20).into()),
   99    173   
                );
         174  +
                /* SerializerUtil.kt:42 */
  100    175   
            }
         176  +
            /* JsonSerializerGenerator.kt:524 */
  101    177   
        }
         178  +
        /* JsonSerializerGenerator.kt:486 */
  102    179   
        array_19.finish();
         180  +
        /* JsonSerializerGenerator.kt:382 */
  103    181   
    }
         182  +
    /* SerializerUtil.kt:42 */
  104    183   
    {
         184  +
        /* JsonSerializerGenerator.kt:432 */
  105    185   
        object.key("rangeIntegerLabel").number(
  106    186   
            #[allow(clippy::useless_conversion)]
  107    187   
            ::aws_smithy_types::Number::NegInt((input.range_integer_label).into()),
  108    188   
        );
         189  +
        /* SerializerUtil.kt:42 */
  109    190   
    }
         191  +
    /* JsonSerializerGenerator.kt:382 */
  110    192   
    if let Some(var_21) = &input.range_integer_list_query {
         193  +
        /* JsonSerializerGenerator.kt:484 */
  111    194   
        let mut array_22 = object.key("rangeIntegerListQuery").start_array();
         195  +
        /* JsonSerializerGenerator.kt:524 */
  112    196   
        for item_23 in var_21 {
         197  +
            /* SerializerUtil.kt:42 */
  113    198   
            {
         199  +
                /* JsonSerializerGenerator.kt:432 */
  114    200   
                array_22.value().number(
  115    201   
                    #[allow(clippy::useless_conversion)]
  116    202   
                    ::aws_smithy_types::Number::NegInt((*item_23).into()),
  117    203   
                );
         204  +
                /* SerializerUtil.kt:42 */
  118    205   
            }
         206  +
            /* JsonSerializerGenerator.kt:524 */
  119    207   
        }
         208  +
        /* JsonSerializerGenerator.kt:486 */
  120    209   
        array_22.finish();
         210  +
        /* JsonSerializerGenerator.kt:382 */
  121    211   
    }
         212  +
    /* SerializerUtil.kt:46 */
  122    213   
    if input.range_integer_query != 0 {
         214  +
        /* JsonSerializerGenerator.kt:432 */
  123    215   
        object.key("rangeIntegerQuery").number(
  124    216   
            #[allow(clippy::useless_conversion)]
  125    217   
            ::aws_smithy_types::Number::NegInt((input.range_integer_query).into()),
  126    218   
        );
         219  +
        /* SerializerUtil.kt:46 */
  127    220   
    }
         221  +
    /* JsonSerializerGenerator.kt:382 */
  128    222   
    if let Some(var_24) = &input.range_integer_set_query {
         223  +
        /* JsonSerializerGenerator.kt:484 */
  129    224   
        let mut array_25 = object.key("rangeIntegerSetQuery").start_array();
         225  +
        /* JsonSerializerGenerator.kt:524 */
  130    226   
        for item_26 in var_24 {
         227  +
            /* SerializerUtil.kt:42 */
  131    228   
            {
         229  +
                /* JsonSerializerGenerator.kt:432 */
  132    230   
                array_25.value().number(
  133    231   
                    #[allow(clippy::useless_conversion)]
  134    232   
                    ::aws_smithy_types::Number::NegInt((*item_26).into()),
  135    233   
                );
         234  +
                /* SerializerUtil.kt:42 */
  136    235   
            }
         236  +
            /* JsonSerializerGenerator.kt:524 */
  137    237   
        }
         238  +
        /* JsonSerializerGenerator.kt:486 */
  138    239   
        array_25.finish();
         240  +
        /* JsonSerializerGenerator.kt:382 */
  139    241   
    }
         242  +
    /* SerializerUtil.kt:42 */
  140    243   
    {
         244  +
        /* JsonSerializerGenerator.kt:432 */
  141    245   
        object.key("rangeLongLabel").number(
  142    246   
            #[allow(clippy::useless_conversion)]
  143    247   
            ::aws_smithy_types::Number::NegInt((input.range_long_label).into()),
  144    248   
        );
         249  +
        /* SerializerUtil.kt:42 */
  145    250   
    }
         251  +
    /* JsonSerializerGenerator.kt:382 */
  146    252   
    if let Some(var_27) = &input.range_long_list_query {
         253  +
        /* JsonSerializerGenerator.kt:484 */
  147    254   
        let mut array_28 = object.key("rangeLongListQuery").start_array();
         255  +
        /* JsonSerializerGenerator.kt:524 */
  148    256   
        for item_29 in var_27 {
         257  +
            /* SerializerUtil.kt:42 */
  149    258   
            {
         259  +
                /* JsonSerializerGenerator.kt:432 */
  150    260   
                array_28.value().number(
  151    261   
                    #[allow(clippy::useless_conversion)]
  152    262   
                    ::aws_smithy_types::Number::NegInt((*item_29).into()),
  153    263   
                );
         264  +
                /* SerializerUtil.kt:42 */
  154    265   
            }
         266  +
            /* JsonSerializerGenerator.kt:524 */
  155    267   
        }
         268  +
        /* JsonSerializerGenerator.kt:486 */
  156    269   
        array_28.finish();
         270  +
        /* JsonSerializerGenerator.kt:382 */
  157    271   
    }
         272  +
    /* SerializerUtil.kt:46 */
  158    273   
    if input.range_long_query != 0 {
         274  +
        /* JsonSerializerGenerator.kt:432 */
  159    275   
        object.key("rangeLongQuery").number(
  160    276   
            #[allow(clippy::useless_conversion)]
  161    277   
            ::aws_smithy_types::Number::NegInt((input.range_long_query).into()),
  162    278   
        );
         279  +
        /* SerializerUtil.kt:46 */
  163    280   
    }
         281  +
    /* JsonSerializerGenerator.kt:382 */
  164    282   
    if let Some(var_30) = &input.range_long_set_query {
         283  +
        /* JsonSerializerGenerator.kt:484 */
  165    284   
        let mut array_31 = object.key("rangeLongSetQuery").start_array();
         285  +
        /* JsonSerializerGenerator.kt:524 */
  166    286   
        for item_32 in var_30 {
         287  +
            /* SerializerUtil.kt:42 */
  167    288   
            {
         289  +
                /* JsonSerializerGenerator.kt:432 */
  168    290   
                array_31.value().number(
  169    291   
                    #[allow(clippy::useless_conversion)]
  170    292   
                    ::aws_smithy_types::Number::NegInt((*item_32).into()),
  171    293   
                );
         294  +
                /* SerializerUtil.kt:42 */
  172    295   
            }
         296  +
            /* JsonSerializerGenerator.kt:524 */
  173    297   
        }
         298  +
        /* JsonSerializerGenerator.kt:486 */
  174    299   
        array_31.finish();
         300  +
        /* JsonSerializerGenerator.kt:382 */
  175    301   
    }
         302  +
    /* SerializerUtil.kt:42 */
  176    303   
    {
         304  +
        /* JsonSerializerGenerator.kt:432 */
  177    305   
        object.key("rangeShortLabel").number(
  178    306   
            #[allow(clippy::useless_conversion)]
  179    307   
            ::aws_smithy_types::Number::NegInt((input.range_short_label).into()),
  180    308   
        );
         309  +
        /* SerializerUtil.kt:42 */
  181    310   
    }
         311  +
    /* JsonSerializerGenerator.kt:382 */
  182    312   
    if let Some(var_33) = &input.range_short_list_query {
         313  +
        /* JsonSerializerGenerator.kt:484 */
  183    314   
        let mut array_34 = object.key("rangeShortListQuery").start_array();
         315  +
        /* JsonSerializerGenerator.kt:524 */
  184    316   
        for item_35 in var_33 {
         317  +
            /* SerializerUtil.kt:42 */
  185    318   
            {
         319  +
                /* JsonSerializerGenerator.kt:432 */
  186    320   
                array_34.value().number(
  187    321   
                    #[allow(clippy::useless_conversion)]
  188    322   
                    ::aws_smithy_types::Number::NegInt((*item_35).into()),
  189    323   
                );
         324  +
                /* SerializerUtil.kt:42 */
  190    325   
            }
         326  +
            /* JsonSerializerGenerator.kt:524 */
  191    327   
        }
         328  +
        /* JsonSerializerGenerator.kt:486 */
  192    329   
        array_34.finish();
         330  +
        /* JsonSerializerGenerator.kt:382 */
  193    331   
    }
         332  +
    /* SerializerUtil.kt:46 */
  194    333   
    if input.range_short_query != 0 {
         334  +
        /* JsonSerializerGenerator.kt:432 */
  195    335   
        object.key("rangeShortQuery").number(
  196    336   
            #[allow(clippy::useless_conversion)]
  197    337   
            ::aws_smithy_types::Number::NegInt((input.range_short_query).into()),
  198    338   
        );
         339  +
        /* SerializerUtil.kt:46 */
  199    340   
    }
         341  +
    /* JsonSerializerGenerator.kt:382 */
  200    342   
    if let Some(var_36) = &input.range_short_set_query {
         343  +
        /* JsonSerializerGenerator.kt:484 */
  201    344   
        let mut array_37 = object.key("rangeShortSetQuery").start_array();
         345  +
        /* JsonSerializerGenerator.kt:524 */
  202    346   
        for item_38 in var_36 {
         347  +
            /* SerializerUtil.kt:42 */
  203    348   
            {
         349  +
                /* JsonSerializerGenerator.kt:432 */
  204    350   
                array_37.value().number(
  205    351   
                    #[allow(clippy::useless_conversion)]
  206    352   
                    ::aws_smithy_types::Number::NegInt((*item_38).into()),
  207    353   
                );
         354  +
                /* SerializerUtil.kt:42 */
  208    355   
            }
         356  +
            /* JsonSerializerGenerator.kt:524 */
  209    357   
        }
         358  +
        /* JsonSerializerGenerator.kt:486 */
  210    359   
        array_37.finish();
         360  +
        /* JsonSerializerGenerator.kt:382 */
  211    361   
    }
         362  +
    /* JsonSerializerGenerator.kt:372 */
  212    363   
    Ok(())
         364  +
    /* JsonSerializerGenerator.kt:358 */
  213    365   
}