Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +250,322 @@
    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::simple_scalar_properties::_simple_scalar_properties_output::SimpleScalarPropertiesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_input::SimpleScalarPropertiesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
    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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.simple_scalar_properties();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `SimpleScalarProperties`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `SimpleScalarProperties`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct SimpleScalarPropertiesFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder,
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   34     40   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   35     41   
    > for SimpleScalarPropertiesFluentBuilder
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   43     49   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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 SimpleScalarPropertiesFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `SimpleScalarPropertiesFluentBuilder`.
   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 SimpleScalarProperties as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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::simple_scalar_properties::SimpleScalarProperties::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::simple_scalar_properties::SimpleScalarProperties::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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   96    106   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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 foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.foo(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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_foo(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_foo(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_foo()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn string_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  126    145   
        self.inner = self.inner.string_value(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_string_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  131    152   
        self.inner = self.inner.set_string_value(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_string_value(&self) -> &::std::option::Option<::std::string::String> {
  136    159   
        self.inner.get_string_value()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn true_boolean_value(mut self, input: bool) -> Self {
  140    165   
        self.inner = self.inner.true_boolean_value(input);
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_true_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
  145    172   
        self.inner = self.inner.set_true_boolean_value(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_true_boolean_value(&self) -> &::std::option::Option<bool> {
  150    179   
        self.inner.get_true_boolean_value()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn false_boolean_value(mut self, input: bool) -> Self {
  154    185   
        self.inner = self.inner.false_boolean_value(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_false_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
  159    192   
        self.inner = self.inner.set_false_boolean_value(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_false_boolean_value(&self) -> &::std::option::Option<bool> {
  164    199   
        self.inner.get_false_boolean_value()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:498 */
  166    202   
    #[allow(missing_docs)] // documentation missing in model
         203  +
                           /* FluentBuilderGenerator.kt:500 */
  167    204   
    pub fn byte_value(mut self, input: i8) -> Self {
  168    205   
        self.inner = self.inner.byte_value(input);
  169    206   
        self
  170    207   
    }
         208  +
    /* FluentBuilderGenerator.kt:498 */
  171    209   
    #[allow(missing_docs)] // documentation missing in model
         210  +
                           /* FluentBuilderGenerator.kt:500 */
  172    211   
    pub fn set_byte_value(mut self, input: ::std::option::Option<i8>) -> Self {
  173    212   
        self.inner = self.inner.set_byte_value(input);
  174    213   
        self
  175    214   
    }
         215  +
    /* FluentBuilderGenerator.kt:518 */
  176    216   
    #[allow(missing_docs)] // documentation missing in model
         217  +
                           /* FluentBuilderGenerator.kt:520 */
  177    218   
    pub fn get_byte_value(&self) -> &::std::option::Option<i8> {
  178    219   
        self.inner.get_byte_value()
  179    220   
    }
         221  +
    /* FluentBuilderGenerator.kt:498 */
  180    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* FluentBuilderGenerator.kt:500 */
  181    224   
    pub fn short_value(mut self, input: i16) -> Self {
  182    225   
        self.inner = self.inner.short_value(input);
  183    226   
        self
  184    227   
    }
         228  +
    /* FluentBuilderGenerator.kt:498 */
  185    229   
    #[allow(missing_docs)] // documentation missing in model
         230  +
                           /* FluentBuilderGenerator.kt:500 */
  186    231   
    pub fn set_short_value(mut self, input: ::std::option::Option<i16>) -> Self {
  187    232   
        self.inner = self.inner.set_short_value(input);
  188    233   
        self
  189    234   
    }
         235  +
    /* FluentBuilderGenerator.kt:518 */
  190    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* FluentBuilderGenerator.kt:520 */
  191    238   
    pub fn get_short_value(&self) -> &::std::option::Option<i16> {
  192    239   
        self.inner.get_short_value()
  193    240   
    }
         241  +
    /* FluentBuilderGenerator.kt:498 */
  194    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* FluentBuilderGenerator.kt:500 */
  195    244   
    pub fn integer_value(mut self, input: i32) -> Self {
  196    245   
        self.inner = self.inner.integer_value(input);
  197    246   
        self
  198    247   
    }
         248  +
    /* FluentBuilderGenerator.kt:498 */
  199    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* FluentBuilderGenerator.kt:500 */
  200    251   
    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
  201    252   
        self.inner = self.inner.set_integer_value(input);
  202    253   
        self
  203    254   
    }
         255  +
    /* FluentBuilderGenerator.kt:518 */
  204    256   
    #[allow(missing_docs)] // documentation missing in model
         257  +
                           /* FluentBuilderGenerator.kt:520 */
  205    258   
    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
  206    259   
        self.inner.get_integer_value()
  207    260   
    }
         261  +
    /* FluentBuilderGenerator.kt:498 */
  208    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* FluentBuilderGenerator.kt:500 */
  209    264   
    pub fn long_value(mut self, input: i64) -> Self {
  210    265   
        self.inner = self.inner.long_value(input);
  211    266   
        self
  212    267   
    }
         268  +
    /* FluentBuilderGenerator.kt:498 */
  213    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* FluentBuilderGenerator.kt:500 */
  214    271   
    pub fn set_long_value(mut self, input: ::std::option::Option<i64>) -> Self {
  215    272   
        self.inner = self.inner.set_long_value(input);
  216    273   
        self
  217    274   
    }
         275  +
    /* FluentBuilderGenerator.kt:518 */
  218    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* FluentBuilderGenerator.kt:520 */
  219    278   
    pub fn get_long_value(&self) -> &::std::option::Option<i64> {
  220    279   
        self.inner.get_long_value()
  221    280   
    }
         281  +
    /* FluentBuilderGenerator.kt:498 */
  222    282   
    #[allow(missing_docs)] // documentation missing in model
         283  +
                           /* FluentBuilderGenerator.kt:500 */
  223    284   
    pub fn float_value(mut self, input: f32) -> Self {
  224    285   
        self.inner = self.inner.float_value(input);
  225    286   
        self
  226    287   
    }
         288  +
    /* FluentBuilderGenerator.kt:498 */
  227    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* FluentBuilderGenerator.kt:500 */
  228    291   
    pub fn set_float_value(mut self, input: ::std::option::Option<f32>) -> Self {
  229    292   
        self.inner = self.inner.set_float_value(input);
  230    293   
        self
  231    294   
    }
         295  +
    /* FluentBuilderGenerator.kt:518 */
  232    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* FluentBuilderGenerator.kt:520 */
  233    298   
    pub fn get_float_value(&self) -> &::std::option::Option<f32> {
  234    299   
        self.inner.get_float_value()
  235    300   
    }
         301  +
    /* FluentBuilderGenerator.kt:498 */
  236    302   
    #[allow(missing_docs)] // documentation missing in model
         303  +
                           /* FluentBuilderGenerator.kt:500 */
  237    304   
    pub fn double_value(mut self, input: f64) -> Self {
  238    305   
        self.inner = self.inner.double_value(input);
  239    306   
        self
  240    307   
    }
         308  +
    /* FluentBuilderGenerator.kt:498 */
  241    309   
    #[allow(missing_docs)] // documentation missing in model
         310  +
                           /* FluentBuilderGenerator.kt:500 */
  242    311   
    pub fn set_double_value(mut self, input: ::std::option::Option<f64>) -> Self {
  243    312   
        self.inner = self.inner.set_double_value(input);
  244    313   
        self
  245    314   
    }
         315  +
    /* FluentBuilderGenerator.kt:518 */
  246    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* FluentBuilderGenerator.kt:520 */
  247    318   
    pub fn get_double_value(&self) -> &::std::option::Option<f64> {
  248    319   
        self.inner.get_double_value()
  249    320   
    }
         321  +
    /* FluentBuilderGenerator.kt:282 */
  250    322   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/timestamp_format_headers.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 `TimestampFormatHeaders`.
           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 TimestampFormatHeaders;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TimestampFormatHeaders {
    7         -
    /// Creates a new `TimestampFormatHeaders`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TimestampFormatHeaders`
          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::timestamp_format_headers::TimestampFormatHeadersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +266,283 @@
   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 TimestampFormatHeaders {
   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("TimestampFormatHeaders");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TimestampFormatHeadersRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TimestampFormatHeadersResponseDeserializer,
  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   
            "TimestampFormatHeaders",
  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("TimestampFormatHeaders")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TimestampFormatHeadersEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
  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 TimestampFormatHeadersResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TimestampFormatHeadersResponseDeserializer {
  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_timestamp_format_headers::de_timestamp_format_headers_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_timestamp_format_headers::de_timestamp_format_headers_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 TimestampFormatHeadersRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TimestampFormatHeadersRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::timestamp_format_headers::TimestampFormatHeadersInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::timestamp_format_headers::TimestampFormatHeadersInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/TimestampFormatHeaders").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::timestamp_format_headers::TimestampFormatHeadersInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                let builder = crate::protocol_serde::shape_timestamp_format_headers::ser_timestamp_format_headers_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct TimestampFormatHeadersEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TimestampFormatHeadersEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "TimestampFormatHeadersEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<TimestampFormatHeadersInput>()
  221    235   
            .ok_or("failed to downcast to TimestampFormatHeadersInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* RustType.kt:516 */
  235    250   
#[allow(unreachable_code, unused_variables)]
         251  +
/* RustType.kt:516 */
  236    252   
#[cfg(test)]
         253  +
/* ProtocolTestGenerator.kt:98 */
  237    254   
mod timestamp_format_headers_test {
  238    255   
  239    256   
    /// Tests how timestamp request headers are serialized
  240    257   
    /// Test ID: TimestampFormatHeaders
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn timestamp_format_headers_request() {
  244    261   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  246    263   
@@ -364,381 +493,569 @@
  384    401   
            parsed.target_http_date,
  385    402   
            expected_output.target_http_date,
  386    403   
            "Unexpected value for `target_http_date`"
  387    404   
        );
  388    405   
        ::pretty_assertions::assert_eq!(
  389    406   
            parsed.target_date_time,
  390    407   
            expected_output.target_date_time,
  391    408   
            "Unexpected value for `target_date_time`"
  392    409   
        );
  393    410   
    }
         411  +
         412  +
    /* ProtocolTestGenerator.kt:98 */
  394    413   
}
  395    414   
         415  +
/* OperationErrorGenerator.kt:79 */
  396    416   
/// Error type for the `TimestampFormatHeadersError` operation.
         417  +
/* RustType.kt:516 */
  397    418   
#[non_exhaustive]
         419  +
/* RustType.kt:516 */
  398    420   
#[derive(::std::fmt::Debug)]
  399         -
pub enum TimestampFormatHeadersError {
         421  +
pub /* OperationErrorGenerator.kt:81 */ enum TimestampFormatHeadersError {
         422  +
    /* OperationErrorGenerator.kt:88 */
  400    423   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  401    424   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  402    425   
    variable wildcard pattern and check `.code()`:
  403    426   
     \
  404    427   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  405    428   
     \
  406    429   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TimestampFormatHeadersError) for what information is available for the error.")]
  407    430   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         431  +
    /* OperationErrorGenerator.kt:81 */
  408    432   
}
         433  +
/* OperationErrorGenerator.kt:218 */
  409    434   
impl TimestampFormatHeadersError {
         435  +
    /* OperationErrorGenerator.kt:219 */
  410    436   
    /// Creates the `TimestampFormatHeadersError::Unhandled` variant from any error type.
  411    437   
    pub fn unhandled(
  412    438   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  413    439   
    ) -> Self {
  414    440   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  415    441   
            source: err.into(),
  416    442   
            meta: ::std::default::Default::default(),
  417    443   
        })
  418    444   
    }
  419    445   
  420    446   
    /// Creates the `TimestampFormatHeadersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  421    447   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  422    448   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  423    449   
            source: err.clone().into(),
  424    450   
            meta: err,
  425    451   
        })
  426    452   
    }
  427         -
    ///
         453  +
    /// /* OperationErrorGenerator.kt:236 */
  428    454   
    /// Returns error metadata, which includes the error code, message,
  429    455   
    /// request ID, and potentially additional information.
  430    456   
    ///
         457  +
    /* OperationErrorGenerator.kt:242 */
  431    458   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         459  +
        /* OperationErrorGenerator.kt:243 */
  432    460   
        match self {
  433         -
            Self::Unhandled(e) => &e.meta,
         461  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         462  +
            /* OperationErrorGenerator.kt:243 */
  434    463   
        }
         464  +
        /* OperationErrorGenerator.kt:242 */
  435    465   
    }
         466  +
    /* OperationErrorGenerator.kt:218 */
  436    467   
}
         468  +
/* OperationErrorGenerator.kt:269 */
  437    469   
impl ::std::error::Error for TimestampFormatHeadersError {
         470  +
    /* OperationErrorGenerator.kt:270 */
  438    471   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         472  +
        /* OperationErrorGenerator.kt:318 */
  439    473   
        match self {
  440         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         474  +
            /* OperationErrorGenerator.kt:326 */
         475  +
            Self::Unhandled(_inner) => {
         476  +
                /* OperationErrorGenerator.kt:279 */
         477  +
                ::std::option::Option::Some(&*_inner.source)
         478  +
                /* OperationErrorGenerator.kt:326 */
         479  +
            } /* OperationErrorGenerator.kt:318 */
  441    480   
        }
         481  +
        /* OperationErrorGenerator.kt:270 */
  442    482   
    }
         483  +
    /* OperationErrorGenerator.kt:269 */
  443    484   
}
         485  +
/* OperationErrorGenerator.kt:133 */
  444    486   
impl ::std::fmt::Display for TimestampFormatHeadersError {
         487  +
    /* OperationErrorGenerator.kt:134 */
  445    488   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         489  +
        /* OperationErrorGenerator.kt:318 */
  446    490   
        match self {
         491  +
            /* OperationErrorGenerator.kt:326 */
  447    492   
            Self::Unhandled(_inner) => {
         493  +
                /* OperationErrorGenerator.kt:139 */
  448    494   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  449    495   
                    write!(f, "unhandled error ({code})")
  450    496   
                } else {
  451    497   
                    f.write_str("unhandled error")
  452    498   
                }
         499  +
                /* OperationErrorGenerator.kt:326 */
         500  +
            } /* OperationErrorGenerator.kt:318 */
  453    501   
        }
         502  +
        /* OperationErrorGenerator.kt:134 */
  454    503   
    }
  455         -
    }
         504  +
    /* OperationErrorGenerator.kt:133 */
  456    505   
}
         506  +
/* OperationErrorGenerator.kt:182 */
  457    507   
impl ::aws_smithy_types::retry::ProvideErrorKind for TimestampFormatHeadersError {
         508  +
    /* OperationErrorGenerator.kt:186 */
  458    509   
    fn code(&self) -> ::std::option::Option<&str> {
         510  +
        /* OperationErrorGenerator.kt:187 */
  459    511   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         512  +
        /* OperationErrorGenerator.kt:186 */
  460    513   
    }
         514  +
    /* OperationErrorGenerator.kt:190 */
  461    515   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         516  +
        /* OperationErrorGenerator.kt:197 */
  462    517   
        ::std::option::Option::None
         518  +
        /* OperationErrorGenerator.kt:190 */
  463    519   
    }
         520  +
    /* OperationErrorGenerator.kt:182 */
  464    521   
}
         522  +
/* OperationErrorGenerator.kt:163 */
  465    523   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TimestampFormatHeadersError {
         524  +
    /* OperationErrorGenerator.kt:164 */
  466    525   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         526  +
        /* OperationErrorGenerator.kt:318 */
  467    527   
        match self {
  468         -
            Self::Unhandled(_inner) => &_inner.meta,
         528  +
            /* OperationErrorGenerator.kt:326 */
         529  +
            Self::Unhandled(_inner) => {
         530  +
                /* OperationErrorGenerator.kt:168 */
         531  +
                &_inner.meta
         532  +
                /* OperationErrorGenerator.kt:326 */
         533  +
            } /* OperationErrorGenerator.kt:318 */
  469    534   
        }
         535  +
        /* OperationErrorGenerator.kt:164 */
  470    536   
    }
         537  +
    /* OperationErrorGenerator.kt:163 */
  471    538   
}
         539  +
/* OperationErrorGenerator.kt:109 */
  472    540   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TimestampFormatHeadersError {
         541  +
    /* OperationErrorGenerator.kt:110 */
  473    542   
    fn create_unhandled_error(
  474    543   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  475    544   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  476    545   
    ) -> Self {
         546  +
        /* OperationErrorGenerator.kt:121 */
  477    547   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  478    548   
            source,
  479    549   
            meta: meta.unwrap_or_default(),
  480    550   
        })
         551  +
        /* OperationErrorGenerator.kt:110 */
  481    552   
    }
         553  +
    /* OperationErrorGenerator.kt:109 */
  482    554   
}
  483    555   
         556  +
/* CodegenDelegator.kt:255 */
  484    557   
pub use crate::operation::timestamp_format_headers::_timestamp_format_headers_output::TimestampFormatHeadersOutput;
  485    558   
         559  +
/* CodegenDelegator.kt:255 */
  486    560   
pub use crate::operation::timestamp_format_headers::_timestamp_format_headers_input::TimestampFormatHeadersInput;
  487    561   
         562  +
/* RustModule.kt:172 */
  488    563   
mod _timestamp_format_headers_input;
  489    564   
         565  +
/* RustModule.kt:172 */
  490    566   
mod _timestamp_format_headers_output;
  491    567   
  492         -
/// Builders
         568  +
/// /* CodegenDelegator.kt:51 */Builders
  493    569   
pub mod builders;

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

@@ -1,1 +186,343 @@
    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 TimestampFormatHeadersInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TimestampFormatHeadersInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub target_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl TimestampFormatHeadersInput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn member_epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.member_epoch_seconds.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn member_http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.member_http_date.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:231 */
   30     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* StructureGenerator.kt:166 */
   31     53   
    pub fn member_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.member_date_time.as_ref()
          56  +
        /* StructureGenerator.kt:166 */
   33     57   
    }
          58  +
    /* StructureGenerator.kt:231 */
   34     59   
    #[allow(missing_docs)] // documentation missing in model
          60  +
                           /* StructureGenerator.kt:166 */
   35     61   
    pub fn default_format(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.default_format.as_ref()
          64  +
        /* StructureGenerator.kt:166 */
   37     65   
    }
          66  +
    /* StructureGenerator.kt:231 */
   38     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* StructureGenerator.kt:166 */
   39     69   
    pub fn target_epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.target_epoch_seconds.as_ref()
          72  +
        /* StructureGenerator.kt:166 */
   41     73   
    }
          74  +
    /* StructureGenerator.kt:231 */
   42     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* StructureGenerator.kt:166 */
   43     77   
    pub fn target_http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.target_http_date.as_ref()
          80  +
        /* StructureGenerator.kt:166 */
   45     81   
    }
          82  +
    /* StructureGenerator.kt:231 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* StructureGenerator.kt:166 */
   47     85   
    pub fn target_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.target_date_time.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl TimestampFormatHeadersInput {
   52         -
    /// Creates a new builder-style object to manufacture [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersInputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersInputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
         105  +
/* RustType.kt:516 */
   59    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   60    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   61    110   
pub struct TimestampFormatHeadersInputBuilder {
   62         -
    pub(crate) member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) target_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl TimestampFormatHeadersInputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn member_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.member_epoch_seconds = ::std::option::Option::Some(input);
         129  +
        /* BuilderGenerator.kt:293 */
   74    130   
        self
         131  +
        /* BuilderGenerator.kt:291 */
   75    132   
    }
         133  +
    /* BuilderGenerator.kt:312 */
   76    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:314 */
   77    136   
    pub fn set_member_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.member_epoch_seconds = input;
   79    139   
        self
         140  +
        /* BuilderGenerator.kt:314 */
   80    141   
    }
         142  +
    /* BuilderGenerator.kt:334 */
   81    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* BuilderGenerator.kt:336 */
   82    145   
    pub fn get_member_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.member_epoch_seconds
         148  +
        /* BuilderGenerator.kt:336 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:286 */
   85    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:291 */
   86    153   
    pub fn member_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.member_http_date = ::std::option::Option::Some(input);
         156  +
        /* BuilderGenerator.kt:293 */
   88    157   
        self
         158  +
        /* BuilderGenerator.kt:291 */
   89    159   
    }
         160  +
    /* BuilderGenerator.kt:312 */
   90    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:314 */
   91    163   
    pub fn set_member_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.member_http_date = input;
   93    166   
        self
         167  +
        /* BuilderGenerator.kt:314 */
   94    168   
    }
         169  +
    /* BuilderGenerator.kt:334 */
   95    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* BuilderGenerator.kt:336 */
   96    172   
    pub fn get_member_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.member_http_date
         175  +
        /* BuilderGenerator.kt:336 */
   98    176   
    }
         177  +
    /* BuilderGenerator.kt:286 */
   99    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* BuilderGenerator.kt:291 */
  100    180   
    pub fn member_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.member_date_time = ::std::option::Option::Some(input);
         183  +
        /* BuilderGenerator.kt:293 */
  102    184   
        self
         185  +
        /* BuilderGenerator.kt:291 */
  103    186   
    }
         187  +
    /* BuilderGenerator.kt:312 */
  104    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:314 */
  105    190   
    pub fn set_member_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.member_date_time = input;
  107    193   
        self
         194  +
        /* BuilderGenerator.kt:314 */
  108    195   
    }
         196  +
    /* BuilderGenerator.kt:334 */
  109    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* BuilderGenerator.kt:336 */
  110    199   
    pub fn get_member_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.member_date_time
         202  +
        /* BuilderGenerator.kt:336 */
  112    203   
    }
         204  +
    /* BuilderGenerator.kt:286 */
  113    205   
    #[allow(missing_docs)] // documentation missing in model
         206  +
                           /* BuilderGenerator.kt:291 */
  114    207   
    pub fn default_format(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.default_format = ::std::option::Option::Some(input);
         210  +
        /* BuilderGenerator.kt:293 */
  116    211   
        self
         212  +
        /* BuilderGenerator.kt:291 */
  117    213   
    }
         214  +
    /* BuilderGenerator.kt:312 */
  118    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:314 */
  119    217   
    pub fn set_default_format(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.default_format = input;
  121    220   
        self
         221  +
        /* BuilderGenerator.kt:314 */
  122    222   
    }
         223  +
    /* BuilderGenerator.kt:334 */
  123    224   
    #[allow(missing_docs)] // documentation missing in model
         225  +
                           /* BuilderGenerator.kt:336 */
  124    226   
    pub fn get_default_format(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.default_format
         229  +
        /* BuilderGenerator.kt:336 */
  126    230   
    }
         231  +
    /* BuilderGenerator.kt:286 */
  127    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:291 */
  128    234   
    pub fn target_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.target_epoch_seconds = ::std::option::Option::Some(input);
         237  +
        /* BuilderGenerator.kt:293 */
  130    238   
        self
         239  +
        /* BuilderGenerator.kt:291 */
  131    240   
    }
         241  +
    /* BuilderGenerator.kt:312 */
  132    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:314 */
  133    244   
    pub fn set_target_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.target_epoch_seconds = input;
  135    247   
        self
         248  +
        /* BuilderGenerator.kt:314 */
  136    249   
    }
         250  +
    /* BuilderGenerator.kt:334 */
  137    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:336 */
  138    253   
    pub fn get_target_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.target_epoch_seconds
         256  +
        /* BuilderGenerator.kt:336 */
  140    257   
    }
         258  +
    /* BuilderGenerator.kt:286 */
  141    259   
    #[allow(missing_docs)] // documentation missing in model
         260  +
                           /* BuilderGenerator.kt:291 */
  142    261   
    pub fn target_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.target_http_date = ::std::option::Option::Some(input);
         264  +
        /* BuilderGenerator.kt:293 */
  144    265   
        self
         266  +
        /* BuilderGenerator.kt:291 */
  145    267   
    }
         268  +
    /* BuilderGenerator.kt:312 */
  146    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:314 */
  147    271   
    pub fn set_target_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.target_http_date = input;
  149    274   
        self
         275  +
        /* BuilderGenerator.kt:314 */
  150    276   
    }
         277  +
    /* BuilderGenerator.kt:334 */
  151    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:336 */
  152    280   
    pub fn get_target_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.target_http_date
         283  +
        /* BuilderGenerator.kt:336 */
  154    284   
    }
         285  +
    /* BuilderGenerator.kt:286 */
  155    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:291 */
  156    288   
    pub fn target_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.target_date_time = ::std::option::Option::Some(input);
         291  +
        /* BuilderGenerator.kt:293 */
  158    292   
        self
         293  +
        /* BuilderGenerator.kt:291 */
  159    294   
    }
         295  +
    /* BuilderGenerator.kt:312 */
  160    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:314 */
  161    298   
    pub fn set_target_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.target_date_time = input;
  163    301   
        self
         302  +
        /* BuilderGenerator.kt:314 */
  164    303   
    }
         304  +
    /* BuilderGenerator.kt:334 */
  165    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:336 */
  166    307   
    pub fn get_target_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.target_date_time
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TimestampFormatHeadersInput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersInput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(
  171    315   
        self,
  172    316   
    ) -> ::std::result::Result<
  173    317   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersInput,
  174    318   
        ::aws_smithy_types::error::operation::BuildError,
  175    319   
    > {
  176         -
        ::std::result::Result::Ok(crate::operation::timestamp_format_headers::TimestampFormatHeadersInput {
  177         -
            member_epoch_seconds: self.member_epoch_seconds,
         320  +
        /* BuilderGenerator.kt:254 */
         321  +
        ::std::result::Result::Ok(
         322  +
            /* BuilderGenerator.kt:477 */
         323  +
            crate::operation::timestamp_format_headers::TimestampFormatHeadersInput {
         324  +
                /* BuilderGenerator.kt:481 */ member_epoch_seconds: self.member_epoch_seconds,
         325  +
                /* BuilderGenerator.kt:481 */
  178    326   
                member_http_date: self.member_http_date,
         327  +
                /* BuilderGenerator.kt:481 */
  179    328   
                member_date_time: self.member_date_time,
         329  +
                /* BuilderGenerator.kt:481 */
  180    330   
                default_format: self.default_format,
         331  +
                /* BuilderGenerator.kt:481 */
  181    332   
                target_epoch_seconds: self.target_epoch_seconds,
         333  +
                /* BuilderGenerator.kt:481 */
  182    334   
                target_http_date: self.target_http_date,
         335  +
                /* BuilderGenerator.kt:481 */
  183    336   
                target_date_time: self.target_date_time,
  184         -
        })
         337  +
                /* BuilderGenerator.kt:477 */
         338  +
            }, /* BuilderGenerator.kt:254 */
         339  +
        )
         340  +
        /* BuilderGenerator.kt:253 */
  185    341   
    }
         342  +
    /* BuilderGenerator.kt:355 */
  186    343   
}

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

@@ -1,1 +181,335 @@
    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 TimestampFormatHeadersOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TimestampFormatHeadersOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub target_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl TimestampFormatHeadersOutput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn member_epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.member_epoch_seconds.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn member_http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.member_http_date.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:231 */
   30     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* StructureGenerator.kt:166 */
   31     53   
    pub fn member_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.member_date_time.as_ref()
          56  +
        /* StructureGenerator.kt:166 */
   33     57   
    }
          58  +
    /* StructureGenerator.kt:231 */
   34     59   
    #[allow(missing_docs)] // documentation missing in model
          60  +
                           /* StructureGenerator.kt:166 */
   35     61   
    pub fn default_format(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.default_format.as_ref()
          64  +
        /* StructureGenerator.kt:166 */
   37     65   
    }
          66  +
    /* StructureGenerator.kt:231 */
   38     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* StructureGenerator.kt:166 */
   39     69   
    pub fn target_epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.target_epoch_seconds.as_ref()
          72  +
        /* StructureGenerator.kt:166 */
   41     73   
    }
          74  +
    /* StructureGenerator.kt:231 */
   42     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* StructureGenerator.kt:166 */
   43     77   
    pub fn target_http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.target_http_date.as_ref()
          80  +
        /* StructureGenerator.kt:166 */
   45     81   
    }
          82  +
    /* StructureGenerator.kt:231 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* StructureGenerator.kt:166 */
   47     85   
    pub fn target_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.target_date_time.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl TimestampFormatHeadersOutput {
   52         -
    /// Creates a new builder-style object to manufacture [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersOutputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersOutputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
         105  +
/* RustType.kt:516 */
   59    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   60    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   61    110   
pub struct TimestampFormatHeadersOutputBuilder {
   62         -
    pub(crate) member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) member_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) default_format: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) target_epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) target_http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) target_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl TimestampFormatHeadersOutputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn member_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.member_epoch_seconds = ::std::option::Option::Some(input);
         129  +
        /* BuilderGenerator.kt:293 */
   74    130   
        self
         131  +
        /* BuilderGenerator.kt:291 */
   75    132   
    }
         133  +
    /* BuilderGenerator.kt:312 */
   76    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:314 */
   77    136   
    pub fn set_member_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.member_epoch_seconds = input;
   79    139   
        self
         140  +
        /* BuilderGenerator.kt:314 */
   80    141   
    }
         142  +
    /* BuilderGenerator.kt:334 */
   81    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* BuilderGenerator.kt:336 */
   82    145   
    pub fn get_member_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.member_epoch_seconds
         148  +
        /* BuilderGenerator.kt:336 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:286 */
   85    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:291 */
   86    153   
    pub fn member_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.member_http_date = ::std::option::Option::Some(input);
         156  +
        /* BuilderGenerator.kt:293 */
   88    157   
        self
         158  +
        /* BuilderGenerator.kt:291 */
   89    159   
    }
         160  +
    /* BuilderGenerator.kt:312 */
   90    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:314 */
   91    163   
    pub fn set_member_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.member_http_date = input;
   93    166   
        self
         167  +
        /* BuilderGenerator.kt:314 */
   94    168   
    }
         169  +
    /* BuilderGenerator.kt:334 */
   95    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* BuilderGenerator.kt:336 */
   96    172   
    pub fn get_member_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.member_http_date
         175  +
        /* BuilderGenerator.kt:336 */
   98    176   
    }
         177  +
    /* BuilderGenerator.kt:286 */
   99    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* BuilderGenerator.kt:291 */
  100    180   
    pub fn member_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.member_date_time = ::std::option::Option::Some(input);
         183  +
        /* BuilderGenerator.kt:293 */
  102    184   
        self
         185  +
        /* BuilderGenerator.kt:291 */
  103    186   
    }
         187  +
    /* BuilderGenerator.kt:312 */
  104    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:314 */
  105    190   
    pub fn set_member_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.member_date_time = input;
  107    193   
        self
         194  +
        /* BuilderGenerator.kt:314 */
  108    195   
    }
         196  +
    /* BuilderGenerator.kt:334 */
  109    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* BuilderGenerator.kt:336 */
  110    199   
    pub fn get_member_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.member_date_time
         202  +
        /* BuilderGenerator.kt:336 */
  112    203   
    }
         204  +
    /* BuilderGenerator.kt:286 */
  113    205   
    #[allow(missing_docs)] // documentation missing in model
         206  +
                           /* BuilderGenerator.kt:291 */
  114    207   
    pub fn default_format(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.default_format = ::std::option::Option::Some(input);
         210  +
        /* BuilderGenerator.kt:293 */
  116    211   
        self
         212  +
        /* BuilderGenerator.kt:291 */
  117    213   
    }
         214  +
    /* BuilderGenerator.kt:312 */
  118    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:314 */
  119    217   
    pub fn set_default_format(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.default_format = input;
  121    220   
        self
         221  +
        /* BuilderGenerator.kt:314 */
  122    222   
    }
         223  +
    /* BuilderGenerator.kt:334 */
  123    224   
    #[allow(missing_docs)] // documentation missing in model
         225  +
                           /* BuilderGenerator.kt:336 */
  124    226   
    pub fn get_default_format(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.default_format
         229  +
        /* BuilderGenerator.kt:336 */
  126    230   
    }
         231  +
    /* BuilderGenerator.kt:286 */
  127    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:291 */
  128    234   
    pub fn target_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.target_epoch_seconds = ::std::option::Option::Some(input);
         237  +
        /* BuilderGenerator.kt:293 */
  130    238   
        self
         239  +
        /* BuilderGenerator.kt:291 */
  131    240   
    }
         241  +
    /* BuilderGenerator.kt:312 */
  132    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:314 */
  133    244   
    pub fn set_target_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.target_epoch_seconds = input;
  135    247   
        self
         248  +
        /* BuilderGenerator.kt:314 */
  136    249   
    }
         250  +
    /* BuilderGenerator.kt:334 */
  137    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:336 */
  138    253   
    pub fn get_target_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.target_epoch_seconds
         256  +
        /* BuilderGenerator.kt:336 */
  140    257   
    }
         258  +
    /* BuilderGenerator.kt:286 */
  141    259   
    #[allow(missing_docs)] // documentation missing in model
         260  +
                           /* BuilderGenerator.kt:291 */
  142    261   
    pub fn target_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.target_http_date = ::std::option::Option::Some(input);
         264  +
        /* BuilderGenerator.kt:293 */
  144    265   
        self
         266  +
        /* BuilderGenerator.kt:291 */
  145    267   
    }
         268  +
    /* BuilderGenerator.kt:312 */
  146    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:314 */
  147    271   
    pub fn set_target_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.target_http_date = input;
  149    274   
        self
         275  +
        /* BuilderGenerator.kt:314 */
  150    276   
    }
         277  +
    /* BuilderGenerator.kt:334 */
  151    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:336 */
  152    280   
    pub fn get_target_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.target_http_date
         283  +
        /* BuilderGenerator.kt:336 */
  154    284   
    }
         285  +
    /* BuilderGenerator.kt:286 */
  155    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:291 */
  156    288   
    pub fn target_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.target_date_time = ::std::option::Option::Some(input);
         291  +
        /* BuilderGenerator.kt:293 */
  158    292   
        self
         293  +
        /* BuilderGenerator.kt:291 */
  159    294   
    }
         295  +
    /* BuilderGenerator.kt:312 */
  160    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:314 */
  161    298   
    pub fn set_target_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.target_date_time = input;
  163    301   
        self
         302  +
        /* BuilderGenerator.kt:314 */
  164    303   
    }
         304  +
    /* BuilderGenerator.kt:334 */
  165    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:336 */
  166    307   
    pub fn get_target_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.target_date_time
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TimestampFormatHeadersOutput`](crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(self) -> crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput {
         315  +
        /* BuilderGenerator.kt:477 */
  171    316   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput {
  172         -
            member_epoch_seconds: self.member_epoch_seconds,
         317  +
            /* BuilderGenerator.kt:481 */ member_epoch_seconds: self.member_epoch_seconds,
         318  +
            /* BuilderGenerator.kt:481 */
  173    319   
            member_http_date: self.member_http_date,
         320  +
            /* BuilderGenerator.kt:481 */
  174    321   
            member_date_time: self.member_date_time,
         322  +
            /* BuilderGenerator.kt:481 */
  175    323   
            default_format: self.default_format,
         324  +
            /* BuilderGenerator.kt:481 */
  176    325   
            target_epoch_seconds: self.target_epoch_seconds,
         326  +
            /* BuilderGenerator.kt:481 */
  177    327   
            target_http_date: self.target_http_date,
         328  +
            /* BuilderGenerator.kt:481 */
  178    329   
            target_date_time: self.target_date_time,
         330  +
            /* BuilderGenerator.kt:477 */
  179    331   
        }
         332  +
        /* BuilderGenerator.kt:253 */
  180    333   
    }
         334  +
    /* BuilderGenerator.kt:355 */
  181    335   
}

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

@@ -1,1 +209,263 @@
    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::timestamp_format_headers::_timestamp_format_headers_output::TimestampFormatHeadersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::timestamp_format_headers::_timestamp_format_headers_input::TimestampFormatHeadersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersInputBuilder {
    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::timestamp_format_headers::TimestampFormatHeadersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.timestamp_format_headers();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TimestampFormatHeaders`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TimestampFormatHeaders`.
   24     27   
///
   25         -
/// The example tests how timestamp request and response headers are serialized.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how timestamp request and response headers are serialized.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TimestampFormatHeadersFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersInputBuilder,
   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::timestamp_format_headers::TimestampFormatHeadersOutput,
   35     41   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   36     42   
    > for TimestampFormatHeadersFluentBuilder
   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::timestamp_format_headers::TimestampFormatHeadersOutput,
   44     50   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   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 TimestampFormatHeadersFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TimestampFormatHeadersFluentBuilder`.
   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 TimestampFormatHeaders as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::timestamp_format_headers::builders::TimestampFormatHeadersInputBuilder {
   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::timestamp_format_headers::TimestampFormatHeadersOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   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::timestamp_format_headers::TimestampFormatHeaders::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::timestamp_format_headers::TimestampFormatHeaders::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::timestamp_format_headers::TimestampFormatHeadersOutput,
   97    107   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   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 member_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  113    126   
        self.inner = self.inner.member_epoch_seconds(input);
  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_member_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  118    133   
        self.inner = self.inner.set_member_epoch_seconds(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_member_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  123    140   
        self.inner.get_member_epoch_seconds()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn member_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  127    146   
        self.inner = self.inner.member_http_date(input);
  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_member_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  132    153   
        self.inner = self.inner.set_member_http_date(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_member_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  137    160   
        self.inner.get_member_http_date()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:498 */
  139    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* FluentBuilderGenerator.kt:500 */
  140    165   
    pub fn member_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  141    166   
        self.inner = self.inner.member_date_time(input);
  142    167   
        self
  143    168   
    }
         169  +
    /* FluentBuilderGenerator.kt:498 */
  144    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* FluentBuilderGenerator.kt:500 */
  145    172   
    pub fn set_member_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  146    173   
        self.inner = self.inner.set_member_date_time(input);
  147    174   
        self
  148    175   
    }
         176  +
    /* FluentBuilderGenerator.kt:518 */
  149    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* FluentBuilderGenerator.kt:520 */
  150    179   
    pub fn get_member_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  151    180   
        self.inner.get_member_date_time()
  152    181   
    }
         182  +
    /* FluentBuilderGenerator.kt:498 */
  153    183   
    #[allow(missing_docs)] // documentation missing in model
         184  +
                           /* FluentBuilderGenerator.kt:500 */
  154    185   
    pub fn default_format(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  155    186   
        self.inner = self.inner.default_format(input);
  156    187   
        self
  157    188   
    }
         189  +
    /* FluentBuilderGenerator.kt:498 */
  158    190   
    #[allow(missing_docs)] // documentation missing in model
         191  +
                           /* FluentBuilderGenerator.kt:500 */
  159    192   
    pub fn set_default_format(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  160    193   
        self.inner = self.inner.set_default_format(input);
  161    194   
        self
  162    195   
    }
         196  +
    /* FluentBuilderGenerator.kt:518 */
  163    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* FluentBuilderGenerator.kt:520 */
  164    199   
    pub fn get_default_format(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  165    200   
        self.inner.get_default_format()
  166    201   
    }
         202  +
    /* FluentBuilderGenerator.kt:498 */
  167    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* FluentBuilderGenerator.kt:500 */
  168    205   
    pub fn target_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  169    206   
        self.inner = self.inner.target_epoch_seconds(input);
  170    207   
        self
  171    208   
    }
         209  +
    /* FluentBuilderGenerator.kt:498 */
  172    210   
    #[allow(missing_docs)] // documentation missing in model
         211  +
                           /* FluentBuilderGenerator.kt:500 */
  173    212   
    pub fn set_target_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  174    213   
        self.inner = self.inner.set_target_epoch_seconds(input);
  175    214   
        self
  176    215   
    }
         216  +
    /* FluentBuilderGenerator.kt:518 */
  177    217   
    #[allow(missing_docs)] // documentation missing in model
         218  +
                           /* FluentBuilderGenerator.kt:520 */
  178    219   
    pub fn get_target_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  179    220   
        self.inner.get_target_epoch_seconds()
  180    221   
    }
         222  +
    /* FluentBuilderGenerator.kt:498 */
  181    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* FluentBuilderGenerator.kt:500 */
  182    225   
    pub fn target_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  183    226   
        self.inner = self.inner.target_http_date(input);
  184    227   
        self
  185    228   
    }
         229  +
    /* FluentBuilderGenerator.kt:498 */
  186    230   
    #[allow(missing_docs)] // documentation missing in model
         231  +
                           /* FluentBuilderGenerator.kt:500 */
  187    232   
    pub fn set_target_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  188    233   
        self.inner = self.inner.set_target_http_date(input);
  189    234   
        self
  190    235   
    }
         236  +
    /* FluentBuilderGenerator.kt:518 */
  191    237   
    #[allow(missing_docs)] // documentation missing in model
         238  +
                           /* FluentBuilderGenerator.kt:520 */
  192    239   
    pub fn get_target_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  193    240   
        self.inner.get_target_http_date()
  194    241   
    }
         242  +
    /* FluentBuilderGenerator.kt:498 */
  195    243   
    #[allow(missing_docs)] // documentation missing in model
         244  +
                           /* FluentBuilderGenerator.kt:500 */
  196    245   
    pub fn target_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  197    246   
        self.inner = self.inner.target_date_time(input);
  198    247   
        self
  199    248   
    }
         249  +
    /* FluentBuilderGenerator.kt:498 */
  200    250   
    #[allow(missing_docs)] // documentation missing in model
         251  +
                           /* FluentBuilderGenerator.kt:500 */
  201    252   
    pub fn set_target_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  202    253   
        self.inner = self.inner.set_target_date_time(input);
  203    254   
        self
  204    255   
    }
         256  +
    /* FluentBuilderGenerator.kt:518 */
  205    257   
    #[allow(missing_docs)] // documentation missing in model
         258  +
                           /* FluentBuilderGenerator.kt:520 */
  206    259   
    pub fn get_target_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  207    260   
        self.inner.get_target_date_time()
  208    261   
    }
         262  +
    /* FluentBuilderGenerator.kt:282 */
  209    263   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes.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 `XmlAttributes`.
           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 XmlAttributes;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlAttributes {
    7         -
    /// Creates a new `XmlAttributes`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlAttributes`
          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::xml_attributes::XmlAttributesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_attributes::XmlAttributesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_attributes::XmlAttributesError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +263,280 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlAttributes {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlAttributes");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlAttributesRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlAttributesResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "XmlAttributes",
  105    116   
            "Rest Xml Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlAttributes")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlAttributesEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_attributes::XmlAttributesError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_attributes::XmlAttributesError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct XmlAttributesResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_xml_attributes::de_xml_attributes_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_attributes::de_xml_attributes_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct XmlAttributesRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlAttributesRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::xml_attributes::XmlAttributesInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::xml_attributes::XmlAttributesInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/XmlAttributes").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::xml_attributes::XmlAttributesInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_attributes::ser_xml_attributes_op_input(&input)?);
  190    203   
        if let Some(content_length) = body.content_length() {
  191    204   
            let content_length = content_length.to_string();
  192    205   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  193    206   
        }
  194    207   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  195    208   
    }
  196    209   
}
         210  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  197    211   
#[derive(Debug)]
  198    212   
struct XmlAttributesEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlAttributesEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "XmlAttributesEndpointParamsInterceptor"
  203    217   
    }
  204    218   
  205    219   
    fn read_before_execution(
  206    220   
        &self,
  207    221   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  208    222   
            '_,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  212    226   
        >,
  213    227   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  214    228   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  215    229   
        let _input = context
  216    230   
            .input()
  217    231   
            .downcast_ref::<XmlAttributesInput>()
  218    232   
            .ok_or("failed to downcast to XmlAttributesInput")?;
  219    233   
  220    234   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  221    235   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  222    236   
        })?;
  223    237   
        cfg.interceptor_state()
  224    238   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  225    239   
        ::std::result::Result::Ok(())
  226    240   
    }
  227    241   
}
  228    242   
  229    243   
// The get_* functions below are generated from JMESPath expressions in the
  230    244   
// operationContextParams trait. They target the operation's input shape.
  231    245   
         246  +
/* RustType.kt:516 */
  232    247   
#[allow(unreachable_code, unused_variables)]
         248  +
/* RustType.kt:516 */
  233    249   
#[cfg(test)]
         250  +
/* ProtocolTestGenerator.kt:98 */
  234    251   
mod xml_attributes_test {
  235    252   
  236    253   
    /// Serializes XML attributes on the synthesized document
  237    254   
    /// Test ID: XmlAttributes
  238    255   
    #[::tokio::test]
  239    256   
    #[::tracing_test::traced_test]
  240    257   
    async fn xml_attributes_request() {
  241    258   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  242    259   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  243    260   
@@ -311,328 +440,516 @@
  331    348   
            });
  332    349   
            de.deserialize_nonstreaming(&http_response)
  333    350   
        });
  334    351   
        let parsed = parsed
  335    352   
            .expect("should be successful response")
  336    353   
            .downcast::<crate::operation::xml_attributes::XmlAttributesOutput>()
  337    354   
            .unwrap();
  338    355   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  339    356   
        ::pretty_assertions::assert_eq!(parsed.attr, expected_output.attr, "Unexpected value for `attr`");
  340    357   
    }
         358  +
         359  +
    /* ProtocolTestGenerator.kt:98 */
  341    360   
}
  342    361   
         362  +
/* OperationErrorGenerator.kt:79 */
  343    363   
/// Error type for the `XmlAttributesError` operation.
         364  +
/* RustType.kt:516 */
  344    365   
#[non_exhaustive]
         366  +
/* RustType.kt:516 */
  345    367   
#[derive(::std::fmt::Debug)]
  346         -
pub enum XmlAttributesError {
         368  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlAttributesError {
         369  +
    /* OperationErrorGenerator.kt:88 */
  347    370   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  348    371   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  349    372   
    variable wildcard pattern and check `.code()`:
  350    373   
     \
  351    374   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  352    375   
     \
  353    376   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlAttributesError) for what information is available for the error.")]
  354    377   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         378  +
    /* OperationErrorGenerator.kt:81 */
  355    379   
}
         380  +
/* OperationErrorGenerator.kt:218 */
  356    381   
impl XmlAttributesError {
         382  +
    /* OperationErrorGenerator.kt:219 */
  357    383   
    /// Creates the `XmlAttributesError::Unhandled` variant from any error type.
  358    384   
    pub fn unhandled(
  359    385   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  360    386   
    ) -> Self {
  361    387   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  362    388   
            source: err.into(),
  363    389   
            meta: ::std::default::Default::default(),
  364    390   
        })
  365    391   
    }
  366    392   
  367    393   
    /// Creates the `XmlAttributesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  368    394   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  369    395   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  370    396   
            source: err.clone().into(),
  371    397   
            meta: err,
  372    398   
        })
  373    399   
    }
  374         -
    ///
         400  +
    /// /* OperationErrorGenerator.kt:236 */
  375    401   
    /// Returns error metadata, which includes the error code, message,
  376    402   
    /// request ID, and potentially additional information.
  377    403   
    ///
         404  +
    /* OperationErrorGenerator.kt:242 */
  378    405   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         406  +
        /* OperationErrorGenerator.kt:243 */
  379    407   
        match self {
  380         -
            Self::Unhandled(e) => &e.meta,
         408  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         409  +
            /* OperationErrorGenerator.kt:243 */
  381    410   
        }
         411  +
        /* OperationErrorGenerator.kt:242 */
  382    412   
    }
         413  +
    /* OperationErrorGenerator.kt:218 */
  383    414   
}
         415  +
/* OperationErrorGenerator.kt:269 */
  384    416   
impl ::std::error::Error for XmlAttributesError {
         417  +
    /* OperationErrorGenerator.kt:270 */
  385    418   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         419  +
        /* OperationErrorGenerator.kt:318 */
  386    420   
        match self {
  387         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         421  +
            /* OperationErrorGenerator.kt:326 */
         422  +
            Self::Unhandled(_inner) => {
         423  +
                /* OperationErrorGenerator.kt:279 */
         424  +
                ::std::option::Option::Some(&*_inner.source)
         425  +
                /* OperationErrorGenerator.kt:326 */
         426  +
            } /* OperationErrorGenerator.kt:318 */
  388    427   
        }
         428  +
        /* OperationErrorGenerator.kt:270 */
  389    429   
    }
         430  +
    /* OperationErrorGenerator.kt:269 */
  390    431   
}
         432  +
/* OperationErrorGenerator.kt:133 */
  391    433   
impl ::std::fmt::Display for XmlAttributesError {
         434  +
    /* OperationErrorGenerator.kt:134 */
  392    435   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         436  +
        /* OperationErrorGenerator.kt:318 */
  393    437   
        match self {
         438  +
            /* OperationErrorGenerator.kt:326 */
  394    439   
            Self::Unhandled(_inner) => {
         440  +
                /* OperationErrorGenerator.kt:139 */
  395    441   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  396    442   
                    write!(f, "unhandled error ({code})")
  397    443   
                } else {
  398    444   
                    f.write_str("unhandled error")
  399    445   
                }
         446  +
                /* OperationErrorGenerator.kt:326 */
         447  +
            } /* OperationErrorGenerator.kt:318 */
  400    448   
        }
         449  +
        /* OperationErrorGenerator.kt:134 */
  401    450   
    }
  402         -
    }
         451  +
    /* OperationErrorGenerator.kt:133 */
  403    452   
}
         453  +
/* OperationErrorGenerator.kt:182 */
  404    454   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlAttributesError {
         455  +
    /* OperationErrorGenerator.kt:186 */
  405    456   
    fn code(&self) -> ::std::option::Option<&str> {
         457  +
        /* OperationErrorGenerator.kt:187 */
  406    458   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         459  +
        /* OperationErrorGenerator.kt:186 */
  407    460   
    }
         461  +
    /* OperationErrorGenerator.kt:190 */
  408    462   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         463  +
        /* OperationErrorGenerator.kt:197 */
  409    464   
        ::std::option::Option::None
         465  +
        /* OperationErrorGenerator.kt:190 */
  410    466   
    }
         467  +
    /* OperationErrorGenerator.kt:182 */
  411    468   
}
         469  +
/* OperationErrorGenerator.kt:163 */
  412    470   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlAttributesError {
         471  +
    /* OperationErrorGenerator.kt:164 */
  413    472   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         473  +
        /* OperationErrorGenerator.kt:318 */
  414    474   
        match self {
  415         -
            Self::Unhandled(_inner) => &_inner.meta,
         475  +
            /* OperationErrorGenerator.kt:326 */
         476  +
            Self::Unhandled(_inner) => {
         477  +
                /* OperationErrorGenerator.kt:168 */
         478  +
                &_inner.meta
         479  +
                /* OperationErrorGenerator.kt:326 */
         480  +
            } /* OperationErrorGenerator.kt:318 */
  416    481   
        }
         482  +
        /* OperationErrorGenerator.kt:164 */
  417    483   
    }
         484  +
    /* OperationErrorGenerator.kt:163 */
  418    485   
}
         486  +
/* OperationErrorGenerator.kt:109 */
  419    487   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlAttributesError {
         488  +
    /* OperationErrorGenerator.kt:110 */
  420    489   
    fn create_unhandled_error(
  421    490   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  422    491   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  423    492   
    ) -> Self {
         493  +
        /* OperationErrorGenerator.kt:121 */
  424    494   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  425    495   
            source,
  426    496   
            meta: meta.unwrap_or_default(),
  427    497   
        })
         498  +
        /* OperationErrorGenerator.kt:110 */
  428    499   
    }
         500  +
    /* OperationErrorGenerator.kt:109 */
  429    501   
}
  430    502   
         503  +
/* CodegenDelegator.kt:255 */
  431    504   
pub use crate::operation::xml_attributes::_xml_attributes_output::XmlAttributesOutput;
  432    505   
         506  +
/* CodegenDelegator.kt:255 */
  433    507   
pub use crate::operation::xml_attributes::_xml_attributes_input::XmlAttributesInput;
  434    508   
         509  +
/* RustModule.kt:172 */
  435    510   
mod _xml_attributes_input;
  436    511   
         512  +
/* RustModule.kt:172 */
  437    513   
mod _xml_attributes_output;
  438    514   
  439         -
/// Builders
         515  +
/// /* CodegenDelegator.kt:51 */Builders
  440    516   
pub mod builders;

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

@@ -1,1 +73,134 @@
    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 XmlAttributesInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlAttributesInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub attr: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlAttributesInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn attr(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.attr.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl XmlAttributesInput {
   22         -
    /// Creates a new builder-style object to manufacture [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::xml_attributes::builders::XmlAttributesInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::xml_attributes::builders::XmlAttributesInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
          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 XmlAttributesInputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) attr: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl XmlAttributesInputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.foo = ::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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.foo = 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_foo(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.foo
          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 attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.attr = ::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_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.attr = 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_attr(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.attr
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(
   66    119   
        self,
   67    120   
    ) -> ::std::result::Result<crate::operation::xml_attributes::XmlAttributesInput, ::aws_smithy_types::error::operation::BuildError> {
   68         -
        ::std::result::Result::Ok(crate::operation::xml_attributes::XmlAttributesInput {
   69         -
            foo: self.foo,
         121  +
        /* BuilderGenerator.kt:254 */
         122  +
        ::std::result::Result::Ok(
         123  +
            /* BuilderGenerator.kt:477 */
         124  +
            crate::operation::xml_attributes::XmlAttributesInput {
         125  +
                /* BuilderGenerator.kt:481 */ foo: self.foo,
         126  +
                /* BuilderGenerator.kt:481 */
   70    127   
                attr: self.attr,
   71         -
        })
         128  +
                /* BuilderGenerator.kt:477 */
         129  +
            }, /* BuilderGenerator.kt:254 */
         130  +
        )
         131  +
        /* BuilderGenerator.kt:253 */
   72    132   
    }
         133  +
    /* BuilderGenerator.kt:355 */
   73    134   
}

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

@@ -1,1 +71,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct XmlAttributesOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlAttributesOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub attr: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlAttributesOutput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn attr(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.attr.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl XmlAttributesOutput {
   22         -
    /// Creates a new builder-style object to manufacture [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::xml_attributes::builders::XmlAttributesOutputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::xml_attributes::builders::XmlAttributesOutputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
          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 XmlAttributesOutputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) attr: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl XmlAttributesOutputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.foo = ::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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.foo = 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_foo(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.foo
          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 attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.attr = ::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_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.attr = 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_attr(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.attr
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::operation::xml_attributes::XmlAttributesOutput {
         119  +
        /* BuilderGenerator.kt:477 */
   66    120   
        crate::operation::xml_attributes::XmlAttributesOutput {
   67         -
            foo: self.foo,
         121  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         122  +
            /* BuilderGenerator.kt:481 */
   68    123   
            attr: self.attr,
         124  +
            /* BuilderGenerator.kt:477 */
   69    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
   70    127   
    }
         128  +
    /* BuilderGenerator.kt:355 */
   71    129   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes/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::xml_attributes::_xml_attributes_output::XmlAttributesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_attributes::_xml_attributes_input::XmlAttributesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_attributes::builders::XmlAttributesInputBuilder {
    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::xml_attributes::XmlAttributesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_attributes::XmlAttributesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_attributes();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlAttributes`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlAttributes`.
   24     27   
///
   25         -
/// This example serializes an XML attributes on synthesized document.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example serializes an XML attributes on synthesized document.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct XmlAttributesFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::xml_attributes::builders::XmlAttributesInputBuilder,
   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::xml_attributes::XmlAttributesOutput,
   35     41   
        crate::operation::xml_attributes::XmlAttributesError,
   36     42   
    > for XmlAttributesFluentBuilder
   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::xml_attributes::XmlAttributesOutput,
   44     50   
            crate::operation::xml_attributes::XmlAttributesError,
   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 XmlAttributesFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `XmlAttributesFluentBuilder`.
   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 XmlAttributes as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::xml_attributes::builders::XmlAttributesInputBuilder {
   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::xml_attributes::XmlAttributesOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::xml_attributes::XmlAttributesError,
   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::xml_attributes::XmlAttributes::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::xml_attributes::XmlAttributes::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::xml_attributes::XmlAttributesOutput,
   97    107   
        crate::operation::xml_attributes::XmlAttributesError,
   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 foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.foo(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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_foo(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_foo(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_foo()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.attr(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_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_attr(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_attr(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_attr()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes_on_payload.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 `XmlAttributesOnPayload`.
           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 XmlAttributesOnPayload;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlAttributesOnPayload {
    7         -
    /// Creates a new `XmlAttributesOnPayload`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlAttributesOnPayload`
          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::xml_attributes_on_payload::XmlAttributesOnPayloadInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   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 XmlAttributesOnPayload {
   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("XmlAttributesOnPayload");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            XmlAttributesOnPayloadRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            XmlAttributesOnPayloadResponseDeserializer,
  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   
            "XmlAttributesOnPayload",
  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("XmlAttributesOnPayload")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(XmlAttributesOnPayloadEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
  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 XmlAttributesOnPayloadResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesOnPayloadResponseDeserializer {
  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_xml_attributes_on_payload::de_xml_attributes_on_payload_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_xml_attributes_on_payload::de_xml_attributes_on_payload_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 XmlAttributesOnPayloadRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlAttributesOnPayloadRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/XmlAttributesOnPayload").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_attributes_on_payload_input::ser_payload_http_payload(
  196    209   
            &input.payload,
  197    210   
        )?);
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct XmlAttributesOnPayloadEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlAttributesOnPayloadEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "XmlAttributesOnPayloadEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<XmlAttributesOnPayloadInput>()
  226    240   
            .ok_or("failed to downcast to XmlAttributesOnPayloadInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod xml_attributes_on_payload_test {
  243    260   
  244    261   
    /// Serializes XML attributes on the synthesized document
  245    262   
    /// Test ID: XmlAttributesOnPayload
  246    263   
    #[::tokio::test]
  247    264   
    #[::tracing_test::traced_test]
  248    265   
    async fn xml_attributes_on_payload_request() {
  249    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  251    268   
@@ -296,313 +425,501 @@
  316    333   
                )))
  317    334   
            });
  318    335   
            de.deserialize_nonstreaming(&http_response)
  319    336   
        });
  320    337   
        let parsed = parsed
  321    338   
            .expect("should be successful response")
  322    339   
            .downcast::<crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput>()
  323    340   
            .unwrap();
  324    341   
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  325    342   
    }
         343  +
         344  +
    /* ProtocolTestGenerator.kt:98 */
  326    345   
}
  327    346   
         347  +
/* OperationErrorGenerator.kt:79 */
  328    348   
/// Error type for the `XmlAttributesOnPayloadError` operation.
         349  +
/* RustType.kt:516 */
  329    350   
#[non_exhaustive]
         351  +
/* RustType.kt:516 */
  330    352   
#[derive(::std::fmt::Debug)]
  331         -
pub enum XmlAttributesOnPayloadError {
         353  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlAttributesOnPayloadError {
         354  +
    /* OperationErrorGenerator.kt:88 */
  332    355   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  333    356   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  334    357   
    variable wildcard pattern and check `.code()`:
  335    358   
     \
  336    359   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  337    360   
     \
  338    361   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlAttributesOnPayloadError) for what information is available for the error.")]
  339    362   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         363  +
    /* OperationErrorGenerator.kt:81 */
  340    364   
}
         365  +
/* OperationErrorGenerator.kt:218 */
  341    366   
impl XmlAttributesOnPayloadError {
         367  +
    /* OperationErrorGenerator.kt:219 */
  342    368   
    /// Creates the `XmlAttributesOnPayloadError::Unhandled` variant from any error type.
  343    369   
    pub fn unhandled(
  344    370   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  345    371   
    ) -> Self {
  346    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  347    373   
            source: err.into(),
  348    374   
            meta: ::std::default::Default::default(),
  349    375   
        })
  350    376   
    }
  351    377   
  352    378   
    /// Creates the `XmlAttributesOnPayloadError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  353    379   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  354    380   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    381   
            source: err.clone().into(),
  356    382   
            meta: err,
  357    383   
        })
  358    384   
    }
  359         -
    ///
         385  +
    /// /* OperationErrorGenerator.kt:236 */
  360    386   
    /// Returns error metadata, which includes the error code, message,
  361    387   
    /// request ID, and potentially additional information.
  362    388   
    ///
         389  +
    /* OperationErrorGenerator.kt:242 */
  363    390   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         391  +
        /* OperationErrorGenerator.kt:243 */
  364    392   
        match self {
  365         -
            Self::Unhandled(e) => &e.meta,
         393  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         394  +
            /* OperationErrorGenerator.kt:243 */
  366    395   
        }
         396  +
        /* OperationErrorGenerator.kt:242 */
  367    397   
    }
         398  +
    /* OperationErrorGenerator.kt:218 */
  368    399   
}
         400  +
/* OperationErrorGenerator.kt:269 */
  369    401   
impl ::std::error::Error for XmlAttributesOnPayloadError {
         402  +
    /* OperationErrorGenerator.kt:270 */
  370    403   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         404  +
        /* OperationErrorGenerator.kt:318 */
  371    405   
        match self {
  372         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         406  +
            /* OperationErrorGenerator.kt:326 */
         407  +
            Self::Unhandled(_inner) => {
         408  +
                /* OperationErrorGenerator.kt:279 */
         409  +
                ::std::option::Option::Some(&*_inner.source)
         410  +
                /* OperationErrorGenerator.kt:326 */
         411  +
            } /* OperationErrorGenerator.kt:318 */
  373    412   
        }
         413  +
        /* OperationErrorGenerator.kt:270 */
  374    414   
    }
         415  +
    /* OperationErrorGenerator.kt:269 */
  375    416   
}
         417  +
/* OperationErrorGenerator.kt:133 */
  376    418   
impl ::std::fmt::Display for XmlAttributesOnPayloadError {
         419  +
    /* OperationErrorGenerator.kt:134 */
  377    420   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         421  +
        /* OperationErrorGenerator.kt:318 */
  378    422   
        match self {
         423  +
            /* OperationErrorGenerator.kt:326 */
  379    424   
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:139 */
  380    426   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  381    427   
                    write!(f, "unhandled error ({code})")
  382    428   
                } else {
  383    429   
                    f.write_str("unhandled error")
  384    430   
                }
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  385    433   
        }
         434  +
        /* OperationErrorGenerator.kt:134 */
  386    435   
    }
  387         -
    }
         436  +
    /* OperationErrorGenerator.kt:133 */
  388    437   
}
         438  +
/* OperationErrorGenerator.kt:182 */
  389    439   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlAttributesOnPayloadError {
         440  +
    /* OperationErrorGenerator.kt:186 */
  390    441   
    fn code(&self) -> ::std::option::Option<&str> {
         442  +
        /* OperationErrorGenerator.kt:187 */
  391    443   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         444  +
        /* OperationErrorGenerator.kt:186 */
  392    445   
    }
         446  +
    /* OperationErrorGenerator.kt:190 */
  393    447   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         448  +
        /* OperationErrorGenerator.kt:197 */
  394    449   
        ::std::option::Option::None
         450  +
        /* OperationErrorGenerator.kt:190 */
  395    451   
    }
         452  +
    /* OperationErrorGenerator.kt:182 */
  396    453   
}
         454  +
/* OperationErrorGenerator.kt:163 */
  397    455   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlAttributesOnPayloadError {
         456  +
    /* OperationErrorGenerator.kt:164 */
  398    457   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         458  +
        /* OperationErrorGenerator.kt:318 */
  399    459   
        match self {
  400         -
            Self::Unhandled(_inner) => &_inner.meta,
         460  +
            /* OperationErrorGenerator.kt:326 */
         461  +
            Self::Unhandled(_inner) => {
         462  +
                /* OperationErrorGenerator.kt:168 */
         463  +
                &_inner.meta
         464  +
                /* OperationErrorGenerator.kt:326 */
         465  +
            } /* OperationErrorGenerator.kt:318 */
  401    466   
        }
         467  +
        /* OperationErrorGenerator.kt:164 */
  402    468   
    }
         469  +
    /* OperationErrorGenerator.kt:163 */
  403    470   
}
         471  +
/* OperationErrorGenerator.kt:109 */
  404    472   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlAttributesOnPayloadError {
         473  +
    /* OperationErrorGenerator.kt:110 */
  405    474   
    fn create_unhandled_error(
  406    475   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  407    476   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  408    477   
    ) -> Self {
         478  +
        /* OperationErrorGenerator.kt:121 */
  409    479   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  410    480   
            source,
  411    481   
            meta: meta.unwrap_or_default(),
  412    482   
        })
         483  +
        /* OperationErrorGenerator.kt:110 */
  413    484   
    }
         485  +
    /* OperationErrorGenerator.kt:109 */
  414    486   
}
  415    487   
         488  +
/* CodegenDelegator.kt:255 */
  416    489   
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_output::XmlAttributesOnPayloadOutput;
  417    490   
         491  +
/* CodegenDelegator.kt:255 */
  418    492   
pub use crate::operation::xml_attributes_on_payload::_xml_attributes_on_payload_input::XmlAttributesOnPayloadInput;
  419    493   
         494  +
/* RustModule.kt:172 */
  420    495   
mod _xml_attributes_on_payload_input;
  421    496   
         497  +
/* RustModule.kt:172 */
  422    498   
mod _xml_attributes_on_payload_output;
  423    499   
  424         -
/// Builders
         500  +
/// /* CodegenDelegator.kt:51 */Builders
  425    501   
pub mod builders;

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

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