Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

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

@@ -1,1 +166,202 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::malformed_long::_malformed_long_output::MalformedLongOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_long::_malformed_long_input::MalformedLongInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_long::builders::MalformedLongInputBuilder {
    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::malformed_long::MalformedLongOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_long::MalformedLongError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_long();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedLong`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedLong`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedLongFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_long::builders::MalformedLongInputBuilder,
   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::malformed_long::MalformedLongOutput,
   34     40   
        crate::operation::malformed_long::MalformedLongError,
   35     41   
    > for MalformedLongFluentBuilder
   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::malformed_long::MalformedLongOutput,
   43     49   
            crate::operation::malformed_long::MalformedLongError,
   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 MalformedLongFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedLongFluentBuilder`.
   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 MalformedLong as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_long::builders::MalformedLongInputBuilder {
   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::malformed_long::MalformedLongOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_long::MalformedLongError,
   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::malformed_long::MalformedLong::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::malformed_long::MalformedLong::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::malformed_long::MalformedLongOutput,
   96    106   
        crate::operation::malformed_long::MalformedLongError,
   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 long_in_body(mut self, input: i64) -> Self {
  112    125   
        self.inner = self.inner.long_in_body(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_long_in_body(mut self, input: ::std::option::Option<i64>) -> Self {
  117    132   
        self.inner = self.inner.set_long_in_body(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_long_in_body(&self) -> &::std::option::Option<i64> {
  122    139   
        self.inner.get_long_in_body()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn long_in_path(mut self, input: i64) -> Self {
  126    145   
        self.inner = self.inner.long_in_path(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_long_in_path(mut self, input: ::std::option::Option<i64>) -> Self {
  131    152   
        self.inner = self.inner.set_long_in_path(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_long_in_path(&self) -> &::std::option::Option<i64> {
  136    159   
        self.inner.get_long_in_path()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn long_in_query(mut self, input: i64) -> Self {
  140    165   
        self.inner = self.inner.long_in_query(input);
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_long_in_query(mut self, input: ::std::option::Option<i64>) -> Self {
  145    172   
        self.inner = self.inner.set_long_in_query(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_long_in_query(&self) -> &::std::option::Option<i64> {
  150    179   
        self.inner.get_long_in_query()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn long_in_header(mut self, input: i64) -> Self {
  154    185   
        self.inner = self.inner.long_in_header(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_long_in_header(mut self, input: ::std::option::Option<i64>) -> Self {
  159    192   
        self.inner = self.inner.set_long_in_header(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_long_in_header(&self) -> &::std::option::Option<i64> {
  164    199   
        self.inner.get_long_in_header()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_map/_malformed_map_input.rs

@@ -1,1 +54,99 @@
    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 MalformedMapInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedMapInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub body_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl MalformedMapInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn body_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.body_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl MalformedMapInput {
   16         -
    /// Creates a new builder-style object to manufacture [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::malformed_map::builders::MalformedMapInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::malformed_map::builders::MalformedMapInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          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 MalformedMapInputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) body_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl MalformedMapInputBuilder {
   29         -
    /// Adds a key-value pair to `body_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `body_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_body_map`](Self::set_body_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_body_map`](Self::set_body_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn body_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.body_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v.into());
   36     62   
        self.body_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_body_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
          70  +
        /* BuilderGenerator.kt:315 */
   41     71   
        self.body_map = input;
   42     72   
        self
          73  +
        /* BuilderGenerator.kt:314 */
   43     74   
    }
          75  +
    /* BuilderGenerator.kt:334 */
   44     76   
    #[allow(missing_docs)] // documentation missing in model
          77  +
                           /* BuilderGenerator.kt:336 */
   45     78   
    pub fn get_body_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          79  +
        /* BuilderGenerator.kt:337 */
   46     80   
        &self.body_map
          81  +
        /* BuilderGenerator.kt:336 */
   47     82   
    }
   48         -
    /// Consumes the builder and constructs a [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          83  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedMapInput`](crate::operation::malformed_map::MalformedMapInput).
          84  +
    /* BuilderGenerator.kt:253 */
   49     85   
    pub fn build(
   50     86   
        self,
   51     87   
    ) -> ::std::result::Result<crate::operation::malformed_map::MalformedMapInput, ::aws_smithy_types::error::operation::BuildError> {
   52         -
        ::std::result::Result::Ok(crate::operation::malformed_map::MalformedMapInput { body_map: self.body_map })
          88  +
        /* BuilderGenerator.kt:254 */
          89  +
        ::std::result::Result::Ok(
          90  +
            /* BuilderGenerator.kt:477 */
          91  +
            crate::operation::malformed_map::MalformedMapInput {
          92  +
                /* BuilderGenerator.kt:481 */ body_map: self.body_map,
          93  +
                /* BuilderGenerator.kt:477 */
          94  +
            }, /* BuilderGenerator.kt:254 */
          95  +
        )
          96  +
        /* BuilderGenerator.kt:253 */
   53     97   
    }
          98  +
    /* BuilderGenerator.kt:355 */
   54     99   
}

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

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

@@ -1,1 +129,147 @@
    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::malformed_map::_malformed_map_output::MalformedMapOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_map::_malformed_map_input::MalformedMapInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_map::builders::MalformedMapInputBuilder {
    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::malformed_map::MalformedMapOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_map::MalformedMapError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_map();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedMap`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedMap`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedMapFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_map::builders::MalformedMapInputBuilder,
   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::malformed_map::MalformedMapOutput,
   34     40   
        crate::operation::malformed_map::MalformedMapError,
   35     41   
    > for MalformedMapFluentBuilder
   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::malformed_map::MalformedMapOutput,
   43     49   
            crate::operation::malformed_map::MalformedMapError,
   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 MalformedMapFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedMapFluentBuilder`.
   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 MalformedMap as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_map::builders::MalformedMapInputBuilder {
   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::malformed_map::MalformedMapOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_map::MalformedMapError,
   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::malformed_map::MalformedMap::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::malformed_map::MalformedMap::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::malformed_map::MalformedMapOutput,
   96    106   
        crate::operation::malformed_map::MalformedMapError,
   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   
    }
  110         -
    ///
         121  +
    /// /* FluentBuilderGenerator.kt:466 */
  111    122   
    /// Adds a key-value pair to `bodyMap`.
  112    123   
    ///
  113    124   
    /// To override the contents of this collection use [`set_body_map`](Self::set_body_map).
  114    125   
    ///
         126  +
    /* FluentBuilderGenerator.kt:473 */
  115    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:475 */
  116    129   
    pub fn body_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
  117    130   
        self.inner = self.inner.body_map(k.into(), v.into());
  118    131   
        self
  119    132   
    }
         133  +
    /* FluentBuilderGenerator.kt:498 */
  120    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* FluentBuilderGenerator.kt:500 */
  121    136   
    pub fn set_body_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
  122    137   
        self.inner = self.inner.set_body_map(input);
  123    138   
        self
  124    139   
    }
         140  +
    /* FluentBuilderGenerator.kt:518 */
  125    141   
    #[allow(missing_docs)] // documentation missing in model
         142  +
                           /* FluentBuilderGenerator.kt:520 */
  126    143   
    pub fn get_body_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
  127    144   
        self.inner.get_body_map()
  128    145   
    }
         146  +
    /* FluentBuilderGenerator.kt:282 */
  129    147   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_request_body.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 `MalformedRequestBody`.
           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 MalformedRequestBody;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl MalformedRequestBody {
    7         -
    /// Creates a new `MalformedRequestBody`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `MalformedRequestBody`
          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::malformed_request_body::MalformedRequestBodyInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::malformed_request_body::MalformedRequestBodyOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::malformed_request_body::MalformedRequestBodyError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +337,408 @@
   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 MalformedRequestBody {
   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("MalformedRequestBody");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            MalformedRequestBodyRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            MalformedRequestBodyResponseDeserializer,
  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   
            "MalformedRequestBody",
  111    122   
            "Rest Json Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("MalformedRequestBody")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(MalformedRequestBodyEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::malformed_request_body::MalformedRequestBodyError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::malformed_request_body::MalformedRequestBodyError,
  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 MalformedRequestBodyResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedRequestBodyResponseDeserializer {
  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_malformed_request_body::de_malformed_request_body_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_malformed_request_body::de_malformed_request_body_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 MalformedRequestBodyRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedRequestBodyRequestSerializer {
  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::malformed_request_body::MalformedRequestBodyInput>()
  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::malformed_request_body::MalformedRequestBodyInput,
  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, "/MalformedRequestBody").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::malformed_request_body::MalformedRequestBodyInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_malformed_request_body::ser_malformed_request_body_input(
  196    209   
            &input,
  197    210   
        )?);
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct MalformedRequestBodyEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedRequestBodyEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "MalformedRequestBodyEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<MalformedRequestBodyInput>()
  226    240   
            .ok_or("failed to downcast to MalformedRequestBodyInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* OperationErrorGenerator.kt:79 */
  240    255   
/// Error type for the `MalformedRequestBodyError` operation.
         256  +
/* RustType.kt:516 */
  241    257   
#[non_exhaustive]
         258  +
/* RustType.kt:516 */
  242    259   
#[derive(::std::fmt::Debug)]
  243         -
pub enum MalformedRequestBodyError {
         260  +
pub /* OperationErrorGenerator.kt:81 */ enum MalformedRequestBodyError {
         261  +
    /* OperationErrorGenerator.kt:88 */
  244    262   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  245    263   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  246    264   
    variable wildcard pattern and check `.code()`:
  247    265   
     \
  248    266   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  249    267   
     \
  250    268   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MalformedRequestBodyError) for what information is available for the error.")]
  251    269   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         270  +
    /* OperationErrorGenerator.kt:81 */
  252    271   
}
         272  +
/* OperationErrorGenerator.kt:218 */
  253    273   
impl MalformedRequestBodyError {
         274  +
    /* OperationErrorGenerator.kt:219 */
  254    275   
    /// Creates the `MalformedRequestBodyError::Unhandled` variant from any error type.
  255    276   
    pub fn unhandled(
  256    277   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  257    278   
    ) -> Self {
  258    279   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  259    280   
            source: err.into(),
  260    281   
            meta: ::std::default::Default::default(),
  261    282   
        })
  262    283   
    }
  263    284   
  264    285   
    /// Creates the `MalformedRequestBodyError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  265    286   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  266    287   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  267    288   
            source: err.clone().into(),
  268    289   
            meta: err,
  269    290   
        })
  270    291   
    }
  271         -
    ///
         292  +
    /// /* OperationErrorGenerator.kt:236 */
  272    293   
    /// Returns error metadata, which includes the error code, message,
  273    294   
    /// request ID, and potentially additional information.
  274    295   
    ///
         296  +
    /* OperationErrorGenerator.kt:242 */
  275    297   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         298  +
        /* OperationErrorGenerator.kt:243 */
  276    299   
        match self {
  277         -
            Self::Unhandled(e) => &e.meta,
         300  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         301  +
            /* OperationErrorGenerator.kt:243 */
  278    302   
        }
         303  +
        /* OperationErrorGenerator.kt:242 */
  279    304   
    }
         305  +
    /* OperationErrorGenerator.kt:218 */
  280    306   
}
         307  +
/* OperationErrorGenerator.kt:269 */
  281    308   
impl ::std::error::Error for MalformedRequestBodyError {
         309  +
    /* OperationErrorGenerator.kt:270 */
  282    310   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         311  +
        /* OperationErrorGenerator.kt:318 */
  283    312   
        match self {
  284         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         313  +
            /* OperationErrorGenerator.kt:326 */
         314  +
            Self::Unhandled(_inner) => {
         315  +
                /* OperationErrorGenerator.kt:279 */
         316  +
                ::std::option::Option::Some(&*_inner.source)
         317  +
                /* OperationErrorGenerator.kt:326 */
         318  +
            } /* OperationErrorGenerator.kt:318 */
  285    319   
        }
         320  +
        /* OperationErrorGenerator.kt:270 */
  286    321   
    }
         322  +
    /* OperationErrorGenerator.kt:269 */
  287    323   
}
         324  +
/* OperationErrorGenerator.kt:133 */
  288    325   
impl ::std::fmt::Display for MalformedRequestBodyError {
         326  +
    /* OperationErrorGenerator.kt:134 */
  289    327   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         328  +
        /* OperationErrorGenerator.kt:318 */
  290    329   
        match self {
         330  +
            /* OperationErrorGenerator.kt:326 */
  291    331   
            Self::Unhandled(_inner) => {
         332  +
                /* OperationErrorGenerator.kt:139 */
  292    333   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  293    334   
                    write!(f, "unhandled error ({code})")
  294    335   
                } else {
  295    336   
                    f.write_str("unhandled error")
  296    337   
                }
  297         -
            }
         338  +
                /* OperationErrorGenerator.kt:326 */
         339  +
            } /* OperationErrorGenerator.kt:318 */
  298    340   
        }
         341  +
        /* OperationErrorGenerator.kt:134 */
  299    342   
    }
         343  +
    /* OperationErrorGenerator.kt:133 */
  300    344   
}
         345  +
/* OperationErrorGenerator.kt:182 */
  301    346   
impl ::aws_smithy_types::retry::ProvideErrorKind for MalformedRequestBodyError {
         347  +
    /* OperationErrorGenerator.kt:186 */
  302    348   
    fn code(&self) -> ::std::option::Option<&str> {
         349  +
        /* OperationErrorGenerator.kt:187 */
  303    350   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         351  +
        /* OperationErrorGenerator.kt:186 */
  304    352   
    }
         353  +
    /* OperationErrorGenerator.kt:190 */
  305    354   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         355  +
        /* OperationErrorGenerator.kt:197 */
  306    356   
        ::std::option::Option::None
         357  +
        /* OperationErrorGenerator.kt:190 */
  307    358   
    }
         359  +
    /* OperationErrorGenerator.kt:182 */
  308    360   
}
         361  +
/* OperationErrorGenerator.kt:163 */
  309    362   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MalformedRequestBodyError {
         363  +
    /* OperationErrorGenerator.kt:164 */
  310    364   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         365  +
        /* OperationErrorGenerator.kt:318 */
  311    366   
        match self {
  312         -
            Self::Unhandled(_inner) => &_inner.meta,
         367  +
            /* OperationErrorGenerator.kt:326 */
         368  +
            Self::Unhandled(_inner) => {
         369  +
                /* OperationErrorGenerator.kt:168 */
         370  +
                &_inner.meta
         371  +
                /* OperationErrorGenerator.kt:326 */
         372  +
            } /* OperationErrorGenerator.kt:318 */
  313    373   
        }
         374  +
        /* OperationErrorGenerator.kt:164 */
  314    375   
    }
         376  +
    /* OperationErrorGenerator.kt:163 */
  315    377   
}
         378  +
/* OperationErrorGenerator.kt:109 */
  316    379   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MalformedRequestBodyError {
         380  +
    /* OperationErrorGenerator.kt:110 */
  317    381   
    fn create_unhandled_error(
  318    382   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  319    383   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  320    384   
    ) -> Self {
         385  +
        /* OperationErrorGenerator.kt:121 */
  321    386   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    387   
            source,
  323    388   
            meta: meta.unwrap_or_default(),
  324    389   
        })
         390  +
        /* OperationErrorGenerator.kt:110 */
  325    391   
    }
         392  +
    /* OperationErrorGenerator.kt:109 */
  326    393   
}
  327    394   
         395  +
/* CodegenDelegator.kt:255 */
  328    396   
pub use crate::operation::malformed_request_body::_malformed_request_body_output::MalformedRequestBodyOutput;
  329    397   
         398  +
/* CodegenDelegator.kt:255 */
  330    399   
pub use crate::operation::malformed_request_body::_malformed_request_body_input::MalformedRequestBodyInput;
  331    400   
         401  +
/* RustModule.kt:172 */
  332    402   
mod _malformed_request_body_input;
  333    403   
         404  +
/* RustModule.kt:172 */
  334    405   
mod _malformed_request_body_output;
  335    406   
  336         -
/// Builders
         407  +
/// /* CodegenDelegator.kt:51 */Builders
  337    408   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_request_body/_malformed_request_body_input.rs

@@ -1,1 +74,134 @@
    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 MalformedRequestBodyInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedRequestBodyInput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub int: ::std::option::Option<i32>,
          11  +
    /* StructureGenerator.kt:231 */
    8     12   
    #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub float: ::std::option::Option<f32>,
          14  +
    /* StructureGenerator.kt:201 */
   10     15   
}
          16  +
/* StructureGenerator.kt:135 */
   11     17   
impl MalformedRequestBodyInput {
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
          20  +
                           /* StructureGenerator.kt:166 */
   13     21   
    pub fn int(&self) -> ::std::option::Option<i32> {
          22  +
        /* StructureGenerator.kt:168 */
   14     23   
        self.int
          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 float(&self) -> ::std::option::Option<f32> {
          30  +
        /* StructureGenerator.kt:168 */
   18     31   
        self.float
          32  +
        /* StructureGenerator.kt:166 */
   19     33   
    }
          34  +
    /* StructureGenerator.kt:135 */
   20     35   
}
          36  +
/* ClientCodegenVisitor.kt:237 */
   21     37   
impl MalformedRequestBodyInput {
   22         -
    /// Creates a new builder-style object to manufacture [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
          38  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
          39  +
    /* BuilderGenerator.kt:175 */
   23     40   
    pub fn builder() -> crate::operation::malformed_request_body::builders::MalformedRequestBodyInputBuilder {
          41  +
        /* BuilderGenerator.kt:176 */
   24     42   
        crate::operation::malformed_request_body::builders::MalformedRequestBodyInputBuilder::default()
          43  +
        /* BuilderGenerator.kt:175 */
   25     44   
    }
          45  +
    /* ClientCodegenVisitor.kt:237 */
   26     46   
}
   27     47   
   28         -
/// A builder for [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
          48  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
          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 MalformedRequestBodyInputBuilder {
   32         -
    pub(crate) int: ::std::option::Option<i32>,
   33         -
    pub(crate) float: ::std::option::Option<f32>,
          55  +
    /* BuilderGenerator.kt:275 */ pub(crate) int: ::std::option::Option<i32>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) float: ::std::option::Option<f32>,
          57  +
    /* BuilderGenerator.kt:345 */
   34     58   
}
          59  +
/* BuilderGenerator.kt:355 */
   35     60   
impl MalformedRequestBodyInputBuilder {
          61  +
    /* BuilderGenerator.kt:286 */
   36     62   
    #[allow(missing_docs)] // documentation missing in model
          63  +
                           /* BuilderGenerator.kt:291 */
   37     64   
    pub fn int(mut self, input: i32) -> Self {
          65  +
        /* BuilderGenerator.kt:292 */
   38     66   
        self.int = ::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_int(mut self, input: ::std::option::Option<i32>) -> Self {
          75  +
        /* BuilderGenerator.kt:315 */
   43     76   
        self.int = 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_int(&self) -> &::std::option::Option<i32> {
          84  +
        /* BuilderGenerator.kt:337 */
   48     85   
        &self.int
          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 float(mut self, input: f32) -> Self {
          92  +
        /* BuilderGenerator.kt:292 */
   52     93   
        self.float = ::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_float(mut self, input: ::std::option::Option<f32>) -> Self {
         102  +
        /* BuilderGenerator.kt:315 */
   57    103   
        self.float = 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_float(&self) -> &::std::option::Option<f32> {
         111  +
        /* BuilderGenerator.kt:337 */
   62    112   
        &self.float
         113  +
        /* BuilderGenerator.kt:336 */
   63    114   
    }
   64         -
    /// Consumes the builder and constructs a [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
         115  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedRequestBodyInput`](crate::operation::malformed_request_body::MalformedRequestBodyInput).
         116  +
    /* BuilderGenerator.kt:253 */
   65    117   
    pub fn build(
   66    118   
        self,
   67    119   
    ) -> ::std::result::Result<crate::operation::malformed_request_body::MalformedRequestBodyInput, ::aws_smithy_types::error::operation::BuildError>
   68    120   
    {
   69         -
        ::std::result::Result::Ok(crate::operation::malformed_request_body::MalformedRequestBodyInput {
   70         -
            int: self.int,
   71         -
            float: self.float,
   72         -
        })
         121  +
        /* BuilderGenerator.kt:254 */
         122  +
        ::std::result::Result::Ok(
         123  +
            /* BuilderGenerator.kt:477 */
         124  +
            crate::operation::malformed_request_body::MalformedRequestBodyInput {
         125  +
                /* BuilderGenerator.kt:481 */ int: self.int,
         126  +
                /* BuilderGenerator.kt:481 */
         127  +
                float: self.float,
         128  +
                /* BuilderGenerator.kt:477 */
         129  +
            }, /* BuilderGenerator.kt:254 */
         130  +
        )
         131  +
        /* BuilderGenerator.kt:253 */
   73    132   
    }
         133  +
    /* BuilderGenerator.kt:355 */
   74    134   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_request_body/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::malformed_request_body::_malformed_request_body_output::MalformedRequestBodyOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_request_body::_malformed_request_body_input::MalformedRequestBodyInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_request_body::builders::MalformedRequestBodyInputBuilder {
    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::malformed_request_body::MalformedRequestBodyOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_request_body::MalformedRequestBodyError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_request_body();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedRequestBody`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedRequestBody`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedRequestBodyFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_request_body::builders::MalformedRequestBodyInputBuilder,
   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::malformed_request_body::MalformedRequestBodyOutput,
   34     40   
        crate::operation::malformed_request_body::MalformedRequestBodyError,
   35     41   
    > for MalformedRequestBodyFluentBuilder
   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::malformed_request_body::MalformedRequestBodyOutput,
   43     49   
            crate::operation::malformed_request_body::MalformedRequestBodyError,
   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 MalformedRequestBodyFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedRequestBodyFluentBuilder`.
   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 MalformedRequestBody as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_request_body::builders::MalformedRequestBodyInputBuilder {
   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::malformed_request_body::MalformedRequestBodyOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_request_body::MalformedRequestBodyError,
   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::malformed_request_body::MalformedRequestBody::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::malformed_request_body::MalformedRequestBody::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::malformed_request_body::MalformedRequestBodyOutput,
   96    106   
        crate::operation::malformed_request_body::MalformedRequestBodyError,
   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 int(mut self, input: i32) -> Self {
  112    125   
        self.inner = self.inner.int(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_int(mut self, input: ::std::option::Option<i32>) -> Self {
  117    132   
        self.inner = self.inner.set_int(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_int(&self) -> &::std::option::Option<i32> {
  122    139   
        self.inner.get_int()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn float(mut self, input: f32) -> Self {
  126    145   
        self.inner = self.inner.float(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_float(mut self, input: ::std::option::Option<f32>) -> Self {
  131    152   
        self.inner = self.inner.set_float(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_float(&self) -> &::std::option::Option<f32> {
  136    159   
        self.inner.get_float()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:282 */
  138    162   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_short/_malformed_short_input.rs

@@ -1,1 +118,215 @@
    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 MalformedShortInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedShortInput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub short_in_body: ::std::option::Option<i16>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     12   
    pub short_in_path: ::std::option::Option<i16>,
          13  +
    /* StructureGenerator.kt:231 */
   10     14   
    #[allow(missing_docs)] // documentation missing in model
   11     15   
    pub short_in_query: ::std::option::Option<i16>,
          16  +
    /* StructureGenerator.kt:231 */
   12     17   
    #[allow(missing_docs)] // documentation missing in model
   13     18   
    pub short_in_header: ::std::option::Option<i16>,
          19  +
    /* StructureGenerator.kt:201 */
   14     20   
}
          21  +
/* StructureGenerator.kt:135 */
   15     22   
impl MalformedShortInput {
          23  +
    /* StructureGenerator.kt:231 */
   16     24   
    #[allow(missing_docs)] // documentation missing in model
          25  +
                           /* StructureGenerator.kt:166 */
   17     26   
    pub fn short_in_body(&self) -> ::std::option::Option<i16> {
          27  +
        /* StructureGenerator.kt:168 */
   18     28   
        self.short_in_body
          29  +
        /* StructureGenerator.kt:166 */
   19     30   
    }
          31  +
    /* StructureGenerator.kt:231 */
   20     32   
    #[allow(missing_docs)] // documentation missing in model
          33  +
                           /* StructureGenerator.kt:166 */
   21     34   
    pub fn short_in_path(&self) -> ::std::option::Option<i16> {
          35  +
        /* StructureGenerator.kt:168 */
   22     36   
        self.short_in_path
          37  +
        /* StructureGenerator.kt:166 */
   23     38   
    }
          39  +
    /* StructureGenerator.kt:231 */
   24     40   
    #[allow(missing_docs)] // documentation missing in model
          41  +
                           /* StructureGenerator.kt:166 */
   25     42   
    pub fn short_in_query(&self) -> ::std::option::Option<i16> {
          43  +
        /* StructureGenerator.kt:168 */
   26     44   
        self.short_in_query
          45  +
        /* StructureGenerator.kt:166 */
   27     46   
    }
          47  +
    /* StructureGenerator.kt:231 */
   28     48   
    #[allow(missing_docs)] // documentation missing in model
          49  +
                           /* StructureGenerator.kt:166 */
   29     50   
    pub fn short_in_header(&self) -> ::std::option::Option<i16> {
          51  +
        /* StructureGenerator.kt:168 */
   30     52   
        self.short_in_header
          53  +
        /* StructureGenerator.kt:166 */
   31     54   
    }
          55  +
    /* StructureGenerator.kt:135 */
   32     56   
}
          57  +
/* ClientCodegenVisitor.kt:237 */
   33     58   
impl MalformedShortInput {
   34         -
    /// Creates a new builder-style object to manufacture [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
          59  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
          60  +
    /* BuilderGenerator.kt:175 */
   35     61   
    pub fn builder() -> crate::operation::malformed_short::builders::MalformedShortInputBuilder {
          62  +
        /* BuilderGenerator.kt:176 */
   36     63   
        crate::operation::malformed_short::builders::MalformedShortInputBuilder::default()
          64  +
        /* BuilderGenerator.kt:175 */
   37     65   
    }
          66  +
    /* ClientCodegenVisitor.kt:237 */
   38     67   
}
   39     68   
   40         -
/// A builder for [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
          69  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
          70  +
/* RustType.kt:516 */
   41     71   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          72  +
/* RustType.kt:516 */
   42     73   
#[non_exhaustive]
          74  +
/* BuilderGenerator.kt:345 */
   43     75   
pub struct MalformedShortInputBuilder {
   44         -
    pub(crate) short_in_body: ::std::option::Option<i16>,
   45         -
    pub(crate) short_in_path: ::std::option::Option<i16>,
   46         -
    pub(crate) short_in_query: ::std::option::Option<i16>,
   47         -
    pub(crate) short_in_header: ::std::option::Option<i16>,
          76  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_in_body: ::std::option::Option<i16>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_in_path: ::std::option::Option<i16>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_in_query: ::std::option::Option<i16>,
          79  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_in_header: ::std::option::Option<i16>,
          80  +
    /* BuilderGenerator.kt:345 */
   48     81   
}
          82  +
/* BuilderGenerator.kt:355 */
   49     83   
impl MalformedShortInputBuilder {
          84  +
    /* BuilderGenerator.kt:286 */
   50     85   
    #[allow(missing_docs)] // documentation missing in model
          86  +
                           /* BuilderGenerator.kt:291 */
   51     87   
    pub fn short_in_body(mut self, input: i16) -> Self {
          88  +
        /* BuilderGenerator.kt:292 */
   52     89   
        self.short_in_body = ::std::option::Option::Some(input);
          90  +
        /* BuilderGenerator.kt:293 */
   53     91   
        self
          92  +
        /* BuilderGenerator.kt:291 */
   54     93   
    }
          94  +
    /* BuilderGenerator.kt:312 */
   55     95   
    #[allow(missing_docs)] // documentation missing in model
          96  +
                           /* BuilderGenerator.kt:314 */
   56     97   
    pub fn set_short_in_body(mut self, input: ::std::option::Option<i16>) -> Self {
          98  +
        /* BuilderGenerator.kt:315 */
   57     99   
        self.short_in_body = input;
   58    100   
        self
         101  +
        /* BuilderGenerator.kt:314 */
   59    102   
    }
         103  +
    /* BuilderGenerator.kt:334 */
   60    104   
    #[allow(missing_docs)] // documentation missing in model
         105  +
                           /* BuilderGenerator.kt:336 */
   61    106   
    pub fn get_short_in_body(&self) -> &::std::option::Option<i16> {
         107  +
        /* BuilderGenerator.kt:337 */
   62    108   
        &self.short_in_body
         109  +
        /* BuilderGenerator.kt:336 */
   63    110   
    }
         111  +
    /* BuilderGenerator.kt:286 */
   64    112   
    #[allow(missing_docs)] // documentation missing in model
   65         -
    /// This field is required.
         113  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         114  +
    /* BuilderGenerator.kt:291 */
   66    115   
    pub fn short_in_path(mut self, input: i16) -> Self {
         116  +
        /* BuilderGenerator.kt:292 */
   67    117   
        self.short_in_path = ::std::option::Option::Some(input);
         118  +
        /* BuilderGenerator.kt:293 */
   68    119   
        self
         120  +
        /* BuilderGenerator.kt:291 */
   69    121   
    }
         122  +
    /* BuilderGenerator.kt:312 */
   70    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* BuilderGenerator.kt:314 */
   71    125   
    pub fn set_short_in_path(mut self, input: ::std::option::Option<i16>) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   72    127   
        self.short_in_path = input;
   73    128   
        self
         129  +
        /* BuilderGenerator.kt:314 */
   74    130   
    }
         131  +
    /* BuilderGenerator.kt:334 */
   75    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:336 */
   76    134   
    pub fn get_short_in_path(&self) -> &::std::option::Option<i16> {
         135  +
        /* BuilderGenerator.kt:337 */
   77    136   
        &self.short_in_path
         137  +
        /* BuilderGenerator.kt:336 */
   78    138   
    }
         139  +
    /* BuilderGenerator.kt:286 */
   79    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* BuilderGenerator.kt:291 */
   80    142   
    pub fn short_in_query(mut self, input: i16) -> Self {
         143  +
        /* BuilderGenerator.kt:292 */
   81    144   
        self.short_in_query = ::std::option::Option::Some(input);
         145  +
        /* BuilderGenerator.kt:293 */
   82    146   
        self
         147  +
        /* BuilderGenerator.kt:291 */
   83    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   84    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   85    152   
    pub fn set_short_in_query(mut self, input: ::std::option::Option<i16>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   86    154   
        self.short_in_query = input;
   87    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   88    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   89    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   90    161   
    pub fn get_short_in_query(&self) -> &::std::option::Option<i16> {
         162  +
        /* BuilderGenerator.kt:337 */
   91    163   
        &self.short_in_query
         164  +
        /* BuilderGenerator.kt:336 */
   92    165   
    }
         166  +
    /* BuilderGenerator.kt:286 */
   93    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* BuilderGenerator.kt:291 */
   94    169   
    pub fn short_in_header(mut self, input: i16) -> Self {
         170  +
        /* BuilderGenerator.kt:292 */
   95    171   
        self.short_in_header = ::std::option::Option::Some(input);
         172  +
        /* BuilderGenerator.kt:293 */
   96    173   
        self
         174  +
        /* BuilderGenerator.kt:291 */
   97    175   
    }
         176  +
    /* BuilderGenerator.kt:312 */
   98    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* BuilderGenerator.kt:314 */
   99    179   
    pub fn set_short_in_header(mut self, input: ::std::option::Option<i16>) -> Self {
         180  +
        /* BuilderGenerator.kt:315 */
  100    181   
        self.short_in_header = input;
  101    182   
        self
         183  +
        /* BuilderGenerator.kt:314 */
  102    184   
    }
         185  +
    /* BuilderGenerator.kt:334 */
  103    186   
    #[allow(missing_docs)] // documentation missing in model
         187  +
                           /* BuilderGenerator.kt:336 */
  104    188   
    pub fn get_short_in_header(&self) -> &::std::option::Option<i16> {
         189  +
        /* BuilderGenerator.kt:337 */
  105    190   
        &self.short_in_header
         191  +
        /* BuilderGenerator.kt:336 */
  106    192   
    }
  107         -
    /// Consumes the builder and constructs a [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
         193  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedShortInput`](crate::operation::malformed_short::MalformedShortInput).
         194  +
    /* BuilderGenerator.kt:253 */
  108    195   
    pub fn build(
  109    196   
        self,
  110    197   
    ) -> ::std::result::Result<crate::operation::malformed_short::MalformedShortInput, ::aws_smithy_types::error::operation::BuildError> {
  111         -
        ::std::result::Result::Ok(crate::operation::malformed_short::MalformedShortInput {
  112         -
            short_in_body: self.short_in_body,
  113         -
            short_in_path: self.short_in_path,
  114         -
            short_in_query: self.short_in_query,
  115         -
            short_in_header: self.short_in_header,
  116         -
        })
  117         -
    }
         198  +
        /* BuilderGenerator.kt:254 */
         199  +
        ::std::result::Result::Ok(
         200  +
            /* BuilderGenerator.kt:477 */
         201  +
            crate::operation::malformed_short::MalformedShortInput {
         202  +
                /* BuilderGenerator.kt:481 */ short_in_body: self.short_in_body,
         203  +
                /* BuilderGenerator.kt:481 */
         204  +
                short_in_path: self.short_in_path,
         205  +
                /* BuilderGenerator.kt:481 */
         206  +
                short_in_query: self.short_in_query,
         207  +
                /* BuilderGenerator.kt:481 */
         208  +
                short_in_header: self.short_in_header,
         209  +
                /* BuilderGenerator.kt:477 */
         210  +
            }, /* BuilderGenerator.kt:254 */
         211  +
        )
         212  +
        /* BuilderGenerator.kt:253 */
         213  +
    }
         214  +
    /* BuilderGenerator.kt:355 */
  118    215   
}

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

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

@@ -1,1 +166,202 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::malformed_short::_malformed_short_output::MalformedShortOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_short::_malformed_short_input::MalformedShortInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_short::builders::MalformedShortInputBuilder {
    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::malformed_short::MalformedShortOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_short::MalformedShortError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_short();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedShort`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedShort`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedShortFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_short::builders::MalformedShortInputBuilder,
   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::malformed_short::MalformedShortOutput,
   34     40   
        crate::operation::malformed_short::MalformedShortError,
   35     41   
    > for MalformedShortFluentBuilder
   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::malformed_short::MalformedShortOutput,
   43     49   
            crate::operation::malformed_short::MalformedShortError,
   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 MalformedShortFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedShortFluentBuilder`.
   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 MalformedShort as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_short::builders::MalformedShortInputBuilder {
   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::malformed_short::MalformedShortOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_short::MalformedShortError,
   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::malformed_short::MalformedShort::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::malformed_short::MalformedShort::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::malformed_short::MalformedShortOutput,
   96    106   
        crate::operation::malformed_short::MalformedShortError,
   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 short_in_body(mut self, input: i16) -> Self {
  112    125   
        self.inner = self.inner.short_in_body(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_short_in_body(mut self, input: ::std::option::Option<i16>) -> Self {
  117    132   
        self.inner = self.inner.set_short_in_body(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_short_in_body(&self) -> &::std::option::Option<i16> {
  122    139   
        self.inner.get_short_in_body()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn short_in_path(mut self, input: i16) -> Self {
  126    145   
        self.inner = self.inner.short_in_path(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_short_in_path(mut self, input: ::std::option::Option<i16>) -> Self {
  131    152   
        self.inner = self.inner.set_short_in_path(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_short_in_path(&self) -> &::std::option::Option<i16> {
  136    159   
        self.inner.get_short_in_path()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn short_in_query(mut self, input: i16) -> Self {
  140    165   
        self.inner = self.inner.short_in_query(input);
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_short_in_query(mut self, input: ::std::option::Option<i16>) -> Self {
  145    172   
        self.inner = self.inner.set_short_in_query(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_short_in_query(&self) -> &::std::option::Option<i16> {
  150    179   
        self.inner.get_short_in_query()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn short_in_header(mut self, input: i16) -> Self {
  154    185   
        self.inner = self.inner.short_in_header(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_short_in_header(mut self, input: ::std::option::Option<i16>) -> Self {
  159    192   
        self.inner = self.inner.set_short_in_header(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_short_in_header(&self) -> &::std::option::Option<i16> {
  164    199   
        self.inner.get_short_in_header()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_string.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 `MalformedString`.
           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 MalformedString;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl MalformedString {
    7         -
    /// Creates a new `MalformedString`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `MalformedString`
          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::malformed_string::MalformedStringInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::malformed_string::MalformedStringOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::malformed_string::MalformedStringError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +332,403 @@
   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 MalformedString {
   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("MalformedString");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            MalformedStringRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            MalformedStringResponseDeserializer,
  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   
            "MalformedString",
  111    122   
            "Rest Json Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("MalformedString")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(MalformedStringEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::malformed_string::MalformedStringError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::malformed_string::MalformedStringError,
  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 MalformedStringResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedStringResponseDeserializer {
  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_malformed_string::de_malformed_string_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_malformed_string::de_malformed_string_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 MalformedStringRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedStringRequestSerializer {
  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::malformed_string::MalformedStringInput>()
  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::malformed_string::MalformedStringInput,
  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, "/MalformedString").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::malformed_string::MalformedStringInput,
  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   
                let builder = crate::protocol_serde::shape_malformed_string::ser_malformed_string_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct MalformedStringEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedStringEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "MalformedStringEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<MalformedStringInput>()
  221    235   
            .ok_or("failed to downcast to MalformedStringInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* OperationErrorGenerator.kt:79 */
  235    250   
/// Error type for the `MalformedStringError` operation.
         251  +
/* RustType.kt:516 */
  236    252   
#[non_exhaustive]
         253  +
/* RustType.kt:516 */
  237    254   
#[derive(::std::fmt::Debug)]
  238         -
pub enum MalformedStringError {
         255  +
pub /* OperationErrorGenerator.kt:81 */ enum MalformedStringError {
         256  +
    /* OperationErrorGenerator.kt:88 */
  239    257   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  240    258   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  241    259   
    variable wildcard pattern and check `.code()`:
  242    260   
     \
  243    261   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  244    262   
     \
  245    263   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MalformedStringError) for what information is available for the error.")]
  246    264   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         265  +
    /* OperationErrorGenerator.kt:81 */
  247    266   
}
         267  +
/* OperationErrorGenerator.kt:218 */
  248    268   
impl MalformedStringError {
         269  +
    /* OperationErrorGenerator.kt:219 */
  249    270   
    /// Creates the `MalformedStringError::Unhandled` variant from any error type.
  250    271   
    pub fn unhandled(
  251    272   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  252    273   
    ) -> Self {
  253    274   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  254    275   
            source: err.into(),
  255    276   
            meta: ::std::default::Default::default(),
  256    277   
        })
  257    278   
    }
  258    279   
  259    280   
    /// Creates the `MalformedStringError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  260    281   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  261    282   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  262    283   
            source: err.clone().into(),
  263    284   
            meta: err,
  264    285   
        })
  265    286   
    }
  266         -
    ///
         287  +
    /// /* OperationErrorGenerator.kt:236 */
  267    288   
    /// Returns error metadata, which includes the error code, message,
  268    289   
    /// request ID, and potentially additional information.
  269    290   
    ///
         291  +
    /* OperationErrorGenerator.kt:242 */
  270    292   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         293  +
        /* OperationErrorGenerator.kt:243 */
  271    294   
        match self {
  272         -
            Self::Unhandled(e) => &e.meta,
         295  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         296  +
            /* OperationErrorGenerator.kt:243 */
  273    297   
        }
         298  +
        /* OperationErrorGenerator.kt:242 */
  274    299   
    }
         300  +
    /* OperationErrorGenerator.kt:218 */
  275    301   
}
         302  +
/* OperationErrorGenerator.kt:269 */
  276    303   
impl ::std::error::Error for MalformedStringError {
         304  +
    /* OperationErrorGenerator.kt:270 */
  277    305   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         306  +
        /* OperationErrorGenerator.kt:318 */
  278    307   
        match self {
  279         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         308  +
            /* OperationErrorGenerator.kt:326 */
         309  +
            Self::Unhandled(_inner) => {
         310  +
                /* OperationErrorGenerator.kt:279 */
         311  +
                ::std::option::Option::Some(&*_inner.source)
         312  +
                /* OperationErrorGenerator.kt:326 */
         313  +
            } /* OperationErrorGenerator.kt:318 */
  280    314   
        }
         315  +
        /* OperationErrorGenerator.kt:270 */
  281    316   
    }
         317  +
    /* OperationErrorGenerator.kt:269 */
  282    318   
}
         319  +
/* OperationErrorGenerator.kt:133 */
  283    320   
impl ::std::fmt::Display for MalformedStringError {
         321  +
    /* OperationErrorGenerator.kt:134 */
  284    322   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         323  +
        /* OperationErrorGenerator.kt:318 */
  285    324   
        match self {
         325  +
            /* OperationErrorGenerator.kt:326 */
  286    326   
            Self::Unhandled(_inner) => {
         327  +
                /* OperationErrorGenerator.kt:139 */
  287    328   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  288    329   
                    write!(f, "unhandled error ({code})")
  289    330   
                } else {
  290    331   
                    f.write_str("unhandled error")
  291    332   
                }
  292         -
            }
         333  +
                /* OperationErrorGenerator.kt:326 */
         334  +
            } /* OperationErrorGenerator.kt:318 */
  293    335   
        }
         336  +
        /* OperationErrorGenerator.kt:134 */
  294    337   
    }
         338  +
    /* OperationErrorGenerator.kt:133 */
  295    339   
}
         340  +
/* OperationErrorGenerator.kt:182 */
  296    341   
impl ::aws_smithy_types::retry::ProvideErrorKind for MalformedStringError {
         342  +
    /* OperationErrorGenerator.kt:186 */
  297    343   
    fn code(&self) -> ::std::option::Option<&str> {
         344  +
        /* OperationErrorGenerator.kt:187 */
  298    345   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         346  +
        /* OperationErrorGenerator.kt:186 */
  299    347   
    }
         348  +
    /* OperationErrorGenerator.kt:190 */
  300    349   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         350  +
        /* OperationErrorGenerator.kt:197 */
  301    351   
        ::std::option::Option::None
         352  +
        /* OperationErrorGenerator.kt:190 */
  302    353   
    }
         354  +
    /* OperationErrorGenerator.kt:182 */
  303    355   
}
         356  +
/* OperationErrorGenerator.kt:163 */
  304    357   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MalformedStringError {
         358  +
    /* OperationErrorGenerator.kt:164 */
  305    359   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         360  +
        /* OperationErrorGenerator.kt:318 */
  306    361   
        match self {
  307         -
            Self::Unhandled(_inner) => &_inner.meta,
         362  +
            /* OperationErrorGenerator.kt:326 */
         363  +
            Self::Unhandled(_inner) => {
         364  +
                /* OperationErrorGenerator.kt:168 */
         365  +
                &_inner.meta
         366  +
                /* OperationErrorGenerator.kt:326 */
         367  +
            } /* OperationErrorGenerator.kt:318 */
  308    368   
        }
         369  +
        /* OperationErrorGenerator.kt:164 */
  309    370   
    }
         371  +
    /* OperationErrorGenerator.kt:163 */
  310    372   
}
         373  +
/* OperationErrorGenerator.kt:109 */
  311    374   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MalformedStringError {
         375  +
    /* OperationErrorGenerator.kt:110 */
  312    376   
    fn create_unhandled_error(
  313    377   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  314    378   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  315    379   
    ) -> Self {
         380  +
        /* OperationErrorGenerator.kt:121 */
  316    381   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  317    382   
            source,
  318    383   
            meta: meta.unwrap_or_default(),
  319    384   
        })
         385  +
        /* OperationErrorGenerator.kt:110 */
  320    386   
    }
         387  +
    /* OperationErrorGenerator.kt:109 */
  321    388   
}
  322    389   
         390  +
/* CodegenDelegator.kt:255 */
  323    391   
pub use crate::operation::malformed_string::_malformed_string_output::MalformedStringOutput;
  324    392   
         393  +
/* CodegenDelegator.kt:255 */
  325    394   
pub use crate::operation::malformed_string::_malformed_string_input::MalformedStringInput;
  326    395   
         396  +
/* RustModule.kt:172 */
  327    397   
mod _malformed_string_input;
  328    398   
         399  +
/* RustModule.kt:172 */
  329    400   
mod _malformed_string_output;
  330    401   
  331         -
/// Builders
         402  +
/// /* CodegenDelegator.kt:51 */Builders
  332    403   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_string/_malformed_string_input.rs

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