Client Test

Client Test

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

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

@@ -413,413 +452,452 @@
  433    433   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  434    434   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  435    435   
    ) -> Self {
  436    436   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  437    437   
            source,
  438    438   
            meta: meta.unwrap_or_default(),
  439    439   
        })
  440    440   
    }
  441    441   
}
  442    442   
  443         -
pub use crate::operation::xml_attributes::_xml_attributes_output::XmlAttributesOutput;
  444         -
  445    443   
pub use crate::operation::xml_attributes::_xml_attributes_input::XmlAttributesInput;
  446    444   
         445  +
pub use crate::operation::xml_attributes::_xml_attributes_output::XmlAttributesOutput;
         446  +
  447    447   
mod _xml_attributes_input;
  448    448   
  449    449   
mod _xml_attributes_output;
  450    450   
  451    451   
/// Builders
  452    452   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes/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_attributes::_xml_attributes_output::XmlAttributesOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_attributes::_xml_attributes_input::XmlAttributesInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_attributes::_xml_attributes_output::XmlAttributesOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_attributes::builders::XmlAttributesInputBuilder {
    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_attributes::XmlAttributesOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_attributes::XmlAttributesError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -0,1 +0,428 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `XmlAttributesInMiddle`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct XmlAttributesInMiddle;
           6  +
impl XmlAttributesInMiddle {
           7  +
    /// Creates a new `XmlAttributesInMiddle`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    pub(crate) async fn orchestrate(
          12  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          13  +
        input: crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput,
          14  +
    ) -> ::std::result::Result<
          15  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          16  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          17  +
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          18  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          19  +
        >,
          20  +
    > {
          21  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          22  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          23  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          24  +
        >| {
          25  +
            err.map_service_error(|err| {
          26  +
                err.downcast::<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError>()
          27  +
                    .expect("correct error type")
          28  +
            })
          29  +
        };
          30  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          31  +
            .await
          32  +
            .map_err(map_err)?;
          33  +
        let output = context.finalize().map_err(map_err)?;
          34  +
        ::std::result::Result::Ok(
          35  +
            output
          36  +
                .downcast::<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput>()
          37  +
                .expect("correct output type"),
          38  +
        )
          39  +
    }
          40  +
          41  +
    pub(crate) async fn orchestrate_with_stop_point(
          42  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          43  +
        input: crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput,
          44  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          45  +
    ) -> ::std::result::Result<
          46  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          47  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          48  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          49  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          50  +
        >,
          51  +
    > {
          52  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          53  +
        use ::tracing::Instrument;
          54  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
          55  +
            "Rest Xml Protocol",
          56  +
            "XmlAttributesInMiddle",
          57  +
            input,
          58  +
            runtime_plugins,
          59  +
            stop_point,
          60  +
        )
          61  +
        // Create a parent span for the entire operation. Includes a random, internal-only,
          62  +
        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          63  +
        .instrument(::tracing::debug_span!(
          64  +
            "Rest Xml Protocol.XmlAttributesInMiddle",
          65  +
            "rpc.service" = "Rest Xml Protocol",
          66  +
            "rpc.method" = "XmlAttributesInMiddle",
          67  +
            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          68  +
        ))
          69  +
        .await
          70  +
    }
          71  +
          72  +
    pub(crate) fn operation_runtime_plugins(
          73  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          74  +
        client_config: &crate::config::Config,
          75  +
        config_override: ::std::option::Option<crate::config::Builder>,
          76  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          77  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          78  +
          79  +
        if let ::std::option::Option::Some(config_override) = config_override {
          80  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          81  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          82  +
            }
          83  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          84  +
                config_override,
          85  +
                client_config.config.clone(),
          86  +
                &client_config.runtime_components,
          87  +
            ));
          88  +
        }
          89  +
        runtime_plugins
          90  +
    }
          91  +
}
          92  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlAttributesInMiddle {
          93  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
          94  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlAttributesInMiddle");
          95  +
          96  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
          97  +
            XmlAttributesInMiddleRequestSerializer,
          98  +
        ));
          99  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         100  +
            XmlAttributesInMiddleResponseDeserializer,
         101  +
        ));
         102  +
         103  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         104  +
            crate::config::auth::Params::builder()
         105  +
                .operation_name("XmlAttributesInMiddle")
         106  +
                .build()
         107  +
                .expect("required fields set"),
         108  +
        ));
         109  +
         110  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         111  +
            "XmlAttributesInMiddle",
         112  +
            "Rest Xml Protocol",
         113  +
        ));
         114  +
         115  +
        ::std::option::Option::Some(cfg.freeze())
         116  +
    }
         117  +
         118  +
    fn runtime_components(
         119  +
        &self,
         120  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         121  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         122  +
        #[allow(unused_mut)]
         123  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlAttributesInMiddle")
         124  +
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
         125  +
            .with_interceptor(XmlAttributesInMiddleEndpointParamsInterceptor)
         126  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         127  +
                crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
         128  +
            >::new())
         129  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         130  +
                crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
         131  +
            >::new());
         132  +
         133  +
        ::std::borrow::Cow::Owned(rcb)
         134  +
    }
         135  +
}
         136  +
         137  +
#[derive(Debug)]
         138  +
struct XmlAttributesInMiddleResponseDeserializer;
         139  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesInMiddleResponseDeserializer {
         140  +
    fn deserialize_nonstreaming(
         141  +
        &self,
         142  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         143  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         144  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         145  +
        let headers = response.headers();
         146  +
        let body = response.body().bytes().expect("body loaded");
         147  +
        #[allow(unused_mut)]
         148  +
        let mut force_error = false;
         149  +
         150  +
        let parse_result = if !success && status != 200 || force_error {
         151  +
            crate::protocol_serde::shape_xml_attributes_in_middle::de_xml_attributes_in_middle_http_error(status, headers, body)
         152  +
        } else {
         153  +
            crate::protocol_serde::shape_xml_attributes_in_middle::de_xml_attributes_in_middle_http_response(status, headers, body)
         154  +
        };
         155  +
        crate::protocol_serde::type_erase_result(parse_result)
         156  +
    }
         157  +
}
         158  +
#[derive(Debug)]
         159  +
struct XmlAttributesInMiddleRequestSerializer;
         160  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlAttributesInMiddleRequestSerializer {
         161  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         162  +
    fn serialize_input(
         163  +
        &self,
         164  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         165  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         166  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         167  +
        let input = input
         168  +
            .downcast::<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput>()
         169  +
            .expect("correct type");
         170  +
        let _header_serialization_settings = _cfg
         171  +
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
         172  +
            .cloned()
         173  +
            .unwrap_or_default();
         174  +
        let mut request_builder = {
         175  +
            #[allow(clippy::uninlined_format_args)]
         176  +
            fn uri_base(
         177  +
                _input: &crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput,
         178  +
                output: &mut ::std::string::String,
         179  +
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
         180  +
                use ::std::fmt::Write as _;
         181  +
                ::std::write!(output, "/XmlAttributesInMiddle").expect("formatting should succeed");
         182  +
                ::std::result::Result::Ok(())
         183  +
            }
         184  +
            #[allow(clippy::unnecessary_wraps)]
         185  +
            fn update_http_builder(
         186  +
                input: &crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput,
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         189  +
                let mut uri = ::std::string::String::new();
         190  +
                uri_base(input, &mut uri)?;
         191  +
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
         192  +
            }
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
         195  +
            builder
         196  +
        };
         197  +
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_attributes_in_middle_input::ser_payload_http_payload(
         198  +
            &input.payload,
         199  +
        )?);
         200  +
        if let Some(content_length) = body.content_length() {
         201  +
            let content_length = content_length.to_string();
         202  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         203  +
        }
         204  +
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         205  +
    }
         206  +
}
         207  +
#[derive(Debug)]
         208  +
struct XmlAttributesInMiddleEndpointParamsInterceptor;
         209  +
         210  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlAttributesInMiddleEndpointParamsInterceptor {
         211  +
    fn name(&self) -> &'static str {
         212  +
        "XmlAttributesInMiddleEndpointParamsInterceptor"
         213  +
    }
         214  +
         215  +
    fn read_before_execution(
         216  +
        &self,
         217  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         218  +
            '_,
         219  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         220  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         221  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         222  +
        >,
         223  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         224  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         225  +
        let _input = context
         226  +
            .input()
         227  +
            .downcast_ref::<XmlAttributesInMiddleInput>()
         228  +
            .ok_or("failed to downcast to XmlAttributesInMiddleInput")?;
         229  +
         230  +
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
         231  +
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         232  +
        })?;
         233  +
        cfg.interceptor_state()
         234  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         235  +
        ::std::result::Result::Ok(())
         236  +
    }
         237  +
}
         238  +
         239  +
// The get_* functions below are generated from JMESPath expressions in the
         240  +
// operationContextParams trait. They target the operation's input shape.
         241  +
         242  +
#[allow(unreachable_code, unused_variables)]
         243  +
#[cfg(test)]
         244  +
mod xml_attributes_in_middle_test {
         245  +
         246  +
    /// Serializes XML attributes on a payload when the xmlAttribute trait targets a member in the middle of the member list
         247  +
    /// Test ID: XmlAttributesInMiddle
         248  +
    #[::tokio::test]
         249  +
    #[::tracing_test::traced_test]
         250  +
    async fn xml_attributes_in_middle_request() {
         251  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
         252  +
        let config_builder = crate::config::Config::builder()
         253  +
            .with_test_defaults()
         254  +
            // TODO(https://github.com/smithy-lang/smithy-rs/issues/4177):
         255  +
            //  Until the incorrect separation is addressed, we need to rely on this workaround.
         256  +
            .allow_no_auth()
         257  +
            .endpoint_url("https://example.com");
         258  +
         259  +
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
         260  +
        let result = client
         261  +
            .xml_attributes_in_middle()
         262  +
            .set_payload(::std::option::Option::Some(
         263  +
                crate::types::XmlAttributesInMiddlePayloadRequest::builder()
         264  +
                    .set_foo(::std::option::Option::Some("Foo".to_owned()))
         265  +
                    .set_attr(::std::option::Option::Some("attributeValue".to_owned()))
         266  +
                    .set_baz(::std::option::Option::Some("Baz".to_owned()))
         267  +
                    .build(),
         268  +
            ))
         269  +
            .send()
         270  +
            .await;
         271  +
        let _ = dbg!(result);
         272  +
        let http_request = request_receiver.expect_request();
         273  +
        let expected_headers = [("Content-Type", "application/xml")];
         274  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
         275  +
        let body = http_request.body().bytes().expect("body should be strict");
         276  +
        ::aws_smithy_protocol_test::assert_ok(
         277  +
        ::aws_smithy_protocol_test::validate_body(body, "<XmlAttributesInMiddlePayloadRequest test=\"attributeValue\">\n    <foo>Foo</foo>\n    <baz>Baz</baz>\n</XmlAttributesInMiddlePayloadRequest>\n", ::aws_smithy_protocol_test::MediaType::from("application/xml"))
         278  +
        );
         279  +
        let uri: ::http_1x::Uri = http_request.uri().parse().expect("invalid URI sent");
         280  +
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
         281  +
        ::pretty_assertions::assert_eq!(uri.path(), "/XmlAttributesInMiddle", "path was incorrect");
         282  +
    }
         283  +
         284  +
    /// Deserializes XML attributes on a payload when the xmlAttribute trait targets a member in the middle of the member list
         285  +
    /// Test ID: XmlAttributesInMiddle
         286  +
    #[::tokio::test]
         287  +
    #[::tracing_test::traced_test]
         288  +
    async fn xml_attributes_in_middle_response() {
         289  +
        let expected_output = crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput::builder()
         290  +
            .set_payload(::std::option::Option::Some(
         291  +
                crate::types::XmlAttributesInMiddlePayloadResponse::builder()
         292  +
                    .set_foo(::std::option::Option::Some("Foo".to_owned()))
         293  +
                    .set_attr(::std::option::Option::Some("attributeValue".to_owned()))
         294  +
                    .set_baz(::std::option::Option::Some("Baz".to_owned()))
         295  +
                    .build(),
         296  +
            ))
         297  +
            .build();
         298  +
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http_1x::response::Builder::new()
         299  +
        .header("Content-Type", "application/xml")
         300  +
        .status(200)
         301  +
                    .body(::aws_smithy_types::body::SdkBody::from("<XmlAttributesInMiddlePayloadResponse test=\"attributeValue\">\n    <foo>Foo</foo>\n    <baz>Baz</baz>\n</XmlAttributesInMiddlePayloadResponse>\n"))
         302  +
                    .unwrap()
         303  +
                    ).unwrap();
         304  +
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
         305  +
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
         306  +
         307  +
        let op = crate::operation::xml_attributes_in_middle::XmlAttributesInMiddle::new();
         308  +
        let config = op.config().expect("the operation has config");
         309  +
        let de = config
         310  +
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
         311  +
            .expect("the config must have a deserializer");
         312  +
         313  +
        let parsed = de.deserialize_streaming(&mut http_response);
         314  +
        let parsed = parsed.unwrap_or_else(|| {
         315  +
            let http_response = http_response.map(|body| {
         316  +
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
         317  +
                    body.bytes().unwrap(),
         318  +
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
         319  +
                )))
         320  +
            });
         321  +
            de.deserialize_nonstreaming(&http_response)
         322  +
        });
         323  +
        let parsed = parsed
         324  +
            .expect("should be successful response")
         325  +
            .downcast::<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput>()
         326  +
            .unwrap();
         327  +
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
         328  +
    }
         329  +
}
         330  +
         331  +
/// Error type for the `XmlAttributesInMiddleError` operation.
         332  +
#[non_exhaustive]
         333  +
#[derive(::std::fmt::Debug)]
         334  +
pub enum XmlAttributesInMiddleError {
         335  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         336  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         337  +
    variable wildcard pattern and check `.code()`:
         338  +
     \
         339  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         340  +
     \
         341  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlAttributesInMiddleError) for what information is available for the error.")]
         342  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         343  +
}
         344  +
impl XmlAttributesInMiddleError {
         345  +
    /// Creates the `XmlAttributesInMiddleError::Unhandled` variant from any error type.
         346  +
    pub fn unhandled(
         347  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         348  +
    ) -> Self {
         349  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         350  +
            source: err.into(),
         351  +
            meta: ::std::default::Default::default(),
         352  +
        })
         353  +
    }
         354  +
         355  +
    /// Creates the `XmlAttributesInMiddleError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         356  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         357  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         358  +
            source: err.clone().into(),
         359  +
            meta: err,
         360  +
        })
         361  +
    }
         362  +
    ///
         363  +
    /// Returns error metadata, which includes the error code, message,
         364  +
    /// request ID, and potentially additional information.
         365  +
    ///
         366  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         367  +
        match self {
         368  +
            Self::Unhandled(e) => &e.meta,
         369  +
        }
         370  +
    }
         371  +
}
         372  +
impl ::std::error::Error for XmlAttributesInMiddleError {
         373  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         374  +
        match self {
         375  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         376  +
        }
         377  +
    }
         378  +
}
         379  +
impl ::std::fmt::Display for XmlAttributesInMiddleError {
         380  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         381  +
        match self {
         382  +
            Self::Unhandled(_inner) => {
         383  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         384  +
                    write!(f, "unhandled error ({code})")
         385  +
                } else {
         386  +
                    f.write_str("unhandled error")
         387  +
                }
         388  +
            }
         389  +
        }
         390  +
    }
         391  +
}
         392  +
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlAttributesInMiddleError {
         393  +
    fn code(&self) -> ::std::option::Option<&str> {
         394  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         395  +
    }
         396  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         397  +
        ::std::option::Option::None
         398  +
    }
         399  +
}
         400  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlAttributesInMiddleError {
         401  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         402  +
        match self {
         403  +
            Self::Unhandled(_inner) => &_inner.meta,
         404  +
        }
         405  +
    }
         406  +
}
         407  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlAttributesInMiddleError {
         408  +
    fn create_unhandled_error(
         409  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         410  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         411  +
    ) -> Self {
         412  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         413  +
            source,
         414  +
            meta: meta.unwrap_or_default(),
         415  +
        })
         416  +
    }
         417  +
}
         418  +
         419  +
pub use crate::operation::xml_attributes_in_middle::_xml_attributes_in_middle_input::XmlAttributesInMiddleInput;
         420  +
         421  +
pub use crate::operation::xml_attributes_in_middle::_xml_attributes_in_middle_output::XmlAttributesInMiddleOutput;
         422  +
         423  +
mod _xml_attributes_in_middle_input;
         424  +
         425  +
mod _xml_attributes_in_middle_output;
         426  +
         427  +
/// Builders
         428  +
pub mod builders;

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

@@ -0,1 +0,50 @@
           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 XmlAttributesInMiddleInput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub payload: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest>,
           8  +
}
           9  +
impl XmlAttributesInMiddleInput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn payload(&self) -> ::std::option::Option<&crate::types::XmlAttributesInMiddlePayloadRequest> {
          12  +
        self.payload.as_ref()
          13  +
    }
          14  +
}
          15  +
impl XmlAttributesInMiddleInput {
          16  +
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddleInput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput).
          17  +
    pub fn builder() -> crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder {
          18  +
        crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`XmlAttributesInMiddleInput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct XmlAttributesInMiddleInputBuilder {
          26  +
    pub(crate) payload: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest>,
          27  +
}
          28  +
impl XmlAttributesInMiddleInputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn payload(mut self, input: crate::types::XmlAttributesInMiddlePayloadRequest) -> Self {
          31  +
        self.payload = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_payload(mut self, input: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest>) -> Self {
          36  +
        self.payload = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_payload(&self) -> &::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest> {
          41  +
        &self.payload
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`XmlAttributesInMiddleInput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput).
          44  +
    pub fn build(
          45  +
        self,
          46  +
    ) -> ::std::result::Result<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput, ::aws_smithy_types::error::operation::BuildError>
          47  +
    {
          48  +
        ::std::result::Result::Ok(crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput { payload: self.payload })
          49  +
    }
          50  +
}

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

@@ -0,1 +0,47 @@
           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 XmlAttributesInMiddleOutput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub payload: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadResponse>,
           8  +
}
           9  +
impl XmlAttributesInMiddleOutput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn payload(&self) -> ::std::option::Option<&crate::types::XmlAttributesInMiddlePayloadResponse> {
          12  +
        self.payload.as_ref()
          13  +
    }
          14  +
}
          15  +
impl XmlAttributesInMiddleOutput {
          16  +
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddleOutput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput).
          17  +
    pub fn builder() -> crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleOutputBuilder {
          18  +
        crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleOutputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`XmlAttributesInMiddleOutput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct XmlAttributesInMiddleOutputBuilder {
          26  +
    pub(crate) payload: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadResponse>,
          27  +
}
          28  +
impl XmlAttributesInMiddleOutputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn payload(mut self, input: crate::types::XmlAttributesInMiddlePayloadResponse) -> Self {
          31  +
        self.payload = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_payload(mut self, input: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadResponse>) -> Self {
          36  +
        self.payload = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_payload(&self) -> &::std::option::Option<crate::types::XmlAttributesInMiddlePayloadResponse> {
          41  +
        &self.payload
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`XmlAttributesInMiddleOutput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput).
          44  +
    pub fn build(self) -> crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput {
          45  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput { payload: self.payload }
          46  +
    }
          47  +
}

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

@@ -0,1 +0,125 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::xml_attributes_in_middle::_xml_attributes_in_middle_input::XmlAttributesInMiddleInputBuilder;
           3  +
           4  +
pub use crate::operation::xml_attributes_in_middle::_xml_attributes_in_middle_output::XmlAttributesInMiddleOutputBuilder;
           5  +
           6  +
impl crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.xml_attributes_in_middle();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `XmlAttributesInMiddle`.
          24  +
///
          25  +
/// This example serializes an XML attribute on a payload when it's defined in the middle of the member list. This tests that implementations correctly write attributes immediately after the element start tag, which is critical for languages like C# where attribute writing must happen before child elements.
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct XmlAttributesInMiddleFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          35  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          36  +
    > for XmlAttributesInMiddleFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          44  +
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl XmlAttributesInMiddleFluentBuilder {
          51  +
    /// Creates a new `XmlAttributesInMiddleFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the XmlAttributesInMiddle as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::xml_attributes_in_middle::XmlAttributesInMiddle::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddle::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
          97  +
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    #[allow(missing_docs)] // documentation missing in model
         112  +
    pub fn payload(mut self, input: crate::types::XmlAttributesInMiddlePayloadRequest) -> Self {
         113  +
        self.inner = self.inner.payload(input);
         114  +
        self
         115  +
    }
         116  +
    #[allow(missing_docs)] // documentation missing in model
         117  +
    pub fn set_payload(mut self, input: ::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest>) -> Self {
         118  +
        self.inner = self.inner.set_payload(input);
         119  +
        self
         120  +
    }
         121  +
    #[allow(missing_docs)] // documentation missing in model
         122  +
    pub fn get_payload(&self) -> &::std::option::Option<crate::types::XmlAttributesInMiddlePayloadRequest> {
         123  +
        self.inner.get_payload()
         124  +
    }
         125  +
}

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

@@ -393,393 +432,432 @@
  413    413   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  414    414   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  415    415   
    ) -> Self {
  416    416   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  417    417   
            source,
  418    418   
            meta: meta.unwrap_or_default(),
  419    419   
        })
  420    420   
    }
  421    421   
}
  422    422   
  423         -
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_output::XmlAttributesOnPayloadOutput;
  424         -
  425    423   
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_input::XmlAttributesOnPayloadInput;
  426    424   
         425  +
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_output::XmlAttributesOnPayloadOutput;
         426  +
  427    427   
mod _xml_attributes_on_payload_input;
  428    428   
  429    429   
mod _xml_attributes_on_payload_output;
  430    430   
  431    431   
/// Builders
  432    432   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes_on_payload/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_attributes_on_payload::_xml_attributes_on_payload_output::XmlAttributesOnPayloadOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_input::XmlAttributesOnPayloadInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_output::XmlAttributesOnPayloadOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_attributes_on_payload::builders::XmlAttributesOnPayloadInputBuilder {
    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_attributes_on_payload::XmlAttributesOnPayloadOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -369,369 +408,408 @@
  389    389   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  390    390   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  391    391   
    ) -> Self {
  392    392   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  393    393   
            source,
  394    394   
            meta: meta.unwrap_or_default(),
  395    395   
        })
  396    396   
    }
  397    397   
}
  398    398   
  399         -
pub use crate::operation::xml_blobs::_xml_blobs_output::XmlBlobsOutput;
  400         -
  401    399   
pub use crate::operation::xml_blobs::_xml_blobs_input::XmlBlobsInput;
  402    400   
         401  +
pub use crate::operation::xml_blobs::_xml_blobs_output::XmlBlobsOutput;
         402  +
  403    403   
mod _xml_blobs_input;
  404    404   
  405    405   
mod _xml_blobs_output;
  406    406   
  407    407   
/// Builders
  408    408   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_blobs/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_blobs::_xml_blobs_output::XmlBlobsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_blobs::_xml_blobs_input::XmlBlobsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_blobs::_xml_blobs_output::XmlBlobsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_blobs::builders::XmlBlobsInputBuilder {
    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_blobs::XmlBlobsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_blobs::XmlBlobsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -385,385 +424,424 @@
  405    405   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  406    406   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  407    407   
    ) -> Self {
  408    408   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  409    409   
            source,
  410    410   
            meta: meta.unwrap_or_default(),
  411    411   
        })
  412    412   
    }
  413    413   
}
  414    414   
  415         -
pub use crate::operation::xml_empty_blobs::_xml_empty_blobs_output::XmlEmptyBlobsOutput;
  416         -
  417    415   
pub use crate::operation::xml_empty_blobs::_xml_empty_blobs_input::XmlEmptyBlobsInput;
  418    416   
         417  +
pub use crate::operation::xml_empty_blobs::_xml_empty_blobs_output::XmlEmptyBlobsOutput;
         418  +
  419    419   
mod _xml_empty_blobs_input;
  420    420   
  421    421   
mod _xml_empty_blobs_output;
  422    422   
  423    423   
/// Builders
  424    424   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_empty_blobs/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_empty_blobs::_xml_empty_blobs_output::XmlEmptyBlobsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_empty_blobs::_xml_empty_blobs_input::XmlEmptyBlobsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_empty_blobs::_xml_empty_blobs_output::XmlEmptyBlobsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_empty_blobs::builders::XmlEmptyBlobsInputBuilder {
    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_empty_blobs::XmlEmptyBlobsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_empty_blobs::XmlEmptyBlobsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -431,431 +470,470 @@
  451    451   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  452    452   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  453    453   
    ) -> Self {
  454    454   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  455    455   
            source,
  456    456   
            meta: meta.unwrap_or_default(),
  457    457   
        })
  458    458   
    }
  459    459   
}
  460    460   
  461         -
pub use crate::operation::xml_empty_lists::_xml_empty_lists_output::XmlEmptyListsOutput;
  462         -
  463    461   
pub use crate::operation::xml_empty_lists::_xml_empty_lists_input::XmlEmptyListsInput;
  464    462   
         463  +
pub use crate::operation::xml_empty_lists::_xml_empty_lists_output::XmlEmptyListsOutput;
         464  +
  465    465   
mod _xml_empty_lists_input;
  466    466   
  467    467   
mod _xml_empty_lists_output;
  468    468   
  469    469   
/// Builders
  470    470   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_empty_lists/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_empty_lists::_xml_empty_lists_output::XmlEmptyListsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_empty_lists::_xml_empty_lists_input::XmlEmptyListsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_empty_lists::_xml_empty_lists_output::XmlEmptyListsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_empty_lists::builders::XmlEmptyListsInputBuilder {
    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_empty_lists::XmlEmptyListsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_empty_lists::XmlEmptyListsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

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

@@ -419,419 +458,458 @@
  439    439   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  440    440   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  441    441   
    ) -> Self {
  442    442   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  443    443   
            source,
  444    444   
            meta: meta.unwrap_or_default(),
  445    445   
        })
  446    446   
    }
  447    447   
}
  448    448   
  449         -
pub use crate::operation::xml_empty_maps::_xml_empty_maps_output::XmlEmptyMapsOutput;
  450         -
  451    449   
pub use crate::operation::xml_empty_maps::_xml_empty_maps_input::XmlEmptyMapsInput;
  452    450   
         451  +
pub use crate::operation::xml_empty_maps::_xml_empty_maps_output::XmlEmptyMapsOutput;
         452  +
  453    453   
mod _xml_empty_maps_input;
  454    454   
  455    455   
mod _xml_empty_maps_output;
  456    456   
  457    457   
/// Builders
  458    458   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_empty_maps/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_empty_maps::_xml_empty_maps_output::XmlEmptyMapsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::xml_empty_maps::_xml_empty_maps_input::XmlEmptyMapsInputBuilder;
    5      3   
           4  +
pub use crate::operation::xml_empty_maps::_xml_empty_maps_output::XmlEmptyMapsOutputBuilder;
           5  +
    6      6   
impl crate::operation::xml_empty_maps::builders::XmlEmptyMapsInputBuilder {
    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_empty_maps::XmlEmptyMapsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::xml_empty_maps::XmlEmptyMapsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,