Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_defaults/builders.rs

@@ -1,1 +166,202 @@
    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::operation_with_defaults::_operation_with_defaults_output::OperationWithDefaultsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::operation_with_defaults::_operation_with_defaults_input::OperationWithDefaultsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder {
    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::operation_with_defaults::OperationWithDefaultsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.operation_with_defaults();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `OperationWithDefaults`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `OperationWithDefaults`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct OperationWithDefaultsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder,
   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::operation_with_defaults::OperationWithDefaultsOutput,
   34     40   
        crate::operation::operation_with_defaults::OperationWithDefaultsError,
   35     41   
    > for OperationWithDefaultsFluentBuilder
   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::operation_with_defaults::OperationWithDefaultsOutput,
   43     49   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   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 OperationWithDefaultsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `OperationWithDefaultsFluentBuilder`.
   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 OperationWithDefaults as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder {
   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::operation_with_defaults::OperationWithDefaultsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   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::operation_with_defaults::OperationWithDefaults::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::operation_with_defaults::OperationWithDefaults::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::operation_with_defaults::OperationWithDefaultsOutput,
   96    106   
        crate::operation::operation_with_defaults::OperationWithDefaultsError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn defaults(mut self, input: crate::types::Defaults) -> Self {
  112    125   
        self.inner = self.inner.defaults(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_defaults(mut self, input: ::std::option::Option<crate::types::Defaults>) -> Self {
  117    132   
        self.inner = self.inner.set_defaults(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_defaults(&self) -> &::std::option::Option<crate::types::Defaults> {
  122    139   
        self.inner.get_defaults()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn client_optional_defaults(mut self, input: crate::types::ClientOptionalDefaults) -> Self {
  126    145   
        self.inner = self.inner.client_optional_defaults(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_client_optional_defaults(mut self, input: ::std::option::Option<crate::types::ClientOptionalDefaults>) -> Self {
  131    152   
        self.inner = self.inner.set_client_optional_defaults(input);
  132    153   
        self
  133    154   
    }
         155  +
    /* FluentBuilderGenerator.kt:518 */
  134    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:520 */
  135    158   
    pub fn get_client_optional_defaults(&self) -> &::std::option::Option<crate::types::ClientOptionalDefaults> {
  136    159   
        self.inner.get_client_optional_defaults()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn top_level_default(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  140    165   
        self.inner = self.inner.top_level_default(input.into());
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_top_level_default(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  145    172   
        self.inner = self.inner.set_top_level_default(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_top_level_default(&self) -> &::std::option::Option<::std::string::String> {
  150    179   
        self.inner.get_top_level_default()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn other_top_level_default(mut self, input: i32) -> Self {
  154    185   
        self.inner = self.inner.other_top_level_default(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_other_top_level_default(mut self, input: ::std::option::Option<i32>) -> Self {
  159    192   
        self.inner = self.inner.set_other_top_level_default(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_other_top_level_default(&self) -> &::std::option::Option<i32> {
  164    199   
        self.inner.get_other_top_level_default()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_nested_structure.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 `OperationWithNestedStructure`.
           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 OperationWithNestedStructure;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl OperationWithNestedStructure {
    7         -
    /// Creates a new `OperationWithNestedStructure`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `OperationWithNestedStructure`
          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::operation_with_nested_structure::OperationWithNestedStructureInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for OperationWithNestedStructure {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("OperationWithNestedStructure");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            OperationWithNestedStructureRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            OperationWithNestedStructureResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "OperationWithNestedStructure",
  111    122   
            "Rest Json Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("OperationWithNestedStructure")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(OperationWithNestedStructureEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct OperationWithNestedStructureResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithNestedStructureResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct OperationWithNestedStructureRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithNestedStructureRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/OperationWithNestedStructure").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_operation_with_nested_structure::ser_operation_with_nested_structure_input(&input)?,
  197    210   
        );
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct OperationWithNestedStructureEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithNestedStructureEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "OperationWithNestedStructureEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<OperationWithNestedStructureInput>()
  226    240   
            .ok_or("failed to downcast to OperationWithNestedStructureInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod operation_with_nested_structure_test {
  243    260   
  244    261   
    /// Client populates nested default values when missing.
  245    262   
    /// Test ID: RestJsonClientPopulatesNestedDefaultValuesWhenMissing
  246    263   
    #[::tokio::test]
  247    264   
    #[::tracing_test::traced_test]
  248    265   
    async fn rest_json_client_populates_nested_default_values_when_missing_request() {
  249    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  251    268   
@@ -390,407 +519,595 @@
  410    427   
            de.deserialize_nonstreaming(&http_response)
  411    428   
        });
  412    429   
        let parsed = parsed
  413    430   
            .expect("should be successful response")
  414    431   
            .downcast::<crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput>()
  415    432   
            .unwrap();
  416    433   
        ::pretty_assertions::assert_eq!(parsed.dialog, expected_output.dialog, "Unexpected value for `dialog`");
  417    434   
        ::pretty_assertions::assert_eq!(parsed.dialog_list, expected_output.dialog_list, "Unexpected value for `dialog_list`");
  418    435   
        ::pretty_assertions::assert_eq!(parsed.dialog_map, expected_output.dialog_map, "Unexpected value for `dialog_map`");
  419    436   
    }
         437  +
         438  +
    /* ProtocolTestGenerator.kt:98 */
  420    439   
}
  421    440   
         441  +
/* OperationErrorGenerator.kt:79 */
  422    442   
/// Error type for the `OperationWithNestedStructureError` operation.
         443  +
/* RustType.kt:516 */
  423    444   
#[non_exhaustive]
         445  +
/* RustType.kt:516 */
  424    446   
#[derive(::std::fmt::Debug)]
  425         -
pub enum OperationWithNestedStructureError {
         447  +
pub /* OperationErrorGenerator.kt:81 */ enum OperationWithNestedStructureError {
         448  +
    /* OperationErrorGenerator.kt:88 */
  426    449   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  427    450   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  428    451   
    variable wildcard pattern and check `.code()`:
  429    452   
     \
  430    453   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  431    454   
     \
  432    455   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-OperationWithNestedStructureError) for what information is available for the error.")]
  433    456   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         457  +
    /* OperationErrorGenerator.kt:81 */
  434    458   
}
         459  +
/* OperationErrorGenerator.kt:218 */
  435    460   
impl OperationWithNestedStructureError {
         461  +
    /* OperationErrorGenerator.kt:219 */
  436    462   
    /// Creates the `OperationWithNestedStructureError::Unhandled` variant from any error type.
  437    463   
    pub fn unhandled(
  438    464   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  439    465   
    ) -> Self {
  440    466   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  441    467   
            source: err.into(),
  442    468   
            meta: ::std::default::Default::default(),
  443    469   
        })
  444    470   
    }
  445    471   
  446    472   
    /// Creates the `OperationWithNestedStructureError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  447    473   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  448    474   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  449    475   
            source: err.clone().into(),
  450    476   
            meta: err,
  451    477   
        })
  452    478   
    }
  453         -
    ///
         479  +
    /// /* OperationErrorGenerator.kt:236 */
  454    480   
    /// Returns error metadata, which includes the error code, message,
  455    481   
    /// request ID, and potentially additional information.
  456    482   
    ///
         483  +
    /* OperationErrorGenerator.kt:242 */
  457    484   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         485  +
        /* OperationErrorGenerator.kt:243 */
  458    486   
        match self {
  459         -
            Self::Unhandled(e) => &e.meta,
         487  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         488  +
            /* OperationErrorGenerator.kt:243 */
  460    489   
        }
         490  +
        /* OperationErrorGenerator.kt:242 */
  461    491   
    }
         492  +
    /* OperationErrorGenerator.kt:218 */
  462    493   
}
         494  +
/* OperationErrorGenerator.kt:269 */
  463    495   
impl ::std::error::Error for OperationWithNestedStructureError {
         496  +
    /* OperationErrorGenerator.kt:270 */
  464    497   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         498  +
        /* OperationErrorGenerator.kt:318 */
  465    499   
        match self {
  466         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         500  +
            /* OperationErrorGenerator.kt:326 */
         501  +
            Self::Unhandled(_inner) => {
         502  +
                /* OperationErrorGenerator.kt:279 */
         503  +
                ::std::option::Option::Some(&*_inner.source)
         504  +
                /* OperationErrorGenerator.kt:326 */
         505  +
            } /* OperationErrorGenerator.kt:318 */
  467    506   
        }
         507  +
        /* OperationErrorGenerator.kt:270 */
  468    508   
    }
         509  +
    /* OperationErrorGenerator.kt:269 */
  469    510   
}
         511  +
/* OperationErrorGenerator.kt:133 */
  470    512   
impl ::std::fmt::Display for OperationWithNestedStructureError {
         513  +
    /* OperationErrorGenerator.kt:134 */
  471    514   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         515  +
        /* OperationErrorGenerator.kt:318 */
  472    516   
        match self {
         517  +
            /* OperationErrorGenerator.kt:326 */
  473    518   
            Self::Unhandled(_inner) => {
         519  +
                /* OperationErrorGenerator.kt:139 */
  474    520   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  475    521   
                    write!(f, "unhandled error ({code})")
  476    522   
                } else {
  477    523   
                    f.write_str("unhandled error")
  478    524   
                }
         525  +
                /* OperationErrorGenerator.kt:326 */
         526  +
            } /* OperationErrorGenerator.kt:318 */
  479    527   
        }
         528  +
        /* OperationErrorGenerator.kt:134 */
  480    529   
    }
  481         -
    }
         530  +
    /* OperationErrorGenerator.kt:133 */
  482    531   
}
         532  +
/* OperationErrorGenerator.kt:182 */
  483    533   
impl ::aws_smithy_types::retry::ProvideErrorKind for OperationWithNestedStructureError {
         534  +
    /* OperationErrorGenerator.kt:186 */
  484    535   
    fn code(&self) -> ::std::option::Option<&str> {
         536  +
        /* OperationErrorGenerator.kt:187 */
  485    537   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         538  +
        /* OperationErrorGenerator.kt:186 */
  486    539   
    }
         540  +
    /* OperationErrorGenerator.kt:190 */
  487    541   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         542  +
        /* OperationErrorGenerator.kt:197 */
  488    543   
        ::std::option::Option::None
         544  +
        /* OperationErrorGenerator.kt:190 */
  489    545   
    }
         546  +
    /* OperationErrorGenerator.kt:182 */
  490    547   
}
         548  +
/* OperationErrorGenerator.kt:163 */
  491    549   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OperationWithNestedStructureError {
         550  +
    /* OperationErrorGenerator.kt:164 */
  492    551   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         552  +
        /* OperationErrorGenerator.kt:318 */
  493    553   
        match self {
  494         -
            Self::Unhandled(_inner) => &_inner.meta,
         554  +
            /* OperationErrorGenerator.kt:326 */
         555  +
            Self::Unhandled(_inner) => {
         556  +
                /* OperationErrorGenerator.kt:168 */
         557  +
                &_inner.meta
         558  +
                /* OperationErrorGenerator.kt:326 */
         559  +
            } /* OperationErrorGenerator.kt:318 */
  495    560   
        }
         561  +
        /* OperationErrorGenerator.kt:164 */
  496    562   
    }
         563  +
    /* OperationErrorGenerator.kt:163 */
  497    564   
}
         565  +
/* OperationErrorGenerator.kt:109 */
  498    566   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for OperationWithNestedStructureError {
         567  +
    /* OperationErrorGenerator.kt:110 */
  499    568   
    fn create_unhandled_error(
  500    569   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  501    570   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  502    571   
    ) -> Self {
         572  +
        /* OperationErrorGenerator.kt:121 */
  503    573   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  504    574   
            source,
  505    575   
            meta: meta.unwrap_or_default(),
  506    576   
        })
         577  +
        /* OperationErrorGenerator.kt:110 */
  507    578   
    }
         579  +
    /* OperationErrorGenerator.kt:109 */
  508    580   
}
  509    581   
         582  +
/* CodegenDelegator.kt:255 */
  510    583   
pub use crate::operation::operation_with_nested_structure::_operation_with_nested_structure_output::OperationWithNestedStructureOutput;
  511    584   
         585  +
/* CodegenDelegator.kt:255 */
  512    586   
pub use crate::operation::operation_with_nested_structure::_operation_with_nested_structure_input::OperationWithNestedStructureInput;
  513    587   
         588  +
/* RustModule.kt:172 */
  514    589   
mod _operation_with_nested_structure_input;
  515    590   
         591  +
/* RustModule.kt:172 */
  516    592   
mod _operation_with_nested_structure_output;
  517    593   
  518         -
/// Builders
         594  +
/// /* CodegenDelegator.kt:51 */Builders
  519    595   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_nested_structure/_operation_with_nested_structure_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_nested_structure/_operation_with_nested_structure_output.rs

@@ -1,1 +117,196 @@
    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 OperationWithNestedStructureOutput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct OperationWithNestedStructureOutput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub dialog: crate::types::Dialog,
          11  +
    /* StructureGenerator.kt:231 */
    8     12   
    #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub dialog_list: ::std::vec::Vec<crate::types::Dialog>,
          14  +
    /* StructureGenerator.kt:231 */
   10     15   
    #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::types::Dialog>,
          17  +
    /* StructureGenerator.kt:201 */
   12     18   
}
          19  +
/* StructureGenerator.kt:135 */
   13     20   
impl OperationWithNestedStructureOutput {
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
          23  +
                           /* StructureGenerator.kt:166 */
   15     24   
    pub fn dialog(&self) -> &crate::types::Dialog {
          25  +
        /* StructureGenerator.kt:172 */
   16     26   
        &self.dialog
          27  +
        /* StructureGenerator.kt:166 */
   17     28   
    }
          29  +
    /* StructureGenerator.kt:231 */
   18     30   
    #[allow(missing_docs)] // documentation missing in model
          31  +
                           /* StructureGenerator.kt:166 */
   19     32   
    pub fn dialog_list(&self) -> &[crate::types::Dialog] {
          33  +
        /* StructureGenerator.kt:171 */
   20     34   
        use std::ops::Deref;
   21     35   
        self.dialog_list.deref()
          36  +
        /* StructureGenerator.kt:166 */
   22     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   23     39   
    #[allow(missing_docs)] // documentation missing in model
          40  +
                           /* StructureGenerator.kt:166 */
   24     41   
    pub fn dialog_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::Dialog> {
          42  +
        /* StructureGenerator.kt:172 */
   25     43   
        &self.dialog_map
          44  +
        /* StructureGenerator.kt:166 */
   26     45   
    }
          46  +
    /* StructureGenerator.kt:135 */
   27     47   
}
          48  +
/* ClientCodegenVisitor.kt:237 */
   28     49   
impl OperationWithNestedStructureOutput {
   29         -
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          50  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          51  +
    /* BuilderGenerator.kt:175 */
   30     52   
    pub fn builder() -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder {
          53  +
        /* BuilderGenerator.kt:176 */
   31     54   
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::default()
          55  +
        /* BuilderGenerator.kt:175 */
   32     56   
    }
          57  +
    /* ClientCodegenVisitor.kt:237 */
   33     58   
}
   34     59   
   35         -
/// A builder for [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          60  +
/// /* BuilderGenerator.kt:342 */A builder for [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          61  +
/* RustType.kt:516 */
   36     62   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          63  +
/* RustType.kt:516 */
   37     64   
#[non_exhaustive]
          65  +
/* BuilderGenerator.kt:345 */
   38     66   
pub struct OperationWithNestedStructureOutputBuilder {
   39         -
    pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
   40         -
    pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          67  +
    /* BuilderGenerator.kt:275 */ pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
          68  +
    /* BuilderGenerator.kt:275 */ pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          69  +
    /* BuilderGenerator.kt:275 */
   41     70   
    pub(crate) dialog_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>,
          71  +
    /* BuilderGenerator.kt:345 */
   42     72   
}
          73  +
/* BuilderGenerator.kt:355 */
   43     74   
impl OperationWithNestedStructureOutputBuilder {
          75  +
    /* BuilderGenerator.kt:286 */
   44     76   
    #[allow(missing_docs)] // documentation missing in model
   45         -
    /// This field is required.
          77  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          78  +
    /* BuilderGenerator.kt:291 */
   46     79   
    pub fn dialog(mut self, input: crate::types::Dialog) -> Self {
          80  +
        /* BuilderGenerator.kt:292 */
   47     81   
        self.dialog = ::std::option::Option::Some(input);
          82  +
        /* BuilderGenerator.kt:293 */
   48     83   
        self
          84  +
        /* BuilderGenerator.kt:291 */
   49     85   
    }
          86  +
    /* BuilderGenerator.kt:312 */
   50     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* BuilderGenerator.kt:314 */
   51     89   
    pub fn set_dialog(mut self, input: ::std::option::Option<crate::types::Dialog>) -> Self {
          90  +
        /* BuilderGenerator.kt:315 */
   52     91   
        self.dialog = input;
   53     92   
        self
          93  +
        /* BuilderGenerator.kt:314 */
   54     94   
    }
          95  +
    /* BuilderGenerator.kt:334 */
   55     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:336 */
   56     98   
    pub fn get_dialog(&self) -> &::std::option::Option<crate::types::Dialog> {
          99  +
        /* BuilderGenerator.kt:337 */
   57    100   
        &self.dialog
         101  +
        /* BuilderGenerator.kt:336 */
   58    102   
    }
   59         -
    /// Appends an item to `dialog_list`.
         103  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `dialog_list`.
         104  +
    /* BuilderGenerator.kt:411 */
   60    105   
    ///
   61         -
    /// To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
         106  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
         107  +
    /* BuilderGenerator.kt:413 */
   62    108   
    ///
         109  +
    /* BuilderGenerator.kt:418 */
   63    110   
    pub fn dialog_list(mut self, input: crate::types::Dialog) -> Self {
         111  +
        /* BuilderGenerator.kt:419 */
   64    112   
        let mut v = self.dialog_list.unwrap_or_default();
   65    113   
        v.push(input);
   66    114   
        self.dialog_list = ::std::option::Option::Some(v);
   67    115   
        self
         116  +
        /* BuilderGenerator.kt:418 */
   68    117   
    }
         118  +
    /* BuilderGenerator.kt:312 */
   69    119   
    #[allow(missing_docs)] // documentation missing in model
         120  +
                           /* BuilderGenerator.kt:314 */
   70    121   
    pub fn set_dialog_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>) -> Self {
         122  +
        /* BuilderGenerator.kt:315 */
   71    123   
        self.dialog_list = input;
   72    124   
        self
         125  +
        /* BuilderGenerator.kt:314 */
   73    126   
    }
         127  +
    /* BuilderGenerator.kt:334 */
   74    128   
    #[allow(missing_docs)] // documentation missing in model
         129  +
                           /* BuilderGenerator.kt:336 */
   75    130   
    pub fn get_dialog_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Dialog>> {
         131  +
        /* BuilderGenerator.kt:337 */
   76    132   
        &self.dialog_list
         133  +
        /* BuilderGenerator.kt:336 */
   77    134   
    }
   78         -
    /// Adds a key-value pair to `dialog_map`.
         135  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dialog_map`.
         136  +
    /* BuilderGenerator.kt:437 */
   79    137   
    ///
   80         -
    /// To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
         138  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
         139  +
    /* BuilderGenerator.kt:439 */
   81    140   
    ///
         141  +
    /* BuilderGenerator.kt:445 */
   82    142   
    pub fn dialog_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Dialog) -> Self {
         143  +
        /* BuilderGenerator.kt:448 */
   83    144   
        let mut hash_map = self.dialog_map.unwrap_or_default();
   84    145   
        hash_map.insert(k.into(), v);
   85    146   
        self.dialog_map = ::std::option::Option::Some(hash_map);
   86    147   
        self
         148  +
        /* BuilderGenerator.kt:445 */
   87    149   
    }
         150  +
    /* BuilderGenerator.kt:312 */
   88    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:314 */
   89    153   
    pub fn set_dialog_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>) -> Self {
         154  +
        /* BuilderGenerator.kt:315 */
   90    155   
        self.dialog_map = input;
   91    156   
        self
         157  +
        /* BuilderGenerator.kt:314 */
   92    158   
    }
         159  +
    /* BuilderGenerator.kt:334 */
   93    160   
    #[allow(missing_docs)] // documentation missing in model
         161  +
                           /* BuilderGenerator.kt:336 */
   94    162   
    pub fn get_dialog_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>> {
         163  +
        /* BuilderGenerator.kt:337 */
   95    164   
        &self.dialog_map
         165  +
        /* BuilderGenerator.kt:336 */
   96    166   
    }
   97         -
    /// Consumes the builder and constructs a [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
   98         -
    /// This method will fail if any of the following fields are not set:
   99         -
    /// - [`dialog`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::dialog)
         167  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
         168  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         169  +
    /// /* BuilderGenerator.kt:246 */- [`dialog`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::dialog)
         170  +
    /* BuilderGenerator.kt:253 */
  100    171   
    pub fn build(
  101    172   
        self,
  102    173   
    ) -> ::std::result::Result<
  103    174   
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
  104    175   
        ::aws_smithy_types::error::operation::BuildError,
  105    176   
    > {
  106         -
        ::std::result::Result::Ok(crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput {
  107         -
            dialog: self.dialog.ok_or_else(|| {
  108         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  109         -
                    "dialog",
  110         -
                    "dialog was not specified but it is required when building OperationWithNestedStructureOutput",
  111         -
                )
  112         -
            })?,
  113         -
            dialog_list: self.dialog_list.unwrap_or_default(),
  114         -
            dialog_map: self.dialog_map.unwrap_or_default(),
  115         -
        })
         177  +
        /* BuilderGenerator.kt:254 */
         178  +
        ::std::result::Result::Ok(
         179  +
            /* BuilderGenerator.kt:477 */crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput {
         180  +
                /* BuilderGenerator.kt:481 */dialog: self.dialog
         181  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         182  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("dialog", "dialog was not specified but it is required when building OperationWithNestedStructureOutput")
         183  +
                    /* BuilderGenerator.kt:494 */)?
         184  +
                ,
         185  +
                /* BuilderGenerator.kt:481 */dialog_list: self.dialog_list
         186  +
                    /* BuilderGenerator.kt:487 */.unwrap_or_default()
         187  +
                ,
         188  +
                /* BuilderGenerator.kt:481 */dialog_map: self.dialog_map
         189  +
                    /* BuilderGenerator.kt:487 */.unwrap_or_default()
         190  +
                ,
         191  +
            /* BuilderGenerator.kt:477 */}
         192  +
        /* BuilderGenerator.kt:254 */)
         193  +
        /* BuilderGenerator.kt:253 */
  116    194   
    }
         195  +
    /* BuilderGenerator.kt:355 */
  117    196   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/operation_with_nested_structure/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_player_action/_post_player_action_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_player_action/_post_player_action_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_player_action/builders.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_union_with_json_name.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 `PostUnionWithJsonName`.
           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 PostUnionWithJsonName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl PostUnionWithJsonName {
    7         -
    /// Creates a new `PostUnionWithJsonName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `PostUnionWithJsonName`
          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::post_union_with_json_name::PostUnionWithJsonNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::post_union_with_json_name::PostUnionWithJsonNameError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for PostUnionWithJsonName {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("PostUnionWithJsonName");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            PostUnionWithJsonNameRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            PostUnionWithJsonNameResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "PostUnionWithJsonName",
  111    122   
            "Rest Json Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PostUnionWithJsonName")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(PostUnionWithJsonNameEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::post_union_with_json_name::PostUnionWithJsonNameError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::post_union_with_json_name::PostUnionWithJsonNameError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct PostUnionWithJsonNameResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PostUnionWithJsonNameResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_post_union_with_json_name::de_post_union_with_json_name_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_post_union_with_json_name::de_post_union_with_json_name_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct PostUnionWithJsonNameRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PostUnionWithJsonNameRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::post_union_with_json_name::PostUnionWithJsonNameInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::post_union_with_json_name::PostUnionWithJsonNameInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/PostUnionWithJsonName").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::post_union_with_json_name::PostUnionWithJsonNameInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_post_union_with_json_name::ser_post_union_with_json_name_input(&input)?,
  197    210   
        );
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct PostUnionWithJsonNameEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PostUnionWithJsonNameEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "PostUnionWithJsonNameEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<PostUnionWithJsonNameInput>()
  226    240   
            .ok_or("failed to downcast to PostUnionWithJsonNameInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod post_union_with_json_name_test {
  243    260   
  244    261   
    /// Tests that jsonName works with union members.
  245    262   
    /// Test ID: PostUnionWithJsonNameRequest1
  246    263   
    #[::tokio::test]
  247    264   
    #[::tracing_test::traced_test]
  248    265   
    async fn post_union_with_json_name_request1_request() {
  249    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  251    268   
@@ -435,452 +564,640 @@
  455    472   
                )))
  456    473   
            });
  457    474   
            de.deserialize_nonstreaming(&http_response)
  458    475   
        });
  459    476   
        let parsed = parsed
  460    477   
            .expect("should be successful response")
  461    478   
            .downcast::<crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput>()
  462    479   
            .unwrap();
  463    480   
        ::pretty_assertions::assert_eq!(parsed.value, expected_output.value, "Unexpected value for `value`");
  464    481   
    }
         482  +
         483  +
    /* ProtocolTestGenerator.kt:98 */
  465    484   
}
  466    485   
         486  +
/* OperationErrorGenerator.kt:79 */
  467    487   
/// Error type for the `PostUnionWithJsonNameError` operation.
         488  +
/* RustType.kt:516 */
  468    489   
#[non_exhaustive]
         490  +
/* RustType.kt:516 */
  469    491   
#[derive(::std::fmt::Debug)]
  470         -
pub enum PostUnionWithJsonNameError {
         492  +
pub /* OperationErrorGenerator.kt:81 */ enum PostUnionWithJsonNameError {
         493  +
    /* OperationErrorGenerator.kt:88 */
  471    494   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  472    495   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  473    496   
    variable wildcard pattern and check `.code()`:
  474    497   
     \
  475    498   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  476    499   
     \
  477    500   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PostUnionWithJsonNameError) for what information is available for the error.")]
  478    501   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         502  +
    /* OperationErrorGenerator.kt:81 */
  479    503   
}
         504  +
/* OperationErrorGenerator.kt:218 */
  480    505   
impl PostUnionWithJsonNameError {
         506  +
    /* OperationErrorGenerator.kt:219 */
  481    507   
    /// Creates the `PostUnionWithJsonNameError::Unhandled` variant from any error type.
  482    508   
    pub fn unhandled(
  483    509   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  484    510   
    ) -> Self {
  485    511   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  486    512   
            source: err.into(),
  487    513   
            meta: ::std::default::Default::default(),
  488    514   
        })
  489    515   
    }
  490    516   
  491    517   
    /// Creates the `PostUnionWithJsonNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  492    518   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  493    519   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  494    520   
            source: err.clone().into(),
  495    521   
            meta: err,
  496    522   
        })
  497    523   
    }
  498         -
    ///
         524  +
    /// /* OperationErrorGenerator.kt:236 */
  499    525   
    /// Returns error metadata, which includes the error code, message,
  500    526   
    /// request ID, and potentially additional information.
  501    527   
    ///
         528  +
    /* OperationErrorGenerator.kt:242 */
  502    529   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         530  +
        /* OperationErrorGenerator.kt:243 */
  503    531   
        match self {
  504         -
            Self::Unhandled(e) => &e.meta,
         532  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         533  +
            /* OperationErrorGenerator.kt:243 */
  505    534   
        }
         535  +
        /* OperationErrorGenerator.kt:242 */
  506    536   
    }
         537  +
    /* OperationErrorGenerator.kt:218 */
  507    538   
}
         539  +
/* OperationErrorGenerator.kt:269 */
  508    540   
impl ::std::error::Error for PostUnionWithJsonNameError {
         541  +
    /* OperationErrorGenerator.kt:270 */
  509    542   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         543  +
        /* OperationErrorGenerator.kt:318 */
  510    544   
        match self {
  511         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         545  +
            /* OperationErrorGenerator.kt:326 */
         546  +
            Self::Unhandled(_inner) => {
         547  +
                /* OperationErrorGenerator.kt:279 */
         548  +
                ::std::option::Option::Some(&*_inner.source)
         549  +
                /* OperationErrorGenerator.kt:326 */
         550  +
            } /* OperationErrorGenerator.kt:318 */
  512    551   
        }
         552  +
        /* OperationErrorGenerator.kt:270 */
  513    553   
    }
         554  +
    /* OperationErrorGenerator.kt:269 */
  514    555   
}
         556  +
/* OperationErrorGenerator.kt:133 */
  515    557   
impl ::std::fmt::Display for PostUnionWithJsonNameError {
         558  +
    /* OperationErrorGenerator.kt:134 */
  516    559   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         560  +
        /* OperationErrorGenerator.kt:318 */
  517    561   
        match self {
         562  +
            /* OperationErrorGenerator.kt:326 */
  518    563   
            Self::Unhandled(_inner) => {
         564  +
                /* OperationErrorGenerator.kt:139 */
  519    565   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  520    566   
                    write!(f, "unhandled error ({code})")
  521    567   
                } else {
  522    568   
                    f.write_str("unhandled error")
  523    569   
                }
         570  +
                /* OperationErrorGenerator.kt:326 */
         571  +
            } /* OperationErrorGenerator.kt:318 */
  524    572   
        }
         573  +
        /* OperationErrorGenerator.kt:134 */
  525    574   
    }
  526         -
    }
         575  +
    /* OperationErrorGenerator.kt:133 */
  527    576   
}
         577  +
/* OperationErrorGenerator.kt:182 */
  528    578   
impl ::aws_smithy_types::retry::ProvideErrorKind for PostUnionWithJsonNameError {
         579  +
    /* OperationErrorGenerator.kt:186 */
  529    580   
    fn code(&self) -> ::std::option::Option<&str> {
         581  +
        /* OperationErrorGenerator.kt:187 */
  530    582   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         583  +
        /* OperationErrorGenerator.kt:186 */
  531    584   
    }
         585  +
    /* OperationErrorGenerator.kt:190 */
  532    586   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         587  +
        /* OperationErrorGenerator.kt:197 */
  533    588   
        ::std::option::Option::None
         589  +
        /* OperationErrorGenerator.kt:190 */
  534    590   
    }
         591  +
    /* OperationErrorGenerator.kt:182 */
  535    592   
}
         593  +
/* OperationErrorGenerator.kt:163 */
  536    594   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PostUnionWithJsonNameError {
         595  +
    /* OperationErrorGenerator.kt:164 */
  537    596   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         597  +
        /* OperationErrorGenerator.kt:318 */
  538    598   
        match self {
  539         -
            Self::Unhandled(_inner) => &_inner.meta,
         599  +
            /* OperationErrorGenerator.kt:326 */
         600  +
            Self::Unhandled(_inner) => {
         601  +
                /* OperationErrorGenerator.kt:168 */
         602  +
                &_inner.meta
         603  +
                /* OperationErrorGenerator.kt:326 */
         604  +
            } /* OperationErrorGenerator.kt:318 */
  540    605   
        }
         606  +
        /* OperationErrorGenerator.kt:164 */
  541    607   
    }
         608  +
    /* OperationErrorGenerator.kt:163 */
  542    609   
}
         610  +
/* OperationErrorGenerator.kt:109 */
  543    611   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PostUnionWithJsonNameError {
         612  +
    /* OperationErrorGenerator.kt:110 */
  544    613   
    fn create_unhandled_error(
  545    614   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  546    615   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  547    616   
    ) -> Self {
         617  +
        /* OperationErrorGenerator.kt:121 */
  548    618   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  549    619   
            source,
  550    620   
            meta: meta.unwrap_or_default(),
  551    621   
        })
         622  +
        /* OperationErrorGenerator.kt:110 */
  552    623   
    }
         624  +
    /* OperationErrorGenerator.kt:109 */
  553    625   
}
  554    626   
         627  +
/* CodegenDelegator.kt:255 */
  555    628   
pub use crate::operation::post_union_with_json_name::_post_union_with_json_name_output::PostUnionWithJsonNameOutput;
  556    629   
         630  +
/* CodegenDelegator.kt:255 */
  557    631   
pub use crate::operation::post_union_with_json_name::_post_union_with_json_name_input::PostUnionWithJsonNameInput;
  558    632   
         633  +
/* RustModule.kt:172 */
  559    634   
mod _post_union_with_json_name_input;
  560    635   
         636  +
/* RustModule.kt:172 */
  561    637   
mod _post_union_with_json_name_output;
  562    638   
  563         -
/// Builders
         639  +
/// /* CodegenDelegator.kt:51 */Builders
  564    640   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_union_with_json_name/_post_union_with_json_name_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_union_with_json_name/_post_union_with_json_name_output.rs

@@ -1,1 +62,101 @@
    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 PostUnionWithJsonNameOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct PostUnionWithJsonNameOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub value: crate::types::UnionWithJsonName,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl PostUnionWithJsonNameOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn value(&self) -> &crate::types::UnionWithJsonName {
          20  +
        /* StructureGenerator.kt:172 */
   12     21   
        &self.value
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl PostUnionWithJsonNameOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::post_union_with_json_name::builders::PostUnionWithJsonNameOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::post_union_with_json_name::builders::PostUnionWithJsonNameOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
          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 PostUnionWithJsonNameOutputBuilder {
   26         -
    pub(crate) value: ::std::option::Option<crate::types::UnionWithJsonName>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<crate::types::UnionWithJsonName>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl PostUnionWithJsonNameOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
   30         -
    /// This field is required.
          52  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          53  +
    /* BuilderGenerator.kt:291 */
   31     54   
    pub fn value(mut self, input: crate::types::UnionWithJsonName) -> Self {
          55  +
        /* BuilderGenerator.kt:292 */
   32     56   
        self.value = ::std::option::Option::Some(input);
          57  +
        /* BuilderGenerator.kt:293 */
   33     58   
        self
          59  +
        /* BuilderGenerator.kt:291 */
   34     60   
    }
          61  +
    /* BuilderGenerator.kt:312 */
   35     62   
    #[allow(missing_docs)] // documentation missing in model
          63  +
                           /* BuilderGenerator.kt:314 */
   36     64   
    pub fn set_value(mut self, input: ::std::option::Option<crate::types::UnionWithJsonName>) -> Self {
          65  +
        /* BuilderGenerator.kt:315 */
   37     66   
        self.value = input;
   38     67   
        self
          68  +
        /* BuilderGenerator.kt:314 */
   39     69   
    }
          70  +
    /* BuilderGenerator.kt:334 */
   40     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* BuilderGenerator.kt:336 */
   41     73   
    pub fn get_value(&self) -> &::std::option::Option<crate::types::UnionWithJsonName> {
          74  +
        /* BuilderGenerator.kt:337 */
   42     75   
        &self.value
          76  +
        /* BuilderGenerator.kt:336 */
   43     77   
    }
   44         -
    /// Consumes the builder and constructs a [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
   45         -
    /// This method will fail if any of the following fields are not set:
   46         -
    /// - [`value`](crate::operation::post_union_with_json_name::builders::PostUnionWithJsonNameOutputBuilder::value)
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PostUnionWithJsonNameOutput`](crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput).
          79  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          80  +
    /// /* BuilderGenerator.kt:246 */- [`value`](crate::operation::post_union_with_json_name::builders::PostUnionWithJsonNameOutputBuilder::value)
          81  +
    /* BuilderGenerator.kt:253 */
   47     82   
    pub fn build(
   48     83   
        self,
   49     84   
    ) -> ::std::result::Result<
   50     85   
        crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput,
   51     86   
        ::aws_smithy_types::error::operation::BuildError,
   52     87   
    > {
   53         -
        ::std::result::Result::Ok(crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput {
   54         -
            value: self.value.ok_or_else(|| {
   55         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   56         -
                    "value",
   57         -
                    "value was not specified but it is required when building PostUnionWithJsonNameOutput",
   58         -
                )
   59         -
            })?,
   60         -
        })
          88  +
        /* BuilderGenerator.kt:254 */
          89  +
        ::std::result::Result::Ok(
          90  +
            /* BuilderGenerator.kt:477 */crate::operation::post_union_with_json_name::PostUnionWithJsonNameOutput {
          91  +
                /* BuilderGenerator.kt:481 */value: self.value
          92  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          93  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("value", "value was not specified but it is required when building PostUnionWithJsonNameOutput")
          94  +
                    /* BuilderGenerator.kt:494 */)?
          95  +
                ,
          96  +
            /* BuilderGenerator.kt:477 */}
          97  +
        /* BuilderGenerator.kt:254 */)
          98  +
        /* BuilderGenerator.kt:253 */
   61     99   
    }
         100  +
    /* BuilderGenerator.kt:355 */
   62    101   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/post_union_with_json_name/builders.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/put_with_content_encoding.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 `PutWithContentEncoding`.
           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 PutWithContentEncoding;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl PutWithContentEncoding {
    7         -
    /// Creates a new `PutWithContentEncoding`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `PutWithContentEncoding`
          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::put_with_content_encoding::PutWithContentEncodingInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -65,74 +403,479 @@
   85     94   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   86     95   
            }
   87     96   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   88     97   
                config_override,
   89     98   
                client_config.config.clone(),
   90     99   
                &client_config.runtime_components,
   91    100   
            ));
   92    101   
        }
   93    102   
        runtime_plugins
   94    103   
    }
         104  +
    /* OperationGenerator.kt:85 */
   95    105   
}
         106  +
/* OperationRuntimePluginGenerator.kt:55 */
   96    107   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for PutWithContentEncoding {
   97    108   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   98    109   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("PutWithContentEncoding");
   99    110   
  100    111   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
  101    112   
            PutWithContentEncodingRequestSerializer,
  102    113   
        ));
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  104    115   
            PutWithContentEncodingResponseDeserializer,
  105    116   
        ));
  106    117   
  107    118   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  108    119   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  109    120   
        ));
  110    121   
  111    122   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  112    123   
            "PutWithContentEncoding",
  113    124   
            "Rest Json Protocol",
  114    125   
        ));
  115    126   
  116    127   
        ::std::option::Option::Some(cfg.freeze())
  117    128   
    }
  118    129   
  119    130   
    fn runtime_components(
  120    131   
        &self,
  121    132   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  122    133   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  123    134   
        #[allow(unused_mut)]
  124    135   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PutWithContentEncoding")
  125    136   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  126    137   
            .with_interceptor(PutWithContentEncodingEndpointParamsInterceptor)
  127    138   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  128    139   
                crate::operation::put_with_content_encoding::PutWithContentEncodingError,
  129    140   
            >::new())
  130    141   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  131    142   
                crate::operation::put_with_content_encoding::PutWithContentEncodingError,
  132    143   
            >::new());
  133    144   
  134    145   
        ::std::borrow::Cow::Owned(rcb)
  135    146   
    }
  136    147   
}
  137    148   
         149  +
/* ResponseDeserializerGenerator.kt:64 */
  138    150   
#[derive(Debug)]
  139    151   
struct PutWithContentEncodingResponseDeserializer;
  140    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutWithContentEncodingResponseDeserializer {
  141    153   
    fn deserialize_nonstreaming(
  142    154   
        &self,
  143    155   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  144    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146    158   
        let headers = response.headers();
  147    159   
        let body = response.body().bytes().expect("body loaded");
  148    160   
        #[allow(unused_mut)]
  149    161   
        let mut force_error = false;
  150    162   
  151    163   
        let parse_result = if !success && status != 200 || force_error {
  152    164   
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_error(status, headers, body)
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_response(status, headers, body)
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct PutWithContentEncodingRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutWithContentEncodingRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
  169    182   
            .downcast::<crate::operation::put_with_content_encoding::PutWithContentEncodingInput>()
  170    183   
            .expect("correct type");
  171    184   
        let _header_serialization_settings = _cfg
  172    185   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  173    186   
            .cloned()
  174    187   
            .unwrap_or_default();
  175    188   
        let mut request_builder = {
  176    189   
            fn uri_base(
  177    190   
                _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  178    191   
                output: &mut ::std::string::String,
  179    192   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    193   
                use ::std::fmt::Write as _;
  181    194   
                ::std::write!(output, "/requestcompression/putcontentwithencoding").expect("formatting should succeed");
  182    195   
                ::std::result::Result::Ok(())
  183    196   
            }
  184    197   
            #[allow(clippy::unnecessary_wraps)]
  185    198   
            fn update_http_builder(
  186    199   
                input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  187    200   
                builder: ::http::request::Builder,
  188    201   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    202   
                let mut uri = ::std::string::String::new();
  190    203   
                uri_base(input, &mut uri)?;
  191    204   
                let builder = crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_headers(input, builder)?;
  192    205   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  193    206   
            }
  194    207   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  195    208   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  196    209   
            builder
  197    210   
        };
  198    211   
        let body = ::aws_smithy_types::body::SdkBody::from(
  199    212   
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_input(&input)?,
  200    213   
        );
  201    214   
        if let Some(content_length) = body.content_length() {
  202    215   
            let content_length = content_length.to_string();
  203    216   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  204    217   
        }
  205    218   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  206    219   
    }
  207    220   
}
         221  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  208    222   
#[derive(Debug)]
  209    223   
struct PutWithContentEncodingEndpointParamsInterceptor;
  210    224   
  211    225   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  212    226   
    fn name(&self) -> &'static str {
  213    227   
        "PutWithContentEncodingEndpointParamsInterceptor"
  214    228   
    }
  215    229   
  216    230   
    fn read_before_execution(
  217    231   
        &self,
  218    232   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  219    233   
            '_,
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  221    235   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  223    237   
        >,
  224    238   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  225    239   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  226    240   
        let _input = context
  227    241   
            .input()
  228    242   
            .downcast_ref::<PutWithContentEncodingInput>()
  229    243   
            .ok_or("failed to downcast to PutWithContentEncodingInput")?;
  230    244   
  231    245   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  233    247   
        })?;
  234    248   
        cfg.interceptor_state()
  235    249   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  236    250   
        ::std::result::Result::Ok(())
  237    251   
    }
  238    252   
}
  239    253   
  240    254   
// The get_* functions below are generated from JMESPath expressions in the
  241    255   
// operationContextParams trait. They target the operation's input shape.
  242    256   
         257  +
/* RustType.kt:516 */
  243    258   
#[allow(unreachable_code, unused_variables)]
         259  +
/* RustType.kt:516 */
  244    260   
#[cfg(test)]
         261  +
/* ProtocolTestGenerator.kt:98 */
  245    262   
mod put_with_content_encoding_test {
  246    263   
  247    264   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  248    265   
    /// Test ID: SDKAppliedContentEncoding_restJson1
  249    266   
    #[::tokio::test]
  250    267   
    #[::tracing_test::traced_test]
  251    268   
    async fn sdk_applied_content_encoding_rest_json1_request() {
  252    269   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  253    270   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  254    271   
  255    272   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  256    273   
        let result = client.put_with_content_encoding()
  257    274   
        .set_data(
  258    275   
            ::std::option::Option::Some(
  259    276   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCI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D3bmZAe7b4eaGZhyy4HVKjqCXmIH7vsEjRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  260    277   
            )
  261    278   
        )
  262    279   
        .send().await;
  263    280   
        let _ = dbg!(result);
  264    281   
        let http_request = request_receiver.expect_request();
  265    282   
        let expected_headers = [("Content-Encoding", "gzip")];
  266    283   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  267    284   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  268    285   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  269    286   
        ::pretty_assertions::assert_eq!(uri.path(), "/requestcompression/putcontentwithencoding", "path was incorrect");
  270    287   
    }
  271    288   
  272    289   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  273    290   
    /// user-provided content-encoding is in the Content-Encoding header before the
  274    291   
    /// request compression encoding from the HTTP binding.
  275    292   
    ///
  276    293   
    /// Test ID: SDKAppendedGzipAfterProvidedEncoding_restJson1
  277    294   
    #[::tokio::test]
  278    295   
    #[::tracing_test::traced_test]
  279    296   
    async fn sdk_appended_gzip_after_provided_encoding_rest_json1_request() {
  280    297   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  281    298   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  282    299   
  283    300   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  284    301   
        let result = client.put_with_content_encoding()
  285    302   
        .set_encoding(
  286    303   
            ::std::option::Option::Some(
  287    304   
                "custom".to_owned()
  288    305   
            )
  289    306   
        )
  290    307   
        .set_data(
  291    308   
            ::std::option::Option::Some(
  292    309   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB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Km6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  293    310   
            )
  294    311   
        )
  295    312   
        .send().await;
  296    313   
        let _ = dbg!(result);
  297    314   
        let http_request = request_receiver.expect_request();
  298    315   
        let expected_headers = [("Content-Encoding", "custom, gzip")];
  299    316   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  300    317   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  301    318   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  302    319   
        ::pretty_assertions::assert_eq!(uri.path(), "/requestcompression/putcontentwithencoding", "path was incorrect");
  303    320   
    }
         321  +
         322  +
    /* ProtocolTestGenerator.kt:98 */
  304    323   
}
  305    324   
         325  +
/* OperationErrorGenerator.kt:79 */
  306    326   
/// Error type for the `PutWithContentEncodingError` operation.
         327  +
/* RustType.kt:516 */
  307    328   
#[non_exhaustive]
         329  +
/* RustType.kt:516 */
  308    330   
#[derive(::std::fmt::Debug)]
  309         -
pub enum PutWithContentEncodingError {
         331  +
pub /* OperationErrorGenerator.kt:81 */ enum PutWithContentEncodingError {
         332  +
    /* OperationErrorGenerator.kt:88 */
  310    333   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  311    334   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  312    335   
    variable wildcard pattern and check `.code()`:
  313    336   
     \
  314    337   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  315    338   
     \
  316    339   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PutWithContentEncodingError) for what information is available for the error.")]
  317    340   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         341  +
    /* OperationErrorGenerator.kt:81 */
  318    342   
}
         343  +
/* OperationErrorGenerator.kt:218 */
  319    344   
impl PutWithContentEncodingError {
         345  +
    /* OperationErrorGenerator.kt:219 */
  320    346   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from any error type.
  321    347   
    pub fn unhandled(
  322    348   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  323    349   
    ) -> Self {
  324    350   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  325    351   
            source: err.into(),
  326    352   
            meta: ::std::default::Default::default(),
  327    353   
        })
  328    354   
    }
  329    355   
  330    356   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  331    357   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  332    358   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  333    359   
            source: err.clone().into(),
  334    360   
            meta: err,
  335    361   
        })
  336    362   
    }
  337         -
    ///
         363  +
    /// /* OperationErrorGenerator.kt:236 */
  338    364   
    /// Returns error metadata, which includes the error code, message,
  339    365   
    /// request ID, and potentially additional information.
  340    366   
    ///
         367  +
    /* OperationErrorGenerator.kt:242 */
  341    368   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         369  +
        /* OperationErrorGenerator.kt:243 */
  342    370   
        match self {
  343         -
            Self::Unhandled(e) => &e.meta,
         371  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         372  +
            /* OperationErrorGenerator.kt:243 */
  344    373   
        }
         374  +
        /* OperationErrorGenerator.kt:242 */
  345    375   
    }
         376  +
    /* OperationErrorGenerator.kt:218 */
  346    377   
}
         378  +
/* OperationErrorGenerator.kt:269 */
  347    379   
impl ::std::error::Error for PutWithContentEncodingError {
         380  +
    /* OperationErrorGenerator.kt:270 */
  348    381   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         382  +
        /* OperationErrorGenerator.kt:318 */
  349    383   
        match self {
  350         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         384  +
            /* OperationErrorGenerator.kt:326 */
         385  +
            Self::Unhandled(_inner) => {
         386  +
                /* OperationErrorGenerator.kt:279 */
         387  +
                ::std::option::Option::Some(&*_inner.source)
         388  +
                /* OperationErrorGenerator.kt:326 */
         389  +
            } /* OperationErrorGenerator.kt:318 */
  351    390   
        }
         391  +
        /* OperationErrorGenerator.kt:270 */
  352    392   
    }
         393  +
    /* OperationErrorGenerator.kt:269 */
  353    394   
}
         395  +
/* OperationErrorGenerator.kt:133 */
  354    396   
impl ::std::fmt::Display for PutWithContentEncodingError {
         397  +
    /* OperationErrorGenerator.kt:134 */
  355    398   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         399  +
        /* OperationErrorGenerator.kt:318 */
  356    400   
        match self {
         401  +
            /* OperationErrorGenerator.kt:326 */
  357    402   
            Self::Unhandled(_inner) => {
         403  +
                /* OperationErrorGenerator.kt:139 */
  358    404   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  359    405   
                    write!(f, "unhandled error ({code})")
  360    406   
                } else {
  361    407   
                    f.write_str("unhandled error")
  362    408   
                }
         409  +
                /* OperationErrorGenerator.kt:326 */
         410  +
            } /* OperationErrorGenerator.kt:318 */
  363    411   
        }
         412  +
        /* OperationErrorGenerator.kt:134 */
  364    413   
    }
  365         -
    }
         414  +
    /* OperationErrorGenerator.kt:133 */
  366    415   
}
         416  +
/* OperationErrorGenerator.kt:182 */
  367    417   
impl ::aws_smithy_types::retry::ProvideErrorKind for PutWithContentEncodingError {
         418  +
    /* OperationErrorGenerator.kt:186 */
  368    419   
    fn code(&self) -> ::std::option::Option<&str> {
         420  +
        /* OperationErrorGenerator.kt:187 */
  369    421   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         422  +
        /* OperationErrorGenerator.kt:186 */
  370    423   
    }
         424  +
    /* OperationErrorGenerator.kt:190 */
  371    425   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         426  +
        /* OperationErrorGenerator.kt:197 */
  372    427   
        ::std::option::Option::None
         428  +
        /* OperationErrorGenerator.kt:190 */
  373    429   
    }
         430  +
    /* OperationErrorGenerator.kt:182 */
  374    431   
}
         432  +
/* OperationErrorGenerator.kt:163 */
  375    433   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PutWithContentEncodingError {
         434  +
    /* OperationErrorGenerator.kt:164 */
  376    435   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         436  +
        /* OperationErrorGenerator.kt:318 */
  377    437   
        match self {
  378         -
            Self::Unhandled(_inner) => &_inner.meta,
         438  +
            /* OperationErrorGenerator.kt:326 */
         439  +
            Self::Unhandled(_inner) => {
         440  +
                /* OperationErrorGenerator.kt:168 */
         441  +
                &_inner.meta
         442  +
                /* OperationErrorGenerator.kt:326 */
         443  +
            } /* OperationErrorGenerator.kt:318 */
  379    444   
        }
         445  +
        /* OperationErrorGenerator.kt:164 */
  380    446   
    }
         447  +
    /* OperationErrorGenerator.kt:163 */
  381    448   
}
         449  +
/* OperationErrorGenerator.kt:109 */
  382    450   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PutWithContentEncodingError {
         451  +
    /* OperationErrorGenerator.kt:110 */
  383    452   
    fn create_unhandled_error(
  384    453   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  385    454   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  386    455   
    ) -> Self {
         456  +
        /* OperationErrorGenerator.kt:121 */
  387    457   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  388    458   
            source,
  389    459   
            meta: meta.unwrap_or_default(),
  390    460   
        })
         461  +
        /* OperationErrorGenerator.kt:110 */
  391    462   
    }
         463  +
    /* OperationErrorGenerator.kt:109 */
  392    464   
}
  393    465   
         466  +
/* CodegenDelegator.kt:255 */
  394    467   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_output::PutWithContentEncodingOutput;
  395    468   
         469  +
/* CodegenDelegator.kt:255 */
  396    470   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_input::PutWithContentEncodingInput;
  397    471   
         472  +
/* RustModule.kt:172 */
  398    473   
mod _put_with_content_encoding_input;
  399    474   
         475  +
/* RustModule.kt:172 */
  400    476   
mod _put_with_content_encoding_output;
  401    477   
  402         -
/// Builders
         478  +
/// /* CodegenDelegator.kt:51 */Builders
  403    479   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/put_with_content_encoding/_put_with_content_encoding_input.rs

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

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