Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +124,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::xml_namespaces::_xml_namespaces_output::XmlNamespacesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_namespaces::_xml_namespaces_input::XmlNamespacesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
    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_namespaces::XmlNamespacesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_namespaces::XmlNamespacesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_namespaces();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlNamespaces`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlNamespaces`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct XmlNamespacesFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder,
   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::xml_namespaces::XmlNamespacesOutput,
   34     40   
        crate::operation::xml_namespaces::XmlNamespacesError,
   35     41   
    > for XmlNamespacesFluentBuilder
   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::xml_namespaces::XmlNamespacesOutput,
   43     49   
            crate::operation::xml_namespaces::XmlNamespacesError,
   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 XmlNamespacesFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `XmlNamespacesFluentBuilder`.
   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 XmlNamespaces as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
   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::xml_namespaces::XmlNamespacesOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::xml_namespaces::XmlNamespacesError,
   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::xml_namespaces::XmlNamespaces::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::xml_namespaces::XmlNamespaces::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::xml_namespaces::XmlNamespacesOutput,
   96    106   
        crate::operation::xml_namespaces::XmlNamespacesError,
   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 nested(mut self, input: crate::types::XmlNamespaceNested) -> Self {
  112    125   
        self.inner = self.inner.nested(input);
  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_nested(mut self, input: ::std::option::Option<crate::types::XmlNamespaceNested>) -> Self {
  117    132   
        self.inner = self.inner.set_nested(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_nested(&self) -> &::std::option::Option<crate::types::XmlNamespaceNested> {
  122    139   
        self.inner.get_nested()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_timestamps.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 `XmlTimestamps`.
           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 XmlTimestamps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlTimestamps {
    7         -
    /// Creates a new `XmlTimestamps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlTimestamps`
          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_timestamps::XmlTimestampsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_timestamps::XmlTimestampsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_timestamps::XmlTimestampsError,
   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 XmlTimestamps {
   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("XmlTimestamps");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlTimestampsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlTimestampsResponseDeserializer,
   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   
            "XmlTimestamps",
  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("XmlTimestamps")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlTimestampsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_timestamps::XmlTimestampsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_timestamps::XmlTimestampsError,
  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 XmlTimestampsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlTimestampsResponseDeserializer {
  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_timestamps::de_xml_timestamps_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_timestamps::de_xml_timestamps_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 XmlTimestampsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlTimestampsRequestSerializer {
  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_timestamps::XmlTimestampsInput>()
  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_timestamps::XmlTimestampsInput,
  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, "/XmlTimestamps").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_timestamps::XmlTimestampsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_timestamps::ser_xml_timestamps_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 XmlTimestampsEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlTimestampsEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "XmlTimestampsEndpointParamsInterceptor"
  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::<XmlTimestampsInput>()
  218    232   
            .ok_or("failed to downcast to XmlTimestampsInput")?;
  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_timestamps_test {
  235    252   
  236    253   
    /// Tests how normal timestamps are serialized
  237    254   
    /// Test ID: XmlTimestamps
  238    255   
    #[::tokio::test]
  239    256   
    #[::tracing_test::traced_test]
  240    257   
    async fn xml_timestamps_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   
@@ -898,915 +1027,1103 @@
  918    935   
            expected_output.epoch_seconds_on_target,
  919    936   
            "Unexpected value for `epoch_seconds_on_target`"
  920    937   
        );
  921    938   
        ::pretty_assertions::assert_eq!(parsed.http_date, expected_output.http_date, "Unexpected value for `http_date`");
  922    939   
        ::pretty_assertions::assert_eq!(
  923    940   
            parsed.http_date_on_target,
  924    941   
            expected_output.http_date_on_target,
  925    942   
            "Unexpected value for `http_date_on_target`"
  926    943   
        );
  927    944   
    }
         945  +
         946  +
    /* ProtocolTestGenerator.kt:98 */
  928    947   
}
  929    948   
         949  +
/* OperationErrorGenerator.kt:79 */
  930    950   
/// Error type for the `XmlTimestampsError` operation.
         951  +
/* RustType.kt:516 */
  931    952   
#[non_exhaustive]
         953  +
/* RustType.kt:516 */
  932    954   
#[derive(::std::fmt::Debug)]
  933         -
pub enum XmlTimestampsError {
         955  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlTimestampsError {
         956  +
    /* OperationErrorGenerator.kt:88 */
  934    957   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  935    958   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  936    959   
    variable wildcard pattern and check `.code()`:
  937    960   
     \
  938    961   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  939    962   
     \
  940    963   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlTimestampsError) for what information is available for the error.")]
  941    964   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         965  +
    /* OperationErrorGenerator.kt:81 */
  942    966   
}
         967  +
/* OperationErrorGenerator.kt:218 */
  943    968   
impl XmlTimestampsError {
         969  +
    /* OperationErrorGenerator.kt:219 */
  944    970   
    /// Creates the `XmlTimestampsError::Unhandled` variant from any error type.
  945    971   
    pub fn unhandled(
  946    972   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  947    973   
    ) -> Self {
  948    974   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  949    975   
            source: err.into(),
  950    976   
            meta: ::std::default::Default::default(),
  951    977   
        })
  952    978   
    }
  953    979   
  954    980   
    /// Creates the `XmlTimestampsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  955    981   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  956    982   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  957    983   
            source: err.clone().into(),
  958    984   
            meta: err,
  959    985   
        })
  960    986   
    }
  961         -
    ///
         987  +
    /// /* OperationErrorGenerator.kt:236 */
  962    988   
    /// Returns error metadata, which includes the error code, message,
  963    989   
    /// request ID, and potentially additional information.
  964    990   
    ///
         991  +
    /* OperationErrorGenerator.kt:242 */
  965    992   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         993  +
        /* OperationErrorGenerator.kt:243 */
  966    994   
        match self {
  967         -
            Self::Unhandled(e) => &e.meta,
         995  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         996  +
            /* OperationErrorGenerator.kt:243 */
  968    997   
        }
         998  +
        /* OperationErrorGenerator.kt:242 */
  969    999   
    }
        1000  +
    /* OperationErrorGenerator.kt:218 */
  970   1001   
}
        1002  +
/* OperationErrorGenerator.kt:269 */
  971   1003   
impl ::std::error::Error for XmlTimestampsError {
        1004  +
    /* OperationErrorGenerator.kt:270 */
  972   1005   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1006  +
        /* OperationErrorGenerator.kt:318 */
  973   1007   
        match self {
  974         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
        1008  +
            /* OperationErrorGenerator.kt:326 */
        1009  +
            Self::Unhandled(_inner) => {
        1010  +
                /* OperationErrorGenerator.kt:279 */
        1011  +
                ::std::option::Option::Some(&*_inner.source)
        1012  +
                /* OperationErrorGenerator.kt:326 */
        1013  +
            } /* OperationErrorGenerator.kt:318 */
  975   1014   
        }
        1015  +
        /* OperationErrorGenerator.kt:270 */
  976   1016   
    }
        1017  +
    /* OperationErrorGenerator.kt:269 */
  977   1018   
}
        1019  +
/* OperationErrorGenerator.kt:133 */
  978   1020   
impl ::std::fmt::Display for XmlTimestampsError {
        1021  +
    /* OperationErrorGenerator.kt:134 */
  979   1022   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1023  +
        /* OperationErrorGenerator.kt:318 */
  980   1024   
        match self {
        1025  +
            /* OperationErrorGenerator.kt:326 */
  981   1026   
            Self::Unhandled(_inner) => {
        1027  +
                /* OperationErrorGenerator.kt:139 */
  982   1028   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  983   1029   
                    write!(f, "unhandled error ({code})")
  984   1030   
                } else {
  985   1031   
                    f.write_str("unhandled error")
  986   1032   
                }
  987         -
            }
        1033  +
                /* OperationErrorGenerator.kt:326 */
        1034  +
            } /* OperationErrorGenerator.kt:318 */
  988   1035   
        }
        1036  +
        /* OperationErrorGenerator.kt:134 */
  989   1037   
    }
        1038  +
    /* OperationErrorGenerator.kt:133 */
  990   1039   
}
        1040  +
/* OperationErrorGenerator.kt:182 */
  991   1041   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlTimestampsError {
        1042  +
    /* OperationErrorGenerator.kt:186 */
  992   1043   
    fn code(&self) -> ::std::option::Option<&str> {
        1044  +
        /* OperationErrorGenerator.kt:187 */
  993   1045   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
        1046  +
        /* OperationErrorGenerator.kt:186 */
  994   1047   
    }
        1048  +
    /* OperationErrorGenerator.kt:190 */
  995   1049   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
        1050  +
        /* OperationErrorGenerator.kt:197 */
  996   1051   
        ::std::option::Option::None
        1052  +
        /* OperationErrorGenerator.kt:190 */
  997   1053   
    }
        1054  +
    /* OperationErrorGenerator.kt:182 */
  998   1055   
}
        1056  +
/* OperationErrorGenerator.kt:163 */
  999   1057   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlTimestampsError {
        1058  +
    /* OperationErrorGenerator.kt:164 */
 1000   1059   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        1060  +
        /* OperationErrorGenerator.kt:318 */
 1001   1061   
        match self {
 1002         -
            Self::Unhandled(_inner) => &_inner.meta,
        1062  +
            /* OperationErrorGenerator.kt:326 */
        1063  +
            Self::Unhandled(_inner) => {
        1064  +
                /* OperationErrorGenerator.kt:168 */
        1065  +
                &_inner.meta
        1066  +
                /* OperationErrorGenerator.kt:326 */
        1067  +
            } /* OperationErrorGenerator.kt:318 */
 1003   1068   
        }
        1069  +
        /* OperationErrorGenerator.kt:164 */
 1004   1070   
    }
        1071  +
    /* OperationErrorGenerator.kt:163 */
 1005   1072   
}
        1073  +
/* OperationErrorGenerator.kt:109 */
 1006   1074   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlTimestampsError {
        1075  +
    /* OperationErrorGenerator.kt:110 */
 1007   1076   
    fn create_unhandled_error(
 1008   1077   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
 1009   1078   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
 1010   1079   
    ) -> Self {
        1080  +
        /* OperationErrorGenerator.kt:121 */
 1011   1081   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
 1012   1082   
            source,
 1013   1083   
            meta: meta.unwrap_or_default(),
 1014   1084   
        })
        1085  +
        /* OperationErrorGenerator.kt:110 */
 1015   1086   
    }
        1087  +
    /* OperationErrorGenerator.kt:109 */
 1016   1088   
}
 1017   1089   
        1090  +
/* CodegenDelegator.kt:255 */
 1018   1091   
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutput;
 1019   1092   
        1093  +
/* CodegenDelegator.kt:255 */
 1020   1094   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInput;
 1021   1095   
        1096  +
/* RustModule.kt:172 */
 1022   1097   
mod _xml_timestamps_input;
 1023   1098   
        1099  +
/* RustModule.kt:172 */
 1024   1100   
mod _xml_timestamps_output;
 1025   1101   
 1026         -
/// Builders
        1102  +
/// /* CodegenDelegator.kt:51 */Builders
 1027   1103   
pub mod builders;

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

@@ -1,1 +183,340 @@
    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 XmlTimestampsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlTimestampsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub normal: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub 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 http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl XmlTimestampsInput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn normal(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.normal.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 date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.date_time.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 date_time_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.date_time_on_target.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 epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.epoch_seconds.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 epoch_seconds_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.epoch_seconds_on_target.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 http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.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 http_date_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.http_date_on_target.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl XmlTimestampsInput {
   52         -
    /// Creates a new builder-style object to manufacture [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
         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 XmlTimestampsInputBuilder {
   62         -
    pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl XmlTimestampsInputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.normal = ::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_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.normal = 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_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.normal
         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 date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.date_time = ::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_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.date_time = 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_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.date_time
         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 date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.date_time_on_target = ::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_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.date_time_on_target = 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_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.date_time_on_target
         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 epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.epoch_seconds = ::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_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.epoch_seconds = 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_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.epoch_seconds
         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 epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.epoch_seconds_on_target = ::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_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.epoch_seconds_on_target = 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_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.epoch_seconds_on_target
         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 http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.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_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.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_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.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 http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.http_date_on_target = ::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_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.http_date_on_target = 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_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.http_date_on_target
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(
  171    315   
        self,
  172    316   
    ) -> ::std::result::Result<crate::operation::xml_timestamps::XmlTimestampsInput, ::aws_smithy_types::error::operation::BuildError> {
  173         -
        ::std::result::Result::Ok(crate::operation::xml_timestamps::XmlTimestampsInput {
  174         -
            normal: self.normal,
  175         -
            date_time: self.date_time,
  176         -
            date_time_on_target: self.date_time_on_target,
  177         -
            epoch_seconds: self.epoch_seconds,
  178         -
            epoch_seconds_on_target: self.epoch_seconds_on_target,
  179         -
            http_date: self.http_date,
  180         -
            http_date_on_target: self.http_date_on_target,
  181         -
        })
         317  +
        /* BuilderGenerator.kt:254 */
         318  +
        ::std::result::Result::Ok(
         319  +
            /* BuilderGenerator.kt:477 */
         320  +
            crate::operation::xml_timestamps::XmlTimestampsInput {
         321  +
                /* BuilderGenerator.kt:481 */ normal: self.normal,
         322  +
                /* BuilderGenerator.kt:481 */
         323  +
                date_time: self.date_time,
         324  +
                /* BuilderGenerator.kt:481 */
         325  +
                date_time_on_target: self.date_time_on_target,
         326  +
                /* BuilderGenerator.kt:481 */
         327  +
                epoch_seconds: self.epoch_seconds,
         328  +
                /* BuilderGenerator.kt:481 */
         329  +
                epoch_seconds_on_target: self.epoch_seconds_on_target,
         330  +
                /* BuilderGenerator.kt:481 */
         331  +
                http_date: self.http_date,
         332  +
                /* BuilderGenerator.kt:481 */
         333  +
                http_date_on_target: self.http_date_on_target,
         334  +
                /* BuilderGenerator.kt:477 */
         335  +
            }, /* BuilderGenerator.kt:254 */
         336  +
        )
         337  +
        /* BuilderGenerator.kt:253 */
  182    338   
    }
         339  +
    /* BuilderGenerator.kt:355 */
  183    340   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_timestamps/_xml_timestamps_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 XmlTimestampsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlTimestampsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub normal: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub 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 http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl XmlTimestampsOutput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn normal(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.normal.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 date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.date_time.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 date_time_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.date_time_on_target.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 epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.epoch_seconds.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 epoch_seconds_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.epoch_seconds_on_target.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 http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.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 http_date_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.http_date_on_target.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl XmlTimestampsOutput {
   52         -
    /// Creates a new builder-style object to manufacture [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         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 XmlTimestampsOutputBuilder {
   62         -
    pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl XmlTimestampsOutputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.normal = ::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_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.normal = 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_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.normal
         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 date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.date_time = ::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_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.date_time = 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_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.date_time
         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 date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.date_time_on_target = ::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_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.date_time_on_target = 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_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.date_time_on_target
         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 epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.epoch_seconds = ::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_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.epoch_seconds = 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_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.epoch_seconds
         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 epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.epoch_seconds_on_target = ::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_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.epoch_seconds_on_target = 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_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.epoch_seconds_on_target
         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 http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.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_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.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_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.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 http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.http_date_on_target = ::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_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.http_date_on_target = 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_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.http_date_on_target
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(self) -> crate::operation::xml_timestamps::XmlTimestampsOutput {
         315  +
        /* BuilderGenerator.kt:477 */
  171    316   
        crate::operation::xml_timestamps::XmlTimestampsOutput {
  172         -
            normal: self.normal,
         317  +
            /* BuilderGenerator.kt:481 */ normal: self.normal,
         318  +
            /* BuilderGenerator.kt:481 */
  173    319   
            date_time: self.date_time,
         320  +
            /* BuilderGenerator.kt:481 */
  174    321   
            date_time_on_target: self.date_time_on_target,
         322  +
            /* BuilderGenerator.kt:481 */
  175    323   
            epoch_seconds: self.epoch_seconds,
         324  +
            /* BuilderGenerator.kt:481 */
  176    325   
            epoch_seconds_on_target: self.epoch_seconds_on_target,
         326  +
            /* BuilderGenerator.kt:481 */
  177    327   
            http_date: self.http_date,
         328  +
            /* BuilderGenerator.kt:481 */
  178    329   
            http_date_on_target: self.http_date_on_target,
         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/xml_timestamps/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::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
    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_timestamps::XmlTimestampsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_timestamps::XmlTimestampsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_timestamps();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlTimestamps`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlTimestamps`.
   24     27   
///
   25         -
/// This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct XmlTimestampsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder,
   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_timestamps::XmlTimestampsOutput,
   35     41   
        crate::operation::xml_timestamps::XmlTimestampsError,
   36     42   
    > for XmlTimestampsFluentBuilder
   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_timestamps::XmlTimestampsOutput,
   44     50   
            crate::operation::xml_timestamps::XmlTimestampsError,
   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 XmlTimestampsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `XmlTimestampsFluentBuilder`.
   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 XmlTimestamps as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
   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_timestamps::XmlTimestampsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::xml_timestamps::XmlTimestampsError,
   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_timestamps::XmlTimestamps::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_timestamps::XmlTimestamps::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_timestamps::XmlTimestampsOutput,
   97    107   
        crate::operation::xml_timestamps::XmlTimestampsError,
   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 normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  113    126   
        self.inner = self.inner.normal(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_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  118    133   
        self.inner = self.inner.set_normal(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_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  123    140   
        self.inner.get_normal()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  127    146   
        self.inner = self.inner.date_time(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_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  132    153   
        self.inner = self.inner.set_date_time(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_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  137    160   
        self.inner.get_date_time()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:498 */
  139    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* FluentBuilderGenerator.kt:500 */
  140    165   
    pub fn date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  141    166   
        self.inner = self.inner.date_time_on_target(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_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  146    173   
        self.inner = self.inner.set_date_time_on_target(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_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  151    180   
        self.inner.get_date_time_on_target()
  152    181   
    }
         182  +
    /* FluentBuilderGenerator.kt:498 */
  153    183   
    #[allow(missing_docs)] // documentation missing in model
         184  +
                           /* FluentBuilderGenerator.kt:500 */
  154    185   
    pub fn epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  155    186   
        self.inner = self.inner.epoch_seconds(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_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  160    193   
        self.inner = self.inner.set_epoch_seconds(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_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  165    200   
        self.inner.get_epoch_seconds()
  166    201   
    }
         202  +
    /* FluentBuilderGenerator.kt:498 */
  167    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* FluentBuilderGenerator.kt:500 */
  168    205   
    pub fn epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  169    206   
        self.inner = self.inner.epoch_seconds_on_target(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_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  174    213   
        self.inner = self.inner.set_epoch_seconds_on_target(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_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  179    220   
        self.inner.get_epoch_seconds_on_target()
  180    221   
    }
         222  +
    /* FluentBuilderGenerator.kt:498 */
  181    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* FluentBuilderGenerator.kt:500 */
  182    225   
    pub fn http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  183    226   
        self.inner = self.inner.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_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  188    233   
        self.inner = self.inner.set_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_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  193    240   
        self.inner.get_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 http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  197    246   
        self.inner = self.inner.http_date_on_target(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_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  202    253   
        self.inner = self.inner.set_http_date_on_target(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_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  207    260   
        self.inner.get_http_date_on_target()
  208    261   
    }
         262  +
    /* FluentBuilderGenerator.kt:282 */
  209    263   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_unions.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 `XmlUnions`.
           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 XmlUnions;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlUnions {
    7         -
    /// Creates a new `XmlUnions`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlUnions`
          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_unions::XmlUnionsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_unions::XmlUnionsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_unions::XmlUnionsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +261,278 @@
   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 XmlUnions {
   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("XmlUnions");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlUnionsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlUnionsResponseDeserializer,
   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   
            "XmlUnions",
  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("XmlUnions")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlUnionsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_unions::XmlUnionsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_unions::XmlUnionsError,
  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 XmlUnionsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlUnionsResponseDeserializer {
  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_unions::de_xml_unions_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_unions::de_xml_unions_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 XmlUnionsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlUnionsRequestSerializer {
  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.downcast::<crate::operation::xml_unions::XmlUnionsInput>().expect("correct type");
  161    174   
        let _header_serialization_settings = _cfg
  162    175   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  163    176   
            .cloned()
  164    177   
            .unwrap_or_default();
  165    178   
        let mut request_builder = {
  166    179   
            fn uri_base(
  167    180   
                _input: &crate::operation::xml_unions::XmlUnionsInput,
  168    181   
                output: &mut ::std::string::String,
  169    182   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  170    183   
                use ::std::fmt::Write as _;
  171    184   
                ::std::write!(output, "/XmlUnions").expect("formatting should succeed");
  172    185   
                ::std::result::Result::Ok(())
  173    186   
            }
  174    187   
            #[allow(clippy::unnecessary_wraps)]
  175    188   
            fn update_http_builder(
  176    189   
                input: &crate::operation::xml_unions::XmlUnionsInput,
  177    190   
                builder: ::http::request::Builder,
  178    191   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  179    192   
                let mut uri = ::std::string::String::new();
  180    193   
                uri_base(input, &mut uri)?;
  181    194   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  182    195   
            }
  183    196   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  184    197   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  185    198   
            builder
  186    199   
        };
  187    200   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_unions::ser_xml_unions_op_input(&input)?);
  188    201   
        if let Some(content_length) = body.content_length() {
  189    202   
            let content_length = content_length.to_string();
  190    203   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  191    204   
        }
  192    205   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  193    206   
    }
  194    207   
}
         208  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  195    209   
#[derive(Debug)]
  196    210   
struct XmlUnionsEndpointParamsInterceptor;
  197    211   
  198    212   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlUnionsEndpointParamsInterceptor {
  199    213   
    fn name(&self) -> &'static str {
  200    214   
        "XmlUnionsEndpointParamsInterceptor"
  201    215   
    }
  202    216   
  203    217   
    fn read_before_execution(
  204    218   
        &self,
  205    219   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  206    220   
            '_,
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  210    224   
        >,
  211    225   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  212    226   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  213    227   
        let _input = context
  214    228   
            .input()
  215    229   
            .downcast_ref::<XmlUnionsInput>()
  216    230   
            .ok_or("failed to downcast to XmlUnionsInput")?;
  217    231   
  218    232   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  220    234   
        })?;
  221    235   
        cfg.interceptor_state()
  222    236   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  223    237   
        ::std::result::Result::Ok(())
  224    238   
    }
  225    239   
}
  226    240   
  227    241   
// The get_* functions below are generated from JMESPath expressions in the
  228    242   
// operationContextParams trait. They target the operation's input shape.
  229    243   
         244  +
/* RustType.kt:516 */
  230    245   
#[allow(unreachable_code, unused_variables)]
         246  +
/* RustType.kt:516 */
  231    247   
#[cfg(test)]
         248  +
/* ProtocolTestGenerator.kt:98 */
  232    249   
mod xml_unions_test {
  233    250   
  234    251   
    /// Serializes union struct member
  235    252   
    /// Test ID: XmlUnionsWithStructMember
  236    253   
    #[::tokio::test]
  237    254   
    #[::tracing_test::traced_test]
  238    255   
    async fn xml_unions_with_struct_member_request() {
  239    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  240    257   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  241    258   
@@ -513,530 +642,718 @@
  533    550   
                )))
  534    551   
            });
  535    552   
            de.deserialize_nonstreaming(&http_response)
  536    553   
        });
  537    554   
        let parsed = parsed
  538    555   
            .expect("should be successful response")
  539    556   
            .downcast::<crate::operation::xml_unions::XmlUnionsOutput>()
  540    557   
            .unwrap();
  541    558   
        ::pretty_assertions::assert_eq!(parsed.union_value, expected_output.union_value, "Unexpected value for `union_value`");
  542    559   
    }
         560  +
         561  +
    /* ProtocolTestGenerator.kt:98 */
  543    562   
}
  544    563   
         564  +
/* OperationErrorGenerator.kt:79 */
  545    565   
/// Error type for the `XmlUnionsError` operation.
         566  +
/* RustType.kt:516 */
  546    567   
#[non_exhaustive]
         568  +
/* RustType.kt:516 */
  547    569   
#[derive(::std::fmt::Debug)]
  548         -
pub enum XmlUnionsError {
         570  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlUnionsError {
         571  +
    /* OperationErrorGenerator.kt:88 */
  549    572   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  550    573   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  551    574   
    variable wildcard pattern and check `.code()`:
  552    575   
     \
  553    576   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  554    577   
     \
  555    578   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlUnionsError) for what information is available for the error.")]
  556    579   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         580  +
    /* OperationErrorGenerator.kt:81 */
  557    581   
}
         582  +
/* OperationErrorGenerator.kt:218 */
  558    583   
impl XmlUnionsError {
         584  +
    /* OperationErrorGenerator.kt:219 */
  559    585   
    /// Creates the `XmlUnionsError::Unhandled` variant from any error type.
  560    586   
    pub fn unhandled(
  561    587   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  562    588   
    ) -> Self {
  563    589   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  564    590   
            source: err.into(),
  565    591   
            meta: ::std::default::Default::default(),
  566    592   
        })
  567    593   
    }
  568    594   
  569    595   
    /// Creates the `XmlUnionsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  570    596   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  571    597   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  572    598   
            source: err.clone().into(),
  573    599   
            meta: err,
  574    600   
        })
  575    601   
    }
  576         -
    ///
         602  +
    /// /* OperationErrorGenerator.kt:236 */
  577    603   
    /// Returns error metadata, which includes the error code, message,
  578    604   
    /// request ID, and potentially additional information.
  579    605   
    ///
         606  +
    /* OperationErrorGenerator.kt:242 */
  580    607   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         608  +
        /* OperationErrorGenerator.kt:243 */
  581    609   
        match self {
  582         -
            Self::Unhandled(e) => &e.meta,
         610  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         611  +
            /* OperationErrorGenerator.kt:243 */
  583    612   
        }
         613  +
        /* OperationErrorGenerator.kt:242 */
  584    614   
    }
         615  +
    /* OperationErrorGenerator.kt:218 */
  585    616   
}
         617  +
/* OperationErrorGenerator.kt:269 */
  586    618   
impl ::std::error::Error for XmlUnionsError {
         619  +
    /* OperationErrorGenerator.kt:270 */
  587    620   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         621  +
        /* OperationErrorGenerator.kt:318 */
  588    622   
        match self {
  589         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         623  +
            /* OperationErrorGenerator.kt:326 */
         624  +
            Self::Unhandled(_inner) => {
         625  +
                /* OperationErrorGenerator.kt:279 */
         626  +
                ::std::option::Option::Some(&*_inner.source)
         627  +
                /* OperationErrorGenerator.kt:326 */
         628  +
            } /* OperationErrorGenerator.kt:318 */
  590    629   
        }
         630  +
        /* OperationErrorGenerator.kt:270 */
  591    631   
    }
         632  +
    /* OperationErrorGenerator.kt:269 */
  592    633   
}
         634  +
/* OperationErrorGenerator.kt:133 */
  593    635   
impl ::std::fmt::Display for XmlUnionsError {
         636  +
    /* OperationErrorGenerator.kt:134 */
  594    637   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         638  +
        /* OperationErrorGenerator.kt:318 */
  595    639   
        match self {
         640  +
            /* OperationErrorGenerator.kt:326 */
  596    641   
            Self::Unhandled(_inner) => {
         642  +
                /* OperationErrorGenerator.kt:139 */
  597    643   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  598    644   
                    write!(f, "unhandled error ({code})")
  599    645   
                } else {
  600    646   
                    f.write_str("unhandled error")
  601    647   
                }
  602         -
            }
         648  +
                /* OperationErrorGenerator.kt:326 */
         649  +
            } /* OperationErrorGenerator.kt:318 */
  603    650   
        }
         651  +
        /* OperationErrorGenerator.kt:134 */
  604    652   
    }
         653  +
    /* OperationErrorGenerator.kt:133 */
  605    654   
}
         655  +
/* OperationErrorGenerator.kt:182 */
  606    656   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlUnionsError {
         657  +
    /* OperationErrorGenerator.kt:186 */
  607    658   
    fn code(&self) -> ::std::option::Option<&str> {
         659  +
        /* OperationErrorGenerator.kt:187 */
  608    660   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         661  +
        /* OperationErrorGenerator.kt:186 */
  609    662   
    }
         663  +
    /* OperationErrorGenerator.kt:190 */
  610    664   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         665  +
        /* OperationErrorGenerator.kt:197 */
  611    666   
        ::std::option::Option::None
         667  +
        /* OperationErrorGenerator.kt:190 */
  612    668   
    }
         669  +
    /* OperationErrorGenerator.kt:182 */
  613    670   
}
         671  +
/* OperationErrorGenerator.kt:163 */
  614    672   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlUnionsError {
         673  +
    /* OperationErrorGenerator.kt:164 */
  615    674   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         675  +
        /* OperationErrorGenerator.kt:318 */
  616    676   
        match self {
  617         -
            Self::Unhandled(_inner) => &_inner.meta,
         677  +
            /* OperationErrorGenerator.kt:326 */
         678  +
            Self::Unhandled(_inner) => {
         679  +
                /* OperationErrorGenerator.kt:168 */
         680  +
                &_inner.meta
         681  +
                /* OperationErrorGenerator.kt:326 */
         682  +
            } /* OperationErrorGenerator.kt:318 */
  618    683   
        }
         684  +
        /* OperationErrorGenerator.kt:164 */
  619    685   
    }
         686  +
    /* OperationErrorGenerator.kt:163 */
  620    687   
}
         688  +
/* OperationErrorGenerator.kt:109 */
  621    689   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlUnionsError {
         690  +
    /* OperationErrorGenerator.kt:110 */
  622    691   
    fn create_unhandled_error(
  623    692   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  624    693   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  625    694   
    ) -> Self {
         695  +
        /* OperationErrorGenerator.kt:121 */
  626    696   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  627    697   
            source,
  628    698   
            meta: meta.unwrap_or_default(),
  629    699   
        })
         700  +
        /* OperationErrorGenerator.kt:110 */
  630    701   
    }
         702  +
    /* OperationErrorGenerator.kt:109 */
  631    703   
}
  632    704   
         705  +
/* CodegenDelegator.kt:255 */
  633    706   
pub use crate::operation::xml_unions::_xml_unions_output::XmlUnionsOutput;
  634    707   
         708  +
/* CodegenDelegator.kt:255 */
  635    709   
pub use crate::operation::xml_unions::_xml_unions_input::XmlUnionsInput;
  636    710   
         711  +
/* RustModule.kt:172 */
  637    712   
mod _xml_unions_input;
  638    713   
         714  +
/* RustModule.kt:172 */
  639    715   
mod _xml_unions_output;
  640    716   
  641         -
/// Builders
         717  +
/// /* CodegenDelegator.kt:51 */Builders
  642    718   
pub mod builders;

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

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

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

@@ -1,1 +49,89 @@
    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 XmlUnionsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlUnionsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub union_value: ::std::option::Option<crate::types::XmlUnionShape>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlUnionsOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn union_value(&self) -> ::std::option::Option<&crate::types::XmlUnionShape> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.union_value.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlUnionsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_unions::builders::XmlUnionsOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_unions::builders::XmlUnionsOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          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 XmlUnionsOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) union_value: ::std::option::Option<crate::types::XmlUnionShape>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlUnionsOutputBuilder {
          51  +
    /* BuilderGenerator.kt:286 */
   29     52   
    #[allow(missing_docs)] // documentation missing in model
          53  +
                           /* BuilderGenerator.kt:291 */
   30     54   
    pub fn union_value(mut self, input: crate::types::XmlUnionShape) -> Self {
          55  +
        /* BuilderGenerator.kt:292 */
   31     56   
        self.union_value = ::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_union_value(mut self, input: ::std::option::Option<crate::types::XmlUnionShape>) -> Self {
          65  +
        /* BuilderGenerator.kt:315 */
   36     66   
        self.union_value = 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_union_value(&self) -> &::std::option::Option<crate::types::XmlUnionShape> {
          74  +
        /* BuilderGenerator.kt:337 */
   41     75   
        &self.union_value
          76  +
        /* BuilderGenerator.kt:336 */
   42     77   
    }
   43         -
    /// Consumes the builder and constructs a [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlUnionsOutput`](crate::operation::xml_unions::XmlUnionsOutput).
          79  +
    /* BuilderGenerator.kt:253 */
   44     80   
    pub fn build(self) -> crate::operation::xml_unions::XmlUnionsOutput {
          81  +
        /* BuilderGenerator.kt:477 */
   45     82   
        crate::operation::xml_unions::XmlUnionsOutput {
   46         -
            union_value: self.union_value,
          83  +
            /* BuilderGenerator.kt:481 */ union_value: self.union_value,
          84  +
            /* BuilderGenerator.kt:477 */
   47     85   
        }
          86  +
        /* BuilderGenerator.kt:253 */
   48     87   
    }
          88  +
    /* BuilderGenerator.kt:355 */
   49     89   
}

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

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

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

@@ -1,1 +9,10 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
    3      4   
pub use ::aws_smithy_types::Blob;
    4         -
pub use ::aws_smithy_types::DateTime;
           5  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;
    5      6   
    6         -
/// Event stream related primitives such as `Message` or `Header`.
           7  +
/// /* ClientRustModule.kt:121 */Event stream related primitives such as `Message` or `Header`.
    7      8   
pub mod event_stream;
    8      9   
    9     10   
pub(crate) mod sealed_enum_unknown;

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

@@ -1,1 +21,29 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
           2  +
/* ClientEnumGenerator.kt:189 */
           3  +
/// /* ClientEnumGenerator.kt:189 */Opaque struct used as inner data for the `Unknown` variant defined in enums in
    4      4   
/// the crate.
    5      5   
///
    6      6   
/// This is not intended to be used directly.
           7  +
/* RustType.kt:516 */
    7      8   
#[non_exhaustive]
           9  +
/* RustType.kt:516 */
    8     10   
#[derive(
    9     11   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   10     12   
)]
   11         -
pub struct UnknownVariantValue(pub(crate) ::std::string::String);
          13  +
pub /* ClientEnumGenerator.kt:203 */ struct UnknownVariantValue(pub(crate) ::std::string::String);
          14  +
/* ClientEnumGenerator.kt:204 */
   12     15   
impl UnknownVariantValue {
          16  +
    /* ClientEnumGenerator.kt:206 */
   13     17   
    pub(crate) fn as_str(&self) -> &str {
          18  +
        /* ClientEnumGenerator.kt:207 */
   14     19   
        &self.0
          20  +
        /* ClientEnumGenerator.kt:206 */
   15     21   
    }
          22  +
    /* ClientEnumGenerator.kt:204 */
   16     23   
}
          24  +
/* ClientEnumGenerator.kt:210 */
   17     25   
impl ::std::fmt::Display for UnknownVariantValue {
   18     26   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
   19     27   
        write!(f, "{}", self.0)
   20     28   
    }
   21     29   
}

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

@@ -1,1 +111,117 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResponseDeserializerGenerator.kt:170 */
    2      3   
pub(crate) fn type_erase_result<O, E>(
    3      4   
    result: ::std::result::Result<O, E>,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6      7   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7      8   
>
    8      9   
where
    9     10   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     11   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     12   
{
   12     13   
    result
   13     14   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     15   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     16   
        .map_err(::std::convert::Into::into)
   16     17   
}
   17     18   
          19  +
/* RestXml.kt:61 */
   18     20   
pub fn parse_http_error_metadata(
   19     21   
    _response_status: u16,
   20     22   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   21     23   
    response_body: &[u8],
   22     24   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_xml::decode::XmlDecodeError> {
          25  +
    /* RestXml.kt:65 */
   23     26   
    crate::rest_xml_wrapped_errors::parse_error_metadata(response_body)
          27  +
    /* RestXml.kt:61 */
   24     28   
}
   25     29   
   26     30   
pub(crate) mod shape_all_query_string_types;
   27     31   
   28     32   
pub(crate) mod shape_body_with_xml_name;
   29     33   
   30     34   
pub(crate) mod shape_constant_and_variable_query_string;
   31     35   
   32     36   
pub(crate) mod shape_constant_query_string;
   33     37   
   34     38   
pub(crate) mod shape_content_type_parameters;
   35     39   
   36     40   
pub(crate) mod shape_datetime_offsets;
   37     41   
   38     42   
pub(crate) mod shape_empty_input_and_empty_output;
   39     43   
   40     44   
pub(crate) mod shape_endpoint_operation;
   41     45   
   42     46   
pub(crate) mod shape_endpoint_with_host_label_header_operation;
   43     47   
   44     48   
pub(crate) mod shape_endpoint_with_host_label_operation;
   45     49   
   46     50   
pub(crate) mod shape_flattened_xml_map;
   47     51   
   48     52   
pub(crate) mod shape_flattened_xml_map_with_xml_name;
   49     53   
   50     54   
pub(crate) mod shape_flattened_xml_map_with_xml_namespace;
   51     55   
   52     56   
pub(crate) mod shape_fractional_seconds;
   53     57   
   54     58   
pub(crate) mod shape_greeting_with_errors;
   55     59   
   56     60   
pub(crate) mod shape_http_enum_payload;
   57     61   
   58     62   
pub(crate) mod shape_http_enum_payload_input;
   59     63   
   60     64   
pub(crate) mod shape_http_payload_traits;
   61     65   
   62     66   
pub(crate) mod shape_http_payload_traits_input;
   63     67   
   64     68   
pub(crate) mod shape_http_payload_traits_with_media_type;
   65     69   
   66     70   
pub(crate) mod shape_http_payload_traits_with_media_type_input;
   67     71   
   68     72   
pub(crate) mod shape_http_payload_with_member_xml_name;
   69     73   
          74  +
/* XmlBindingTraitSerializerGenerator.kt:188 */
   70     75   
pub fn rest_xml_unset_struct_payload() -> ::std::vec::Vec<u8> {
   71     76   
    Vec::new()
   72     77   
}
   73     78   
   74     79   
pub(crate) mod shape_http_payload_with_member_xml_name_input;
   75     80   
   76     81   
pub(crate) mod shape_http_payload_with_structure;
   77     82   
   78     83   
pub(crate) mod shape_http_payload_with_structure_input;
   79     84   
   80     85   
pub(crate) mod shape_http_payload_with_union;
   81     86   
          87  +
/* XmlBindingTraitSerializerGenerator.kt:200 */
   82     88   
pub fn rest_xml_unset_union_payload() -> ::std::vec::Vec<u8> {
   83     89   
    ::std::vec::Vec::new()
   84     90   
}
   85     91   
   86     92   
pub(crate) mod shape_http_payload_with_union_input;
   87     93   
   88     94   
pub(crate) mod shape_http_payload_with_xml_name;
   89     95   
   90     96   
pub(crate) mod shape_http_payload_with_xml_name_input;
   91     97   

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

@@ -1,1 +32,47 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_all_query_string_types_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::all_query_string_types::AllQueryStringTypesOutput,
    9     11   
    crate::operation::all_query_string_types::AllQueryStringTypesError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::all_query_string_types::AllQueryStringTypesError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::all_query_string_types::AllQueryStringTypesError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_all_query_string_types_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::all_query_string_types::AllQueryStringTypesOutput,
   25     34   
    crate::operation::all_query_string_types::AllQueryStringTypesError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::all_query_string_types::builders::AllQueryStringTypesOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}

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

@@ -1,1 +76,109 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_body_with_xml_name_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::body_with_xml_name::BodyWithXmlNameOutput, crate::operation::body_with_xml_name::BodyWithXmlNameError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::body_with_xml_name::BodyWithXmlNameError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::body_with_xml_name::BodyWithXmlNameError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_body_with_xml_name_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::body_with_xml_name::BodyWithXmlNameOutput, crate::operation::body_with_xml_name::BodyWithXmlNameError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::body_with_xml_name::builders::BodyWithXmlNameOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_body_with_xml_name::de_body_with_xml_name(_response_body, output)
   25     38   
            .map_err(crate::operation::body_with_xml_name::BodyWithXmlNameError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   30     47   
pub fn ser_body_with_xml_name_op_input(
   31     48   
    input: &crate::operation::body_with_xml_name::BodyWithXmlNameInput,
   32     49   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          50  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   33     51   
    let mut out = String::new();
          52  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   34     53   
    {
          54  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   35     55   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   36     56   
        #[allow(unused_mut)]
   37     57   
        let mut root = writer.start_el("Ahoy");
          58  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   38     59   
        crate::protocol_serde::shape_body_with_xml_name_input::ser_body_with_xml_name_input_input_input(input, root)?
          60  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   39     61   
    }
          62  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   40     63   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          64  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   41     65   
}
   42     66   
          67  +
/* RustType.kt:516 */
   43     68   
#[allow(unused_mut)]
          69  +
/* XmlBindingTraitParserGenerator.kt:189 */
   44     70   
pub fn de_body_with_xml_name(
   45     71   
    inp: &[u8],
   46     72   
    mut builder: crate::operation::body_with_xml_name::builders::BodyWithXmlNameOutputBuilder,
   47     73   
) -> std::result::Result<crate::operation::body_with_xml_name::builders::BodyWithXmlNameOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          74  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   48     75   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   49     76   
   50     77   
    #[allow(unused_mut)]
   51     78   
    let mut decoder = doc.root_element()?;
   52     79   
    #[allow(unused_variables)]
   53     80   
    let start_el = decoder.start_el();
          81  +
    /* RestXmlParserGenerator.kt:36 */
   54     82   
    if !start_el.matches("Ahoy") {
   55     83   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   56     84   
            "encountered invalid XML root: expected Ahoy but got {:?}. This is likely a bug in the SDK.",
   57     85   
            start_el
   58     86   
        )));
   59     87   
    }
          88  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   60     89   
    while let Some(mut tag) = decoder.next_tag() {
          90  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   61     91   
        match tag.start_el() {
   62         -
            s if s.matches("nested") /* nested aws.protocoltests.restxml.synthetic#BodyWithXmlNameOutput$nested */ =>  {
   63         -
                let var_1 =
   64         -
                    Some(
   65         -
                        crate::protocol_serde::shape_payload_with_xml_name::de_payload_with_xml_name(&mut tag)
   66         -
                        ?
   67         -
                    )
   68         -
                ;
   69         -
                builder = builder.set_nested(var_1);
   70         -
            }
          92  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("nested") /* nested aws.protocoltests.restxml.synthetic#BodyWithXmlNameOutput$nested */ =>  {
          93  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          94  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          95  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_payload_with_xml_name::de_payload_with_xml_name(&mut tag)
          96  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          97  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          98  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          99  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_1);
         100  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   71    101   
            ,
   72         -
            _ => {}
   73         -
        }
         102  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
         103  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
         104  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   74    105   
    }
         106  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   75    107   
    Ok(builder)
         108  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   76    109   
}

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

@@ -1,1 +14,24 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_body_with_xml_name_input_input_input(
    3      4   
    input: &crate::operation::body_with_xml_name::BodyWithXmlNameInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.nested {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:399 */
    9     14   
        let inner_writer = scope.start_el("nested");
          15  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   10     16   
        crate::protocol_serde::shape_payload_with_xml_name::ser_payload_with_xml_name(var_1, inner_writer)?
          17  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   11     18   
    }
          19  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   12     20   
    scope.finish();
          21  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   13     22   
    Ok(())
          23  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   14     24   
}

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

@@ -1,1 +24,31 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitParserGenerator.kt:546 */
    2      3   
pub fn de_boolean_list(
    3      4   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    4      5   
) -> ::std::result::Result<::std::vec::Vec<bool>, ::aws_smithy_xml::decode::XmlDecodeError> {
           6  +
    /* XmlBindingTraitParserGenerator.kt:551 */
    5      7   
    let mut out = std::vec::Vec::new();
           8  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    6      9   
    while let Some(mut tag) = decoder.next_tag() {
          10  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    7     11   
        match tag.start_el() {
    8         -
            s if s.matches("member") /* member aws.protocoltests.shared#BooleanList$member */ =>  {
    9         -
                out.push(
   10         -
                     {
   11         -
                        <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
   12         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   13         -
                        )
   14         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `smithy.api#Boolean`)"))
   15         -
                    }
   16         -
                    ?
   17         -
                );
   18         -
            }
          12  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("member") /* member aws.protocoltests.shared#BooleanList$member */ =>  {
          13  +
                /* XmlBindingTraitParserGenerator.kt:554 */out.push(
          14  +
                    /* XmlBindingTraitParserGenerator.kt:676 */ {
          15  +
                        /* XmlBindingTraitParserGenerator.kt:677 */<bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
          16  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          17  +
                        /* XmlBindingTraitParserGenerator.kt:677 */)
          18  +
                        /* XmlBindingTraitParserGenerator.kt:685 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `smithy.api#Boolean`)"))
          19  +
                    /* XmlBindingTraitParserGenerator.kt:676 */}
          20  +
                    /* XmlBindingTraitParserGenerator.kt:402 */?
          21  +
                /* XmlBindingTraitParserGenerator.kt:554 */);
          22  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   19     23   
            ,
   20         -
            _ => {}
   21         -
        }
          24  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          25  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          26  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   22     27   
    }
          28  +
    /* XmlBindingTraitParserGenerator.kt:559 */
   23     29   
    Ok(out)
          30  +
    /* XmlBindingTraitParserGenerator.kt:546 */
   24     31   
}