Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +110,122 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::err_collisions::_err_collisions_output::ErrCollisionsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::err_collisions::_err_collisions_input::ErrCollisionsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::err_collisions::builders::ErrCollisionsInputBuilder {
    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::err_collisions::ErrCollisionsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::err_collisions::ErrCollisionsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.err_collisions();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ErrCollisions`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ErrCollisions`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct ErrCollisionsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::err_collisions::builders::ErrCollisionsInputBuilder,
   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::err_collisions::ErrCollisionsOutput,
   34     40   
        crate::operation::err_collisions::ErrCollisionsError,
   35     41   
    > for ErrCollisionsFluentBuilder
   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::err_collisions::ErrCollisionsOutput,
   43     49   
            crate::operation::err_collisions::ErrCollisionsError,
   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 ErrCollisionsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `ErrCollisionsFluentBuilder`.
   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 ErrCollisions as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::err_collisions::builders::ErrCollisionsInputBuilder {
   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::err_collisions::ErrCollisionsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::err_collisions::ErrCollisionsError,
   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::err_collisions::ErrCollisions::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::err_collisions::ErrCollisions::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::err_collisions::ErrCollisionsOutput,
   96    106   
        crate::operation::err_collisions::ErrCollisionsError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:282 */
  110    122   
}

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/match_/_match_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 MatchInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct MatchInput {
           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 MatchInput {
          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 MatchInput {
   64         -
    /// Creates a new builder-style object to manufacture [`MatchInput`](crate::operation::match_::MatchInput).
         111  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MatchInput`](crate::operation::match_::MatchInput).
         112  +
    /* BuilderGenerator.kt:175 */
   65    113   
    pub fn builder() -> crate::operation::match_::builders::MatchInputBuilder {
         114  +
        /* BuilderGenerator.kt:176 */
   66    115   
        crate::operation::match_::builders::MatchInputBuilder::default()
         116  +
        /* BuilderGenerator.kt:175 */
   67    117   
    }
         118  +
    /* ClientCodegenVisitor.kt:237 */
   68    119   
}
   69    120   
   70         -
/// A builder for [`MatchInput`](crate::operation::match_::MatchInput).
         121  +
/// /* BuilderGenerator.kt:342 */A builder for [`MatchInput`](crate::operation::match_::MatchInput).
         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 MatchInputBuilder {
   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 MatchInputBuilder {
         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 [`MatchInput`](crate::operation::match_::MatchInput).
         384  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MatchInput`](crate::operation::match_::MatchInput).
         385  +
    /* BuilderGenerator.kt:253 */
  212    386   
    pub fn build(self) -> ::std::result::Result<crate::operation::match_::MatchInput, ::aws_smithy_types::error::operation::BuildError> {
  213         -
        ::std::result::Result::Ok(crate::operation::match_::MatchInput {
  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::match_::MatchInput {
         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/match_/_match_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 MatchOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct MatchOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl MatchOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`MatchOutput`](crate::operation::match_::MatchOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MatchOutput`](crate::operation::match_::MatchOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::match_::builders::MatchOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::match_::builders::MatchOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`MatchOutput`](crate::operation::match_::MatchOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`MatchOutput`](crate::operation::match_::MatchOutput).
          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 MatchOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct MatchOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl MatchOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`MatchOutput`](crate::operation::match_::MatchOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MatchOutput`](crate::operation::match_::MatchOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::match_::MatchOutput {
   20         -
        crate::operation::match_::MatchOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::match_::MatchOutput {
          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/match_/builders.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/option.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 `Option`.
           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 Option;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl Option {
    7         -
    /// Creates a new `Option`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `Option`
          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::option::OptionInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::option::OptionOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::option::OptionError,
   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 Option {
   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("Option");
   83     94   
   84     95   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   85     96   
            OptionRequestSerializer,
   86     97   
        ));
   87     98   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   88     99   
            OptionResponseDeserializer,
   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("Option", "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("Option")
  106    117   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  107    118   
            .with_interceptor(OptionEndpointParamsInterceptor)
  108    119   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  109    120   
                crate::operation::option::OptionError,
  110    121   
            >::new())
  111    122   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  112    123   
                crate::operation::option::OptionError,
  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 OptionResponseDeserializer;
  121    133   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OptionResponseDeserializer {
  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_option::de_option_http_error(status, headers, body)
  134    146   
        } else {
  135    147   
            crate::protocol_serde::shape_option::de_option_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 OptionRequestSerializer;
  142    155   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OptionRequestSerializer {
  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::option::OptionInput>().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::option::OptionInput,
  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::option::OptionInput,
  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.Option");
  176    189   
            builder
  177    190   
        };
  178    191   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_option::ser_option_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 OptionEndpointParamsInterceptor;
  188    202   
  189    203   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OptionEndpointParamsInterceptor {
  190    204   
    fn name(&self) -> &'static str {
  191    205   
        "OptionEndpointParamsInterceptor"
  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::<OptionInput>().ok_or("failed to downcast to OptionInput")?;
  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 `OptionError` operation.
         234  +
/* RustType.kt:516 */
  219    235   
#[non_exhaustive]
         236  +
/* RustType.kt:516 */
  220    237   
#[derive(::std::fmt::Debug)]
  221         -
pub enum OptionError {
         238  +
pub /* OperationErrorGenerator.kt:81 */ enum OptionError {
         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-OptionError) 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 OptionError {
         252  +
    /* OperationErrorGenerator.kt:219 */
  232    253   
    /// Creates the `OptionError::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 `OptionError::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 OptionError {
         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 OptionError {
         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 OptionError {
         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 OptionError {
         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 OptionError {
         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::option::_option_output::OptionOutput;
  307    375   
         376  +
/* CodegenDelegator.kt:255 */
  308    377   
pub use crate::operation::option::_option_input::OptionInput;
  309    378   
         379  +
/* RustModule.kt:172 */
  310    380   
mod _option_input;
  311    381   
         382  +
/* RustModule.kt:172 */
  312    383   
mod _option_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/option/_option_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 OptionInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct OptionInput {
           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 OptionInput {
          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 OptionInput {
   16         -
    /// Creates a new builder-style object to manufacture [`OptionInput`](crate::operation::option::OptionInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OptionInput`](crate::operation::option::OptionInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::option::builders::OptionInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::option::builders::OptionInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`OptionInput`](crate::operation::option::OptionInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`OptionInput`](crate::operation::option::OptionInput).
          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 OptionInputBuilder {
   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 OptionInputBuilder {
          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 [`OptionInput`](crate::operation::option::OptionInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OptionInput`](crate::operation::option::OptionInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> ::std::result::Result<crate::operation::option::OptionInput, ::aws_smithy_types::error::operation::BuildError> {
   45         -
        ::std::result::Result::Ok(crate::operation::option::OptionInput { pv_member: self.pv_member })
          80  +
        /* BuilderGenerator.kt:254 */
          81  +
        ::std::result::Result::Ok(
          82  +
            /* BuilderGenerator.kt:477 */
          83  +
            crate::operation::option::OptionInput {
          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/option/_option_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 OptionOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct OptionOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl OptionOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`OptionOutput`](crate::operation::option::OptionOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OptionOutput`](crate::operation::option::OptionOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::option::builders::OptionOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::option::builders::OptionOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`OptionOutput`](crate::operation::option::OptionOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`OptionOutput`](crate::operation::option::OptionOutput).
          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 OptionOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct OptionOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl OptionOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`OptionOutput`](crate::operation::option::OptionOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OptionOutput`](crate::operation::option::OptionOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::option::OptionOutput {
   20         -
        crate::operation::option::OptionOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::option::OptionOutput {
          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/option/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::option::_option_output::OptionOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::option::_option_input::OptionInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::option::builders::OptionInputBuilder {
    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::option::OptionOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::option::OptionError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.option();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `Option`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `Option`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct OptionFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::option::builders::OptionInputBuilder,
   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::option::OptionOutput, crate::operation::option::OptionError>
   32     38   
    for OptionFluentBuilder
   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::option::OptionOutput, crate::operation::option::OptionError>,
   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 OptionFluentBuilder {
          51  +
    /* FluentBuilderGenerator.kt:288 */
   44     52   
    /// Creates a new `OptionFluentBuilder`.
   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 Option as a reference.
   53     62   
    pub fn as_input(&self) -> &crate::operation::option::builders::OptionInputBuilder {
   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::option::OptionOutput,
   68     78   
        ::aws_smithy_runtime_api::client::result::SdkError<
   69     79   
            crate::operation::option::OptionError,
   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::option::Option::operation_runtime_plugins(self.handle.runtime_plugins.clone(), &self.handle.conf, self.config_override);
   79     89   
        crate::operation::option::Option::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::option::OptionOutput, crate::operation::option::OptionError, 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/reserved_words_as_members.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 `ReservedWordsAsMembers`.
           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 ReservedWordsAsMembers;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ReservedWordsAsMembers {
    7         -
    /// Creates a new `ReservedWordsAsMembers`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ReservedWordsAsMembers`
          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::reserved_words_as_members::ReservedWordsAsMembersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::reserved_words_as_members::ReservedWordsAsMembersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +383,483 @@
   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 ReservedWordsAsMembers {
   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("ReservedWordsAsMembers");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            ReservedWordsAsMembersRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            ReservedWordsAsMembersResponseDeserializer,
   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   
            "ReservedWordsAsMembers",
  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("ReservedWordsAsMembers")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(ReservedWordsAsMembersEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::reserved_words_as_members::ReservedWordsAsMembersError,
  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 ReservedWordsAsMembersResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ReservedWordsAsMembersResponseDeserializer {
  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_reserved_words_as_members::de_reserved_words_as_members_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members_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 ReservedWordsAsMembersRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ReservedWordsAsMembersRequestSerializer {
  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::reserved_words_as_members::ReservedWordsAsMembersInput>()
  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::reserved_words_as_members::ReservedWordsAsMembersInput,
  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::reserved_words_as_members::ReservedWordsAsMembersInput,
  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.ReservedWordsAsMembers",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(
  195    208   
            crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_input(&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 ReservedWordsAsMembersEndpointParamsInterceptor;
  206    220   
  207    221   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ReservedWordsAsMembersEndpointParamsInterceptor {
  208    222   
    fn name(&self) -> &'static str {
  209    223   
        "ReservedWordsAsMembersEndpointParamsInterceptor"
  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::<ReservedWordsAsMembersInput>()
  225    239   
            .ok_or("failed to downcast to ReservedWordsAsMembersInput")?;
  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 reserved_words_as_members_test {
  242    259   
  243    260   
    /// Test ID: reserved_words
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
  246    263   
    async fn reserved_words_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   
            .reserved_words_as_members()
  253    270   
            .set_as(::std::option::Option::Some(5))
  254    271   
            .set_async(::std::option::Option::Some(true))
  255    272   
            .send()
  256    273   
            .await;
  257    274   
        let _ = dbg!(result);
  258    275   
        let http_request = request_receiver.expect_request();
  259    276   
        let expected_headers = [
  260    277   
            ("Content-Type", "application/x-amz-json-1.1"),
  261    278   
            ("X-Amz-Target", "Config.ReservedWordsAsMembers"),
  262    279   
        ];
  263    280   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  264    281   
        let body = http_request.body().bytes().expect("body should be strict");
  265    282   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  266    283   
            body,
  267    284   
            "{\"as\": 5, \"async\": true}",
  268    285   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  269    286   
        ));
  270    287   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  271    288   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  272    289   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  273    290   
    }
         291  +
         292  +
    /* ProtocolTestGenerator.kt:98 */
  274    293   
}
  275    294   
         295  +
/* OperationErrorGenerator.kt:79 */
  276    296   
/// Error type for the `ReservedWordsAsMembersError` operation.
         297  +
/* RustType.kt:516 */
  277    298   
#[non_exhaustive]
         299  +
/* RustType.kt:516 */
  278    300   
#[derive(::std::fmt::Debug)]
  279         -
pub enum ReservedWordsAsMembersError {
  280         -
    /// 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.
         301  +
pub /* OperationErrorGenerator.kt:81 */ enum ReservedWordsAsMembersError {
         302  +
    /// /* 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.
         303  +
    /* OperationErrorGenerator.kt:86 */
  281    304   
    ValidationException(crate::types::error::ValidationException),
         305  +
    /* OperationErrorGenerator.kt:88 */
  282    306   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  283    307   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  284    308   
    variable wildcard pattern and check `.code()`:
  285    309   
     \
  286    310   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  287    311   
     \
  288    312   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ReservedWordsAsMembersError) for what information is available for the error.")]
  289    313   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         314  +
    /* OperationErrorGenerator.kt:81 */
  290    315   
}
         316  +
/* OperationErrorGenerator.kt:218 */
  291    317   
impl ReservedWordsAsMembersError {
         318  +
    /* OperationErrorGenerator.kt:219 */
  292    319   
    /// Creates the `ReservedWordsAsMembersError::Unhandled` variant from any error type.
  293    320   
    pub fn unhandled(
  294    321   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  295    322   
    ) -> Self {
  296    323   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  297    324   
            source: err.into(),
  298    325   
            meta: ::std::default::Default::default(),
  299    326   
        })
  300    327   
    }
  301    328   
  302    329   
    /// Creates the `ReservedWordsAsMembersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  303    330   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  304    331   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  305    332   
            source: err.clone().into(),
  306    333   
            meta: err,
  307    334   
        })
  308    335   
    }
  309         -
    ///
         336  +
    /// /* OperationErrorGenerator.kt:236 */
  310    337   
    /// Returns error metadata, which includes the error code, message,
  311    338   
    /// request ID, and potentially additional information.
  312    339   
    ///
         340  +
    /* OperationErrorGenerator.kt:242 */
  313    341   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         342  +
        /* OperationErrorGenerator.kt:243 */
  314    343   
        match self {
         344  +
            /* OperationErrorGenerator.kt:246 */
  315    345   
            Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  316         -
            Self::Unhandled(e) => &e.meta,
         346  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         347  +
            /* OperationErrorGenerator.kt:243 */
  317    348   
        }
         349  +
        /* OperationErrorGenerator.kt:242 */
  318    350   
    }
         351  +
    /* OperationErrorGenerator.kt:257 */
  319    352   
    /// Returns `true` if the error kind is `ReservedWordsAsMembersError::ValidationException`.
         353  +
    /* OperationErrorGenerator.kt:258 */
  320    354   
    pub fn is_validation_exception(&self) -> bool {
         355  +
        /* OperationErrorGenerator.kt:259 */
  321    356   
        matches!(self, Self::ValidationException(_))
         357  +
        /* OperationErrorGenerator.kt:258 */
  322    358   
    }
         359  +
    /* OperationErrorGenerator.kt:218 */
  323    360   
}
         361  +
/* OperationErrorGenerator.kt:269 */
  324    362   
impl ::std::error::Error for ReservedWordsAsMembersError {
         363  +
    /* OperationErrorGenerator.kt:270 */
  325    364   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         365  +
        /* OperationErrorGenerator.kt:318 */
  326    366   
        match self {
  327         -
            Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
  328         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         367  +
            /* OperationErrorGenerator.kt:321 */
         368  +
            Self::ValidationException(_inner) =>
         369  +
            /* OperationErrorGenerator.kt:283 */
         370  +
            {
         371  +
                ::std::option::Option::Some(_inner)
         372  +
            }
         373  +
            ,
         374  +
            /* OperationErrorGenerator.kt:326 */
         375  +
            Self::Unhandled(_inner) => {
         376  +
                /* OperationErrorGenerator.kt:279 */
         377  +
                ::std::option::Option::Some(&*_inner.source)
         378  +
                /* OperationErrorGenerator.kt:326 */
         379  +
            } /* OperationErrorGenerator.kt:318 */
  329    380   
        }
         381  +
        /* OperationErrorGenerator.kt:270 */
  330    382   
    }
         383  +
    /* OperationErrorGenerator.kt:269 */
  331    384   
}
         385  +
/* OperationErrorGenerator.kt:133 */
  332    386   
impl ::std::fmt::Display for ReservedWordsAsMembersError {
         387  +
    /* OperationErrorGenerator.kt:134 */
  333    388   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         389  +
        /* OperationErrorGenerator.kt:318 */
  334    390   
        match self {
  335         -
            Self::ValidationException(_inner) => _inner.fmt(f),
         391  +
            /* OperationErrorGenerator.kt:321 */
         392  +
            Self::ValidationException(_inner) =>
         393  +
            /* OperationErrorGenerator.kt:151 */
         394  +
            {
         395  +
                _inner.fmt(f)
         396  +
            }
         397  +
            ,
         398  +
            /* OperationErrorGenerator.kt:326 */
  336    399   
            Self::Unhandled(_inner) => {
         400  +
                /* OperationErrorGenerator.kt:139 */
  337    401   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  338    402   
                    write!(f, "unhandled error ({code})")
  339    403   
                } else {
  340    404   
                    f.write_str("unhandled error")
  341    405   
                }
  342         -
            }
         406  +
                /* OperationErrorGenerator.kt:326 */
         407  +
            } /* OperationErrorGenerator.kt:318 */
  343    408   
        }
         409  +
        /* OperationErrorGenerator.kt:134 */
  344    410   
    }
         411  +
    /* OperationErrorGenerator.kt:133 */
  345    412   
}
         413  +
/* OperationErrorGenerator.kt:182 */
  346    414   
impl ::aws_smithy_types::retry::ProvideErrorKind for ReservedWordsAsMembersError {
         415  +
    /* OperationErrorGenerator.kt:186 */
  347    416   
    fn code(&self) -> ::std::option::Option<&str> {
         417  +
        /* OperationErrorGenerator.kt:187 */
  348    418   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         419  +
        /* OperationErrorGenerator.kt:186 */
  349    420   
    }
         421  +
    /* OperationErrorGenerator.kt:190 */
  350    422   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         423  +
        /* OperationErrorGenerator.kt:197 */
  351    424   
        ::std::option::Option::None
         425  +
        /* OperationErrorGenerator.kt:190 */
  352    426   
    }
         427  +
    /* OperationErrorGenerator.kt:182 */
  353    428   
}
         429  +
/* OperationErrorGenerator.kt:163 */
  354    430   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ReservedWordsAsMembersError {
         431  +
    /* OperationErrorGenerator.kt:164 */
  355    432   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         433  +
        /* OperationErrorGenerator.kt:318 */
  356    434   
        match self {
  357         -
            Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  358         -
            Self::Unhandled(_inner) => &_inner.meta,
         435  +
            /* OperationErrorGenerator.kt:321 */
         436  +
            Self::ValidationException(_inner) =>
         437  +
            /* OperationErrorGenerator.kt:169 */
         438  +
            {
         439  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         440  +
            }
         441  +
            ,
         442  +
            /* OperationErrorGenerator.kt:326 */
         443  +
            Self::Unhandled(_inner) => {
         444  +
                /* OperationErrorGenerator.kt:168 */
         445  +
                &_inner.meta
         446  +
                /* OperationErrorGenerator.kt:326 */
         447  +
            } /* OperationErrorGenerator.kt:318 */
  359    448   
        }
         449  +
        /* OperationErrorGenerator.kt:164 */
  360    450   
    }
         451  +
    /* OperationErrorGenerator.kt:163 */
  361    452   
}
         453  +
/* OperationErrorGenerator.kt:109 */
  362    454   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ReservedWordsAsMembersError {
         455  +
    /* OperationErrorGenerator.kt:110 */
  363    456   
    fn create_unhandled_error(
  364    457   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  365    458   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  366    459   
    ) -> Self {
         460  +
        /* OperationErrorGenerator.kt:121 */
  367    461   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  368    462   
            source,
  369    463   
            meta: meta.unwrap_or_default(),
  370    464   
        })
         465  +
        /* OperationErrorGenerator.kt:110 */
  371    466   
    }
         467  +
    /* OperationErrorGenerator.kt:109 */
  372    468   
}
  373    469   
         470  +
/* CodegenDelegator.kt:255 */
  374    471   
pub use crate::operation::reserved_words_as_members::_reserved_words_as_members_output::ReservedWordsAsMembersOutput;
  375    472   
         473  +
/* CodegenDelegator.kt:255 */
  376    474   
pub use crate::operation::reserved_words_as_members::_reserved_words_as_members_input::ReservedWordsAsMembersInput;
  377    475   
         476  +
/* RustModule.kt:172 */
  378    477   
mod _reserved_words_as_members_input;
  379    478   
         479  +
/* RustModule.kt:172 */
  380    480   
mod _reserved_words_as_members_output;
  381    481   
  382         -
/// Builders
         482  +
/// /* CodegenDelegator.kt:51 */Builders
  383    483   
pub mod builders;

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

@@ -1,1 +230,419 @@
    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 ReservedWordsAsMembersInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct ReservedWordsAsMembersInput {
           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 ReservedWordsAsMembersInput {
          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 ReservedWordsAsMembersInput {
   64         -
    /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         111  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         112  +
    /* BuilderGenerator.kt:175 */
   65    113   
    pub fn builder() -> crate::operation::reserved_words_as_members::builders::ReservedWordsAsMembersInputBuilder {
         114  +
        /* BuilderGenerator.kt:176 */
   66    115   
        crate::operation::reserved_words_as_members::builders::ReservedWordsAsMembersInputBuilder::default()
         116  +
        /* BuilderGenerator.kt:175 */
   67    117   
    }
         118  +
    /* ClientCodegenVisitor.kt:237 */
   68    119   
}
   69    120   
   70         -
/// A builder for [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         121  +
/// /* BuilderGenerator.kt:342 */A builder for [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         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 ReservedWordsAsMembersInputBuilder {
   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 ReservedWordsAsMembersInputBuilder {
         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 [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         384  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ReservedWordsAsMembersInput`](crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput).
         385  +
    /* BuilderGenerator.kt:253 */
  212    386   
    pub fn build(
  213    387   
        self,
  214    388   
    ) -> ::std::result::Result<
  215    389   
        crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput,
  216    390   
        ::aws_smithy_types::error::operation::BuildError,
  217    391   
    > {
  218         -
        ::std::result::Result::Ok(crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput {
  219         -
            r#as: self.r#as,
  220         -
            r#async: self.r#async,
  221         -
            r#enum: self.r#enum,
  222         -
            self_: self.self_,
  223         -
            crate_: self.crate_,
  224         -
            super_: self.super_,
  225         -
            build_value: self.build_value,
  226         -
            default_value: self.default_value,
  227         -
            send_value: self.send_value,
  228         -
        })
  229         -
    }
         392  +
        /* BuilderGenerator.kt:254 */
         393  +
        ::std::result::Result::Ok(
         394  +
            /* BuilderGenerator.kt:477 */
         395  +
            crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput {
         396  +
                /* BuilderGenerator.kt:481 */ r#as: self.r#as,
         397  +
                /* BuilderGenerator.kt:481 */
         398  +
                r#async: self.r#async,
         399  +
                /* BuilderGenerator.kt:481 */
         400  +
                r#enum: self.r#enum,
         401  +
                /* BuilderGenerator.kt:481 */
         402  +
                self_: self.self_,
         403  +
                /* BuilderGenerator.kt:481 */
         404  +
                crate_: self.crate_,
         405  +
                /* BuilderGenerator.kt:481 */
         406  +
                super_: self.super_,
         407  +
                /* BuilderGenerator.kt:481 */
         408  +
                build_value: self.build_value,
         409  +
                /* BuilderGenerator.kt:481 */
         410  +
                default_value: self.default_value,
         411  +
                /* BuilderGenerator.kt:481 */
         412  +
                send_value: self.send_value,
         413  +
                /* BuilderGenerator.kt:477 */
         414  +
            }, /* BuilderGenerator.kt:254 */
         415  +
        )
         416  +
        /* BuilderGenerator.kt:253 */
         417  +
    }
         418  +
    /* BuilderGenerator.kt:355 */
  230    419   
}