Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/reserved_words_as_members/_reserved_words_as_members_output.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/reserved_words_as_members/builders.rs

@@ -1,1 +236,302 @@
    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::reserved_words_as_members::_reserved_words_as_members_output::ReservedWordsAsMembersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::reserved_words_as_members::_reserved_words_as_members_input::ReservedWordsAsMembersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::reserved_words_as_members::builders::ReservedWordsAsMembersInputBuilder {
    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::reserved_words_as_members::ReservedWordsAsMembersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.reserved_words_as_members();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ReservedWordsAsMembers`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ReservedWordsAsMembers`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct ReservedWordsAsMembersFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::reserved_words_as_members::builders::ReservedWordsAsMembersInputBuilder,
   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::reserved_words_as_members::ReservedWordsAsMembersOutput,
   34     40   
        crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   35     41   
    > for ReservedWordsAsMembersFluentBuilder
   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::reserved_words_as_members::ReservedWordsAsMembersOutput,
   43     49   
            crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   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 ReservedWordsAsMembersFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `ReservedWordsAsMembersFluentBuilder`.
   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 ReservedWordsAsMembers as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::reserved_words_as_members::builders::ReservedWordsAsMembersInputBuilder {
   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::reserved_words_as_members::ReservedWordsAsMembersOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   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::reserved_words_as_members::ReservedWordsAsMembers::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::reserved_words_as_members::ReservedWordsAsMembers::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::reserved_words_as_members::ReservedWordsAsMembersOutput,
   96    106   
        crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn r#as(mut self, input: i32) -> Self {
  112    125   
        self.inner = self.inner.r#as(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_as(mut self, input: ::std::option::Option<i32>) -> Self {
  117    132   
        self.inner = self.inner.set_as(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_as(&self) -> &::std::option::Option<i32> {
  122    139   
        self.inner.get_as()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn r#async(mut self, input: bool) -> Self {
  126    145   
        self.inner = self.inner.r#async(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_async(mut self, input: ::std::option::Option<bool>) -> Self {
  131    152   
        self.inner = self.inner.set_async(input);
  132    153   
        self
  133    154   
    }
         155  +
    /* FluentBuilderGenerator.kt:518 */
  134    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:520 */
  135    158   
    pub fn get_async(&self) -> &::std::option::Option<bool> {
  136    159   
        self.inner.get_async()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn r#enum(mut self, input: crate::types::UnknownVariantCollidingEnum) -> Self {
  140    165   
        self.inner = self.inner.r#enum(input);
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_enum(mut self, input: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>) -> Self {
  145    172   
        self.inner = self.inner.set_enum(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_enum(&self) -> &::std::option::Option<crate::types::UnknownVariantCollidingEnum> {
  150    179   
        self.inner.get_enum()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn self_(mut self, input: bool) -> Self {
  154    185   
        self.inner = self.inner.self_(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_self(mut self, input: ::std::option::Option<bool>) -> Self {
  159    192   
        self.inner = self.inner.set_self(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_self(&self) -> &::std::option::Option<bool> {
  164    199   
        self.inner.get_self()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:498 */
  166    202   
    #[allow(missing_docs)] // documentation missing in model
         203  +
                           /* FluentBuilderGenerator.kt:500 */
  167    204   
    pub fn crate_(mut self, input: bool) -> Self {
  168    205   
        self.inner = self.inner.crate_(input);
  169    206   
        self
  170    207   
    }
         208  +
    /* FluentBuilderGenerator.kt:498 */
  171    209   
    #[allow(missing_docs)] // documentation missing in model
         210  +
                           /* FluentBuilderGenerator.kt:500 */
  172    211   
    pub fn set_crate(mut self, input: ::std::option::Option<bool>) -> Self {
  173    212   
        self.inner = self.inner.set_crate(input);
  174    213   
        self
  175    214   
    }
         215  +
    /* FluentBuilderGenerator.kt:518 */
  176    216   
    #[allow(missing_docs)] // documentation missing in model
         217  +
                           /* FluentBuilderGenerator.kt:520 */
  177    218   
    pub fn get_crate(&self) -> &::std::option::Option<bool> {
  178    219   
        self.inner.get_crate()
  179    220   
    }
         221  +
    /* FluentBuilderGenerator.kt:498 */
  180    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* FluentBuilderGenerator.kt:500 */
  181    224   
    pub fn super_(mut self, input: bool) -> Self {
  182    225   
        self.inner = self.inner.super_(input);
  183    226   
        self
  184    227   
    }
         228  +
    /* FluentBuilderGenerator.kt:498 */
  185    229   
    #[allow(missing_docs)] // documentation missing in model
         230  +
                           /* FluentBuilderGenerator.kt:500 */
  186    231   
    pub fn set_super(mut self, input: ::std::option::Option<bool>) -> Self {
  187    232   
        self.inner = self.inner.set_super(input);
  188    233   
        self
  189    234   
    }
         235  +
    /* FluentBuilderGenerator.kt:518 */
  190    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* FluentBuilderGenerator.kt:520 */
  191    238   
    pub fn get_super(&self) -> &::std::option::Option<bool> {
  192    239   
        self.inner.get_super()
  193    240   
    }
         241  +
    /* FluentBuilderGenerator.kt:498 */
  194    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* FluentBuilderGenerator.kt:500 */
  195    244   
    pub fn build_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  196    245   
        self.inner = self.inner.build_value(input.into());
  197    246   
        self
  198    247   
    }
         248  +
    /* FluentBuilderGenerator.kt:498 */
  199    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* FluentBuilderGenerator.kt:500 */
  200    251   
    pub fn set_build(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  201    252   
        self.inner = self.inner.set_build(input);
  202    253   
        self
  203    254   
    }
         255  +
    /* FluentBuilderGenerator.kt:518 */
  204    256   
    #[allow(missing_docs)] // documentation missing in model
         257  +
                           /* FluentBuilderGenerator.kt:520 */
  205    258   
    pub fn get_build(&self) -> &::std::option::Option<::std::string::String> {
  206    259   
        self.inner.get_build()
  207    260   
    }
         261  +
    /* FluentBuilderGenerator.kt:498 */
  208    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* FluentBuilderGenerator.kt:500 */
  209    264   
    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  210    265   
        self.inner = self.inner.default_value(input.into());
  211    266   
        self
  212    267   
    }
         268  +
    /* FluentBuilderGenerator.kt:498 */
  213    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* FluentBuilderGenerator.kt:500 */
  214    271   
    pub fn set_default(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  215    272   
        self.inner = self.inner.set_default(input);
  216    273   
        self
  217    274   
    }
         275  +
    /* FluentBuilderGenerator.kt:518 */
  218    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* FluentBuilderGenerator.kt:520 */
  219    278   
    pub fn get_default(&self) -> &::std::option::Option<::std::string::String> {
  220    279   
        self.inner.get_default()
  221    280   
    }
         281  +
    /* FluentBuilderGenerator.kt:498 */
  222    282   
    #[allow(missing_docs)] // documentation missing in model
         283  +
                           /* FluentBuilderGenerator.kt:500 */
  223    284   
    pub fn send_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  224    285   
        self.inner = self.inner.send_value(input.into());
  225    286   
        self
  226    287   
    }
         288  +
    /* FluentBuilderGenerator.kt:498 */
  227    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* FluentBuilderGenerator.kt:500 */
  228    291   
    pub fn set_send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  229    292   
        self.inner = self.inner.set_send(input);
  230    293   
        self
  231    294   
    }
         295  +
    /* FluentBuilderGenerator.kt:518 */
  232    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* FluentBuilderGenerator.kt:520 */
  233    298   
    pub fn get_send(&self) -> &::std::option::Option<::std::string::String> {
  234    299   
        self.inner.get_send()
  235    300   
    }
         301  +
    /* FluentBuilderGenerator.kt:282 */
  236    302   
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result.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 `Result`.
           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 Result;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl Result {
    7         -
    /// Creates a new `Result`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `Result`
          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::result::ResultInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::result::ResultOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::result::ResultError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -49,58 +315,386 @@
   69     78   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   70     79   
            }
   71     80   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   72     81   
                config_override,
   73     82   
                client_config.config.clone(),
   74     83   
                &client_config.runtime_components,
   75     84   
            ));
   76     85   
        }
   77     86   
        runtime_plugins
   78     87   
    }
          88  +
    /* OperationGenerator.kt:85 */
   79     89   
}
          90  +
/* OperationRuntimePluginGenerator.kt:55 */
   80     91   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for Result {
   81     92   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   82     93   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Result");
   83     94   
   84     95   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   85     96   
            ResultRequestSerializer,
   86     97   
        ));
   87     98   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   88     99   
            ResultResponseDeserializer,
   89    100   
        ));
   90    101   
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   92    103   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   93    104   
        ));
   94    105   
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("Result", "Config"));
   96    107   
   97    108   
        ::std::option::Option::Some(cfg.freeze())
   98    109   
    }
   99    110   
  100    111   
    fn runtime_components(
  101    112   
        &self,
  102    113   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  103    114   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  104    115   
        #[allow(unused_mut)]
  105    116   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("Result")
  106    117   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  107    118   
            .with_interceptor(ResultEndpointParamsInterceptor)
  108    119   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  109    120   
                crate::operation::result::ResultError,
  110    121   
            >::new())
  111    122   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  112    123   
                crate::operation::result::ResultError,
  113    124   
            >::new());
  114    125   
  115    126   
        ::std::borrow::Cow::Owned(rcb)
  116    127   
    }
  117    128   
}
  118    129   
         130  +
/* ResponseDeserializerGenerator.kt:64 */
  119    131   
#[derive(Debug)]
  120    132   
struct ResultResponseDeserializer;
  121    133   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ResultResponseDeserializer {
  122    134   
    fn deserialize_nonstreaming(
  123    135   
        &self,
  124    136   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  125    137   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  126    138   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  127    139   
        let headers = response.headers();
  128    140   
        let body = response.body().bytes().expect("body loaded");
  129    141   
        #[allow(unused_mut)]
  130    142   
        let mut force_error = false;
  131    143   
  132    144   
        let parse_result = if !success && status != 200 || force_error {
  133    145   
            crate::protocol_serde::shape_result::de_result_http_error(status, headers, body)
  134    146   
        } else {
  135    147   
            crate::protocol_serde::shape_result::de_result_http_response(status, headers, body)
  136    148   
        };
  137    149   
        crate::protocol_serde::type_erase_result(parse_result)
  138    150   
    }
  139    151   
}
         152  +
/* RequestSerializerGenerator.kt:67 */
  140    153   
#[derive(Debug)]
  141    154   
struct ResultRequestSerializer;
  142    155   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ResultRequestSerializer {
  143    156   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  144    157   
    fn serialize_input(
  145    158   
        &self,
  146    159   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  147    160   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  148    161   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  149    162   
        let input = input.downcast::<crate::operation::result::ResultInput>().expect("correct type");
  150    163   
        let _header_serialization_settings = _cfg
  151    164   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  152    165   
            .cloned()
  153    166   
            .unwrap_or_default();
  154    167   
        let mut request_builder = {
  155    168   
            fn uri_base(
  156    169   
                _input: &crate::operation::result::ResultInput,
  157    170   
                output: &mut ::std::string::String,
  158    171   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  159    172   
                use ::std::fmt::Write as _;
  160    173   
                ::std::write!(output, "/").expect("formatting should succeed");
  161    174   
                ::std::result::Result::Ok(())
  162    175   
            }
  163    176   
            #[allow(clippy::unnecessary_wraps)]
  164    177   
            fn update_http_builder(
  165    178   
                input: &crate::operation::result::ResultInput,
  166    179   
                builder: ::http::request::Builder,
  167    180   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  168    181   
                let mut uri = ::std::string::String::new();
  169    182   
                uri_base(input, &mut uri)?;
  170    183   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  171    184   
            }
  172    185   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  173    186   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  174    187   
            builder =
  175    188   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amz-target"), "Config.Result");
  176    189   
            builder
  177    190   
        };
  178    191   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_result::ser_result_input(&input)?);
  179    192   
        if let Some(content_length) = body.content_length() {
  180    193   
            let content_length = content_length.to_string();
  181    194   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  182    195   
        }
  183    196   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  184    197   
    }
  185    198   
}
         199  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  186    200   
#[derive(Debug)]
  187    201   
struct ResultEndpointParamsInterceptor;
  188    202   
  189    203   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ResultEndpointParamsInterceptor {
  190    204   
    fn name(&self) -> &'static str {
  191    205   
        "ResultEndpointParamsInterceptor"
  192    206   
    }
  193    207   
  194    208   
    fn read_before_execution(
  195    209   
        &self,
  196    210   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  197    211   
            '_,
  198    212   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  199    213   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  200    214   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  201    215   
        >,
  202    216   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  203    217   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  204    218   
        let _input = context.input().downcast_ref::<ResultInput>().ok_or("failed to downcast to ResultInput")?;
  205    219   
  206    220   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  208    222   
        })?;
  209    223   
        cfg.interceptor_state()
  210    224   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  211    225   
        ::std::result::Result::Ok(())
  212    226   
    }
  213    227   
}
  214    228   
  215    229   
// The get_* functions below are generated from JMESPath expressions in the
  216    230   
// operationContextParams trait. They target the operation's input shape.
  217    231   
         232  +
/* OperationErrorGenerator.kt:79 */
  218    233   
/// Error type for the `ResultError` operation.
         234  +
/* RustType.kt:516 */
  219    235   
#[non_exhaustive]
         236  +
/* RustType.kt:516 */
  220    237   
#[derive(::std::fmt::Debug)]
  221         -
pub enum ResultError {
         238  +
pub /* OperationErrorGenerator.kt:81 */ enum ResultError {
         239  +
    /* OperationErrorGenerator.kt:88 */
  222    240   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  223    241   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  224    242   
    variable wildcard pattern and check `.code()`:
  225    243   
     \
  226    244   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  227    245   
     \
  228    246   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ResultError) for what information is available for the error.")]
  229    247   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         248  +
    /* OperationErrorGenerator.kt:81 */
  230    249   
}
         250  +
/* OperationErrorGenerator.kt:218 */
  231    251   
impl ResultError {
         252  +
    /* OperationErrorGenerator.kt:219 */
  232    253   
    /// Creates the `ResultError::Unhandled` variant from any error type.
  233    254   
    pub fn unhandled(
  234    255   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  235    256   
    ) -> Self {
  236    257   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  237    258   
            source: err.into(),
  238    259   
            meta: ::std::default::Default::default(),
  239    260   
        })
  240    261   
    }
  241    262   
  242    263   
    /// Creates the `ResultError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  243    264   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  244    265   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  245    266   
            source: err.clone().into(),
  246    267   
            meta: err,
  247    268   
        })
  248    269   
    }
  249         -
    ///
         270  +
    /// /* OperationErrorGenerator.kt:236 */
  250    271   
    /// Returns error metadata, which includes the error code, message,
  251    272   
    /// request ID, and potentially additional information.
  252    273   
    ///
         274  +
    /* OperationErrorGenerator.kt:242 */
  253    275   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         276  +
        /* OperationErrorGenerator.kt:243 */
  254    277   
        match self {
  255         -
            Self::Unhandled(e) => &e.meta,
         278  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         279  +
            /* OperationErrorGenerator.kt:243 */
  256    280   
        }
         281  +
        /* OperationErrorGenerator.kt:242 */
  257    282   
    }
         283  +
    /* OperationErrorGenerator.kt:218 */
  258    284   
}
         285  +
/* OperationErrorGenerator.kt:269 */
  259    286   
impl ::std::error::Error for ResultError {
         287  +
    /* OperationErrorGenerator.kt:270 */
  260    288   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         289  +
        /* OperationErrorGenerator.kt:318 */
  261    290   
        match self {
  262         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         291  +
            /* OperationErrorGenerator.kt:326 */
         292  +
            Self::Unhandled(_inner) => {
         293  +
                /* OperationErrorGenerator.kt:279 */
         294  +
                ::std::option::Option::Some(&*_inner.source)
         295  +
                /* OperationErrorGenerator.kt:326 */
         296  +
            } /* OperationErrorGenerator.kt:318 */
  263    297   
        }
         298  +
        /* OperationErrorGenerator.kt:270 */
  264    299   
    }
         300  +
    /* OperationErrorGenerator.kt:269 */
  265    301   
}
         302  +
/* OperationErrorGenerator.kt:133 */
  266    303   
impl ::std::fmt::Display for ResultError {
         304  +
    /* OperationErrorGenerator.kt:134 */
  267    305   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         306  +
        /* OperationErrorGenerator.kt:318 */
  268    307   
        match self {
         308  +
            /* OperationErrorGenerator.kt:326 */
  269    309   
            Self::Unhandled(_inner) => {
         310  +
                /* OperationErrorGenerator.kt:139 */
  270    311   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  271    312   
                    write!(f, "unhandled error ({code})")
  272    313   
                } else {
  273    314   
                    f.write_str("unhandled error")
  274    315   
                }
  275         -
            }
         316  +
                /* OperationErrorGenerator.kt:326 */
         317  +
            } /* OperationErrorGenerator.kt:318 */
  276    318   
        }
         319  +
        /* OperationErrorGenerator.kt:134 */
  277    320   
    }
         321  +
    /* OperationErrorGenerator.kt:133 */
  278    322   
}
         323  +
/* OperationErrorGenerator.kt:182 */
  279    324   
impl ::aws_smithy_types::retry::ProvideErrorKind for ResultError {
         325  +
    /* OperationErrorGenerator.kt:186 */
  280    326   
    fn code(&self) -> ::std::option::Option<&str> {
         327  +
        /* OperationErrorGenerator.kt:187 */
  281    328   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         329  +
        /* OperationErrorGenerator.kt:186 */
  282    330   
    }
         331  +
    /* OperationErrorGenerator.kt:190 */
  283    332   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         333  +
        /* OperationErrorGenerator.kt:197 */
  284    334   
        ::std::option::Option::None
         335  +
        /* OperationErrorGenerator.kt:190 */
  285    336   
    }
         337  +
    /* OperationErrorGenerator.kt:182 */
  286    338   
}
         339  +
/* OperationErrorGenerator.kt:163 */
  287    340   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResultError {
         341  +
    /* OperationErrorGenerator.kt:164 */
  288    342   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         343  +
        /* OperationErrorGenerator.kt:318 */
  289    344   
        match self {
  290         -
            Self::Unhandled(_inner) => &_inner.meta,
         345  +
            /* OperationErrorGenerator.kt:326 */
         346  +
            Self::Unhandled(_inner) => {
         347  +
                /* OperationErrorGenerator.kt:168 */
         348  +
                &_inner.meta
         349  +
                /* OperationErrorGenerator.kt:326 */
         350  +
            } /* OperationErrorGenerator.kt:318 */
  291    351   
        }
         352  +
        /* OperationErrorGenerator.kt:164 */
  292    353   
    }
         354  +
    /* OperationErrorGenerator.kt:163 */
  293    355   
}
         356  +
/* OperationErrorGenerator.kt:109 */
  294    357   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ResultError {
         358  +
    /* OperationErrorGenerator.kt:110 */
  295    359   
    fn create_unhandled_error(
  296    360   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  297    361   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  298    362   
    ) -> Self {
         363  +
        /* OperationErrorGenerator.kt:121 */
  299    364   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  300    365   
            source,
  301    366   
            meta: meta.unwrap_or_default(),
  302    367   
        })
         368  +
        /* OperationErrorGenerator.kt:110 */
  303    369   
    }
         370  +
    /* OperationErrorGenerator.kt:109 */
  304    371   
}
  305    372   
         373  +
/* CodegenDelegator.kt:255 */
  306    374   
pub use crate::operation::result::_result_output::ResultOutput;
  307    375   
         376  +
/* CodegenDelegator.kt:255 */
  308    377   
pub use crate::operation::result::_result_input::ResultInput;
  309    378   
         379  +
/* RustModule.kt:172 */
  310    380   
mod _result_input;
  311    381   
         382  +
/* RustModule.kt:172 */
  312    383   
mod _result_output;
  313    384   
  314         -
/// Builders
         385  +
/// /* CodegenDelegator.kt:51 */Builders
  315    386   
pub mod builders;

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result/_result_input.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result/_result_output.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result/builders.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo.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 `RPCEcho`.
           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 RPCEcho;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl RPCEcho {
    7         -
    /// Creates a new `RPCEcho`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `RPCEcho`
          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::rpc_echo::RpcEchoInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::rpc_echo::RpcEchoOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::rpc_echo::RPCEchoError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -53,62 +332,427 @@
   73     82   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   74     83   
            }
   75     84   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   76     85   
                config_override,
   77     86   
                client_config.config.clone(),
   78     87   
                &client_config.runtime_components,
   79     88   
            ));
   80     89   
        }
   81     90   
        runtime_plugins
   82     91   
    }
          92  +
    /* OperationGenerator.kt:85 */
   83     93   
}
          94  +
/* OperationRuntimePluginGenerator.kt:55 */
   84     95   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RPCEcho {
   85     96   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   86     97   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RPCEcho");
   87     98   
   88     99   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   89    100   
            RPCEchoRequestSerializer,
   90    101   
        ));
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   92    103   
            RPCEchoResponseDeserializer,
   93    104   
        ));
   94    105   
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   96    107   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("RPCEcho", "Config"));
  100    111   
  101    112   
        ::std::option::Option::Some(cfg.freeze())
  102    113   
    }
  103    114   
  104    115   
    fn runtime_components(
  105    116   
        &self,
  106    117   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  107    118   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  108    119   
        #[allow(unused_mut)]
  109    120   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RPCEcho")
  110    121   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  111    122   
            .with_interceptor(RPCEchoEndpointParamsInterceptor)
  112    123   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  113    124   
                crate::operation::rpc_echo::RPCEchoError,
  114    125   
            >::new())
  115    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  116    127   
                crate::operation::rpc_echo::RPCEchoError,
  117    128   
            >::new());
  118    129   
  119    130   
        ::std::borrow::Cow::Owned(rcb)
  120    131   
    }
  121    132   
}
  122    133   
         134  +
/* ResponseDeserializerGenerator.kt:64 */
  123    135   
#[derive(Debug)]
  124    136   
struct RPCEchoResponseDeserializer;
  125    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RPCEchoResponseDeserializer {
  126    138   
    fn deserialize_nonstreaming(
  127    139   
        &self,
  128    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  129    141   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  130    142   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  131    143   
        let headers = response.headers();
  132    144   
        let body = response.body().bytes().expect("body loaded");
  133    145   
        #[allow(unused_mut)]
  134    146   
        let mut force_error = false;
  135    147   
  136    148   
        let parse_result = if !success && status != 200 || force_error {
  137    149   
            crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_error(status, headers, body)
  138    150   
        } else {
  139    151   
            crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_response(status, headers, body)
  140    152   
        };
  141    153   
        crate::protocol_serde::type_erase_result(parse_result)
  142    154   
    }
  143    155   
}
         156  +
/* RequestSerializerGenerator.kt:67 */
  144    157   
#[derive(Debug)]
  145    158   
struct RPCEchoRequestSerializer;
  146    159   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RPCEchoRequestSerializer {
  147    160   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  148    161   
    fn serialize_input(
  149    162   
        &self,
  150    163   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  151    164   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  152    165   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  153    166   
        let input = input.downcast::<crate::operation::rpc_echo::RpcEchoInput>().expect("correct type");
  154    167   
        let _header_serialization_settings = _cfg
  155    168   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  156    169   
            .cloned()
  157    170   
            .unwrap_or_default();
  158    171   
        let mut request_builder = {
  159    172   
            fn uri_base(
  160    173   
                _input: &crate::operation::rpc_echo::RpcEchoInput,
  161    174   
                output: &mut ::std::string::String,
  162    175   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  163    176   
                use ::std::fmt::Write as _;
  164    177   
                ::std::write!(output, "/").expect("formatting should succeed");
  165    178   
                ::std::result::Result::Ok(())
  166    179   
            }
  167    180   
            #[allow(clippy::unnecessary_wraps)]
  168    181   
            fn update_http_builder(
  169    182   
                input: &crate::operation::rpc_echo::RpcEchoInput,
  170    183   
                builder: ::http::request::Builder,
  171    184   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                let mut uri = ::std::string::String::new();
  173    186   
                uri_base(input, &mut uri)?;
  174    187   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  175    188   
            }
  176    189   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  177    190   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  178    191   
            builder =
  179    192   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amz-target"), "Config.RPCEcho");
  180    193   
            builder
  181    194   
        };
  182    195   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_input(&input)?);
  183    196   
        if let Some(content_length) = body.content_length() {
  184    197   
            let content_length = content_length.to_string();
  185    198   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  186    199   
        }
  187    200   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  188    201   
    }
  189    202   
}
         203  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  190    204   
#[derive(Debug)]
  191    205   
struct RPCEchoEndpointParamsInterceptor;
  192    206   
  193    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RPCEchoEndpointParamsInterceptor {
  194    208   
    fn name(&self) -> &'static str {
  195    209   
        "RPCEchoEndpointParamsInterceptor"
  196    210   
    }
  197    211   
  198    212   
    fn read_before_execution(
  199    213   
        &self,
  200    214   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  201    215   
            '_,
  202    216   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  203    217   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  204    218   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  205    219   
        >,
  206    220   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  207    221   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  208    222   
        let _input = context
  209    223   
            .input()
  210    224   
            .downcast_ref::<RpcEchoInput>()
  211    225   
            .ok_or("failed to downcast to RpcEchoInput")?;
  212    226   
  213    227   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  215    229   
        })?;
  216    230   
        cfg.interceptor_state()
  217    231   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  218    232   
        ::std::result::Result::Ok(())
  219    233   
    }
  220    234   
}
  221    235   
  222    236   
// The get_* functions below are generated from JMESPath expressions in the
  223    237   
// operationContextParams trait. They target the operation's input shape.
  224    238   
         239  +
/* OperationErrorGenerator.kt:79 */
  225    240   
/// Error type for the `RPCEchoError` operation.
         241  +
/* RustType.kt:516 */
  226    242   
#[non_exhaustive]
         243  +
/* RustType.kt:516 */
  227    244   
#[derive(::std::fmt::Debug)]
  228         -
pub enum RPCEchoError {
  229         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         245  +
pub /* OperationErrorGenerator.kt:81 */ enum RPCEchoError {
         246  +
    /// /* OperationErrorGenerator.kt:83 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         247  +
    /* OperationErrorGenerator.kt:86 */
  230    248   
    ValidationException(crate::types::error::ValidationException),
         249  +
    /* OperationErrorGenerator.kt:88 */
  231    250   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  232    251   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  233    252   
    variable wildcard pattern and check `.code()`:
  234    253   
     \
  235    254   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  236    255   
     \
  237    256   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RPCEchoError) for what information is available for the error.")]
  238    257   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         258  +
    /* OperationErrorGenerator.kt:81 */
  239    259   
}
         260  +
/* OperationErrorGenerator.kt:218 */
  240    261   
impl RPCEchoError {
         262  +
    /* OperationErrorGenerator.kt:219 */
  241    263   
    /// Creates the `RPCEchoError::Unhandled` variant from any error type.
  242    264   
    pub fn unhandled(
  243    265   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  244    266   
    ) -> Self {
  245    267   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  246    268   
            source: err.into(),
  247    269   
            meta: ::std::default::Default::default(),
  248    270   
        })
  249    271   
    }
  250    272   
  251    273   
    /// Creates the `RPCEchoError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  252    274   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  253    275   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  254    276   
            source: err.clone().into(),
  255    277   
            meta: err,
  256    278   
        })
  257    279   
    }
  258         -
    ///
         280  +
    /// /* OperationErrorGenerator.kt:236 */
  259    281   
    /// Returns error metadata, which includes the error code, message,
  260    282   
    /// request ID, and potentially additional information.
  261    283   
    ///
         284  +
    /* OperationErrorGenerator.kt:242 */
  262    285   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         286  +
        /* OperationErrorGenerator.kt:243 */
  263    287   
        match self {
         288  +
            /* OperationErrorGenerator.kt:246 */
  264    289   
            Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  265         -
            Self::Unhandled(e) => &e.meta,
         290  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         291  +
            /* OperationErrorGenerator.kt:243 */
  266    292   
        }
         293  +
        /* OperationErrorGenerator.kt:242 */
  267    294   
    }
         295  +
    /* OperationErrorGenerator.kt:257 */
  268    296   
    /// Returns `true` if the error kind is `RPCEchoError::ValidationException`.
         297  +
    /* OperationErrorGenerator.kt:258 */
  269    298   
    pub fn is_validation_exception(&self) -> bool {
         299  +
        /* OperationErrorGenerator.kt:259 */
  270    300   
        matches!(self, Self::ValidationException(_))
         301  +
        /* OperationErrorGenerator.kt:258 */
  271    302   
    }
         303  +
    /* OperationErrorGenerator.kt:218 */
  272    304   
}
         305  +
/* OperationErrorGenerator.kt:269 */
  273    306   
impl ::std::error::Error for RPCEchoError {
         307  +
    /* OperationErrorGenerator.kt:270 */
  274    308   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         309  +
        /* OperationErrorGenerator.kt:318 */
  275    310   
        match self {
  276         -
            Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
  277         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         311  +
            /* OperationErrorGenerator.kt:321 */
         312  +
            Self::ValidationException(_inner) =>
         313  +
            /* OperationErrorGenerator.kt:283 */
         314  +
            {
         315  +
                ::std::option::Option::Some(_inner)
         316  +
            }
         317  +
            ,
         318  +
            /* OperationErrorGenerator.kt:326 */
         319  +
            Self::Unhandled(_inner) => {
         320  +
                /* OperationErrorGenerator.kt:279 */
         321  +
                ::std::option::Option::Some(&*_inner.source)
         322  +
                /* OperationErrorGenerator.kt:326 */
         323  +
            } /* OperationErrorGenerator.kt:318 */
  278    324   
        }
         325  +
        /* OperationErrorGenerator.kt:270 */
  279    326   
    }
         327  +
    /* OperationErrorGenerator.kt:269 */
  280    328   
}
         329  +
/* OperationErrorGenerator.kt:133 */
  281    330   
impl ::std::fmt::Display for RPCEchoError {
         331  +
    /* OperationErrorGenerator.kt:134 */
  282    332   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         333  +
        /* OperationErrorGenerator.kt:318 */
  283    334   
        match self {
  284         -
            Self::ValidationException(_inner) => _inner.fmt(f),
         335  +
            /* OperationErrorGenerator.kt:321 */
         336  +
            Self::ValidationException(_inner) =>
         337  +
            /* OperationErrorGenerator.kt:151 */
         338  +
            {
         339  +
                _inner.fmt(f)
         340  +
            }
         341  +
            ,
         342  +
            /* OperationErrorGenerator.kt:326 */
  285    343   
            Self::Unhandled(_inner) => {
         344  +
                /* OperationErrorGenerator.kt:139 */
  286    345   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  287    346   
                    write!(f, "unhandled error ({code})")
  288    347   
                } else {
  289    348   
                    f.write_str("unhandled error")
  290    349   
                }
  291         -
            }
         350  +
                /* OperationErrorGenerator.kt:326 */
         351  +
            } /* OperationErrorGenerator.kt:318 */
  292    352   
        }
         353  +
        /* OperationErrorGenerator.kt:134 */
  293    354   
    }
         355  +
    /* OperationErrorGenerator.kt:133 */
  294    356   
}
         357  +
/* OperationErrorGenerator.kt:182 */
  295    358   
impl ::aws_smithy_types::retry::ProvideErrorKind for RPCEchoError {
         359  +
    /* OperationErrorGenerator.kt:186 */
  296    360   
    fn code(&self) -> ::std::option::Option<&str> {
         361  +
        /* OperationErrorGenerator.kt:187 */
  297    362   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         363  +
        /* OperationErrorGenerator.kt:186 */
  298    364   
    }
         365  +
    /* OperationErrorGenerator.kt:190 */
  299    366   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         367  +
        /* OperationErrorGenerator.kt:197 */
  300    368   
        ::std::option::Option::None
         369  +
        /* OperationErrorGenerator.kt:190 */
  301    370   
    }
         371  +
    /* OperationErrorGenerator.kt:182 */
  302    372   
}
         373  +
/* OperationErrorGenerator.kt:163 */
  303    374   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RPCEchoError {
         375  +
    /* OperationErrorGenerator.kt:164 */
  304    376   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         377  +
        /* OperationErrorGenerator.kt:318 */
  305    378   
        match self {
  306         -
            Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  307         -
            Self::Unhandled(_inner) => &_inner.meta,
         379  +
            /* OperationErrorGenerator.kt:321 */
         380  +
            Self::ValidationException(_inner) =>
         381  +
            /* OperationErrorGenerator.kt:169 */
         382  +
            {
         383  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         384  +
            }
         385  +
            ,
         386  +
            /* OperationErrorGenerator.kt:326 */
         387  +
            Self::Unhandled(_inner) => {
         388  +
                /* OperationErrorGenerator.kt:168 */
         389  +
                &_inner.meta
         390  +
                /* OperationErrorGenerator.kt:326 */
         391  +
            } /* OperationErrorGenerator.kt:318 */
  308    392   
        }
         393  +
        /* OperationErrorGenerator.kt:164 */
  309    394   
    }
         395  +
    /* OperationErrorGenerator.kt:163 */
  310    396   
}
         397  +
/* OperationErrorGenerator.kt:109 */
  311    398   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RPCEchoError {
         399  +
    /* OperationErrorGenerator.kt:110 */
  312    400   
    fn create_unhandled_error(
  313    401   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  314    402   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  315    403   
    ) -> Self {
         404  +
        /* OperationErrorGenerator.kt:121 */
  316    405   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  317    406   
            source,
  318    407   
            meta: meta.unwrap_or_default(),
  319    408   
        })
         409  +
        /* OperationErrorGenerator.kt:110 */
  320    410   
    }
         411  +
    /* OperationErrorGenerator.kt:109 */
  321    412   
}
  322    413   
         414  +
/* CodegenDelegator.kt:255 */
  323    415   
pub use crate::operation::rpc_echo::_rpc_echo_output::RpcEchoOutput;
  324    416   
         417  +
/* CodegenDelegator.kt:255 */
  325    418   
pub use crate::operation::rpc_echo::_rpc_echo_input::RpcEchoInput;
  326    419   
         420  +
/* RustModule.kt:172 */
  327    421   
mod _rpc_echo_input;
  328    422   
         423  +
/* RustModule.kt:172 */
  329    424   
mod _rpc_echo_output;
  330    425   
  331         -
/// Builders
         426  +
/// /* CodegenDelegator.kt:51 */Builders
  332    427   
pub mod builders;

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo/_rpc_echo_input.rs

@@ -1,1 +225,414 @@
    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 RpcEchoInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct RpcEchoInput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub r#as: ::std::option::Option<i32>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     12   
    pub r#async: ::std::option::Option<bool>,
          13  +
    /* StructureGenerator.kt:231 */
   10     14   
    #[allow(missing_docs)] // documentation missing in model
   11     15   
    pub r#enum: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>,
   12         -
    #[allow(missing_docs)] // documentation missing in model
          16  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   13     17   
    pub self_: ::std::option::Option<bool>,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          18  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     19   
    pub crate_: ::std::option::Option<bool>,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          20  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     21   
    pub super_: ::std::option::Option<bool>,
          22  +
    /* StructureGenerator.kt:231 */
   18     23   
    #[allow(missing_docs)] // documentation missing in model
   19     24   
    pub build_value: ::std::option::Option<::std::string::String>,
          25  +
    /* StructureGenerator.kt:231 */
   20     26   
    #[allow(missing_docs)] // documentation missing in model
   21     27   
    pub default_value: ::std::option::Option<::std::string::String>,
          28  +
    /* StructureGenerator.kt:231 */
   22     29   
    #[allow(missing_docs)] // documentation missing in model
   23     30   
    pub send_value: ::std::option::Option<::std::string::String>,
          31  +
    /* StructureGenerator.kt:201 */
   24     32   
}
          33  +
/* StructureGenerator.kt:135 */
   25     34   
impl RpcEchoInput {
          35  +
    /* StructureGenerator.kt:231 */
   26     36   
    #[allow(missing_docs)] // documentation missing in model
          37  +
                           /* StructureGenerator.kt:166 */
   27     38   
    pub fn r#as(&self) -> ::std::option::Option<i32> {
          39  +
        /* StructureGenerator.kt:168 */
   28     40   
        self.r#as
          41  +
        /* StructureGenerator.kt:166 */
   29     42   
    }
          43  +
    /* StructureGenerator.kt:231 */
   30     44   
    #[allow(missing_docs)] // documentation missing in model
          45  +
                           /* StructureGenerator.kt:166 */
   31     46   
    pub fn r#async(&self) -> ::std::option::Option<bool> {
          47  +
        /* StructureGenerator.kt:168 */
   32     48   
        self.r#async
          49  +
        /* StructureGenerator.kt:166 */
   33     50   
    }
          51  +
    /* StructureGenerator.kt:231 */
   34     52   
    #[allow(missing_docs)] // documentation missing in model
          53  +
                           /* StructureGenerator.kt:166 */
   35     54   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::types::UnknownVariantCollidingEnum> {
          55  +
        /* StructureGenerator.kt:170 */
   36     56   
        self.r#enum.as_ref()
          57  +
        /* StructureGenerator.kt:166 */
   37     58   
    }
          59  +
    /* StructureGenerator.kt:231 */
   38     60   
    #[allow(missing_docs)] // documentation missing in model
          61  +
                           /* StructureGenerator.kt:166 */
   39     62   
    pub fn self_(&self) -> ::std::option::Option<bool> {
          63  +
        /* StructureGenerator.kt:168 */
   40     64   
        self.self_
          65  +
        /* StructureGenerator.kt:166 */
   41     66   
    }
          67  +
    /* StructureGenerator.kt:231 */
   42     68   
    #[allow(missing_docs)] // documentation missing in model
          69  +
                           /* StructureGenerator.kt:166 */
   43     70   
    pub fn crate_(&self) -> ::std::option::Option<bool> {
          71  +
        /* StructureGenerator.kt:168 */
   44     72   
        self.crate_
          73  +
        /* StructureGenerator.kt:166 */
   45     74   
    }
          75  +
    /* StructureGenerator.kt:231 */
   46     76   
    #[allow(missing_docs)] // documentation missing in model
          77  +
                           /* StructureGenerator.kt:166 */
   47     78   
    pub fn super_(&self) -> ::std::option::Option<bool> {
          79  +
        /* StructureGenerator.kt:168 */
   48     80   
        self.super_
          81  +
        /* StructureGenerator.kt:166 */
   49     82   
    }
          83  +
    /* StructureGenerator.kt:231 */
   50     84   
    #[allow(missing_docs)] // documentation missing in model
          85  +
                           /* StructureGenerator.kt:166 */
   51     86   
    pub fn build_value(&self) -> ::std::option::Option<&str> {
          87  +
        /* StructureGenerator.kt:169 */
   52     88   
        self.build_value.as_deref()
          89  +
        /* StructureGenerator.kt:166 */
   53     90   
    }
          91  +
    /* StructureGenerator.kt:231 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* StructureGenerator.kt:166 */
   55     94   
    pub fn default_value(&self) -> ::std::option::Option<&str> {
          95  +
        /* StructureGenerator.kt:169 */
   56     96   
        self.default_value.as_deref()
          97  +
        /* StructureGenerator.kt:166 */
   57     98   
    }
          99  +
    /* StructureGenerator.kt:231 */
   58    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* StructureGenerator.kt:166 */
   59    102   
    pub fn send_value(&self) -> ::std::option::Option<&str> {
         103  +
        /* StructureGenerator.kt:169 */
   60    104   
        self.send_value.as_deref()
         105  +
        /* StructureGenerator.kt:166 */
   61    106   
    }
         107  +
    /* StructureGenerator.kt:135 */
   62    108   
}
         109  +
/* ClientCodegenVisitor.kt:237 */
   63    110   
impl RpcEchoInput {
   64         -
    /// Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         111  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         112  +
    /* BuilderGenerator.kt:175 */
   65    113   
    pub fn builder() -> crate::operation::rpc_echo::builders::RpcEchoInputBuilder {
         114  +
        /* BuilderGenerator.kt:176 */
   66    115   
        crate::operation::rpc_echo::builders::RpcEchoInputBuilder::default()
         116  +
        /* BuilderGenerator.kt:175 */
   67    117   
    }
         118  +
    /* ClientCodegenVisitor.kt:237 */
   68    119   
}
   69    120   
   70         -
/// A builder for [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         121  +
/// /* BuilderGenerator.kt:342 */A builder for [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         122  +
/* RustType.kt:516 */
   71    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         124  +
/* RustType.kt:516 */
   72    125   
#[non_exhaustive]
         126  +
/* BuilderGenerator.kt:345 */
   73    127   
pub struct RpcEchoInputBuilder {
   74         -
    pub(crate) r#as: ::std::option::Option<i32>,
   75         -
    pub(crate) r#async: ::std::option::Option<bool>,
   76         -
    pub(crate) r#enum: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>,
   77         -
    pub(crate) self_: ::std::option::Option<bool>,
   78         -
    pub(crate) crate_: ::std::option::Option<bool>,
   79         -
    pub(crate) super_: ::std::option::Option<bool>,
   80         -
    pub(crate) build_value: ::std::option::Option<::std::string::String>,
   81         -
    pub(crate) default_value: ::std::option::Option<::std::string::String>,
   82         -
    pub(crate) send_value: ::std::option::Option<::std::string::String>,
         128  +
    /* BuilderGenerator.kt:275 */ pub(crate) r#as: ::std::option::Option<i32>,
         129  +
    /* BuilderGenerator.kt:275 */ pub(crate) r#async: ::std::option::Option<bool>,
         130  +
    /* BuilderGenerator.kt:275 */ pub(crate) r#enum: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>,
         131  +
    /* BuilderGenerator.kt:275 */ pub(crate) self_: ::std::option::Option<bool>,
         132  +
    /* BuilderGenerator.kt:275 */ pub(crate) crate_: ::std::option::Option<bool>,
         133  +
    /* BuilderGenerator.kt:275 */ pub(crate) super_: ::std::option::Option<bool>,
         134  +
    /* BuilderGenerator.kt:275 */ pub(crate) build_value: ::std::option::Option<::std::string::String>,
         135  +
    /* BuilderGenerator.kt:275 */ pub(crate) default_value: ::std::option::Option<::std::string::String>,
         136  +
    /* BuilderGenerator.kt:275 */ pub(crate) send_value: ::std::option::Option<::std::string::String>,
         137  +
    /* BuilderGenerator.kt:345 */
   83    138   
}
         139  +
/* BuilderGenerator.kt:355 */
   84    140   
impl RpcEchoInputBuilder {
         141  +
    /* BuilderGenerator.kt:286 */
   85    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* BuilderGenerator.kt:291 */
   86    144   
    pub fn r#as(mut self, input: i32) -> Self {
         145  +
        /* BuilderGenerator.kt:292 */
   87    146   
        self.r#as = ::std::option::Option::Some(input);
         147  +
        /* BuilderGenerator.kt:293 */
   88    148   
        self
         149  +
        /* BuilderGenerator.kt:291 */
   89    150   
    }
         151  +
    /* BuilderGenerator.kt:312 */
   90    152   
    #[allow(missing_docs)] // documentation missing in model
         153  +
                           /* BuilderGenerator.kt:314 */
   91    154   
    pub fn set_as(mut self, input: ::std::option::Option<i32>) -> Self {
         155  +
        /* BuilderGenerator.kt:315 */
   92    156   
        self.r#as = input;
   93    157   
        self
         158  +
        /* BuilderGenerator.kt:314 */
   94    159   
    }
         160  +
    /* BuilderGenerator.kt:334 */
   95    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:336 */
   96    163   
    pub fn get_as(&self) -> &::std::option::Option<i32> {
         164  +
        /* BuilderGenerator.kt:337 */
   97    165   
        &self.r#as
         166  +
        /* BuilderGenerator.kt:336 */
   98    167   
    }
         168  +
    /* BuilderGenerator.kt:286 */
   99    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* BuilderGenerator.kt:291 */
  100    171   
    pub fn r#async(mut self, input: bool) -> Self {
         172  +
        /* BuilderGenerator.kt:292 */
  101    173   
        self.r#async = ::std::option::Option::Some(input);
         174  +
        /* BuilderGenerator.kt:293 */
  102    175   
        self
         176  +
        /* BuilderGenerator.kt:291 */
  103    177   
    }
         178  +
    /* BuilderGenerator.kt:312 */
  104    179   
    #[allow(missing_docs)] // documentation missing in model
         180  +
                           /* BuilderGenerator.kt:314 */
  105    181   
    pub fn set_async(mut self, input: ::std::option::Option<bool>) -> Self {
         182  +
        /* BuilderGenerator.kt:315 */
  106    183   
        self.r#async = input;
  107    184   
        self
         185  +
        /* BuilderGenerator.kt:314 */
  108    186   
    }
         187  +
    /* BuilderGenerator.kt:334 */
  109    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:336 */
  110    190   
    pub fn get_async(&self) -> &::std::option::Option<bool> {
         191  +
        /* BuilderGenerator.kt:337 */
  111    192   
        &self.r#async
         193  +
        /* BuilderGenerator.kt:336 */
  112    194   
    }
         195  +
    /* BuilderGenerator.kt:286 */
  113    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* BuilderGenerator.kt:291 */
  114    198   
    pub fn r#enum(mut self, input: crate::types::UnknownVariantCollidingEnum) -> Self {
         199  +
        /* BuilderGenerator.kt:292 */
  115    200   
        self.r#enum = ::std::option::Option::Some(input);
         201  +
        /* BuilderGenerator.kt:293 */
  116    202   
        self
         203  +
        /* BuilderGenerator.kt:291 */
  117    204   
    }
         205  +
    /* BuilderGenerator.kt:312 */
  118    206   
    #[allow(missing_docs)] // documentation missing in model
         207  +
                           /* BuilderGenerator.kt:314 */
  119    208   
    pub fn set_enum(mut self, input: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>) -> Self {
         209  +
        /* BuilderGenerator.kt:315 */
  120    210   
        self.r#enum = input;
  121    211   
        self
         212  +
        /* BuilderGenerator.kt:314 */
  122    213   
    }
         214  +
    /* BuilderGenerator.kt:334 */
  123    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:336 */
  124    217   
    pub fn get_enum(&self) -> &::std::option::Option<crate::types::UnknownVariantCollidingEnum> {
         218  +
        /* BuilderGenerator.kt:337 */
  125    219   
        &self.r#enum
         220  +
        /* BuilderGenerator.kt:336 */
  126    221   
    }
         222  +
    /* BuilderGenerator.kt:286 */
  127    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* BuilderGenerator.kt:291 */
  128    225   
    pub fn self_(mut self, input: bool) -> Self {
         226  +
        /* BuilderGenerator.kt:292 */
  129    227   
        self.self_ = ::std::option::Option::Some(input);
         228  +
        /* BuilderGenerator.kt:293 */
  130    229   
        self
         230  +
        /* BuilderGenerator.kt:291 */
  131    231   
    }
         232  +
    /* BuilderGenerator.kt:312 */
  132    233   
    #[allow(missing_docs)] // documentation missing in model
         234  +
                           /* BuilderGenerator.kt:314 */
  133    235   
    pub fn set_self(mut self, input: ::std::option::Option<bool>) -> Self {
         236  +
        /* BuilderGenerator.kt:315 */
  134    237   
        self.self_ = input;
  135    238   
        self
         239  +
        /* BuilderGenerator.kt:314 */
  136    240   
    }
         241  +
    /* BuilderGenerator.kt:334 */
  137    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:336 */
  138    244   
    pub fn get_self(&self) -> &::std::option::Option<bool> {
         245  +
        /* BuilderGenerator.kt:337 */
  139    246   
        &self.self_
         247  +
        /* BuilderGenerator.kt:336 */
  140    248   
    }
         249  +
    /* BuilderGenerator.kt:286 */
  141    250   
    #[allow(missing_docs)] // documentation missing in model
         251  +
                           /* BuilderGenerator.kt:291 */
  142    252   
    pub fn crate_(mut self, input: bool) -> Self {
         253  +
        /* BuilderGenerator.kt:292 */
  143    254   
        self.crate_ = ::std::option::Option::Some(input);
         255  +
        /* BuilderGenerator.kt:293 */
  144    256   
        self
         257  +
        /* BuilderGenerator.kt:291 */
  145    258   
    }
         259  +
    /* BuilderGenerator.kt:312 */
  146    260   
    #[allow(missing_docs)] // documentation missing in model
         261  +
                           /* BuilderGenerator.kt:314 */
  147    262   
    pub fn set_crate(mut self, input: ::std::option::Option<bool>) -> Self {
         263  +
        /* BuilderGenerator.kt:315 */
  148    264   
        self.crate_ = input;
  149    265   
        self
         266  +
        /* BuilderGenerator.kt:314 */
  150    267   
    }
         268  +
    /* BuilderGenerator.kt:334 */
  151    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:336 */
  152    271   
    pub fn get_crate(&self) -> &::std::option::Option<bool> {
         272  +
        /* BuilderGenerator.kt:337 */
  153    273   
        &self.crate_
         274  +
        /* BuilderGenerator.kt:336 */
  154    275   
    }
         276  +
    /* BuilderGenerator.kt:286 */
  155    277   
    #[allow(missing_docs)] // documentation missing in model
         278  +
                           /* BuilderGenerator.kt:291 */
  156    279   
    pub fn super_(mut self, input: bool) -> Self {
         280  +
        /* BuilderGenerator.kt:292 */
  157    281   
        self.super_ = ::std::option::Option::Some(input);
         282  +
        /* BuilderGenerator.kt:293 */
  158    283   
        self
         284  +
        /* BuilderGenerator.kt:291 */
  159    285   
    }
         286  +
    /* BuilderGenerator.kt:312 */
  160    287   
    #[allow(missing_docs)] // documentation missing in model
         288  +
                           /* BuilderGenerator.kt:314 */
  161    289   
    pub fn set_super(mut self, input: ::std::option::Option<bool>) -> Self {
         290  +
        /* BuilderGenerator.kt:315 */
  162    291   
        self.super_ = input;
  163    292   
        self
         293  +
        /* BuilderGenerator.kt:314 */
  164    294   
    }
         295  +
    /* BuilderGenerator.kt:334 */
  165    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:336 */
  166    298   
    pub fn get_super(&self) -> &::std::option::Option<bool> {
         299  +
        /* BuilderGenerator.kt:337 */
  167    300   
        &self.super_
         301  +
        /* BuilderGenerator.kt:336 */
  168    302   
    }
         303  +
    /* BuilderGenerator.kt:286 */
  169    304   
    #[allow(missing_docs)] // documentation missing in model
         305  +
                           /* BuilderGenerator.kt:291 */
  170    306   
    pub fn build_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         307  +
        /* BuilderGenerator.kt:292 */
  171    308   
        self.build_value = ::std::option::Option::Some(input.into());
         309  +
        /* BuilderGenerator.kt:293 */
  172    310   
        self
         311  +
        /* BuilderGenerator.kt:291 */
  173    312   
    }
         313  +
    /* BuilderGenerator.kt:312 */
  174    314   
    #[allow(missing_docs)] // documentation missing in model
         315  +
                           /* BuilderGenerator.kt:314 */
  175    316   
    pub fn set_build(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         317  +
        /* BuilderGenerator.kt:315 */
  176    318   
        self.build_value = input;
  177    319   
        self
         320  +
        /* BuilderGenerator.kt:314 */
  178    321   
    }
         322  +
    /* BuilderGenerator.kt:334 */
  179    323   
    #[allow(missing_docs)] // documentation missing in model
         324  +
                           /* BuilderGenerator.kt:336 */
  180    325   
    pub fn get_build(&self) -> &::std::option::Option<::std::string::String> {
         326  +
        /* BuilderGenerator.kt:337 */
  181    327   
        &self.build_value
         328  +
        /* BuilderGenerator.kt:336 */
  182    329   
    }
         330  +
    /* BuilderGenerator.kt:286 */
  183    331   
    #[allow(missing_docs)] // documentation missing in model
         332  +
                           /* BuilderGenerator.kt:291 */
  184    333   
    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         334  +
        /* BuilderGenerator.kt:292 */
  185    335   
        self.default_value = ::std::option::Option::Some(input.into());
         336  +
        /* BuilderGenerator.kt:293 */
  186    337   
        self
         338  +
        /* BuilderGenerator.kt:291 */
  187    339   
    }
         340  +
    /* BuilderGenerator.kt:312 */
  188    341   
    #[allow(missing_docs)] // documentation missing in model
         342  +
                           /* BuilderGenerator.kt:314 */
  189    343   
    pub fn set_default(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         344  +
        /* BuilderGenerator.kt:315 */
  190    345   
        self.default_value = input;
  191    346   
        self
         347  +
        /* BuilderGenerator.kt:314 */
  192    348   
    }
         349  +
    /* BuilderGenerator.kt:334 */
  193    350   
    #[allow(missing_docs)] // documentation missing in model
         351  +
                           /* BuilderGenerator.kt:336 */
  194    352   
    pub fn get_default(&self) -> &::std::option::Option<::std::string::String> {
         353  +
        /* BuilderGenerator.kt:337 */
  195    354   
        &self.default_value
         355  +
        /* BuilderGenerator.kt:336 */
  196    356   
    }
         357  +
    /* BuilderGenerator.kt:286 */
  197    358   
    #[allow(missing_docs)] // documentation missing in model
         359  +
                           /* BuilderGenerator.kt:291 */
  198    360   
    pub fn send_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         361  +
        /* BuilderGenerator.kt:292 */
  199    362   
        self.send_value = ::std::option::Option::Some(input.into());
         363  +
        /* BuilderGenerator.kt:293 */
  200    364   
        self
         365  +
        /* BuilderGenerator.kt:291 */
  201    366   
    }
         367  +
    /* BuilderGenerator.kt:312 */
  202    368   
    #[allow(missing_docs)] // documentation missing in model
         369  +
                           /* BuilderGenerator.kt:314 */
  203    370   
    pub fn set_send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         371  +
        /* BuilderGenerator.kt:315 */
  204    372   
        self.send_value = input;
  205    373   
        self
         374  +
        /* BuilderGenerator.kt:314 */
  206    375   
    }
         376  +
    /* BuilderGenerator.kt:334 */
  207    377   
    #[allow(missing_docs)] // documentation missing in model
         378  +
                           /* BuilderGenerator.kt:336 */
  208    379   
    pub fn get_send(&self) -> &::std::option::Option<::std::string::String> {
         380  +
        /* BuilderGenerator.kt:337 */
  209    381   
        &self.send_value
         382  +
        /* BuilderGenerator.kt:336 */
  210    383   
    }
  211         -
    /// Consumes the builder and constructs a [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         384  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RpcEchoInput`](crate::operation::rpc_echo::RpcEchoInput).
         385  +
    /* BuilderGenerator.kt:253 */
  212    386   
    pub fn build(self) -> ::std::result::Result<crate::operation::rpc_echo::RpcEchoInput, ::aws_smithy_types::error::operation::BuildError> {
  213         -
        ::std::result::Result::Ok(crate::operation::rpc_echo::RpcEchoInput {
  214         -
            r#as: self.r#as,
  215         -
            r#async: self.r#async,
  216         -
            r#enum: self.r#enum,
  217         -
            self_: self.self_,
  218         -
            crate_: self.crate_,
  219         -
            super_: self.super_,
  220         -
            build_value: self.build_value,
  221         -
            default_value: self.default_value,
  222         -
            send_value: self.send_value,
  223         -
        })
  224         -
    }
         387  +
        /* BuilderGenerator.kt:254 */
         388  +
        ::std::result::Result::Ok(
         389  +
            /* BuilderGenerator.kt:477 */
         390  +
            crate::operation::rpc_echo::RpcEchoInput {
         391  +
                /* BuilderGenerator.kt:481 */ r#as: self.r#as,
         392  +
                /* BuilderGenerator.kt:481 */
         393  +
                r#async: self.r#async,
         394  +
                /* BuilderGenerator.kt:481 */
         395  +
                r#enum: self.r#enum,
         396  +
                /* BuilderGenerator.kt:481 */
         397  +
                self_: self.self_,
         398  +
                /* BuilderGenerator.kt:481 */
         399  +
                crate_: self.crate_,
         400  +
                /* BuilderGenerator.kt:481 */
         401  +
                super_: self.super_,
         402  +
                /* BuilderGenerator.kt:481 */
         403  +
                build_value: self.build_value,
         404  +
                /* BuilderGenerator.kt:481 */
         405  +
                default_value: self.default_value,
         406  +
                /* BuilderGenerator.kt:481 */
         407  +
                send_value: self.send_value,
         408  +
                /* BuilderGenerator.kt:477 */
         409  +
            }, /* BuilderGenerator.kt:254 */
         410  +
        )
         411  +
        /* BuilderGenerator.kt:253 */
         412  +
    }
         413  +
    /* BuilderGenerator.kt:355 */
  225    414   
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo/_rpc_echo_output.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo/builders.rs

@@ -1,1 +227,293 @@
    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::rpc_echo::_rpc_echo_output::RpcEchoOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::rpc_echo::_rpc_echo_input::RpcEchoInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::rpc_echo::builders::RpcEchoInputBuilder {
    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::rpc_echo::RpcEchoOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::rpc_echo::RPCEchoError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.rpc_echo();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `RPCEcho`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `RPCEcho`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct RPCEchoFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::rpc_echo::builders::RpcEchoInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl crate::client::customize::internal::CustomizableSend<crate::operation::rpc_echo::RpcEchoOutput, crate::operation::rpc_echo::RPCEchoError>
   32     38   
    for RPCEchoFluentBuilder
   33     39   
{
   34     40   
    fn send(
   35     41   
        self,
   36     42   
        config_override: crate::config::Builder,
   37     43   
    ) -> crate::client::customize::internal::BoxFuture<
   38     44   
        crate::client::customize::internal::SendResult<crate::operation::rpc_echo::RpcEchoOutput, crate::operation::rpc_echo::RPCEchoError>,
   39     45   
    > {
   40     46   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   41     47   
    }
   42     48   
}
          49  +
/* FluentBuilderGenerator.kt:282 */
   43     50   
impl RPCEchoFluentBuilder {
          51  +
    /* FluentBuilderGenerator.kt:288 */
   44     52   
    /// Creates a new `RPCEchoFluentBuilder`.
   45     53   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   46     54   
        Self {
   47     55   
            handle,
   48     56   
            inner: ::std::default::Default::default(),
   49     57   
            config_override: ::std::option::Option::None,
   50     58   
        }
   51     59   
    }
          60  +
    /* FluentBuilderGenerator.kt:301 */
   52     61   
    /// Access the RPCEcho as a reference.
   53     62   
    pub fn as_input(&self) -> &crate::operation::rpc_echo::builders::RpcEchoInputBuilder {
   54     63   
        &self.inner
   55     64   
    }
          65  +
    /* FluentBuilderGenerator.kt:145 */
   56     66   
    /// Sends the request and returns the response.
   57     67   
    ///
   58     68   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   59     69   
    /// can be matched against.
   60     70   
    ///
   61     71   
    /// By default, any retryable failures will be retried twice. Retry behavior
   62     72   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   63     73   
    /// set when configuring the client.
   64     74   
    pub async fn send(
   65     75   
        self,
   66     76   
    ) -> ::std::result::Result<
   67     77   
        crate::operation::rpc_echo::RpcEchoOutput,
   68     78   
        ::aws_smithy_runtime_api::client::result::SdkError<
   69     79   
            crate::operation::rpc_echo::RPCEchoError,
   70     80   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   71     81   
        >,
   72     82   
    > {
   73     83   
        let input = self
   74     84   
            .inner
   75     85   
            .build()
   76     86   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   77     87   
        let runtime_plugins = crate::operation::rpc_echo::RPCEcho::operation_runtime_plugins(
   78     88   
            self.handle.runtime_plugins.clone(),
   79     89   
            &self.handle.conf,
   80     90   
            self.config_override,
   81     91   
        );
   82     92   
        crate::operation::rpc_echo::RPCEcho::orchestrate(&runtime_plugins, input).await
   83     93   
    }
   84     94   
   85     95   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   86     96   
    pub fn customize(
   87     97   
        self,
   88     98   
    ) -> crate::client::customize::CustomizableOperation<crate::operation::rpc_echo::RpcEchoOutput, crate::operation::rpc_echo::RPCEchoError, Self>
   89     99   
    {
   90    100   
        crate::client::customize::CustomizableOperation::new(self)
   91    101   
    }
         102  +
    /* FluentBuilderGenerator.kt:315 */
   92    103   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
   93    104   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
   94    105   
        self
   95    106   
    }
   96    107   
   97    108   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
   98    109   
        self.config_override = config_override;
   99    110   
        self
  100    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:498 */
  101    113   
    #[allow(missing_docs)] // documentation missing in model
         114  +
                           /* FluentBuilderGenerator.kt:500 */
  102    115   
    pub fn r#as(mut self, input: i32) -> Self {
  103    116   
        self.inner = self.inner.r#as(input);
  104    117   
        self
  105    118   
    }
         119  +
    /* FluentBuilderGenerator.kt:498 */
  106    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* FluentBuilderGenerator.kt:500 */
  107    122   
    pub fn set_as(mut self, input: ::std::option::Option<i32>) -> Self {
  108    123   
        self.inner = self.inner.set_as(input);
  109    124   
        self
  110    125   
    }
         126  +
    /* FluentBuilderGenerator.kt:518 */
  111    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:520 */
  112    129   
    pub fn get_as(&self) -> &::std::option::Option<i32> {
  113    130   
        self.inner.get_as()
  114    131   
    }
         132  +
    /* FluentBuilderGenerator.kt:498 */
  115    133   
    #[allow(missing_docs)] // documentation missing in model
         134  +
                           /* FluentBuilderGenerator.kt:500 */
  116    135   
    pub fn r#async(mut self, input: bool) -> Self {
  117    136   
        self.inner = self.inner.r#async(input);
  118    137   
        self
  119    138   
    }
         139  +
    /* FluentBuilderGenerator.kt:498 */
  120    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* FluentBuilderGenerator.kt:500 */
  121    142   
    pub fn set_async(mut self, input: ::std::option::Option<bool>) -> Self {
  122    143   
        self.inner = self.inner.set_async(input);
  123    144   
        self
  124    145   
    }
         146  +
    /* FluentBuilderGenerator.kt:518 */
  125    147   
    #[allow(missing_docs)] // documentation missing in model
         148  +
                           /* FluentBuilderGenerator.kt:520 */
  126    149   
    pub fn get_async(&self) -> &::std::option::Option<bool> {
  127    150   
        self.inner.get_async()
  128    151   
    }
         152  +
    /* FluentBuilderGenerator.kt:498 */
  129    153   
    #[allow(missing_docs)] // documentation missing in model
         154  +
                           /* FluentBuilderGenerator.kt:500 */
  130    155   
    pub fn r#enum(mut self, input: crate::types::UnknownVariantCollidingEnum) -> Self {
  131    156   
        self.inner = self.inner.r#enum(input);
  132    157   
        self
  133    158   
    }
         159  +
    /* FluentBuilderGenerator.kt:498 */
  134    160   
    #[allow(missing_docs)] // documentation missing in model
         161  +
                           /* FluentBuilderGenerator.kt:500 */
  135    162   
    pub fn set_enum(mut self, input: ::std::option::Option<crate::types::UnknownVariantCollidingEnum>) -> Self {
  136    163   
        self.inner = self.inner.set_enum(input);
  137    164   
        self
  138    165   
    }
         166  +
    /* FluentBuilderGenerator.kt:518 */
  139    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* FluentBuilderGenerator.kt:520 */
  140    169   
    pub fn get_enum(&self) -> &::std::option::Option<crate::types::UnknownVariantCollidingEnum> {
  141    170   
        self.inner.get_enum()
  142    171   
    }
         172  +
    /* FluentBuilderGenerator.kt:498 */
  143    173   
    #[allow(missing_docs)] // documentation missing in model
         174  +
                           /* FluentBuilderGenerator.kt:500 */
  144    175   
    pub fn self_(mut self, input: bool) -> Self {
  145    176   
        self.inner = self.inner.self_(input);
  146    177   
        self
  147    178   
    }
         179  +
    /* FluentBuilderGenerator.kt:498 */
  148    180   
    #[allow(missing_docs)] // documentation missing in model
         181  +
                           /* FluentBuilderGenerator.kt:500 */
  149    182   
    pub fn set_self(mut self, input: ::std::option::Option<bool>) -> Self {
  150    183   
        self.inner = self.inner.set_self(input);
  151    184   
        self
  152    185   
    }
         186  +
    /* FluentBuilderGenerator.kt:518 */
  153    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* FluentBuilderGenerator.kt:520 */
  154    189   
    pub fn get_self(&self) -> &::std::option::Option<bool> {
  155    190   
        self.inner.get_self()
  156    191   
    }
         192  +
    /* FluentBuilderGenerator.kt:498 */
  157    193   
    #[allow(missing_docs)] // documentation missing in model
         194  +
                           /* FluentBuilderGenerator.kt:500 */
  158    195   
    pub fn crate_(mut self, input: bool) -> Self {
  159    196   
        self.inner = self.inner.crate_(input);
  160    197   
        self
  161    198   
    }
         199  +
    /* FluentBuilderGenerator.kt:498 */
  162    200   
    #[allow(missing_docs)] // documentation missing in model
         201  +
                           /* FluentBuilderGenerator.kt:500 */
  163    202   
    pub fn set_crate(mut self, input: ::std::option::Option<bool>) -> Self {
  164    203   
        self.inner = self.inner.set_crate(input);
  165    204   
        self
  166    205   
    }
         206  +
    /* FluentBuilderGenerator.kt:518 */
  167    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
                           /* FluentBuilderGenerator.kt:520 */
  168    209   
    pub fn get_crate(&self) -> &::std::option::Option<bool> {
  169    210   
        self.inner.get_crate()
  170    211   
    }
         212  +
    /* FluentBuilderGenerator.kt:498 */
  171    213   
    #[allow(missing_docs)] // documentation missing in model
         214  +
                           /* FluentBuilderGenerator.kt:500 */
  172    215   
    pub fn super_(mut self, input: bool) -> Self {
  173    216   
        self.inner = self.inner.super_(input);
  174    217   
        self
  175    218   
    }
         219  +
    /* FluentBuilderGenerator.kt:498 */
  176    220   
    #[allow(missing_docs)] // documentation missing in model
         221  +
                           /* FluentBuilderGenerator.kt:500 */
  177    222   
    pub fn set_super(mut self, input: ::std::option::Option<bool>) -> Self {
  178    223   
        self.inner = self.inner.set_super(input);
  179    224   
        self
  180    225   
    }
         226  +
    /* FluentBuilderGenerator.kt:518 */
  181    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* FluentBuilderGenerator.kt:520 */
  182    229   
    pub fn get_super(&self) -> &::std::option::Option<bool> {
  183    230   
        self.inner.get_super()
  184    231   
    }
         232  +
    /* FluentBuilderGenerator.kt:498 */
  185    233   
    #[allow(missing_docs)] // documentation missing in model
         234  +
                           /* FluentBuilderGenerator.kt:500 */
  186    235   
    pub fn build_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  187    236   
        self.inner = self.inner.build_value(input.into());
  188    237   
        self
  189    238   
    }
         239  +
    /* FluentBuilderGenerator.kt:498 */
  190    240   
    #[allow(missing_docs)] // documentation missing in model
         241  +
                           /* FluentBuilderGenerator.kt:500 */
  191    242   
    pub fn set_build(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  192    243   
        self.inner = self.inner.set_build(input);
  193    244   
        self
  194    245   
    }
         246  +
    /* FluentBuilderGenerator.kt:518 */
  195    247   
    #[allow(missing_docs)] // documentation missing in model
         248  +
                           /* FluentBuilderGenerator.kt:520 */
  196    249   
    pub fn get_build(&self) -> &::std::option::Option<::std::string::String> {
  197    250   
        self.inner.get_build()
  198    251   
    }
         252  +
    /* FluentBuilderGenerator.kt:498 */
  199    253   
    #[allow(missing_docs)] // documentation missing in model
         254  +
                           /* FluentBuilderGenerator.kt:500 */
  200    255   
    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  201    256   
        self.inner = self.inner.default_value(input.into());
  202    257   
        self
  203    258   
    }
         259  +
    /* FluentBuilderGenerator.kt:498 */
  204    260   
    #[allow(missing_docs)] // documentation missing in model
         261  +
                           /* FluentBuilderGenerator.kt:500 */
  205    262   
    pub fn set_default(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  206    263   
        self.inner = self.inner.set_default(input);
  207    264   
        self
  208    265   
    }
         266  +
    /* FluentBuilderGenerator.kt:518 */
  209    267   
    #[allow(missing_docs)] // documentation missing in model
         268  +
                           /* FluentBuilderGenerator.kt:520 */
  210    269   
    pub fn get_default(&self) -> &::std::option::Option<::std::string::String> {
  211    270   
        self.inner.get_default()
  212    271   
    }
         272  +
    /* FluentBuilderGenerator.kt:498 */
  213    273   
    #[allow(missing_docs)] // documentation missing in model
         274  +
                           /* FluentBuilderGenerator.kt:500 */
  214    275   
    pub fn send_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  215    276   
        self.inner = self.inner.send_value(input.into());
  216    277   
        self
  217    278   
    }
         279  +
    /* FluentBuilderGenerator.kt:498 */
  218    280   
    #[allow(missing_docs)] // documentation missing in model
         281  +
                           /* FluentBuilderGenerator.kt:500 */
  219    282   
    pub fn set_send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  220    283   
        self.inner = self.inner.set_send(input);
  221    284   
        self
  222    285   
    }
         286  +
    /* FluentBuilderGenerator.kt:518 */
  223    287   
    #[allow(missing_docs)] // documentation missing in model
         288  +
                           /* FluentBuilderGenerator.kt:520 */
  224    289   
    pub fn get_send(&self) -> &::std::option::Option<::std::string::String> {
  225    290   
        self.inner.get_send()
  226    291   
    }
         292  +
    /* FluentBuilderGenerator.kt:282 */
  227    293   
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning.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 `StructureNamePunning`.
           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 StructureNamePunning;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl StructureNamePunning {
    7         -
    /// Creates a new `StructureNamePunning`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `StructureNamePunning`
          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::structure_name_punning::StructureNamePunningInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::structure_name_punning::StructureNamePunningOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::structure_name_punning::StructureNamePunningError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +372,448 @@
   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 StructureNamePunning {
   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("StructureNamePunning");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            StructureNamePunningRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            StructureNamePunningResponseDeserializer,
   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   
            "StructureNamePunning",
  105    116   
            "Config",
  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("StructureNamePunning")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(StructureNamePunningEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::structure_name_punning::StructureNamePunningError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::structure_name_punning::StructureNamePunningError,
  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 StructureNamePunningResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StructureNamePunningResponseDeserializer {
  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_structure_name_punning::de_structure_name_punning_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_structure_name_punning::de_structure_name_punning_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 StructureNamePunningRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StructureNamePunningRequestSerializer {
  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::structure_name_punning::StructureNamePunningInput>()
  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::structure_name_punning::StructureNamePunningInput,
  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::structure_name_punning::StructureNamePunningInput,
  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-amz-json-1.1");
  187    200   
            builder = _header_serialization_settings.set_default_header(
  188    201   
                builder,
  189    202   
                ::http::header::HeaderName::from_static("x-amz-target"),
  190    203   
                "Config.StructureNamePunning",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_input(
  195    208   
            &input,
  196    209   
        )?);
  197    210   
        if let Some(content_length) = body.content_length() {
  198    211   
            let content_length = content_length.to_string();
  199    212   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  200    213   
        }
  201    214   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    215   
    }
  203    216   
}
         217  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  204    218   
#[derive(Debug)]
  205    219   
struct StructureNamePunningEndpointParamsInterceptor;
  206    220   
  207    221   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StructureNamePunningEndpointParamsInterceptor {
  208    222   
    fn name(&self) -> &'static str {
  209    223   
        "StructureNamePunningEndpointParamsInterceptor"
  210    224   
    }
  211    225   
  212    226   
    fn read_before_execution(
  213    227   
        &self,
  214    228   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  215    229   
            '_,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  219    233   
        >,
  220    234   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  221    235   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  222    236   
        let _input = context
  223    237   
            .input()
  224    238   
            .downcast_ref::<StructureNamePunningInput>()
  225    239   
            .ok_or("failed to downcast to StructureNamePunningInput")?;
  226    240   
  227    241   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  228    242   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  229    243   
        })?;
  230    244   
        cfg.interceptor_state()
  231    245   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  232    246   
        ::std::result::Result::Ok(())
  233    247   
    }
  234    248   
}
  235    249   
  236    250   
// The get_* functions below are generated from JMESPath expressions in the
  237    251   
// operationContextParams trait. They target the operation's input shape.
  238    252   
         253  +
/* RustType.kt:516 */
  239    254   
#[allow(unreachable_code, unused_variables)]
         255  +
/* RustType.kt:516 */
  240    256   
#[cfg(test)]
         257  +
/* ProtocolTestGenerator.kt:98 */
  241    258   
mod structure_name_punning_test {
  242    259   
  243    260   
    /// Test ID: structure_punning
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
  246    263   
    async fn structure_punning_request() {
  247    264   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  248    265   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  249    266   
  250    267   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  251    268   
        let result = client
  252    269   
            .structure_name_punning()
  253    270   
            .set_regular_string(::std::option::Option::Some("hello!".to_owned()))
  254    271   
            .send()
  255    272   
            .await;
  256    273   
        let _ = dbg!(result);
  257    274   
        let http_request = request_receiver.expect_request();
  258    275   
        let expected_headers = [
  259    276   
            ("Content-Type", "application/x-amz-json-1.1"),
  260    277   
            ("X-Amz-Target", "Config.StructureNamePunning"),
  261    278   
        ];
  262    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  263    280   
        let body = http_request.body().bytes().expect("body should be strict");
  264    281   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  265    282   
            body,
  266    283   
            "{\"regular_string\": \"hello!\"}",
  267    284   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  268    285   
        ));
  269    286   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  270    287   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  271    288   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  272    289   
    }
         290  +
         291  +
    /* ProtocolTestGenerator.kt:98 */
  273    292   
}
  274    293   
         294  +
/* OperationErrorGenerator.kt:79 */
  275    295   
/// Error type for the `StructureNamePunningError` operation.
         296  +
/* RustType.kt:516 */
  276    297   
#[non_exhaustive]
         298  +
/* RustType.kt:516 */
  277    299   
#[derive(::std::fmt::Debug)]
  278         -
pub enum StructureNamePunningError {
         300  +
pub /* OperationErrorGenerator.kt:81 */ enum StructureNamePunningError {
         301  +
    /* OperationErrorGenerator.kt:88 */
  279    302   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  280    303   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  281    304   
    variable wildcard pattern and check `.code()`:
  282    305   
     \
  283    306   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  284    307   
     \
  285    308   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StructureNamePunningError) for what information is available for the error.")]
  286    309   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         310  +
    /* OperationErrorGenerator.kt:81 */
  287    311   
}
         312  +
/* OperationErrorGenerator.kt:218 */
  288    313   
impl StructureNamePunningError {
         314  +
    /* OperationErrorGenerator.kt:219 */
  289    315   
    /// Creates the `StructureNamePunningError::Unhandled` variant from any error type.
  290    316   
    pub fn unhandled(
  291    317   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  292    318   
    ) -> Self {
  293    319   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  294    320   
            source: err.into(),
  295    321   
            meta: ::std::default::Default::default(),
  296    322   
        })
  297    323   
    }
  298    324   
  299    325   
    /// Creates the `StructureNamePunningError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  300    326   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  301    327   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  302    328   
            source: err.clone().into(),
  303    329   
            meta: err,
  304    330   
        })
  305    331   
    }
  306         -
    ///
         332  +
    /// /* OperationErrorGenerator.kt:236 */
  307    333   
    /// Returns error metadata, which includes the error code, message,
  308    334   
    /// request ID, and potentially additional information.
  309    335   
    ///
         336  +
    /* OperationErrorGenerator.kt:242 */
  310    337   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         338  +
        /* OperationErrorGenerator.kt:243 */
  311    339   
        match self {
  312         -
            Self::Unhandled(e) => &e.meta,
         340  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         341  +
            /* OperationErrorGenerator.kt:243 */
  313    342   
        }
         343  +
        /* OperationErrorGenerator.kt:242 */
  314    344   
    }
         345  +
    /* OperationErrorGenerator.kt:218 */
  315    346   
}
         347  +
/* OperationErrorGenerator.kt:269 */
  316    348   
impl ::std::error::Error for StructureNamePunningError {
         349  +
    /* OperationErrorGenerator.kt:270 */
  317    350   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         351  +
        /* OperationErrorGenerator.kt:318 */
  318    352   
        match self {
  319         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         353  +
            /* OperationErrorGenerator.kt:326 */
         354  +
            Self::Unhandled(_inner) => {
         355  +
                /* OperationErrorGenerator.kt:279 */
         356  +
                ::std::option::Option::Some(&*_inner.source)
         357  +
                /* OperationErrorGenerator.kt:326 */
         358  +
            } /* OperationErrorGenerator.kt:318 */
  320    359   
        }
         360  +
        /* OperationErrorGenerator.kt:270 */
  321    361   
    }
         362  +
    /* OperationErrorGenerator.kt:269 */
  322    363   
}
         364  +
/* OperationErrorGenerator.kt:133 */
  323    365   
impl ::std::fmt::Display for StructureNamePunningError {
         366  +
    /* OperationErrorGenerator.kt:134 */
  324    367   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         368  +
        /* OperationErrorGenerator.kt:318 */
  325    369   
        match self {
         370  +
            /* OperationErrorGenerator.kt:326 */
  326    371   
            Self::Unhandled(_inner) => {
         372  +
                /* OperationErrorGenerator.kt:139 */
  327    373   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  328    374   
                    write!(f, "unhandled error ({code})")
  329    375   
                } else {
  330    376   
                    f.write_str("unhandled error")
  331    377   
                }
  332         -
            }
         378  +
                /* OperationErrorGenerator.kt:326 */
         379  +
            } /* OperationErrorGenerator.kt:318 */
  333    380   
        }
         381  +
        /* OperationErrorGenerator.kt:134 */
  334    382   
    }
         383  +
    /* OperationErrorGenerator.kt:133 */
  335    384   
}
         385  +
/* OperationErrorGenerator.kt:182 */
  336    386   
impl ::aws_smithy_types::retry::ProvideErrorKind for StructureNamePunningError {
         387  +
    /* OperationErrorGenerator.kt:186 */
  337    388   
    fn code(&self) -> ::std::option::Option<&str> {
         389  +
        /* OperationErrorGenerator.kt:187 */
  338    390   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         391  +
        /* OperationErrorGenerator.kt:186 */
  339    392   
    }
         393  +
    /* OperationErrorGenerator.kt:190 */
  340    394   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         395  +
        /* OperationErrorGenerator.kt:197 */
  341    396   
        ::std::option::Option::None
         397  +
        /* OperationErrorGenerator.kt:190 */
  342    398   
    }
         399  +
    /* OperationErrorGenerator.kt:182 */
  343    400   
}
         401  +
/* OperationErrorGenerator.kt:163 */
  344    402   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StructureNamePunningError {
         403  +
    /* OperationErrorGenerator.kt:164 */
  345    404   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         405  +
        /* OperationErrorGenerator.kt:318 */
  346    406   
        match self {
  347         -
            Self::Unhandled(_inner) => &_inner.meta,
         407  +
            /* OperationErrorGenerator.kt:326 */
         408  +
            Self::Unhandled(_inner) => {
         409  +
                /* OperationErrorGenerator.kt:168 */
         410  +
                &_inner.meta
         411  +
                /* OperationErrorGenerator.kt:326 */
         412  +
            } /* OperationErrorGenerator.kt:318 */
  348    413   
        }
         414  +
        /* OperationErrorGenerator.kt:164 */
  349    415   
    }
         416  +
    /* OperationErrorGenerator.kt:163 */
  350    417   
}
         418  +
/* OperationErrorGenerator.kt:109 */
  351    419   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StructureNamePunningError {
         420  +
    /* OperationErrorGenerator.kt:110 */
  352    421   
    fn create_unhandled_error(
  353    422   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  354    423   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  355    424   
    ) -> Self {
         425  +
        /* OperationErrorGenerator.kt:121 */
  356    426   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  357    427   
            source,
  358    428   
            meta: meta.unwrap_or_default(),
  359    429   
        })
         430  +
        /* OperationErrorGenerator.kt:110 */
  360    431   
    }
         432  +
    /* OperationErrorGenerator.kt:109 */
  361    433   
}
  362    434   
         435  +
/* CodegenDelegator.kt:255 */
  363    436   
pub use crate::operation::structure_name_punning::_structure_name_punning_output::StructureNamePunningOutput;
  364    437   
         438  +
/* CodegenDelegator.kt:255 */
  365    439   
pub use crate::operation::structure_name_punning::_structure_name_punning_input::StructureNamePunningInput;
  366    440   
         441  +
/* RustModule.kt:172 */
  367    442   
mod _structure_name_punning_input;
  368    443   
         444  +
/* RustModule.kt:172 */
  369    445   
mod _structure_name_punning_output;
  370    446   
  371         -
/// Builders
         447  +
/// /* CodegenDelegator.kt:51 */Builders
  372    448   
pub mod builders;

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning/_structure_name_punning_input.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning/_structure_name_punning_output.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning/builders.rs

@@ -1,1 +138,162 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::structure_name_punning::_structure_name_punning_output::StructureNamePunningOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::structure_name_punning::_structure_name_punning_input::StructureNamePunningInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::structure_name_punning::builders::StructureNamePunningInputBuilder {
    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::structure_name_punning::StructureNamePunningOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::structure_name_punning::StructureNamePunningError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.structure_name_punning();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `StructureNamePunning`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `StructureNamePunning`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct StructureNamePunningFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::structure_name_punning::builders::StructureNamePunningInputBuilder,
   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::structure_name_punning::StructureNamePunningOutput,
   34     40   
        crate::operation::structure_name_punning::StructureNamePunningError,
   35     41   
    > for StructureNamePunningFluentBuilder
   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::structure_name_punning::StructureNamePunningOutput,
   43     49   
            crate::operation::structure_name_punning::StructureNamePunningError,
   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 StructureNamePunningFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `StructureNamePunningFluentBuilder`.
   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 StructureNamePunning as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::structure_name_punning::builders::StructureNamePunningInputBuilder {
   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::structure_name_punning::StructureNamePunningOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::structure_name_punning::StructureNamePunningError,
   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::structure_name_punning::StructureNamePunning::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::structure_name_punning::StructureNamePunning::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::structure_name_punning::StructureNamePunningOutput,
   96    106   
        crate::operation::structure_name_punning::StructureNamePunningError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn regular_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.regular_string(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_regular_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_regular_string(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_regular_string(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_regular_string()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn punned_vec(mut self, input: crate::types::Vec) -> Self {
  126    145   
        self.inner = self.inner.punned_vec(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_punned_vec(mut self, input: ::std::option::Option<crate::types::Vec>) -> Self {
  131    152   
        self.inner = self.inner.set_punned_vec(input);
  132    153   
        self
  133    154   
    }
         155  +
    /* FluentBuilderGenerator.kt:518 */
  134    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:520 */
  135    158   
    pub fn get_punned_vec(&self) -> &::std::option::Option<crate::types::Vec> {
  136    159   
        self.inner.get_punned_vec()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:282 */
  138    162   
}