Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation/_null_operation_output.rs

@@ -1,1 +47,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct NullOperationOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct NullOperationOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub string: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl NullOperationOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn string(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.string.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl NullOperationOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::null_operation::builders::NullOperationOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::null_operation::builders::NullOperationOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          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 NullOperationOutputBuilder {
   26         -
    pub(crate) string: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) string: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl NullOperationOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.string = ::std::option::Option::Some(input.into());
          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_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.string = 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_string(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.string
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NullOperationOutput`](crate::operation::null_operation::NullOperationOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::null_operation::NullOperationOutput {
   45         -
        crate::operation::null_operation::NullOperationOutput { string: self.string }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::null_operation::NullOperationOutput {
          82  +
            /* BuilderGenerator.kt:481 */ string: self.string,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation/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::null_operation::_null_operation_output::NullOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::null_operation::_null_operation_input::NullOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::null_operation::builders::NullOperationInputBuilder {
    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::null_operation::NullOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::null_operation::NullOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.null_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NullOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NullOperation`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct NullOperationFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::null_operation::builders::NullOperationInputBuilder,
   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::null_operation::NullOperationOutput,
   34     40   
        crate::operation::null_operation::NullOperationError,
   35     41   
    > for NullOperationFluentBuilder
   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::null_operation::NullOperationOutput,
   43     49   
            crate::operation::null_operation::NullOperationError,
   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 NullOperationFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `NullOperationFluentBuilder`.
   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 NullOperation as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::null_operation::builders::NullOperationInputBuilder {
   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::null_operation::NullOperationOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::null_operation::NullOperationError,
   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::null_operation::NullOperation::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::null_operation::NullOperation::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::null_operation::NullOperationOutput,
   96    106   
        crate::operation::null_operation::NullOperationError,
   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 string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.string(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_string(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_string(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_string()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output.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 `OperationWithOptionalInputOutput`.
           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 OperationWithOptionalInputOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl OperationWithOptionalInputOutput {
    7         -
    /// Creates a new `OperationWithOptionalInputOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `OperationWithOptionalInputOutput`
          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_optional_input_output::OperationWithOptionalInputOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +280,297 @@
   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 OperationWithOptionalInputOutput {
   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("OperationWithOptionalInputOutput");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            OperationWithOptionalInputOutputRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            OperationWithOptionalInputOutputResponseDeserializer,
  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   
            "OperationWithOptionalInputOutput",
  111    122   
            "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("OperationWithOptionalInputOutput")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(OperationWithOptionalInputOutputEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
  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 OperationWithOptionalInputOutputResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithOptionalInputOutputResponseDeserializer {
  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_optional_input_output::de_operation_with_optional_input_output_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_operation_with_optional_input_output::de_operation_with_optional_input_output_http_response(
  155    167   
                status, headers, body,
  156    168   
            )
  157    169   
        };
  158    170   
        crate::protocol_serde::type_erase_result(parse_result)
  159    171   
    }
  160    172   
}
         173  +
/* RequestSerializerGenerator.kt:67 */
  161    174   
#[derive(Debug)]
  162    175   
struct OperationWithOptionalInputOutputRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithOptionalInputOutputRequestSerializer {
  164    177   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  165    178   
    fn serialize_input(
  166    179   
        &self,
  167    180   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  168    181   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  169    182   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  170    183   
        let input = input
  171    184   
            .downcast::<crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput>()
  172    185   
            .expect("correct type");
  173    186   
        let _header_serialization_settings = _cfg
  174    187   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175    188   
            .cloned()
  176    189   
            .unwrap_or_default();
  177    190   
        let mut request_builder = {
  178    191   
            fn uri_base(
  179    192   
                _input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  180    193   
                output: &mut ::std::string::String,
  181    194   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182    195   
                use ::std::fmt::Write as _;
  183    196   
                ::std::write!(output, "/").expect("formatting should succeed");
  184    197   
                ::std::result::Result::Ok(())
  185    198   
            }
  186    199   
            #[allow(clippy::unnecessary_wraps)]
  187    200   
            fn update_http_builder(
  188    201   
                input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  189    202   
                builder: ::http::request::Builder,
  190    203   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191    204   
                let mut uri = ::std::string::String::new();
  192    205   
                uri_base(input, &mut uri)?;
  193    206   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194    207   
            }
  195    208   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196    209   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  197    210   
            builder = _header_serialization_settings.set_default_header(
  198    211   
                builder,
  199    212   
                ::http::header::HeaderName::from_static("x-amz-target"),
  200    213   
                "JsonProtocol.OperationWithOptionalInputOutput",
  201    214   
            );
  202    215   
            builder
  203    216   
        };
  204    217   
        let body = ::aws_smithy_types::body::SdkBody::from(
  205    218   
            crate::protocol_serde::shape_operation_with_optional_input_output::ser_operation_with_optional_input_output_input(&input)?,
  206    219   
        );
  207    220   
        if let Some(content_length) = body.content_length() {
  208    221   
            let content_length = content_length.to_string();
  209    222   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  210    223   
        }
  211    224   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  212    225   
    }
  213    226   
}
         227  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  214    228   
#[derive(Debug)]
  215    229   
struct OperationWithOptionalInputOutputEndpointParamsInterceptor;
  216    230   
  217    231   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithOptionalInputOutputEndpointParamsInterceptor {
  218    232   
    fn name(&self) -> &'static str {
  219    233   
        "OperationWithOptionalInputOutputEndpointParamsInterceptor"
  220    234   
    }
  221    235   
  222    236   
    fn read_before_execution(
  223    237   
        &self,
  224    238   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  225    239   
            '_,
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  227    241   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  228    242   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  229    243   
        >,
  230    244   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  231    245   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  232    246   
        let _input = context
  233    247   
            .input()
  234    248   
            .downcast_ref::<OperationWithOptionalInputOutputInput>()
  235    249   
            .ok_or("failed to downcast to OperationWithOptionalInputOutputInput")?;
  236    250   
  237    251   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  238    252   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  239    253   
        })?;
  240    254   
        cfg.interceptor_state()
  241    255   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  242    256   
        ::std::result::Result::Ok(())
  243    257   
    }
  244    258   
}
  245    259   
  246    260   
// The get_* functions below are generated from JMESPath expressions in the
  247    261   
// operationContextParams trait. They target the operation's input shape.
  248    262   
         263  +
/* RustType.kt:516 */
  249    264   
#[allow(unreachable_code, unused_variables)]
         265  +
/* RustType.kt:516 */
  250    266   
#[cfg(test)]
         267  +
/* ProtocolTestGenerator.kt:98 */
  251    268   
mod operation_with_optional_input_output_test {
  252    269   
  253    270   
    /// Can call operations with no input or output
  254    271   
    /// Test ID: can_call_operation_with_no_input_or_output
  255    272   
    #[::tokio::test]
  256    273   
    #[::tracing_test::traced_test]
  257    274   
    async fn can_call_operation_with_no_input_or_output_request() {
  258    275   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  259    276   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  260    277   
@@ -282,299 +411,487 @@
  302    319   
        let body = http_request.body().bytes().expect("body should be strict");
  303    320   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  304    321   
            body,
  305    322   
            "{\"Value\":\"Hi\"}",
  306    323   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  307    324   
        ));
  308    325   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  309    326   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  310    327   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  311    328   
    }
         329  +
         330  +
    /* ProtocolTestGenerator.kt:98 */
  312    331   
}
  313    332   
         333  +
/* OperationErrorGenerator.kt:79 */
  314    334   
/// Error type for the `OperationWithOptionalInputOutputError` operation.
         335  +
/* RustType.kt:516 */
  315    336   
#[non_exhaustive]
         337  +
/* RustType.kt:516 */
  316    338   
#[derive(::std::fmt::Debug)]
  317         -
pub enum OperationWithOptionalInputOutputError {
         339  +
pub /* OperationErrorGenerator.kt:81 */ enum OperationWithOptionalInputOutputError {
         340  +
    /* OperationErrorGenerator.kt:88 */
  318    341   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  319    342   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  320    343   
    variable wildcard pattern and check `.code()`:
  321    344   
     \
  322    345   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  323    346   
     \
  324    347   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-OperationWithOptionalInputOutputError) for what information is available for the error.")]
  325    348   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         349  +
    /* OperationErrorGenerator.kt:81 */
  326    350   
}
         351  +
/* OperationErrorGenerator.kt:218 */
  327    352   
impl OperationWithOptionalInputOutputError {
         353  +
    /* OperationErrorGenerator.kt:219 */
  328    354   
    /// Creates the `OperationWithOptionalInputOutputError::Unhandled` variant from any error type.
  329    355   
    pub fn unhandled(
  330    356   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  331    357   
    ) -> Self {
  332    358   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  333    359   
            source: err.into(),
  334    360   
            meta: ::std::default::Default::default(),
  335    361   
        })
  336    362   
    }
  337    363   
  338    364   
    /// Creates the `OperationWithOptionalInputOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  339    365   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  340    366   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  341    367   
            source: err.clone().into(),
  342    368   
            meta: err,
  343    369   
        })
  344    370   
    }
  345         -
    ///
         371  +
    /// /* OperationErrorGenerator.kt:236 */
  346    372   
    /// Returns error metadata, which includes the error code, message,
  347    373   
    /// request ID, and potentially additional information.
  348    374   
    ///
         375  +
    /* OperationErrorGenerator.kt:242 */
  349    376   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         377  +
        /* OperationErrorGenerator.kt:243 */
  350    378   
        match self {
  351         -
            Self::Unhandled(e) => &e.meta,
         379  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:243 */
  352    381   
        }
         382  +
        /* OperationErrorGenerator.kt:242 */
  353    383   
    }
         384  +
    /* OperationErrorGenerator.kt:218 */
  354    385   
}
         386  +
/* OperationErrorGenerator.kt:269 */
  355    387   
impl ::std::error::Error for OperationWithOptionalInputOutputError {
         388  +
    /* OperationErrorGenerator.kt:270 */
  356    389   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         390  +
        /* OperationErrorGenerator.kt:318 */
  357    391   
        match self {
  358         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         392  +
            /* OperationErrorGenerator.kt:326 */
         393  +
            Self::Unhandled(_inner) => {
         394  +
                /* OperationErrorGenerator.kt:279 */
         395  +
                ::std::option::Option::Some(&*_inner.source)
         396  +
                /* OperationErrorGenerator.kt:326 */
         397  +
            } /* OperationErrorGenerator.kt:318 */
  359    398   
        }
         399  +
        /* OperationErrorGenerator.kt:270 */
  360    400   
    }
         401  +
    /* OperationErrorGenerator.kt:269 */
  361    402   
}
         403  +
/* OperationErrorGenerator.kt:133 */
  362    404   
impl ::std::fmt::Display for OperationWithOptionalInputOutputError {
         405  +
    /* OperationErrorGenerator.kt:134 */
  363    406   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         407  +
        /* OperationErrorGenerator.kt:318 */
  364    408   
        match self {
         409  +
            /* OperationErrorGenerator.kt:326 */
  365    410   
            Self::Unhandled(_inner) => {
         411  +
                /* OperationErrorGenerator.kt:139 */
  366    412   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  367    413   
                    write!(f, "unhandled error ({code})")
  368    414   
                } else {
  369    415   
                    f.write_str("unhandled error")
  370    416   
                }
         417  +
                /* OperationErrorGenerator.kt:326 */
         418  +
            } /* OperationErrorGenerator.kt:318 */
  371    419   
        }
         420  +
        /* OperationErrorGenerator.kt:134 */
  372    421   
    }
  373         -
    }
         422  +
    /* OperationErrorGenerator.kt:133 */
  374    423   
}
         424  +
/* OperationErrorGenerator.kt:182 */
  375    425   
impl ::aws_smithy_types::retry::ProvideErrorKind for OperationWithOptionalInputOutputError {
         426  +
    /* OperationErrorGenerator.kt:186 */
  376    427   
    fn code(&self) -> ::std::option::Option<&str> {
         428  +
        /* OperationErrorGenerator.kt:187 */
  377    429   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         430  +
        /* OperationErrorGenerator.kt:186 */
  378    431   
    }
         432  +
    /* OperationErrorGenerator.kt:190 */
  379    433   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         434  +
        /* OperationErrorGenerator.kt:197 */
  380    435   
        ::std::option::Option::None
         436  +
        /* OperationErrorGenerator.kt:190 */
  381    437   
    }
         438  +
    /* OperationErrorGenerator.kt:182 */
  382    439   
}
         440  +
/* OperationErrorGenerator.kt:163 */
  383    441   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OperationWithOptionalInputOutputError {
         442  +
    /* OperationErrorGenerator.kt:164 */
  384    443   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         444  +
        /* OperationErrorGenerator.kt:318 */
  385    445   
        match self {
  386         -
            Self::Unhandled(_inner) => &_inner.meta,
         446  +
            /* OperationErrorGenerator.kt:326 */
         447  +
            Self::Unhandled(_inner) => {
         448  +
                /* OperationErrorGenerator.kt:168 */
         449  +
                &_inner.meta
         450  +
                /* OperationErrorGenerator.kt:326 */
         451  +
            } /* OperationErrorGenerator.kt:318 */
  387    452   
        }
         453  +
        /* OperationErrorGenerator.kt:164 */
  388    454   
    }
         455  +
    /* OperationErrorGenerator.kt:163 */
  389    456   
}
         457  +
/* OperationErrorGenerator.kt:109 */
  390    458   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for OperationWithOptionalInputOutputError {
         459  +
    /* OperationErrorGenerator.kt:110 */
  391    460   
    fn create_unhandled_error(
  392    461   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  393    462   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  394    463   
    ) -> Self {
         464  +
        /* OperationErrorGenerator.kt:121 */
  395    465   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  396    466   
            source,
  397    467   
            meta: meta.unwrap_or_default(),
  398    468   
        })
         469  +
        /* OperationErrorGenerator.kt:110 */
  399    470   
    }
         471  +
    /* OperationErrorGenerator.kt:109 */
  400    472   
}
  401    473   
         474  +
/* CodegenDelegator.kt:255 */
  402    475   
pub use crate::operation::operation_with_optional_input_output::_operation_with_optional_input_output_output::OperationWithOptionalInputOutputOutput;
  403    476   
         477  +
/* CodegenDelegator.kt:255 */
  404    478   
pub use crate::operation::operation_with_optional_input_output::_operation_with_optional_input_output_input::OperationWithOptionalInputOutputInput;
  405    479   
         480  +
/* RustModule.kt:172 */
  406    481   
mod _operation_with_optional_input_output_input;
  407    482   
         483  +
/* RustModule.kt:172 */
  408    484   
mod _operation_with_optional_input_output_output;
  409    485   
  410         -
/// Builders
         486  +
/// /* CodegenDelegator.kt:51 */Builders
  411    487   
pub mod builders;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output/_operation_with_optional_input_output_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 OperationWithOptionalInputOutputInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct OperationWithOptionalInputOutputInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub value: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl OperationWithOptionalInputOutputInput {
          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<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.value.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl OperationWithOptionalInputOutputInput {
   16         -
    /// Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          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 OperationWithOptionalInputOutputInputBuilder {
   26         -
    pub(crate) value: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl OperationWithOptionalInputOutputInputBuilder {
          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: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.value = ::std::option::Option::Some(input.into());
          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<::std::string::String>) -> 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<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.value
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OperationWithOptionalInputOutputInput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(
   45     80   
        self,
   46     81   
    ) -> ::std::result::Result<
   47     82   
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
   48     83   
        ::aws_smithy_types::error::operation::BuildError,
   49     84   
    > {
   50         -
        ::std::result::Result::Ok(crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput { value: self.value })
          85  +
        /* BuilderGenerator.kt:254 */
          86  +
        ::std::result::Result::Ok(
          87  +
            /* BuilderGenerator.kt:477 */
          88  +
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput {
          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/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output/_operation_with_optional_input_output_output.rs

@@ -1,1 +47,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct OperationWithOptionalInputOutputOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct OperationWithOptionalInputOutputOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub value: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl OperationWithOptionalInputOutputOutput {
          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<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.value.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl OperationWithOptionalInputOutputOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          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 OperationWithOptionalInputOutputOutputBuilder {
   26         -
    pub(crate) value: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl OperationWithOptionalInputOutputOutputBuilder {
          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: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.value = ::std::option::Option::Some(input.into());
          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<::std::string::String>) -> 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<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.value
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OperationWithOptionalInputOutputOutput`](crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput {
   45         -
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput { value: self.value }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputOutput {
          82  +
            /* BuilderGenerator.kt:481 */ value: self.value,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output/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_optional_input_output::_operation_with_optional_input_output_output::OperationWithOptionalInputOutputOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::operation_with_optional_input_output::_operation_with_optional_input_output_input::OperationWithOptionalInputOutputInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder {
    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_optional_input_output::OperationWithOptionalInputOutputOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.operation_with_optional_input_output();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `OperationWithOptionalInputOutput`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `OperationWithOptionalInputOutput`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct OperationWithOptionalInputOutputFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder,
   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_optional_input_output::OperationWithOptionalInputOutputOutput,
   34     40   
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   35     41   
    > for OperationWithOptionalInputOutputFluentBuilder
   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_optional_input_output::OperationWithOptionalInputOutputOutput,
   43     49   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   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 OperationWithOptionalInputOutputFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `OperationWithOptionalInputOutputFluentBuilder`.
   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 OperationWithOptionalInputOutput as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::operation_with_optional_input_output::builders::OperationWithOptionalInputOutputInputBuilder {
   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_optional_input_output::OperationWithOptionalInputOutputOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   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_optional_input_output::OperationWithOptionalInputOutput::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_optional_input_output::OperationWithOptionalInputOutput::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_optional_input_output::OperationWithOptionalInputOutputOutput,
   96    106   
        crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputError,
   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 value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.value(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_value(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_value(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_value()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents.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 `PutAndGetInlineDocuments`.
           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 PutAndGetInlineDocuments;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl PutAndGetInlineDocuments {
    7         -
    /// Creates a new `PutAndGetInlineDocuments`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `PutAndGetInlineDocuments`
          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_and_get_inline_documents::PutAndGetInlineDocumentsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +276,293 @@
   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 PutAndGetInlineDocuments {
   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("PutAndGetInlineDocuments");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            PutAndGetInlineDocumentsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            PutAndGetInlineDocumentsResponseDeserializer,
  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   
            "PutAndGetInlineDocuments",
  111    122   
            "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("PutAndGetInlineDocuments")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(PutAndGetInlineDocumentsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
  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 PutAndGetInlineDocumentsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutAndGetInlineDocumentsResponseDeserializer {
  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_put_and_get_inline_documents::de_put_and_get_inline_documents_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_put_and_get_inline_documents::de_put_and_get_inline_documents_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 PutAndGetInlineDocumentsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutAndGetInlineDocumentsRequestSerializer {
  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::put_and_get_inline_documents::PutAndGetInlineDocumentsInput>()
  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::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  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, "/").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::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  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/x-amz-json-1.1");
  193    206   
            builder = _header_serialization_settings.set_default_header(
  194    207   
                builder,
  195    208   
                ::http::header::HeaderName::from_static("x-amz-target"),
  196    209   
                "JsonProtocol.PutAndGetInlineDocuments",
  197    210   
            );
  198    211   
            builder
  199    212   
        };
  200    213   
        let body = ::aws_smithy_types::body::SdkBody::from(
  201    214   
            crate::protocol_serde::shape_put_and_get_inline_documents::ser_put_and_get_inline_documents_input(&input)?,
  202    215   
        );
  203    216   
        if let Some(content_length) = body.content_length() {
  204    217   
            let content_length = content_length.to_string();
  205    218   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  206    219   
        }
  207    220   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  208    221   
    }
  209    222   
}
         223  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  210    224   
#[derive(Debug)]
  211    225   
struct PutAndGetInlineDocumentsEndpointParamsInterceptor;
  212    226   
  213    227   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutAndGetInlineDocumentsEndpointParamsInterceptor {
  214    228   
    fn name(&self) -> &'static str {
  215    229   
        "PutAndGetInlineDocumentsEndpointParamsInterceptor"
  216    230   
    }
  217    231   
  218    232   
    fn read_before_execution(
  219    233   
        &self,
  220    234   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  221    235   
            '_,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  225    239   
        >,
  226    240   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    241   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    242   
        let _input = context
  229    243   
            .input()
  230    244   
            .downcast_ref::<PutAndGetInlineDocumentsInput>()
  231    245   
            .ok_or("failed to downcast to PutAndGetInlineDocumentsInput")?;
  232    246   
  233    247   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    249   
        })?;
  236    250   
        cfg.interceptor_state()
  237    251   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  238    252   
        ::std::result::Result::Ok(())
  239    253   
    }
  240    254   
}
  241    255   
  242    256   
// The get_* functions below are generated from JMESPath expressions in the
  243    257   
// operationContextParams trait. They target the operation's input shape.
  244    258   
         259  +
/* RustType.kt:516 */
  245    260   
#[allow(unreachable_code, unused_variables)]
         261  +
/* RustType.kt:516 */
  246    262   
#[cfg(test)]
         263  +
/* ProtocolTestGenerator.kt:98 */
  247    264   
mod put_and_get_inline_documents_test {
  248    265   
  249    266   
    /// Serializes inline documents in a JSON request.
  250    267   
    /// Test ID: PutAndGetInlineDocumentsInput
  251    268   
    #[::tokio::test]
  252    269   
    #[::tracing_test::traced_test]
  253    270   
    async fn put_and_get_inline_documents_input_request() {
  254    271   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  255    272   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  256    273   
@@ -312,329 +441,517 @@
  332    349   
        let parsed = parsed
  333    350   
            .expect("should be successful response")
  334    351   
            .downcast::<crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput>()
  335    352   
            .unwrap();
  336    353   
        ::pretty_assertions::assert_eq!(
  337    354   
            parsed.inline_document,
  338    355   
            expected_output.inline_document,
  339    356   
            "Unexpected value for `inline_document`"
  340    357   
        );
  341    358   
    }
         359  +
         360  +
    /* ProtocolTestGenerator.kt:98 */
  342    361   
}
  343    362   
         363  +
/* OperationErrorGenerator.kt:79 */
  344    364   
/// Error type for the `PutAndGetInlineDocumentsError` operation.
         365  +
/* RustType.kt:516 */
  345    366   
#[non_exhaustive]
         367  +
/* RustType.kt:516 */
  346    368   
#[derive(::std::fmt::Debug)]
  347         -
pub enum PutAndGetInlineDocumentsError {
         369  +
pub /* OperationErrorGenerator.kt:81 */ enum PutAndGetInlineDocumentsError {
         370  +
    /* OperationErrorGenerator.kt:88 */
  348    371   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  349    372   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  350    373   
    variable wildcard pattern and check `.code()`:
  351    374   
     \
  352    375   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  353    376   
     \
  354    377   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PutAndGetInlineDocumentsError) for what information is available for the error.")]
  355    378   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         379  +
    /* OperationErrorGenerator.kt:81 */
  356    380   
}
         381  +
/* OperationErrorGenerator.kt:218 */
  357    382   
impl PutAndGetInlineDocumentsError {
         383  +
    /* OperationErrorGenerator.kt:219 */
  358    384   
    /// Creates the `PutAndGetInlineDocumentsError::Unhandled` variant from any error type.
  359    385   
    pub fn unhandled(
  360    386   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  361    387   
    ) -> Self {
  362    388   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  363    389   
            source: err.into(),
  364    390   
            meta: ::std::default::Default::default(),
  365    391   
        })
  366    392   
    }
  367    393   
  368    394   
    /// Creates the `PutAndGetInlineDocumentsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  369    395   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  370    396   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  371    397   
            source: err.clone().into(),
  372    398   
            meta: err,
  373    399   
        })
  374    400   
    }
  375         -
    ///
         401  +
    /// /* OperationErrorGenerator.kt:236 */
  376    402   
    /// Returns error metadata, which includes the error code, message,
  377    403   
    /// request ID, and potentially additional information.
  378    404   
    ///
         405  +
    /* OperationErrorGenerator.kt:242 */
  379    406   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         407  +
        /* OperationErrorGenerator.kt:243 */
  380    408   
        match self {
  381         -
            Self::Unhandled(e) => &e.meta,
         409  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         410  +
            /* OperationErrorGenerator.kt:243 */
  382    411   
        }
         412  +
        /* OperationErrorGenerator.kt:242 */
  383    413   
    }
         414  +
    /* OperationErrorGenerator.kt:218 */
  384    415   
}
         416  +
/* OperationErrorGenerator.kt:269 */
  385    417   
impl ::std::error::Error for PutAndGetInlineDocumentsError {
         418  +
    /* OperationErrorGenerator.kt:270 */
  386    419   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         420  +
        /* OperationErrorGenerator.kt:318 */
  387    421   
        match self {
  388         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         422  +
            /* OperationErrorGenerator.kt:326 */
         423  +
            Self::Unhandled(_inner) => {
         424  +
                /* OperationErrorGenerator.kt:279 */
         425  +
                ::std::option::Option::Some(&*_inner.source)
         426  +
                /* OperationErrorGenerator.kt:326 */
         427  +
            } /* OperationErrorGenerator.kt:318 */
  389    428   
        }
         429  +
        /* OperationErrorGenerator.kt:270 */
  390    430   
    }
         431  +
    /* OperationErrorGenerator.kt:269 */
  391    432   
}
         433  +
/* OperationErrorGenerator.kt:133 */
  392    434   
impl ::std::fmt::Display for PutAndGetInlineDocumentsError {
         435  +
    /* OperationErrorGenerator.kt:134 */
  393    436   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         437  +
        /* OperationErrorGenerator.kt:318 */
  394    438   
        match self {
         439  +
            /* OperationErrorGenerator.kt:326 */
  395    440   
            Self::Unhandled(_inner) => {
         441  +
                /* OperationErrorGenerator.kt:139 */
  396    442   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  397    443   
                    write!(f, "unhandled error ({code})")
  398    444   
                } else {
  399    445   
                    f.write_str("unhandled error")
  400    446   
                }
         447  +
                /* OperationErrorGenerator.kt:326 */
         448  +
            } /* OperationErrorGenerator.kt:318 */
  401    449   
        }
         450  +
        /* OperationErrorGenerator.kt:134 */
  402    451   
    }
  403         -
    }
         452  +
    /* OperationErrorGenerator.kt:133 */
  404    453   
}
         454  +
/* OperationErrorGenerator.kt:182 */
  405    455   
impl ::aws_smithy_types::retry::ProvideErrorKind for PutAndGetInlineDocumentsError {
         456  +
    /* OperationErrorGenerator.kt:186 */
  406    457   
    fn code(&self) -> ::std::option::Option<&str> {
         458  +
        /* OperationErrorGenerator.kt:187 */
  407    459   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         460  +
        /* OperationErrorGenerator.kt:186 */
  408    461   
    }
         462  +
    /* OperationErrorGenerator.kt:190 */
  409    463   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         464  +
        /* OperationErrorGenerator.kt:197 */
  410    465   
        ::std::option::Option::None
         466  +
        /* OperationErrorGenerator.kt:190 */
  411    467   
    }
         468  +
    /* OperationErrorGenerator.kt:182 */
  412    469   
}
         470  +
/* OperationErrorGenerator.kt:163 */
  413    471   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PutAndGetInlineDocumentsError {
         472  +
    /* OperationErrorGenerator.kt:164 */
  414    473   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         474  +
        /* OperationErrorGenerator.kt:318 */
  415    475   
        match self {
  416         -
            Self::Unhandled(_inner) => &_inner.meta,
         476  +
            /* OperationErrorGenerator.kt:326 */
         477  +
            Self::Unhandled(_inner) => {
         478  +
                /* OperationErrorGenerator.kt:168 */
         479  +
                &_inner.meta
         480  +
                /* OperationErrorGenerator.kt:326 */
         481  +
            } /* OperationErrorGenerator.kt:318 */
  417    482   
        }
         483  +
        /* OperationErrorGenerator.kt:164 */
  418    484   
    }
         485  +
    /* OperationErrorGenerator.kt:163 */
  419    486   
}
         487  +
/* OperationErrorGenerator.kt:109 */
  420    488   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PutAndGetInlineDocumentsError {
         489  +
    /* OperationErrorGenerator.kt:110 */
  421    490   
    fn create_unhandled_error(
  422    491   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  423    492   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  424    493   
    ) -> Self {
         494  +
        /* OperationErrorGenerator.kt:121 */
  425    495   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  426    496   
            source,
  427    497   
            meta: meta.unwrap_or_default(),
  428    498   
        })
         499  +
        /* OperationErrorGenerator.kt:110 */
  429    500   
    }
         501  +
    /* OperationErrorGenerator.kt:109 */
  430    502   
}
  431    503   
         504  +
/* CodegenDelegator.kt:255 */
  432    505   
pub use crate::operation::put_and_get_inline_documents::_put_and_get_inline_documents_output::PutAndGetInlineDocumentsOutput;
  433    506   
         507  +
/* CodegenDelegator.kt:255 */
  434    508   
pub use crate::operation::put_and_get_inline_documents::_put_and_get_inline_documents_input::PutAndGetInlineDocumentsInput;
  435    509   
         510  +
/* RustModule.kt:172 */
  436    511   
mod _put_and_get_inline_documents_input;
  437    512   
         513  +
/* RustModule.kt:172 */
  438    514   
mod _put_and_get_inline_documents_output;
  439    515   
  440         -
/// Builders
         516  +
/// /* CodegenDelegator.kt:51 */Builders
  441    517   
pub mod builders;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents/_put_and_get_inline_documents_input.rs

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

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents/_put_and_get_inline_documents_output.rs

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

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents/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::put_and_get_inline_documents::_put_and_get_inline_documents_output::PutAndGetInlineDocumentsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::put_and_get_inline_documents::_put_and_get_inline_documents_input::PutAndGetInlineDocumentsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsInputBuilder {
    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::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.put_and_get_inline_documents();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `PutAndGetInlineDocuments`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `PutAndGetInlineDocuments`.
   24     27   
///
   25         -
/// This example serializes an inline document as part of the payload.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example serializes an inline document as part of the payload.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct PutAndGetInlineDocumentsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsInputBuilder,
   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::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   35     41   
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   36     42   
    > for PutAndGetInlineDocumentsFluentBuilder
   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::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   44     50   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   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 PutAndGetInlineDocumentsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `PutAndGetInlineDocumentsFluentBuilder`.
   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 PutAndGetInlineDocuments as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::put_and_get_inline_documents::builders::PutAndGetInlineDocumentsInputBuilder {
   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::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   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::put_and_get_inline_documents::PutAndGetInlineDocuments::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::put_and_get_inline_documents::PutAndGetInlineDocuments::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::put_and_get_inline_documents::PutAndGetInlineDocumentsOutput,
   97    107   
        crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsError,
   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 inline_document(mut self, input: ::aws_smithy_types::Document) -> Self {
  113    126   
        self.inner = self.inner.inline_document(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_inline_document(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
  118    133   
        self.inner = self.inner.set_inline_document(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_inline_document(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
  123    140   
        self.inner.get_inline_document()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/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 +407,483 @@
   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   
            "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, "/").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   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    205   
            }
  193    206   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194    207   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    208   
            builder = _header_serialization_settings.set_default_header(
  196    209   
                builder,
  197    210   
                ::http::header::HeaderName::from_static("x-amz-target"),
  198    211   
                "JsonProtocol.PutWithContentEncoding",
  199    212   
            );
  200    213   
            builder
  201    214   
        };
  202    215   
        let body = ::aws_smithy_types::body::SdkBody::from(
  203    216   
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_input(&input)?,
  204    217   
        );
  205    218   
        if let Some(content_length) = body.content_length() {
  206    219   
            let content_length = content_length.to_string();
  207    220   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  208    221   
        }
  209    222   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    223   
    }
  211    224   
}
         225  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  212    226   
#[derive(Debug)]
  213    227   
struct PutWithContentEncodingEndpointParamsInterceptor;
  214    228   
  215    229   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  216    230   
    fn name(&self) -> &'static str {
  217    231   
        "PutWithContentEncodingEndpointParamsInterceptor"
  218    232   
    }
  219    233   
  220    234   
    fn read_before_execution(
  221    235   
        &self,
  222    236   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  223    237   
            '_,
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  225    239   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  227    241   
        >,
  228    242   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  229    243   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  230    244   
        let _input = context
  231    245   
            .input()
  232    246   
            .downcast_ref::<PutWithContentEncodingInput>()
  233    247   
            .ok_or("failed to downcast to PutWithContentEncodingInput")?;
  234    248   
  235    249   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  236    250   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  237    251   
        })?;
  238    252   
        cfg.interceptor_state()
  239    253   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  240    254   
        ::std::result::Result::Ok(())
  241    255   
    }
  242    256   
}
  243    257   
  244    258   
// The get_* functions below are generated from JMESPath expressions in the
  245    259   
// operationContextParams trait. They target the operation's input shape.
  246    260   
         261  +
/* RustType.kt:516 */
  247    262   
#[allow(unreachable_code, unused_variables)]
         263  +
/* RustType.kt:516 */
  248    264   
#[cfg(test)]
         265  +
/* ProtocolTestGenerator.kt:98 */
  249    266   
mod put_with_content_encoding_test {
  250    267   
  251    268   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  252    269   
    /// Test ID: SDKAppliedContentEncoding_awsJson1_1
  253    270   
    #[::tokio::test]
  254    271   
    #[::tracing_test::traced_test]
  255    272   
    async fn sdk_applied_content_encoding_aws_json1_1_request() {
  256    273   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  257    274   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  258    275   
  259    276   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  260    277   
        let result = client.put_with_content_encoding()
  261    278   
        .set_data(
  262    279   
            ::std::option::Option::Some(
  263    280   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwb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pGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  264    281   
            )
  265    282   
        )
  266    283   
        .send().await;
  267    284   
        let _ = dbg!(result);
  268    285   
        let http_request = request_receiver.expect_request();
  269    286   
        let expected_headers = [("Content-Encoding", "gzip")];
  270    287   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  271    288   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  272    289   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  273    290   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  274    291   
    }
  275    292   
  276    293   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  277    294   
    /// user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
  278    295   
    /// traits are ignored in the awsJson1_1 protocol.
  279    296   
    ///
  280    297   
    /// Test ID: SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1
  281    298   
    #[::tokio::test]
  282    299   
    #[::tracing_test::traced_test]
  283    300   
    async fn sdk_appends_gzip_and_ignores_http_provided_encoding_aws_json1_1_request() {
  284    301   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  285    302   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  286    303   
  287    304   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  288    305   
        let result = client.put_with_content_encoding()
  289    306   
        .set_encoding(
  290    307   
            ::std::option::Option::Some(
  291    308   
                "custom".to_owned()
  292    309   
            )
  293    310   
        )
  294    311   
        .set_data(
  295    312   
            ::std::option::Option::Some(
  296    313   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJA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5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  297    314   
            )
  298    315   
        )
  299    316   
        .send().await;
  300    317   
        let _ = dbg!(result);
  301    318   
        let http_request = request_receiver.expect_request();
  302    319   
        let expected_headers = [("Content-Encoding", "gzip")];
  303    320   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  304    321   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  305    322   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  306    323   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  307    324   
    }
         325  +
         326  +
    /* ProtocolTestGenerator.kt:98 */
  308    327   
}
  309    328   
         329  +
/* OperationErrorGenerator.kt:79 */
  310    330   
/// Error type for the `PutWithContentEncodingError` operation.
         331  +
/* RustType.kt:516 */
  311    332   
#[non_exhaustive]
         333  +
/* RustType.kt:516 */
  312    334   
#[derive(::std::fmt::Debug)]
  313         -
pub enum PutWithContentEncodingError {
         335  +
pub /* OperationErrorGenerator.kt:81 */ enum PutWithContentEncodingError {
         336  +
    /* OperationErrorGenerator.kt:88 */
  314    337   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  315    338   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  316    339   
    variable wildcard pattern and check `.code()`:
  317    340   
     \
  318    341   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  319    342   
     \
  320    343   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PutWithContentEncodingError) for what information is available for the error.")]
  321    344   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         345  +
    /* OperationErrorGenerator.kt:81 */
  322    346   
}
         347  +
/* OperationErrorGenerator.kt:218 */
  323    348   
impl PutWithContentEncodingError {
         349  +
    /* OperationErrorGenerator.kt:219 */
  324    350   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from any error type.
  325    351   
    pub fn unhandled(
  326    352   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  327    353   
    ) -> Self {
  328    354   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  329    355   
            source: err.into(),
  330    356   
            meta: ::std::default::Default::default(),
  331    357   
        })
  332    358   
    }
  333    359   
  334    360   
    /// Creates the `PutWithContentEncodingError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  335    361   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  336    362   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  337    363   
            source: err.clone().into(),
  338    364   
            meta: err,
  339    365   
        })
  340    366   
    }
  341         -
    ///
         367  +
    /// /* OperationErrorGenerator.kt:236 */
  342    368   
    /// Returns error metadata, which includes the error code, message,
  343    369   
    /// request ID, and potentially additional information.
  344    370   
    ///
         371  +
    /* OperationErrorGenerator.kt:242 */
  345    372   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         373  +
        /* OperationErrorGenerator.kt:243 */
  346    374   
        match self {
  347         -
            Self::Unhandled(e) => &e.meta,
         375  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         376  +
            /* OperationErrorGenerator.kt:243 */
  348    377   
        }
         378  +
        /* OperationErrorGenerator.kt:242 */
  349    379   
    }
         380  +
    /* OperationErrorGenerator.kt:218 */
  350    381   
}
         382  +
/* OperationErrorGenerator.kt:269 */
  351    383   
impl ::std::error::Error for PutWithContentEncodingError {
         384  +
    /* OperationErrorGenerator.kt:270 */
  352    385   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         386  +
        /* OperationErrorGenerator.kt:318 */
  353    387   
        match self {
  354         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         388  +
            /* OperationErrorGenerator.kt:326 */
         389  +
            Self::Unhandled(_inner) => {
         390  +
                /* OperationErrorGenerator.kt:279 */
         391  +
                ::std::option::Option::Some(&*_inner.source)
         392  +
                /* OperationErrorGenerator.kt:326 */
         393  +
            } /* OperationErrorGenerator.kt:318 */
  355    394   
        }
         395  +
        /* OperationErrorGenerator.kt:270 */
  356    396   
    }
         397  +
    /* OperationErrorGenerator.kt:269 */
  357    398   
}
         399  +
/* OperationErrorGenerator.kt:133 */
  358    400   
impl ::std::fmt::Display for PutWithContentEncodingError {
         401  +
    /* OperationErrorGenerator.kt:134 */
  359    402   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         403  +
        /* OperationErrorGenerator.kt:318 */
  360    404   
        match self {
         405  +
            /* OperationErrorGenerator.kt:326 */
  361    406   
            Self::Unhandled(_inner) => {
         407  +
                /* OperationErrorGenerator.kt:139 */
  362    408   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  363    409   
                    write!(f, "unhandled error ({code})")
  364    410   
                } else {
  365    411   
                    f.write_str("unhandled error")
  366    412   
                }
         413  +
                /* OperationErrorGenerator.kt:326 */
         414  +
            } /* OperationErrorGenerator.kt:318 */
  367    415   
        }
         416  +
        /* OperationErrorGenerator.kt:134 */
  368    417   
    }
  369         -
    }
         418  +
    /* OperationErrorGenerator.kt:133 */
  370    419   
}
         420  +
/* OperationErrorGenerator.kt:182 */
  371    421   
impl ::aws_smithy_types::retry::ProvideErrorKind for PutWithContentEncodingError {
         422  +
    /* OperationErrorGenerator.kt:186 */
  372    423   
    fn code(&self) -> ::std::option::Option<&str> {
         424  +
        /* OperationErrorGenerator.kt:187 */
  373    425   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         426  +
        /* OperationErrorGenerator.kt:186 */
  374    427   
    }
         428  +
    /* OperationErrorGenerator.kt:190 */
  375    429   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         430  +
        /* OperationErrorGenerator.kt:197 */
  376    431   
        ::std::option::Option::None
         432  +
        /* OperationErrorGenerator.kt:190 */
  377    433   
    }
         434  +
    /* OperationErrorGenerator.kt:182 */
  378    435   
}
         436  +
/* OperationErrorGenerator.kt:163 */
  379    437   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PutWithContentEncodingError {
         438  +
    /* OperationErrorGenerator.kt:164 */
  380    439   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         440  +
        /* OperationErrorGenerator.kt:318 */
  381    441   
        match self {
  382         -
            Self::Unhandled(_inner) => &_inner.meta,
         442  +
            /* OperationErrorGenerator.kt:326 */
         443  +
            Self::Unhandled(_inner) => {
         444  +
                /* OperationErrorGenerator.kt:168 */
         445  +
                &_inner.meta
         446  +
                /* OperationErrorGenerator.kt:326 */
         447  +
            } /* OperationErrorGenerator.kt:318 */
  383    448   
        }
         449  +
        /* OperationErrorGenerator.kt:164 */
  384    450   
    }
         451  +
    /* OperationErrorGenerator.kt:163 */
  385    452   
}
         453  +
/* OperationErrorGenerator.kt:109 */
  386    454   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PutWithContentEncodingError {
         455  +
    /* OperationErrorGenerator.kt:110 */
  387    456   
    fn create_unhandled_error(
  388    457   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  389    458   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  390    459   
    ) -> Self {
         460  +
        /* OperationErrorGenerator.kt:121 */
  391    461   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  392    462   
            source,
  393    463   
            meta: meta.unwrap_or_default(),
  394    464   
        })
         465  +
        /* OperationErrorGenerator.kt:110 */
  395    466   
    }
         467  +
    /* OperationErrorGenerator.kt:109 */
  396    468   
}
  397    469   
         470  +
/* CodegenDelegator.kt:255 */
  398    471   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_output::PutWithContentEncodingOutput;
  399    472   
         473  +
/* CodegenDelegator.kt:255 */
  400    474   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_input::PutWithContentEncodingInput;
  401    475   
         476  +
/* RustModule.kt:172 */
  402    477   
mod _put_with_content_encoding_input;
  403    478   
         479  +
/* RustModule.kt:172 */
  404    480   
mod _put_with_content_encoding_output;
  405    481   
  406         -
/// Builders
         482  +
/// /* CodegenDelegator.kt:51 */Builders
  407    483   
pub mod builders;

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

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding/builders.rs

@@ -1,1 +138,162 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_output::PutWithContentEncodingOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::put_with_content_encoding::_put_with_content_encoding_input::PutWithContentEncodingInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder {
    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::put_with_content_encoding::PutWithContentEncodingOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.put_with_content_encoding();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `PutWithContentEncoding`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `PutWithContentEncoding`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct PutWithContentEncodingFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder,
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   34     40   
        crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   35     41   
    > for PutWithContentEncodingFluentBuilder
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   43     49   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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 PutWithContentEncodingFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `PutWithContentEncodingFluentBuilder`.
   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 PutWithContentEncoding as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder {
   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::put_with_content_encoding::PutWithContentEncodingOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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::put_with_content_encoding::PutWithContentEncoding::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::put_with_content_encoding::PutWithContentEncoding::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::put_with_content_encoding::PutWithContentEncodingOutput,
   96    106   
        crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   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 encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.encoding(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_encoding(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_encoding(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_encoding()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  126    145   
        self.inner = self.inner.data(input.into());
  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_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  131    152   
        self.inner = self.inner.set_data(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_data(&self) -> &::std::option::Option<::std::string::String> {
  136    159   
        self.inner.get_data()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:282 */
  138    162   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties.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 `SimpleScalarProperties`.
           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 SimpleScalarProperties;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl SimpleScalarProperties {
    7         -
    /// Creates a new `SimpleScalarProperties`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `SimpleScalarProperties`
          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::simple_scalar_properties::SimpleScalarPropertiesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +276,293 @@
   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 SimpleScalarProperties {
   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("SimpleScalarProperties");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            SimpleScalarPropertiesRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            SimpleScalarPropertiesResponseDeserializer,
  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   
            "SimpleScalarProperties",
  111    122   
            "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("SimpleScalarProperties")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(SimpleScalarPropertiesEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
  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 SimpleScalarPropertiesResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleScalarPropertiesResponseDeserializer {
  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_simple_scalar_properties::de_simple_scalar_properties_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_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 SimpleScalarPropertiesRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SimpleScalarPropertiesRequestSerializer {
  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::simple_scalar_properties::SimpleScalarPropertiesInput>()
  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::simple_scalar_properties::SimpleScalarPropertiesInput,
  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, "/").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::simple_scalar_properties::SimpleScalarPropertiesInput,
  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/x-amz-json-1.1");
  193    206   
            builder = _header_serialization_settings.set_default_header(
  194    207   
                builder,
  195    208   
                ::http::header::HeaderName::from_static("x-amz-target"),
  196    209   
                "JsonProtocol.SimpleScalarProperties",
  197    210   
            );
  198    211   
            builder
  199    212   
        };
  200    213   
        let body = ::aws_smithy_types::body::SdkBody::from(
  201    214   
            crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_input(&input)?,
  202    215   
        );
  203    216   
        if let Some(content_length) = body.content_length() {
  204    217   
            let content_length = content_length.to_string();
  205    218   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  206    219   
        }
  207    220   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  208    221   
    }
  209    222   
}
         223  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  210    224   
#[derive(Debug)]
  211    225   
struct SimpleScalarPropertiesEndpointParamsInterceptor;
  212    226   
  213    227   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleScalarPropertiesEndpointParamsInterceptor {
  214    228   
    fn name(&self) -> &'static str {
  215    229   
        "SimpleScalarPropertiesEndpointParamsInterceptor"
  216    230   
    }
  217    231   
  218    232   
    fn read_before_execution(
  219    233   
        &self,
  220    234   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  221    235   
            '_,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  225    239   
        >,
  226    240   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    241   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    242   
        let _input = context
  229    243   
            .input()
  230    244   
            .downcast_ref::<SimpleScalarPropertiesInput>()
  231    245   
            .ok_or("failed to downcast to SimpleScalarPropertiesInput")?;
  232    246   
  233    247   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    249   
        })?;
  236    250   
        cfg.interceptor_state()
  237    251   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  238    252   
        ::std::result::Result::Ok(())
  239    253   
    }
  240    254   
}
  241    255   
  242    256   
// The get_* functions below are generated from JMESPath expressions in the
  243    257   
// operationContextParams trait. They target the operation's input shape.
  244    258   
         259  +
/* RustType.kt:516 */
  245    260   
#[allow(unreachable_code, unused_variables)]
         261  +
/* RustType.kt:516 */
  246    262   
#[cfg(test)]
         263  +
/* ProtocolTestGenerator.kt:98 */
  247    264   
mod simple_scalar_properties_test {
  248    265   
    use ::aws_smithy_protocol_test::FloatEquals;
  249    266   
  250    267   
    /// Supports handling NaN float values.
  251    268   
    /// Test ID: AwsJson11SupportsNaNFloatInputs
  252    269   
    #[::tokio::test]
  253    270   
    #[::tracing_test::traced_test]
  254    271   
    async fn aws_json11_supports_na_n_float_inputs_request() {
  255    272   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  256    273   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
@@ -510,527 +639,715 @@
  530    547   
            expected_output.float_value,
  531    548   
            parsed.float_value
  532    549   
        );
  533    550   
        assert!(
  534    551   
            parsed.double_value.float_equals(&expected_output.double_value),
  535    552   
            "Unexpected value for `double_value` {:?} vs. {:?}",
  536    553   
            expected_output.double_value,
  537    554   
            parsed.double_value
  538    555   
        );
  539    556   
    }
         557  +
         558  +
    /* ProtocolTestGenerator.kt:98 */
  540    559   
}
  541    560   
         561  +
/* OperationErrorGenerator.kt:79 */
  542    562   
/// Error type for the `SimpleScalarPropertiesError` operation.
         563  +
/* RustType.kt:516 */
  543    564   
#[non_exhaustive]
         565  +
/* RustType.kt:516 */
  544    566   
#[derive(::std::fmt::Debug)]
  545         -
pub enum SimpleScalarPropertiesError {
         567  +
pub /* OperationErrorGenerator.kt:81 */ enum SimpleScalarPropertiesError {
         568  +
    /* OperationErrorGenerator.kt:88 */
  546    569   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  547    570   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  548    571   
    variable wildcard pattern and check `.code()`:
  549    572   
     \
  550    573   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  551    574   
     \
  552    575   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SimpleScalarPropertiesError) for what information is available for the error.")]
  553    576   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         577  +
    /* OperationErrorGenerator.kt:81 */
  554    578   
}
         579  +
/* OperationErrorGenerator.kt:218 */
  555    580   
impl SimpleScalarPropertiesError {
         581  +
    /* OperationErrorGenerator.kt:219 */
  556    582   
    /// Creates the `SimpleScalarPropertiesError::Unhandled` variant from any error type.
  557    583   
    pub fn unhandled(
  558    584   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  559    585   
    ) -> Self {
  560    586   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  561    587   
            source: err.into(),
  562    588   
            meta: ::std::default::Default::default(),
  563    589   
        })
  564    590   
    }
  565    591   
  566    592   
    /// Creates the `SimpleScalarPropertiesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  567    593   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  568    594   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  569    595   
            source: err.clone().into(),
  570    596   
            meta: err,
  571    597   
        })
  572    598   
    }
  573         -
    ///
         599  +
    /// /* OperationErrorGenerator.kt:236 */
  574    600   
    /// Returns error metadata, which includes the error code, message,
  575    601   
    /// request ID, and potentially additional information.
  576    602   
    ///
         603  +
    /* OperationErrorGenerator.kt:242 */
  577    604   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         605  +
        /* OperationErrorGenerator.kt:243 */
  578    606   
        match self {
  579         -
            Self::Unhandled(e) => &e.meta,
         607  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         608  +
            /* OperationErrorGenerator.kt:243 */
  580    609   
        }
         610  +
        /* OperationErrorGenerator.kt:242 */
  581    611   
    }
         612  +
    /* OperationErrorGenerator.kt:218 */
  582    613   
}
         614  +
/* OperationErrorGenerator.kt:269 */
  583    615   
impl ::std::error::Error for SimpleScalarPropertiesError {
         616  +
    /* OperationErrorGenerator.kt:270 */
  584    617   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         618  +
        /* OperationErrorGenerator.kt:318 */
  585    619   
        match self {
  586         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         620  +
            /* OperationErrorGenerator.kt:326 */
         621  +
            Self::Unhandled(_inner) => {
         622  +
                /* OperationErrorGenerator.kt:279 */
         623  +
                ::std::option::Option::Some(&*_inner.source)
         624  +
                /* OperationErrorGenerator.kt:326 */
         625  +
            } /* OperationErrorGenerator.kt:318 */
  587    626   
        }
         627  +
        /* OperationErrorGenerator.kt:270 */
  588    628   
    }
         629  +
    /* OperationErrorGenerator.kt:269 */
  589    630   
}
         631  +
/* OperationErrorGenerator.kt:133 */
  590    632   
impl ::std::fmt::Display for SimpleScalarPropertiesError {
         633  +
    /* OperationErrorGenerator.kt:134 */
  591    634   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         635  +
        /* OperationErrorGenerator.kt:318 */
  592    636   
        match self {
         637  +
            /* OperationErrorGenerator.kt:326 */
  593    638   
            Self::Unhandled(_inner) => {
         639  +
                /* OperationErrorGenerator.kt:139 */
  594    640   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  595    641   
                    write!(f, "unhandled error ({code})")
  596    642   
                } else {
  597    643   
                    f.write_str("unhandled error")
  598    644   
                }
         645  +
                /* OperationErrorGenerator.kt:326 */
         646  +
            } /* OperationErrorGenerator.kt:318 */
  599    647   
        }
         648  +
        /* OperationErrorGenerator.kt:134 */
  600    649   
    }
  601         -
    }
         650  +
    /* OperationErrorGenerator.kt:133 */
  602    651   
}
         652  +
/* OperationErrorGenerator.kt:182 */
  603    653   
impl ::aws_smithy_types::retry::ProvideErrorKind for SimpleScalarPropertiesError {
         654  +
    /* OperationErrorGenerator.kt:186 */
  604    655   
    fn code(&self) -> ::std::option::Option<&str> {
         656  +
        /* OperationErrorGenerator.kt:187 */
  605    657   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         658  +
        /* OperationErrorGenerator.kt:186 */
  606    659   
    }
         660  +
    /* OperationErrorGenerator.kt:190 */
  607    661   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         662  +
        /* OperationErrorGenerator.kt:197 */
  608    663   
        ::std::option::Option::None
         664  +
        /* OperationErrorGenerator.kt:190 */
  609    665   
    }
         666  +
    /* OperationErrorGenerator.kt:182 */
  610    667   
}
         668  +
/* OperationErrorGenerator.kt:163 */
  611    669   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SimpleScalarPropertiesError {
         670  +
    /* OperationErrorGenerator.kt:164 */
  612    671   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         672  +
        /* OperationErrorGenerator.kt:318 */
  613    673   
        match self {
  614         -
            Self::Unhandled(_inner) => &_inner.meta,
         674  +
            /* OperationErrorGenerator.kt:326 */
         675  +
            Self::Unhandled(_inner) => {
         676  +
                /* OperationErrorGenerator.kt:168 */
         677  +
                &_inner.meta
         678  +
                /* OperationErrorGenerator.kt:326 */
         679  +
            } /* OperationErrorGenerator.kt:318 */
  615    680   
        }
         681  +
        /* OperationErrorGenerator.kt:164 */
  616    682   
    }
         683  +
    /* OperationErrorGenerator.kt:163 */
  617    684   
}
         685  +
/* OperationErrorGenerator.kt:109 */
  618    686   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SimpleScalarPropertiesError {
         687  +
    /* OperationErrorGenerator.kt:110 */
  619    688   
    fn create_unhandled_error(
  620    689   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  621    690   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  622    691   
    ) -> Self {
         692  +
        /* OperationErrorGenerator.kt:121 */
  623    693   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  624    694   
            source,
  625    695   
            meta: meta.unwrap_or_default(),
  626    696   
        })
         697  +
        /* OperationErrorGenerator.kt:110 */
  627    698   
    }
         699  +
    /* OperationErrorGenerator.kt:109 */
  628    700   
}
  629    701   
         702  +
/* CodegenDelegator.kt:255 */
  630    703   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_output::SimpleScalarPropertiesOutput;
  631    704   
         705  +
/* CodegenDelegator.kt:255 */
  632    706   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_input::SimpleScalarPropertiesInput;
  633    707   
         708  +
/* RustModule.kt:172 */
  634    709   
mod _simple_scalar_properties_input;
  635    710   
         711  +
/* RustModule.kt:172 */
  636    712   
mod _simple_scalar_properties_output;
  637    713   
  638         -
/// Builders
         714  +
/// /* CodegenDelegator.kt:51 */Builders
  639    715   
pub mod builders;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties/_simple_scalar_properties_input.rs

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