Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double/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_double::_malformed_double_output::MalformedDoubleOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_double::_malformed_double_input::MalformedDoubleInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_double::builders::MalformedDoubleInputBuilder {
    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_double::MalformedDoubleOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_double::MalformedDoubleError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_double();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedDouble`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedDouble`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedDoubleFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_double::builders::MalformedDoubleInputBuilder,
   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_double::MalformedDoubleOutput,
   34     40   
        crate::operation::malformed_double::MalformedDoubleError,
   35     41   
    > for MalformedDoubleFluentBuilder
   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_double::MalformedDoubleOutput,
   43     49   
            crate::operation::malformed_double::MalformedDoubleError,
   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 MalformedDoubleFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedDoubleFluentBuilder`.
   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 MalformedDouble as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_double::builders::MalformedDoubleInputBuilder {
   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_double::MalformedDoubleOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_double::MalformedDoubleError,
   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_double::MalformedDouble::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_double::MalformedDouble::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_double::MalformedDoubleOutput,
   96    106   
        crate::operation::malformed_double::MalformedDoubleError,
   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 double_in_body(mut self, input: f64) -> Self {
  112    125   
        self.inner = self.inner.double_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_double_in_body(mut self, input: ::std::option::Option<f64>) -> Self {
  117    132   
        self.inner = self.inner.set_double_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_double_in_body(&self) -> &::std::option::Option<f64> {
  122    139   
        self.inner.get_double_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 double_in_path(mut self, input: f64) -> Self {
  126    145   
        self.inner = self.inner.double_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_double_in_path(mut self, input: ::std::option::Option<f64>) -> Self {
  131    152   
        self.inner = self.inner.set_double_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_double_in_path(&self) -> &::std::option::Option<f64> {
  136    159   
        self.inner.get_double_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 double_in_query(mut self, input: f64) -> Self {
  140    165   
        self.inner = self.inner.double_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_double_in_query(mut self, input: ::std::option::Option<f64>) -> Self {
  145    172   
        self.inner = self.inner.set_double_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_double_in_query(&self) -> &::std::option::Option<f64> {
  150    179   
        self.inner.get_double_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 double_in_header(mut self, input: f64) -> Self {
  154    185   
        self.inner = self.inner.double_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_double_in_header(mut self, input: ::std::option::Option<f64>) -> Self {
  159    192   
        self.inner = self.inner.set_double_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_double_in_header(&self) -> &::std::option::Option<f64> {
  164    199   
        self.inner.get_double_in_header()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_float.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 `MalformedFloat`.
           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 MalformedFloat;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl MalformedFloat {
    7         -
    /// Creates a new `MalformedFloat`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `MalformedFloat`
          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_float::MalformedFloatInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::malformed_float::MalformedFloatOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::malformed_float::MalformedFloatError,
   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 MalformedFloat {
   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("MalformedFloat");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            MalformedFloatRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            MalformedFloatResponseDeserializer,
   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   
            "MalformedFloat",
  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("MalformedFloat")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(MalformedFloatEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::malformed_float::MalformedFloatError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::malformed_float::MalformedFloatError,
  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 MalformedFloatResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedFloatResponseDeserializer {
  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_float::de_malformed_float_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_malformed_float::de_malformed_float_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 MalformedFloatRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedFloatRequestSerializer {
  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_float::ser_malformed_float_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 MalformedFloatEndpointParamsInterceptor;
  225    239   
  226    240   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedFloatEndpointParamsInterceptor {
  227    241   
    fn name(&self) -> &'static str {
  228    242   
        "MalformedFloatEndpointParamsInterceptor"
  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::<MalformedFloatInput>()
  244    258   
            .ok_or("failed to downcast to MalformedFloatInput")?;
  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 `MalformedFloatError` operation.
         274  +
/* RustType.kt:516 */
  259    275   
#[non_exhaustive]
         276  +
/* RustType.kt:516 */
  260    277   
#[derive(::std::fmt::Debug)]
  261         -
pub enum MalformedFloatError {
         278  +
pub /* OperationErrorGenerator.kt:81 */ enum MalformedFloatError {
         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-MalformedFloatError) 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 MalformedFloatError {
         292  +
    /* OperationErrorGenerator.kt:219 */
  272    293   
    /// Creates the `MalformedFloatError::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 `MalformedFloatError::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 MalformedFloatError {
         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 MalformedFloatError {
         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 MalformedFloatError {
         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 MalformedFloatError {
         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 MalformedFloatError {
         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_float::_malformed_float_output::MalformedFloatOutput;
  347    415   
         416  +
/* CodegenDelegator.kt:255 */
  348    417   
pub use crate::operation::malformed_float::_malformed_float_input::MalformedFloatInput;
  349    418   
         419  +
/* RustModule.kt:172 */
  350    420   
mod _malformed_float_input;
  351    421   
         422  +
/* RustModule.kt:172 */
  352    423   
mod _malformed_float_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_float/_malformed_float_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 MalformedFloatInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedFloatInput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub float_in_body: ::std::option::Option<f32>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     12   
    pub float_in_path: ::std::option::Option<f32>,
          13  +
    /* StructureGenerator.kt:231 */
   10     14   
    #[allow(missing_docs)] // documentation missing in model
   11     15   
    pub float_in_query: ::std::option::Option<f32>,
          16  +
    /* StructureGenerator.kt:231 */
   12     17   
    #[allow(missing_docs)] // documentation missing in model
   13     18   
    pub float_in_header: ::std::option::Option<f32>,
          19  +
    /* StructureGenerator.kt:201 */
   14     20   
}
          21  +
/* StructureGenerator.kt:135 */
   15     22   
impl MalformedFloatInput {
          23  +
    /* StructureGenerator.kt:231 */
   16     24   
    #[allow(missing_docs)] // documentation missing in model
          25  +
                           /* StructureGenerator.kt:166 */
   17     26   
    pub fn float_in_body(&self) -> ::std::option::Option<f32> {
          27  +
        /* StructureGenerator.kt:168 */
   18     28   
        self.float_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 float_in_path(&self) -> ::std::option::Option<f32> {
          35  +
        /* StructureGenerator.kt:168 */
   22     36   
        self.float_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 float_in_query(&self) -> ::std::option::Option<f32> {
          43  +
        /* StructureGenerator.kt:168 */
   26     44   
        self.float_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 float_in_header(&self) -> ::std::option::Option<f32> {
          51  +
        /* StructureGenerator.kt:168 */
   30     52   
        self.float_in_header
          53  +
        /* StructureGenerator.kt:166 */
   31     54   
    }
          55  +
    /* StructureGenerator.kt:135 */
   32     56   
}
          57  +
/* ClientCodegenVisitor.kt:237 */
   33     58   
impl MalformedFloatInput {
   34         -
    /// Creates a new builder-style object to manufacture [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
          59  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
          60  +
    /* BuilderGenerator.kt:175 */
   35     61   
    pub fn builder() -> crate::operation::malformed_float::builders::MalformedFloatInputBuilder {
          62  +
        /* BuilderGenerator.kt:176 */
   36     63   
        crate::operation::malformed_float::builders::MalformedFloatInputBuilder::default()
          64  +
        /* BuilderGenerator.kt:175 */
   37     65   
    }
          66  +
    /* ClientCodegenVisitor.kt:237 */
   38     67   
}
   39     68   
   40         -
/// A builder for [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
          69  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
          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 MalformedFloatInputBuilder {
   44         -
    pub(crate) float_in_body: ::std::option::Option<f32>,
   45         -
    pub(crate) float_in_path: ::std::option::Option<f32>,
   46         -
    pub(crate) float_in_query: ::std::option::Option<f32>,
   47         -
    pub(crate) float_in_header: ::std::option::Option<f32>,
          76  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_in_body: ::std::option::Option<f32>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_in_path: ::std::option::Option<f32>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_in_query: ::std::option::Option<f32>,
          79  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_in_header: ::std::option::Option<f32>,
          80  +
    /* BuilderGenerator.kt:345 */
   48     81   
}
          82  +
/* BuilderGenerator.kt:355 */
   49     83   
impl MalformedFloatInputBuilder {
          84  +
    /* BuilderGenerator.kt:286 */
   50     85   
    #[allow(missing_docs)] // documentation missing in model
          86  +
                           /* BuilderGenerator.kt:291 */
   51     87   
    pub fn float_in_body(mut self, input: f32) -> Self {
          88  +
        /* BuilderGenerator.kt:292 */
   52     89   
        self.float_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_float_in_body(mut self, input: ::std::option::Option<f32>) -> Self {
          98  +
        /* BuilderGenerator.kt:315 */
   57     99   
        self.float_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_float_in_body(&self) -> &::std::option::Option<f32> {
         107  +
        /* BuilderGenerator.kt:337 */
   62    108   
        &self.float_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 float_in_path(mut self, input: f32) -> Self {
         116  +
        /* BuilderGenerator.kt:292 */
   67    117   
        self.float_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_float_in_path(mut self, input: ::std::option::Option<f32>) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   72    127   
        self.float_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_float_in_path(&self) -> &::std::option::Option<f32> {
         135  +
        /* BuilderGenerator.kt:337 */
   77    136   
        &self.float_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 float_in_query(mut self, input: f32) -> Self {
         143  +
        /* BuilderGenerator.kt:292 */
   81    144   
        self.float_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_float_in_query(mut self, input: ::std::option::Option<f32>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   86    154   
        self.float_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_float_in_query(&self) -> &::std::option::Option<f32> {
         162  +
        /* BuilderGenerator.kt:337 */
   91    163   
        &self.float_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 float_in_header(mut self, input: f32) -> Self {
         170  +
        /* BuilderGenerator.kt:292 */
   95    171   
        self.float_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_float_in_header(mut self, input: ::std::option::Option<f32>) -> Self {
         180  +
        /* BuilderGenerator.kt:315 */
  100    181   
        self.float_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_float_in_header(&self) -> &::std::option::Option<f32> {
         189  +
        /* BuilderGenerator.kt:337 */
  105    190   
        &self.float_in_header
         191  +
        /* BuilderGenerator.kt:336 */
  106    192   
    }
  107         -
    /// Consumes the builder and constructs a [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
         193  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
         194  +
    /* BuilderGenerator.kt:253 */
  108    195   
    pub fn build(
  109    196   
        self,
  110    197   
    ) -> ::std::result::Result<crate::operation::malformed_float::MalformedFloatInput, ::aws_smithy_types::error::operation::BuildError> {
  111         -
        ::std::result::Result::Ok(crate::operation::malformed_float::MalformedFloatInput {
  112         -
            float_in_body: self.float_in_body,
  113         -
            float_in_path: self.float_in_path,
  114         -
            float_in_query: self.float_in_query,
  115         -
            float_in_header: self.float_in_header,
  116         -
        })
  117         -
    }
         198  +
        /* BuilderGenerator.kt:254 */
         199  +
        ::std::result::Result::Ok(
         200  +
            /* BuilderGenerator.kt:477 */
         201  +
            crate::operation::malformed_float::MalformedFloatInput {
         202  +
                /* BuilderGenerator.kt:481 */ float_in_body: self.float_in_body,
         203  +
                /* BuilderGenerator.kt:481 */
         204  +
                float_in_path: self.float_in_path,
         205  +
                /* BuilderGenerator.kt:481 */
         206  +
                float_in_query: self.float_in_query,
         207  +
                /* BuilderGenerator.kt:481 */
         208  +
                float_in_header: self.float_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_float/_malformed_float_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 MalformedFloatOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedFloatOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl MalformedFloatOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::malformed_float::builders::MalformedFloatOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::malformed_float::builders::MalformedFloatOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          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 MalformedFloatOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct MalformedFloatOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl MalformedFloatOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::malformed_float::MalformedFloatOutput {
   20         -
        crate::operation::malformed_float::MalformedFloatOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::malformed_float::MalformedFloatOutput {
          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_float/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_float::_malformed_float_output::MalformedFloatOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_float::_malformed_float_input::MalformedFloatInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_float::builders::MalformedFloatInputBuilder {
    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_float::MalformedFloatOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_float::MalformedFloatError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_float();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedFloat`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedFloat`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedFloatFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_float::builders::MalformedFloatInputBuilder,
   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_float::MalformedFloatOutput,
   34     40   
        crate::operation::malformed_float::MalformedFloatError,
   35     41   
    > for MalformedFloatFluentBuilder
   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_float::MalformedFloatOutput,
   43     49   
            crate::operation::malformed_float::MalformedFloatError,
   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 MalformedFloatFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedFloatFluentBuilder`.
   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 MalformedFloat as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_float::builders::MalformedFloatInputBuilder {
   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_float::MalformedFloatOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_float::MalformedFloatError,
   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_float::MalformedFloat::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_float::MalformedFloat::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_float::MalformedFloatOutput,
   96    106   
        crate::operation::malformed_float::MalformedFloatError,
   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 float_in_body(mut self, input: f32) -> Self {
  112    125   
        self.inner = self.inner.float_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_float_in_body(mut self, input: ::std::option::Option<f32>) -> Self {
  117    132   
        self.inner = self.inner.set_float_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_float_in_body(&self) -> &::std::option::Option<f32> {
  122    139   
        self.inner.get_float_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 float_in_path(mut self, input: f32) -> Self {
  126    145   
        self.inner = self.inner.float_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_float_in_path(mut self, input: ::std::option::Option<f32>) -> Self {
  131    152   
        self.inner = self.inner.set_float_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_float_in_path(&self) -> &::std::option::Option<f32> {
  136    159   
        self.inner.get_float_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 float_in_query(mut self, input: f32) -> Self {
  140    165   
        self.inner = self.inner.float_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_float_in_query(mut self, input: ::std::option::Option<f32>) -> Self {
  145    172   
        self.inner = self.inner.set_float_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_float_in_query(&self) -> &::std::option::Option<f32> {
  150    179   
        self.inner.get_float_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 float_in_header(mut self, input: f32) -> Self {
  154    185   
        self.inner = self.inner.float_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_float_in_header(mut self, input: ::std::option::Option<f32>) -> Self {
  159    192   
        self.inner = self.inner.set_float_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_float_in_header(&self) -> &::std::option::Option<f32> {
  164    199   
        self.inner.get_float_in_header()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_integer/_malformed_integer_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_integer/_malformed_integer_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 MalformedIntegerOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedIntegerOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl MalformedIntegerOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::malformed_integer::builders::MalformedIntegerOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::malformed_integer::builders::MalformedIntegerOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          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 MalformedIntegerOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct MalformedIntegerOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl MalformedIntegerOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedIntegerOutput`](crate::operation::malformed_integer::MalformedIntegerOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::malformed_integer::MalformedIntegerOutput {
   20         -
        crate::operation::malformed_integer::MalformedIntegerOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::malformed_integer::MalformedIntegerOutput {
          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_integer/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_integer::_malformed_integer_output::MalformedIntegerOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_integer::_malformed_integer_input::MalformedIntegerInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_integer::builders::MalformedIntegerInputBuilder {
    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_integer::MalformedIntegerOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_integer::MalformedIntegerError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_integer();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedInteger`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedInteger`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedIntegerFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_integer::builders::MalformedIntegerInputBuilder,
   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_integer::MalformedIntegerOutput,
   34     40   
        crate::operation::malformed_integer::MalformedIntegerError,
   35     41   
    > for MalformedIntegerFluentBuilder
   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_integer::MalformedIntegerOutput,
   43     49   
            crate::operation::malformed_integer::MalformedIntegerError,
   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 MalformedIntegerFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedIntegerFluentBuilder`.
   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 MalformedInteger as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_integer::builders::MalformedIntegerInputBuilder {
   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_integer::MalformedIntegerOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_integer::MalformedIntegerError,
   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_integer::MalformedInteger::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_integer::MalformedInteger::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_integer::MalformedIntegerOutput,
   96    106   
        crate::operation::malformed_integer::MalformedIntegerError,
   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 integer_in_body(mut self, input: i32) -> Self {
  112    125   
        self.inner = self.inner.integer_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_integer_in_body(mut self, input: ::std::option::Option<i32>) -> Self {
  117    132   
        self.inner = self.inner.set_integer_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_integer_in_body(&self) -> &::std::option::Option<i32> {
  122    139   
        self.inner.get_integer_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 integer_in_path(mut self, input: i32) -> Self {
  126    145   
        self.inner = self.inner.integer_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_integer_in_path(mut self, input: ::std::option::Option<i32>) -> Self {
  131    152   
        self.inner = self.inner.set_integer_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_integer_in_path(&self) -> &::std::option::Option<i32> {
  136    159   
        self.inner.get_integer_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 integer_in_query(mut self, input: i32) -> Self {
  140    165   
        self.inner = self.inner.integer_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_integer_in_query(mut self, input: ::std::option::Option<i32>) -> Self {
  145    172   
        self.inner = self.inner.set_integer_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_integer_in_query(&self) -> &::std::option::Option<i32> {
  150    179   
        self.inner.get_integer_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 integer_in_header(mut self, input: i32) -> Self {
  154    185   
        self.inner = self.inner.integer_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_integer_in_header(mut self, input: ::std::option::Option<i32>) -> Self {
  159    192   
        self.inner = self.inner.set_integer_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_integer_in_header(&self) -> &::std::option::Option<i32> {
  164    199   
        self.inner.get_integer_in_header()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_list.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 `MalformedList`.
           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 MalformedList;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl MalformedList {
    7         -
    /// Creates a new `MalformedList`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `MalformedList`
          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_list::MalformedListInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::malformed_list::MalformedListOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::malformed_list::MalformedListError,
   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 MalformedList {
   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("MalformedList");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            MalformedListRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            MalformedListResponseDeserializer,
   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   
            "MalformedList",
  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("MalformedList")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(MalformedListEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::malformed_list::MalformedListError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::malformed_list::MalformedListError,
  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 MalformedListResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedListResponseDeserializer {
  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_list::de_malformed_list_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_malformed_list::de_malformed_list_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 MalformedListRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedListRequestSerializer {
  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_list::MalformedListInput>()
  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_list::MalformedListInput,
  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, "/MalformedList").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_list::MalformedListInput,
  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_list::ser_malformed_list_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 MalformedListEndpointParamsInterceptor;
  199    213   
  200    214   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedListEndpointParamsInterceptor {
  201    215   
    fn name(&self) -> &'static str {
  202    216   
        "MalformedListEndpointParamsInterceptor"
  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::<MalformedListInput>()
  218    232   
            .ok_or("failed to downcast to MalformedListInput")?;
  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 `MalformedListError` operation.
         248  +
/* RustType.kt:516 */
  233    249   
#[non_exhaustive]
         250  +
/* RustType.kt:516 */
  234    251   
#[derive(::std::fmt::Debug)]
  235         -
pub enum MalformedListError {
         252  +
pub /* OperationErrorGenerator.kt:81 */ enum MalformedListError {
         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-MalformedListError) 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 MalformedListError {
         266  +
    /* OperationErrorGenerator.kt:219 */
  246    267   
    /// Creates the `MalformedListError::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 `MalformedListError::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 MalformedListError {
         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 MalformedListError {
         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 MalformedListError {
         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 MalformedListError {
         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 MalformedListError {
         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_list::_malformed_list_output::MalformedListOutput;
  321    389   
         390  +
/* CodegenDelegator.kt:255 */
  322    391   
pub use crate::operation::malformed_list::_malformed_list_input::MalformedListInput;
  323    392   
         393  +
/* RustModule.kt:172 */
  324    394   
mod _malformed_list_input;
  325    395   
         396  +
/* RustModule.kt:172 */
  326    397   
mod _malformed_list_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_list/_malformed_list_input.rs

@@ -1,1 +56,104 @@
    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 MalformedListInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedListInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub body_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl MalformedListInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
   11         -
    ///
   12         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.body_list.is_none()`.
          18  +
    /// /* StructureGenerator.kt:162 */
          19  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.body_list.is_none()`.
          20  +
    /* StructureGenerator.kt:166 */
   13     21   
    pub fn body_list(&self) -> &[::std::string::String] {
   14         -
        self.body_list.as_deref().unwrap_or_default()
          22  +
        /* StructureGenerator.kt:169 */
          23  +
        self.body_list
          24  +
            .as_deref()
          25  +
            /* StructureGenerator.kt:175 */
          26  +
            .unwrap_or_default()
          27  +
        /* StructureGenerator.kt:166 */
   15     28   
    }
          29  +
    /* StructureGenerator.kt:135 */
   16     30   
}
          31  +
/* ClientCodegenVisitor.kt:237 */
   17     32   
impl MalformedListInput {
   18         -
    /// Creates a new builder-style object to manufacture [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          33  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          34  +
    /* BuilderGenerator.kt:175 */
   19     35   
    pub fn builder() -> crate::operation::malformed_list::builders::MalformedListInputBuilder {
          36  +
        /* BuilderGenerator.kt:176 */
   20     37   
        crate::operation::malformed_list::builders::MalformedListInputBuilder::default()
          38  +
        /* BuilderGenerator.kt:175 */
   21     39   
    }
          40  +
    /* ClientCodegenVisitor.kt:237 */
   22     41   
}
   23     42   
   24         -
/// A builder for [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          43  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          44  +
/* RustType.kt:516 */
   25     45   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          46  +
/* RustType.kt:516 */
   26     47   
#[non_exhaustive]
          48  +
/* BuilderGenerator.kt:345 */
   27     49   
pub struct MalformedListInputBuilder {
          50  +
    /* BuilderGenerator.kt:275 */
   28     51   
    pub(crate) body_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          52  +
    /* BuilderGenerator.kt:345 */
   29     53   
}
          54  +
/* BuilderGenerator.kt:355 */
   30     55   
impl MalformedListInputBuilder {
   31         -
    /// Appends an item to `body_list`.
          56  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `body_list`.
          57  +
    /* BuilderGenerator.kt:411 */
   32     58   
    ///
   33         -
    /// To override the contents of this collection use [`set_body_list`](Self::set_body_list).
          59  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_body_list`](Self::set_body_list).
          60  +
    /* BuilderGenerator.kt:413 */
   34     61   
    ///
          62  +
    /* BuilderGenerator.kt:418 */
   35     63   
    pub fn body_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:419 */
   36     65   
        let mut v = self.body_list.unwrap_or_default();
   37     66   
        v.push(input.into());
   38     67   
        self.body_list = ::std::option::Option::Some(v);
   39     68   
        self
          69  +
        /* BuilderGenerator.kt:418 */
   40     70   
    }
          71  +
    /* BuilderGenerator.kt:312 */
   41     72   
    #[allow(missing_docs)] // documentation missing in model
          73  +
                           /* BuilderGenerator.kt:314 */
   42     74   
    pub fn set_body_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
          75  +
        /* BuilderGenerator.kt:315 */
   43     76   
        self.body_list = 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_body_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
          84  +
        /* BuilderGenerator.kt:337 */
   48     85   
        &self.body_list
          86  +
        /* BuilderGenerator.kt:336 */
   49     87   
    }
   50         -
    /// Consumes the builder and constructs a [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          88  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedListInput`](crate::operation::malformed_list::MalformedListInput).
          89  +
    /* BuilderGenerator.kt:253 */
   51     90   
    pub fn build(
   52     91   
        self,
   53     92   
    ) -> ::std::result::Result<crate::operation::malformed_list::MalformedListInput, ::aws_smithy_types::error::operation::BuildError> {
   54         -
        ::std::result::Result::Ok(crate::operation::malformed_list::MalformedListInput { body_list: self.body_list })
          93  +
        /* BuilderGenerator.kt:254 */
          94  +
        ::std::result::Result::Ok(
          95  +
            /* BuilderGenerator.kt:477 */
          96  +
            crate::operation::malformed_list::MalformedListInput {
          97  +
                /* BuilderGenerator.kt:481 */ body_list: self.body_list,
          98  +
                /* BuilderGenerator.kt:477 */
          99  +
            }, /* BuilderGenerator.kt:254 */
         100  +
        )
         101  +
        /* BuilderGenerator.kt:253 */
   55    102   
    }
         103  +
    /* BuilderGenerator.kt:355 */
   56    104   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_list/_malformed_list_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 MalformedListOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedListOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl MalformedListOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::malformed_list::builders::MalformedListOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::malformed_list::builders::MalformedListOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          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 MalformedListOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct MalformedListOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl MalformedListOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedListOutput`](crate::operation::malformed_list::MalformedListOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::malformed_list::MalformedListOutput {
   20         -
        crate::operation::malformed_list::MalformedListOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::malformed_list::MalformedListOutput {
          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_list/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_list::_malformed_list_output::MalformedListOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::malformed_list::_malformed_list_input::MalformedListInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::malformed_list::builders::MalformedListInputBuilder {
    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_list::MalformedListOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::malformed_list::MalformedListError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.malformed_list();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `MalformedList`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `MalformedList`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct MalformedListFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::malformed_list::builders::MalformedListInputBuilder,
   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_list::MalformedListOutput,
   34     40   
        crate::operation::malformed_list::MalformedListError,
   35     41   
    > for MalformedListFluentBuilder
   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_list::MalformedListOutput,
   43     49   
            crate::operation::malformed_list::MalformedListError,
   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 MalformedListFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `MalformedListFluentBuilder`.
   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 MalformedList as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::malformed_list::builders::MalformedListInputBuilder {
   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_list::MalformedListOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::malformed_list::MalformedListError,
   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_list::MalformedList::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_list::MalformedList::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_list::MalformedListOutput,
   96    106   
        crate::operation::malformed_list::MalformedListError,
   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:436 */
  111    122   
    /// Appends an item to `bodyList`.
  112    123   
    ///
  113    124   
    /// To override the contents of this collection use [`set_body_list`](Self::set_body_list).
  114    125   
    ///
         126  +
    /* FluentBuilderGenerator.kt:443 */
  115    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:446 */
  116    129   
    pub fn body_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  117    130   
        self.inner = self.inner.body_list(input.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_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  122    137   
        self.inner = self.inner.set_body_list(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_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  127    144   
        self.inner.get_body_list()
  128    145   
    }
         146  +
    /* FluentBuilderGenerator.kt:282 */
  129    147   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_long.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 `MalformedLong`.
           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 MalformedLong;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl MalformedLong {
    7         -
    /// Creates a new `MalformedLong`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `MalformedLong`
          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_long::MalformedLongInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::malformed_long::MalformedLongOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::malformed_long::MalformedLongError,
   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 MalformedLong {
   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("MalformedLong");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            MalformedLongRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            MalformedLongResponseDeserializer,
   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   
            "MalformedLong",
  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("MalformedLong")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(MalformedLongEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::malformed_long::MalformedLongError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::malformed_long::MalformedLongError,
  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 MalformedLongResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedLongResponseDeserializer {
  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_long::de_malformed_long_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_malformed_long::de_malformed_long_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 MalformedLongRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedLongRequestSerializer {
  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_long::ser_malformed_long_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 MalformedLongEndpointParamsInterceptor;
  225    239   
  226    240   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedLongEndpointParamsInterceptor {
  227    241   
    fn name(&self) -> &'static str {
  228    242   
        "MalformedLongEndpointParamsInterceptor"
  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::<MalformedLongInput>()
  244    258   
            .ok_or("failed to downcast to MalformedLongInput")?;
  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 `MalformedLongError` operation.
         274  +
/* RustType.kt:516 */
  259    275   
#[non_exhaustive]
         276  +
/* RustType.kt:516 */
  260    277   
#[derive(::std::fmt::Debug)]
  261         -
pub enum MalformedLongError {
         278  +
pub /* OperationErrorGenerator.kt:81 */ enum MalformedLongError {
         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-MalformedLongError) 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 MalformedLongError {
         292  +
    /* OperationErrorGenerator.kt:219 */
  272    293   
    /// Creates the `MalformedLongError::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 `MalformedLongError::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 MalformedLongError {
         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 MalformedLongError {
         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 MalformedLongError {
         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 MalformedLongError {
         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 MalformedLongError {
         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_long::_malformed_long_output::MalformedLongOutput;
  347    415   
         416  +
/* CodegenDelegator.kt:255 */
  348    417   
pub use crate::operation::malformed_long::_malformed_long_input::MalformedLongInput;
  349    418   
         419  +
/* RustModule.kt:172 */
  350    420   
mod _malformed_long_input;
  351    421   
         422  +
/* RustModule.kt:172 */
  352    423   
mod _malformed_long_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_long/_malformed_long_input.rs

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