Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_endpoint_operation.rs

@@ -1,1 +28,43 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_endpoint_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::endpoint_operation::EndpointOperationOutput, crate::operation::endpoint_operation::EndpointOperationError>
    8     10   
{
          11  +
    /* RustType.kt:516 */
    9     12   
    #[allow(unused_mut)]
          13  +
    /* ProtocolParserGenerator.kt:106 */
   10     14   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11     15   
        .map_err(crate::operation::endpoint_operation::EndpointOperationError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::endpoint_operation::EndpointOperationError::generic(generic))
          20  +
    /* ProtocolParserGenerator.kt:99 */
   14     21   
}
   15     22   
          23  +
/* RustType.kt:516 */
   16     24   
#[allow(clippy::unnecessary_wraps)]
          25  +
/* ProtocolParserGenerator.kt:71 */
   17     26   
pub fn de_endpoint_operation_http_response(
   18     27   
    _response_status: u16,
   19     28   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   20     29   
    _response_body: &[u8],
   21     30   
) -> std::result::Result<crate::operation::endpoint_operation::EndpointOperationOutput, crate::operation::endpoint_operation::EndpointOperationError>
   22     31   
{
          32  +
    /* ProtocolParserGenerator.kt:77 */
   23     33   
    Ok({
          34  +
        /* RustType.kt:516 */
   24     35   
        #[allow(unused_mut)]
          36  +
        /* ProtocolParserGenerator.kt:240 */
   25     37   
        let mut output = crate::operation::endpoint_operation::builders::EndpointOperationOutputBuilder::default();
          38  +
        /* ClientBuilderInstantiator.kt:56 */
   26     39   
        output.build()
          40  +
        /* ProtocolParserGenerator.kt:77 */
   27     41   
    })
          42  +
    /* ProtocolParserGenerator.kt:71 */
   28     43   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_endpoint_operation_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_endpoint_operation_input_input_input(
    3      4   
    input: &crate::operation::endpoint_operation::EndpointOperationInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "EndpointOperation", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_endpoint_with_host_label_operation.rs

@@ -1,1 +32,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_endpoint_with_host_label_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
    9     11   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_endpoint_with_host_label_operation_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   25     34   
    crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_endpoint_with_host_label_operation_input.rs

@@ -1,1 +15,27 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_endpoint_with_host_label_operation_input_input_input(
    3      4   
    input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:144 */
    5      7   
    let mut out = String::new();
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* QuerySerializerGenerator.kt:146 */
    7     11   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "EndpointWithHostLabelOperation", "2020-01-08");
          12  +
    /* RustType.kt:516 */
    8     13   
    #[allow(unused_mut)]
          14  +
    /* QuerySerializerGenerator.kt:279 */
    9     15   
    let mut scope_1 = writer.prefix("Label");
          16  +
    /* QuerySerializerGenerator.kt:206 */
   10     17   
    if let Some(var_2) = &input.label {
          18  +
        /* QuerySerializerGenerator.kt:230 */
   11     19   
        scope_1.string(var_2);
          20  +
        /* QuerySerializerGenerator.kt:206 */
   12     21   
    }
          22  +
    /* QuerySerializerGenerator.kt:151 */
   13     23   
    writer.finish();
          24  +
    /* QuerySerializerGenerator.kt:152 */
   14     25   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          26  +
    /* QuerySerializerGenerator.kt:134 */
   15     27   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_foo_enum_list.rs

@@ -1,1 +23,30 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitParserGenerator.kt:546 */
    2      3   
pub fn de_foo_enum_list(
    3      4   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<crate::types::FooEnum>, ::aws_smithy_xml::decode::XmlDecodeError> {
           6  +
    /* XmlBindingTraitParserGenerator.kt:551 */
    5      7   
    let mut out = std::vec::Vec::new();
           8  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    6      9   
    while let Some(mut tag) = decoder.next_tag() {
          10  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    7     11   
        match tag.start_el() {
    8         -
            s if s.matches("member") /* member aws.protocoltests.shared#FooEnumList$member */ =>  {
    9         -
                out.push(
   10         -
                    Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   11         -
                        crate::types::FooEnum::from(
   12         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   13         -
                        )
   14         -
                    )
   15         -
                    ?
   16         -
                );
   17         -
            }
          12  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("member") /* member aws.protocoltests.shared#FooEnumList$member */ =>  {
          13  +
                /* XmlBindingTraitParserGenerator.kt:554 */out.push(
          14  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          15  +
                        /* XmlBindingTraitParserGenerator.kt:741 */crate::types::FooEnum::from(
          16  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          17  +
                        /* XmlBindingTraitParserGenerator.kt:741 */)
          18  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
          19  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          20  +
                /* XmlBindingTraitParserGenerator.kt:554 */);
          21  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   18     22   
            ,
   19         -
            _ => {}
   20         -
        }
          23  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          24  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          25  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   21     26   
    }
          27  +
    /* XmlBindingTraitParserGenerator.kt:559 */
   22     28   
    Ok(out)
          29  +
    /* XmlBindingTraitParserGenerator.kt:546 */
   23     30   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_foo_enum_map.rs

@@ -1,1 +53,71 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitParserGenerator.kt:586 */
    2      3   
pub fn de_foo_enum_map(
    3      4   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    4      5   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, crate::types::FooEnum>, ::aws_smithy_xml::decode::XmlDecodeError> {
           6  +
    /* XmlBindingTraitParserGenerator.kt:591 */
    5      7   
    let mut out = ::std::collections::HashMap::new();
           8  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    6      9   
    while let Some(mut tag) = decoder.next_tag() {
          10  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    7     11   
        match tag.start_el() {
          12  +
            /* XmlBindingTraitParserGenerator.kt:593 */
    8     13   
            s if s.matches("entry") => {
          14  +
                /* XmlBindingTraitParserGenerator.kt:594 */
    9     15   
                crate::protocol_serde::shape_foo_enum_map::de_foo_enum_map_entry(&mut tag, &mut out)?;
          16  +
                /* XmlBindingTraitParserGenerator.kt:593 */
   10     17   
            }
   11         -
            _ => {}
          18  +
            /* XmlBindingTraitParserGenerator.kt:356 */ _ => {} /* XmlBindingTraitParserGenerator.kt:353 */
   12     19   
        }
          20  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   13     21   
    }
          22  +
    /* XmlBindingTraitParserGenerator.kt:597 */
   14     23   
    Ok(out)
          24  +
    /* XmlBindingTraitParserGenerator.kt:586 */
   15     25   
}
   16     26   
          27  +
/* XmlBindingTraitParserGenerator.kt:628 */
   17     28   
pub fn de_foo_enum_map_entry(
   18     29   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
   19     30   
    out: &mut ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>,
   20     31   
) -> ::std::result::Result<(), ::aws_smithy_xml::decode::XmlDecodeError> {
          32  +
    /* XmlBindingTraitParserGenerator.kt:634 */
   21     33   
    let mut k: Option<::std::string::String> = None;
          34  +
    /* XmlBindingTraitParserGenerator.kt:635 */
   22     35   
    let mut v: Option<crate::types::FooEnum> = None;
          36  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   23     37   
    while let Some(mut tag) = decoder.next_tag() {
          38  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   24     39   
        match tag.start_el() {
   25         -
            s if s.matches("key") /* key aws.protocoltests.shared#FooEnumMap$key */ =>  {
   26         -
                k = Some(
   27         -
                    Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   28         -
                        ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   29         -
                        .into()
   30         -
                    )
   31         -
                    ?
   32         -
                )
   33         -
            }
          40  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("key") /* key aws.protocoltests.shared#FooEnumMap$key */ =>  {
          41  +
                /* XmlBindingTraitParserGenerator.kt:641 */k = Some(
          42  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          43  +
                        /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          44  +
                        /* XmlBindingTraitParserGenerator.kt:748 */.into()
          45  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
          46  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          47  +
                /* XmlBindingTraitParserGenerator.kt:641 */)
          48  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   34     49   
            ,
   35         -
            s if s.matches("value") /* value aws.protocoltests.shared#FooEnumMap$value */ =>  {
   36         -
                v = Some(
   37         -
                    Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   38         -
                        crate::types::FooEnum::from(
   39         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   40         -
                        )
   41         -
                    )
   42         -
                    ?
   43         -
                )
   44         -
            }
          50  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("value") /* value aws.protocoltests.shared#FooEnumMap$value */ =>  {
          51  +
                /* XmlBindingTraitParserGenerator.kt:646 */v = Some(
          52  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          53  +
                        /* XmlBindingTraitParserGenerator.kt:741 */crate::types::FooEnum::from(
          54  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          55  +
                        /* XmlBindingTraitParserGenerator.kt:741 */)
          56  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
          57  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          58  +
                /* XmlBindingTraitParserGenerator.kt:646 */)
          59  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   45     60   
            ,
   46         -
            _ => {}
   47         -
        }
          61  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          62  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          63  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   48     64   
    }
          65  +
    /* XmlBindingTraitParserGenerator.kt:652 */
   49     66   
    let k = k.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing key map entry"))?;
   50     67   
    let v = v.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing value map entry"))?;
   51     68   
    out.insert(k, v);
   52     69   
    Ok(())
          70  +
    /* XmlBindingTraitParserGenerator.kt:628 */
   53     71   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_foo_enum_set.rs

@@ -1,1 +23,30 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitParserGenerator.kt:546 */
    2      3   
pub fn de_foo_enum_set(
    3      4   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<crate::types::FooEnum>, ::aws_smithy_xml::decode::XmlDecodeError> {
           6  +
    /* XmlBindingTraitParserGenerator.kt:551 */
    5      7   
    let mut out = std::vec::Vec::new();
           8  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    6      9   
    while let Some(mut tag) = decoder.next_tag() {
          10  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    7     11   
        match tag.start_el() {
    8         -
            s if s.matches("member") /* member aws.protocoltests.shared#FooEnumSet$member */ =>  {
    9         -
                out.push(
   10         -
                    Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   11         -
                        crate::types::FooEnum::from(
   12         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   13         -
                        )
   14         -
                    )
   15         -
                    ?
   16         -
                );
   17         -
            }
          12  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("member") /* member aws.protocoltests.shared#FooEnumSet$member */ =>  {
          13  +
                /* XmlBindingTraitParserGenerator.kt:554 */out.push(
          14  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<crate::types::FooEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          15  +
                        /* XmlBindingTraitParserGenerator.kt:741 */crate::types::FooEnum::from(
          16  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          17  +
                        /* XmlBindingTraitParserGenerator.kt:741 */)
          18  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
          19  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          20  +
                /* XmlBindingTraitParserGenerator.kt:554 */);
          21  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   18     22   
            ,
   19         -
            _ => {}
   20         -
        }
          23  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          24  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          25  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   21     26   
    }
          27  +
    /* XmlBindingTraitParserGenerator.kt:559 */
   22     28   
    Ok(out)
          29  +
    /* XmlBindingTraitParserGenerator.kt:546 */
   23     30   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_fractional_seconds.rs

@@ -1,1 +69,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_fractional_seconds_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::fractional_seconds::FractionalSecondsOutput, crate::operation::fractional_seconds::FractionalSecondsError>
    8     10   
{
          11  +
    /* RustType.kt:516 */
    9     12   
    #[allow(unused_mut)]
          13  +
    /* ProtocolParserGenerator.kt:106 */
   10     14   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11     15   
        .map_err(crate::operation::fractional_seconds::FractionalSecondsError::unhandled)?;
          16  +
    /* ProtocolParserGenerator.kt:120 */
   12     17   
    let generic = generic_builder.build();
          18  +
    /* ProtocolParserGenerator.kt:185 */
   13     19   
    Err(crate::operation::fractional_seconds::FractionalSecondsError::generic(generic))
          20  +
    /* ProtocolParserGenerator.kt:99 */
   14     21   
}
   15     22   
          23  +
/* RustType.kt:516 */
   16     24   
#[allow(clippy::unnecessary_wraps)]
          25  +
/* ProtocolParserGenerator.kt:71 */
   17     26   
pub fn de_fractional_seconds_http_response(
   18     27   
    _response_status: u16,
   19     28   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   20     29   
    _response_body: &[u8],
   21     30   
) -> std::result::Result<crate::operation::fractional_seconds::FractionalSecondsOutput, crate::operation::fractional_seconds::FractionalSecondsError>
   22     31   
{
          32  +
    /* ProtocolParserGenerator.kt:77 */
   23     33   
    Ok({
          34  +
        /* RustType.kt:516 */
   24     35   
        #[allow(unused_mut)]
          36  +
        /* ProtocolParserGenerator.kt:240 */
   25     37   
        let mut output = crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder::default();
          38  +
        /* ProtocolParserGenerator.kt:247 */
   26     39   
        output = crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds(_response_body, output)
   27     40   
            .map_err(crate::operation::fractional_seconds::FractionalSecondsError::unhandled)?;
          41  +
        /* ClientBuilderInstantiator.kt:56 */
   28     42   
        output.build()
          43  +
        /* ProtocolParserGenerator.kt:77 */
   29     44   
    })
          45  +
    /* ProtocolParserGenerator.kt:71 */
   30     46   
}
   31     47   
          48  +
/* RustType.kt:516 */
   32     49   
#[allow(unused_mut)]
          50  +
/* XmlBindingTraitParserGenerator.kt:189 */
   33     51   
pub fn de_fractional_seconds(
   34     52   
    inp: &[u8],
   35     53   
    mut builder: crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder,
   36     54   
) -> std::result::Result<crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          55  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   37     56   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   38     57   
   39     58   
    #[allow(unused_mut)]
   40     59   
    let mut decoder = doc.root_element()?;
   41     60   
    #[allow(unused_variables)]
   42     61   
    let start_el = decoder.start_el();
          62  +
    /* Ec2QueryParserGenerator.kt:35 */
   43     63   
    if !(start_el.matches("FractionalSecondsResponse")) {
   44     64   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   45     65   
            "invalid root, expected FractionalSecondsResponse got {:?}",
   46     66   
            start_el
   47     67   
        )));
   48     68   
    }
          69  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   49     70   
    while let Some(mut tag) = decoder.next_tag() {
          71  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   50     72   
        match tag.start_el() {
   51         -
            s if s.matches("datetime") /* datetime aws.protocoltests.ec2.synthetic#FractionalSecondsOutput$datetime */ =>  {
   52         -
                let var_1 =
   53         -
                    Some(
   54         -
                        ::aws_smithy_types::DateTime::from_str(
   55         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   56         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   57         -
                        )
   58         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
   59         -
                        ?
   60         -
                    )
   61         -
                ;
   62         -
                builder = builder.set_datetime(var_1);
   63         -
            }
          73  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("datetime") /* datetime aws.protocoltests.ec2.synthetic#FractionalSecondsOutput$datetime */ =>  {
          74  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          75  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          76  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
          77  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          78  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
          79  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
          80  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
          81  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          82  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          83  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          84  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_datetime(var_1);
          85  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   64     86   
            ,
   65         -
            _ => {}
   66         -
        }
          87  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          88  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          89  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   67     90   
    }
          91  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   68     92   
    Ok(builder)
          93  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   69     94   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_fractional_seconds_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_fractional_seconds_input_input_input(
    3      4   
    input: &crate::operation::fractional_seconds::FractionalSecondsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "FractionalSeconds", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_greeting_struct.rs

@@ -1,1 +13,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(unused_mut)]
           4  +
/* QuerySerializerGenerator.kt:177 */
    3      5   
pub fn ser_greeting_struct(
    4      6   
    mut writer: ::aws_smithy_query::QueryValueWriter,
    5      7   
    input: &crate::types::GreetingStruct,
    6      8   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           9  +
    /* RustType.kt:516 */
    7     10   
    #[allow(unused_mut)]
          11  +
    /* QuerySerializerGenerator.kt:279 */
    8     12   
    let mut scope_1 = writer.prefix("Hi");
          13  +
    /* QuerySerializerGenerator.kt:206 */
    9     14   
    if let Some(var_2) = &input.hi {
          15  +
        /* QuerySerializerGenerator.kt:230 */
   10     16   
        scope_1.string(var_2);
          17  +
        /* QuerySerializerGenerator.kt:206 */
   11     18   
    }
          19  +
    /* QuerySerializerGenerator.kt:183 */
   12     20   
    Ok(())
          21  +
    /* QuerySerializerGenerator.kt:177 */
   13     22   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_greeting_with_errors.rs

@@ -1,1 +108,146 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_greeting_with_errors_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
    9     11   
    crate::operation::greeting_with_errors::GreetingWithErrorsError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:122 */
   15     21   
    let error_code = match generic.code() {
   16     22   
        Some(code) => code,
   17     23   
        None => return Err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled(generic)),
   18     24   
    };
   19     25   
   20     26   
    let _error_message = generic.message().map(|msg| msg.to_owned());
          27  +
    /* ProtocolParserGenerator.kt:133 */
   21     28   
    Err(match error_code {
          29  +
        /* ProtocolParserGenerator.kt:139 */
   22     30   
        "InvalidGreeting" => crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting({
          31  +
            /* RustType.kt:516 */
   23     32   
            #[allow(unused_mut)]
   24         -
            let mut tmp = {
   25         -
                #[allow(unused_mut)]
   26         -
                let mut output = crate::types::error::builders::InvalidGreetingBuilder::default();
   27         -
                output = crate::protocol_serde::shape_invalid_greeting::de_invalid_greeting_xml_err(_response_body, output)
   28         -
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   29         -
                let output = output.meta(generic);
   30         -
                output.build()
   31         -
            };
          33  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          34  +
                /* ProtocolParserGenerator.kt:146 */ {
          35  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          36  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::InvalidGreetingBuilder::default();
          37  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_invalid_greeting::de_invalid_greeting_xml_err(_response_body, output).map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          38  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          39  +
                    /* ClientBuilderInstantiator.kt:56 */output.build()
          40  +
                /* ProtocolParserGenerator.kt:146 */}
          41  +
            /* ProtocolParserGenerator.kt:145 */;
          42  +
            /* ProtocolParserGenerator.kt:170 */
   32     43   
            if tmp.message.is_none() {
   33     44   
                tmp.message = _error_message;
   34     45   
            }
          46  +
            /* ProtocolParserGenerator.kt:179 */
   35     47   
            tmp
          48  +
            /* ProtocolParserGenerator.kt:139 */
   36     49   
        }),
          50  +
        /* ProtocolParserGenerator.kt:139 */
   37     51   
        "ComplexError" => crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError({
          52  +
            /* RustType.kt:516 */
   38     53   
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::ComplexErrorBuilder::default();
   42         -
                output = crate::protocol_serde::shape_complex_error::de_complex_error_xml_err(_response_body, output)
   43         -
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                output.build()
   46         -
            };
          54  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          55  +
                /* ProtocolParserGenerator.kt:146 */ {
          56  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          57  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ComplexErrorBuilder::default();
          58  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_complex_error::de_complex_error_xml_err(_response_body, output).map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          59  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          60  +
                    /* ClientBuilderInstantiator.kt:56 */output.build()
          61  +
                /* ProtocolParserGenerator.kt:146 */}
          62  +
            /* ProtocolParserGenerator.kt:145 */;
          63  +
            /* ProtocolParserGenerator.kt:179 */
   47     64   
            tmp
          65  +
            /* ProtocolParserGenerator.kt:139 */
   48     66   
        }),
   49         -
        _ => crate::operation::greeting_with_errors::GreetingWithErrorsError::generic(generic),
          67  +
        /* ProtocolParserGenerator.kt:182 */
          68  +
        _ => crate::operation::greeting_with_errors::GreetingWithErrorsError::generic(generic), /* ProtocolParserGenerator.kt:133 */
   50     69   
    })
          70  +
    /* ProtocolParserGenerator.kt:99 */
   51     71   
}
   52     72   
          73  +
/* RustType.kt:516 */
   53     74   
#[allow(clippy::unnecessary_wraps)]
          75  +
/* ProtocolParserGenerator.kt:71 */
   54     76   
pub fn de_greeting_with_errors_http_response(
   55     77   
    _response_status: u16,
   56     78   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   57     79   
    _response_body: &[u8],
   58     80   
) -> std::result::Result<
   59     81   
    crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
   60     82   
    crate::operation::greeting_with_errors::GreetingWithErrorsError,
   61     83   
> {
          84  +
    /* ProtocolParserGenerator.kt:77 */
   62     85   
    Ok({
          86  +
        /* RustType.kt:516 */
   63     87   
        #[allow(unused_mut)]
          88  +
        /* ProtocolParserGenerator.kt:240 */
   64     89   
        let mut output = crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder::default();
          90  +
        /* ProtocolParserGenerator.kt:247 */
   65     91   
        output = crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors(_response_body, output)
   66     92   
            .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
          93  +
        /* ClientBuilderInstantiator.kt:56 */
   67     94   
        output.build()
          95  +
        /* ProtocolParserGenerator.kt:77 */
   68     96   
    })
          97  +
    /* ProtocolParserGenerator.kt:71 */
   69     98   
}
   70     99   
         100  +
/* RustType.kt:516 */
   71    101   
#[allow(unused_mut)]
         102  +
/* XmlBindingTraitParserGenerator.kt:189 */
   72    103   
pub fn de_greeting_with_errors(
   73    104   
    inp: &[u8],
   74    105   
    mut builder: crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder,
   75    106   
) -> std::result::Result<crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError>
   76    107   
{
         108  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   77    109   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   78    110   
   79    111   
    #[allow(unused_mut)]
   80    112   
    let mut decoder = doc.root_element()?;
   81    113   
    #[allow(unused_variables)]
   82    114   
    let start_el = decoder.start_el();
         115  +
    /* Ec2QueryParserGenerator.kt:35 */
   83    116   
    if !(start_el.matches("GreetingWithErrorsResponse")) {
   84    117   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   85    118   
            "invalid root, expected GreetingWithErrorsResponse got {:?}",
   86    119   
            start_el
   87    120   
        )));
   88    121   
    }
         122  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   89    123   
    while let Some(mut tag) = decoder.next_tag() {
         124  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   90    125   
        match tag.start_el() {
   91         -
            s if s.matches("greeting") /* greeting aws.protocoltests.ec2.synthetic#GreetingWithErrorsOutput$greeting */ =>  {
   92         -
                let var_1 =
   93         -
                    Some(
   94         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   95         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   96         -
                            .into()
   97         -
                        )
   98         -
                        ?
   99         -
                    )
  100         -
                ;
  101         -
                builder = builder.set_greeting(var_1);
  102         -
            }
         126  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("greeting") /* greeting aws.protocoltests.ec2.synthetic#GreetingWithErrorsOutput$greeting */ =>  {
         127  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
         128  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         129  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
         130  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         131  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
         132  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
         133  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         134  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         135  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         136  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_greeting(var_1);
         137  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
  103    138   
            ,
  104         -
            _ => {}
  105         -
        }
         139  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
         140  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
         141  +
        /* XmlBindingTraitParserGenerator.kt:352 */
  106    142   
    }
         143  +
    /* XmlBindingTraitParserGenerator.kt:213 */
  107    144   
    Ok(builder)
         145  +
    /* XmlBindingTraitParserGenerator.kt:189 */
  108    146   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_greeting_with_errors_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_greeting_with_errors_input_input_input(
    3      4   
    input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "GreetingWithErrors", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_host_with_path_operation.rs

@@ -1,1 +32,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_host_with_path_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::host_with_path_operation::HostWithPathOperationOutput,
    9     11   
    crate::operation::host_with_path_operation::HostWithPathOperationError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::host_with_path_operation::HostWithPathOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::host_with_path_operation::HostWithPathOperationError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_host_with_path_operation_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::host_with_path_operation::HostWithPathOperationOutput,
   25     34   
    crate::operation::host_with_path_operation::HostWithPathOperationError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::host_with_path_operation::builders::HostWithPathOperationOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_host_with_path_operation_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_host_with_path_operation_input_input_input(
    3      4   
    input: &crate::operation::host_with_path_operation::HostWithPathOperationInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "HostWithPathOperation", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_ignores_wrapping_xml_name.rs

@@ -1,1 +75,100 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_ignores_wrapping_xml_name_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
    9     11   
    crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_ignores_wrapping_xml_name_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   25     34   
    crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_ignores_wrapping_xml_name::de_ignores_wrapping_xml_name(_response_body, output)
   31     44   
            .map_err(crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError::unhandled)?;
          45  +
        /* ClientBuilderInstantiator.kt:56 */
   32     46   
        output.build()
          47  +
        /* ProtocolParserGenerator.kt:77 */
   33     48   
    })
          49  +
    /* ProtocolParserGenerator.kt:71 */
   34     50   
}
   35     51   
          52  +
/* RustType.kt:516 */
   36     53   
#[allow(unused_mut)]
          54  +
/* XmlBindingTraitParserGenerator.kt:189 */
   37     55   
pub fn de_ignores_wrapping_xml_name(
   38     56   
    inp: &[u8],
   39     57   
    mut builder: crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder,
   40     58   
) -> std::result::Result<
   41     59   
    crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameOutputBuilder,
   42     60   
    ::aws_smithy_xml::decode::XmlDecodeError,
   43     61   
> {
          62  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   44     63   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   45     64   
   46     65   
    #[allow(unused_mut)]
   47     66   
    let mut decoder = doc.root_element()?;
   48     67   
    #[allow(unused_variables)]
   49     68   
    let start_el = decoder.start_el();
          69  +
    /* Ec2QueryParserGenerator.kt:35 */
   50     70   
    if !(start_el.matches("IgnoresWrappingXmlNameResponse")) {
   51     71   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   52     72   
            "invalid root, expected IgnoresWrappingXmlNameResponse got {:?}",
   53     73   
            start_el
   54     74   
        )));
   55     75   
    }
          76  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   56     77   
    while let Some(mut tag) = decoder.next_tag() {
          78  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   57     79   
        match tag.start_el() {
   58         -
            s if s.matches("foo") /* foo aws.protocoltests.ec2.synthetic#IgnoresWrappingXmlNameOutput$foo */ =>  {
   59         -
                let var_1 =
   60         -
                    Some(
   61         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   62         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   63         -
                            .into()
   64         -
                        )
   65         -
                        ?
   66         -
                    )
   67         -
                ;
   68         -
                builder = builder.set_foo(var_1);
   69         -
            }
          80  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("foo") /* foo aws.protocoltests.ec2.synthetic#IgnoresWrappingXmlNameOutput$foo */ =>  {
          81  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          82  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          83  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          84  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          85  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          86  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          87  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          88  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          89  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          90  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_foo(var_1);
          91  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   70     92   
            ,
   71         -
            _ => {}
   72         -
        }
          93  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          94  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          95  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   73     96   
    }
          97  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   74     98   
    Ok(builder)
          99  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   75    100   
}

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/protocol_serde/shape_ignores_wrapping_xml_name_input.rs

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_ignores_wrapping_xml_name_input_input_input(
    3      4   
    input: &crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "IgnoresWrappingXmlName", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}