Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/endpoint_with_host_label_operation/_endpoint_with_host_label_operation_output.rs

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct EndpointWithHostLabelOperationOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EndpointWithHostLabelOperationOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EndpointWithHostLabelOperationOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct EndpointWithHostLabelOperationOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EndpointWithHostLabelOperationOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EndpointWithHostLabelOperationOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EndpointWithHostLabelOperationOutput`](crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput {
   20         -
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/endpoint_with_host_label_operation/builders.rs

@@ -1,1 +124,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::endpoint_with_host_label_operation::_endpoint_with_host_label_operation_output::EndpointWithHostLabelOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::endpoint_with_host_label_operation::_endpoint_with_host_label_operation_input::EndpointWithHostLabelOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.endpoint_with_host_label_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `EndpointWithHostLabelOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `EndpointWithHostLabelOperation`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct EndpointWithHostLabelOperationFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl
   32     38   
    crate::client::customize::internal::CustomizableSend<
   33     39   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   34     40   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   35     41   
    > for EndpointWithHostLabelOperationFluentBuilder
   36     42   
{
   37     43   
    fn send(
   38     44   
        self,
   39     45   
        config_override: crate::config::Builder,
   40     46   
    ) -> crate::client::customize::internal::BoxFuture<
   41     47   
        crate::client::customize::internal::SendResult<
   42     48   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   43     49   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   44     50   
        >,
   45     51   
    > {
   46     52   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   47     53   
    }
   48     54   
}
          55  +
/* FluentBuilderGenerator.kt:282 */
   49     56   
impl EndpointWithHostLabelOperationFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `EndpointWithHostLabelOperationFluentBuilder`.
   51     59   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   52     60   
        Self {
   53     61   
            handle,
   54     62   
            inner: ::std::default::Default::default(),
   55     63   
            config_override: ::std::option::Option::None,
   56     64   
        }
   57     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:301 */
   58     67   
    /// Access the EndpointWithHostLabelOperation as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::endpoint_with_host_label_operation::builders::EndpointWithHostLabelOperationInputBuilder {
   60     69   
        &self.inner
   61     70   
    }
          71  +
    /* FluentBuilderGenerator.kt:145 */
   62     72   
    /// Sends the request and returns the response.
   63     73   
    ///
   64     74   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     75   
    /// can be matched against.
   66     76   
    ///
   67     77   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     78   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     79   
    /// set when configuring the client.
   70     80   
    pub async fn send(
   71     81   
        self,
   72     82   
    ) -> ::std::result::Result<
   73     83   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   76     86   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     87   
        >,
   78     88   
    > {
   79     89   
        let input = self
   80     90   
            .inner
   81     91   
            .build()
   82     92   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83     93   
        let runtime_plugins = crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperation::operation_runtime_plugins(
   84     94   
            self.handle.runtime_plugins.clone(),
   85     95   
            &self.handle.conf,
   86     96   
            self.config_override,
   87     97   
        );
   88     98   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperation::orchestrate(&runtime_plugins, input).await
   89     99   
    }
   90    100   
   91    101   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92    102   
    pub fn customize(
   93    103   
        self,
   94    104   
    ) -> crate::client::customize::CustomizableOperation<
   95    105   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationOutput,
   96    106   
        crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.label(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_label(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_label()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `FlattenedXmlMap`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct FlattenedXmlMap;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl FlattenedXmlMap {
    7         -
    /// Creates a new `FlattenedXmlMap`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `FlattenedXmlMap`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::flattened_xml_map::FlattenedXmlMapInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::flattened_xml_map::FlattenedXmlMapError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +384,460 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for FlattenedXmlMap {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("FlattenedXmlMap");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            FlattenedXmlMapRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            FlattenedXmlMapResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "FlattenedXmlMap",
  105    116   
            "Query Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("FlattenedXmlMap")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(FlattenedXmlMapEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::flattened_xml_map::FlattenedXmlMapError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::flattened_xml_map::FlattenedXmlMapError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct FlattenedXmlMapResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FlattenedXmlMapResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_flattened_xml_map::de_flattened_xml_map_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_flattened_xml_map::de_flattened_xml_map_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct FlattenedXmlMapRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for FlattenedXmlMapRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::flattened_xml_map::FlattenedXmlMapInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::flattened_xml_map::FlattenedXmlMapInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::flattened_xml_map::FlattenedXmlMapInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_flattened_xml_map_input::ser_flattened_xml_map_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct FlattenedXmlMapEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for FlattenedXmlMapEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "FlattenedXmlMapEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<FlattenedXmlMapInput>()
  217    231   
            .ok_or("failed to downcast to FlattenedXmlMapInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod flattened_xml_map_test {
  234    251   
  235    252   
    /// Serializes flattened XML maps in responses
  236    253   
    /// Test ID: QueryQueryFlattenedXmlMap
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn query_query_flattened_xml_map_response() {
  240    257   
        let expected_output = crate::operation::flattened_xml_map::FlattenedXmlMapOutput::builder()
  241    258   
            .set_my_map(::std::option::Option::Some({
  242    259   
                let mut ret = ::std::collections::HashMap::new();
  243    260   
                ret.insert(
  244    261   
                    "foo".to_owned(),
  245    262   
                    "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  246    263   
                );
  247    264   
                ret.insert(
  248    265   
                    "baz".to_owned(),
  249    266   
                    "Baz".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  250    267   
                );
  251    268   
                ret
  252    269   
            }))
  253    270   
            .build();
  254    271   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  255    272   
        .header("Content-Type", "text/xml")
  256    273   
        .status(200)
  257    274   
                    .body(::aws_smithy_types::body::SdkBody::from("<FlattenedXmlMapResponse xmlns=\"https://example.com/\">\n    <FlattenedXmlMapResult>\n        <myMap>\n            <key>foo</key>\n            <value>Foo</value>\n        </myMap>\n        <myMap>\n            <key>baz</key>\n            <value>Baz</value>\n        </myMap>\n    </FlattenedXmlMapResult>\n</FlattenedXmlMapResponse>"))
  258    275   
                    .unwrap()
  259    276   
                    ).unwrap();
  260    277   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  261    278   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  262    279   
  263    280   
        let op = crate::operation::flattened_xml_map::FlattenedXmlMap::new();
  264    281   
        let config = op.config().expect("the operation has config");
  265    282   
        let de = config
  266    283   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  267    284   
            .expect("the config must have a deserializer");
  268    285   
  269    286   
        let parsed = de.deserialize_streaming(&mut http_response);
  270    287   
        let parsed = parsed.unwrap_or_else(|| {
  271    288   
            let http_response = http_response.map(|body| {
  272    289   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  273    290   
                    body.bytes().unwrap(),
  274    291   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  275    292   
                )))
  276    293   
            });
  277    294   
            de.deserialize_nonstreaming(&http_response)
  278    295   
        });
  279    296   
        let parsed = parsed
  280    297   
            .expect("should be successful response")
  281    298   
            .downcast::<crate::operation::flattened_xml_map::FlattenedXmlMapOutput>()
  282    299   
            .unwrap();
  283    300   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  284    301   
    }
         302  +
         303  +
    /* ProtocolTestGenerator.kt:98 */
  285    304   
}
  286    305   
         306  +
/* OperationErrorGenerator.kt:79 */
  287    307   
/// Error type for the `FlattenedXmlMapError` operation.
         308  +
/* RustType.kt:516 */
  288    309   
#[non_exhaustive]
         310  +
/* RustType.kt:516 */
  289    311   
#[derive(::std::fmt::Debug)]
  290         -
pub enum FlattenedXmlMapError {
         312  +
pub /* OperationErrorGenerator.kt:81 */ enum FlattenedXmlMapError {
         313  +
    /* OperationErrorGenerator.kt:88 */
  291    314   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  292    315   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  293    316   
    variable wildcard pattern and check `.code()`:
  294    317   
     \
  295    318   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  296    319   
     \
  297    320   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-FlattenedXmlMapError) for what information is available for the error.")]
  298    321   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         322  +
    /* OperationErrorGenerator.kt:81 */
  299    323   
}
         324  +
/* OperationErrorGenerator.kt:218 */
  300    325   
impl FlattenedXmlMapError {
         326  +
    /* OperationErrorGenerator.kt:219 */
  301    327   
    /// Creates the `FlattenedXmlMapError::Unhandled` variant from any error type.
  302    328   
    pub fn unhandled(
  303    329   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  304    330   
    ) -> Self {
  305    331   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  306    332   
            source: err.into(),
  307    333   
            meta: ::std::default::Default::default(),
  308    334   
        })
  309    335   
    }
  310    336   
  311    337   
    /// Creates the `FlattenedXmlMapError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  312    338   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  313    339   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  314    340   
            source: err.clone().into(),
  315    341   
            meta: err,
  316    342   
        })
  317    343   
    }
  318         -
    ///
         344  +
    /// /* OperationErrorGenerator.kt:236 */
  319    345   
    /// Returns error metadata, which includes the error code, message,
  320    346   
    /// request ID, and potentially additional information.
  321    347   
    ///
         348  +
    /* OperationErrorGenerator.kt:242 */
  322    349   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         350  +
        /* OperationErrorGenerator.kt:243 */
  323    351   
        match self {
  324         -
            Self::Unhandled(e) => &e.meta,
         352  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         353  +
            /* OperationErrorGenerator.kt:243 */
  325    354   
        }
         355  +
        /* OperationErrorGenerator.kt:242 */
  326    356   
    }
         357  +
    /* OperationErrorGenerator.kt:218 */
  327    358   
}
         359  +
/* OperationErrorGenerator.kt:269 */
  328    360   
impl ::std::error::Error for FlattenedXmlMapError {
         361  +
    /* OperationErrorGenerator.kt:270 */
  329    362   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         363  +
        /* OperationErrorGenerator.kt:318 */
  330    364   
        match self {
  331         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         365  +
            /* OperationErrorGenerator.kt:326 */
         366  +
            Self::Unhandled(_inner) => {
         367  +
                /* OperationErrorGenerator.kt:279 */
         368  +
                ::std::option::Option::Some(&*_inner.source)
         369  +
                /* OperationErrorGenerator.kt:326 */
         370  +
            } /* OperationErrorGenerator.kt:318 */
  332    371   
        }
         372  +
        /* OperationErrorGenerator.kt:270 */
  333    373   
    }
         374  +
    /* OperationErrorGenerator.kt:269 */
  334    375   
}
         376  +
/* OperationErrorGenerator.kt:133 */
  335    377   
impl ::std::fmt::Display for FlattenedXmlMapError {
         378  +
    /* OperationErrorGenerator.kt:134 */
  336    379   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         380  +
        /* OperationErrorGenerator.kt:318 */
  337    381   
        match self {
         382  +
            /* OperationErrorGenerator.kt:326 */
  338    383   
            Self::Unhandled(_inner) => {
         384  +
                /* OperationErrorGenerator.kt:139 */
  339    385   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  340    386   
                    write!(f, "unhandled error ({code})")
  341    387   
                } else {
  342    388   
                    f.write_str("unhandled error")
  343    389   
                }
         390  +
                /* OperationErrorGenerator.kt:326 */
         391  +
            } /* OperationErrorGenerator.kt:318 */
  344    392   
        }
         393  +
        /* OperationErrorGenerator.kt:134 */
  345    394   
    }
  346         -
    }
         395  +
    /* OperationErrorGenerator.kt:133 */
  347    396   
}
         397  +
/* OperationErrorGenerator.kt:182 */
  348    398   
impl ::aws_smithy_types::retry::ProvideErrorKind for FlattenedXmlMapError {
         399  +
    /* OperationErrorGenerator.kt:186 */
  349    400   
    fn code(&self) -> ::std::option::Option<&str> {
         401  +
        /* OperationErrorGenerator.kt:187 */
  350    402   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         403  +
        /* OperationErrorGenerator.kt:186 */
  351    404   
    }
         405  +
    /* OperationErrorGenerator.kt:190 */
  352    406   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         407  +
        /* OperationErrorGenerator.kt:197 */
  353    408   
        ::std::option::Option::None
         409  +
        /* OperationErrorGenerator.kt:190 */
  354    410   
    }
         411  +
    /* OperationErrorGenerator.kt:182 */
  355    412   
}
         413  +
/* OperationErrorGenerator.kt:163 */
  356    414   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for FlattenedXmlMapError {
         415  +
    /* OperationErrorGenerator.kt:164 */
  357    416   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         417  +
        /* OperationErrorGenerator.kt:318 */
  358    418   
        match self {
  359         -
            Self::Unhandled(_inner) => &_inner.meta,
         419  +
            /* OperationErrorGenerator.kt:326 */
         420  +
            Self::Unhandled(_inner) => {
         421  +
                /* OperationErrorGenerator.kt:168 */
         422  +
                &_inner.meta
         423  +
                /* OperationErrorGenerator.kt:326 */
         424  +
            } /* OperationErrorGenerator.kt:318 */
  360    425   
        }
         426  +
        /* OperationErrorGenerator.kt:164 */
  361    427   
    }
         428  +
    /* OperationErrorGenerator.kt:163 */
  362    429   
}
         430  +
/* OperationErrorGenerator.kt:109 */
  363    431   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for FlattenedXmlMapError {
         432  +
    /* OperationErrorGenerator.kt:110 */
  364    433   
    fn create_unhandled_error(
  365    434   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  366    435   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  367    436   
    ) -> Self {
         437  +
        /* OperationErrorGenerator.kt:121 */
  368    438   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  369    439   
            source,
  370    440   
            meta: meta.unwrap_or_default(),
  371    441   
        })
         442  +
        /* OperationErrorGenerator.kt:110 */
  372    443   
    }
         444  +
    /* OperationErrorGenerator.kt:109 */
  373    445   
}
  374    446   
         447  +
/* CodegenDelegator.kt:255 */
  375    448   
pub use crate::operation::flattened_xml_map::_flattened_xml_map_output::FlattenedXmlMapOutput;
  376    449   
         450  +
/* CodegenDelegator.kt:255 */
  377    451   
pub use crate::operation::flattened_xml_map::_flattened_xml_map_input::FlattenedXmlMapInput;
  378    452   
         453  +
/* RustModule.kt:172 */
  379    454   
mod _flattened_xml_map_input;
  380    455   
         456  +
/* RustModule.kt:172 */
  381    457   
mod _flattened_xml_map_output;
  382    458   
  383         -
/// Builders
         459  +
/// /* CodegenDelegator.kt:51 */Builders
  384    460   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map/_flattened_xml_map_input.rs

@@ -1,1 +24,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct FlattenedXmlMapInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct FlattenedXmlMapInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl FlattenedXmlMapInput {
    7         -
    /// Creates a new builder-style object to manufacture [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::flattened_xml_map::builders::FlattenedXmlMapInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::flattened_xml_map::builders::FlattenedXmlMapInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct FlattenedXmlMapInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct FlattenedXmlMapInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl FlattenedXmlMapInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`FlattenedXmlMapInput`](crate::operation::flattened_xml_map::FlattenedXmlMapInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::flattened_xml_map::FlattenedXmlMapInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::flattened_xml_map::FlattenedXmlMapInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::flattened_xml_map::FlattenedXmlMapInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map/_flattened_xml_map_output.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map/builders.rs

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::flattened_xml_map::_flattened_xml_map_output::FlattenedXmlMapOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::flattened_xml_map::_flattened_xml_map_input::FlattenedXmlMapInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::flattened_xml_map::builders::FlattenedXmlMapInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::flattened_xml_map::FlattenedXmlMapError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.flattened_xml_map();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `FlattenedXmlMap`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `FlattenedXmlMap`.
   24     27   
///
   25         -
/// Flattened maps
          28  +
/// /* FluentBuilderGenerator.kt:130 */Flattened maps
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct FlattenedXmlMapFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::flattened_xml_map::builders::FlattenedXmlMapInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   35     41   
        crate::operation::flattened_xml_map::FlattenedXmlMapError,
   36     42   
    > for FlattenedXmlMapFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   44     50   
            crate::operation::flattened_xml_map::FlattenedXmlMapError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl FlattenedXmlMapFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `FlattenedXmlMapFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the FlattenedXmlMap as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::flattened_xml_map::builders::FlattenedXmlMapInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::flattened_xml_map::FlattenedXmlMapError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::flattened_xml_map::FlattenedXmlMap::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::flattened_xml_map::FlattenedXmlMap::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::flattened_xml_map::FlattenedXmlMapOutput,
   97    107   
        crate::operation::flattened_xml_map::FlattenedXmlMapError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:282 */
  111    123   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_name.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `FlattenedXmlMapWithXmlName`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct FlattenedXmlMapWithXmlName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl FlattenedXmlMapWithXmlName {
    7         -
    /// Creates a new `FlattenedXmlMapWithXmlName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `FlattenedXmlMapWithXmlName`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +384,460 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for FlattenedXmlMapWithXmlName {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("FlattenedXmlMapWithXmlName");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            FlattenedXmlMapWithXmlNameRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            FlattenedXmlMapWithXmlNameResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "FlattenedXmlMapWithXmlName",
  111    122   
            "Query Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("FlattenedXmlMapWithXmlName")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(FlattenedXmlMapWithXmlNameEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct FlattenedXmlMapWithXmlNameResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FlattenedXmlMapWithXmlNameResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_name::de_flattened_xml_map_with_xml_name_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_name::de_flattened_xml_map_with_xml_name_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct FlattenedXmlMapWithXmlNameRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for FlattenedXmlMapWithXmlNameRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_name_input::ser_flattened_xml_map_with_xml_name_input_input_input(&input)?,
  197    210   
        );
  198    211   
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct FlattenedXmlMapWithXmlNameEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for FlattenedXmlMapWithXmlNameEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "FlattenedXmlMapWithXmlNameEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<FlattenedXmlMapWithXmlNameInput>()
  223    237   
            .ok_or("failed to downcast to FlattenedXmlMapWithXmlNameInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* RustType.kt:516 */
  237    252   
#[allow(unreachable_code, unused_variables)]
         253  +
/* RustType.kt:516 */
  238    254   
#[cfg(test)]
         255  +
/* ProtocolTestGenerator.kt:98 */
  239    256   
mod flattened_xml_map_with_xml_name_test {
  240    257   
  241    258   
    /// Serializes flattened XML maps in responses that have xmlName on members
  242    259   
    /// Test ID: QueryQueryFlattenedXmlMapWithXmlName
  243    260   
    #[::tokio::test]
  244    261   
    #[::tracing_test::traced_test]
  245    262   
    async fn query_query_flattened_xml_map_with_xml_name_response() {
  246    263   
        let expected_output = crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput::builder()
  247    264   
            .set_my_map(::std::option::Option::Some({
  248    265   
                let mut ret = ::std::collections::HashMap::new();
  249    266   
                ret.insert("a".to_owned(), "A".to_owned());
  250    267   
                ret.insert("b".to_owned(), "B".to_owned());
  251    268   
                ret
  252    269   
            }))
  253    270   
            .build();
  254    271   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  255    272   
        .header("Content-Type", "text/xml")
  256    273   
        .status(200)
  257    274   
                    .body(::aws_smithy_types::body::SdkBody::from("<FlattenedXmlMapWithXmlNameResponse xmlns=\"https://example.com/\">\n    <FlattenedXmlMapWithXmlNameResult>\n        <KVP>\n            <K>a</K>\n            <V>A</V>\n        </KVP>\n        <KVP>\n            <K>b</K>\n            <V>B</V>\n        </KVP>\n    </FlattenedXmlMapWithXmlNameResult>\n</FlattenedXmlMapWithXmlNameResponse>"))
  258    275   
                    .unwrap()
  259    276   
                    ).unwrap();
  260    277   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  261    278   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  262    279   
  263    280   
        let op = crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlName::new();
  264    281   
        let config = op.config().expect("the operation has config");
  265    282   
        let de = config
  266    283   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  267    284   
            .expect("the config must have a deserializer");
  268    285   
  269    286   
        let parsed = de.deserialize_streaming(&mut http_response);
  270    287   
        let parsed = parsed.unwrap_or_else(|| {
  271    288   
            let http_response = http_response.map(|body| {
  272    289   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  273    290   
                    body.bytes().unwrap(),
  274    291   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  275    292   
                )))
  276    293   
            });
  277    294   
            de.deserialize_nonstreaming(&http_response)
  278    295   
        });
  279    296   
        let parsed = parsed
  280    297   
            .expect("should be successful response")
  281    298   
            .downcast::<crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput>()
  282    299   
            .unwrap();
  283    300   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  284    301   
    }
         302  +
         303  +
    /* ProtocolTestGenerator.kt:98 */
  285    304   
}
  286    305   
         306  +
/* OperationErrorGenerator.kt:79 */
  287    307   
/// Error type for the `FlattenedXmlMapWithXmlNameError` operation.
         308  +
/* RustType.kt:516 */
  288    309   
#[non_exhaustive]
         310  +
/* RustType.kt:516 */
  289    311   
#[derive(::std::fmt::Debug)]
  290         -
pub enum FlattenedXmlMapWithXmlNameError {
         312  +
pub /* OperationErrorGenerator.kt:81 */ enum FlattenedXmlMapWithXmlNameError {
         313  +
    /* OperationErrorGenerator.kt:88 */
  291    314   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  292    315   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  293    316   
    variable wildcard pattern and check `.code()`:
  294    317   
     \
  295    318   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  296    319   
     \
  297    320   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-FlattenedXmlMapWithXmlNameError) for what information is available for the error.")]
  298    321   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         322  +
    /* OperationErrorGenerator.kt:81 */
  299    323   
}
         324  +
/* OperationErrorGenerator.kt:218 */
  300    325   
impl FlattenedXmlMapWithXmlNameError {
         326  +
    /* OperationErrorGenerator.kt:219 */
  301    327   
    /// Creates the `FlattenedXmlMapWithXmlNameError::Unhandled` variant from any error type.
  302    328   
    pub fn unhandled(
  303    329   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  304    330   
    ) -> Self {
  305    331   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  306    332   
            source: err.into(),
  307    333   
            meta: ::std::default::Default::default(),
  308    334   
        })
  309    335   
    }
  310    336   
  311    337   
    /// Creates the `FlattenedXmlMapWithXmlNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  312    338   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  313    339   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  314    340   
            source: err.clone().into(),
  315    341   
            meta: err,
  316    342   
        })
  317    343   
    }
  318         -
    ///
         344  +
    /// /* OperationErrorGenerator.kt:236 */
  319    345   
    /// Returns error metadata, which includes the error code, message,
  320    346   
    /// request ID, and potentially additional information.
  321    347   
    ///
         348  +
    /* OperationErrorGenerator.kt:242 */
  322    349   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         350  +
        /* OperationErrorGenerator.kt:243 */
  323    351   
        match self {
  324         -
            Self::Unhandled(e) => &e.meta,
         352  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         353  +
            /* OperationErrorGenerator.kt:243 */
  325    354   
        }
         355  +
        /* OperationErrorGenerator.kt:242 */
  326    356   
    }
         357  +
    /* OperationErrorGenerator.kt:218 */
  327    358   
}
         359  +
/* OperationErrorGenerator.kt:269 */
  328    360   
impl ::std::error::Error for FlattenedXmlMapWithXmlNameError {
         361  +
    /* OperationErrorGenerator.kt:270 */
  329    362   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         363  +
        /* OperationErrorGenerator.kt:318 */
  330    364   
        match self {
  331         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         365  +
            /* OperationErrorGenerator.kt:326 */
         366  +
            Self::Unhandled(_inner) => {
         367  +
                /* OperationErrorGenerator.kt:279 */
         368  +
                ::std::option::Option::Some(&*_inner.source)
         369  +
                /* OperationErrorGenerator.kt:326 */
         370  +
            } /* OperationErrorGenerator.kt:318 */
  332    371   
        }
         372  +
        /* OperationErrorGenerator.kt:270 */
  333    373   
    }
         374  +
    /* OperationErrorGenerator.kt:269 */
  334    375   
}
         376  +
/* OperationErrorGenerator.kt:133 */
  335    377   
impl ::std::fmt::Display for FlattenedXmlMapWithXmlNameError {
         378  +
    /* OperationErrorGenerator.kt:134 */
  336    379   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         380  +
        /* OperationErrorGenerator.kt:318 */
  337    381   
        match self {
         382  +
            /* OperationErrorGenerator.kt:326 */
  338    383   
            Self::Unhandled(_inner) => {
         384  +
                /* OperationErrorGenerator.kt:139 */
  339    385   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  340    386   
                    write!(f, "unhandled error ({code})")
  341    387   
                } else {
  342    388   
                    f.write_str("unhandled error")
  343    389   
                }
         390  +
                /* OperationErrorGenerator.kt:326 */
         391  +
            } /* OperationErrorGenerator.kt:318 */
  344    392   
        }
         393  +
        /* OperationErrorGenerator.kt:134 */
  345    394   
    }
  346         -
    }
         395  +
    /* OperationErrorGenerator.kt:133 */
  347    396   
}
         397  +
/* OperationErrorGenerator.kt:182 */
  348    398   
impl ::aws_smithy_types::retry::ProvideErrorKind for FlattenedXmlMapWithXmlNameError {
         399  +
    /* OperationErrorGenerator.kt:186 */
  349    400   
    fn code(&self) -> ::std::option::Option<&str> {
         401  +
        /* OperationErrorGenerator.kt:187 */
  350    402   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         403  +
        /* OperationErrorGenerator.kt:186 */
  351    404   
    }
         405  +
    /* OperationErrorGenerator.kt:190 */
  352    406   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         407  +
        /* OperationErrorGenerator.kt:197 */
  353    408   
        ::std::option::Option::None
         409  +
        /* OperationErrorGenerator.kt:190 */
  354    410   
    }
         411  +
    /* OperationErrorGenerator.kt:182 */
  355    412   
}
         413  +
/* OperationErrorGenerator.kt:163 */
  356    414   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for FlattenedXmlMapWithXmlNameError {
         415  +
    /* OperationErrorGenerator.kt:164 */
  357    416   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         417  +
        /* OperationErrorGenerator.kt:318 */
  358    418   
        match self {
  359         -
            Self::Unhandled(_inner) => &_inner.meta,
         419  +
            /* OperationErrorGenerator.kt:326 */
         420  +
            Self::Unhandled(_inner) => {
         421  +
                /* OperationErrorGenerator.kt:168 */
         422  +
                &_inner.meta
         423  +
                /* OperationErrorGenerator.kt:326 */
         424  +
            } /* OperationErrorGenerator.kt:318 */
  360    425   
        }
         426  +
        /* OperationErrorGenerator.kt:164 */
  361    427   
    }
         428  +
    /* OperationErrorGenerator.kt:163 */
  362    429   
}
         430  +
/* OperationErrorGenerator.kt:109 */
  363    431   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for FlattenedXmlMapWithXmlNameError {
         432  +
    /* OperationErrorGenerator.kt:110 */
  364    433   
    fn create_unhandled_error(
  365    434   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  366    435   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  367    436   
    ) -> Self {
         437  +
        /* OperationErrorGenerator.kt:121 */
  368    438   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  369    439   
            source,
  370    440   
            meta: meta.unwrap_or_default(),
  371    441   
        })
         442  +
        /* OperationErrorGenerator.kt:110 */
  372    443   
    }
         444  +
    /* OperationErrorGenerator.kt:109 */
  373    445   
}
  374    446   
         447  +
/* CodegenDelegator.kt:255 */
  375    448   
pub use crate::operation::flattened_xml_map_with_xml_name::_flattened_xml_map_with_xml_name_output::FlattenedXmlMapWithXmlNameOutput;
  376    449   
         450  +
/* CodegenDelegator.kt:255 */
  377    451   
pub use crate::operation::flattened_xml_map_with_xml_name::_flattened_xml_map_with_xml_name_input::FlattenedXmlMapWithXmlNameInput;
  378    452   
         453  +
/* RustModule.kt:172 */
  379    454   
mod _flattened_xml_map_with_xml_name_input;
  380    455   
         456  +
/* RustModule.kt:172 */
  381    457   
mod _flattened_xml_map_with_xml_name_output;
  382    458   
  383         -
/// Builders
         459  +
/// /* CodegenDelegator.kt:51 */Builders
  384    460   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_name/_flattened_xml_map_with_xml_name_input.rs

@@ -1,1 +27,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct FlattenedXmlMapWithXmlNameInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct FlattenedXmlMapWithXmlNameInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl FlattenedXmlMapWithXmlNameInput {
    7         -
    /// Creates a new builder-style object to manufacture [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct FlattenedXmlMapWithXmlNameInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct FlattenedXmlMapWithXmlNameInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl FlattenedXmlMapWithXmlNameInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<
   22     35   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
   23     36   
        ::aws_smithy_types::error::operation::BuildError,
   24     37   
    > {
   25         -
        ::std::result::Result::Ok(crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput {})
          38  +
        /* BuilderGenerator.kt:254 */
          39  +
        ::std::result::Result::Ok(
          40  +
            /* BuilderGenerator.kt:477 */
          41  +
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput {
          42  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          43  +
        )
          44  +
        /* BuilderGenerator.kt:253 */
   26     45   
    }
          46  +
    /* BuilderGenerator.kt:355 */
   27     47   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_name/_flattened_xml_map_with_xml_name_output.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_name/builders.rs

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::flattened_xml_map_with_xml_name::_flattened_xml_map_with_xml_name_output::FlattenedXmlMapWithXmlNameOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::flattened_xml_map_with_xml_name::_flattened_xml_map_with_xml_name_input::FlattenedXmlMapWithXmlNameInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.flattened_xml_map_with_xml_name();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `FlattenedXmlMapWithXmlName`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `FlattenedXmlMapWithXmlName`.
   24     27   
///
   25         -
/// Flattened maps with @xmlName
          28  +
/// /* FluentBuilderGenerator.kt:130 */Flattened maps with @xmlName
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct FlattenedXmlMapWithXmlNameFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   35     41   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   36     42   
    > for FlattenedXmlMapWithXmlNameFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   44     50   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl FlattenedXmlMapWithXmlNameFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `FlattenedXmlMapWithXmlNameFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the FlattenedXmlMapWithXmlName as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlName::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlName::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   97    107   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:282 */
  111    123   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_namespace.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `FlattenedXmlMapWithXmlNamespace`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct FlattenedXmlMapWithXmlNamespace;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl FlattenedXmlMapWithXmlNamespace {
    7         -
    /// Creates a new `FlattenedXmlMapWithXmlNamespace`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `FlattenedXmlMapWithXmlNamespace`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +390,466 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for FlattenedXmlMapWithXmlNamespace {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("FlattenedXmlMapWithXmlNamespace");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            FlattenedXmlMapWithXmlNamespaceRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            FlattenedXmlMapWithXmlNamespaceResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "FlattenedXmlMapWithXmlNamespace",
  111    122   
            "Query Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("FlattenedXmlMapWithXmlNamespace")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(FlattenedXmlMapWithXmlNamespaceEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct FlattenedXmlMapWithXmlNamespaceResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FlattenedXmlMapWithXmlNamespaceResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_namespace::de_flattened_xml_map_with_xml_namespace_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_namespace::de_flattened_xml_map_with_xml_namespace_http_response(
  155    167   
                status, headers, body,
  156    168   
            )
  157    169   
        };
  158    170   
        crate::protocol_serde::type_erase_result(parse_result)
  159    171   
    }
  160    172   
}
         173  +
/* RequestSerializerGenerator.kt:67 */
  161    174   
#[derive(Debug)]
  162    175   
struct FlattenedXmlMapWithXmlNamespaceRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for FlattenedXmlMapWithXmlNamespaceRequestSerializer {
  164    177   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  165    178   
    fn serialize_input(
  166    179   
        &self,
  167    180   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  168    181   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  169    182   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  170    183   
        let input = input
  171    184   
            .downcast::<crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput>()
  172    185   
            .expect("correct type");
  173    186   
        let _header_serialization_settings = _cfg
  174    187   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175    188   
            .cloned()
  176    189   
            .unwrap_or_default();
  177    190   
        let mut request_builder = {
  178    191   
            fn uri_base(
  179    192   
                _input: &crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput,
  180    193   
                output: &mut ::std::string::String,
  181    194   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182    195   
                use ::std::fmt::Write as _;
  183    196   
                ::std::write!(output, "/").expect("formatting should succeed");
  184    197   
                ::std::result::Result::Ok(())
  185    198   
            }
  186    199   
            #[allow(clippy::unnecessary_wraps)]
  187    200   
            fn update_http_builder(
  188    201   
                input: &crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput,
  189    202   
                builder: ::http::request::Builder,
  190    203   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191    204   
                let mut uri = ::std::string::String::new();
  192    205   
                uri_base(input, &mut uri)?;
  193    206   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194    207   
            }
  195    208   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196    209   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  197    210   
            builder
  198    211   
        };
  199    212   
        let body = ::aws_smithy_types::body::SdkBody::from(
  200    213   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_namespace_input::ser_flattened_xml_map_with_xml_namespace_input_input_input(
  201    214   
                &input,
  202    215   
            )?,
  203    216   
        );
  204    217   
  205    218   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  206    219   
    }
  207    220   
}
         221  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  208    222   
#[derive(Debug)]
  209    223   
struct FlattenedXmlMapWithXmlNamespaceEndpointParamsInterceptor;
  210    224   
  211    225   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for FlattenedXmlMapWithXmlNamespaceEndpointParamsInterceptor {
  212    226   
    fn name(&self) -> &'static str {
  213    227   
        "FlattenedXmlMapWithXmlNamespaceEndpointParamsInterceptor"
  214    228   
    }
  215    229   
  216    230   
    fn read_before_execution(
  217    231   
        &self,
  218    232   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  219    233   
            '_,
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  221    235   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  223    237   
        >,
  224    238   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  225    239   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  226    240   
        let _input = context
  227    241   
            .input()
  228    242   
            .downcast_ref::<FlattenedXmlMapWithXmlNamespaceInput>()
  229    243   
            .ok_or("failed to downcast to FlattenedXmlMapWithXmlNamespaceInput")?;
  230    244   
  231    245   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  233    247   
        })?;
  234    248   
        cfg.interceptor_state()
  235    249   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  236    250   
        ::std::result::Result::Ok(())
  237    251   
    }
  238    252   
}
  239    253   
  240    254   
// The get_* functions below are generated from JMESPath expressions in the
  241    255   
// operationContextParams trait. They target the operation's input shape.
  242    256   
         257  +
/* RustType.kt:516 */
  243    258   
#[allow(unreachable_code, unused_variables)]
         259  +
/* RustType.kt:516 */
  244    260   
#[cfg(test)]
         261  +
/* ProtocolTestGenerator.kt:98 */
  245    262   
mod flattened_xml_map_with_xml_namespace_test {
  246    263   
  247    264   
    /// Serializes flattened XML maps in responses that have xmlNamespace and xmlName on members
  248    265   
    /// Test ID: QueryQueryFlattenedXmlMapWithXmlNamespace
  249    266   
    #[::tokio::test]
  250    267   
    #[::tracing_test::traced_test]
  251    268   
    async fn query_query_flattened_xml_map_with_xml_namespace_response() {
  252    269   
        let expected_output = crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput::builder()
  253    270   
            .set_my_map(::std::option::Option::Some({
  254    271   
                let mut ret = ::std::collections::HashMap::new();
  255    272   
                ret.insert("a".to_owned(), "A".to_owned());
  256    273   
                ret.insert("b".to_owned(), "B".to_owned());
  257    274   
                ret
  258    275   
            }))
  259    276   
            .build();
  260    277   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  261    278   
        .header("Content-Type", "text/xml")
  262    279   
        .status(200)
  263    280   
                    .body(::aws_smithy_types::body::SdkBody::from("<FlattenedXmlMapWithXmlNamespaceResponse xmlns=\"https://example.com/\">\n    <FlattenedXmlMapWithXmlNamespaceResult>\n        <KVP xmlns=\"https://the-member.example.com\">\n            <K xmlns=\"https://the-key.example.com\">a</K>\n            <V xmlns=\"https://the-value.example.com\">A</V>\n        </KVP>\n        <KVP xmlns=\"https://the-member.example.com\">\n            <K xmlns=\"https://the-key.example.com\">b</K>\n            <V xmlns=\"https://the-value.example.com\">B</V>\n        </KVP>\n    </FlattenedXmlMapWithXmlNamespaceResult>\n</FlattenedXmlMapWithXmlNamespaceResponse>"))
  264    281   
                    .unwrap()
  265    282   
                    ).unwrap();
  266    283   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  267    284   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  268    285   
  269    286   
        let op = crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespace::new();
  270    287   
        let config = op.config().expect("the operation has config");
  271    288   
        let de = config
  272    289   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  273    290   
            .expect("the config must have a deserializer");
  274    291   
  275    292   
        let parsed = de.deserialize_streaming(&mut http_response);
  276    293   
        let parsed = parsed.unwrap_or_else(|| {
  277    294   
            let http_response = http_response.map(|body| {
  278    295   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  279    296   
                    body.bytes().unwrap(),
  280    297   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  281    298   
                )))
  282    299   
            });
  283    300   
            de.deserialize_nonstreaming(&http_response)
  284    301   
        });
  285    302   
        let parsed = parsed
  286    303   
            .expect("should be successful response")
  287    304   
            .downcast::<crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput>()
  288    305   
            .unwrap();
  289    306   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  290    307   
    }
         308  +
         309  +
    /* ProtocolTestGenerator.kt:98 */
  291    310   
}
  292    311   
         312  +
/* OperationErrorGenerator.kt:79 */
  293    313   
/// Error type for the `FlattenedXmlMapWithXmlNamespaceError` operation.
         314  +
/* RustType.kt:516 */
  294    315   
#[non_exhaustive]
         316  +
/* RustType.kt:516 */
  295    317   
#[derive(::std::fmt::Debug)]
  296         -
pub enum FlattenedXmlMapWithXmlNamespaceError {
         318  +
pub /* OperationErrorGenerator.kt:81 */ enum FlattenedXmlMapWithXmlNamespaceError {
         319  +
    /* OperationErrorGenerator.kt:88 */
  297    320   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  298    321   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  299    322   
    variable wildcard pattern and check `.code()`:
  300    323   
     \
  301    324   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  302    325   
     \
  303    326   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-FlattenedXmlMapWithXmlNamespaceError) for what information is available for the error.")]
  304    327   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         328  +
    /* OperationErrorGenerator.kt:81 */
  305    329   
}
         330  +
/* OperationErrorGenerator.kt:218 */
  306    331   
impl FlattenedXmlMapWithXmlNamespaceError {
         332  +
    /* OperationErrorGenerator.kt:219 */
  307    333   
    /// Creates the `FlattenedXmlMapWithXmlNamespaceError::Unhandled` variant from any error type.
  308    334   
    pub fn unhandled(
  309    335   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  310    336   
    ) -> Self {
  311    337   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  312    338   
            source: err.into(),
  313    339   
            meta: ::std::default::Default::default(),
  314    340   
        })
  315    341   
    }
  316    342   
  317    343   
    /// Creates the `FlattenedXmlMapWithXmlNamespaceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  318    344   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  319    345   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  320    346   
            source: err.clone().into(),
  321    347   
            meta: err,
  322    348   
        })
  323    349   
    }
  324         -
    ///
         350  +
    /// /* OperationErrorGenerator.kt:236 */
  325    351   
    /// Returns error metadata, which includes the error code, message,
  326    352   
    /// request ID, and potentially additional information.
  327    353   
    ///
         354  +
    /* OperationErrorGenerator.kt:242 */
  328    355   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         356  +
        /* OperationErrorGenerator.kt:243 */
  329    357   
        match self {
  330         -
            Self::Unhandled(e) => &e.meta,
         358  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         359  +
            /* OperationErrorGenerator.kt:243 */
  331    360   
        }
         361  +
        /* OperationErrorGenerator.kt:242 */
  332    362   
    }
         363  +
    /* OperationErrorGenerator.kt:218 */
  333    364   
}
         365  +
/* OperationErrorGenerator.kt:269 */
  334    366   
impl ::std::error::Error for FlattenedXmlMapWithXmlNamespaceError {
         367  +
    /* OperationErrorGenerator.kt:270 */
  335    368   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         369  +
        /* OperationErrorGenerator.kt:318 */
  336    370   
        match self {
  337         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         371  +
            /* OperationErrorGenerator.kt:326 */
         372  +
            Self::Unhandled(_inner) => {
         373  +
                /* OperationErrorGenerator.kt:279 */
         374  +
                ::std::option::Option::Some(&*_inner.source)
         375  +
                /* OperationErrorGenerator.kt:326 */
         376  +
            } /* OperationErrorGenerator.kt:318 */
  338    377   
        }
         378  +
        /* OperationErrorGenerator.kt:270 */
  339    379   
    }
         380  +
    /* OperationErrorGenerator.kt:269 */
  340    381   
}
         382  +
/* OperationErrorGenerator.kt:133 */
  341    383   
impl ::std::fmt::Display for FlattenedXmlMapWithXmlNamespaceError {
         384  +
    /* OperationErrorGenerator.kt:134 */
  342    385   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         386  +
        /* OperationErrorGenerator.kt:318 */
  343    387   
        match self {
         388  +
            /* OperationErrorGenerator.kt:326 */
  344    389   
            Self::Unhandled(_inner) => {
         390  +
                /* OperationErrorGenerator.kt:139 */
  345    391   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  346    392   
                    write!(f, "unhandled error ({code})")
  347    393   
                } else {
  348    394   
                    f.write_str("unhandled error")
  349    395   
                }
         396  +
                /* OperationErrorGenerator.kt:326 */
         397  +
            } /* OperationErrorGenerator.kt:318 */
  350    398   
        }
         399  +
        /* OperationErrorGenerator.kt:134 */
  351    400   
    }
  352         -
    }
         401  +
    /* OperationErrorGenerator.kt:133 */
  353    402   
}
         403  +
/* OperationErrorGenerator.kt:182 */
  354    404   
impl ::aws_smithy_types::retry::ProvideErrorKind for FlattenedXmlMapWithXmlNamespaceError {
         405  +
    /* OperationErrorGenerator.kt:186 */
  355    406   
    fn code(&self) -> ::std::option::Option<&str> {
         407  +
        /* OperationErrorGenerator.kt:187 */
  356    408   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         409  +
        /* OperationErrorGenerator.kt:186 */
  357    410   
    }
         411  +
    /* OperationErrorGenerator.kt:190 */
  358    412   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         413  +
        /* OperationErrorGenerator.kt:197 */
  359    414   
        ::std::option::Option::None
         415  +
        /* OperationErrorGenerator.kt:190 */
  360    416   
    }
         417  +
    /* OperationErrorGenerator.kt:182 */
  361    418   
}
         419  +
/* OperationErrorGenerator.kt:163 */
  362    420   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for FlattenedXmlMapWithXmlNamespaceError {
         421  +
    /* OperationErrorGenerator.kt:164 */
  363    422   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         423  +
        /* OperationErrorGenerator.kt:318 */
  364    424   
        match self {
  365         -
            Self::Unhandled(_inner) => &_inner.meta,
         425  +
            /* OperationErrorGenerator.kt:326 */
         426  +
            Self::Unhandled(_inner) => {
         427  +
                /* OperationErrorGenerator.kt:168 */
         428  +
                &_inner.meta
         429  +
                /* OperationErrorGenerator.kt:326 */
         430  +
            } /* OperationErrorGenerator.kt:318 */
  366    431   
        }
         432  +
        /* OperationErrorGenerator.kt:164 */
  367    433   
    }
         434  +
    /* OperationErrorGenerator.kt:163 */
  368    435   
}
         436  +
/* OperationErrorGenerator.kt:109 */
  369    437   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for FlattenedXmlMapWithXmlNamespaceError {
         438  +
    /* OperationErrorGenerator.kt:110 */
  370    439   
    fn create_unhandled_error(
  371    440   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  372    441   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  373    442   
    ) -> Self {
         443  +
        /* OperationErrorGenerator.kt:121 */
  374    444   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  375    445   
            source,
  376    446   
            meta: meta.unwrap_or_default(),
  377    447   
        })
         448  +
        /* OperationErrorGenerator.kt:110 */
  378    449   
    }
         450  +
    /* OperationErrorGenerator.kt:109 */
  379    451   
}
  380    452   
         453  +
/* CodegenDelegator.kt:255 */
  381    454   
pub use crate::operation::flattened_xml_map_with_xml_namespace::_flattened_xml_map_with_xml_namespace_output::FlattenedXmlMapWithXmlNamespaceOutput;
  382    455   
         456  +
/* CodegenDelegator.kt:255 */
  383    457   
pub use crate::operation::flattened_xml_map_with_xml_namespace::_flattened_xml_map_with_xml_namespace_input::FlattenedXmlMapWithXmlNamespaceInput;
  384    458   
         459  +
/* RustModule.kt:172 */
  385    460   
mod _flattened_xml_map_with_xml_namespace_input;
  386    461   
         462  +
/* RustModule.kt:172 */
  387    463   
mod _flattened_xml_map_with_xml_namespace_output;
  388    464   
  389         -
/// Builders
         465  +
/// /* CodegenDelegator.kt:51 */Builders
  390    466   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_namespace/_flattened_xml_map_with_xml_namespace_input.rs

@@ -1,1 +27,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct FlattenedXmlMapWithXmlNamespaceInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct FlattenedXmlMapWithXmlNamespaceInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl FlattenedXmlMapWithXmlNamespaceInput {
    7         -
    /// Creates a new builder-style object to manufacture [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::flattened_xml_map_with_xml_namespace::builders::FlattenedXmlMapWithXmlNamespaceInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::flattened_xml_map_with_xml_namespace::builders::FlattenedXmlMapWithXmlNamespaceInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct FlattenedXmlMapWithXmlNamespaceInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct FlattenedXmlMapWithXmlNamespaceInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl FlattenedXmlMapWithXmlNamespaceInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`FlattenedXmlMapWithXmlNamespaceInput`](crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<
   22     35   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput,
   23     36   
        ::aws_smithy_types::error::operation::BuildError,
   24     37   
    > {
   25         -
        ::std::result::Result::Ok(crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput {})
          38  +
        /* BuilderGenerator.kt:254 */
          39  +
        ::std::result::Result::Ok(
          40  +
            /* BuilderGenerator.kt:477 */
          41  +
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput {
          42  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          43  +
        )
          44  +
        /* BuilderGenerator.kt:253 */
   26     45   
    }
          46  +
    /* BuilderGenerator.kt:355 */
   27     47   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_namespace/_flattened_xml_map_with_xml_namespace_output.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/flattened_xml_map_with_xml_namespace/builders.rs

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::flattened_xml_map_with_xml_namespace::_flattened_xml_map_with_xml_namespace_output::FlattenedXmlMapWithXmlNamespaceOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::flattened_xml_map_with_xml_namespace::_flattened_xml_map_with_xml_namespace_input::FlattenedXmlMapWithXmlNamespaceInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::flattened_xml_map_with_xml_namespace::builders::FlattenedXmlMapWithXmlNamespaceInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.flattened_xml_map_with_xml_namespace();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `FlattenedXmlMapWithXmlNamespace`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `FlattenedXmlMapWithXmlNamespace`.
   24     27   
///
   25         -
/// Flattened maps with @xmlNamespace and @xmlName
          28  +
/// /* FluentBuilderGenerator.kt:130 */Flattened maps with @xmlNamespace and @xmlName
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct FlattenedXmlMapWithXmlNamespaceFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::flattened_xml_map_with_xml_namespace::builders::FlattenedXmlMapWithXmlNamespaceInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   35     41   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   36     42   
    > for FlattenedXmlMapWithXmlNamespaceFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   44     50   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl FlattenedXmlMapWithXmlNamespaceFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `FlattenedXmlMapWithXmlNamespaceFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the FlattenedXmlMapWithXmlNamespace as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::flattened_xml_map_with_xml_namespace::builders::FlattenedXmlMapWithXmlNamespaceInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespace::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespace::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   97    107   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:282 */
  111    123   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `FractionalSeconds`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct FractionalSeconds;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl FractionalSeconds {
    7         -
    /// Creates a new `FractionalSeconds`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `FractionalSeconds`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::fractional_seconds::FractionalSecondsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::fractional_seconds::FractionalSecondsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::fractional_seconds::FractionalSecondsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +375,451 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for FractionalSeconds {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("FractionalSeconds");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            FractionalSecondsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            FractionalSecondsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "FractionalSeconds",
  105    116   
            "Query Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("FractionalSeconds")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(FractionalSecondsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::fractional_seconds::FractionalSecondsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::fractional_seconds::FractionalSecondsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct FractionalSecondsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FractionalSecondsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct FractionalSecondsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for FractionalSecondsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::fractional_seconds::FractionalSecondsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::fractional_seconds::FractionalSecondsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::fractional_seconds::FractionalSecondsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_fractional_seconds_input::ser_fractional_seconds_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct FractionalSecondsEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for FractionalSecondsEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "FractionalSecondsEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<FractionalSecondsInput>()
  217    231   
            .ok_or("failed to downcast to FractionalSecondsInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod fractional_seconds_test {
  234    251   
  235    252   
    /// Ensures that clients can correctly parse datetime timestamps with fractional seconds
  236    253   
    /// Test ID: AwsQueryDateTimeWithFractionalSeconds
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn aws_query_date_time_with_fractional_seconds_response() {
  240    257   
        let expected_output = crate::operation::fractional_seconds::FractionalSecondsOutput::builder()
  241    258   
            .set_datetime(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  242    259   
                946845296, 0.123_f64,
  243    260   
            )))
  244    261   
            .build();
  245    262   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  246    263   
        .header("Content-Type", "text/xml")
  247    264   
        .status(200)
  248    265   
                    .body(::aws_smithy_types::body::SdkBody::from("<FractionalSecondsResponse xmlns=\"https://example.com/\">\n    <FractionalSecondsResult>\n        <datetime>2000-01-02T20:34:56.123Z</datetime>\n    </FractionalSecondsResult>\n</FractionalSecondsResponse>\n"))
  249    266   
                    .unwrap()
  250    267   
                    ).unwrap();
  251    268   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  252    269   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  253    270   
  254    271   
        let op = crate::operation::fractional_seconds::FractionalSeconds::new();
  255    272   
        let config = op.config().expect("the operation has config");
  256    273   
        let de = config
  257    274   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  258    275   
            .expect("the config must have a deserializer");
  259    276   
  260    277   
        let parsed = de.deserialize_streaming(&mut http_response);
  261    278   
        let parsed = parsed.unwrap_or_else(|| {
  262    279   
            let http_response = http_response.map(|body| {
  263    280   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  264    281   
                    body.bytes().unwrap(),
  265    282   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  266    283   
                )))
  267    284   
            });
  268    285   
            de.deserialize_nonstreaming(&http_response)
  269    286   
        });
  270    287   
        let parsed = parsed
  271    288   
            .expect("should be successful response")
  272    289   
            .downcast::<crate::operation::fractional_seconds::FractionalSecondsOutput>()
  273    290   
            .unwrap();
  274    291   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  275    292   
    }
         293  +
         294  +
    /* ProtocolTestGenerator.kt:98 */
  276    295   
}
  277    296   
         297  +
/* OperationErrorGenerator.kt:79 */
  278    298   
/// Error type for the `FractionalSecondsError` operation.
         299  +
/* RustType.kt:516 */
  279    300   
#[non_exhaustive]
         301  +
/* RustType.kt:516 */
  280    302   
#[derive(::std::fmt::Debug)]
  281         -
pub enum FractionalSecondsError {
         303  +
pub /* OperationErrorGenerator.kt:81 */ enum FractionalSecondsError {
         304  +
    /* OperationErrorGenerator.kt:88 */
  282    305   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  283    306   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  284    307   
    variable wildcard pattern and check `.code()`:
  285    308   
     \
  286    309   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  287    310   
     \
  288    311   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-FractionalSecondsError) for what information is available for the error.")]
  289    312   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         313  +
    /* OperationErrorGenerator.kt:81 */
  290    314   
}
         315  +
/* OperationErrorGenerator.kt:218 */
  291    316   
impl FractionalSecondsError {
         317  +
    /* OperationErrorGenerator.kt:219 */
  292    318   
    /// Creates the `FractionalSecondsError::Unhandled` variant from any error type.
  293    319   
    pub fn unhandled(
  294    320   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  295    321   
    ) -> Self {
  296    322   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  297    323   
            source: err.into(),
  298    324   
            meta: ::std::default::Default::default(),
  299    325   
        })
  300    326   
    }
  301    327   
  302    328   
    /// Creates the `FractionalSecondsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  303    329   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  304    330   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  305    331   
            source: err.clone().into(),
  306    332   
            meta: err,
  307    333   
        })
  308    334   
    }
  309         -
    ///
         335  +
    /// /* OperationErrorGenerator.kt:236 */
  310    336   
    /// Returns error metadata, which includes the error code, message,
  311    337   
    /// request ID, and potentially additional information.
  312    338   
    ///
         339  +
    /* OperationErrorGenerator.kt:242 */
  313    340   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         341  +
        /* OperationErrorGenerator.kt:243 */
  314    342   
        match self {
  315         -
            Self::Unhandled(e) => &e.meta,
         343  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         344  +
            /* OperationErrorGenerator.kt:243 */
  316    345   
        }
         346  +
        /* OperationErrorGenerator.kt:242 */
  317    347   
    }
         348  +
    /* OperationErrorGenerator.kt:218 */
  318    349   
}
         350  +
/* OperationErrorGenerator.kt:269 */
  319    351   
impl ::std::error::Error for FractionalSecondsError {
         352  +
    /* OperationErrorGenerator.kt:270 */
  320    353   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         354  +
        /* OperationErrorGenerator.kt:318 */
  321    355   
        match self {
  322         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         356  +
            /* OperationErrorGenerator.kt:326 */
         357  +
            Self::Unhandled(_inner) => {
         358  +
                /* OperationErrorGenerator.kt:279 */
         359  +
                ::std::option::Option::Some(&*_inner.source)
         360  +
                /* OperationErrorGenerator.kt:326 */
         361  +
            } /* OperationErrorGenerator.kt:318 */
  323    362   
        }
         363  +
        /* OperationErrorGenerator.kt:270 */
  324    364   
    }
         365  +
    /* OperationErrorGenerator.kt:269 */
  325    366   
}
         367  +
/* OperationErrorGenerator.kt:133 */
  326    368   
impl ::std::fmt::Display for FractionalSecondsError {
         369  +
    /* OperationErrorGenerator.kt:134 */
  327    370   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         371  +
        /* OperationErrorGenerator.kt:318 */
  328    372   
        match self {
         373  +
            /* OperationErrorGenerator.kt:326 */
  329    374   
            Self::Unhandled(_inner) => {
         375  +
                /* OperationErrorGenerator.kt:139 */
  330    376   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  331    377   
                    write!(f, "unhandled error ({code})")
  332    378   
                } else {
  333    379   
                    f.write_str("unhandled error")
  334    380   
                }
         381  +
                /* OperationErrorGenerator.kt:326 */
         382  +
            } /* OperationErrorGenerator.kt:318 */
  335    383   
        }
         384  +
        /* OperationErrorGenerator.kt:134 */
  336    385   
    }
  337         -
    }
         386  +
    /* OperationErrorGenerator.kt:133 */
  338    387   
}
         388  +
/* OperationErrorGenerator.kt:182 */
  339    389   
impl ::aws_smithy_types::retry::ProvideErrorKind for FractionalSecondsError {
         390  +
    /* OperationErrorGenerator.kt:186 */
  340    391   
    fn code(&self) -> ::std::option::Option<&str> {
         392  +
        /* OperationErrorGenerator.kt:187 */
  341    393   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         394  +
        /* OperationErrorGenerator.kt:186 */
  342    395   
    }
         396  +
    /* OperationErrorGenerator.kt:190 */
  343    397   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         398  +
        /* OperationErrorGenerator.kt:197 */
  344    399   
        ::std::option::Option::None
         400  +
        /* OperationErrorGenerator.kt:190 */
  345    401   
    }
         402  +
    /* OperationErrorGenerator.kt:182 */
  346    403   
}
         404  +
/* OperationErrorGenerator.kt:163 */
  347    405   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for FractionalSecondsError {
         406  +
    /* OperationErrorGenerator.kt:164 */
  348    407   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         408  +
        /* OperationErrorGenerator.kt:318 */
  349    409   
        match self {
  350         -
            Self::Unhandled(_inner) => &_inner.meta,
         410  +
            /* OperationErrorGenerator.kt:326 */
         411  +
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:168 */
         413  +
                &_inner.meta
         414  +
                /* OperationErrorGenerator.kt:326 */
         415  +
            } /* OperationErrorGenerator.kt:318 */
  351    416   
        }
         417  +
        /* OperationErrorGenerator.kt:164 */
  352    418   
    }
         419  +
    /* OperationErrorGenerator.kt:163 */
  353    420   
}
         421  +
/* OperationErrorGenerator.kt:109 */
  354    422   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for FractionalSecondsError {
         423  +
    /* OperationErrorGenerator.kt:110 */
  355    424   
    fn create_unhandled_error(
  356    425   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  357    426   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  358    427   
    ) -> Self {
         428  +
        /* OperationErrorGenerator.kt:121 */
  359    429   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  360    430   
            source,
  361    431   
            meta: meta.unwrap_or_default(),
  362    432   
        })
         433  +
        /* OperationErrorGenerator.kt:110 */
  363    434   
    }
         435  +
    /* OperationErrorGenerator.kt:109 */
  364    436   
}
  365    437   
         438  +
/* CodegenDelegator.kt:255 */
  366    439   
pub use crate::operation::fractional_seconds::_fractional_seconds_output::FractionalSecondsOutput;
  367    440   
         441  +
/* CodegenDelegator.kt:255 */
  368    442   
pub use crate::operation::fractional_seconds::_fractional_seconds_input::FractionalSecondsInput;
  369    443   
         444  +
/* RustModule.kt:172 */
  370    445   
mod _fractional_seconds_input;
  371    446   
         447  +
/* RustModule.kt:172 */
  372    448   
mod _fractional_seconds_output;
  373    449   
  374         -
/// Builders
         450  +
/// /* CodegenDelegator.kt:51 */Builders
  375    451   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds/_fractional_seconds_input.rs

@@ -1,1 +24,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct FractionalSecondsInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct FractionalSecondsInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl FractionalSecondsInput {
    7         -
    /// Creates a new builder-style object to manufacture [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct FractionalSecondsInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct FractionalSecondsInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl FractionalSecondsInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::fractional_seconds::FractionalSecondsInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::fractional_seconds::FractionalSecondsInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::fractional_seconds::FractionalSecondsInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}