Client Test

Client Test

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_timestamps.rs

@@ -1025,1025 +1064,1064 @@
 1045   1045   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
 1046   1046   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
 1047   1047   
    ) -> Self {
 1048   1048   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
 1049   1049   
            source,
 1050   1050   
            meta: meta.unwrap_or_default(),
 1051   1051   
        })
 1052   1052   
    }
 1053   1053   
}
 1054   1054   
 1055         -
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutput;
 1056         -
 1057   1055   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInput;
 1058   1056   
        1057  +
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutput;
        1058  +
 1059   1059   
mod _xml_timestamps_input;
 1060   1060   
 1061   1061   
mod _xml_timestamps_output;
 1062   1062   
 1063   1063   
/// Builders
 1064   1064   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_timestamps/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::xml_timestamps::XmlTimestampsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_timestamps::XmlTimestampsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_unions.rs

@@ -625,625 +664,664 @@
  645    645   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  646    646   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  647    647   
    ) -> Self {
  648    648   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  649    649   
            source,
  650    650   
            meta: meta.unwrap_or_default(),
  651    651   
        })
  652    652   
    }
  653    653   
}
  654    654   
  655         -
pub use crate::operation::xml_unions::_xml_unions_output::XmlUnionsOutput;
  656         -
  657    655   
pub use crate::operation::xml_unions::_xml_unions_input::XmlUnionsInput;
  658    656   
         657  +
pub use crate::operation::xml_unions::_xml_unions_output::XmlUnionsOutput;
         658  +
  659    659   
mod _xml_unions_input;
  660    660   
  661    661   
mod _xml_unions_output;
  662    662   
  663    663   
/// Builders
  664    664   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_unions/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::xml_unions::_xml_unions_output::XmlUnionsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_unions::_xml_unions_input::XmlUnionsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_unions::_xml_unions_output::XmlUnionsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_unions::builders::XmlUnionsInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::xml_unions::XmlUnionsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_unions::XmlUnionsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -122,122 +181,185 @@
  142    142   
pub(crate) mod shape_query_precedence;
  143    143   
  144    144   
pub(crate) mod shape_recursive_shapes;
  145    145   
  146    146   
pub(crate) mod shape_simple_scalar_properties;
  147    147   
  148    148   
pub(crate) mod shape_timestamp_format_headers;
  149    149   
  150    150   
pub(crate) mod shape_xml_attributes;
  151    151   
         152  +
pub(crate) mod shape_xml_attributes_in_middle;
         153  +
         154  +
pub(crate) mod shape_xml_attributes_in_middle_input;
         155  +
  152    156   
pub(crate) mod shape_xml_attributes_on_payload;
  153    157   
  154    158   
pub(crate) mod shape_xml_attributes_on_payload_input;
  155    159   
  156    160   
pub(crate) mod shape_xml_blobs;
  157    161   
  158    162   
pub(crate) mod shape_xml_empty_blobs;
  159    163   
  160    164   
pub(crate) mod shape_xml_empty_lists;
  161    165   
@@ -214,218 +273,279 @@
  234    238   
pub(crate) mod shape_put_with_content_encoding_input;
  235    239   
  236    240   
pub(crate) mod shape_recursive_shapes_input;
  237    241   
  238    242   
pub(crate) mod shape_simple_scalar_properties_input;
  239    243   
  240    244   
pub(crate) mod shape_simple_scalar_properties_output;
  241    245   
  242    246   
pub(crate) mod shape_timestamp_format_headers_output;
  243    247   
         248  +
pub(crate) mod shape_xml_attributes_in_middle_output;
         249  +
  244    250   
pub(crate) mod shape_xml_attributes_input;
  245    251   
  246    252   
pub(crate) mod shape_xml_attributes_on_payload_output;
  247    253   
  248    254   
pub(crate) mod shape_xml_blobs_input;
  249    255   
  250    256   
pub(crate) mod shape_xml_empty_blobs_input;
  251    257   
  252    258   
pub(crate) mod shape_xml_empty_lists_input;
  253    259   
@@ -300,306 +350,360 @@
  320    326   
pub(crate) mod shape_string_set;
  321    327   
  322    328   
pub(crate) mod shape_structure_list;
  323    329   
  324    330   
pub(crate) mod shape_structure_list_member;
  325    331   
  326    332   
pub(crate) mod shape_timestamp_list;
  327    333   
  328    334   
pub(crate) mod shape_union_payload;
  329    335   
         336  +
pub(crate) mod shape_xml_attributes_in_middle_payload_request;
         337  +
  330    338   
pub(crate) mod shape_xml_attributes_payload_request;
  331    339   
  332    340   
pub(crate) mod shape_xml_map_with_xml_namespace_input_output_map;
  333    341   
  334    342   
pub(crate) mod shape_xml_maps_input_output_map;
  335    343   
  336    344   
pub(crate) mod shape_xml_maps_xml_name_input_output_map;
  337    345   
  338    346   
pub(crate) mod shape_xml_namespace_nested;
  339    347   
  340    348   
pub(crate) mod shape_xml_union_shape;
  341    349   
  342    350   
pub(crate) mod shape_recursive_shapes_input_output_nested2;
  343    351   
         352  +
pub(crate) mod shape_xml_attributes_in_middle_payload_response;
         353  +
  344    354   
pub(crate) mod shape_xml_attributes_payload_response;
  345    355   
  346    356   
pub(crate) mod shape_xml_namespaced_list;
  347    357   
  348    358   
pub(crate) mod shape_xml_nested_union_struct;
  349    359   
  350    360   
pub(crate) mod shape_nested_xml_map_with_xml_name_inner_map;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_xml_attributes_in_middle.rs

@@ -0,1 +0,35 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_xml_attributes_in_middle_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
           9  +
    crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_xml_attributes_in_middle_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          25  +
    crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleOutputBuilder::default();
          30  +
        output = output.set_payload(crate::protocol_serde::shape_xml_attributes_in_middle_output::de_payload_payload(
          31  +
            _response_body,
          32  +
        )?);
          33  +
        output.build()
          34  +
    })
          35  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_xml_attributes_in_middle_input.rs

@@ -0,1 +0,23 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_payload_http_payload(
           3  +
    payload: &::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest>,
           4  +
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
           5  +
    let payload = match payload.as_ref() {
           6  +
        Some(t) => t,
           7  +
        None => return Ok(crate::protocol_serde::rest_xml_unset_struct_payload()),
           8  +
    };
           9  +
    Ok(crate::protocol_serde::shape_xml_attributes_in_middle_input::ser_payload_payload(payload)?)
          10  +
}
          11  +
          12  +
pub fn ser_payload_payload(
          13  +
    input: &crate::types::XmlAttributesInMiddlePayloadRequest,
          14  +
) -> std::result::Result<std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
          15  +
    let mut out = String::new();
          16  +
    {
          17  +
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
          18  +
        #[allow(unused_mut)]
          19  +
        let mut root = writer.start_el("XmlAttributesInMiddlePayloadRequest");
          20  +
        crate::protocol_serde::shape_xml_attributes_in_middle_payload_request::ser_xml_attributes_in_middle_payload_request(input, root)?
          21  +
    }
          22  +
    Ok(out.into_bytes())
          23  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_xml_attributes_in_middle_output.rs

@@ -0,1 +0,27 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_payload_payload(
           3  +
    body: &[u8],
           4  +
) -> std::result::Result<
           5  +
    ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadResponse>,
           6  +
    crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
           7  +
> {
           8  +
    (!body.is_empty())
           9  +
        .then(|| {
          10  +
            crate::protocol_serde::shape_xml_attributes_in_middle_output::de_payload(body)
          11  +
                .map_err(crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError::unhandled)
          12  +
        })
          13  +
        .transpose()
          14  +
}
          15  +
          16  +
pub fn de_payload(inp: &[u8]) -> std::result::Result<crate::types::XmlAttributesInMiddlePayloadResponse, ::aws_smithy_xml::decode::XmlDecodeError> {
          17  +
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
          18  +
    #[allow(unused_mut)]
          19  +
    let mut decoder = doc.root_element()?;
          20  +
    let start_el = decoder.start_el();
          21  +
    if !(start_el.matches("XmlAttributesInMiddlePayloadResponse")) {
          22  +
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
          23  +
            "invalid root, expected XmlAttributesInMiddlePayloadResponse got {start_el:?}"
          24  +
        )));
          25  +
    }
          26  +
    crate::protocol_serde::shape_xml_attributes_in_middle_payload_response::de_xml_attributes_in_middle_payload_response(&mut decoder)
          27  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_xml_attributes_in_middle_payload_request.rs

@@ -0,1 +0,22 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_xml_attributes_in_middle_payload_request(
           3  +
    input: &crate::types::XmlAttributesInMiddlePayloadRequest,
           4  +
    writer: ::aws_smithy_xml::encode::ElWriter,
           5  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    let mut writer = writer;
           7  +
    if let Some(var_1) = &input.attr {
           8  +
        writer.write_attribute("test", var_1.as_str());
           9  +
    }
          10  +
    #[allow(unused_mut)]
          11  +
    let mut scope = writer.finish();
          12  +
    if let Some(var_2) = &input.foo {
          13  +
        let mut inner_writer = scope.start_el("foo").finish();
          14  +
        inner_writer.data(var_2.as_str());
          15  +
    }
          16  +
    if let Some(var_3) = &input.baz {
          17  +
        let mut inner_writer = scope.start_el("baz").finish();
          18  +
        inner_writer.data(var_3.as_str());
          19  +
    }
          20  +
    scope.finish();
          21  +
    Ok(())
          22  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_xml_attributes_in_middle_payload_response.rs

@@ -0,1 +0,48 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::needless_question_mark)]
           3  +
pub fn de_xml_attributes_in_middle_payload_response(
           4  +
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
           5  +
) -> ::std::result::Result<crate::types::XmlAttributesInMiddlePayloadResponse, ::aws_smithy_xml::decode::XmlDecodeError> {
           6  +
    #[allow(unused_mut)]
           7  +
    let mut builder = crate::types::XmlAttributesInMiddlePayloadResponse::builder();
           8  +
    let attrib_1 = {
           9  +
        let s = decoder.start_el().attr("test");
          10  +
        match s {
          11  +
            None => None,
          12  +
            Some(s) => Some(Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(s.into())?),
          13  +
        }
          14  +
    };
          15  +
    builder.attr = attrib_1;
          16  +
    while let Some(mut tag) = decoder.next_tag() {
          17  +
        match tag.start_el() {
          18  +
            s if s.matches("foo") /* foo aws.protocoltests.restxml#XmlAttributesInMiddlePayloadResponse$foo */ =>  {
          19  +
                let var_2 =
          20  +
                    Some(
          21  +
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          22  +
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          23  +
                            .into()
          24  +
                        )
          25  +
                        ?
          26  +
                    )
          27  +
                ;
          28  +
                builder = builder.set_foo(var_2);
          29  +
            }
          30  +
            ,
          31  +
            s if s.matches("baz") /* baz aws.protocoltests.restxml#XmlAttributesInMiddlePayloadResponse$baz */ =>  {
          32  +
                let var_3 =
          33  +
                    Some(
          34  +
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          35  +
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          36  +
                            .into()
          37  +
                        )
          38  +
                        ?
          39  +
                    )
          40  +
                ;
          41  +
                builder = builder.set_baz(var_3);
          42  +
            }
          43  +
            ,
          44  +
            _ => {}
          45  +
        }
          46  +
    }
          47  +
    Ok(builder.build())
          48  +
}

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

@@ -1,1 +74,82 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_xml_namespace_nested::XmlNamespaceNested;
           2  +
pub use crate::types::_foo_enum::FooEnum;
    3      3   
    4         -
pub use crate::types::_xml_attributes_payload_response::XmlAttributesPayloadResponse;
           4  +
pub use crate::types::_nested_payload::NestedPayload;
    5      5   
    6         -
pub use crate::types::_xml_attributes_payload_request::XmlAttributesPayloadRequest;
           6  +
pub use crate::types::_string_enum::StringEnum;
    7      7   
    8         -
pub use crate::types::_foo_enum::FooEnum;
           8  +
pub use crate::types::_union_payload::UnionPayload;
    9      9   
   10         -
pub use crate::types::_greeting_struct::GreetingStruct;
          10  +
pub use crate::types::_payload_with_xml_name::PayloadWithXmlName;
   11     11   
   12         -
pub use crate::types::_structure_list_member::StructureListMember;
          12  +
pub use crate::types::_payload_with_xml_namespace::PayloadWithXmlNamespace;
   13     13   
   14         -
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1;
          14  +
pub use crate::types::_payload_with_xml_namespace_and_prefix::PayloadWithXmlNamespaceAndPrefix;
   15     15   
   16         -
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2;
          16  +
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorData;
   17     17   
   18     18   
pub use crate::types::_xml_union_shape::XmlUnionShape;
   19     19   
   20         -
pub use crate::types::_xml_nested_union_struct::XmlNestedUnionStruct;
          20  +
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1;
   21     21   
   22         -
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorData;
          22  +
pub use crate::types::_xml_attributes_payload_request::XmlAttributesPayloadRequest;
   23     23   
   24         -
pub use crate::types::_payload_with_xml_namespace_and_prefix::PayloadWithXmlNamespaceAndPrefix;
          24  +
pub use crate::types::_xml_attributes_payload_response::XmlAttributesPayloadResponse;
   25     25   
   26         -
pub use crate::types::_payload_with_xml_namespace::PayloadWithXmlNamespace;
          26  +
pub use crate::types::_xml_attributes_in_middle_payload_request::XmlAttributesInMiddlePayloadRequest;
   27     27   
   28         -
pub use crate::types::_payload_with_xml_name::PayloadWithXmlName;
          28  +
pub use crate::types::_xml_attributes_in_middle_payload_response::XmlAttributesInMiddlePayloadResponse;
   29     29   
   30         -
pub use crate::types::_union_payload::UnionPayload;
          30  +
pub use crate::types::_xml_namespace_nested::XmlNamespaceNested;
   31     31   
   32         -
pub use crate::types::_string_enum::StringEnum;
          32  +
pub use crate::types::_structure_list_member::StructureListMember;
   33     33   
   34         -
pub use crate::types::_nested_payload::NestedPayload;
          34  +
pub use crate::types::_greeting_struct::GreetingStruct;
          35  +
          36  +
pub use crate::types::_xml_nested_union_struct::XmlNestedUnionStruct;
          37  +
          38  +
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2;
   35     39   
   36     40   
mod _complex_nested_error_data;
   37     41   
   38     42   
mod _foo_enum;
   39     43   
   40     44   
mod _greeting_struct;
   41     45   
   42     46   
mod _nested_payload;
   43     47   
   44     48   
mod _payload_with_xml_name;
   45     49   
   46     50   
mod _payload_with_xml_namespace;
   47     51   
   48     52   
mod _payload_with_xml_namespace_and_prefix;
   49     53   
   50     54   
mod _recursive_shapes_input_output_nested1;
   51     55   
   52     56   
mod _recursive_shapes_input_output_nested2;
   53     57   
   54     58   
mod _string_enum;
   55     59   
   56     60   
mod _structure_list_member;
   57     61   
   58     62   
mod _union_payload;
   59     63   
          64  +
mod _xml_attributes_in_middle_payload_request;
          65  +
          66  +
mod _xml_attributes_in_middle_payload_response;
          67  +
   60     68   
mod _xml_attributes_payload_request;
   61     69   
   62     70   
mod _xml_attributes_payload_response;
   63     71   
   64     72   
mod _xml_namespace_nested;
   65     73   
   66     74   
mod _xml_nested_union_struct;
   67     75   
   68     76   
mod _xml_union_shape;
   69     77   

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_attributes_in_middle_payload_request.rs

@@ -0,1 +0,93 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct XmlAttributesInMiddlePayloadRequest {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub foo: ::std::option::Option<::std::string::String>,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub attr: ::std::option::Option<::std::string::String>,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub baz: ::std::option::Option<::std::string::String>,
          12  +
}
          13  +
impl XmlAttributesInMiddlePayloadRequest {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
          16  +
        self.foo.as_deref()
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn attr(&self) -> ::std::option::Option<&str> {
          20  +
        self.attr.as_deref()
          21  +
    }
          22  +
    #[allow(missing_docs)] // documentation missing in model
          23  +
    pub fn baz(&self) -> ::std::option::Option<&str> {
          24  +
        self.baz.as_deref()
          25  +
    }
          26  +
}
          27  +
impl XmlAttributesInMiddlePayloadRequest {
          28  +
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddlePayloadRequest`](crate::types::XmlAttributesInMiddlePayloadRequest).
          29  +
    pub fn builder() -> crate::types::builders::XmlAttributesInMiddlePayloadRequestBuilder {
          30  +
        crate::types::builders::XmlAttributesInMiddlePayloadRequestBuilder::default()
          31  +
    }
          32  +
}
          33  +
          34  +
/// A builder for [`XmlAttributesInMiddlePayloadRequest`](crate::types::XmlAttributesInMiddlePayloadRequest).
          35  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          36  +
#[non_exhaustive]
          37  +
pub struct XmlAttributesInMiddlePayloadRequestBuilder {
          38  +
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          39  +
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          40  +
    pub(crate) baz: ::std::option::Option<::std::string::String>,
          41  +
}
          42  +
impl XmlAttributesInMiddlePayloadRequestBuilder {
          43  +
    #[allow(missing_docs)] // documentation missing in model
          44  +
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          45  +
        self.foo = ::std::option::Option::Some(input.into());
          46  +
        self
          47  +
    }
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          50  +
        self.foo = input;
          51  +
        self
          52  +
    }
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          55  +
        &self.foo
          56  +
    }
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    pub fn attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          59  +
        self.attr = ::std::option::Option::Some(input.into());
          60  +
        self
          61  +
    }
          62  +
    #[allow(missing_docs)] // documentation missing in model
          63  +
    pub fn set_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        self.attr = input;
          65  +
        self
          66  +
    }
          67  +
    #[allow(missing_docs)] // documentation missing in model
          68  +
    pub fn get_attr(&self) -> &::std::option::Option<::std::string::String> {
          69  +
        &self.attr
          70  +
    }
          71  +
    #[allow(missing_docs)] // documentation missing in model
          72  +
    pub fn baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          73  +
        self.baz = ::std::option::Option::Some(input.into());
          74  +
        self
          75  +
    }
          76  +
    #[allow(missing_docs)] // documentation missing in model
          77  +
    pub fn set_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          78  +
        self.baz = input;
          79  +
        self
          80  +
    }
          81  +
    #[allow(missing_docs)] // documentation missing in model
          82  +
    pub fn get_baz(&self) -> &::std::option::Option<::std::string::String> {
          83  +
        &self.baz
          84  +
    }
          85  +
    /// Consumes the builder and constructs a [`XmlAttributesInMiddlePayloadRequest`](crate::types::XmlAttributesInMiddlePayloadRequest).
          86  +
    pub fn build(self) -> crate::types::XmlAttributesInMiddlePayloadRequest {
          87  +
        crate::types::XmlAttributesInMiddlePayloadRequest {
          88  +
            foo: self.foo,
          89  +
            attr: self.attr,
          90  +
            baz: self.baz,
          91  +
        }
          92  +
    }
          93  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_attributes_in_middle_payload_response.rs

@@ -0,1 +0,93 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct XmlAttributesInMiddlePayloadResponse {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub foo: ::std::option::Option<::std::string::String>,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub attr: ::std::option::Option<::std::string::String>,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub baz: ::std::option::Option<::std::string::String>,
          12  +
}
          13  +
impl XmlAttributesInMiddlePayloadResponse {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
          16  +
        self.foo.as_deref()
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn attr(&self) -> ::std::option::Option<&str> {
          20  +
        self.attr.as_deref()
          21  +
    }
          22  +
    #[allow(missing_docs)] // documentation missing in model
          23  +
    pub fn baz(&self) -> ::std::option::Option<&str> {
          24  +
        self.baz.as_deref()
          25  +
    }
          26  +
}
          27  +
impl XmlAttributesInMiddlePayloadResponse {
          28  +
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddlePayloadResponse`](crate::types::XmlAttributesInMiddlePayloadResponse).
          29  +
    pub fn builder() -> crate::types::builders::XmlAttributesInMiddlePayloadResponseBuilder {
          30  +
        crate::types::builders::XmlAttributesInMiddlePayloadResponseBuilder::default()
          31  +
    }
          32  +
}
          33  +
          34  +
/// A builder for [`XmlAttributesInMiddlePayloadResponse`](crate::types::XmlAttributesInMiddlePayloadResponse).
          35  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          36  +
#[non_exhaustive]
          37  +
pub struct XmlAttributesInMiddlePayloadResponseBuilder {
          38  +
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          39  +
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          40  +
    pub(crate) baz: ::std::option::Option<::std::string::String>,
          41  +
}
          42  +
impl XmlAttributesInMiddlePayloadResponseBuilder {
          43  +
    #[allow(missing_docs)] // documentation missing in model
          44  +
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          45  +
        self.foo = ::std::option::Option::Some(input.into());
          46  +
        self
          47  +
    }
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          50  +
        self.foo = input;
          51  +
        self
          52  +
    }
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          55  +
        &self.foo
          56  +
    }
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    pub fn attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          59  +
        self.attr = ::std::option::Option::Some(input.into());
          60  +
        self
          61  +
    }
          62  +
    #[allow(missing_docs)] // documentation missing in model
          63  +
    pub fn set_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        self.attr = input;
          65  +
        self
          66  +
    }
          67  +
    #[allow(missing_docs)] // documentation missing in model
          68  +
    pub fn get_attr(&self) -> &::std::option::Option<::std::string::String> {
          69  +
        &self.attr
          70  +
    }
          71  +
    #[allow(missing_docs)] // documentation missing in model
          72  +
    pub fn baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          73  +
        self.baz = ::std::option::Option::Some(input.into());
          74  +
        self
          75  +
    }
          76  +
    #[allow(missing_docs)] // documentation missing in model
          77  +
    pub fn set_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          78  +
        self.baz = input;
          79  +
        self
          80  +
    }
          81  +
    #[allow(missing_docs)] // documentation missing in model
          82  +
    pub fn get_baz(&self) -> &::std::option::Option<::std::string::String> {
          83  +
        &self.baz
          84  +
    }
          85  +
    /// Consumes the builder and constructs a [`XmlAttributesInMiddlePayloadResponse`](crate::types::XmlAttributesInMiddlePayloadResponse).
          86  +
    pub fn build(self) -> crate::types::XmlAttributesInMiddlePayloadResponse {
          87  +
        crate::types::XmlAttributesInMiddlePayloadResponse {
          88  +
            foo: self.foo,
          89  +
            attr: self.attr,
          90  +
            baz: self.baz,
          91  +
        }
          92  +
    }
          93  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/builders.rs

@@ -1,1 +0,30 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_xml_namespace_nested::XmlNamespaceNestedBuilder;
           2  +
pub use crate::types::_nested_payload::NestedPayloadBuilder;
    3      3   
    4         -
pub use crate::types::_xml_attributes_payload_response::XmlAttributesPayloadResponseBuilder;
           4  +
pub use crate::types::_payload_with_xml_name::PayloadWithXmlNameBuilder;
    5      5   
    6         -
pub use crate::types::_xml_attributes_payload_request::XmlAttributesPayloadRequestBuilder;
           6  +
pub use crate::types::_payload_with_xml_namespace::PayloadWithXmlNamespaceBuilder;
    7      7   
    8         -
pub use crate::types::_greeting_struct::GreetingStructBuilder;
           8  +
pub use crate::types::_payload_with_xml_namespace_and_prefix::PayloadWithXmlNamespaceAndPrefixBuilder;
    9      9   
   10         -
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
          10  +
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
   11     11   
   12     12   
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1Builder;
   13     13   
   14         -
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;
          14  +
pub use crate::types::_xml_attributes_payload_request::XmlAttributesPayloadRequestBuilder;
   15     15   
   16         -
pub use crate::types::_xml_nested_union_struct::XmlNestedUnionStructBuilder;
          16  +
pub use crate::types::_xml_attributes_payload_response::XmlAttributesPayloadResponseBuilder;
   17     17   
   18         -
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
          18  +
pub use crate::types::_xml_attributes_in_middle_payload_request::XmlAttributesInMiddlePayloadRequestBuilder;
   19     19   
   20         -
pub use crate::types::_payload_with_xml_namespace_and_prefix::PayloadWithXmlNamespaceAndPrefixBuilder;
          20  +
pub use crate::types::_xml_attributes_in_middle_payload_response::XmlAttributesInMiddlePayloadResponseBuilder;
   21     21   
   22         -
pub use crate::types::_payload_with_xml_namespace::PayloadWithXmlNamespaceBuilder;
          22  +
pub use crate::types::_xml_namespace_nested::XmlNamespaceNestedBuilder;
   23     23   
   24         -
pub use crate::types::_payload_with_xml_name::PayloadWithXmlNameBuilder;
          24  +
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
   25     25   
   26         -
pub use crate::types::_nested_payload::NestedPayloadBuilder;
          26  +
pub use crate::types::_greeting_struct::GreetingStructBuilder;
          27  +
          28  +
pub use crate::types::_xml_nested_union_struct::XmlNestedUnionStructBuilder;
          29  +
          30  +
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/error.rs

@@ -1,1 +11,11 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_complex_error::ComplexError;
    3         -
    4      2   
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
    5      3   
           4  +
pub use crate::types::error::_complex_error::ComplexError;
           5  +
    6      6   
mod _complex_error;
    7      7   
    8      8   
mod _invalid_greeting;
    9      9   
   10     10   
/// Builders
   11     11   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +0,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_complex_error::ComplexErrorBuilder;
    3         -
    4      2   
pub use crate::types::error::_invalid_greeting::InvalidGreetingBuilder;
           3  +
           4  +
pub use crate::types::error::_complex_error::ComplexErrorBuilder;