Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_request_with_labels_and_timestamp_format.rs

@@ -0,1 +0,223 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_http_request_with_labels_and_timestamp_format_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::HttpRequestWithLabelsAndTimestampFormatInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input =
          23  +
            crate::input::http_request_with_labels_and_timestamp_format_input::Builder::default();
          24  +
        /* RustType.kt:534 */
          25  +
        #[allow(unused_variables)]
          26  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          27  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          28  +
            uri, headers, body, ..
          29  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          30  +
        /* ServerHttpBoundProtocolGenerator.kt:1134 */
          31  +
        let input_string = uri.path();
          32  +
        /* ServerHttpBoundProtocolGenerator.kt:1146 */
          33  +
        let (input_string, (_, m1, m2, m3, m4, m5, m6, m7)) =
          34  +
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
          35  +
                ::nom::sequence::preceded(
          36  +
                    ::nom::bytes::complete::tag("/"),
          37  +
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
          38  +
                        "HttpRequestWithLabelsAndTimestampFormat",
          39  +
                    ),
          40  +
                ),
          41  +
                ::nom::sequence::preceded(
          42  +
                    ::nom::bytes::complete::tag("/"),
          43  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          44  +
                        ::nom::bytes::complete::take_until("/"),
          45  +
                        ::nom::combinator::rest,
          46  +
                    )),
          47  +
                ),
          48  +
                ::nom::sequence::preceded(
          49  +
                    ::nom::bytes::complete::tag("/"),
          50  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          51  +
                        ::nom::bytes::complete::take_until("/"),
          52  +
                        ::nom::combinator::rest,
          53  +
                    )),
          54  +
                ),
          55  +
                ::nom::sequence::preceded(
          56  +
                    ::nom::bytes::complete::tag("/"),
          57  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          58  +
                        ::nom::bytes::complete::take_until("/"),
          59  +
                        ::nom::combinator::rest,
          60  +
                    )),
          61  +
                ),
          62  +
                ::nom::sequence::preceded(
          63  +
                    ::nom::bytes::complete::tag("/"),
          64  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          65  +
                        ::nom::bytes::complete::take_until("/"),
          66  +
                        ::nom::combinator::rest,
          67  +
                    )),
          68  +
                ),
          69  +
                ::nom::sequence::preceded(
          70  +
                    ::nom::bytes::complete::tag("/"),
          71  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          72  +
                        ::nom::bytes::complete::take_until("/"),
          73  +
                        ::nom::combinator::rest,
          74  +
                    )),
          75  +
                ),
          76  +
                ::nom::sequence::preceded(
          77  +
                    ::nom::bytes::complete::tag("/"),
          78  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          79  +
                        ::nom::bytes::complete::take_until("/"),
          80  +
                        ::nom::combinator::rest,
          81  +
                    )),
          82  +
                ),
          83  +
                ::nom::sequence::preceded(
          84  +
                    ::nom::bytes::complete::tag("/"),
          85  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          86  +
                        ::nom::bytes::complete::take_until("/"),
          87  +
                        ::nom::combinator::rest,
          88  +
                    )),
          89  +
                ),
          90  +
            ))(input_string)?;
          91  +
        debug_assert_eq!("", input_string);
          92  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
          93  +
        input = input.set_member_epoch_seconds(
          94  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_epoch_seconds(m1)?
          95  +
                                );
          96  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
          97  +
        input = input.set_member_http_date(
          98  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_http_date(m2)?
          99  +
                                );
         100  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
         101  +
        input = input.set_member_date_time(
         102  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_member_date_time(m3)?
         103  +
                                );
         104  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
         105  +
        input = input.set_default_format(
         106  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_default_format(m4)?
         107  +
                                );
         108  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
         109  +
        input = input.set_target_epoch_seconds(
         110  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_epoch_seconds(m5)?
         111  +
                                );
         112  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
         113  +
        input = input.set_target_http_date(
         114  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_http_date(m6)?
         115  +
                                );
         116  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
         117  +
        input = input.set_target_date_time(
         118  +
                                    crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format_input::de_target_date_time(m7)?
         119  +
                                );
         120  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
         121  +
        input.build()?
         122  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
         123  +
    })
         124  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
         125  +
}
         126  +
         127  +
/* RustType.kt:534 */
         128  +
#[allow(clippy::unnecessary_wraps)]
         129  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
         130  +
pub fn ser_http_request_with_labels_and_timestamp_format_http_response(
         131  +
    #[allow(unused_variables)] output: crate::output::HttpRequestWithLabelsAndTimestampFormatOutput,
         132  +
) -> std::result::Result<
         133  +
    ::aws_smithy_legacy_http_server::response::Response,
         134  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         135  +
> {
         136  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
         137  +
    Ok({
         138  +
        /* RustType.kt:534 */
         139  +
        #[allow(unused_mut)]
         140  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
         141  +
        let mut builder = ::http::Response::builder();
         142  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
         143  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         144  +
            builder,
         145  +
            ::http::header::CONTENT_TYPE,
         146  +
            "application/json",
         147  +
        );
         148  +
        /* ServerHttpBoundProtocolGenerator.kt:718 */
         149  +
        let http_status: u16 = 200;
         150  +
        builder = builder.status(http_status);
         151  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
         152  +
        let payload =
         153  +
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
         154  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
         155  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
         156  +
        let content_length = payload.len();
         157  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         158  +
            builder,
         159  +
            ::http::header::CONTENT_LENGTH,
         160  +
            content_length,
         161  +
        );
         162  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
         163  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
         164  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
         165  +
        builder.body(body)?
         166  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
         167  +
    })
         168  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
         169  +
}
         170  +
         171  +
/* RustType.kt:534 */
         172  +
#[allow(clippy::unnecessary_wraps)]
         173  +
/* ServerHttpBoundProtocolGenerator.kt:471 */
         174  +
pub fn ser_http_request_with_labels_and_timestamp_format_http_error(
         175  +
    error: &crate::error::HttpRequestWithLabelsAndTimestampFormatError,
         176  +
) -> std::result::Result<
         177  +
    ::aws_smithy_legacy_http_server::response::Response,
         178  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         179  +
> {
         180  +
    /* ServerHttpBoundProtocolGenerator.kt:476 */
         181  +
    Ok({
         182  +
        /* ServerHttpBoundProtocolGenerator.kt:492 */
         183  +
        match error {
         184  +
            /* ServerHttpBoundProtocolGenerator.kt:500 */
         185  +
            crate::error::HttpRequestWithLabelsAndTimestampFormatError::ValidationException(
         186  +
                output,
         187  +
            ) => {
         188  +
                /* ServerHttpBoundProtocolGenerator.kt:501 */
         189  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         190  +
                /* RustType.kt:534 */
         191  +
                #[allow(unused_mut)]
         192  +
                /* ServerHttpBoundProtocolGenerator.kt:511 */
         193  +
                let mut builder = ::http::Response::builder();
         194  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         195  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         196  +
                    builder,
         197  +
                    ::http::header::CONTENT_TYPE,
         198  +
                    "application/json",
         199  +
                );
         200  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         201  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         202  +
                    builder,
         203  +
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
         204  +
                    "ValidationException",
         205  +
                );
         206  +
                /* ServerHttpBoundProtocolGenerator.kt:699 */
         207  +
                let content_length = payload.len();
         208  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         209  +
                    builder,
         210  +
                    ::http::header::CONTENT_LENGTH,
         211  +
                    content_length,
         212  +
                );
         213  +
                /* ServerHttpBoundProtocolGenerator.kt:528 */
         214  +
                builder
         215  +
                    .status(400)
         216  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
         217  +
                /* ServerHttpBoundProtocolGenerator.kt:500 */
         218  +
            } /* ServerHttpBoundProtocolGenerator.kt:492 */
         219  +
        }
         220  +
        /* ServerHttpBoundProtocolGenerator.kt:476 */
         221  +
    })
         222  +
    /* ServerHttpBoundProtocolGenerator.kt:471 */
         223  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_request_with_labels_and_timestamp_format_input.rs

@@ -0,1 +0,112 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
           3  +
pub fn de_member_epoch_seconds(
           4  +
    value: &str,
           5  +
) -> std::result::Result<
           6  +
    ::aws_smithy_types::DateTime,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          10  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          11  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          12  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          14  +
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          16  +
}
          17  +
          18  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          19  +
pub fn de_member_http_date(
          20  +
    value: &str,
          21  +
) -> std::result::Result<
          22  +
    ::aws_smithy_types::DateTime,
          23  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          24  +
> {
          25  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          26  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          27  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::HttpDate)?
          28  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          29  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          30  +
    Ok(value)
          31  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          32  +
}
          33  +
          34  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          35  +
pub fn de_member_date_time(
          36  +
    value: &str,
          37  +
) -> std::result::Result<
          38  +
    ::aws_smithy_types::DateTime,
          39  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          40  +
> {
          41  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          42  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          43  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::DateTime)?
          44  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          45  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          46  +
    Ok(value)
          47  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          48  +
}
          49  +
          50  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          51  +
pub fn de_default_format(
          52  +
    value: &str,
          53  +
) -> std::result::Result<
          54  +
    ::aws_smithy_types::DateTime,
          55  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          56  +
> {
          57  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          58  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          59  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::DateTime)?
          60  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          61  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          62  +
    Ok(value)
          63  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          64  +
}
          65  +
          66  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          67  +
pub fn de_target_epoch_seconds(
          68  +
    value: &str,
          69  +
) -> std::result::Result<
          70  +
    ::aws_smithy_types::DateTime,
          71  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          72  +
> {
          73  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          74  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          75  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          76  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          77  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          78  +
    Ok(value)
          79  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          80  +
}
          81  +
          82  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          83  +
pub fn de_target_http_date(
          84  +
    value: &str,
          85  +
) -> std::result::Result<
          86  +
    ::aws_smithy_types::DateTime,
          87  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          88  +
> {
          89  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
          90  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
          91  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::HttpDate)?
          92  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
          93  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          94  +
    Ok(value)
          95  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          96  +
}
          97  +
          98  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          99  +
pub fn de_target_date_time(
         100  +
    value: &str,
         101  +
) -> std::result::Result<
         102  +
    ::aws_smithy_types::DateTime,
         103  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
         104  +
> {
         105  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
         106  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
         107  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::DateTime)?
         108  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
         109  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
         110  +
    Ok(value)
         111  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
         112  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_request_with_labels_input.rs

@@ -0,1 +0,116 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
           3  +
pub fn de_string(
           4  +
    value: &str,
           5  +
) -> std::result::Result<
           6  +
    ::std::string::String,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1463 */
          10  +
    let value = ::percent_encoding::percent_decode_str(value)
          11  +
        .decode_utf8()?
          12  +
        .into_owned();
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          14  +
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          16  +
}
          17  +
          18  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          19  +
pub fn de_short(
          20  +
    value: &str,
          21  +
) -> std::result::Result<
          22  +
    i16,
          23  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          24  +
> {
          25  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          26  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          27  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          28  +
    Ok(value)
          29  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          30  +
}
          31  +
          32  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          33  +
pub fn de_integer(
          34  +
    value: &str,
          35  +
) -> std::result::Result<
          36  +
    i32,
          37  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          38  +
> {
          39  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          40  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          41  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          42  +
    Ok(value)
          43  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          44  +
}
          45  +
          46  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          47  +
pub fn de_long(
          48  +
    value: &str,
          49  +
) -> std::result::Result<
          50  +
    i64,
          51  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          52  +
> {
          53  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          54  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          55  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          56  +
    Ok(value)
          57  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          58  +
}
          59  +
          60  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          61  +
pub fn de_float(
          62  +
    value: &str,
          63  +
) -> std::result::Result<
          64  +
    f32,
          65  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          66  +
> {
          67  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          68  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          69  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          70  +
    Ok(value)
          71  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          72  +
}
          73  +
          74  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          75  +
pub fn de_double(
          76  +
    value: &str,
          77  +
) -> std::result::Result<
          78  +
    f64,
          79  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          80  +
> {
          81  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          82  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          83  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          84  +
    Ok(value)
          85  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          86  +
}
          87  +
          88  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
          89  +
pub fn de_boolean(
          90  +
    value: &str,
          91  +
) -> std::result::Result<
          92  +
    bool,
          93  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          94  +
> {
          95  +
    /* ServerHttpBoundProtocolGenerator.kt:1515 */
          96  +
    let value = <_ as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(value)?;
          97  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          98  +
    Ok(value)
          99  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
         100  +
}
         101  +
         102  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
         103  +
pub fn de_timestamp(
         104  +
    value: &str,
         105  +
) -> std::result::Result<
         106  +
    ::aws_smithy_types::DateTime,
         107  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
         108  +
> {
         109  +
    /* ServerHttpBoundProtocolGenerator.kt:1486 */
         110  +
    let value = ::percent_encoding::percent_decode_str(value).decode_utf8()?;
         111  +
    let value = ::aws_smithy_types::DateTime::from_str(value.as_ref(), ::aws_smithy_types::date_time::Format::DateTime)?
         112  +
    /* ServerHttpBoundProtocolGenerator.kt:1510 */;
         113  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
         114  +
    Ok(value)
         115  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
         116  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_request_with_regex_literal.rs

@@ -0,1 +0,156 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_http_request_with_regex_literal_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::HttpRequestWithRegexLiteralInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input = crate::input::http_request_with_regex_literal_input::Builder::default();
          23  +
        /* RustType.kt:534 */
          24  +
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          26  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          27  +
            uri, headers, body, ..
          28  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:1134 */
          30  +
        let input_string = uri.path();
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:1146 */
          32  +
        let (input_string, (_, m1, _)) =
          33  +
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
          34  +
                ::nom::sequence::preceded(
          35  +
                    ::nom::bytes::complete::tag("/"),
          36  +
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("ReDosLiteral"),
          37  +
                ),
          38  +
                ::nom::sequence::preceded(
          39  +
                    ::nom::bytes::complete::tag("/"),
          40  +
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
          41  +
                        ::nom::bytes::complete::take_until("/"),
          42  +
                        ::nom::combinator::rest,
          43  +
                    )),
          44  +
                ),
          45  +
                ::nom::sequence::preceded(
          46  +
                    ::nom::bytes::complete::tag("/"),
          47  +
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>("(a+)+"),
          48  +
                ),
          49  +
            ))(input_string)?;
          50  +
        debug_assert_eq!("", input_string);
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:1157 */
          52  +
        input = input.set_str(
          53  +
            crate::protocol_serde::shape_http_request_with_regex_literal_input::de_str(m1)?,
          54  +
        );
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
          56  +
        input.build()?
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
          58  +
    })
          59  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
          60  +
}
          61  +
          62  +
/* RustType.kt:534 */
          63  +
#[allow(clippy::unnecessary_wraps)]
          64  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
          65  +
pub fn ser_http_request_with_regex_literal_http_response(
          66  +
    #[allow(unused_variables)] output: crate::output::HttpRequestWithRegexLiteralOutput,
          67  +
) -> std::result::Result<
          68  +
    ::aws_smithy_legacy_http_server::response::Response,
          69  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          70  +
> {
          71  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
          72  +
    Ok({
          73  +
        /* RustType.kt:534 */
          74  +
        #[allow(unused_mut)]
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
          76  +
        let mut builder = ::http::Response::builder();
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
          78  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          79  +
            builder,
          80  +
            ::http::header::CONTENT_TYPE,
          81  +
            "application/json",
          82  +
        );
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:718 */
          84  +
        let http_status: u16 = 200;
          85  +
        builder = builder.status(http_status);
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
          87  +
        let payload =
          88  +
            /* HttpBoundProtocolPayloadGenerator.kt:233 */""
          89  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
          90  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
          91  +
        let content_length = payload.len();
          92  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          93  +
            builder,
          94  +
            ::http::header::CONTENT_LENGTH,
          95  +
            content_length,
          96  +
        );
          97  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
          98  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          99  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
         100  +
        builder.body(body)?
         101  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
         102  +
    })
         103  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
         104  +
}
         105  +
         106  +
/* RustType.kt:534 */
         107  +
#[allow(clippy::unnecessary_wraps)]
         108  +
/* ServerHttpBoundProtocolGenerator.kt:471 */
         109  +
pub fn ser_http_request_with_regex_literal_http_error(
         110  +
    error: &crate::error::HttpRequestWithRegexLiteralError,
         111  +
) -> std::result::Result<
         112  +
    ::aws_smithy_legacy_http_server::response::Response,
         113  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         114  +
> {
         115  +
    /* ServerHttpBoundProtocolGenerator.kt:476 */
         116  +
    Ok({
         117  +
        /* ServerHttpBoundProtocolGenerator.kt:492 */
         118  +
        match error {
         119  +
            /* ServerHttpBoundProtocolGenerator.kt:500 */
         120  +
            crate::error::HttpRequestWithRegexLiteralError::ValidationException(output) => {
         121  +
                /* ServerHttpBoundProtocolGenerator.kt:501 */
         122  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         123  +
                /* RustType.kt:534 */
         124  +
                #[allow(unused_mut)]
         125  +
                /* ServerHttpBoundProtocolGenerator.kt:511 */
         126  +
                let mut builder = ::http::Response::builder();
         127  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         128  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         129  +
                    builder,
         130  +
                    ::http::header::CONTENT_TYPE,
         131  +
                    "application/json",
         132  +
                );
         133  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         134  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         135  +
                    builder,
         136  +
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
         137  +
                    "ValidationException",
         138  +
                );
         139  +
                /* ServerHttpBoundProtocolGenerator.kt:699 */
         140  +
                let content_length = payload.len();
         141  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         142  +
                    builder,
         143  +
                    ::http::header::CONTENT_LENGTH,
         144  +
                    content_length,
         145  +
                );
         146  +
                /* ServerHttpBoundProtocolGenerator.kt:528 */
         147  +
                builder
         148  +
                    .status(400)
         149  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
         150  +
                /* ServerHttpBoundProtocolGenerator.kt:500 */
         151  +
            } /* ServerHttpBoundProtocolGenerator.kt:492 */
         152  +
        }
         153  +
        /* ServerHttpBoundProtocolGenerator.kt:476 */
         154  +
    })
         155  +
    /* ServerHttpBoundProtocolGenerator.kt:471 */
         156  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_request_with_regex_literal_input.rs

@@ -0,1 +0,16 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1453 */
           3  +
pub fn de_str(
           4  +
    value: &str,
           5  +
) -> std::result::Result<
           6  +
    ::std::string::String,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1463 */
          10  +
    let value = ::percent_encoding::percent_decode_str(value)
          11  +
        .decode_utf8()?
          12  +
        .into_owned();
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1525 */
          14  +
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1453 */
          16  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_response_code.rs

@@ -0,1 +0,86 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_http_response_code_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::HttpResponseCodeInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input = crate::input::http_response_code_input::Builder::default();
          23  +
        /* RustType.kt:534 */
          24  +
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          26  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          27  +
            uri, headers, body, ..
          28  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:873 */
          30  +
        ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          31  +
            &headers, None,
          32  +
        )?;
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
          34  +
        input.build()
          35  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
          36  +
    })
          37  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
          38  +
}
          39  +
          40  +
/* RustType.kt:534 */
          41  +
#[allow(clippy::unnecessary_wraps)]
          42  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
          43  +
pub fn ser_http_response_code_http_response(
          44  +
    #[allow(unused_variables)] output: crate::output::HttpResponseCodeOutput,
          45  +
) -> std::result::Result<
          46  +
    ::aws_smithy_legacy_http_server::response::Response,
          47  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          48  +
> {
          49  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
          50  +
    Ok({
          51  +
        /* RustType.kt:534 */
          52  +
        #[allow(unused_mut)]
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
          54  +
        let mut builder = ::http::Response::builder();
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          57  +
            builder,
          58  +
            ::http::header::CONTENT_TYPE,
          59  +
            "application/json",
          60  +
        );
          61  +
        /* ServerHttpBoundProtocolGenerator.kt:737 */
          62  +
        let status = output.status
          63  +
            /* ServerHttpBoundProtocolGenerator.kt:739 */.unwrap_or(200)
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:737 */;
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:742 */
          66  +
        let http_status: u16 = status.try_into().map_err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection::InvalidHttpStatusCode)?;
          67  +
        builder = builder.status(http_status);
          68  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
          69  +
        let payload =
          70  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_http_response_code_output::ser_http_response_code_output_output_output(&output)?
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
          73  +
        let content_length = payload.len();
          74  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          75  +
            builder,
          76  +
            ::http::header::CONTENT_LENGTH,
          77  +
            content_length,
          78  +
        );
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
          80  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          81  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
          82  +
        builder.body(body)?
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
          84  +
    })
          85  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
          86  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_response_code_output.rs

@@ -0,1 +0,28 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
           3  +
pub fn ser_http_response_code_output_output_output(
           4  +
    value: &crate::output::HttpResponseCodeOutput,
           5  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
           7  +
    let mut out = ::std::string::String::new();
           8  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
          10  +
    crate::protocol_serde::shape_http_response_code_output::ser_http_response_code_output_output(
          11  +
        &mut object,
          12  +
        value,
          13  +
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
          15  +
    object.finish();
          16  +
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
          18  +
}
          19  +
          20  +
/* JsonSerializerGenerator.kt:358 */
          21  +
pub fn ser_http_response_code_output_output(
          22  +
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          23  +
    #[allow(unused_variables)] input: &crate::output::HttpResponseCodeOutput,
          24  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* JsonSerializerGenerator.kt:372 */
          26  +
    Ok(())
          27  +
    /* JsonSerializerGenerator.kt:358 */
          28  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_string_payload.rs

@@ -0,1 +0,91 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_http_string_payload_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::HttpStringPayloadInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input = crate::input::http_string_payload_input::Builder::default();
          23  +
        /* RustType.kt:534 */
          24  +
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          26  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          27  +
            uri, headers, body, ..
          28  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          30  +
        if let Some(value) = {
          31  +
            let bytes = ::hyper::body::to_bytes(body).await?;
          32  +
            if !bytes.is_empty() {
          33  +
                ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          34  +
                    &headers,
          35  +
                    Some("text/plain"),
          36  +
                )?;
          37  +
            }
          38  +
            crate::protocol_serde::shape_http_string_payload_input::de_payload_payload(&bytes)?
          39  +
        } {
          40  +
            input = input.set_payload(Some(value))
          41  +
        }
          42  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
          43  +
        input.build()
          44  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
          45  +
    })
          46  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
          47  +
}
          48  +
          49  +
/* RustType.kt:534 */
          50  +
#[allow(clippy::unnecessary_wraps)]
          51  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
          52  +
pub fn ser_http_string_payload_http_response(
          53  +
    #[allow(unused_variables)] output: crate::output::HttpStringPayloadOutput,
          54  +
) -> std::result::Result<
          55  +
    ::aws_smithy_legacy_http_server::response::Response,
          56  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          57  +
> {
          58  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
          59  +
    Ok({
          60  +
        /* RustType.kt:534 */
          61  +
        #[allow(unused_mut)]
          62  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
          63  +
        let mut builder = ::http::Response::builder();
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
          65  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          66  +
            builder,
          67  +
            ::http::header::CONTENT_TYPE,
          68  +
            "text/plain",
          69  +
        );
          70  +
        /* ServerHttpBoundProtocolGenerator.kt:718 */
          71  +
        let http_status: u16 = 200;
          72  +
        builder = builder.status(http_status);
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
          74  +
        let payload =
          75  +
            /* HttpBoundProtocolPayloadGenerator.kt:348 */crate::protocol_serde::shape_http_string_payload_output::ser_payload_http_payload( output.payload)?
          76  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
          78  +
        let content_length = payload.len();
          79  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          80  +
            builder,
          81  +
            ::http::header::CONTENT_LENGTH,
          82  +
            content_length,
          83  +
        );
          84  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
          85  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
          87  +
        builder.body(body)?
          88  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
          89  +
    })
          90  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
          91  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_string_payload_input.rs

@@ -0,1 +0,20 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBindingGenerator.kt:254 */
           3  +
pub(crate) fn de_payload_payload(
           4  +
    body: &[u8],
           5  +
) -> std::result::Result<
           6  +
    ::std::option::Option<::std::string::String>,
           7  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
> {
           9  +
    /* HttpBindingGenerator.kt:342 */
          10  +
    (!body.is_empty())
          11  +
        .then(|| {
          12  +
            /* HttpBindingGenerator.kt:355 */
          13  +
            let body_str = std::str::from_utf8(body)?;
          14  +
            /* HttpBindingGenerator.kt:367 */
          15  +
            Ok(body_str.to_string())
          16  +
            /* HttpBindingGenerator.kt:342 */
          17  +
        })
          18  +
        .transpose()
          19  +
    /* HttpBindingGenerator.kt:254 */
          20  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_http_string_payload_output.rs

@@ -0,1 +0,22 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* HttpBoundProtocolPayloadGenerator.kt:309 */
           3  +
pub fn ser_payload_http_payload(
           4  +
    payload: ::std::option::Option<::std::string::String>,
           5  +
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
           6  +
    /* HttpBoundProtocolPayloadGenerator.kt:318 */
           7  +
    let payload = match payload {
           8  +
        Some(t) => t,
           9  +
        None => {
          10  +
            return Ok(
          11  +
                /* HttpBoundProtocolPayloadGenerator.kt:330 */
          12  +
                Vec::new(), /* HttpBoundProtocolPayloadGenerator.kt:318 */
          13  +
            )
          14  +
        }
          15  +
    };
          16  +
    /* HttpBoundProtocolPayloadGenerator.kt:343 */
          17  +
    Ok(
          18  +
        /* HttpBoundProtocolPayloadGenerator.kt:364 */
          19  +
        payload.into_bytes(), /* HttpBoundProtocolPayloadGenerator.kt:343 */
          20  +
    )
          21  +
    /* HttpBoundProtocolPayloadGenerator.kt:309 */
          22  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_ignore_query_params_in_response.rs

@@ -0,1 +0,82 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_ignore_query_params_in_response_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::IgnoreQueryParamsInResponseInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input = crate::input::ignore_query_params_in_response_input::Builder::default();
          23  +
        /* RustType.kt:534 */
          24  +
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          26  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          27  +
            uri, headers, body, ..
          28  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:873 */
          30  +
        ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          31  +
            &headers, None,
          32  +
        )?;
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
          34  +
        input.build()
          35  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
          36  +
    })
          37  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
          38  +
}
          39  +
          40  +
/* RustType.kt:534 */
          41  +
#[allow(clippy::unnecessary_wraps)]
          42  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
          43  +
pub fn ser_ignore_query_params_in_response_http_response(
          44  +
    #[allow(unused_variables)] output: crate::output::IgnoreQueryParamsInResponseOutput,
          45  +
) -> std::result::Result<
          46  +
    ::aws_smithy_legacy_http_server::response::Response,
          47  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          48  +
> {
          49  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
          50  +
    Ok({
          51  +
        /* RustType.kt:534 */
          52  +
        #[allow(unused_mut)]
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
          54  +
        let mut builder = ::http::Response::builder();
          55  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
          56  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          57  +
            builder,
          58  +
            ::http::header::CONTENT_TYPE,
          59  +
            "application/json",
          60  +
        );
          61  +
        /* ServerHttpBoundProtocolGenerator.kt:718 */
          62  +
        let http_status: u16 = 200;
          63  +
        builder = builder.status(http_status);
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
          65  +
        let payload =
          66  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_ignore_query_params_in_response_output::ser_ignore_query_params_in_response_output_output_output(&output)?
          67  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
          68  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
          69  +
        let content_length = payload.len();
          70  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          71  +
            builder,
          72  +
            ::http::header::CONTENT_LENGTH,
          73  +
            content_length,
          74  +
        );
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
          76  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
          78  +
        builder.body(body)?
          79  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
          80  +
    })
          81  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
          82  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_ignore_query_params_in_response_output.rs

@@ -0,1 +0,31 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
           3  +
pub fn ser_ignore_query_params_in_response_output_output_output(
           4  +
    value: &crate::output::IgnoreQueryParamsInResponseOutput,
           5  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
           7  +
    let mut out = ::std::string::String::new();
           8  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
          10  +
    crate::protocol_serde::shape_ignore_query_params_in_response_output::ser_ignore_query_params_in_response_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
          12  +
    object.finish();
          13  +
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
          15  +
}
          16  +
          17  +
/* JsonSerializerGenerator.kt:358 */
          18  +
pub fn ser_ignore_query_params_in_response_output_output(
          19  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          20  +
    input: &crate::output::IgnoreQueryParamsInResponseOutput,
          21  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:382 */
          23  +
    if let Some(var_1) = &input.baz {
          24  +
        /* JsonSerializerGenerator.kt:423 */
          25  +
        object.key("baz").string(var_1.as_str());
          26  +
        /* JsonSerializerGenerator.kt:382 */
          27  +
    }
          28  +
    /* JsonSerializerGenerator.kt:372 */
          29  +
    Ok(())
          30  +
    /* JsonSerializerGenerator.kt:358 */
          31  +
}

tmp-codegen-diff/codegen-server-test/rest_json-http0x/rust-server-codegen/src/protocol_serde/shape_input_and_output_with_headers.rs

@@ -0,1 +0,678 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:534 */
           3  +
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:408 */
           5  +
pub async fn de_input_and_output_with_headers_http_request<B>(
           6  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           7  +
) -> std::result::Result<
           8  +
    crate::input::InputAndOutputWithHeadersInput,
           9  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
          10  +
>
          11  +
where
          12  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          13  +
    B::Data: Send,
          14  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          15  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          16  +
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:424 */
          18  +
    Ok({
          19  +
        /* RustType.kt:534 */
          20  +
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:759 */
          22  +
        let mut input = crate::input::input_and_output_with_headers_input::Builder::default();
          23  +
        /* RustType.kt:534 */
          24  +
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:764 */
          26  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          27  +
            uri, headers, body, ..
          28  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          30  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_boolean_list_header(&headers)? {
          31  +
                                input = input.set_header_boolean_list(Some(value))
          32  +
                            }
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          34  +
        if let Some(value) =
          35  +
            crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_byte_header(
          36  +
                &headers,
          37  +
            )?
          38  +
        {
          39  +
            input = input.set_header_byte(Some(value))
          40  +
        }
          41  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          42  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_double_header(&headers)? {
          43  +
                                input = input.set_header_double(Some(value))
          44  +
                            }
          45  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          46  +
        if let Some(value) =
          47  +
            crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_enum_header(
          48  +
                &headers,
          49  +
            )?
          50  +
        {
          51  +
            input = input.set_header_enum(Some(value))
          52  +
        }
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          54  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_enum_list_header(&headers)? {
          55  +
                                input = input.set_header_enum_list(Some(value))
          56  +
                            }
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          58  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_false_bool_header(&headers)? {
          59  +
                                input = input.set_header_false_bool(Some(value))
          60  +
                            }
          61  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          62  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_float_header(&headers)? {
          63  +
                                input = input.set_header_float(Some(value))
          64  +
                            }
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          66  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_integer_header(&headers)? {
          67  +
                                input = input.set_header_integer(Some(value))
          68  +
                            }
          69  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          70  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_integer_enum_header(&headers)? {
          71  +
                                input = input.set_header_integer_enum(Some(value))
          72  +
                            }
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          74  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_integer_enum_list_header(&headers)? {
          75  +
                                input = input.set_header_integer_enum_list(Some(value))
          76  +
                            }
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          78  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_integer_list_header(&headers)? {
          79  +
                                input = input.set_header_integer_list(Some(value))
          80  +
                            }
          81  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          82  +
        if let Some(value) =
          83  +
            crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_long_header(
          84  +
                &headers,
          85  +
            )?
          86  +
        {
          87  +
            input = input.set_header_long(Some(value))
          88  +
        }
          89  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          90  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_short_header(&headers)? {
          91  +
                                input = input.set_header_short(Some(value))
          92  +
                            }
          93  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          94  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_string_header(&headers)? {
          95  +
                                input = input.set_header_string(Some(value))
          96  +
                            }
          97  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
          98  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_string_list_header(&headers)? {
          99  +
                                input = input.set_header_string_list(Some(value))
         100  +
                            }
         101  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
         102  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_string_set_header(&headers)? {
         103  +
                                input = input.set_header_string_set(Some(value))
         104  +
                            }
         105  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
         106  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_timestamp_list_header(&headers)? {
         107  +
                                input = input.set_header_timestamp_list(Some(value))
         108  +
                            }
         109  +
        /* ServerHttpBoundProtocolGenerator.kt:856 */
         110  +
        if let Some(value) = crate::protocol_serde::shape_input_and_output_with_headers_input::de_header_true_bool_header(&headers)? {
         111  +
                                input = input.set_header_true_bool(Some(value))
         112  +
                            }
         113  +
        /* ServerHttpBoundProtocolGenerator.kt:896 */
         114  +
        input.build()?
         115  +
        /* ServerHttpBoundProtocolGenerator.kt:424 */
         116  +
    })
         117  +
    /* ServerHttpBoundProtocolGenerator.kt:408 */
         118  +
}
         119  +
         120  +
/* RustType.kt:534 */
         121  +
#[allow(clippy::unnecessary_wraps)]
         122  +
/* ServerHttpBoundProtocolGenerator.kt:445 */
         123  +
pub fn ser_input_and_output_with_headers_http_response(
         124  +
    #[allow(unused_variables)] output: crate::output::InputAndOutputWithHeadersOutput,
         125  +
) -> std::result::Result<
         126  +
    ::aws_smithy_legacy_http_server::response::Response,
         127  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         128  +
> {
         129  +
    /* ServerHttpBoundProtocolGenerator.kt:457 */
         130  +
    Ok({
         131  +
        /* RustType.kt:534 */
         132  +
        #[allow(unused_mut)]
         133  +
        /* ServerHttpBoundProtocolGenerator.kt:547 */
         134  +
        let mut builder = ::http::Response::builder();
         135  +
        /* ServerHttpBoundProtocolGenerator.kt:665 */
         136  +
        builder = crate::protocol_serde::shape_input_and_output_with_headers::ser_input_and_output_with_headers_headers(&output, builder)?;
         137  +
        /* ServerHttpBoundProtocolGenerator.kt:633 */
         138  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         139  +
            builder,
         140  +
            ::http::header::CONTENT_TYPE,
         141  +
            "application/json",
         142  +
        );
         143  +
        /* ServerHttpBoundProtocolGenerator.kt:718 */
         144  +
        let http_status: u16 = 200;
         145  +
        builder = builder.status(http_status);
         146  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
         147  +
        let payload =
         148  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */crate::protocol_serde::shape_input_and_output_with_headers_output::ser_input_and_output_with_headers_output_output_output(&output)?
         149  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */;
         150  +
        /* ServerHttpBoundProtocolGenerator.kt:699 */
         151  +
        let content_length = payload.len();
         152  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         153  +
            builder,
         154  +
            ::http::header::CONTENT_LENGTH,
         155  +
            content_length,
         156  +
        );
         157  +
        /* ServerHttpBoundProtocolGenerator.kt:603 */
         158  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
         159  +
        /* ServerHttpBoundProtocolGenerator.kt:611 */
         160  +
        builder.body(body)?
         161  +
        /* ServerHttpBoundProtocolGenerator.kt:457 */
         162  +
    })
         163  +
    /* ServerHttpBoundProtocolGenerator.kt:445 */
         164  +
}
         165  +
         166  +
/* RustType.kt:534 */
         167  +
#[allow(clippy::unnecessary_wraps)]
         168  +
/* ServerHttpBoundProtocolGenerator.kt:471 */
         169  +
pub fn ser_input_and_output_with_headers_http_error(
         170  +
    error: &crate::error::InputAndOutputWithHeadersError,
         171  +
) -> std::result::Result<
         172  +
    ::aws_smithy_legacy_http_server::response::Response,
         173  +
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
         174  +
> {
         175  +
    /* ServerHttpBoundProtocolGenerator.kt:476 */
         176  +
    Ok({
         177  +
        /* ServerHttpBoundProtocolGenerator.kt:492 */
         178  +
        match error {
         179  +
            /* ServerHttpBoundProtocolGenerator.kt:500 */
         180  +
            crate::error::InputAndOutputWithHeadersError::ValidationException(output) => {
         181  +
                /* ServerHttpBoundProtocolGenerator.kt:501 */
         182  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         183  +
                /* RustType.kt:534 */
         184  +
                #[allow(unused_mut)]
         185  +
                /* ServerHttpBoundProtocolGenerator.kt:511 */
         186  +
                let mut builder = ::http::Response::builder();
         187  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         188  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         189  +
                    builder,
         190  +
                    ::http::header::CONTENT_TYPE,
         191  +
                    "application/json",
         192  +
                );
         193  +
                /* ServerHttpBoundProtocolGenerator.kt:633 */
         194  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         195  +
                    builder,
         196  +
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
         197  +
                    "ValidationException",
         198  +
                );
         199  +
                /* ServerHttpBoundProtocolGenerator.kt:699 */
         200  +
                let content_length = payload.len();
         201  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
         202  +
                    builder,
         203  +
                    ::http::header::CONTENT_LENGTH,
         204  +
                    content_length,
         205  +
                );
         206  +
                /* ServerHttpBoundProtocolGenerator.kt:528 */
         207  +
                builder
         208  +
                    .status(400)
         209  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
         210  +
                /* ServerHttpBoundProtocolGenerator.kt:500 */
         211  +
            } /* ServerHttpBoundProtocolGenerator.kt:492 */
         212  +
        }
         213  +
        /* ServerHttpBoundProtocolGenerator.kt:476 */
         214  +
    })
         215  +
    /* ServerHttpBoundProtocolGenerator.kt:471 */
         216  +
}
         217  +
         218  +
/* HttpBindingGenerator.kt:565 */
         219  +
pub fn ser_input_and_output_with_headers_headers(
         220  +
    input: &crate::output::InputAndOutputWithHeadersOutput,
         221  +
    mut builder: ::http::response::Builder,
         222  +
) -> std::result::Result<::http::response::Builder, ::aws_smithy_types::error::operation::BuildError>
         223  +
{
         224  +
    /* HttpBindingGenerator.kt:615 */
         225  +
    if let ::std::option::Option::Some(inner_1) = &input.header_string {
         226  +
        /* HttpBindingGenerator.kt:727 */
         227  +
        let formatted_2 = inner_1.as_str();
         228  +
        /* HttpBindingGenerator.kt:728 */
         229  +
        if !formatted_2.is_empty() {
         230  +
            /* HttpBindingGenerator.kt:729 */
         231  +
            let header_value = formatted_2;
         232  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         233  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         234  +
                    "header_string",
         235  +
                    format!(
         236  +
                        "`{}` cannot be used as a header value: {}",
         237  +
                        &header_value, err
         238  +
                    ),
         239  +
                )
         240  +
            })?;
         241  +
            builder = builder.header("X-String", header_value);
         242  +
            /* HttpBindingGenerator.kt:728 */
         243  +
        }
         244  +
        /* HttpBindingGenerator.kt:615 */
         245  +
    }
         246  +
    /* HttpBindingGenerator.kt:615 */
         247  +
    if let ::std::option::Option::Some(inner_3) = &input.header_byte {
         248  +
        /* HttpBindingGenerator.kt:713 */
         249  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_3);
         250  +
        /* HttpBindingGenerator.kt:727 */
         251  +
        let formatted_4 = encoder.encode();
         252  +
        /* HttpBindingGenerator.kt:728 */
         253  +
        if !formatted_4.is_empty() {
         254  +
            /* HttpBindingGenerator.kt:729 */
         255  +
            let header_value = formatted_4;
         256  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         257  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         258  +
                    "header_byte",
         259  +
                    format!(
         260  +
                        "`{}` cannot be used as a header value: {}",
         261  +
                        &header_value, err
         262  +
                    ),
         263  +
                )
         264  +
            })?;
         265  +
            builder = builder.header("X-Byte", header_value);
         266  +
            /* HttpBindingGenerator.kt:728 */
         267  +
        }
         268  +
        /* HttpBindingGenerator.kt:615 */
         269  +
    }
         270  +
    /* HttpBindingGenerator.kt:615 */
         271  +
    if let ::std::option::Option::Some(inner_5) = &input.header_short {
         272  +
        /* HttpBindingGenerator.kt:713 */
         273  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
         274  +
        /* HttpBindingGenerator.kt:727 */
         275  +
        let formatted_6 = encoder.encode();
         276  +
        /* HttpBindingGenerator.kt:728 */
         277  +
        if !formatted_6.is_empty() {
         278  +
            /* HttpBindingGenerator.kt:729 */
         279  +
            let header_value = formatted_6;
         280  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         281  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         282  +
                    "header_short",
         283  +
                    format!(
         284  +
                        "`{}` cannot be used as a header value: {}",
         285  +
                        &header_value, err
         286  +
                    ),
         287  +
                )
         288  +
            })?;
         289  +
            builder = builder.header("X-Short", header_value);
         290  +
            /* HttpBindingGenerator.kt:728 */
         291  +
        }
         292  +
        /* HttpBindingGenerator.kt:615 */
         293  +
    }
         294  +
    /* HttpBindingGenerator.kt:615 */
         295  +
    if let ::std::option::Option::Some(inner_7) = &input.header_integer {
         296  +
        /* HttpBindingGenerator.kt:713 */
         297  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_7);
         298  +
        /* HttpBindingGenerator.kt:727 */
         299  +
        let formatted_8 = encoder.encode();
         300  +
        /* HttpBindingGenerator.kt:728 */
         301  +
        if !formatted_8.is_empty() {
         302  +
            /* HttpBindingGenerator.kt:729 */
         303  +
            let header_value = formatted_8;
         304  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         305  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         306  +
                    "header_integer",
         307  +
                    format!(
         308  +
                        "`{}` cannot be used as a header value: {}",
         309  +
                        &header_value, err
         310  +
                    ),
         311  +
                )
         312  +
            })?;
         313  +
            builder = builder.header("X-Integer", header_value);
         314  +
            /* HttpBindingGenerator.kt:728 */
         315  +
        }
         316  +
        /* HttpBindingGenerator.kt:615 */
         317  +
    }
         318  +
    /* HttpBindingGenerator.kt:615 */
         319  +
    if let ::std::option::Option::Some(inner_9) = &input.header_long {
         320  +
        /* HttpBindingGenerator.kt:713 */
         321  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_9);
         322  +
        /* HttpBindingGenerator.kt:727 */
         323  +
        let formatted_10 = encoder.encode();
         324  +
        /* HttpBindingGenerator.kt:728 */
         325  +
        if !formatted_10.is_empty() {
         326  +
            /* HttpBindingGenerator.kt:729 */
         327  +
            let header_value = formatted_10;
         328  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         329  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         330  +
                    "header_long",
         331  +
                    format!(
         332  +
                        "`{}` cannot be used as a header value: {}",
         333  +
                        &header_value, err
         334  +
                    ),
         335  +
                )
         336  +
            })?;
         337  +
            builder = builder.header("X-Long", header_value);
         338  +
            /* HttpBindingGenerator.kt:728 */
         339  +
        }
         340  +
        /* HttpBindingGenerator.kt:615 */
         341  +
    }
         342  +
    /* HttpBindingGenerator.kt:615 */
         343  +
    if let ::std::option::Option::Some(inner_11) = &input.header_float {
         344  +
        /* HttpBindingGenerator.kt:713 */
         345  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_11);
         346  +
        /* HttpBindingGenerator.kt:727 */
         347  +
        let formatted_12 = encoder.encode();
         348  +
        /* HttpBindingGenerator.kt:728 */
         349  +
        if !formatted_12.is_empty() {
         350  +
            /* HttpBindingGenerator.kt:729 */
         351  +
            let header_value = formatted_12;
         352  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         353  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         354  +
                    "header_float",
         355  +
                    format!(
         356  +
                        "`{}` cannot be used as a header value: {}",
         357  +
                        &header_value, err
         358  +
                    ),
         359  +
                )
         360  +
            })?;
         361  +
            builder = builder.header("X-Float", header_value);
         362  +
            /* HttpBindingGenerator.kt:728 */
         363  +
        }
         364  +
        /* HttpBindingGenerator.kt:615 */
         365  +
    }
         366  +
    /* HttpBindingGenerator.kt:615 */
         367  +
    if let ::std::option::Option::Some(inner_13) = &input.header_double {
         368  +
        /* HttpBindingGenerator.kt:713 */
         369  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_13);
         370  +
        /* HttpBindingGenerator.kt:727 */
         371  +
        let formatted_14 = encoder.encode();
         372  +
        /* HttpBindingGenerator.kt:728 */
         373  +
        if !formatted_14.is_empty() {
         374  +
            /* HttpBindingGenerator.kt:729 */
         375  +
            let header_value = formatted_14;
         376  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         377  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         378  +
                    "header_double",
         379  +
                    format!(
         380  +
                        "`{}` cannot be used as a header value: {}",
         381  +
                        &header_value, err
         382  +
                    ),
         383  +
                )
         384  +
            })?;
         385  +
            builder = builder.header("X-Double", header_value);
         386  +
            /* HttpBindingGenerator.kt:728 */
         387  +
        }
         388  +
        /* HttpBindingGenerator.kt:615 */
         389  +
    }
         390  +
    /* HttpBindingGenerator.kt:615 */
         391  +
    if let ::std::option::Option::Some(inner_15) = &input.header_true_bool {
         392  +
        /* HttpBindingGenerator.kt:713 */
         393  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_15);
         394  +
        /* HttpBindingGenerator.kt:727 */
         395  +
        let formatted_16 = encoder.encode();
         396  +
        /* HttpBindingGenerator.kt:728 */
         397  +
        if !formatted_16.is_empty() {
         398  +
            /* HttpBindingGenerator.kt:729 */
         399  +
            let header_value = formatted_16;
         400  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         401  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         402  +
                    "header_true_bool",
         403  +
                    format!(
         404  +
                        "`{}` cannot be used as a header value: {}",
         405  +
                        &header_value, err
         406  +
                    ),
         407  +
                )
         408  +
            })?;
         409  +
            builder = builder.header("X-Boolean1", header_value);
         410  +
            /* HttpBindingGenerator.kt:728 */
         411  +
        }
         412  +
        /* HttpBindingGenerator.kt:615 */
         413  +
    }
         414  +
    /* HttpBindingGenerator.kt:615 */
         415  +
    if let ::std::option::Option::Some(inner_17) = &input.header_false_bool {
         416  +
        /* HttpBindingGenerator.kt:713 */
         417  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_17);
         418  +
        /* HttpBindingGenerator.kt:727 */
         419  +
        let formatted_18 = encoder.encode();
         420  +
        /* HttpBindingGenerator.kt:728 */
         421  +
        if !formatted_18.is_empty() {
         422  +
            /* HttpBindingGenerator.kt:729 */
         423  +
            let header_value = formatted_18;
         424  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         425  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         426  +
                    "header_false_bool",
         427  +
                    format!(
         428  +
                        "`{}` cannot be used as a header value: {}",
         429  +
                        &header_value, err
         430  +
                    ),
         431  +
                )
         432  +
            })?;
         433  +
            builder = builder.header("X-Boolean2", header_value);
         434  +
            /* HttpBindingGenerator.kt:728 */
         435  +
        }
         436  +
        /* HttpBindingGenerator.kt:615 */
         437  +
    }
         438  +
    /* HttpBindingGenerator.kt:615 */
         439  +
    if let ::std::option::Option::Some(inner_19) = &input.header_string_list {
         440  +
        /* HttpBindingGenerator.kt:669 */
         441  +
        for inner_20 in inner_19 {
         442  +
            /* HttpBindingGenerator.kt:727 */
         443  +
            let formatted_21 =
         444  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_20.as_str());
         445  +
            /* HttpBindingGenerator.kt:728 */
         446  +
            if !formatted_21.is_empty() {
         447  +
                /* HttpBindingGenerator.kt:729 */
         448  +
                let header_value = formatted_21;
         449  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         450  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         451  +
                        "header_string_list",
         452  +
                        format!(
         453  +
                            "`{}` cannot be used as a header value: {}",
         454  +
                            &header_value, err
         455  +
                        ),
         456  +
                    )
         457  +
                })?;
         458  +
                builder = builder.header("X-StringList", header_value);
         459  +
                /* HttpBindingGenerator.kt:728 */
         460  +
            }
         461  +
            /* HttpBindingGenerator.kt:669 */
         462  +
        }
         463  +
        /* HttpBindingGenerator.kt:615 */
         464  +
    }
         465  +
    /* HttpBindingGenerator.kt:615 */
         466  +
    if let ::std::option::Option::Some(inner_22) = &input.header_string_set {
         467  +
        /* HttpBindingGenerator.kt:669 */
         468  +
        for inner_23 in &inner_22.0 {
         469  +
            /* HttpBindingGenerator.kt:727 */
         470  +
            let formatted_24 =
         471  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_23.as_str());
         472  +
            /* HttpBindingGenerator.kt:728 */
         473  +
            if !formatted_24.is_empty() {
         474  +
                /* HttpBindingGenerator.kt:729 */
         475  +
                let header_value = formatted_24;
         476  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         477  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         478  +
                        "header_string_set",
         479  +
                        format!(
         480  +
                            "`{}` cannot be used as a header value: {}",
         481  +
                            &header_value, err
         482  +
                        ),
         483  +
                    )
         484  +
                })?;
         485  +
                builder = builder.header("X-StringSet", header_value);
         486  +
                /* HttpBindingGenerator.kt:728 */
         487  +
            }
         488  +
            /* HttpBindingGenerator.kt:669 */
         489  +
        }
         490  +
        /* HttpBindingGenerator.kt:615 */
         491  +
    }
         492  +
    /* HttpBindingGenerator.kt:615 */
         493  +
    if let ::std::option::Option::Some(inner_25) = &input.header_integer_list {
         494  +
        /* HttpBindingGenerator.kt:669 */
         495  +
        for inner_26 in inner_25 {
         496  +
            /* HttpBindingGenerator.kt:713 */
         497  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_26);
         498  +
            /* HttpBindingGenerator.kt:727 */
         499  +
            let formatted_27 = encoder.encode();
         500  +
            /* HttpBindingGenerator.kt:728 */
         501  +
            if !formatted_27.is_empty() {
         502  +
                /* HttpBindingGenerator.kt:729 */
         503  +
                let header_value = formatted_27;
         504  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         505  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         506  +
                        "header_integer_list",
         507  +
                        format!(
         508  +
                            "`{}` cannot be used as a header value: {}",
         509  +
                            &header_value, err
         510  +
                        ),
         511  +
                    )
         512  +
                })?;
         513  +
                builder = builder.header("X-IntegerList", header_value);
         514  +
                /* HttpBindingGenerator.kt:728 */
         515  +
            }
         516  +
            /* HttpBindingGenerator.kt:669 */
         517  +
        }
         518  +
        /* HttpBindingGenerator.kt:615 */
         519  +
    }
         520  +
    /* HttpBindingGenerator.kt:615 */
         521  +
    if let ::std::option::Option::Some(inner_28) = &input.header_boolean_list {
         522  +
        /* HttpBindingGenerator.kt:669 */
         523  +
        for inner_29 in inner_28 {
         524  +
            /* HttpBindingGenerator.kt:713 */
         525  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_29);
         526  +
            /* HttpBindingGenerator.kt:727 */
         527  +
            let formatted_30 = encoder.encode();
         528  +
            /* HttpBindingGenerator.kt:728 */
         529  +
            if !formatted_30.is_empty() {
         530  +
                /* HttpBindingGenerator.kt:729 */
         531  +
                let header_value = formatted_30;
         532  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         533  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         534  +
                        "header_boolean_list",
         535  +
                        format!(
         536  +
                            "`{}` cannot be used as a header value: {}",
         537  +
                            &header_value, err
         538  +
                        ),
         539  +
                    )
         540  +
                })?;
         541  +
                builder = builder.header("X-BooleanList", header_value);
         542  +
                /* HttpBindingGenerator.kt:728 */
         543  +
            }
         544  +
            /* HttpBindingGenerator.kt:669 */
         545  +
        }
         546  +
        /* HttpBindingGenerator.kt:615 */
         547  +
    }
         548  +
    /* HttpBindingGenerator.kt:615 */
         549  +
    if let ::std::option::Option::Some(inner_31) = &input.header_timestamp_list {
         550  +
        /* HttpBindingGenerator.kt:669 */
         551  +
        for inner_32 in inner_31 {
         552  +
            /* HttpBindingGenerator.kt:727 */
         553  +
            let formatted_33 = inner_32.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
         554  +
            /* HttpBindingGenerator.kt:728 */
         555  +
            if !formatted_33.is_empty() {
         556  +
                /* HttpBindingGenerator.kt:729 */
         557  +
                let header_value = formatted_33;
         558  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         559  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         560  +
                        "header_timestamp_list",
         561  +
                        format!(
         562  +
                            "`{}` cannot be used as a header value: {}",
         563  +
                            &header_value, err
         564  +
                        ),
         565  +
                    )
         566  +
                })?;
         567  +
                builder = builder.header("X-TimestampList", header_value);
         568  +
                /* HttpBindingGenerator.kt:728 */
         569  +
            }
         570  +
            /* HttpBindingGenerator.kt:669 */
         571  +
        }
         572  +
        /* HttpBindingGenerator.kt:615 */
         573  +
    }
         574  +
    /* HttpBindingGenerator.kt:615 */
         575  +
    if let ::std::option::Option::Some(inner_34) = &input.header_enum {
         576  +
        /* HttpBindingGenerator.kt:727 */
         577  +
        let formatted_35 = inner_34.as_str();
         578  +
        /* HttpBindingGenerator.kt:728 */
         579  +
        if !formatted_35.is_empty() {
         580  +
            /* HttpBindingGenerator.kt:729 */
         581  +
            let header_value = formatted_35;
         582  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         583  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         584  +
                    "header_enum",
         585  +
                    format!(
         586  +
                        "`{}` cannot be used as a header value: {}",
         587  +
                        &header_value, err
         588  +
                    ),
         589  +
                )
         590  +
            })?;
         591  +
            builder = builder.header("X-Enum", header_value);
         592  +
            /* HttpBindingGenerator.kt:728 */
         593  +
        }
         594  +
        /* HttpBindingGenerator.kt:615 */
         595  +
    }
         596  +
    /* HttpBindingGenerator.kt:615 */
         597  +
    if let ::std::option::Option::Some(inner_36) = &input.header_enum_list {
         598  +
        /* HttpBindingGenerator.kt:669 */
         599  +
        for inner_37 in inner_36 {
         600  +
            /* HttpBindingGenerator.kt:727 */
         601  +
            let formatted_38 =
         602  +
                ::aws_smithy_legacy_http::header::quote_header_value(inner_37.as_str());
         603  +
            /* HttpBindingGenerator.kt:728 */
         604  +
            if !formatted_38.is_empty() {
         605  +
                /* HttpBindingGenerator.kt:729 */
         606  +
                let header_value = formatted_38;
         607  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         608  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         609  +
                        "header_enum_list",
         610  +
                        format!(
         611  +
                            "`{}` cannot be used as a header value: {}",
         612  +
                            &header_value, err
         613  +
                        ),
         614  +
                    )
         615  +
                })?;
         616  +
                builder = builder.header("X-EnumList", header_value);
         617  +
                /* HttpBindingGenerator.kt:728 */
         618  +
            }
         619  +
            /* HttpBindingGenerator.kt:669 */
         620  +
        }
         621  +
        /* HttpBindingGenerator.kt:615 */
         622  +
    }
         623  +
    /* HttpBindingGenerator.kt:615 */
         624  +
    if let ::std::option::Option::Some(inner_39) = &input.header_integer_enum {
         625  +
        /* HttpBindingGenerator.kt:713 */
         626  +
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_39);
         627  +
        /* HttpBindingGenerator.kt:727 */
         628  +
        let formatted_40 = encoder.encode();
         629  +
        /* HttpBindingGenerator.kt:728 */
         630  +
        if !formatted_40.is_empty() {
         631  +
            /* HttpBindingGenerator.kt:729 */
         632  +
            let header_value = formatted_40;
         633  +
            let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         634  +
                ::aws_smithy_types::error::operation::BuildError::invalid_field(
         635  +
                    "header_integer_enum",
         636  +
                    format!(
         637  +
                        "`{}` cannot be used as a header value: {}",
         638  +
                        &header_value, err
         639  +
                    ),
         640  +
                )
         641  +
            })?;
         642  +
            builder = builder.header("X-IntegerEnum", header_value);
         643  +
            /* HttpBindingGenerator.kt:728 */
         644  +
        }
         645  +
        /* HttpBindingGenerator.kt:615 */
         646  +
    }
         647  +
    /* HttpBindingGenerator.kt:615 */
         648  +
    if let ::std::option::Option::Some(inner_41) = &input.header_integer_enum_list {
         649  +
        /* HttpBindingGenerator.kt:669 */
         650  +
        for inner_42 in inner_41 {
         651  +
            /* HttpBindingGenerator.kt:713 */
         652  +
            let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_42);
         653  +
            /* HttpBindingGenerator.kt:727 */
         654  +
            let formatted_43 = encoder.encode();
         655  +
            /* HttpBindingGenerator.kt:728 */
         656  +
            if !formatted_43.is_empty() {
         657  +
                /* HttpBindingGenerator.kt:729 */
         658  +
                let header_value = formatted_43;
         659  +
                let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         660  +
                    ::aws_smithy_types::error::operation::BuildError::invalid_field(
         661  +
                        "header_integer_enum_list",
         662  +
                        format!(
         663  +
                            "`{}` cannot be used as a header value: {}",
         664  +
                            &header_value, err
         665  +
                        ),
         666  +
                    )
         667  +
                })?;
         668  +
                builder = builder.header("X-IntegerEnumList", header_value);
         669  +
                /* HttpBindingGenerator.kt:728 */
         670  +
            }
         671  +
            /* HttpBindingGenerator.kt:669 */
         672  +
        }
         673  +
        /* HttpBindingGenerator.kt:615 */
         674  +
    }
         675  +
    /* HttpBindingGenerator.kt:578 */
         676  +
    Ok(builder)
         677  +
    /* HttpBindingGenerator.kt:565 */
         678  +
}