Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +158,188 @@
    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::null_and_empty_headers_server::_null_and_empty_headers_server_output::NullAndEmptyHeadersServerOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::null_and_empty_headers_server::_null_and_empty_headers_server_input::NullAndEmptyHeadersServerInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerInputBuilder {
    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::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.null_and_empty_headers_server();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NullAndEmptyHeadersServer`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NullAndEmptyHeadersServer`.
   24     27   
///
   25         -
/// Null and empty headers are not sent over the wire.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Null and empty headers are not sent over the wire.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct NullAndEmptyHeadersServerFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerInputBuilder,
   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::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   35     41   
        crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   36     42   
    > for NullAndEmptyHeadersServerFluentBuilder
   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::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   44     50   
            crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   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 NullAndEmptyHeadersServerFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `NullAndEmptyHeadersServerFluentBuilder`.
   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 NullAndEmptyHeadersServer as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerInputBuilder {
   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::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   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::null_and_empty_headers_server::NullAndEmptyHeadersServer::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::null_and_empty_headers_server::NullAndEmptyHeadersServer::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::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   97    107   
        crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   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:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.a(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_a(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_a()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.b(input.into());
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_b(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_b()
  138    161   
    }
  139         -
    ///
         162  +
    /// /* FluentBuilderGenerator.kt:436 */
  140    163   
    /// Appends an item to `c`.
  141    164   
    ///
  142    165   
    /// To override the contents of this collection use [`set_c`](Self::set_c).
  143    166   
    ///
         167  +
    /* FluentBuilderGenerator.kt:443 */
  144    168   
    #[allow(missing_docs)] // documentation missing in model
         169  +
                           /* FluentBuilderGenerator.kt:446 */
  145    170   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  146    171   
        self.inner = self.inner.c(input.into());
  147    172   
        self
  148    173   
    }
         174  +
    /* FluentBuilderGenerator.kt:498 */
  149    175   
    #[allow(missing_docs)] // documentation missing in model
         176  +
                           /* FluentBuilderGenerator.kt:500 */
  150    177   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  151    178   
        self.inner = self.inner.set_c(input);
  152    179   
        self
  153    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:518 */
  154    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:520 */
  155    184   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  156    185   
        self.inner.get_c()
  157    186   
    }
         187  +
    /* FluentBuilderGenerator.kt:282 */
  158    188   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/omits_null_serializes_empty_string.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 `OmitsNullSerializesEmptyString`.
           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 OmitsNullSerializesEmptyString;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl OmitsNullSerializesEmptyString {
    7         -
    /// Creates a new `OmitsNullSerializesEmptyString`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `OmitsNullSerializesEmptyString`
          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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +406,482 @@
   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 OmitsNullSerializesEmptyString {
   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("OmitsNullSerializesEmptyString");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            OmitsNullSerializesEmptyStringRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            OmitsNullSerializesEmptyStringResponseDeserializer,
  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   
            "OmitsNullSerializesEmptyString",
  111    122   
            "Rest Xml 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("OmitsNullSerializesEmptyString")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(OmitsNullSerializesEmptyStringEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
  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 OmitsNullSerializesEmptyStringResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OmitsNullSerializesEmptyStringResponseDeserializer {
  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_omits_null_serializes_empty_string::de_omits_null_serializes_empty_string_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_omits_null_serializes_empty_string::de_omits_null_serializes_empty_string_http_response(
  153    165   
                status, headers, body,
  154    166   
            )
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct OmitsNullSerializesEmptyStringRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OmitsNullSerializesEmptyStringRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
  169    182   
            .downcast::<crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringInput>()
  170    183   
            .expect("correct type");
  171    184   
        let _header_serialization_settings = _cfg
  172    185   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  173    186   
            .cloned()
  174    187   
            .unwrap_or_default();
  175    188   
        let mut request_builder = {
  176    189   
            fn uri_base(
  177    190   
                _input: &crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringInput,
  178    191   
                output: &mut ::std::string::String,
  179    192   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    193   
                use ::std::fmt::Write as _;
  181    194   
                ::std::write!(output, "/OmitsNullSerializesEmptyString").expect("formatting should succeed");
  182    195   
                ::std::result::Result::Ok(())
  183    196   
            }
  184    197   
            fn uri_query(
  185    198   
                _input: &crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringInput,
  186    199   
                mut output: &mut ::std::string::String,
  187    200   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188    201   
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  189    202   
                if let ::std::option::Option::Some(inner_1) = &_input.null_value {
  190    203   
                    {
  191    204   
                        query.push_kv("Null", &::aws_smithy_http::query::fmt_string(inner_1));
  192    205   
                    }
  193    206   
                }
  194    207   
                if let ::std::option::Option::Some(inner_2) = &_input.empty_string {
  195    208   
                    {
  196    209   
                        query.push_kv("Empty", &::aws_smithy_http::query::fmt_string(inner_2));
  197    210   
                    }
  198    211   
                }
  199    212   
                ::std::result::Result::Ok(())
  200    213   
            }
  201    214   
            #[allow(clippy::unnecessary_wraps)]
  202    215   
            fn update_http_builder(
  203    216   
                input: &crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringInput,
  204    217   
                builder: ::http::request::Builder,
  205    218   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  206    219   
                let mut uri = ::std::string::String::new();
  207    220   
                uri_base(input, &mut uri)?;
  208    221   
                uri_query(input, &mut uri)?;
  209    222   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  210    223   
            }
  211    224   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  212    225   
            builder
  213    226   
        };
  214    227   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  215    228   
  216    229   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  217    230   
    }
  218    231   
}
         232  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  219    233   
#[derive(Debug)]
  220    234   
struct OmitsNullSerializesEmptyStringEndpointParamsInterceptor;
  221    235   
  222    236   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OmitsNullSerializesEmptyStringEndpointParamsInterceptor {
  223    237   
    fn name(&self) -> &'static str {
  224    238   
        "OmitsNullSerializesEmptyStringEndpointParamsInterceptor"
  225    239   
    }
  226    240   
  227    241   
    fn read_before_execution(
  228    242   
        &self,
  229    243   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  230    244   
            '_,
  231    245   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  233    247   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  234    248   
        >,
  235    249   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  236    250   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  237    251   
        let _input = context
  238    252   
            .input()
  239    253   
            .downcast_ref::<OmitsNullSerializesEmptyStringInput>()
  240    254   
            .ok_or("failed to downcast to OmitsNullSerializesEmptyStringInput")?;
  241    255   
  242    256   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  243    257   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  244    258   
        })?;
  245    259   
        cfg.interceptor_state()
  246    260   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  247    261   
        ::std::result::Result::Ok(())
  248    262   
    }
  249    263   
}
  250    264   
  251    265   
// The get_* functions below are generated from JMESPath expressions in the
  252    266   
// operationContextParams trait. They target the operation's input shape.
  253    267   
         268  +
/* RustType.kt:516 */
  254    269   
#[allow(unreachable_code, unused_variables)]
         270  +
/* RustType.kt:516 */
  255    271   
#[cfg(test)]
         272  +
/* ProtocolTestGenerator.kt:98 */
  256    273   
mod omits_null_serializes_empty_string_test {
  257    274   
  258    275   
    /// Omits null query values
  259    276   
    /// Test ID: RestXmlOmitsNullQuery
  260    277   
    #[::tokio::test]
  261    278   
    #[::tracing_test::traced_test]
  262    279   
    async fn rest_xml_omits_null_query_request() {
  263    280   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  264    281   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  265    282   
  266    283   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  267    284   
        let result = client
  268    285   
            .omits_null_serializes_empty_string()
  269    286   
            .set_null_value(::std::option::Option::None)
  270    287   
            .send()
  271    288   
            .await;
  272    289   
        let _ = dbg!(result);
  273    290   
        let http_request = request_receiver.expect_request();
  274    291   
        let body = http_request.body().bytes().expect("body should be strict");
  275    292   
        // No body.
  276    293   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  277    294   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  278    295   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  279    296   
        ::pretty_assertions::assert_eq!(uri.path(), "/OmitsNullSerializesEmptyString", "path was incorrect");
  280    297   
    }
  281    298   
  282    299   
    /// Serializes empty query strings
  283    300   
    /// Test ID: RestXmlSerializesEmptyString
  284    301   
    #[::tokio::test]
  285    302   
    #[::tracing_test::traced_test]
  286    303   
    async fn rest_xml_serializes_empty_string_request() {
  287    304   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  288    305   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  289    306   
  290    307   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  291    308   
        let result = client
  292    309   
            .omits_null_serializes_empty_string()
  293    310   
            .set_empty_string(::std::option::Option::Some("".to_owned()))
  294    311   
            .send()
  295    312   
            .await;
  296    313   
        let _ = dbg!(result);
  297    314   
        let http_request = request_receiver.expect_request();
  298    315   
        let expected_query_params = &["Empty="];
  299    316   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  300    317   
        let body = http_request.body().bytes().expect("body should be strict");
  301    318   
        // No body.
  302    319   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  303    320   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  304    321   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  305    322   
        ::pretty_assertions::assert_eq!(uri.path(), "/OmitsNullSerializesEmptyString", "path was incorrect");
  306    323   
    }
         324  +
         325  +
    /* ProtocolTestGenerator.kt:98 */
  307    326   
}
  308    327   
         328  +
/* OperationErrorGenerator.kt:79 */
  309    329   
/// Error type for the `OmitsNullSerializesEmptyStringError` operation.
         330  +
/* RustType.kt:516 */
  310    331   
#[non_exhaustive]
         332  +
/* RustType.kt:516 */
  311    333   
#[derive(::std::fmt::Debug)]
  312         -
pub enum OmitsNullSerializesEmptyStringError {
         334  +
pub /* OperationErrorGenerator.kt:81 */ enum OmitsNullSerializesEmptyStringError {
         335  +
    /* OperationErrorGenerator.kt:88 */
  313    336   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  314    337   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  315    338   
    variable wildcard pattern and check `.code()`:
  316    339   
     \
  317    340   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  318    341   
     \
  319    342   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-OmitsNullSerializesEmptyStringError) for what information is available for the error.")]
  320    343   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         344  +
    /* OperationErrorGenerator.kt:81 */
  321    345   
}
         346  +
/* OperationErrorGenerator.kt:218 */
  322    347   
impl OmitsNullSerializesEmptyStringError {
         348  +
    /* OperationErrorGenerator.kt:219 */
  323    349   
    /// Creates the `OmitsNullSerializesEmptyStringError::Unhandled` variant from any error type.
  324    350   
    pub fn unhandled(
  325    351   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  326    352   
    ) -> Self {
  327    353   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  328    354   
            source: err.into(),
  329    355   
            meta: ::std::default::Default::default(),
  330    356   
        })
  331    357   
    }
  332    358   
  333    359   
    /// Creates the `OmitsNullSerializesEmptyStringError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  334    360   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  335    361   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  336    362   
            source: err.clone().into(),
  337    363   
            meta: err,
  338    364   
        })
  339    365   
    }
  340         -
    ///
         366  +
    /// /* OperationErrorGenerator.kt:236 */
  341    367   
    /// Returns error metadata, which includes the error code, message,
  342    368   
    /// request ID, and potentially additional information.
  343    369   
    ///
         370  +
    /* OperationErrorGenerator.kt:242 */
  344    371   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         372  +
        /* OperationErrorGenerator.kt:243 */
  345    373   
        match self {
  346         -
            Self::Unhandled(e) => &e.meta,
         374  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         375  +
            /* OperationErrorGenerator.kt:243 */
  347    376   
        }
         377  +
        /* OperationErrorGenerator.kt:242 */
  348    378   
    }
         379  +
    /* OperationErrorGenerator.kt:218 */
  349    380   
}
         381  +
/* OperationErrorGenerator.kt:269 */
  350    382   
impl ::std::error::Error for OmitsNullSerializesEmptyStringError {
         383  +
    /* OperationErrorGenerator.kt:270 */
  351    384   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         385  +
        /* OperationErrorGenerator.kt:318 */
  352    386   
        match self {
  353         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         387  +
            /* OperationErrorGenerator.kt:326 */
         388  +
            Self::Unhandled(_inner) => {
         389  +
                /* OperationErrorGenerator.kt:279 */
         390  +
                ::std::option::Option::Some(&*_inner.source)
         391  +
                /* OperationErrorGenerator.kt:326 */
         392  +
            } /* OperationErrorGenerator.kt:318 */
  354    393   
        }
         394  +
        /* OperationErrorGenerator.kt:270 */
  355    395   
    }
         396  +
    /* OperationErrorGenerator.kt:269 */
  356    397   
}
         398  +
/* OperationErrorGenerator.kt:133 */
  357    399   
impl ::std::fmt::Display for OmitsNullSerializesEmptyStringError {
         400  +
    /* OperationErrorGenerator.kt:134 */
  358    401   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         402  +
        /* OperationErrorGenerator.kt:318 */
  359    403   
        match self {
         404  +
            /* OperationErrorGenerator.kt:326 */
  360    405   
            Self::Unhandled(_inner) => {
         406  +
                /* OperationErrorGenerator.kt:139 */
  361    407   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  362    408   
                    write!(f, "unhandled error ({code})")
  363    409   
                } else {
  364    410   
                    f.write_str("unhandled error")
  365    411   
                }
         412  +
                /* OperationErrorGenerator.kt:326 */
         413  +
            } /* OperationErrorGenerator.kt:318 */
  366    414   
        }
         415  +
        /* OperationErrorGenerator.kt:134 */
  367    416   
    }
  368         -
    }
         417  +
    /* OperationErrorGenerator.kt:133 */
  369    418   
}
         419  +
/* OperationErrorGenerator.kt:182 */
  370    420   
impl ::aws_smithy_types::retry::ProvideErrorKind for OmitsNullSerializesEmptyStringError {
         421  +
    /* OperationErrorGenerator.kt:186 */
  371    422   
    fn code(&self) -> ::std::option::Option<&str> {
         423  +
        /* OperationErrorGenerator.kt:187 */
  372    424   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         425  +
        /* OperationErrorGenerator.kt:186 */
  373    426   
    }
         427  +
    /* OperationErrorGenerator.kt:190 */
  374    428   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         429  +
        /* OperationErrorGenerator.kt:197 */
  375    430   
        ::std::option::Option::None
         431  +
        /* OperationErrorGenerator.kt:190 */
  376    432   
    }
         433  +
    /* OperationErrorGenerator.kt:182 */
  377    434   
}
         435  +
/* OperationErrorGenerator.kt:163 */
  378    436   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OmitsNullSerializesEmptyStringError {
         437  +
    /* OperationErrorGenerator.kt:164 */
  379    438   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         439  +
        /* OperationErrorGenerator.kt:318 */
  380    440   
        match self {
  381         -
            Self::Unhandled(_inner) => &_inner.meta,
         441  +
            /* OperationErrorGenerator.kt:326 */
         442  +
            Self::Unhandled(_inner) => {
         443  +
                /* OperationErrorGenerator.kt:168 */
         444  +
                &_inner.meta
         445  +
                /* OperationErrorGenerator.kt:326 */
         446  +
            } /* OperationErrorGenerator.kt:318 */
  382    447   
        }
         448  +
        /* OperationErrorGenerator.kt:164 */
  383    449   
    }
         450  +
    /* OperationErrorGenerator.kt:163 */
  384    451   
}
         452  +
/* OperationErrorGenerator.kt:109 */
  385    453   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for OmitsNullSerializesEmptyStringError {
         454  +
    /* OperationErrorGenerator.kt:110 */
  386    455   
    fn create_unhandled_error(
  387    456   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  388    457   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  389    458   
    ) -> Self {
         459  +
        /* OperationErrorGenerator.kt:121 */
  390    460   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  391    461   
            source,
  392    462   
            meta: meta.unwrap_or_default(),
  393    463   
        })
         464  +
        /* OperationErrorGenerator.kt:110 */
  394    465   
    }
         466  +
    /* OperationErrorGenerator.kt:109 */
  395    467   
}
  396    468   
         469  +
/* CodegenDelegator.kt:255 */
  397    470   
pub use crate::operation::omits_null_serializes_empty_string::_omits_null_serializes_empty_string_output::OmitsNullSerializesEmptyStringOutput;
  398    471   
         472  +
/* CodegenDelegator.kt:255 */
  399    473   
pub use crate::operation::omits_null_serializes_empty_string::_omits_null_serializes_empty_string_input::OmitsNullSerializesEmptyStringInput;
  400    474   
         475  +
/* RustModule.kt:172 */
  401    476   
mod _omits_null_serializes_empty_string_input;
  402    477   
         478  +
/* RustModule.kt:172 */
  403    479   
mod _omits_null_serializes_empty_string_output;
  404    480   
  405         -
/// Builders
         481  +
/// /* CodegenDelegator.kt:51 */Builders
  406    482   
pub mod builders;

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/omits_null_serializes_empty_string/_omits_null_serializes_empty_string_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 OmitsNullSerializesEmptyStringOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct OmitsNullSerializesEmptyStringOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl OmitsNullSerializesEmptyStringOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::omits_null_serializes_empty_string::builders::OmitsNullSerializesEmptyStringOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::omits_null_serializes_empty_string::builders::OmitsNullSerializesEmptyStringOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          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 OmitsNullSerializesEmptyStringOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct OmitsNullSerializesEmptyStringOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl OmitsNullSerializesEmptyStringOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OmitsNullSerializesEmptyStringOutput`](crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput {
   20         -
        crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +139,163 @@
    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::omits_null_serializes_empty_string::_omits_null_serializes_empty_string_output::OmitsNullSerializesEmptyStringOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::omits_null_serializes_empty_string::_omits_null_serializes_empty_string_input::OmitsNullSerializesEmptyStringInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::omits_null_serializes_empty_string::builders::OmitsNullSerializesEmptyStringInputBuilder {
    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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.omits_null_serializes_empty_string();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `OmitsNullSerializesEmptyString`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `OmitsNullSerializesEmptyString`.
   24     27   
///
   25         -
/// Omits null, but serializes empty string value.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Omits null, but serializes empty string value.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct OmitsNullSerializesEmptyStringFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::omits_null_serializes_empty_string::builders::OmitsNullSerializesEmptyStringInputBuilder,
   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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   35     41   
        crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   36     42   
    > for OmitsNullSerializesEmptyStringFluentBuilder
   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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   44     50   
            crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   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 OmitsNullSerializesEmptyStringFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `OmitsNullSerializesEmptyStringFluentBuilder`.
   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 OmitsNullSerializesEmptyString as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::omits_null_serializes_empty_string::builders::OmitsNullSerializesEmptyStringInputBuilder {
   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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyString::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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyString::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::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringOutput,
   97    107   
        crate::operation::omits_null_serializes_empty_string::OmitsNullSerializesEmptyStringError,
   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:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn null_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.null_value(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_null_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_null_value(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_null_value(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_null_value()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn empty_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.empty_string(input.into());
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_empty_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_empty_string(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_empty_string(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_empty_string()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/put_with_content_encoding.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 `PutWithContentEncoding`.
           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 PutWithContentEncoding;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl PutWithContentEncoding {
    7         -
    /// Creates a new `PutWithContentEncoding`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `PutWithContentEncoding`
          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::put_with_content_encoding::PutWithContentEncodingInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -65,74 +403,479 @@
   85     94   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   86     95   
            }
   87     96   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   88     97   
                config_override,
   89     98   
                client_config.config.clone(),
   90     99   
                &client_config.runtime_components,
   91    100   
            ));
   92    101   
        }
   93    102   
        runtime_plugins
   94    103   
    }
         104  +
    /* OperationGenerator.kt:85 */
   95    105   
}
         106  +
/* OperationRuntimePluginGenerator.kt:55 */
   96    107   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for PutWithContentEncoding {
   97    108   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   98    109   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("PutWithContentEncoding");
   99    110   
  100    111   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
  101    112   
            PutWithContentEncodingRequestSerializer,
  102    113   
        ));
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  104    115   
            PutWithContentEncodingResponseDeserializer,
  105    116   
        ));
  106    117   
  107    118   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  108    119   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  109    120   
        ));
  110    121   
  111    122   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  112    123   
            "PutWithContentEncoding",
  113    124   
            "Rest Xml Protocol",
  114    125   
        ));
  115    126   
  116    127   
        ::std::option::Option::Some(cfg.freeze())
  117    128   
    }
  118    129   
  119    130   
    fn runtime_components(
  120    131   
        &self,
  121    132   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  122    133   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  123    134   
        #[allow(unused_mut)]
  124    135   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PutWithContentEncoding")
  125    136   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  126    137   
            .with_interceptor(PutWithContentEncodingEndpointParamsInterceptor)
  127    138   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  128    139   
                crate::operation::put_with_content_encoding::PutWithContentEncodingError,
  129    140   
            >::new())
  130    141   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  131    142   
                crate::operation::put_with_content_encoding::PutWithContentEncodingError,
  132    143   
            >::new());
  133    144   
  134    145   
        ::std::borrow::Cow::Owned(rcb)
  135    146   
    }
  136    147   
}
  137    148   
         149  +
/* ResponseDeserializerGenerator.kt:64 */
  138    150   
#[derive(Debug)]
  139    151   
struct PutWithContentEncodingResponseDeserializer;
  140    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutWithContentEncodingResponseDeserializer {
  141    153   
    fn deserialize_nonstreaming(
  142    154   
        &self,
  143    155   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  144    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146    158   
        let headers = response.headers();
  147    159   
        let body = response.body().bytes().expect("body loaded");
  148    160   
        #[allow(unused_mut)]
  149    161   
        let mut force_error = false;
  150    162   
  151    163   
        let parse_result = if !success && status != 200 || force_error {
  152    164   
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_error(status, headers, body)
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_response(status, headers, body)
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct PutWithContentEncodingRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutWithContentEncodingRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
  169    182   
            .downcast::<crate::operation::put_with_content_encoding::PutWithContentEncodingInput>()
  170    183   
            .expect("correct type");
  171    184   
        let _header_serialization_settings = _cfg
  172    185   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  173    186   
            .cloned()
  174    187   
            .unwrap_or_default();
  175    188   
        let mut request_builder = {
  176    189   
            fn uri_base(
  177    190   
                _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  178    191   
                output: &mut ::std::string::String,
  179    192   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    193   
                use ::std::fmt::Write as _;
  181    194   
                ::std::write!(output, "/requestcompression/putcontentwithencoding").expect("formatting should succeed");
  182    195   
                ::std::result::Result::Ok(())
  183    196   
            }
  184    197   
            #[allow(clippy::unnecessary_wraps)]
  185    198   
            fn update_http_builder(
  186    199   
                input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  187    200   
                builder: ::http::request::Builder,
  188    201   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    202   
                let mut uri = ::std::string::String::new();
  190    203   
                uri_base(input, &mut uri)?;
  191    204   
                let builder = crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_headers(input, builder)?;
  192    205   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  193    206   
            }
  194    207   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  195    208   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  196    209   
            builder
  197    210   
        };
  198    211   
        let body = ::aws_smithy_types::body::SdkBody::from(
  199    212   
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_op_input(&input)?,
  200    213   
        );
  201    214   
        if let Some(content_length) = body.content_length() {
  202    215   
            let content_length = content_length.to_string();
  203    216   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  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 PutWithContentEncodingEndpointParamsInterceptor;
  210    224   
  211    225   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  212    226   
    fn name(&self) -> &'static str {
  213    227   
        "PutWithContentEncodingEndpointParamsInterceptor"
  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::<PutWithContentEncodingInput>()
  229    243   
            .ok_or("failed to downcast to PutWithContentEncodingInput")?;
  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 put_with_content_encoding_test {
  246    263   
  247    264   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  248    265   
    /// Test ID: SDKAppliedContentEncoding_restXml
  249    266   
    #[::tokio::test]
  250    267   
    #[::tracing_test::traced_test]
  251    268   
    async fn sdk_applied_content_encoding_rest_xml_request() {
  252    269   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  253    270   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  254    271   
  255    272   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  256    273   
        let result = client.put_with_content_encoding()
  257    274   
        .set_data(
  258    275   
            ::std::option::Option::Some(
  259    276   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdixnFtN6keMGL9Z2YMjZOjYYzbUEwLJqUVWalkIB\nBkgBRqZpzxx5nB5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Roks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  260    277   
            )
  261    278   
        )
  262    279   
        .send().await;
  263    280   
        let _ = dbg!(result);
  264    281   
        let http_request = request_receiver.expect_request();
  265    282   
        let expected_headers = [("Content-Encoding", "gzip")];
  266    283   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  267    284   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  268    285   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  269    286   
        ::pretty_assertions::assert_eq!(uri.path(), "/requestcompression/putcontentwithencoding", "path was incorrect");
  270    287   
    }
  271    288   
  272    289   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  273    290   
    /// user-provided content-encoding is in the Content-Encoding header before the
  274    291   
    /// request compression encoding from the HTTP binding.
  275    292   
    ///
  276    293   
    /// Test ID: SDKAppendedGzipAfterProvidedEncoding_restXml
  277    294   
    #[::tokio::test]
  278    295   
    #[::tracing_test::traced_test]
  279    296   
    async fn sdk_appended_gzip_after_provided_encoding_rest_xml_request() {
  280    297   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  281    298   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  282    299   
  283    300   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  284    301   
        let result = client.put_with_content_encoding()
  285    302   
        .set_encoding(
  286    303   
            ::std::option::Option::Some(
  287    304   
                "custom".to_owned()
  288    305   
            )
  289    306   
        )
  290    307   
        .set_data(
  291    308   
            ::std::option::Option::Some(
  292    309   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX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S3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  293    310   
            )
  294    311   
        )
  295    312   
        .send().await;
  296    313   
        let _ = dbg!(result);
  297    314   
        let http_request = request_receiver.expect_request();
  298    315   
        let expected_headers = [("Content-Encoding", "custom, gzip")];
  299    316   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  300    317   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  301    318   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  302    319   
        ::pretty_assertions::assert_eq!(uri.path(), "/requestcompression/putcontentwithencoding", "path was incorrect");
  303    320   
    }
         321  +
         322  +
    /* ProtocolTestGenerator.kt:98 */
  304    323   
}
  305    324   
         325  +
/* OperationErrorGenerator.kt:79 */
  306    326   
/// Error type for the `PutWithContentEncodingError` operation.
         327  +
/* RustType.kt:516 */
  307    328   
#[non_exhaustive]
         329  +
/* RustType.kt:516 */
  308    330   
#[derive(::std::fmt::Debug)]
  309         -
pub enum PutWithContentEncodingError {
         331  +
pub /* OperationErrorGenerator.kt:81 */ enum PutWithContentEncodingError {
         332  +
    /* OperationErrorGenerator.kt:88 */
  310    333   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  311    334   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  312    335   
    variable wildcard pattern and check `.code()`:
  313    336   
     \
  314    337   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  315    338   
     \
  316    339   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PutWithContentEncodingError) for what information is available for the error.")]
  317    340   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         341  +
    /* OperationErrorGenerator.kt:81 */
  318    342   
}
         343  +
/* OperationErrorGenerator.kt:218 */
  319    344   
impl PutWithContentEncodingError {
         345  +
    /* OperationErrorGenerator.kt:219 */
  320    346   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from any error type.
  321    347   
    pub fn unhandled(
  322    348   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  323    349   
    ) -> Self {
  324    350   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  325    351   
            source: err.into(),
  326    352   
            meta: ::std::default::Default::default(),
  327    353   
        })
  328    354   
    }
  329    355   
  330    356   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  331    357   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  332    358   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  333    359   
            source: err.clone().into(),
  334    360   
            meta: err,
  335    361   
        })
  336    362   
    }
  337         -
    ///
         363  +
    /// /* OperationErrorGenerator.kt:236 */
  338    364   
    /// Returns error metadata, which includes the error code, message,
  339    365   
    /// request ID, and potentially additional information.
  340    366   
    ///
         367  +
    /* OperationErrorGenerator.kt:242 */
  341    368   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         369  +
        /* OperationErrorGenerator.kt:243 */
  342    370   
        match self {
  343         -
            Self::Unhandled(e) => &e.meta,
         371  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         372  +
            /* OperationErrorGenerator.kt:243 */
  344    373   
        }
         374  +
        /* OperationErrorGenerator.kt:242 */
  345    375   
    }
         376  +
    /* OperationErrorGenerator.kt:218 */
  346    377   
}
         378  +
/* OperationErrorGenerator.kt:269 */
  347    379   
impl ::std::error::Error for PutWithContentEncodingError {
         380  +
    /* OperationErrorGenerator.kt:270 */
  348    381   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         382  +
        /* OperationErrorGenerator.kt:318 */
  349    383   
        match self {
  350         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         384  +
            /* OperationErrorGenerator.kt:326 */
         385  +
            Self::Unhandled(_inner) => {
         386  +
                /* OperationErrorGenerator.kt:279 */
         387  +
                ::std::option::Option::Some(&*_inner.source)
         388  +
                /* OperationErrorGenerator.kt:326 */
         389  +
            } /* OperationErrorGenerator.kt:318 */
  351    390   
        }
         391  +
        /* OperationErrorGenerator.kt:270 */
  352    392   
    }
         393  +
    /* OperationErrorGenerator.kt:269 */
  353    394   
}
         395  +
/* OperationErrorGenerator.kt:133 */
  354    396   
impl ::std::fmt::Display for PutWithContentEncodingError {
         397  +
    /* OperationErrorGenerator.kt:134 */
  355    398   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         399  +
        /* OperationErrorGenerator.kt:318 */
  356    400   
        match self {
         401  +
            /* OperationErrorGenerator.kt:326 */
  357    402   
            Self::Unhandled(_inner) => {
         403  +
                /* OperationErrorGenerator.kt:139 */
  358    404   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  359    405   
                    write!(f, "unhandled error ({code})")
  360    406   
                } else {
  361    407   
                    f.write_str("unhandled error")
  362    408   
                }
         409  +
                /* OperationErrorGenerator.kt:326 */
         410  +
            } /* OperationErrorGenerator.kt:318 */
  363    411   
        }
         412  +
        /* OperationErrorGenerator.kt:134 */
  364    413   
    }
  365         -
    }
         414  +
    /* OperationErrorGenerator.kt:133 */
  366    415   
}
         416  +
/* OperationErrorGenerator.kt:182 */
  367    417   
impl ::aws_smithy_types::retry::ProvideErrorKind for PutWithContentEncodingError {
         418  +
    /* OperationErrorGenerator.kt:186 */
  368    419   
    fn code(&self) -> ::std::option::Option<&str> {
         420  +
        /* OperationErrorGenerator.kt:187 */
  369    421   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         422  +
        /* OperationErrorGenerator.kt:186 */
  370    423   
    }
         424  +
    /* OperationErrorGenerator.kt:190 */
  371    425   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         426  +
        /* OperationErrorGenerator.kt:197 */
  372    427   
        ::std::option::Option::None
         428  +
        /* OperationErrorGenerator.kt:190 */
  373    429   
    }
         430  +
    /* OperationErrorGenerator.kt:182 */
  374    431   
}
         432  +
/* OperationErrorGenerator.kt:163 */
  375    433   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PutWithContentEncodingError {
         434  +
    /* OperationErrorGenerator.kt:164 */
  376    435   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         436  +
        /* OperationErrorGenerator.kt:318 */
  377    437   
        match self {
  378         -
            Self::Unhandled(_inner) => &_inner.meta,
         438  +
            /* OperationErrorGenerator.kt:326 */
         439  +
            Self::Unhandled(_inner) => {
         440  +
                /* OperationErrorGenerator.kt:168 */
         441  +
                &_inner.meta
         442  +
                /* OperationErrorGenerator.kt:326 */
         443  +
            } /* OperationErrorGenerator.kt:318 */
  379    444   
        }
         445  +
        /* OperationErrorGenerator.kt:164 */
  380    446   
    }
         447  +
    /* OperationErrorGenerator.kt:163 */
  381    448   
}
         449  +
/* OperationErrorGenerator.kt:109 */
  382    450   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PutWithContentEncodingError {
         451  +
    /* OperationErrorGenerator.kt:110 */
  383    452   
    fn create_unhandled_error(
  384    453   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  385    454   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  386    455   
    ) -> Self {
         456  +
        /* OperationErrorGenerator.kt:121 */
  387    457   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  388    458   
            source,
  389    459   
            meta: meta.unwrap_or_default(),
  390    460   
        })
         461  +
        /* OperationErrorGenerator.kt:110 */
  391    462   
    }
         463  +
    /* OperationErrorGenerator.kt:109 */
  392    464   
}
  393    465   
         466  +
/* CodegenDelegator.kt:255 */
  394    467   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_output::PutWithContentEncodingOutput;
  395    468   
         469  +
/* CodegenDelegator.kt:255 */
  396    470   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_input::PutWithContentEncodingInput;
  397    471   
         472  +
/* RustModule.kt:172 */
  398    473   
mod _put_with_content_encoding_input;
  399    474   
         475  +
/* RustModule.kt:172 */
  400    476   
mod _put_with_content_encoding_output;
  401    477   
  402         -
/// Builders
         478  +
/// /* CodegenDelegator.kt:51 */Builders
  403    479   
pub mod builders;

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/put_with_content_encoding/_put_with_content_encoding_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 PutWithContentEncodingOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct PutWithContentEncodingOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl PutWithContentEncodingOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::put_with_content_encoding::builders::PutWithContentEncodingOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::put_with_content_encoding::builders::PutWithContentEncodingOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          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 PutWithContentEncodingOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct PutWithContentEncodingOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl PutWithContentEncodingOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::put_with_content_encoding::PutWithContentEncodingOutput {
   20         -
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +138,162 @@
    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::put_with_content_encoding::_put_with_content_encoding_output::PutWithContentEncodingOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_input::PutWithContentEncodingInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder {
    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::put_with_content_encoding::PutWithContentEncodingOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.put_with_content_encoding();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `PutWithContentEncoding`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `PutWithContentEncoding`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct PutWithContentEncodingFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder,
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   34     40   
        crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   35     41   
    > for PutWithContentEncodingFluentBuilder
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   43     49   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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 PutWithContentEncodingFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `PutWithContentEncodingFluentBuilder`.
   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 PutWithContentEncoding as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder {
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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::put_with_content_encoding::PutWithContentEncoding::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::put_with_content_encoding::PutWithContentEncoding::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::put_with_content_encoding::PutWithContentEncodingOutput,
   96    106   
        crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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 encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.encoding(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_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_encoding(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_encoding(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_encoding()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  126    145   
        self.inner = self.inner.data(input.into());
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  131    152   
        self.inner = self.inner.set_data(input);
  132    153   
        self
  133    154   
    }
         155  +
    /* FluentBuilderGenerator.kt:518 */
  134    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:520 */
  135    158   
    pub fn get_data(&self) -> &::std::option::Option<::std::string::String> {
  136    159   
        self.inner.get_data()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:282 */
  138    162   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_idempotency_token_auto_fill.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 `QueryIdempotencyTokenAutoFill`.
           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 QueryIdempotencyTokenAutoFill;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl QueryIdempotencyTokenAutoFill {
    7         -
    /// Creates a new `QueryIdempotencyTokenAutoFill`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `QueryIdempotencyTokenAutoFill`
          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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -73,82 +407,483 @@
   93    102   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   94    103   
            }
   95    104   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   96    105   
                config_override,
   97    106   
                client_config.config.clone(),
   98    107   
                &client_config.runtime_components,
   99    108   
            ));
  100    109   
        }
  101    110   
        runtime_plugins
  102    111   
    }
         112  +
    /* OperationGenerator.kt:85 */
  103    113   
}
         114  +
/* OperationRuntimePluginGenerator.kt:55 */
  104    115   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for QueryIdempotencyTokenAutoFill {
  105    116   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
  106    117   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("QueryIdempotencyTokenAutoFill");
  107    118   
  108    119   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
  109    120   
            QueryIdempotencyTokenAutoFillRequestSerializer,
  110    121   
        ));
  111    122   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  112    123   
            QueryIdempotencyTokenAutoFillResponseDeserializer,
  113    124   
        ));
  114    125   
  115    126   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  116    127   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  117    128   
        ));
  118    129   
  119    130   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  120    131   
            "QueryIdempotencyTokenAutoFill",
  121    132   
            "Rest Xml Protocol",
  122    133   
        ));
  123    134   
  124    135   
        ::std::option::Option::Some(cfg.freeze())
  125    136   
    }
  126    137   
  127    138   
    fn runtime_components(
  128    139   
        &self,
  129    140   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  130    141   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  131    142   
        #[allow(unused_mut)]
  132    143   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("QueryIdempotencyTokenAutoFill")
  133    144   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  134    145   
            .with_interceptor(QueryIdempotencyTokenAutoFillEndpointParamsInterceptor)
  135    146   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  136    147   
                crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
  137    148   
            >::new())
  138    149   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  139    150   
                crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
  140    151   
            >::new());
  141    152   
  142    153   
        ::std::borrow::Cow::Owned(rcb)
  143    154   
    }
  144    155   
}
  145    156   
         157  +
/* ResponseDeserializerGenerator.kt:64 */
  146    158   
#[derive(Debug)]
  147    159   
struct QueryIdempotencyTokenAutoFillResponseDeserializer;
  148    160   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryIdempotencyTokenAutoFillResponseDeserializer {
  149    161   
    fn deserialize_nonstreaming(
  150    162   
        &self,
  151    163   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  152    164   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  153    165   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  154    166   
        let headers = response.headers();
  155    167   
        let body = response.body().bytes().expect("body loaded");
  156    168   
        #[allow(unused_mut)]
  157    169   
        let mut force_error = false;
  158    170   
  159    171   
        let parse_result = if !success && status != 200 || force_error {
  160    172   
            crate::protocol_serde::shape_query_idempotency_token_auto_fill::de_query_idempotency_token_auto_fill_http_error(status, headers, body)
  161    173   
        } else {
  162    174   
            crate::protocol_serde::shape_query_idempotency_token_auto_fill::de_query_idempotency_token_auto_fill_http_response(status, headers, body)
  163    175   
        };
  164    176   
        crate::protocol_serde::type_erase_result(parse_result)
  165    177   
    }
  166    178   
}
         179  +
/* RequestSerializerGenerator.kt:67 */
  167    180   
#[derive(Debug)]
  168    181   
struct QueryIdempotencyTokenAutoFillRequestSerializer;
  169    182   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for QueryIdempotencyTokenAutoFillRequestSerializer {
  170    183   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  171    184   
    fn serialize_input(
  172    185   
        &self,
  173    186   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  174    187   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  175    188   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  176    189   
        let input = input
  177    190   
            .downcast::<crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput>()
  178    191   
            .expect("correct type");
  179    192   
        let _header_serialization_settings = _cfg
  180    193   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  181    194   
            .cloned()
  182    195   
            .unwrap_or_default();
  183    196   
        let mut request_builder = {
  184    197   
            fn uri_base(
  185    198   
                _input: &crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
  186    199   
                output: &mut ::std::string::String,
  187    200   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188    201   
                use ::std::fmt::Write as _;
  189    202   
                ::std::write!(output, "/QueryIdempotencyTokenAutoFill").expect("formatting should succeed");
  190    203   
                ::std::result::Result::Ok(())
  191    204   
            }
  192    205   
            fn uri_query(
  193    206   
                _input: &crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
  194    207   
                mut output: &mut ::std::string::String,
  195    208   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  196    209   
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  197    210   
                if let ::std::option::Option::Some(inner_1) = &_input.token {
  198    211   
                    {
  199    212   
                        query.push_kv("token", &::aws_smithy_http::query::fmt_string(inner_1));
  200    213   
                    }
  201    214   
                }
  202    215   
                ::std::result::Result::Ok(())
  203    216   
            }
  204    217   
            #[allow(clippy::unnecessary_wraps)]
  205    218   
            fn update_http_builder(
  206    219   
                input: &crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
  207    220   
                builder: ::http::request::Builder,
  208    221   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  209    222   
                let mut uri = ::std::string::String::new();
  210    223   
                uri_base(input, &mut uri)?;
  211    224   
                uri_query(input, &mut uri)?;
  212    225   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  213    226   
            }
  214    227   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  215    228   
            builder
  216    229   
        };
  217    230   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  218    231   
  219    232   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  220    233   
    }
  221    234   
}
         235  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  222    236   
#[derive(Debug)]
  223    237   
struct QueryIdempotencyTokenAutoFillEndpointParamsInterceptor;
  224    238   
  225    239   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for QueryIdempotencyTokenAutoFillEndpointParamsInterceptor {
  226    240   
    fn name(&self) -> &'static str {
  227    241   
        "QueryIdempotencyTokenAutoFillEndpointParamsInterceptor"
  228    242   
    }
  229    243   
  230    244   
    fn read_before_execution(
  231    245   
        &self,
  232    246   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  233    247   
            '_,
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  235    249   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  236    250   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  237    251   
        >,
  238    252   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  239    253   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  240    254   
        let _input = context
  241    255   
            .input()
  242    256   
            .downcast_ref::<QueryIdempotencyTokenAutoFillInput>()
  243    257   
            .ok_or("failed to downcast to QueryIdempotencyTokenAutoFillInput")?;
  244    258   
  245    259   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  246    260   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  247    261   
        })?;
  248    262   
        cfg.interceptor_state()
  249    263   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  250    264   
        ::std::result::Result::Ok(())
  251    265   
    }
  252    266   
}
  253    267   
  254    268   
// The get_* functions below are generated from JMESPath expressions in the
  255    269   
// operationContextParams trait. They target the operation's input shape.
  256    270   
         271  +
/* RustType.kt:516 */
  257    272   
#[allow(unreachable_code, unused_variables)]
         273  +
/* RustType.kt:516 */
  258    274   
#[cfg(test)]
         275  +
/* ProtocolTestGenerator.kt:98 */
  259    276   
mod query_idempotency_token_auto_fill_test {
  260    277   
  261    278   
    /// Automatically adds idempotency token when not set
  262    279   
    /// Test ID: QueryIdempotencyTokenAutoFill
  263    280   
    #[::tokio::test]
  264    281   
    #[::tracing_test::traced_test]
  265    282   
    async fn query_idempotency_token_auto_fill_request() {
  266    283   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  267    284   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  268    285   
  269    286   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  270    287   
        let result = client.query_idempotency_token_auto_fill().send().await;
  271    288   
        let _ = dbg!(result);
  272    289   
        let http_request = request_receiver.expect_request();
  273    290   
        let expected_query_params = &["token=00000000-0000-4000-8000-000000000000"];
  274    291   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  275    292   
        let body = http_request.body().bytes().expect("body should be strict");
  276    293   
        // No body.
  277    294   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  278    295   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  279    296   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  280    297   
        ::pretty_assertions::assert_eq!(uri.path(), "/QueryIdempotencyTokenAutoFill", "path was incorrect");
  281    298   
    }
  282    299   
  283    300   
    /// Uses the given idempotency token as-is
  284    301   
    /// Test ID: QueryIdempotencyTokenAutoFillIsSet
  285    302   
    #[::tokio::test]
  286    303   
    #[::tracing_test::traced_test]
  287    304   
    async fn query_idempotency_token_auto_fill_is_set_request() {
  288    305   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  289    306   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  290    307   
  291    308   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  292    309   
        let result = client
  293    310   
            .query_idempotency_token_auto_fill()
  294    311   
            .set_token(::std::option::Option::Some("00000000-0000-4000-8000-000000000000".to_owned()))
  295    312   
            .send()
  296    313   
            .await;
  297    314   
        let _ = dbg!(result);
  298    315   
        let http_request = request_receiver.expect_request();
  299    316   
        let expected_query_params = &["token=00000000-0000-4000-8000-000000000000"];
  300    317   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  301    318   
        let body = http_request.body().bytes().expect("body should be strict");
  302    319   
        // No body.
  303    320   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  304    321   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  305    322   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  306    323   
        ::pretty_assertions::assert_eq!(uri.path(), "/QueryIdempotencyTokenAutoFill", "path was incorrect");
  307    324   
    }
         325  +
         326  +
    /* ProtocolTestGenerator.kt:98 */
  308    327   
}
  309    328   
         329  +
/* OperationErrorGenerator.kt:79 */
  310    330   
/// Error type for the `QueryIdempotencyTokenAutoFillError` operation.
         331  +
/* RustType.kt:516 */
  311    332   
#[non_exhaustive]
         333  +
/* RustType.kt:516 */
  312    334   
#[derive(::std::fmt::Debug)]
  313         -
pub enum QueryIdempotencyTokenAutoFillError {
         335  +
pub /* OperationErrorGenerator.kt:81 */ enum QueryIdempotencyTokenAutoFillError {
         336  +
    /* OperationErrorGenerator.kt:88 */
  314    337   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  315    338   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  316    339   
    variable wildcard pattern and check `.code()`:
  317    340   
     \
  318    341   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  319    342   
     \
  320    343   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-QueryIdempotencyTokenAutoFillError) for what information is available for the error.")]
  321    344   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         345  +
    /* OperationErrorGenerator.kt:81 */
  322    346   
}
         347  +
/* OperationErrorGenerator.kt:218 */
  323    348   
impl QueryIdempotencyTokenAutoFillError {
         349  +
    /* OperationErrorGenerator.kt:219 */
  324    350   
    /// Creates the `QueryIdempotencyTokenAutoFillError::Unhandled` variant from any error type.
  325    351   
    pub fn unhandled(
  326    352   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  327    353   
    ) -> Self {
  328    354   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  329    355   
            source: err.into(),
  330    356   
            meta: ::std::default::Default::default(),
  331    357   
        })
  332    358   
    }
  333    359   
  334    360   
    /// Creates the `QueryIdempotencyTokenAutoFillError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  335    361   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  336    362   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  337    363   
            source: err.clone().into(),
  338    364   
            meta: err,
  339    365   
        })
  340    366   
    }
  341         -
    ///
         367  +
    /// /* OperationErrorGenerator.kt:236 */
  342    368   
    /// Returns error metadata, which includes the error code, message,
  343    369   
    /// request ID, and potentially additional information.
  344    370   
    ///
         371  +
    /* OperationErrorGenerator.kt:242 */
  345    372   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         373  +
        /* OperationErrorGenerator.kt:243 */
  346    374   
        match self {
  347         -
            Self::Unhandled(e) => &e.meta,
         375  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         376  +
            /* OperationErrorGenerator.kt:243 */
  348    377   
        }
         378  +
        /* OperationErrorGenerator.kt:242 */
  349    379   
    }
         380  +
    /* OperationErrorGenerator.kt:218 */
  350    381   
}
         382  +
/* OperationErrorGenerator.kt:269 */
  351    383   
impl ::std::error::Error for QueryIdempotencyTokenAutoFillError {
         384  +
    /* OperationErrorGenerator.kt:270 */
  352    385   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         386  +
        /* OperationErrorGenerator.kt:318 */
  353    387   
        match self {
  354         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         388  +
            /* OperationErrorGenerator.kt:326 */
         389  +
            Self::Unhandled(_inner) => {
         390  +
                /* OperationErrorGenerator.kt:279 */
         391  +
                ::std::option::Option::Some(&*_inner.source)
         392  +
                /* OperationErrorGenerator.kt:326 */
         393  +
            } /* OperationErrorGenerator.kt:318 */
  355    394   
        }
         395  +
        /* OperationErrorGenerator.kt:270 */
  356    396   
    }
         397  +
    /* OperationErrorGenerator.kt:269 */
  357    398   
}
         399  +
/* OperationErrorGenerator.kt:133 */
  358    400   
impl ::std::fmt::Display for QueryIdempotencyTokenAutoFillError {
         401  +
    /* OperationErrorGenerator.kt:134 */
  359    402   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         403  +
        /* OperationErrorGenerator.kt:318 */
  360    404   
        match self {
         405  +
            /* OperationErrorGenerator.kt:326 */
  361    406   
            Self::Unhandled(_inner) => {
         407  +
                /* OperationErrorGenerator.kt:139 */
  362    408   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  363    409   
                    write!(f, "unhandled error ({code})")
  364    410   
                } else {
  365    411   
                    f.write_str("unhandled error")
  366    412   
                }
         413  +
                /* OperationErrorGenerator.kt:326 */
         414  +
            } /* OperationErrorGenerator.kt:318 */
  367    415   
        }
         416  +
        /* OperationErrorGenerator.kt:134 */
  368    417   
    }
  369         -
    }
         418  +
    /* OperationErrorGenerator.kt:133 */
  370    419   
}
         420  +
/* OperationErrorGenerator.kt:182 */
  371    421   
impl ::aws_smithy_types::retry::ProvideErrorKind for QueryIdempotencyTokenAutoFillError {
         422  +
    /* OperationErrorGenerator.kt:186 */
  372    423   
    fn code(&self) -> ::std::option::Option<&str> {
         424  +
        /* OperationErrorGenerator.kt:187 */
  373    425   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         426  +
        /* OperationErrorGenerator.kt:186 */
  374    427   
    }
         428  +
    /* OperationErrorGenerator.kt:190 */
  375    429   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         430  +
        /* OperationErrorGenerator.kt:197 */
  376    431   
        ::std::option::Option::None
         432  +
        /* OperationErrorGenerator.kt:190 */
  377    433   
    }
         434  +
    /* OperationErrorGenerator.kt:182 */
  378    435   
}
         436  +
/* OperationErrorGenerator.kt:163 */
  379    437   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for QueryIdempotencyTokenAutoFillError {
         438  +
    /* OperationErrorGenerator.kt:164 */
  380    439   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         440  +
        /* OperationErrorGenerator.kt:318 */
  381    441   
        match self {
  382         -
            Self::Unhandled(_inner) => &_inner.meta,
         442  +
            /* OperationErrorGenerator.kt:326 */
         443  +
            Self::Unhandled(_inner) => {
         444  +
                /* OperationErrorGenerator.kt:168 */
         445  +
                &_inner.meta
         446  +
                /* OperationErrorGenerator.kt:326 */
         447  +
            } /* OperationErrorGenerator.kt:318 */
  383    448   
        }
         449  +
        /* OperationErrorGenerator.kt:164 */
  384    450   
    }
         451  +
    /* OperationErrorGenerator.kt:163 */
  385    452   
}
         453  +
/* OperationErrorGenerator.kt:109 */
  386    454   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for QueryIdempotencyTokenAutoFillError {
         455  +
    /* OperationErrorGenerator.kt:110 */
  387    456   
    fn create_unhandled_error(
  388    457   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  389    458   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  390    459   
    ) -> Self {
         460  +
        /* OperationErrorGenerator.kt:121 */
  391    461   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  392    462   
            source,
  393    463   
            meta: meta.unwrap_or_default(),
  394    464   
        })
         465  +
        /* OperationErrorGenerator.kt:110 */
  395    466   
    }
         467  +
    /* OperationErrorGenerator.kt:109 */
  396    468   
}
  397    469   
         470  +
/* CodegenDelegator.kt:255 */
  398    471   
pub use crate::operation::query_idempotency_token_auto_fill::_query_idempotency_token_auto_fill_output::QueryIdempotencyTokenAutoFillOutput;
  399    472   
         473  +
/* CodegenDelegator.kt:255 */
  400    474   
pub use crate::operation::query_idempotency_token_auto_fill::_query_idempotency_token_auto_fill_input::QueryIdempotencyTokenAutoFillInput;
  401    475   
         476  +
/* RustModule.kt:172 */
  402    477   
mod _query_idempotency_token_auto_fill_input;
  403    478   
         479  +
/* RustModule.kt:172 */
  404    480   
mod _query_idempotency_token_auto_fill_output;
  405    481   
  406         -
/// Builders
         482  +
/// /* CodegenDelegator.kt:51 */Builders
  407    483   
pub mod builders;

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

@@ -1,1 +52,96 @@
    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 QueryIdempotencyTokenAutoFillInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct QueryIdempotencyTokenAutoFillInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub token: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl QueryIdempotencyTokenAutoFillInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn token(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.token.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl QueryIdempotencyTokenAutoFillInput {
   16         -
    /// Creates a new builder-style object to manufacture [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          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 QueryIdempotencyTokenAutoFillInputBuilder {
   26         -
    pub(crate) token: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) token: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl QueryIdempotencyTokenAutoFillInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.token = ::std::option::Option::Some(input.into());
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.token = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_token(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.token
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(
   45     80   
        self,
   46     81   
    ) -> ::std::result::Result<
   47     82   
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput,
   48     83   
        ::aws_smithy_types::error::operation::BuildError,
   49     84   
    > {
   50         -
        ::std::result::Result::Ok(crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput { token: self.token })
          85  +
        /* BuilderGenerator.kt:254 */
          86  +
        ::std::result::Result::Ok(
          87  +
            /* BuilderGenerator.kt:477 */
          88  +
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput {
          89  +
                /* BuilderGenerator.kt:481 */ token: self.token,
          90  +
                /* BuilderGenerator.kt:477 */
          91  +
            }, /* BuilderGenerator.kt:254 */
          92  +
        )
          93  +
        /* BuilderGenerator.kt:253 */
   51     94   
    }
          95  +
    /* BuilderGenerator.kt:355 */
   52     96   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_idempotency_token_auto_fill/_query_idempotency_token_auto_fill_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 QueryIdempotencyTokenAutoFillOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct QueryIdempotencyTokenAutoFillOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl QueryIdempotencyTokenAutoFillOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          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 QueryIdempotencyTokenAutoFillOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct QueryIdempotencyTokenAutoFillOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl QueryIdempotencyTokenAutoFillOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`QueryIdempotencyTokenAutoFillOutput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput {
   20         -
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +125,143 @@
    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::query_idempotency_token_auto_fill::_query_idempotency_token_auto_fill_output::QueryIdempotencyTokenAutoFillOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::query_idempotency_token_auto_fill::_query_idempotency_token_auto_fill_input::QueryIdempotencyTokenAutoFillInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder {
    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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.query_idempotency_token_auto_fill();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `QueryIdempotencyTokenAutoFill`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `QueryIdempotencyTokenAutoFill`.
   24     27   
///
   25         -
/// Automatically adds idempotency tokens.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Automatically adds idempotency tokens.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct QueryIdempotencyTokenAutoFillFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder,
   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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   35     41   
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   36     42   
    > for QueryIdempotencyTokenAutoFillFluentBuilder
   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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   44     50   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   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 QueryIdempotencyTokenAutoFillFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `QueryIdempotencyTokenAutoFillFluentBuilder`.
   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 QueryIdempotencyTokenAutoFill as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder {
   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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFill::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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFill::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::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillOutput,
   97    107   
        crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillError,
   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:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.token(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_token(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_token(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_token()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_params_as_string_list_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 `QueryParamsAsStringListMap`.
           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 QueryParamsAsStringListMap;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl QueryParamsAsStringListMap {
    7         -
    /// Creates a new `QueryParamsAsStringListMap`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `QueryParamsAsStringListMap`
          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::query_params_as_string_list_map::QueryParamsAsStringListMapInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +186,199 @@
   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 QueryParamsAsStringListMap {
   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("QueryParamsAsStringListMap");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            QueryParamsAsStringListMapRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            QueryParamsAsStringListMapResponseDeserializer,
  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   
            "QueryParamsAsStringListMap",
  111    122   
            "Rest Xml 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("QueryParamsAsStringListMap")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(QueryParamsAsStringListMapEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapError,
  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 QueryParamsAsStringListMapResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryParamsAsStringListMapResponseDeserializer {
  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_query_params_as_string_list_map::de_query_params_as_string_list_map_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_query_params_as_string_list_map::de_query_params_as_string_list_map_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 QueryParamsAsStringListMapRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for QueryParamsAsStringListMapRequestSerializer {
  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
@@ -194,207 +392,468 @@
  214    227   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  215    228   
            }
  216    229   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  217    230   
            builder
  218    231   
        };
  219    232   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  220    233   
  221    234   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  222    235   
    }
  223    236   
}
         237  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  224    238   
#[derive(Debug)]
  225    239   
struct QueryParamsAsStringListMapEndpointParamsInterceptor;
  226    240   
  227    241   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for QueryParamsAsStringListMapEndpointParamsInterceptor {
  228    242   
    fn name(&self) -> &'static str {
  229    243   
        "QueryParamsAsStringListMapEndpointParamsInterceptor"
  230    244   
    }
  231    245   
  232    246   
    fn read_before_execution(
  233    247   
        &self,
  234    248   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  235    249   
            '_,
  236    250   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  237    251   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  238    252   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  239    253   
        >,
  240    254   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  241    255   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  242    256   
        let _input = context
  243    257   
            .input()
  244    258   
            .downcast_ref::<QueryParamsAsStringListMapInput>()
  245    259   
            .ok_or("failed to downcast to QueryParamsAsStringListMapInput")?;
  246    260   
  247    261   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  248    262   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  249    263   
        })?;
  250    264   
        cfg.interceptor_state()
  251    265   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  252    266   
        ::std::result::Result::Ok(())
  253    267   
    }
  254    268   
}
  255    269   
  256    270   
// The get_* functions below are generated from JMESPath expressions in the
  257    271   
// operationContextParams trait. They target the operation's input shape.
  258    272   
         273  +
/* RustType.kt:516 */
  259    274   
#[allow(unreachable_code, unused_variables)]
         275  +
/* RustType.kt:516 */
  260    276   
#[cfg(test)]
         277  +
/* ProtocolTestGenerator.kt:98 */
  261    278   
mod query_params_as_string_list_map_test {
  262    279   
  263    280   
    /// Serialize query params from map of list strings
  264    281   
    /// Test ID: RestXmlQueryParamsStringListMap
  265    282   
    #[::tokio::test]
  266    283   
    #[::tracing_test::traced_test]
  267    284   
    async fn rest_xml_query_params_string_list_map_request() {
  268    285   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  269    286   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  270    287   
  271    288   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  272    289   
        let result = client
  273    290   
            .query_params_as_string_list_map()
  274    291   
            .set_qux(::std::option::Option::Some("named".to_owned()))
  275    292   
            .set_foo(::std::option::Option::Some({
  276    293   
                let mut ret = ::std::collections::HashMap::new();
  277    294   
                ret.insert("baz".to_owned(), vec!["bar".to_owned(), "qux".to_owned()]);
  278    295   
                ret
  279    296   
            }))
  280    297   
            .send()
  281    298   
            .await;
  282    299   
        let _ = dbg!(result);
  283    300   
        let http_request = request_receiver.expect_request();
  284    301   
        let expected_query_params = &["corge=named", "baz=bar", "baz=qux"];
  285    302   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  286    303   
        let body = http_request.body().bytes().expect("body should be strict");
  287    304   
        // No body.
  288    305   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  289    306   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  290    307   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  291    308   
        ::pretty_assertions::assert_eq!(uri.path(), "/StringListMap", "path was incorrect");
  292    309   
    }
         310  +
         311  +
    /* ProtocolTestGenerator.kt:98 */
  293    312   
}
  294    313   
         314  +
/* OperationErrorGenerator.kt:79 */
  295    315   
/// Error type for the `QueryParamsAsStringListMapError` operation.
         316  +
/* RustType.kt:516 */
  296    317   
#[non_exhaustive]
         318  +
/* RustType.kt:516 */
  297    319   
#[derive(::std::fmt::Debug)]
  298         -
pub enum QueryParamsAsStringListMapError {
         320  +
pub /* OperationErrorGenerator.kt:81 */ enum QueryParamsAsStringListMapError {
         321  +
    /* OperationErrorGenerator.kt:88 */
  299    322   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  300    323   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  301    324   
    variable wildcard pattern and check `.code()`:
  302    325   
     \
  303    326   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  304    327   
     \
  305    328   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-QueryParamsAsStringListMapError) for what information is available for the error.")]
  306    329   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         330  +
    /* OperationErrorGenerator.kt:81 */
  307    331   
}
         332  +
/* OperationErrorGenerator.kt:218 */
  308    333   
impl QueryParamsAsStringListMapError {
         334  +
    /* OperationErrorGenerator.kt:219 */
  309    335   
    /// Creates the `QueryParamsAsStringListMapError::Unhandled` variant from any error type.
  310    336   
    pub fn unhandled(
  311    337   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  312    338   
    ) -> Self {
  313    339   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  314    340   
            source: err.into(),
  315    341   
            meta: ::std::default::Default::default(),
  316    342   
        })
  317    343   
    }
  318    344   
  319    345   
    /// Creates the `QueryParamsAsStringListMapError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  320    346   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  321    347   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    348   
            source: err.clone().into(),
  323    349   
            meta: err,
  324    350   
        })
  325    351   
    }
  326         -
    ///
         352  +
    /// /* OperationErrorGenerator.kt:236 */
  327    353   
    /// Returns error metadata, which includes the error code, message,
  328    354   
    /// request ID, and potentially additional information.
  329    355   
    ///
         356  +
    /* OperationErrorGenerator.kt:242 */
  330    357   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         358  +
        /* OperationErrorGenerator.kt:243 */
  331    359   
        match self {
  332         -
            Self::Unhandled(e) => &e.meta,
         360  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         361  +
            /* OperationErrorGenerator.kt:243 */
  333    362   
        }
         363  +
        /* OperationErrorGenerator.kt:242 */
  334    364   
    }
         365  +
    /* OperationErrorGenerator.kt:218 */
  335    366   
}
         367  +
/* OperationErrorGenerator.kt:269 */
  336    368   
impl ::std::error::Error for QueryParamsAsStringListMapError {
         369  +
    /* OperationErrorGenerator.kt:270 */
  337    370   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         371  +
        /* OperationErrorGenerator.kt:318 */
  338    372   
        match self {
  339         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         373  +
            /* OperationErrorGenerator.kt:326 */
         374  +
            Self::Unhandled(_inner) => {
         375  +
                /* OperationErrorGenerator.kt:279 */
         376  +
                ::std::option::Option::Some(&*_inner.source)
         377  +
                /* OperationErrorGenerator.kt:326 */
         378  +
            } /* OperationErrorGenerator.kt:318 */
  340    379   
        }
         380  +
        /* OperationErrorGenerator.kt:270 */
  341    381   
    }
         382  +
    /* OperationErrorGenerator.kt:269 */
  342    383   
}
         384  +
/* OperationErrorGenerator.kt:133 */
  343    385   
impl ::std::fmt::Display for QueryParamsAsStringListMapError {
         386  +
    /* OperationErrorGenerator.kt:134 */
  344    387   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         388  +
        /* OperationErrorGenerator.kt:318 */
  345    389   
        match self {
         390  +
            /* OperationErrorGenerator.kt:326 */
  346    391   
            Self::Unhandled(_inner) => {
         392  +
                /* OperationErrorGenerator.kt:139 */
  347    393   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  348    394   
                    write!(f, "unhandled error ({code})")
  349    395   
                } else {
  350    396   
                    f.write_str("unhandled error")
  351    397   
                }
         398  +
                /* OperationErrorGenerator.kt:326 */
         399  +
            } /* OperationErrorGenerator.kt:318 */
  352    400   
        }
         401  +
        /* OperationErrorGenerator.kt:134 */
  353    402   
    }
  354         -
    }
         403  +
    /* OperationErrorGenerator.kt:133 */
  355    404   
}
         405  +
/* OperationErrorGenerator.kt:182 */
  356    406   
impl ::aws_smithy_types::retry::ProvideErrorKind for QueryParamsAsStringListMapError {
         407  +
    /* OperationErrorGenerator.kt:186 */
  357    408   
    fn code(&self) -> ::std::option::Option<&str> {
         409  +
        /* OperationErrorGenerator.kt:187 */
  358    410   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         411  +
        /* OperationErrorGenerator.kt:186 */
  359    412   
    }
         413  +
    /* OperationErrorGenerator.kt:190 */
  360    414   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         415  +
        /* OperationErrorGenerator.kt:197 */
  361    416   
        ::std::option::Option::None
         417  +
        /* OperationErrorGenerator.kt:190 */
  362    418   
    }
         419  +
    /* OperationErrorGenerator.kt:182 */
  363    420   
}
         421  +
/* OperationErrorGenerator.kt:163 */
  364    422   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for QueryParamsAsStringListMapError {
         423  +
    /* OperationErrorGenerator.kt:164 */
  365    424   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         425  +
        /* OperationErrorGenerator.kt:318 */
  366    426   
        match self {
  367         -
            Self::Unhandled(_inner) => &_inner.meta,
         427  +
            /* OperationErrorGenerator.kt:326 */
         428  +
            Self::Unhandled(_inner) => {
         429  +
                /* OperationErrorGenerator.kt:168 */
         430  +
                &_inner.meta
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  368    433   
        }
         434  +
        /* OperationErrorGenerator.kt:164 */
  369    435   
    }
         436  +
    /* OperationErrorGenerator.kt:163 */
  370    437   
}
         438  +
/* OperationErrorGenerator.kt:109 */
  371    439   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for QueryParamsAsStringListMapError {
         440  +
    /* OperationErrorGenerator.kt:110 */
  372    441   
    fn create_unhandled_error(
  373    442   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  374    443   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  375    444   
    ) -> Self {
         445  +
        /* OperationErrorGenerator.kt:121 */
  376    446   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  377    447   
            source,
  378    448   
            meta: meta.unwrap_or_default(),
  379    449   
        })
         450  +
        /* OperationErrorGenerator.kt:110 */
  380    451   
    }
         452  +
    /* OperationErrorGenerator.kt:109 */
  381    453   
}
  382    454   
         455  +
/* CodegenDelegator.kt:255 */
  383    456   
pub use crate::operation::query_params_as_string_list_map::_query_params_as_string_list_map_output::QueryParamsAsStringListMapOutput;
  384    457   
         458  +
/* CodegenDelegator.kt:255 */
  385    459   
pub use crate::operation::query_params_as_string_list_map::_query_params_as_string_list_map_input::QueryParamsAsStringListMapInput;
  386    460   
         461  +
/* RustModule.kt:172 */
  387    462   
mod _query_params_as_string_list_map_input;
  388    463   
         464  +
/* RustModule.kt:172 */
  389    465   
mod _query_params_as_string_list_map_output;
  390    466   
  391         -
/// Builders
         467  +
/// /* CodegenDelegator.kt:51 */Builders
  392    468   
pub mod builders;

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

@@ -1,1 +84,146 @@
    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 QueryParamsAsStringListMapInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct QueryParamsAsStringListMapInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub qux: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub foo: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl QueryParamsAsStringListMapInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn qux(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.qux.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn foo(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.foo.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl QueryParamsAsStringListMapInput {
   22         -
    /// Creates a new builder-style object to manufacture [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::query_params_as_string_list_map::builders::QueryParamsAsStringListMapInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::query_params_as_string_list_map::builders::QueryParamsAsStringListMapInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct QueryParamsAsStringListMapInputBuilder {
   32         -
    pub(crate) qux: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) qux: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) foo: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl QueryParamsAsStringListMapInputBuilder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn qux(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.qux = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_qux(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.qux = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_qux(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.qux
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
   50         -
    /// Adds a key-value pair to `foo`.
          90  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `foo`.
          91  +
    /* BuilderGenerator.kt:437 */
   51     92   
    ///
   52         -
    /// To override the contents of this collection use [`set_foo`](Self::set_foo).
          93  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_foo`](Self::set_foo).
          94  +
    /* BuilderGenerator.kt:439 */
   53     95   
    ///
          96  +
    /* BuilderGenerator.kt:445 */
   54     97   
    pub fn foo(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
          98  +
        /* BuilderGenerator.kt:448 */
   55     99   
        let mut hash_map = self.foo.unwrap_or_default();
   56    100   
        hash_map.insert(k.into(), v);
   57    101   
        self.foo = ::std::option::Option::Some(hash_map);
   58    102   
        self
         103  +
        /* BuilderGenerator.kt:445 */
   59    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   60    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   61    108   
    pub fn set_foo(
   62    109   
        mut self,
   63    110   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
   64    111   
    ) -> Self {
         112  +
        /* BuilderGenerator.kt:315 */
   65    113   
        self.foo = input;
   66    114   
        self
         115  +
        /* BuilderGenerator.kt:314 */
   67    116   
    }
         117  +
    /* BuilderGenerator.kt:334 */
   68    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:336 */
   69    120   
    pub fn get_foo(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         121  +
        /* BuilderGenerator.kt:337 */
   70    122   
        &self.foo
         123  +
        /* BuilderGenerator.kt:336 */
   71    124   
    }
   72         -
    /// Consumes the builder and constructs a [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
         125  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`QueryParamsAsStringListMapInput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput).
         126  +
    /* BuilderGenerator.kt:253 */
   73    127   
    pub fn build(
   74    128   
        self,
   75    129   
    ) -> ::std::result::Result<
   76    130   
        crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput,
   77    131   
        ::aws_smithy_types::error::operation::BuildError,
   78    132   
    > {
   79         -
        ::std::result::Result::Ok(crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput {
   80         -
            qux: self.qux,
         133  +
        /* BuilderGenerator.kt:254 */
         134  +
        ::std::result::Result::Ok(
         135  +
            /* BuilderGenerator.kt:477 */
         136  +
            crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapInput {
         137  +
                /* BuilderGenerator.kt:481 */ qux: self.qux,
         138  +
                /* BuilderGenerator.kt:481 */
   81    139   
                foo: self.foo,
   82         -
        })
         140  +
                /* BuilderGenerator.kt:477 */
         141  +
            }, /* BuilderGenerator.kt:254 */
         142  +
        )
         143  +
        /* BuilderGenerator.kt:253 */
   83    144   
    }
         145  +
    /* BuilderGenerator.kt:355 */
   84    146   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/query_params_as_string_list_map/_query_params_as_string_list_map_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 QueryParamsAsStringListMapOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct QueryParamsAsStringListMapOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl QueryParamsAsStringListMapOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::query_params_as_string_list_map::builders::QueryParamsAsStringListMapOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::query_params_as_string_list_map::builders::QueryParamsAsStringListMapOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          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 QueryParamsAsStringListMapOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct QueryParamsAsStringListMapOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl QueryParamsAsStringListMapOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`QueryParamsAsStringListMapOutput`](crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput {
   20         -
        crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::query_params_as_string_list_map::QueryParamsAsStringListMapOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}