Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_namespace_nested.rs

@@ -1,1 +37,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::needless_question_mark)]
           4  +
/* XmlBindingTraitParserGenerator.kt:510 */
    3      5   
pub fn de_xml_namespace_nested(
    4      6   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    5      7   
) -> ::std::result::Result<crate::types::XmlNamespaceNested, ::aws_smithy_xml::decode::XmlDecodeError> {
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* XmlBindingTraitParserGenerator.kt:515 */
    7     11   
    let mut builder = crate::types::XmlNamespaceNested::builder();
          12  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    8     13   
    while let Some(mut tag) = decoder.next_tag() {
          14  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    9     15   
        match tag.start_el() {
   10         -
            s if s.matches("foo") /* foo aws.protocoltests.query#XmlNamespaceNested$foo */ =>  {
   11         -
                let var_1 =
   12         -
                    Some(
   13         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   14         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   15         -
                            .into()
   16         -
                        )
   17         -
                        ?
   18         -
                    )
   19         -
                ;
   20         -
                builder = builder.set_foo(var_1);
   21         -
            }
          16  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("foo") /* foo aws.protocoltests.query#XmlNamespaceNested$foo */ =>  {
          17  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          18  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          19  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          20  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          21  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          22  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          23  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          24  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          25  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          26  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_foo(var_1);
          27  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   22     28   
            ,
   23         -
            s if s.matches("values") /* values aws.protocoltests.query#XmlNamespaceNested$values */ =>  {
   24         -
                let var_2 =
   25         -
                    Some(
   26         -
                        crate::protocol_serde::shape_xml_namespaced_list::de_xml_namespaced_list(&mut tag)
   27         -
                        ?
   28         -
                    )
   29         -
                ;
   30         -
                builder = builder.set_values(var_2);
   31         -
            }
          29  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("values") /* values aws.protocoltests.query#XmlNamespaceNested$values */ =>  {
          30  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          31  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          32  +
                        /* XmlBindingTraitParserGenerator.kt:562 */crate::protocol_serde::shape_xml_namespaced_list::de_xml_namespaced_list(&mut tag)
          33  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          34  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          35  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          36  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_values(var_2);
          37  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   32     38   
            ,
   33         -
            _ => {}
   34         -
        }
          39  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          40  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          41  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   35     42   
    }
          43  +
    /* XmlBindingTraitParserGenerator.kt:533 */
   36     44   
    Ok(builder.build())
          45  +
    /* XmlBindingTraitParserGenerator.kt:510 */
   37     46   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_namespaced_list.rs

@@ -1,1 +22,29 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitParserGenerator.kt:546 */
    2      3   
pub fn de_xml_namespaced_list(
    3      4   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<::std::string::String>, ::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.query#XmlNamespacedList$member */ =>  {
    9         -
                out.push(
   10         -
                    Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   11         -
                        ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   12         -
                        .into()
   13         -
                    )
   14         -
                    ?
   15         -
                );
   16         -
            }
          12  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("member") /* member aws.protocoltests.query#XmlNamespacedList$member */ =>  {
          13  +
                /* XmlBindingTraitParserGenerator.kt:554 */out.push(
          14  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          15  +
                        /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          16  +
                        /* XmlBindingTraitParserGenerator.kt:748 */.into()
          17  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
          18  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          19  +
                /* XmlBindingTraitParserGenerator.kt:554 */);
          20  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   17     21   
            ,
   18         -
            _ => {}
   19         -
        }
          22  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          23  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          24  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   20     25   
    }
          26  +
    /* XmlBindingTraitParserGenerator.kt:559 */
   21     27   
    Ok(out)
          28  +
    /* XmlBindingTraitParserGenerator.kt:546 */
   22     29   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_namespaces.rs

@@ -1,1 +74,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_xml_namespaces_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::xml_namespaces::XmlNamespacesOutput, crate::operation::xml_namespaces::XmlNamespacesError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::xml_namespaces::XmlNamespacesError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::xml_namespaces::XmlNamespacesError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_xml_namespaces_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::xml_namespaces::XmlNamespacesOutput, crate::operation::xml_namespaces::XmlNamespacesError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_xml_namespaces::de_xml_namespaces(_response_body, output)
   25     38   
            .map_err(crate::operation::xml_namespaces::XmlNamespacesError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* RustType.kt:516 */
   30     47   
#[allow(unused_mut)]
          48  +
/* XmlBindingTraitParserGenerator.kt:189 */
   31     49   
pub fn de_xml_namespaces(
   32     50   
    inp: &[u8],
   33     51   
    mut builder: crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder,
   34     52   
) -> std::result::Result<crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          53  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   35     54   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   36     55   
   37     56   
    #[allow(unused_mut)]
   38     57   
    let mut decoder = doc.root_element()?;
   39     58   
    #[allow(unused_variables)]
   40     59   
    let start_el = decoder.start_el();
          60  +
    /* AwsQueryParserGenerator.kt:38 */
   41     61   
    if !(start_el.matches("XmlNamespacesResponse")) {
   42     62   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   43     63   
            "invalid root, expected XmlNamespacesResponse got {:?}",
   44     64   
            start_el
   45     65   
        )));
   46     66   
    }
   47     67   
    if let Some(mut result_tag) = decoder.next_tag() {
   48     68   
        let start_el = result_tag.start_el();
   49     69   
        if !(start_el.matches("XmlNamespacesResult")) {
   50     70   
            return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   51     71   
                "invalid result, expected XmlNamespacesResult got {:?}",
   52     72   
                start_el
   53     73   
            )));
   54     74   
        }
          75  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   55     76   
        while let Some(mut tag) = result_tag.next_tag() {
          77  +
            /* XmlBindingTraitParserGenerator.kt:353 */
   56     78   
            match tag.start_el() {
   57         -
            s if s.matches("nested") /* nested aws.protocoltests.query.synthetic#XmlNamespacesOutput$nested */ =>  {
   58         -
                let var_1 =
   59         -
                    Some(
   60         -
                        crate::protocol_serde::shape_xml_namespace_nested::de_xml_namespace_nested(&mut tag)
   61         -
                        ?
   62         -
                    )
   63         -
                ;
   64         -
                builder = builder.set_nested(var_1);
   65         -
            }
          79  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("nested") /* nested aws.protocoltests.query.synthetic#XmlNamespacesOutput$nested */ =>  {
          80  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          81  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          82  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_xml_namespace_nested::de_xml_namespace_nested(&mut tag)
          83  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          84  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          85  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          86  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_1);
          87  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   66     88   
            ,
   67         -
            _ => {}
   68         -
        }
          89  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          90  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          91  +
            /* XmlBindingTraitParserGenerator.kt:352 */
   69     92   
        }
          93  +
    /* AwsQueryParserGenerator.kt:52 */
   70     94   
    } else {
   71     95   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("expected XmlNamespacesResult tag"));
   72     96   
    };
          97  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   73     98   
    Ok(builder)
          99  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   74    100   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_namespaces_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_xml_namespaces_input_input_input(
    3      4   
    input: &crate::operation::xml_namespaces::XmlNamespacesInput,
    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, "XmlNamespaces", "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/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_timestamps.rs

@@ -1,1 +162,188 @@
    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_xml_timestamps_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::xml_timestamps::XmlTimestampsOutput, crate::operation::xml_timestamps::XmlTimestampsError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::xml_timestamps::XmlTimestampsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::xml_timestamps::XmlTimestampsError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_xml_timestamps_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::xml_timestamps::XmlTimestampsOutput, crate::operation::xml_timestamps::XmlTimestampsError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_xml_timestamps::de_xml_timestamps(_response_body, output)
   25     38   
            .map_err(crate::operation::xml_timestamps::XmlTimestampsError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* RustType.kt:516 */
   30     47   
#[allow(unused_mut)]
          48  +
/* XmlBindingTraitParserGenerator.kt:189 */
   31     49   
pub fn de_xml_timestamps(
   32     50   
    inp: &[u8],
   33     51   
    mut builder: crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder,
   34     52   
) -> std::result::Result<crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          53  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   35     54   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   36     55   
   37     56   
    #[allow(unused_mut)]
   38     57   
    let mut decoder = doc.root_element()?;
   39     58   
    #[allow(unused_variables)]
   40     59   
    let start_el = decoder.start_el();
          60  +
    /* AwsQueryParserGenerator.kt:38 */
   41     61   
    if !(start_el.matches("XmlTimestampsResponse")) {
   42     62   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   43     63   
            "invalid root, expected XmlTimestampsResponse got {:?}",
   44     64   
            start_el
   45     65   
        )));
   46     66   
    }
   47     67   
    if let Some(mut result_tag) = decoder.next_tag() {
   48     68   
        let start_el = result_tag.start_el();
   49     69   
        if !(start_el.matches("XmlTimestampsResult")) {
   50     70   
            return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   51     71   
                "invalid result, expected XmlTimestampsResult got {:?}",
   52     72   
                start_el
   53     73   
            )));
   54     74   
        }
          75  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   55     76   
        while let Some(mut tag) = result_tag.next_tag() {
          77  +
            /* XmlBindingTraitParserGenerator.kt:353 */
   56     78   
            match tag.start_el() {
   57         -
            s if s.matches("normal") /* normal aws.protocoltests.query.synthetic#XmlTimestampsOutput$normal */ =>  {
   58         -
                let var_1 =
   59         -
                    Some(
   60         -
                        ::aws_smithy_types::DateTime::from_str(
   61         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   62         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   63         -
                        )
   64         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
   65         -
                        ?
   66         -
                    )
   67         -
                ;
   68         -
                builder = builder.set_normal(var_1);
   69         -
            }
          79  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("normal") /* normal aws.protocoltests.query.synthetic#XmlTimestampsOutput$normal */ =>  {
          80  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          81  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          82  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
          83  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          84  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
          85  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
          86  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
          87  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          88  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          89  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          90  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_normal(var_1);
          91  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   70     92   
            ,
   71         -
            s if s.matches("dateTime") /* dateTime aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTime */ =>  {
   72         -
                let var_2 =
   73         -
                    Some(
   74         -
                        ::aws_smithy_types::DateTime::from_str(
   75         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   76         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   77         -
                        )
   78         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
   79         -
                        ?
   80         -
                    )
   81         -
                ;
   82         -
                builder = builder.set_date_time(var_2);
   83         -
            }
          93  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("dateTime") /* dateTime aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTime */ =>  {
          94  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          95  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          96  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
          97  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          98  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
          99  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         100  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
         101  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         102  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         103  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         104  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_date_time(var_2);
         105  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   84    106   
            ,
   85         -
            s if s.matches("dateTimeOnTarget") /* dateTimeOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTimeOnTarget */ =>  {
   86         -
                let var_3 =
   87         -
                    Some(
   88         -
                        ::aws_smithy_types::DateTime::from_str(
   89         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   90         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   91         -
                        )
   92         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
   93         -
                        ?
   94         -
                    )
   95         -
                ;
   96         -
                builder = builder.set_date_time_on_target(var_3);
   97         -
            }
         107  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("dateTimeOnTarget") /* dateTimeOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTimeOnTarget */ =>  {
         108  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_3 =
         109  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         110  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         111  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         112  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
         113  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         114  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
         115  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         116  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         117  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         118  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_date_time_on_target(var_3);
         119  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   98    120   
            ,
   99         -
            s if s.matches("epochSeconds") /* epochSeconds aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSeconds */ =>  {
  100         -
                let var_4 =
  101         -
                    Some(
  102         -
                        ::aws_smithy_types::DateTime::from_str(
  103         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
  104         -
                            , ::aws_smithy_types::date_time::Format::EpochSeconds
  105         -
                        )
  106         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
  107         -
                        ?
  108         -
                    )
  109         -
                ;
  110         -
                builder = builder.set_epoch_seconds(var_4);
  111         -
            }
         121  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("epochSeconds") /* epochSeconds aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSeconds */ =>  {
         122  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_4 =
         123  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         124  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         125  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         126  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::EpochSeconds
         127  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         128  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
         129  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         130  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         131  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         132  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_epoch_seconds(var_4);
         133  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
  112    134   
            ,
  113         -
            s if s.matches("epochSecondsOnTarget") /* epochSecondsOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSecondsOnTarget */ =>  {
  114         -
                let var_5 =
  115         -
                    Some(
  116         -
                        ::aws_smithy_types::DateTime::from_str(
  117         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
  118         -
                            , ::aws_smithy_types::date_time::Format::EpochSeconds
  119         -
                        )
  120         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#EpochSeconds`)"))
  121         -
                        ?
  122         -
                    )
  123         -
                ;
  124         -
                builder = builder.set_epoch_seconds_on_target(var_5);
  125         -
            }
         135  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("epochSecondsOnTarget") /* epochSecondsOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSecondsOnTarget */ =>  {
         136  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_5 =
         137  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         138  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         139  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         140  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::EpochSeconds
         141  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         142  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#EpochSeconds`)"))
         143  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         144  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         145  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         146  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_epoch_seconds_on_target(var_5);
         147  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
  126    148   
            ,
  127         -
            s if s.matches("httpDate") /* httpDate aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDate */ =>  {
  128         -
                let var_6 =
  129         -
                    Some(
  130         -
                        ::aws_smithy_types::DateTime::from_str(
  131         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
  132         -
                            , ::aws_smithy_types::date_time::Format::HttpDate
  133         -
                        )
  134         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
  135         -
                        ?
  136         -
                    )
  137         -
                ;
  138         -
                builder = builder.set_http_date(var_6);
  139         -
            }
         149  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("httpDate") /* httpDate aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDate */ =>  {
         150  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_6 =
         151  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         152  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         153  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         154  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::HttpDate
         155  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         156  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
         157  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         158  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         159  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         160  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_http_date(var_6);
         161  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
  140    162   
            ,
  141         -
            s if s.matches("httpDateOnTarget") /* httpDateOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDateOnTarget */ =>  {
  142         -
                let var_7 =
  143         -
                    Some(
  144         -
                        ::aws_smithy_types::DateTime::from_str(
  145         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
  146         -
                            , ::aws_smithy_types::date_time::Format::HttpDate
  147         -
                        )
  148         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#HttpDate`)"))
  149         -
                        ?
  150         -
                    )
  151         -
                ;
  152         -
                builder = builder.set_http_date_on_target(var_7);
  153         -
            }
         163  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("httpDateOnTarget") /* httpDateOnTarget aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDateOnTarget */ =>  {
         164  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_7 =
         165  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
         166  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         167  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
         168  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::HttpDate
         169  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
         170  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#HttpDate`)"))
         171  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
         172  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
         173  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
         174  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_http_date_on_target(var_7);
         175  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
  154    176   
            ,
  155         -
            _ => {}
  156         -
        }
         177  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
         178  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
         179  +
            /* XmlBindingTraitParserGenerator.kt:352 */
  157    180   
        }
         181  +
    /* AwsQueryParserGenerator.kt:52 */
  158    182   
    } else {
  159    183   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("expected XmlTimestampsResult tag"));
  160    184   
    };
         185  +
    /* XmlBindingTraitParserGenerator.kt:213 */
  161    186   
    Ok(builder)
         187  +
    /* XmlBindingTraitParserGenerator.kt:189 */
  162    188   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/protocol_serde/shape_xml_timestamps_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_xml_timestamps_input_input_input(
    3      4   
    input: &crate::operation::xml_timestamps::XmlTimestampsInput,
    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, "XmlTimestamps", "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/aws_query/rust-client-codegen/src/types.rs

@@ -1,1 +46,66 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorData;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_xml_namespace_nested::XmlNamespaceNested;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_recursive_xml_shapes_output_nested1::RecursiveXmlShapesOutputNested1;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_recursive_xml_shapes_output_nested2::RecursiveXmlShapesOutputNested2;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_foo_enum::FooEnum;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_structure_list_member::StructureListMember;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::_greeting_struct::GreetingStruct;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::_nested_struct_with_map::NestedStructWithMap;
   17     25   
          26  +
/* CodegenDelegator.kt:255 */
   18     27   
pub use crate::types::_nested_struct_with_list::NestedStructWithList;
   19     28   
          29  +
/* CodegenDelegator.kt:255 */
   20     30   
pub use crate::types::_struct_arg::StructArg;
   21     31   
          32  +
/* RustModule.kt:172 */
   22     33   
mod _complex_nested_error_data;
   23     34   
          35  +
/* RustModule.kt:172 */
   24     36   
mod _foo_enum;
   25     37   
          38  +
/* RustModule.kt:172 */
   26     39   
mod _greeting_struct;
   27     40   
          41  +
/* RustModule.kt:172 */
   28     42   
mod _nested_struct_with_list;
   29     43   
          44  +
/* RustModule.kt:172 */
   30     45   
mod _nested_struct_with_map;
   31     46   
          47  +
/* RustModule.kt:172 */
   32     48   
mod _recursive_xml_shapes_output_nested1;
   33     49   
          50  +
/* RustModule.kt:172 */
   34     51   
mod _recursive_xml_shapes_output_nested2;
   35     52   
          53  +
/* RustModule.kt:172 */
   36     54   
mod _struct_arg;
   37     55   
          56  +
/* RustModule.kt:172 */
   38     57   
mod _structure_list_member;
   39     58   
          59  +
/* RustModule.kt:172 */
   40     60   
mod _xml_namespace_nested;
   41     61   
   42         -
/// Builders
          62  +
/// /* CodegenDelegator.kt:51 */Builders
   43     63   
pub mod builders;
   44     64   
   45         -
/// Error types that Sample Query Protocol Service can respond with.
          65  +
/// /* ClientRustModule.kt:121 */Error types that Sample Query Protocol Service can respond with.
   46     66   
pub mod error;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_complex_nested_error_data.rs

@@ -1,1 +47,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ComplexNestedErrorData {
           8  +
pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl ComplexNestedErrorData {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.foo.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl ComplexNestedErrorData {
   16         -
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::types::builders::ComplexNestedErrorDataBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::types::builders::ComplexNestedErrorDataBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct ComplexNestedErrorDataBuilder {
   26         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl ComplexNestedErrorDataBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.foo = ::std::option::Option::Some(input.into());
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.foo = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.foo
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::types::ComplexNestedErrorData {
   45         -
        crate::types::ComplexNestedErrorData { foo: self.foo }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::types::ComplexNestedErrorData {
          82  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_foo_enum.rs

@@ -1,1 +126,152 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// When writing a match expression against `FooEnum`, it is important to ensure
           2  +
/* ClientEnumGenerator.kt:234 */
           3  +
/// /* ClientEnumGenerator.kt:234 */When writing a match expression against `FooEnum`, it is important to ensure
    4      4   
/// your code is forward-compatible. That is, if a match arm handles a case for a
    5      5   
/// feature that is supported by the service but has not been represented as an enum
    6      6   
/// variant in a current version of SDK, your code should continue to work when you
    7      7   
/// upgrade SDK to a future version in which the enum does include a variant for that
    8      8   
/// feature.
    9         -
///
   10         -
/// Here is an example of how you can make a match expression forward-compatible:
   11         -
///
   12         -
/// ```text
           9  +
/// /* ClientEnumGenerator.kt:244 */
          10  +
/// /* ClientEnumGenerator.kt:245 */Here is an example of how you can make a match expression forward-compatible:
          11  +
/// /* ClientEnumGenerator.kt:246 */
          12  +
/// /* ClientEnumGenerator.kt:247 */```text
          13  +
/* ClientEnumGenerator.kt:248 */
   13     14   
/// # let fooenum = unimplemented!();
          15  +
/* ClientEnumGenerator.kt:249 */
   14     16   
/// match fooenum {
          17  +
/* ClientEnumGenerator.kt:251 */
   15     18   
///     FooEnum::Zero => { /* ... */ },
          19  +
/* ClientEnumGenerator.kt:251 */
   16     20   
///     FooEnum::One => { /* ... */ },
          21  +
/* ClientEnumGenerator.kt:251 */
   17     22   
///     FooEnum::Bar => { /* ... */ },
          23  +
/* ClientEnumGenerator.kt:251 */
   18     24   
///     FooEnum::Baz => { /* ... */ },
          25  +
/* ClientEnumGenerator.kt:251 */
   19     26   
///     FooEnum::Foo => { /* ... */ },
          27  +
/* ClientEnumGenerator.kt:253 */
   20     28   
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          29  +
/* ClientEnumGenerator.kt:254 */
   21     30   
///     _ => { /* ... */ },
          31  +
/* ClientEnumGenerator.kt:255 */
   22     32   
/// }
   23         -
/// ```
   24         -
/// The above code demonstrates that when `fooenum` represents
          33  +
/// /* ClientEnumGenerator.kt:256 */```
          34  +
/// /* ClientEnumGenerator.kt:257 */The above code demonstrates that when `fooenum` represents
   25     35   
/// `NewFeature`, the execution path will lead to the second last match arm,
   26     36   
/// even though the enum does not contain a variant `FooEnum::NewFeature`
   27     37   
/// in the current version of SDK. The reason is that the variable `other`,
   28     38   
/// created by the `@` operator, is bound to
   29     39   
/// `FooEnum::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
   30     40   
/// and calling `as_str` on it yields `"NewFeature"`.
   31     41   
/// This match expression is forward-compatible when executed with a newer
   32     42   
/// version of SDK where the variant `FooEnum::NewFeature` is defined.
   33     43   
/// Specifically, when `fooenum` represents `NewFeature`,
   34     44   
/// the execution path will hit the second last match arm as before by virtue of
   35     45   
/// calling `as_str` on `FooEnum::NewFeature` also yielding `"NewFeature"`.
   36         -
///
   37         -
/// Explicitly matching on the `Unknown` variant should
          46  +
/// /* ClientEnumGenerator.kt:273 */
          47  +
/// /* ClientEnumGenerator.kt:274 */Explicitly matching on the `Unknown` variant should
   38     48   
/// be avoided for two reasons:
   39     49   
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
   40     50   
/// - It might inadvertently shadow other intended match arms.
   41         -
///
          51  +
/// /* ClientEnumGenerator.kt:282 */
          52  +
/* EnumGenerator.kt:154 */
   42     53   
#[allow(missing_docs)] // documentation missing in model
          54  +
/* RustType.kt:516 */
   43     55   
#[non_exhaustive]
          56  +
/* RustType.kt:516 */
   44     57   
#[derive(
   45     58   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   46     59   
)]
   47         -
pub enum FooEnum {
   48         -
    #[allow(missing_docs)] // documentation missing in model
          60  +
pub /* EnumGenerator.kt:267 */ enum FooEnum {
          61  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          62  +
    /* EnumGenerator.kt:143 */
   49     63   
    Zero,
   50         -
    #[allow(missing_docs)] // documentation missing in model
          64  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          65  +
    /* EnumGenerator.kt:143 */
   51     66   
    One,
   52         -
    #[allow(missing_docs)] // documentation missing in model
          67  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          68  +
    /* EnumGenerator.kt:143 */
   53     69   
    Bar,
   54         -
    #[allow(missing_docs)] // documentation missing in model
          70  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          71  +
    /* EnumGenerator.kt:143 */
   55     72   
    Baz,
   56         -
    #[allow(missing_docs)] // documentation missing in model
          73  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          74  +
    /* EnumGenerator.kt:143 */
   57     75   
    Foo,
   58         -
    /// `Unknown` contains new variants that have been added since this code was generated.
          76  +
    /// /* ClientEnumGenerator.kt:175 */`Unknown` contains new variants that have been added since this code was generated.
          77  +
    /* ClientEnumGenerator.kt:176 */
   59     78   
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
   60         -
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          79  +
    /* ClientEnumGenerator.kt:179 */
          80  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), /* EnumGenerator.kt:267 */
   61     81   
}
          82  +
/* ClientEnumGenerator.kt:42 */
   62     83   
impl ::std::convert::From<&str> for FooEnum {
   63     84   
    fn from(s: &str) -> Self {
   64     85   
        match s {
   65     86   
            "0" => FooEnum::Zero,
   66     87   
            "1" => FooEnum::One,
   67     88   
            "Bar" => FooEnum::Bar,
   68     89   
            "Baz" => FooEnum::Baz,
   69     90   
            "Foo" => FooEnum::Foo,
   70     91   
            other => FooEnum::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
   71     92   
        }
   72     93   
    }
   73     94   
}
          95  +
/* ClientEnumGenerator.kt:68 */
   74     96   
impl ::std::str::FromStr for FooEnum {
   75     97   
    type Err = ::std::convert::Infallible;
   76     98   
   77     99   
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
   78    100   
        ::std::result::Result::Ok(FooEnum::from(s))
   79    101   
    }
   80    102   
}
         103  +
/* EnumGenerator.kt:274 */
   81    104   
impl FooEnum {
   82    105   
    /// Returns the `&str` value of the enum member.
   83    106   
    pub fn as_str(&self) -> &str {
   84    107   
        match self {
   85    108   
            FooEnum::Zero => "0",
   86    109   
            FooEnum::One => "1",
   87    110   
            FooEnum::Bar => "Bar",
   88    111   
            FooEnum::Baz => "Baz",
   89    112   
            FooEnum::Foo => "Foo",
   90    113   
            FooEnum::Unknown(value) => value.as_str(),
   91    114   
        }
   92    115   
    }
   93    116   
    /// Returns all the `&str` representations of the enum members.
   94    117   
    pub const fn values() -> &'static [&'static str] {
   95    118   
        &["0", "1", "Bar", "Baz", "Foo"]
   96    119   
    }
   97    120   
}
         121  +
/* EnumGenerator.kt:223 */
   98    122   
impl ::std::convert::AsRef<str> for FooEnum {
   99    123   
    fn as_ref(&self) -> &str {
  100    124   
        self.as_str()
  101    125   
    }
  102    126   
}
         127  +
/* ClientEnumGenerator.kt:117 */
  103    128   
impl FooEnum {
  104    129   
    /// Parses the enum value while disallowing unknown variants.
  105    130   
    ///
  106    131   
    /// Unknown variants will result in an error.
  107    132   
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
  108    133   
        match Self::from(value) {
  109    134   
            #[allow(deprecated)]
  110    135   
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
  111    136   
            known => Ok(known),
  112    137   
        }
  113    138   
    }
  114    139   
}
         140  +
/* ClientEnumGenerator.kt:136 */
  115    141   
impl ::std::fmt::Display for FooEnum {
  116    142   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  117    143   
        match self {
  118    144   
            FooEnum::Zero => write!(f, "0"),
  119    145   
            FooEnum::One => write!(f, "1"),
  120    146   
            FooEnum::Bar => write!(f, "Bar"),
  121    147   
            FooEnum::Baz => write!(f, "Baz"),
  122    148   
            FooEnum::Foo => write!(f, "Foo"),
  123    149   
            FooEnum::Unknown(value) => write!(f, "{}", value),
  124    150   
        }

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_greeting_struct.rs

@@ -1,1 +47,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct GreetingStruct {
           8  +
pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub hi: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl GreetingStruct {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn hi(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.hi.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl GreetingStruct {
   16         -
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::types::GreetingStruct).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::types::GreetingStruct).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::types::builders::GreetingStructBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::types::builders::GreetingStructBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`GreetingStruct`](crate::types::GreetingStruct).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`GreetingStruct`](crate::types::GreetingStruct).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct GreetingStructBuilder {
   26         -
    pub(crate) hi: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) hi: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl GreetingStructBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn hi(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.hi = ::std::option::Option::Some(input.into());
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.hi = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_hi(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.hi
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`GreetingStruct`](crate::types::GreetingStruct).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GreetingStruct`](crate::types::GreetingStruct).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::types::GreetingStruct {
   45         -
        crate::types::GreetingStruct { hi: self.hi }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::types::GreetingStruct {
          82  +
            /* BuilderGenerator.kt:481 */ hi: self.hi,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_nested_struct_with_list.rs

@@ -1,1 +54,99 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct NestedStructWithList {
           8  +
pub /* StructureGenerator.kt:201 */ struct NestedStructWithList {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub list_arg: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl NestedStructWithList {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
   11         -
    ///
   12         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list_arg.is_none()`.
          18  +
    /// /* StructureGenerator.kt:162 */
          19  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list_arg.is_none()`.
          20  +
    /* StructureGenerator.kt:166 */
   13     21   
    pub fn list_arg(&self) -> &[::std::string::String] {
   14         -
        self.list_arg.as_deref().unwrap_or_default()
          22  +
        /* StructureGenerator.kt:169 */
          23  +
        self.list_arg
          24  +
            .as_deref()
          25  +
            /* StructureGenerator.kt:175 */
          26  +
            .unwrap_or_default()
          27  +
        /* StructureGenerator.kt:166 */
   15     28   
    }
          29  +
    /* StructureGenerator.kt:135 */
   16     30   
}
          31  +
/* ClientCodegenVisitor.kt:237 */
   17     32   
impl NestedStructWithList {
   18         -
    /// Creates a new builder-style object to manufacture [`NestedStructWithList`](crate::types::NestedStructWithList).
          33  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NestedStructWithList`](crate::types::NestedStructWithList).
          34  +
    /* BuilderGenerator.kt:175 */
   19     35   
    pub fn builder() -> crate::types::builders::NestedStructWithListBuilder {
          36  +
        /* BuilderGenerator.kt:176 */
   20     37   
        crate::types::builders::NestedStructWithListBuilder::default()
          38  +
        /* BuilderGenerator.kt:175 */
   21     39   
    }
          40  +
    /* ClientCodegenVisitor.kt:237 */
   22     41   
}
   23     42   
   24         -
/// A builder for [`NestedStructWithList`](crate::types::NestedStructWithList).
          43  +
/// /* BuilderGenerator.kt:342 */A builder for [`NestedStructWithList`](crate::types::NestedStructWithList).
          44  +
/* RustType.kt:516 */
   25     45   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          46  +
/* RustType.kt:516 */
   26     47   
#[non_exhaustive]
          48  +
/* BuilderGenerator.kt:345 */
   27     49   
pub struct NestedStructWithListBuilder {
          50  +
    /* BuilderGenerator.kt:275 */
   28     51   
    pub(crate) list_arg: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          52  +
    /* BuilderGenerator.kt:345 */
   29     53   
}
          54  +
/* BuilderGenerator.kt:355 */
   30     55   
impl NestedStructWithListBuilder {
   31         -
    /// Appends an item to `list_arg`.
          56  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list_arg`.
          57  +
    /* BuilderGenerator.kt:411 */
   32     58   
    ///
   33         -
    /// To override the contents of this collection use [`set_list_arg`](Self::set_list_arg).
          59  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list_arg`](Self::set_list_arg).
          60  +
    /* BuilderGenerator.kt:413 */
   34     61   
    ///
          62  +
    /* BuilderGenerator.kt:418 */
   35     63   
    pub fn list_arg(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:419 */
   36     65   
        let mut v = self.list_arg.unwrap_or_default();
   37     66   
        v.push(input.into());
   38     67   
        self.list_arg = ::std::option::Option::Some(v);
   39     68   
        self
          69  +
        /* BuilderGenerator.kt:418 */
   40     70   
    }
          71  +
    /* BuilderGenerator.kt:312 */
   41     72   
    #[allow(missing_docs)] // documentation missing in model
          73  +
                           /* BuilderGenerator.kt:314 */
   42     74   
    pub fn set_list_arg(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
          75  +
        /* BuilderGenerator.kt:315 */
   43     76   
        self.list_arg = input;
   44     77   
        self
          78  +
        /* BuilderGenerator.kt:314 */
   45     79   
    }
          80  +
    /* BuilderGenerator.kt:334 */
   46     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* BuilderGenerator.kt:336 */
   47     83   
    pub fn get_list_arg(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
          84  +
        /* BuilderGenerator.kt:337 */
   48     85   
        &self.list_arg
          86  +
        /* BuilderGenerator.kt:336 */
   49     87   
    }
   50         -
    /// Consumes the builder and constructs a [`NestedStructWithList`](crate::types::NestedStructWithList).
          88  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NestedStructWithList`](crate::types::NestedStructWithList).
          89  +
    /* BuilderGenerator.kt:253 */
   51     90   
    pub fn build(self) -> crate::types::NestedStructWithList {
   52         -
        crate::types::NestedStructWithList { list_arg: self.list_arg }
          91  +
        /* BuilderGenerator.kt:477 */
          92  +
        crate::types::NestedStructWithList {
          93  +
            /* BuilderGenerator.kt:481 */ list_arg: self.list_arg,
          94  +
            /* BuilderGenerator.kt:477 */
          95  +
        }
          96  +
        /* BuilderGenerator.kt:253 */
   53     97   
    }
          98  +
    /* BuilderGenerator.kt:355 */
   54     99   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_nested_struct_with_map.rs

@@ -1,1 +52,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct NestedStructWithMap {
           8  +
pub /* StructureGenerator.kt:201 */ struct NestedStructWithMap {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub map_arg: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl NestedStructWithMap {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn map_arg(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.map_arg.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl NestedStructWithMap {
   16         -
    /// Creates a new builder-style object to manufacture [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::types::builders::NestedStructWithMapBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::types::builders::NestedStructWithMapBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct NestedStructWithMapBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) map_arg: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl NestedStructWithMapBuilder {
   29         -
    /// Adds a key-value pair to `map_arg`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `map_arg`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_map_arg`](Self::set_map_arg).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_map_arg`](Self::set_map_arg).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn map_arg(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.map_arg.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v.into());
   36     62   
        self.map_arg = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_map_arg(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
          70  +
        /* BuilderGenerator.kt:315 */
   41     71   
        self.map_arg = input;
   42     72   
        self
          73  +
        /* BuilderGenerator.kt:314 */
   43     74   
    }
          75  +
    /* BuilderGenerator.kt:334 */
   44     76   
    #[allow(missing_docs)] // documentation missing in model
          77  +
                           /* BuilderGenerator.kt:336 */
   45     78   
    pub fn get_map_arg(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          79  +
        /* BuilderGenerator.kt:337 */
   46     80   
        &self.map_arg
          81  +
        /* BuilderGenerator.kt:336 */
   47     82   
    }
   48         -
    /// Consumes the builder and constructs a [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          83  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NestedStructWithMap`](crate::types::NestedStructWithMap).
          84  +
    /* BuilderGenerator.kt:253 */
   49     85   
    pub fn build(self) -> crate::types::NestedStructWithMap {
   50         -
        crate::types::NestedStructWithMap { map_arg: self.map_arg }
          86  +
        /* BuilderGenerator.kt:477 */
          87  +
        crate::types::NestedStructWithMap {
          88  +
            /* BuilderGenerator.kt:481 */ map_arg: self.map_arg,
          89  +
            /* BuilderGenerator.kt:477 */
   51     90   
        }
          91  +
        /* BuilderGenerator.kt:253 */
          92  +
    }
          93  +
    /* BuilderGenerator.kt:355 */
   52     94   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_recursive_xml_shapes_output_nested1.rs

@@ -1,1 +71,130 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct RecursiveXmlShapesOutputNested1 {
           8  +
pub /* StructureGenerator.kt:201 */ struct RecursiveXmlShapesOutputNested1 {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub nested: ::std::option::Option<::std::boxed::Box<crate::types::RecursiveXmlShapesOutputNested2>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl RecursiveXmlShapesOutputNested1 {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn nested(&self) -> ::std::option::Option<&crate::types::RecursiveXmlShapesOutputNested2> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.nested.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl RecursiveXmlShapesOutputNested1 {
   22         -
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::RecursiveXmlShapesOutputNested1Builder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::RecursiveXmlShapesOutputNested1Builder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct RecursiveXmlShapesOutputNested1Builder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) nested: ::std::option::Option<::std::boxed::Box<crate::types::RecursiveXmlShapesOutputNested2>>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl RecursiveXmlShapesOutputNested1Builder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.foo = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.foo = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.foo
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:286 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:291 */
   51     93   
    pub fn nested(mut self, input: impl ::std::convert::Into<::std::boxed::Box<crate::types::RecursiveXmlShapesOutputNested2>>) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   52     95   
        self.nested = ::std::option::Option::Some(input.into());
          96  +
        /* BuilderGenerator.kt:293 */
   53     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   54     99   
    }
         100  +
    /* BuilderGenerator.kt:312 */
   55    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:314 */
   56    103   
    pub fn set_nested(mut self, input: ::std::option::Option<::std::boxed::Box<crate::types::RecursiveXmlShapesOutputNested2>>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   57    105   
        self.nested = input;
   58    106   
        self
         107  +
        /* BuilderGenerator.kt:314 */
   59    108   
    }
         109  +
    /* BuilderGenerator.kt:334 */
   60    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* BuilderGenerator.kt:336 */
   61    112   
    pub fn get_nested(&self) -> &::std::option::Option<::std::boxed::Box<crate::types::RecursiveXmlShapesOutputNested2>> {
         113  +
        /* BuilderGenerator.kt:337 */
   62    114   
        &self.nested
         115  +
        /* BuilderGenerator.kt:336 */
   63    116   
    }
   64         -
    /// Consumes the builder and constructs a [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
         118  +
    /* BuilderGenerator.kt:253 */
   65    119   
    pub fn build(self) -> crate::types::RecursiveXmlShapesOutputNested1 {
         120  +
        /* BuilderGenerator.kt:477 */
   66    121   
        crate::types::RecursiveXmlShapesOutputNested1 {
   67         -
            foo: self.foo,
         122  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         123  +
            /* BuilderGenerator.kt:481 */
   68    124   
            nested: self.nested,
         125  +
            /* BuilderGenerator.kt:477 */
   69    126   
        }
         127  +
        /* BuilderGenerator.kt:253 */
   70    128   
    }
         129  +
    /* BuilderGenerator.kt:355 */
   71    130   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_recursive_xml_shapes_output_nested2.rs

@@ -1,1 +71,130 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct RecursiveXmlShapesOutputNested2 {
           8  +
pub /* StructureGenerator.kt:201 */ struct RecursiveXmlShapesOutputNested2 {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub bar: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub recursive_member: ::std::option::Option<crate::types::RecursiveXmlShapesOutputNested1>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl RecursiveXmlShapesOutputNested2 {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn bar(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.bar.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn recursive_member(&self) -> ::std::option::Option<&crate::types::RecursiveXmlShapesOutputNested1> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.recursive_member.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl RecursiveXmlShapesOutputNested2 {
   22         -
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::RecursiveXmlShapesOutputNested2Builder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::RecursiveXmlShapesOutputNested2Builder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct RecursiveXmlShapesOutputNested2Builder {
   32         -
    pub(crate) bar: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) bar: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) recursive_member: ::std::option::Option<crate::types::RecursiveXmlShapesOutputNested1>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl RecursiveXmlShapesOutputNested2Builder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn bar(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.bar = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.bar = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_bar(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.bar
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:286 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:291 */
   51     93   
    pub fn recursive_member(mut self, input: crate::types::RecursiveXmlShapesOutputNested1) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   52     95   
        self.recursive_member = ::std::option::Option::Some(input);
          96  +
        /* BuilderGenerator.kt:293 */
   53     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   54     99   
    }
         100  +
    /* BuilderGenerator.kt:312 */
   55    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:314 */
   56    103   
    pub fn set_recursive_member(mut self, input: ::std::option::Option<crate::types::RecursiveXmlShapesOutputNested1>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   57    105   
        self.recursive_member = input;
   58    106   
        self
         107  +
        /* BuilderGenerator.kt:314 */
   59    108   
    }
         109  +
    /* BuilderGenerator.kt:334 */
   60    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* BuilderGenerator.kt:336 */
   61    112   
    pub fn get_recursive_member(&self) -> &::std::option::Option<crate::types::RecursiveXmlShapesOutputNested1> {
         113  +
        /* BuilderGenerator.kt:337 */
   62    114   
        &self.recursive_member
         115  +
        /* BuilderGenerator.kt:336 */
   63    116   
    }
   64         -
    /// Consumes the builder and constructs a [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
         118  +
    /* BuilderGenerator.kt:253 */
   65    119   
    pub fn build(self) -> crate::types::RecursiveXmlShapesOutputNested2 {
         120  +
        /* BuilderGenerator.kt:477 */
   66    121   
        crate::types::RecursiveXmlShapesOutputNested2 {
   67         -
            bar: self.bar,
         122  +
            /* BuilderGenerator.kt:481 */ bar: self.bar,
         123  +
            /* BuilderGenerator.kt:481 */
   68    124   
            recursive_member: self.recursive_member,
         125  +
            /* BuilderGenerator.kt:477 */
   69    126   
        }
         127  +
        /* BuilderGenerator.kt:253 */
   70    128   
    }
         129  +
    /* BuilderGenerator.kt:355 */
   71    130   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_struct_arg.rs

@@ -1,1 +93,170 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct StructArg {
           8  +
pub /* StructureGenerator.kt:201 */ struct StructArg {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub string_arg: ::std::option::Option<::std::string::String>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          12  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub other_arg: ::std::option::Option<bool>,
          14  +
    /* StructureGenerator.kt:231 */
   10     15   
    #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub recursive_arg: ::std::option::Option<::std::boxed::Box<crate::types::StructArg>>,
          17  +
    /* StructureGenerator.kt:201 */
   12     18   
}
          19  +
/* StructureGenerator.kt:135 */
   13     20   
impl StructArg {
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
          23  +
                           /* StructureGenerator.kt:166 */
   15     24   
    pub fn string_arg(&self) -> ::std::option::Option<&str> {
          25  +
        /* StructureGenerator.kt:169 */
   16     26   
        self.string_arg.as_deref()
          27  +
        /* StructureGenerator.kt:166 */
   17     28   
    }
          29  +
    /* StructureGenerator.kt:231 */
   18     30   
    #[allow(missing_docs)] // documentation missing in model
          31  +
                           /* StructureGenerator.kt:166 */
   19     32   
    pub fn other_arg(&self) -> ::std::option::Option<bool> {
          33  +
        /* StructureGenerator.kt:168 */
   20     34   
        self.other_arg
          35  +
        /* StructureGenerator.kt:166 */
   21     36   
    }
          37  +
    /* StructureGenerator.kt:231 */
   22     38   
    #[allow(missing_docs)] // documentation missing in model
          39  +
                           /* StructureGenerator.kt:166 */
   23     40   
    pub fn recursive_arg(&self) -> ::std::option::Option<&crate::types::StructArg> {
          41  +
        /* StructureGenerator.kt:169 */
   24     42   
        self.recursive_arg.as_deref()
          43  +
        /* StructureGenerator.kt:166 */
   25     44   
    }
          45  +
    /* StructureGenerator.kt:135 */
   26     46   
}
          47  +
/* ClientCodegenVisitor.kt:237 */
   27     48   
impl StructArg {
   28         -
    /// Creates a new builder-style object to manufacture [`StructArg`](crate::types::StructArg).
          49  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StructArg`](crate::types::StructArg).
          50  +
    /* BuilderGenerator.kt:175 */
   29     51   
    pub fn builder() -> crate::types::builders::StructArgBuilder {
          52  +
        /* BuilderGenerator.kt:176 */
   30     53   
        crate::types::builders::StructArgBuilder::default()
          54  +
        /* BuilderGenerator.kt:175 */
   31     55   
    }
          56  +
    /* ClientCodegenVisitor.kt:237 */
   32     57   
}
   33     58   
   34         -
/// A builder for [`StructArg`](crate::types::StructArg).
          59  +
/// /* BuilderGenerator.kt:342 */A builder for [`StructArg`](crate::types::StructArg).
          60  +
/* RustType.kt:516 */
   35     61   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          62  +
/* RustType.kt:516 */
   36     63   
#[non_exhaustive]
          64  +
/* BuilderGenerator.kt:345 */
   37     65   
pub struct StructArgBuilder {
   38         -
    pub(crate) string_arg: ::std::option::Option<::std::string::String>,
   39         -
    pub(crate) other_arg: ::std::option::Option<bool>,
          66  +
    /* BuilderGenerator.kt:275 */ pub(crate) string_arg: ::std::option::Option<::std::string::String>,
          67  +
    /* BuilderGenerator.kt:275 */ pub(crate) other_arg: ::std::option::Option<bool>,
          68  +
    /* BuilderGenerator.kt:275 */
   40     69   
    pub(crate) recursive_arg: ::std::option::Option<::std::boxed::Box<crate::types::StructArg>>,
          70  +
    /* BuilderGenerator.kt:345 */
   41     71   
}
          72  +
/* BuilderGenerator.kt:355 */
   42     73   
impl StructArgBuilder {
          74  +
    /* BuilderGenerator.kt:286 */
   43     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* BuilderGenerator.kt:291 */
   44     77   
    pub fn string_arg(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          78  +
        /* BuilderGenerator.kt:292 */
   45     79   
        self.string_arg = ::std::option::Option::Some(input.into());
          80  +
        /* BuilderGenerator.kt:293 */
   46     81   
        self
          82  +
        /* BuilderGenerator.kt:291 */
   47     83   
    }
          84  +
    /* BuilderGenerator.kt:312 */
   48     85   
    #[allow(missing_docs)] // documentation missing in model
          86  +
                           /* BuilderGenerator.kt:314 */
   49     87   
    pub fn set_string_arg(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          88  +
        /* BuilderGenerator.kt:315 */
   50     89   
        self.string_arg = input;
   51     90   
        self
          91  +
        /* BuilderGenerator.kt:314 */
   52     92   
    }
          93  +
    /* BuilderGenerator.kt:334 */
   53     94   
    #[allow(missing_docs)] // documentation missing in model
          95  +
                           /* BuilderGenerator.kt:336 */
   54     96   
    pub fn get_string_arg(&self) -> &::std::option::Option<::std::string::String> {
          97  +
        /* BuilderGenerator.kt:337 */
   55     98   
        &self.string_arg
          99  +
        /* BuilderGenerator.kt:336 */
   56    100   
    }
         101  +
    /* BuilderGenerator.kt:286 */
   57    102   
    #[allow(missing_docs)] // documentation missing in model
         103  +
                           /* BuilderGenerator.kt:291 */
   58    104   
    pub fn other_arg(mut self, input: bool) -> Self {
         105  +
        /* BuilderGenerator.kt:292 */
   59    106   
        self.other_arg = ::std::option::Option::Some(input);
         107  +
        /* BuilderGenerator.kt:293 */
   60    108   
        self
         109  +
        /* BuilderGenerator.kt:291 */
   61    110   
    }
         111  +
    /* BuilderGenerator.kt:312 */
   62    112   
    #[allow(missing_docs)] // documentation missing in model
         113  +
                           /* BuilderGenerator.kt:314 */
   63    114   
    pub fn set_other_arg(mut self, input: ::std::option::Option<bool>) -> Self {
         115  +
        /* BuilderGenerator.kt:315 */
   64    116   
        self.other_arg = input;
   65    117   
        self
         118  +
        /* BuilderGenerator.kt:314 */
   66    119   
    }
         120  +
    /* BuilderGenerator.kt:334 */
   67    121   
    #[allow(missing_docs)] // documentation missing in model
         122  +
                           /* BuilderGenerator.kt:336 */
   68    123   
    pub fn get_other_arg(&self) -> &::std::option::Option<bool> {
         124  +
        /* BuilderGenerator.kt:337 */
   69    125   
        &self.other_arg
         126  +
        /* BuilderGenerator.kt:336 */
   70    127   
    }
         128  +
    /* BuilderGenerator.kt:286 */
   71    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* BuilderGenerator.kt:291 */
   72    131   
    pub fn recursive_arg(mut self, input: impl ::std::convert::Into<::std::boxed::Box<crate::types::StructArg>>) -> Self {
         132  +
        /* BuilderGenerator.kt:292 */
   73    133   
        self.recursive_arg = ::std::option::Option::Some(input.into());
         134  +
        /* BuilderGenerator.kt:293 */
   74    135   
        self
         136  +
        /* BuilderGenerator.kt:291 */
   75    137   
    }
         138  +
    /* BuilderGenerator.kt:312 */
   76    139   
    #[allow(missing_docs)] // documentation missing in model
         140  +
                           /* BuilderGenerator.kt:314 */
   77    141   
    pub fn set_recursive_arg(mut self, input: ::std::option::Option<::std::boxed::Box<crate::types::StructArg>>) -> Self {
         142  +
        /* BuilderGenerator.kt:315 */
   78    143   
        self.recursive_arg = input;
   79    144   
        self
         145  +
        /* BuilderGenerator.kt:314 */
   80    146   
    }
         147  +
    /* BuilderGenerator.kt:334 */
   81    148   
    #[allow(missing_docs)] // documentation missing in model
         149  +
                           /* BuilderGenerator.kt:336 */
   82    150   
    pub fn get_recursive_arg(&self) -> &::std::option::Option<::std::boxed::Box<crate::types::StructArg>> {
         151  +
        /* BuilderGenerator.kt:337 */
   83    152   
        &self.recursive_arg
         153  +
        /* BuilderGenerator.kt:336 */
   84    154   
    }
   85         -
    /// Consumes the builder and constructs a [`StructArg`](crate::types::StructArg).
         155  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StructArg`](crate::types::StructArg).
         156  +
    /* BuilderGenerator.kt:253 */
   86    157   
    pub fn build(self) -> crate::types::StructArg {
         158  +
        /* BuilderGenerator.kt:477 */
   87    159   
        crate::types::StructArg {
   88         -
            string_arg: self.string_arg,
         160  +
            /* BuilderGenerator.kt:481 */ string_arg: self.string_arg,
         161  +
            /* BuilderGenerator.kt:481 */
   89    162   
            other_arg: self.other_arg,
         163  +
            /* BuilderGenerator.kt:481 */
   90    164   
            recursive_arg: self.recursive_arg,
         165  +
            /* BuilderGenerator.kt:477 */
   91    166   
        }
         167  +
        /* BuilderGenerator.kt:253 */
   92    168   
    }
         169  +
    /* BuilderGenerator.kt:355 */
   93    170   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_structure_list_member.rs

@@ -1,1 +68,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct StructureListMember {
           8  +
pub /* StructureGenerator.kt:201 */ struct StructureListMember {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl StructureListMember {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn a(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.a.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn b(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.b.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl StructureListMember {
   22         -
    /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::types::StructureListMember).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::types::StructureListMember).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::StructureListMemberBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::StructureListMemberBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`StructureListMember`](crate::types::StructureListMember).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`StructureListMember`](crate::types::StructureListMember).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct StructureListMemberBuilder {
   32         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl StructureListMemberBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.a = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.a = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.a
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.b = ::std::option::Option::Some(input.into());
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.b = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.b
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`StructureListMember`](crate::types::StructureListMember).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StructureListMember`](crate::types::StructureListMember).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::types::StructureListMember {
   66         -
        crate::types::StructureListMember { a: self.a, b: self.b }
         119  +
        /* BuilderGenerator.kt:477 */
         120  +
        crate::types::StructureListMember {
         121  +
            /* BuilderGenerator.kt:481 */ a: self.a,
         122  +
            /* BuilderGenerator.kt:481 */
         123  +
            b: self.b,
         124  +
            /* BuilderGenerator.kt:477 */
   67    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
         127  +
    }
         128  +
    /* BuilderGenerator.kt:355 */
   68    129   
}