Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_output.rs

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

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

@@ -1,1 +110,122 @@
    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:282 */
  110    122   
}

tmp-codegen-diff/codegen-client-test/ec2_query/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 +262,279 @@
   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   
            "EC2 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, "/").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/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_timestamps_input::ser_xml_timestamps_input_input_input(
  190    203   
            &input,
  191    204   
        )?);
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct XmlTimestampsEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlTimestampsEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "XmlTimestampsEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<XmlTimestampsInput>()
  217    231   
            .ok_or("failed to downcast to XmlTimestampsInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod xml_timestamps_test {
  234    251   
  235    252   
    /// Tests how normal timestamps are serialized
  236    253   
    /// Test ID: Ec2XmlTimestamps
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn ec2_xml_timestamps_response() {
  240    257   
        let expected_output = crate::operation::xml_timestamps::XmlTimestampsOutput::builder()
  241    258   
            .set_normal(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  242    259   
                1398796238, 0_f64,
@@ -652,669 +781,857 @@
  672    689   
            expected_output.epoch_seconds_on_target,
  673    690   
            "Unexpected value for `epoch_seconds_on_target`"
  674    691   
        );
  675    692   
        ::pretty_assertions::assert_eq!(parsed.http_date, expected_output.http_date, "Unexpected value for `http_date`");
  676    693   
        ::pretty_assertions::assert_eq!(
  677    694   
            parsed.http_date_on_target,
  678    695   
            expected_output.http_date_on_target,
  679    696   
            "Unexpected value for `http_date_on_target`"
  680    697   
        );
  681    698   
    }
         699  +
         700  +
    /* ProtocolTestGenerator.kt:98 */
  682    701   
}
  683    702   
         703  +
/* OperationErrorGenerator.kt:79 */
  684    704   
/// Error type for the `XmlTimestampsError` operation.
         705  +
/* RustType.kt:516 */
  685    706   
#[non_exhaustive]
         707  +
/* RustType.kt:516 */
  686    708   
#[derive(::std::fmt::Debug)]
  687         -
pub enum XmlTimestampsError {
         709  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlTimestampsError {
         710  +
    /* OperationErrorGenerator.kt:88 */
  688    711   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  689    712   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  690    713   
    variable wildcard pattern and check `.code()`:
  691    714   
     \
  692    715   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  693    716   
     \
  694    717   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlTimestampsError) for what information is available for the error.")]
  695    718   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         719  +
    /* OperationErrorGenerator.kt:81 */
  696    720   
}
         721  +
/* OperationErrorGenerator.kt:218 */
  697    722   
impl XmlTimestampsError {
         723  +
    /* OperationErrorGenerator.kt:219 */
  698    724   
    /// Creates the `XmlTimestampsError::Unhandled` variant from any error type.
  699    725   
    pub fn unhandled(
  700    726   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  701    727   
    ) -> Self {
  702    728   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  703    729   
            source: err.into(),
  704    730   
            meta: ::std::default::Default::default(),
  705    731   
        })
  706    732   
    }
  707    733   
  708    734   
    /// Creates the `XmlTimestampsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  709    735   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  710    736   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  711    737   
            source: err.clone().into(),
  712    738   
            meta: err,
  713    739   
        })
  714    740   
    }
  715         -
    ///
         741  +
    /// /* OperationErrorGenerator.kt:236 */
  716    742   
    /// Returns error metadata, which includes the error code, message,
  717    743   
    /// request ID, and potentially additional information.
  718    744   
    ///
         745  +
    /* OperationErrorGenerator.kt:242 */
  719    746   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         747  +
        /* OperationErrorGenerator.kt:243 */
  720    748   
        match self {
  721         -
            Self::Unhandled(e) => &e.meta,
         749  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         750  +
            /* OperationErrorGenerator.kt:243 */
  722    751   
        }
         752  +
        /* OperationErrorGenerator.kt:242 */
  723    753   
    }
         754  +
    /* OperationErrorGenerator.kt:218 */
  724    755   
}
         756  +
/* OperationErrorGenerator.kt:269 */
  725    757   
impl ::std::error::Error for XmlTimestampsError {
         758  +
    /* OperationErrorGenerator.kt:270 */
  726    759   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         760  +
        /* OperationErrorGenerator.kt:318 */
  727    761   
        match self {
  728         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         762  +
            /* OperationErrorGenerator.kt:326 */
         763  +
            Self::Unhandled(_inner) => {
         764  +
                /* OperationErrorGenerator.kt:279 */
         765  +
                ::std::option::Option::Some(&*_inner.source)
         766  +
                /* OperationErrorGenerator.kt:326 */
         767  +
            } /* OperationErrorGenerator.kt:318 */
  729    768   
        }
         769  +
        /* OperationErrorGenerator.kt:270 */
  730    770   
    }
         771  +
    /* OperationErrorGenerator.kt:269 */
  731    772   
}
         773  +
/* OperationErrorGenerator.kt:133 */
  732    774   
impl ::std::fmt::Display for XmlTimestampsError {
         775  +
    /* OperationErrorGenerator.kt:134 */
  733    776   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         777  +
        /* OperationErrorGenerator.kt:318 */
  734    778   
        match self {
         779  +
            /* OperationErrorGenerator.kt:326 */
  735    780   
            Self::Unhandled(_inner) => {
         781  +
                /* OperationErrorGenerator.kt:139 */
  736    782   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  737    783   
                    write!(f, "unhandled error ({code})")
  738    784   
                } else {
  739    785   
                    f.write_str("unhandled error")
  740    786   
                }
         787  +
                /* OperationErrorGenerator.kt:326 */
         788  +
            } /* OperationErrorGenerator.kt:318 */
  741    789   
        }
         790  +
        /* OperationErrorGenerator.kt:134 */
  742    791   
    }
  743         -
    }
         792  +
    /* OperationErrorGenerator.kt:133 */
  744    793   
}
         794  +
/* OperationErrorGenerator.kt:182 */
  745    795   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlTimestampsError {
         796  +
    /* OperationErrorGenerator.kt:186 */
  746    797   
    fn code(&self) -> ::std::option::Option<&str> {
         798  +
        /* OperationErrorGenerator.kt:187 */
  747    799   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         800  +
        /* OperationErrorGenerator.kt:186 */
  748    801   
    }
         802  +
    /* OperationErrorGenerator.kt:190 */
  749    803   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         804  +
        /* OperationErrorGenerator.kt:197 */
  750    805   
        ::std::option::Option::None
         806  +
        /* OperationErrorGenerator.kt:190 */
  751    807   
    }
         808  +
    /* OperationErrorGenerator.kt:182 */
  752    809   
}
         810  +
/* OperationErrorGenerator.kt:163 */
  753    811   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlTimestampsError {
         812  +
    /* OperationErrorGenerator.kt:164 */
  754    813   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         814  +
        /* OperationErrorGenerator.kt:318 */
  755    815   
        match self {
  756         -
            Self::Unhandled(_inner) => &_inner.meta,
         816  +
            /* OperationErrorGenerator.kt:326 */
         817  +
            Self::Unhandled(_inner) => {
         818  +
                /* OperationErrorGenerator.kt:168 */
         819  +
                &_inner.meta
         820  +
                /* OperationErrorGenerator.kt:326 */
         821  +
            } /* OperationErrorGenerator.kt:318 */
  757    822   
        }
         823  +
        /* OperationErrorGenerator.kt:164 */
  758    824   
    }
         825  +
    /* OperationErrorGenerator.kt:163 */
  759    826   
}
         827  +
/* OperationErrorGenerator.kt:109 */
  760    828   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlTimestampsError {
         829  +
    /* OperationErrorGenerator.kt:110 */
  761    830   
    fn create_unhandled_error(
  762    831   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  763    832   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  764    833   
    ) -> Self {
         834  +
        /* OperationErrorGenerator.kt:121 */
  765    835   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  766    836   
            source,
  767    837   
            meta: meta.unwrap_or_default(),
  768    838   
        })
         839  +
        /* OperationErrorGenerator.kt:110 */
  769    840   
    }
         841  +
    /* OperationErrorGenerator.kt:109 */
  770    842   
}
  771    843   
         844  +
/* CodegenDelegator.kt:255 */
  772    845   
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutput;
  773    846   
         847  +
/* CodegenDelegator.kt:255 */
  774    848   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInput;
  775    849   
         850  +
/* RustModule.kt:172 */
  776    851   
mod _xml_timestamps_input;
  777    852   
         853  +
/* RustModule.kt:172 */
  778    854   
mod _xml_timestamps_output;
  779    855   
  780         -
/// Builders
         856  +
/// /* CodegenDelegator.kt:51 */Builders
  781    857   
pub mod builders;

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

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

tmp-codegen-diff/codegen-client-test/ec2_query/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/ec2_query/rust-client-codegen/src/operation/xml_timestamps/builders.rs

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::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:282 */
  111    123   
}

tmp-codegen-diff/codegen-client-test/ec2_query/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/ec2_query/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/ec2_query/rust-client-codegen/src/protocol_serde.rs

@@ -1,1 +53,57 @@
    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  +
/* Ec2Query.kt:55 */
   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  +
    /* Ec2Query.kt:59 */
   23     26   
    crate::ec2_query_errors::parse_error_metadata(response_body)
          27  +
    /* Ec2Query.kt:55 */
   24     28   
}
   25     29   
   26     30   
pub(crate) mod shape_datetime_offsets;
   27     31   
   28     32   
pub(crate) mod shape_datetime_offsets_input;
   29     33   
   30     34   
pub(crate) mod shape_empty_input_and_empty_output;
   31     35   
   32     36   
pub(crate) mod shape_empty_input_and_empty_output_input;
   33     37   

tmp-codegen-diff/codegen-client-test/ec2_query/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   
}

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

@@ -1,1 +42,51 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(unused_mut)]
           4  +
/* XmlBindingTraitParserGenerator.kt:221 */
    3      5   
pub fn de_complex_error_xml_err(
    4      6   
    inp: &[u8],
    5      7   
    mut builder: crate::types::error::builders::ComplexErrorBuilder,
    6      8   
) -> std::result::Result<crate::types::error::builders::ComplexErrorBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
           9  +
    /* XmlBindingTraitParserGenerator.kt:227 */
    7     10   
    if inp.is_empty() {
    8     11   
        return Ok(builder);
    9     12   
    }
          13  +
    /* XmlBindingTraitParserGenerator.kt:229 */
   10     14   
    let mut document = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   11     15   
    #[allow(unused_mut)]
   12     16   
    let mut error_decoder = crate::ec2_query_errors::error_scope(&mut document)?;
          17  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   13     18   
    while let Some(mut tag) = error_decoder.next_tag() {
          19  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   14     20   
        match tag.start_el() {
   15         -
            s if s.matches("Nested") /* Nested aws.protocoltests.ec2#ComplexError$Nested */ =>  {
   16         -
                let var_1 =
   17         -
                    Some(
   18         -
                        crate::protocol_serde::shape_complex_nested_error_data::de_complex_nested_error_data(&mut tag)
   19         -
                        ?
   20         -
                    )
   21         -
                ;
   22         -
                builder = builder.set_nested(var_1);
   23         -
            }
          21  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("Nested") /* Nested aws.protocoltests.ec2#ComplexError$Nested */ =>  {
          22  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          23  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          24  +
                        /* XmlBindingTraitParserGenerator.kt:536 */crate::protocol_serde::shape_complex_nested_error_data::de_complex_nested_error_data(&mut tag)
          25  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          26  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          27  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          28  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_nested(var_1);
          29  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   24     30   
            ,
   25         -
            s if s.matches("TopLevel") /* TopLevel aws.protocoltests.ec2#ComplexError$TopLevel */ =>  {
   26         -
                let var_2 =
   27         -
                    Some(
   28         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   29         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   30         -
                            .into()
   31         -
                        )
   32         -
                        ?
   33         -
                    )
   34         -
                ;
   35         -
                builder = builder.set_top_level(var_2);
   36         -
            }
          31  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("TopLevel") /* TopLevel aws.protocoltests.ec2#ComplexError$TopLevel */ =>  {
          32  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_2 =
          33  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          34  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          35  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          36  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          37  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          38  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          39  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          40  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          41  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_top_level(var_2);
          42  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   37     43   
            ,
   38         -
            _ => {}
   39         -
        }
          44  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          45  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          46  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   40     47   
    }
          48  +
    /* XmlBindingTraitParserGenerator.kt:240 */
   41     49   
    Ok(builder)
          50  +
    /* XmlBindingTraitParserGenerator.kt:221 */
   42     51   
}

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

@@ -1,1 +27,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::needless_question_mark)]
           4  +
/* XmlBindingTraitParserGenerator.kt:510 */
    3      5   
pub fn de_complex_nested_error_data(
    4      6   
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    5      7   
) -> ::std::result::Result<crate::types::ComplexNestedErrorData, ::aws_smithy_xml::decode::XmlDecodeError> {
           8  +
    /* RustType.kt:516 */
    6      9   
    #[allow(unused_mut)]
          10  +
    /* XmlBindingTraitParserGenerator.kt:515 */
    7     11   
    let mut builder = crate::types::ComplexNestedErrorData::builder();
          12  +
    /* XmlBindingTraitParserGenerator.kt:352 */
    8     13   
    while let Some(mut tag) = decoder.next_tag() {
          14  +
        /* XmlBindingTraitParserGenerator.kt:353 */
    9     15   
        match tag.start_el() {
   10         -
            s if s.matches("Foo") /* Foo aws.protocoltests.ec2#ComplexNestedErrorData$Foo */ =>  {
   11         -
                let var_1 =
   12         -
                    Some(
   13         -
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   14         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   15         -
                            .into()
   16         -
                        )
   17         -
                        ?
   18         -
                    )
   19         -
                ;
   20         -
                builder = builder.set_foo(var_1);
   21         -
            }
          16  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("Foo") /* Foo aws.protocoltests.ec2#ComplexNestedErrorData$Foo */ =>  {
          17  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          18  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          19  +
                        /* XmlBindingTraitParserGenerator.kt:729 */Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
          20  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          21  +
                            /* XmlBindingTraitParserGenerator.kt:748 */.into()
          22  +
                        /* XmlBindingTraitParserGenerator.kt:729 */)
          23  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          24  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          25  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          26  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_foo(var_1);
          27  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   22     28   
            ,
   23         -
            _ => {}
   24         -
        }
          29  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          30  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          31  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   25     32   
    }
          33  +
    /* XmlBindingTraitParserGenerator.kt:533 */
   26     34   
    Ok(builder.build())
          35  +
    /* XmlBindingTraitParserGenerator.kt:510 */
   27     36   
}

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

@@ -1,1 +67,92 @@
    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_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
          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::datetime_offsets::DatetimeOffsetsError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::datetime_offsets::DatetimeOffsetsError::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_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
          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::datetime_offsets::builders::DatetimeOffsetsOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets(_response_body, output)
   25     38   
            .map_err(crate::operation::datetime_offsets::DatetimeOffsetsError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* RustType.kt:516 */
   30     47   
#[allow(unused_mut)]
          48  +
/* XmlBindingTraitParserGenerator.kt:189 */
   31     49   
pub fn de_datetime_offsets(
   32     50   
    inp: &[u8],
   33     51   
    mut builder: crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder,
   34     52   
) -> std::result::Result<crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          53  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   35     54   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   36     55   
   37     56   
    #[allow(unused_mut)]
   38     57   
    let mut decoder = doc.root_element()?;
   39     58   
    #[allow(unused_variables)]
   40     59   
    let start_el = decoder.start_el();
          60  +
    /* Ec2QueryParserGenerator.kt:35 */
   41     61   
    if !(start_el.matches("DatetimeOffsetsResponse")) {
   42     62   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   43     63   
            "invalid root, expected DatetimeOffsetsResponse got {:?}",
   44     64   
            start_el
   45     65   
        )));
   46     66   
    }
          67  +
    /* XmlBindingTraitParserGenerator.kt:352 */
   47     68   
    while let Some(mut tag) = decoder.next_tag() {
          69  +
        /* XmlBindingTraitParserGenerator.kt:353 */
   48     70   
        match tag.start_el() {
   49         -
            s if s.matches("datetime") /* datetime aws.protocoltests.ec2.synthetic#DatetimeOffsetsOutput$datetime */ =>  {
   50         -
                let var_1 =
   51         -
                    Some(
   52         -
                        ::aws_smithy_types::DateTime::from_str(
   53         -
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
   54         -
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
   55         -
                        )
   56         -
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
   57         -
                        ?
   58         -
                    )
   59         -
                ;
   60         -
                builder = builder.set_datetime(var_1);
   61         -
            }
          71  +
            /* XmlBindingTraitParserGenerator.kt:492 */s if s.matches("datetime") /* datetime aws.protocoltests.ec2.synthetic#DatetimeOffsetsOutput$datetime */ =>  {
          72  +
                /* XmlBindingTraitParserGenerator.kt:329 */let var_1 =
          73  +
                    /* XmlBindingTraitParserGenerator.kt:372 */Some(
          74  +
                        /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
          75  +
                            /* XmlBindingTraitParserGenerator.kt:377 */::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
          76  +
                            /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
          77  +
                        /* XmlBindingTraitParserGenerator.kt:701 */)
          78  +
                        /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `aws.protocoltests.shared#DateTime`)"))
          79  +
                        /* XmlBindingTraitParserGenerator.kt:402 */?
          80  +
                    /* XmlBindingTraitParserGenerator.kt:372 */)
          81  +
                /* XmlBindingTraitParserGenerator.kt:329 */;
          82  +
                /* XmlBindingTraitParserGenerator.kt:336 */builder = builder.set_datetime(var_1);
          83  +
            /* XmlBindingTraitParserGenerator.kt:492 */}
   62     84   
            ,
   63         -
            _ => {}
   64         -
        }
          85  +
            /* XmlBindingTraitParserGenerator.kt:356 */_ => {}
          86  +
        /* XmlBindingTraitParserGenerator.kt:353 */}
          87  +
        /* XmlBindingTraitParserGenerator.kt:352 */
   65     88   
    }
          89  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   66     90   
    Ok(builder)
          91  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   67     92   
}

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

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_datetime_offsets_input_input_input(
    3      4   
    input: &crate::operation::datetime_offsets::DatetimeOffsetsInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "DatetimeOffsets", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}

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

@@ -1,1 +34,49 @@
    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_empty_input_and_empty_output_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::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
    9     11   
    crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   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::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::generic(
   16     22   
        generic,
   17     23   
    ))
          24  +
    /* ProtocolParserGenerator.kt:99 */
   18     25   
}
   19     26   
          27  +
/* RustType.kt:516 */
   20     28   
#[allow(clippy::unnecessary_wraps)]
          29  +
/* ProtocolParserGenerator.kt:71 */
   21     30   
pub fn de_empty_input_and_empty_output_http_response(
   22     31   
    _response_status: u16,
   23     32   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   24     33   
    _response_body: &[u8],
   25     34   
) -> std::result::Result<
   26     35   
    crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   27     36   
    crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   28     37   
> {
          38  +
    /* ProtocolParserGenerator.kt:77 */
   29     39   
    Ok({
          40  +
        /* RustType.kt:516 */
   30     41   
        #[allow(unused_mut)]
          42  +
        /* ProtocolParserGenerator.kt:240 */
   31     43   
        let mut output = crate::operation::empty_input_and_empty_output::builders::EmptyInputAndEmptyOutputOutputBuilder::default();
          44  +
        /* ClientBuilderInstantiator.kt:56 */
   32     45   
        output.build()
          46  +
        /* ProtocolParserGenerator.kt:77 */
   33     47   
    })
          48  +
    /* ProtocolParserGenerator.kt:71 */
   34     49   
}

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

@@ -1,1 +11,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* QuerySerializerGenerator.kt:134 */
    2      3   
pub fn ser_empty_input_and_empty_output_input_input_input(
    3      4   
    input: &crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
    4      5   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* QuerySerializerGenerator.kt:142 */
    5      7   
    let _ = input;
           8  +
    /* QuerySerializerGenerator.kt:144 */
    6      9   
    let mut out = String::new();
          10  +
    /* RustType.kt:516 */
    7     11   
    #[allow(unused_mut)]
          12  +
    /* QuerySerializerGenerator.kt:146 */
    8     13   
    let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "EmptyInputAndEmptyOutput", "2020-01-08");
          14  +
    /* QuerySerializerGenerator.kt:151 */
    9     15   
    writer.finish();
          16  +
    /* QuerySerializerGenerator.kt:152 */
   10     17   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          18  +
    /* QuerySerializerGenerator.kt:134 */
   11     19   
}