Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

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

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `SimpleScalarProperties`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct SimpleScalarProperties;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl SimpleScalarProperties {
    7         -
    /// Creates a new `SimpleScalarProperties`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `SimpleScalarProperties`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +272,289 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for SimpleScalarProperties {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("SimpleScalarProperties");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            SimpleScalarPropertiesRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            SimpleScalarPropertiesResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "SimpleScalarProperties",
  111    122   
            "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("SimpleScalarProperties")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(SimpleScalarPropertiesEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct SimpleScalarPropertiesResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleScalarPropertiesResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct SimpleScalarPropertiesRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SimpleScalarPropertiesRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/SimpleScalarProperties").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                let builder = crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  194    207   
            builder
  195    208   
        };
  196    209   
        let body = ::aws_smithy_types::body::SdkBody::from(
  197    210   
            crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_input(&input)?,
  198    211   
        );
  199    212   
        if let Some(content_length) = body.content_length() {
  200    213   
            let content_length = content_length.to_string();
  201    214   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  202    215   
        }
  203    216   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  204    217   
    }
  205    218   
}
         219  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  206    220   
#[derive(Debug)]
  207    221   
struct SimpleScalarPropertiesEndpointParamsInterceptor;
  208    222   
  209    223   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleScalarPropertiesEndpointParamsInterceptor {
  210    224   
    fn name(&self) -> &'static str {
  211    225   
        "SimpleScalarPropertiesEndpointParamsInterceptor"
  212    226   
    }
  213    227   
  214    228   
    fn read_before_execution(
  215    229   
        &self,
  216    230   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  217    231   
            '_,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  221    235   
        >,
  222    236   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  223    237   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  224    238   
        let _input = context
  225    239   
            .input()
  226    240   
            .downcast_ref::<SimpleScalarPropertiesInput>()
  227    241   
            .ok_or("failed to downcast to SimpleScalarPropertiesInput")?;
  228    242   
  229    243   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  230    244   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  231    245   
        })?;
  232    246   
        cfg.interceptor_state()
  233    247   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  234    248   
        ::std::result::Result::Ok(())
  235    249   
    }
  236    250   
}
  237    251   
  238    252   
// The get_* functions below are generated from JMESPath expressions in the
  239    253   
// operationContextParams trait. They target the operation's input shape.
  240    254   
         255  +
/* RustType.kt:516 */
  241    256   
#[allow(unreachable_code, unused_variables)]
         257  +
/* RustType.kt:516 */
  242    258   
#[cfg(test)]
         259  +
/* ProtocolTestGenerator.kt:98 */
  243    260   
mod simple_scalar_properties_test {
  244    261   
    use ::aws_smithy_protocol_test::FloatEquals;
  245    262   
  246    263   
    /// Serializes simple scalar properties
  247    264   
    /// Test ID: RestJsonSimpleScalarProperties
  248    265   
    #[::tokio::test]
  249    266   
    #[::tracing_test::traced_test]
  250    267   
    async fn rest_json_simple_scalar_properties_request() {
  251    268   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  252    269   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
@@ -774,791 +903,979 @@
  794    811   
            expected_output.float_value,
  795    812   
            parsed.float_value
  796    813   
        );
  797    814   
        assert!(
  798    815   
            parsed.double_value.float_equals(&expected_output.double_value),
  799    816   
            "Unexpected value for `double_value` {:?} vs. {:?}",
  800    817   
            expected_output.double_value,
  801    818   
            parsed.double_value
  802    819   
        );
  803    820   
    }
         821  +
         822  +
    /* ProtocolTestGenerator.kt:98 */
  804    823   
}
  805    824   
         825  +
/* OperationErrorGenerator.kt:79 */
  806    826   
/// Error type for the `SimpleScalarPropertiesError` operation.
         827  +
/* RustType.kt:516 */
  807    828   
#[non_exhaustive]
         829  +
/* RustType.kt:516 */
  808    830   
#[derive(::std::fmt::Debug)]
  809         -
pub enum SimpleScalarPropertiesError {
         831  +
pub /* OperationErrorGenerator.kt:81 */ enum SimpleScalarPropertiesError {
         832  +
    /* OperationErrorGenerator.kt:88 */
  810    833   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  811    834   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  812    835   
    variable wildcard pattern and check `.code()`:
  813    836   
     \
  814    837   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  815    838   
     \
  816    839   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SimpleScalarPropertiesError) for what information is available for the error.")]
  817    840   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         841  +
    /* OperationErrorGenerator.kt:81 */
  818    842   
}
         843  +
/* OperationErrorGenerator.kt:218 */
  819    844   
impl SimpleScalarPropertiesError {
         845  +
    /* OperationErrorGenerator.kt:219 */
  820    846   
    /// Creates the `SimpleScalarPropertiesError::Unhandled` variant from any error type.
  821    847   
    pub fn unhandled(
  822    848   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  823    849   
    ) -> Self {
  824    850   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  825    851   
            source: err.into(),
  826    852   
            meta: ::std::default::Default::default(),
  827    853   
        })
  828    854   
    }
  829    855   
  830    856   
    /// Creates the `SimpleScalarPropertiesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  831    857   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  832    858   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  833    859   
            source: err.clone().into(),
  834    860   
            meta: err,
  835    861   
        })
  836    862   
    }
  837         -
    ///
         863  +
    /// /* OperationErrorGenerator.kt:236 */
  838    864   
    /// Returns error metadata, which includes the error code, message,
  839    865   
    /// request ID, and potentially additional information.
  840    866   
    ///
         867  +
    /* OperationErrorGenerator.kt:242 */
  841    868   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         869  +
        /* OperationErrorGenerator.kt:243 */
  842    870   
        match self {
  843         -
            Self::Unhandled(e) => &e.meta,
         871  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         872  +
            /* OperationErrorGenerator.kt:243 */
  844    873   
        }
         874  +
        /* OperationErrorGenerator.kt:242 */
  845    875   
    }
         876  +
    /* OperationErrorGenerator.kt:218 */
  846    877   
}
         878  +
/* OperationErrorGenerator.kt:269 */
  847    879   
impl ::std::error::Error for SimpleScalarPropertiesError {
         880  +
    /* OperationErrorGenerator.kt:270 */
  848    881   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         882  +
        /* OperationErrorGenerator.kt:318 */
  849    883   
        match self {
  850         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         884  +
            /* OperationErrorGenerator.kt:326 */
         885  +
            Self::Unhandled(_inner) => {
         886  +
                /* OperationErrorGenerator.kt:279 */
         887  +
                ::std::option::Option::Some(&*_inner.source)
         888  +
                /* OperationErrorGenerator.kt:326 */
         889  +
            } /* OperationErrorGenerator.kt:318 */
  851    890   
        }
         891  +
        /* OperationErrorGenerator.kt:270 */
  852    892   
    }
         893  +
    /* OperationErrorGenerator.kt:269 */
  853    894   
}
         895  +
/* OperationErrorGenerator.kt:133 */
  854    896   
impl ::std::fmt::Display for SimpleScalarPropertiesError {
         897  +
    /* OperationErrorGenerator.kt:134 */
  855    898   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         899  +
        /* OperationErrorGenerator.kt:318 */
  856    900   
        match self {
         901  +
            /* OperationErrorGenerator.kt:326 */
  857    902   
            Self::Unhandled(_inner) => {
         903  +
                /* OperationErrorGenerator.kt:139 */
  858    904   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  859    905   
                    write!(f, "unhandled error ({code})")
  860    906   
                } else {
  861    907   
                    f.write_str("unhandled error")
  862    908   
                }
  863         -
            }
         909  +
                /* OperationErrorGenerator.kt:326 */
         910  +
            } /* OperationErrorGenerator.kt:318 */
  864    911   
        }
         912  +
        /* OperationErrorGenerator.kt:134 */
  865    913   
    }
         914  +
    /* OperationErrorGenerator.kt:133 */
  866    915   
}
         916  +
/* OperationErrorGenerator.kt:182 */
  867    917   
impl ::aws_smithy_types::retry::ProvideErrorKind for SimpleScalarPropertiesError {
         918  +
    /* OperationErrorGenerator.kt:186 */
  868    919   
    fn code(&self) -> ::std::option::Option<&str> {
         920  +
        /* OperationErrorGenerator.kt:187 */
  869    921   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         922  +
        /* OperationErrorGenerator.kt:186 */
  870    923   
    }
         924  +
    /* OperationErrorGenerator.kt:190 */
  871    925   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         926  +
        /* OperationErrorGenerator.kt:197 */
  872    927   
        ::std::option::Option::None
         928  +
        /* OperationErrorGenerator.kt:190 */
  873    929   
    }
         930  +
    /* OperationErrorGenerator.kt:182 */
  874    931   
}
         932  +
/* OperationErrorGenerator.kt:163 */
  875    933   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SimpleScalarPropertiesError {
         934  +
    /* OperationErrorGenerator.kt:164 */
  876    935   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         936  +
        /* OperationErrorGenerator.kt:318 */
  877    937   
        match self {
  878         -
            Self::Unhandled(_inner) => &_inner.meta,
         938  +
            /* OperationErrorGenerator.kt:326 */
         939  +
            Self::Unhandled(_inner) => {
         940  +
                /* OperationErrorGenerator.kt:168 */
         941  +
                &_inner.meta
         942  +
                /* OperationErrorGenerator.kt:326 */
         943  +
            } /* OperationErrorGenerator.kt:318 */
  879    944   
        }
         945  +
        /* OperationErrorGenerator.kt:164 */
  880    946   
    }
         947  +
    /* OperationErrorGenerator.kt:163 */
  881    948   
}
         949  +
/* OperationErrorGenerator.kt:109 */
  882    950   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SimpleScalarPropertiesError {
         951  +
    /* OperationErrorGenerator.kt:110 */
  883    952   
    fn create_unhandled_error(
  884    953   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  885    954   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  886    955   
    ) -> Self {
         956  +
        /* OperationErrorGenerator.kt:121 */
  887    957   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  888    958   
            source,
  889    959   
            meta: meta.unwrap_or_default(),
  890    960   
        })
         961  +
        /* OperationErrorGenerator.kt:110 */
  891    962   
    }
         963  +
    /* OperationErrorGenerator.kt:109 */
  892    964   
}
  893    965   
         966  +
/* CodegenDelegator.kt:255 */
  894    967   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_output::SimpleScalarPropertiesOutput;
  895    968   
         969  +
/* CodegenDelegator.kt:255 */
  896    970   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_input::SimpleScalarPropertiesInput;
  897    971   
         972  +
/* RustModule.kt:172 */
  898    973   
mod _simple_scalar_properties_input;
  899    974   
         975  +
/* RustModule.kt:172 */
  900    976   
mod _simple_scalar_properties_output;
  901    977   
  902         -
/// Builders
         978  +
/// /* CodegenDelegator.kt:51 */Builders
  903    979   
pub mod builders;

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

@@ -1,1 +252,460 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct SimpleScalarPropertiesInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct SimpleScalarPropertiesInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub string_value: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub true_boolean_value: ::std::option::Option<bool>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub false_boolean_value: ::std::option::Option<bool>,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          21  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     22   
    pub byte_value: ::std::option::Option<i8>,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          23  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     24   
    pub short_value: ::std::option::Option<i16>,
   18         -
    #[allow(missing_docs)] // documentation missing in model
          25  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   19     26   
    pub integer_value: ::std::option::Option<i32>,
   20         -
    #[allow(missing_docs)] // documentation missing in model
          27  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   21     28   
    pub long_value: ::std::option::Option<i64>,
   22         -
    #[allow(missing_docs)] // documentation missing in model
          29  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   23     30   
    pub float_value: ::std::option::Option<f32>,
          31  +
    /* StructureGenerator.kt:231 */
   24     32   
    #[allow(missing_docs)] // documentation missing in model
   25     33   
    pub double_value: ::std::option::Option<f64>,
          34  +
    /* StructureGenerator.kt:201 */
   26     35   
}
          36  +
/* StructureGenerator.kt:135 */
   27     37   
impl SimpleScalarPropertiesInput {
          38  +
    /* StructureGenerator.kt:231 */
   28     39   
    #[allow(missing_docs)] // documentation missing in model
          40  +
                           /* StructureGenerator.kt:166 */
   29     41   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          42  +
        /* StructureGenerator.kt:169 */
   30     43   
        self.foo.as_deref()
          44  +
        /* StructureGenerator.kt:166 */
   31     45   
    }
          46  +
    /* StructureGenerator.kt:231 */
   32     47   
    #[allow(missing_docs)] // documentation missing in model
          48  +
                           /* StructureGenerator.kt:166 */
   33     49   
    pub fn string_value(&self) -> ::std::option::Option<&str> {
          50  +
        /* StructureGenerator.kt:169 */
   34     51   
        self.string_value.as_deref()
          52  +
        /* StructureGenerator.kt:166 */
   35     53   
    }
          54  +
    /* StructureGenerator.kt:231 */
   36     55   
    #[allow(missing_docs)] // documentation missing in model
          56  +
                           /* StructureGenerator.kt:166 */
   37     57   
    pub fn true_boolean_value(&self) -> ::std::option::Option<bool> {
          58  +
        /* StructureGenerator.kt:168 */
   38     59   
        self.true_boolean_value
          60  +
        /* StructureGenerator.kt:166 */
   39     61   
    }
          62  +
    /* StructureGenerator.kt:231 */
   40     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* StructureGenerator.kt:166 */
   41     65   
    pub fn false_boolean_value(&self) -> ::std::option::Option<bool> {
          66  +
        /* StructureGenerator.kt:168 */
   42     67   
        self.false_boolean_value
          68  +
        /* StructureGenerator.kt:166 */
   43     69   
    }
          70  +
    /* StructureGenerator.kt:231 */
   44     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* StructureGenerator.kt:166 */
   45     73   
    pub fn byte_value(&self) -> ::std::option::Option<i8> {
          74  +
        /* StructureGenerator.kt:168 */
   46     75   
        self.byte_value
          76  +
        /* StructureGenerator.kt:166 */
   47     77   
    }
          78  +
    /* StructureGenerator.kt:231 */
   48     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* StructureGenerator.kt:166 */
   49     81   
    pub fn short_value(&self) -> ::std::option::Option<i16> {
          82  +
        /* StructureGenerator.kt:168 */
   50     83   
        self.short_value
          84  +
        /* StructureGenerator.kt:166 */
   51     85   
    }
          86  +
    /* StructureGenerator.kt:231 */
   52     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* StructureGenerator.kt:166 */
   53     89   
    pub fn integer_value(&self) -> ::std::option::Option<i32> {
          90  +
        /* StructureGenerator.kt:168 */
   54     91   
        self.integer_value
          92  +
        /* StructureGenerator.kt:166 */
   55     93   
    }
          94  +
    /* StructureGenerator.kt:231 */
   56     95   
    #[allow(missing_docs)] // documentation missing in model
          96  +
                           /* StructureGenerator.kt:166 */
   57     97   
    pub fn long_value(&self) -> ::std::option::Option<i64> {
          98  +
        /* StructureGenerator.kt:168 */
   58     99   
        self.long_value
         100  +
        /* StructureGenerator.kt:166 */
   59    101   
    }
         102  +
    /* StructureGenerator.kt:231 */
   60    103   
    #[allow(missing_docs)] // documentation missing in model
         104  +
                           /* StructureGenerator.kt:166 */
   61    105   
    pub fn float_value(&self) -> ::std::option::Option<f32> {
         106  +
        /* StructureGenerator.kt:168 */
   62    107   
        self.float_value
         108  +
        /* StructureGenerator.kt:166 */
   63    109   
    }
         110  +
    /* StructureGenerator.kt:231 */
   64    111   
    #[allow(missing_docs)] // documentation missing in model
         112  +
                           /* StructureGenerator.kt:166 */
   65    113   
    pub fn double_value(&self) -> ::std::option::Option<f64> {
         114  +
        /* StructureGenerator.kt:168 */
   66    115   
        self.double_value
         116  +
        /* StructureGenerator.kt:166 */
   67    117   
    }
         118  +
    /* StructureGenerator.kt:135 */
   68    119   
}
         120  +
/* ClientCodegenVisitor.kt:237 */
   69    121   
impl SimpleScalarPropertiesInput {
   70         -
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         122  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         123  +
    /* BuilderGenerator.kt:175 */
   71    124   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
         125  +
        /* BuilderGenerator.kt:176 */
   72    126   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder::default()
         127  +
        /* BuilderGenerator.kt:175 */
   73    128   
    }
         129  +
    /* ClientCodegenVisitor.kt:237 */
   74    130   
}
   75    131   
   76         -
/// A builder for [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         132  +
/// /* BuilderGenerator.kt:342 */A builder for [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         133  +
/* RustType.kt:516 */
   77    134   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         135  +
/* RustType.kt:516 */
   78    136   
#[non_exhaustive]
         137  +
/* BuilderGenerator.kt:345 */
   79    138   
pub struct SimpleScalarPropertiesInputBuilder {
   80         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   81         -
    pub(crate) string_value: ::std::option::Option<::std::string::String>,
   82         -
    pub(crate) true_boolean_value: ::std::option::Option<bool>,
   83         -
    pub(crate) false_boolean_value: ::std::option::Option<bool>,
   84         -
    pub(crate) byte_value: ::std::option::Option<i8>,
   85         -
    pub(crate) short_value: ::std::option::Option<i16>,
   86         -
    pub(crate) integer_value: ::std::option::Option<i32>,
   87         -
    pub(crate) long_value: ::std::option::Option<i64>,
   88         -
    pub(crate) float_value: ::std::option::Option<f32>,
   89         -
    pub(crate) double_value: ::std::option::Option<f64>,
         139  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
         140  +
    /* BuilderGenerator.kt:275 */ pub(crate) string_value: ::std::option::Option<::std::string::String>,
         141  +
    /* BuilderGenerator.kt:275 */ pub(crate) true_boolean_value: ::std::option::Option<bool>,
         142  +
    /* BuilderGenerator.kt:275 */ pub(crate) false_boolean_value: ::std::option::Option<bool>,
         143  +
    /* BuilderGenerator.kt:275 */ pub(crate) byte_value: ::std::option::Option<i8>,
         144  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_value: ::std::option::Option<i16>,
         145  +
    /* BuilderGenerator.kt:275 */ pub(crate) integer_value: ::std::option::Option<i32>,
         146  +
    /* BuilderGenerator.kt:275 */ pub(crate) long_value: ::std::option::Option<i64>,
         147  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_value: ::std::option::Option<f32>,
         148  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_value: ::std::option::Option<f64>,
         149  +
    /* BuilderGenerator.kt:345 */
   90    150   
}
         151  +
/* BuilderGenerator.kt:355 */
   91    152   
impl SimpleScalarPropertiesInputBuilder {
         153  +
    /* BuilderGenerator.kt:286 */
   92    154   
    #[allow(missing_docs)] // documentation missing in model
         155  +
                           /* BuilderGenerator.kt:291 */
   93    156   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         157  +
        /* BuilderGenerator.kt:292 */
   94    158   
        self.foo = ::std::option::Option::Some(input.into());
         159  +
        /* BuilderGenerator.kt:293 */
   95    160   
        self
         161  +
        /* BuilderGenerator.kt:291 */
   96    162   
    }
         163  +
    /* BuilderGenerator.kt:312 */
   97    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* BuilderGenerator.kt:314 */
   98    166   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         167  +
        /* BuilderGenerator.kt:315 */
   99    168   
        self.foo = input;
  100    169   
        self
         170  +
        /* BuilderGenerator.kt:314 */
  101    171   
    }
         172  +
    /* BuilderGenerator.kt:334 */
  102    173   
    #[allow(missing_docs)] // documentation missing in model
         174  +
                           /* BuilderGenerator.kt:336 */
  103    175   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
         176  +
        /* BuilderGenerator.kt:337 */
  104    177   
        &self.foo
         178  +
        /* BuilderGenerator.kt:336 */
  105    179   
    }
         180  +
    /* BuilderGenerator.kt:286 */
  106    181   
    #[allow(missing_docs)] // documentation missing in model
         182  +
                           /* BuilderGenerator.kt:291 */
  107    183   
    pub fn string_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         184  +
        /* BuilderGenerator.kt:292 */
  108    185   
        self.string_value = ::std::option::Option::Some(input.into());
         186  +
        /* BuilderGenerator.kt:293 */
  109    187   
        self
         188  +
        /* BuilderGenerator.kt:291 */
  110    189   
    }
         190  +
    /* BuilderGenerator.kt:312 */
  111    191   
    #[allow(missing_docs)] // documentation missing in model
         192  +
                           /* BuilderGenerator.kt:314 */
  112    193   
    pub fn set_string_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         194  +
        /* BuilderGenerator.kt:315 */
  113    195   
        self.string_value = input;
  114    196   
        self
         197  +
        /* BuilderGenerator.kt:314 */
  115    198   
    }
         199  +
    /* BuilderGenerator.kt:334 */
  116    200   
    #[allow(missing_docs)] // documentation missing in model
         201  +
                           /* BuilderGenerator.kt:336 */
  117    202   
    pub fn get_string_value(&self) -> &::std::option::Option<::std::string::String> {
         203  +
        /* BuilderGenerator.kt:337 */
  118    204   
        &self.string_value
         205  +
        /* BuilderGenerator.kt:336 */
  119    206   
    }
         207  +
    /* BuilderGenerator.kt:286 */
  120    208   
    #[allow(missing_docs)] // documentation missing in model
         209  +
                           /* BuilderGenerator.kt:291 */
  121    210   
    pub fn true_boolean_value(mut self, input: bool) -> Self {
         211  +
        /* BuilderGenerator.kt:292 */
  122    212   
        self.true_boolean_value = ::std::option::Option::Some(input);
         213  +
        /* BuilderGenerator.kt:293 */
  123    214   
        self
         215  +
        /* BuilderGenerator.kt:291 */
  124    216   
    }
         217  +
    /* BuilderGenerator.kt:312 */
  125    218   
    #[allow(missing_docs)] // documentation missing in model
         219  +
                           /* BuilderGenerator.kt:314 */
  126    220   
    pub fn set_true_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
         221  +
        /* BuilderGenerator.kt:315 */
  127    222   
        self.true_boolean_value = input;
  128    223   
        self
         224  +
        /* BuilderGenerator.kt:314 */
  129    225   
    }
         226  +
    /* BuilderGenerator.kt:334 */
  130    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* BuilderGenerator.kt:336 */
  131    229   
    pub fn get_true_boolean_value(&self) -> &::std::option::Option<bool> {
         230  +
        /* BuilderGenerator.kt:337 */
  132    231   
        &self.true_boolean_value
         232  +
        /* BuilderGenerator.kt:336 */
  133    233   
    }
         234  +
    /* BuilderGenerator.kt:286 */
  134    235   
    #[allow(missing_docs)] // documentation missing in model
         236  +
                           /* BuilderGenerator.kt:291 */
  135    237   
    pub fn false_boolean_value(mut self, input: bool) -> Self {
         238  +
        /* BuilderGenerator.kt:292 */
  136    239   
        self.false_boolean_value = ::std::option::Option::Some(input);
         240  +
        /* BuilderGenerator.kt:293 */
  137    241   
        self
         242  +
        /* BuilderGenerator.kt:291 */
  138    243   
    }
         244  +
    /* BuilderGenerator.kt:312 */
  139    245   
    #[allow(missing_docs)] // documentation missing in model
         246  +
                           /* BuilderGenerator.kt:314 */
  140    247   
    pub fn set_false_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
         248  +
        /* BuilderGenerator.kt:315 */
  141    249   
        self.false_boolean_value = input;
  142    250   
        self
         251  +
        /* BuilderGenerator.kt:314 */
  143    252   
    }
         253  +
    /* BuilderGenerator.kt:334 */
  144    254   
    #[allow(missing_docs)] // documentation missing in model
         255  +
                           /* BuilderGenerator.kt:336 */
  145    256   
    pub fn get_false_boolean_value(&self) -> &::std::option::Option<bool> {
         257  +
        /* BuilderGenerator.kt:337 */
  146    258   
        &self.false_boolean_value
         259  +
        /* BuilderGenerator.kt:336 */
  147    260   
    }
         261  +
    /* BuilderGenerator.kt:286 */
  148    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* BuilderGenerator.kt:291 */
  149    264   
    pub fn byte_value(mut self, input: i8) -> Self {
         265  +
        /* BuilderGenerator.kt:292 */
  150    266   
        self.byte_value = ::std::option::Option::Some(input);
         267  +
        /* BuilderGenerator.kt:293 */
  151    268   
        self
         269  +
        /* BuilderGenerator.kt:291 */
  152    270   
    }
         271  +
    /* BuilderGenerator.kt:312 */
  153    272   
    #[allow(missing_docs)] // documentation missing in model
         273  +
                           /* BuilderGenerator.kt:314 */
  154    274   
    pub fn set_byte_value(mut self, input: ::std::option::Option<i8>) -> Self {
         275  +
        /* BuilderGenerator.kt:315 */
  155    276   
        self.byte_value = input;
  156    277   
        self
         278  +
        /* BuilderGenerator.kt:314 */
  157    279   
    }
         280  +
    /* BuilderGenerator.kt:334 */
  158    281   
    #[allow(missing_docs)] // documentation missing in model
         282  +
                           /* BuilderGenerator.kt:336 */
  159    283   
    pub fn get_byte_value(&self) -> &::std::option::Option<i8> {
         284  +
        /* BuilderGenerator.kt:337 */
  160    285   
        &self.byte_value
         286  +
        /* BuilderGenerator.kt:336 */
  161    287   
    }
         288  +
    /* BuilderGenerator.kt:286 */
  162    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* BuilderGenerator.kt:291 */
  163    291   
    pub fn short_value(mut self, input: i16) -> Self {
         292  +
        /* BuilderGenerator.kt:292 */
  164    293   
        self.short_value = ::std::option::Option::Some(input);
         294  +
        /* BuilderGenerator.kt:293 */
  165    295   
        self
         296  +
        /* BuilderGenerator.kt:291 */
  166    297   
    }
         298  +
    /* BuilderGenerator.kt:312 */
  167    299   
    #[allow(missing_docs)] // documentation missing in model
         300  +
                           /* BuilderGenerator.kt:314 */
  168    301   
    pub fn set_short_value(mut self, input: ::std::option::Option<i16>) -> Self {
         302  +
        /* BuilderGenerator.kt:315 */
  169    303   
        self.short_value = input;
  170    304   
        self
         305  +
        /* BuilderGenerator.kt:314 */
  171    306   
    }
         307  +
    /* BuilderGenerator.kt:334 */
  172    308   
    #[allow(missing_docs)] // documentation missing in model
         309  +
                           /* BuilderGenerator.kt:336 */
  173    310   
    pub fn get_short_value(&self) -> &::std::option::Option<i16> {
         311  +
        /* BuilderGenerator.kt:337 */
  174    312   
        &self.short_value
         313  +
        /* BuilderGenerator.kt:336 */
  175    314   
    }
         315  +
    /* BuilderGenerator.kt:286 */
  176    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* BuilderGenerator.kt:291 */
  177    318   
    pub fn integer_value(mut self, input: i32) -> Self {
         319  +
        /* BuilderGenerator.kt:292 */
  178    320   
        self.integer_value = ::std::option::Option::Some(input);
         321  +
        /* BuilderGenerator.kt:293 */
  179    322   
        self
         323  +
        /* BuilderGenerator.kt:291 */
  180    324   
    }
         325  +
    /* BuilderGenerator.kt:312 */
  181    326   
    #[allow(missing_docs)] // documentation missing in model
         327  +
                           /* BuilderGenerator.kt:314 */
  182    328   
    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
         329  +
        /* BuilderGenerator.kt:315 */
  183    330   
        self.integer_value = input;
  184    331   
        self
         332  +
        /* BuilderGenerator.kt:314 */
  185    333   
    }
         334  +
    /* BuilderGenerator.kt:334 */
  186    335   
    #[allow(missing_docs)] // documentation missing in model
         336  +
                           /* BuilderGenerator.kt:336 */
  187    337   
    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
         338  +
        /* BuilderGenerator.kt:337 */
  188    339   
        &self.integer_value
         340  +
        /* BuilderGenerator.kt:336 */
  189    341   
    }
         342  +
    /* BuilderGenerator.kt:286 */
  190    343   
    #[allow(missing_docs)] // documentation missing in model
         344  +
                           /* BuilderGenerator.kt:291 */
  191    345   
    pub fn long_value(mut self, input: i64) -> Self {
         346  +
        /* BuilderGenerator.kt:292 */
  192    347   
        self.long_value = ::std::option::Option::Some(input);
         348  +
        /* BuilderGenerator.kt:293 */
  193    349   
        self
         350  +
        /* BuilderGenerator.kt:291 */
  194    351   
    }
         352  +
    /* BuilderGenerator.kt:312 */
  195    353   
    #[allow(missing_docs)] // documentation missing in model
         354  +
                           /* BuilderGenerator.kt:314 */
  196    355   
    pub fn set_long_value(mut self, input: ::std::option::Option<i64>) -> Self {
         356  +
        /* BuilderGenerator.kt:315 */
  197    357   
        self.long_value = input;
  198    358   
        self
         359  +
        /* BuilderGenerator.kt:314 */
  199    360   
    }
         361  +
    /* BuilderGenerator.kt:334 */
  200    362   
    #[allow(missing_docs)] // documentation missing in model
         363  +
                           /* BuilderGenerator.kt:336 */
  201    364   
    pub fn get_long_value(&self) -> &::std::option::Option<i64> {
         365  +
        /* BuilderGenerator.kt:337 */
  202    366   
        &self.long_value
         367  +
        /* BuilderGenerator.kt:336 */
  203    368   
    }
         369  +
    /* BuilderGenerator.kt:286 */
  204    370   
    #[allow(missing_docs)] // documentation missing in model
         371  +
                           /* BuilderGenerator.kt:291 */
  205    372   
    pub fn float_value(mut self, input: f32) -> Self {
         373  +
        /* BuilderGenerator.kt:292 */
  206    374   
        self.float_value = ::std::option::Option::Some(input);
         375  +
        /* BuilderGenerator.kt:293 */
  207    376   
        self
         377  +
        /* BuilderGenerator.kt:291 */
  208    378   
    }
         379  +
    /* BuilderGenerator.kt:312 */
  209    380   
    #[allow(missing_docs)] // documentation missing in model
         381  +
                           /* BuilderGenerator.kt:314 */
  210    382   
    pub fn set_float_value(mut self, input: ::std::option::Option<f32>) -> Self {
         383  +
        /* BuilderGenerator.kt:315 */
  211    384   
        self.float_value = input;
  212    385   
        self
         386  +
        /* BuilderGenerator.kt:314 */
  213    387   
    }
         388  +
    /* BuilderGenerator.kt:334 */
  214    389   
    #[allow(missing_docs)] // documentation missing in model
         390  +
                           /* BuilderGenerator.kt:336 */
  215    391   
    pub fn get_float_value(&self) -> &::std::option::Option<f32> {
         392  +
        /* BuilderGenerator.kt:337 */
  216    393   
        &self.float_value
         394  +
        /* BuilderGenerator.kt:336 */
  217    395   
    }
         396  +
    /* BuilderGenerator.kt:286 */
  218    397   
    #[allow(missing_docs)] // documentation missing in model
         398  +
                           /* BuilderGenerator.kt:291 */
  219    399   
    pub fn double_value(mut self, input: f64) -> Self {
         400  +
        /* BuilderGenerator.kt:292 */
  220    401   
        self.double_value = ::std::option::Option::Some(input);
         402  +
        /* BuilderGenerator.kt:293 */
  221    403   
        self
         404  +
        /* BuilderGenerator.kt:291 */
  222    405   
    }
         406  +
    /* BuilderGenerator.kt:312 */
  223    407   
    #[allow(missing_docs)] // documentation missing in model
         408  +
                           /* BuilderGenerator.kt:314 */
  224    409   
    pub fn set_double_value(mut self, input: ::std::option::Option<f64>) -> Self {
         410  +
        /* BuilderGenerator.kt:315 */
  225    411   
        self.double_value = input;
  226    412   
        self
         413  +
        /* BuilderGenerator.kt:314 */
  227    414   
    }
         415  +
    /* BuilderGenerator.kt:334 */
  228    416   
    #[allow(missing_docs)] // documentation missing in model
         417  +
                           /* BuilderGenerator.kt:336 */
  229    418   
    pub fn get_double_value(&self) -> &::std::option::Option<f64> {
         419  +
        /* BuilderGenerator.kt:337 */
  230    420   
        &self.double_value
         421  +
        /* BuilderGenerator.kt:336 */
  231    422   
    }
  232         -
    /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         423  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
         424  +
    /* BuilderGenerator.kt:253 */
  233    425   
    pub fn build(
  234    426   
        self,
  235    427   
    ) -> ::std::result::Result<
  236    428   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  237    429   
        ::aws_smithy_types::error::operation::BuildError,
  238    430   
    > {
  239         -
        ::std::result::Result::Ok(crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput {
  240         -
            foo: self.foo,
  241         -
            string_value: self.string_value,
  242         -
            true_boolean_value: self.true_boolean_value,
  243         -
            false_boolean_value: self.false_boolean_value,
  244         -
            byte_value: self.byte_value,
  245         -
            short_value: self.short_value,
  246         -
            integer_value: self.integer_value,
  247         -
            long_value: self.long_value,
  248         -
            float_value: self.float_value,
  249         -
            double_value: self.double_value,
  250         -
        })
  251         -
    }
         431  +
        /* BuilderGenerator.kt:254 */
         432  +
        ::std::result::Result::Ok(
         433  +
            /* BuilderGenerator.kt:477 */
         434  +
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput {
         435  +
                /* BuilderGenerator.kt:481 */ foo: self.foo,
         436  +
                /* BuilderGenerator.kt:481 */
         437  +
                string_value: self.string_value,
         438  +
                /* BuilderGenerator.kt:481 */
         439  +
                true_boolean_value: self.true_boolean_value,
         440  +
                /* BuilderGenerator.kt:481 */
         441  +
                false_boolean_value: self.false_boolean_value,
         442  +
                /* BuilderGenerator.kt:481 */
         443  +
                byte_value: self.byte_value,
         444  +
                /* BuilderGenerator.kt:481 */
         445  +
                short_value: self.short_value,
         446  +
                /* BuilderGenerator.kt:481 */
         447  +
                integer_value: self.integer_value,
         448  +
                /* BuilderGenerator.kt:481 */
         449  +
                long_value: self.long_value,
         450  +
                /* BuilderGenerator.kt:481 */
         451  +
                float_value: self.float_value,
         452  +
                /* BuilderGenerator.kt:481 */
         453  +
                double_value: self.double_value,
         454  +
                /* BuilderGenerator.kt:477 */
         455  +
            }, /* BuilderGenerator.kt:254 */
         456  +
        )
         457  +
        /* BuilderGenerator.kt:253 */
         458  +
    }
         459  +
    /* BuilderGenerator.kt:355 */
  252    460   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/simple_scalar_properties/_simple_scalar_properties_output.rs

@@ -1,1 +247,452 @@
    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 SimpleScalarPropertiesOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct SimpleScalarPropertiesOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub string_value: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub true_boolean_value: ::std::option::Option<bool>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub false_boolean_value: ::std::option::Option<bool>,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          21  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     22   
    pub byte_value: ::std::option::Option<i8>,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          23  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     24   
    pub short_value: ::std::option::Option<i16>,
   18         -
    #[allow(missing_docs)] // documentation missing in model
          25  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   19     26   
    pub integer_value: ::std::option::Option<i32>,
   20         -
    #[allow(missing_docs)] // documentation missing in model
          27  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   21     28   
    pub long_value: ::std::option::Option<i64>,
   22         -
    #[allow(missing_docs)] // documentation missing in model
          29  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   23     30   
    pub float_value: ::std::option::Option<f32>,
          31  +
    /* StructureGenerator.kt:231 */
   24     32   
    #[allow(missing_docs)] // documentation missing in model
   25     33   
    pub double_value: ::std::option::Option<f64>,
          34  +
    /* StructureGenerator.kt:201 */
   26     35   
}
          36  +
/* StructureGenerator.kt:135 */
   27     37   
impl SimpleScalarPropertiesOutput {
          38  +
    /* StructureGenerator.kt:231 */
   28     39   
    #[allow(missing_docs)] // documentation missing in model
          40  +
                           /* StructureGenerator.kt:166 */
   29     41   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          42  +
        /* StructureGenerator.kt:169 */
   30     43   
        self.foo.as_deref()
          44  +
        /* StructureGenerator.kt:166 */
   31     45   
    }
          46  +
    /* StructureGenerator.kt:231 */
   32     47   
    #[allow(missing_docs)] // documentation missing in model
          48  +
                           /* StructureGenerator.kt:166 */
   33     49   
    pub fn string_value(&self) -> ::std::option::Option<&str> {
          50  +
        /* StructureGenerator.kt:169 */
   34     51   
        self.string_value.as_deref()
          52  +
        /* StructureGenerator.kt:166 */
   35     53   
    }
          54  +
    /* StructureGenerator.kt:231 */
   36     55   
    #[allow(missing_docs)] // documentation missing in model
          56  +
                           /* StructureGenerator.kt:166 */
   37     57   
    pub fn true_boolean_value(&self) -> ::std::option::Option<bool> {
          58  +
        /* StructureGenerator.kt:168 */
   38     59   
        self.true_boolean_value
          60  +
        /* StructureGenerator.kt:166 */
   39     61   
    }
          62  +
    /* StructureGenerator.kt:231 */
   40     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* StructureGenerator.kt:166 */
   41     65   
    pub fn false_boolean_value(&self) -> ::std::option::Option<bool> {
          66  +
        /* StructureGenerator.kt:168 */
   42     67   
        self.false_boolean_value
          68  +
        /* StructureGenerator.kt:166 */
   43     69   
    }
          70  +
    /* StructureGenerator.kt:231 */
   44     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* StructureGenerator.kt:166 */
   45     73   
    pub fn byte_value(&self) -> ::std::option::Option<i8> {
          74  +
        /* StructureGenerator.kt:168 */
   46     75   
        self.byte_value
          76  +
        /* StructureGenerator.kt:166 */
   47     77   
    }
          78  +
    /* StructureGenerator.kt:231 */
   48     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* StructureGenerator.kt:166 */
   49     81   
    pub fn short_value(&self) -> ::std::option::Option<i16> {
          82  +
        /* StructureGenerator.kt:168 */
   50     83   
        self.short_value
          84  +
        /* StructureGenerator.kt:166 */
   51     85   
    }
          86  +
    /* StructureGenerator.kt:231 */
   52     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* StructureGenerator.kt:166 */
   53     89   
    pub fn integer_value(&self) -> ::std::option::Option<i32> {
          90  +
        /* StructureGenerator.kt:168 */
   54     91   
        self.integer_value
          92  +
        /* StructureGenerator.kt:166 */
   55     93   
    }
          94  +
    /* StructureGenerator.kt:231 */
   56     95   
    #[allow(missing_docs)] // documentation missing in model
          96  +
                           /* StructureGenerator.kt:166 */
   57     97   
    pub fn long_value(&self) -> ::std::option::Option<i64> {
          98  +
        /* StructureGenerator.kt:168 */
   58     99   
        self.long_value
         100  +
        /* StructureGenerator.kt:166 */
   59    101   
    }
         102  +
    /* StructureGenerator.kt:231 */
   60    103   
    #[allow(missing_docs)] // documentation missing in model
         104  +
                           /* StructureGenerator.kt:166 */
   61    105   
    pub fn float_value(&self) -> ::std::option::Option<f32> {
         106  +
        /* StructureGenerator.kt:168 */
   62    107   
        self.float_value
         108  +
        /* StructureGenerator.kt:166 */
   63    109   
    }
         110  +
    /* StructureGenerator.kt:231 */
   64    111   
    #[allow(missing_docs)] // documentation missing in model
         112  +
                           /* StructureGenerator.kt:166 */
   65    113   
    pub fn double_value(&self) -> ::std::option::Option<f64> {
         114  +
        /* StructureGenerator.kt:168 */
   66    115   
        self.double_value
         116  +
        /* StructureGenerator.kt:166 */
   67    117   
    }
         118  +
    /* StructureGenerator.kt:135 */
   68    119   
}
         120  +
/* ClientCodegenVisitor.kt:237 */
   69    121   
impl SimpleScalarPropertiesOutput {
   70         -
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         122  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         123  +
    /* BuilderGenerator.kt:175 */
   71    124   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder {
         125  +
        /* BuilderGenerator.kt:176 */
   72    126   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder::default()
         127  +
        /* BuilderGenerator.kt:175 */
   73    128   
    }
         129  +
    /* ClientCodegenVisitor.kt:237 */
   74    130   
}
   75    131   
   76         -
/// A builder for [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         132  +
/// /* BuilderGenerator.kt:342 */A builder for [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         133  +
/* RustType.kt:516 */
   77    134   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         135  +
/* RustType.kt:516 */
   78    136   
#[non_exhaustive]
         137  +
/* BuilderGenerator.kt:345 */
   79    138   
pub struct SimpleScalarPropertiesOutputBuilder {
   80         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   81         -
    pub(crate) string_value: ::std::option::Option<::std::string::String>,
   82         -
    pub(crate) true_boolean_value: ::std::option::Option<bool>,
   83         -
    pub(crate) false_boolean_value: ::std::option::Option<bool>,
   84         -
    pub(crate) byte_value: ::std::option::Option<i8>,
   85         -
    pub(crate) short_value: ::std::option::Option<i16>,
   86         -
    pub(crate) integer_value: ::std::option::Option<i32>,
   87         -
    pub(crate) long_value: ::std::option::Option<i64>,
   88         -
    pub(crate) float_value: ::std::option::Option<f32>,
   89         -
    pub(crate) double_value: ::std::option::Option<f64>,
         139  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
         140  +
    /* BuilderGenerator.kt:275 */ pub(crate) string_value: ::std::option::Option<::std::string::String>,
         141  +
    /* BuilderGenerator.kt:275 */ pub(crate) true_boolean_value: ::std::option::Option<bool>,
         142  +
    /* BuilderGenerator.kt:275 */ pub(crate) false_boolean_value: ::std::option::Option<bool>,
         143  +
    /* BuilderGenerator.kt:275 */ pub(crate) byte_value: ::std::option::Option<i8>,
         144  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_value: ::std::option::Option<i16>,
         145  +
    /* BuilderGenerator.kt:275 */ pub(crate) integer_value: ::std::option::Option<i32>,
         146  +
    /* BuilderGenerator.kt:275 */ pub(crate) long_value: ::std::option::Option<i64>,
         147  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_value: ::std::option::Option<f32>,
         148  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_value: ::std::option::Option<f64>,
         149  +
    /* BuilderGenerator.kt:345 */
   90    150   
}
         151  +
/* BuilderGenerator.kt:355 */
   91    152   
impl SimpleScalarPropertiesOutputBuilder {
         153  +
    /* BuilderGenerator.kt:286 */
   92    154   
    #[allow(missing_docs)] // documentation missing in model
         155  +
                           /* BuilderGenerator.kt:291 */
   93    156   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         157  +
        /* BuilderGenerator.kt:292 */
   94    158   
        self.foo = ::std::option::Option::Some(input.into());
         159  +
        /* BuilderGenerator.kt:293 */
   95    160   
        self
         161  +
        /* BuilderGenerator.kt:291 */
   96    162   
    }
         163  +
    /* BuilderGenerator.kt:312 */
   97    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* BuilderGenerator.kt:314 */
   98    166   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         167  +
        /* BuilderGenerator.kt:315 */
   99    168   
        self.foo = input;
  100    169   
        self
         170  +
        /* BuilderGenerator.kt:314 */
  101    171   
    }
         172  +
    /* BuilderGenerator.kt:334 */
  102    173   
    #[allow(missing_docs)] // documentation missing in model
         174  +
                           /* BuilderGenerator.kt:336 */
  103    175   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
         176  +
        /* BuilderGenerator.kt:337 */
  104    177   
        &self.foo
         178  +
        /* BuilderGenerator.kt:336 */
  105    179   
    }
         180  +
    /* BuilderGenerator.kt:286 */
  106    181   
    #[allow(missing_docs)] // documentation missing in model
         182  +
                           /* BuilderGenerator.kt:291 */
  107    183   
    pub fn string_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         184  +
        /* BuilderGenerator.kt:292 */
  108    185   
        self.string_value = ::std::option::Option::Some(input.into());
         186  +
        /* BuilderGenerator.kt:293 */
  109    187   
        self
         188  +
        /* BuilderGenerator.kt:291 */
  110    189   
    }
         190  +
    /* BuilderGenerator.kt:312 */
  111    191   
    #[allow(missing_docs)] // documentation missing in model
         192  +
                           /* BuilderGenerator.kt:314 */
  112    193   
    pub fn set_string_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         194  +
        /* BuilderGenerator.kt:315 */
  113    195   
        self.string_value = input;
  114    196   
        self
         197  +
        /* BuilderGenerator.kt:314 */
  115    198   
    }
         199  +
    /* BuilderGenerator.kt:334 */
  116    200   
    #[allow(missing_docs)] // documentation missing in model
         201  +
                           /* BuilderGenerator.kt:336 */
  117    202   
    pub fn get_string_value(&self) -> &::std::option::Option<::std::string::String> {
         203  +
        /* BuilderGenerator.kt:337 */
  118    204   
        &self.string_value
         205  +
        /* BuilderGenerator.kt:336 */
  119    206   
    }
         207  +
    /* BuilderGenerator.kt:286 */
  120    208   
    #[allow(missing_docs)] // documentation missing in model
         209  +
                           /* BuilderGenerator.kt:291 */
  121    210   
    pub fn true_boolean_value(mut self, input: bool) -> Self {
         211  +
        /* BuilderGenerator.kt:292 */
  122    212   
        self.true_boolean_value = ::std::option::Option::Some(input);
         213  +
        /* BuilderGenerator.kt:293 */
  123    214   
        self
         215  +
        /* BuilderGenerator.kt:291 */
  124    216   
    }
         217  +
    /* BuilderGenerator.kt:312 */
  125    218   
    #[allow(missing_docs)] // documentation missing in model
         219  +
                           /* BuilderGenerator.kt:314 */
  126    220   
    pub fn set_true_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
         221  +
        /* BuilderGenerator.kt:315 */
  127    222   
        self.true_boolean_value = input;
  128    223   
        self
         224  +
        /* BuilderGenerator.kt:314 */
  129    225   
    }
         226  +
    /* BuilderGenerator.kt:334 */
  130    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* BuilderGenerator.kt:336 */
  131    229   
    pub fn get_true_boolean_value(&self) -> &::std::option::Option<bool> {
         230  +
        /* BuilderGenerator.kt:337 */
  132    231   
        &self.true_boolean_value
         232  +
        /* BuilderGenerator.kt:336 */
  133    233   
    }
         234  +
    /* BuilderGenerator.kt:286 */
  134    235   
    #[allow(missing_docs)] // documentation missing in model
         236  +
                           /* BuilderGenerator.kt:291 */
  135    237   
    pub fn false_boolean_value(mut self, input: bool) -> Self {
         238  +
        /* BuilderGenerator.kt:292 */
  136    239   
        self.false_boolean_value = ::std::option::Option::Some(input);
         240  +
        /* BuilderGenerator.kt:293 */
  137    241   
        self
         242  +
        /* BuilderGenerator.kt:291 */
  138    243   
    }
         244  +
    /* BuilderGenerator.kt:312 */
  139    245   
    #[allow(missing_docs)] // documentation missing in model
         246  +
                           /* BuilderGenerator.kt:314 */
  140    247   
    pub fn set_false_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
         248  +
        /* BuilderGenerator.kt:315 */
  141    249   
        self.false_boolean_value = input;
  142    250   
        self
         251  +
        /* BuilderGenerator.kt:314 */
  143    252   
    }
         253  +
    /* BuilderGenerator.kt:334 */
  144    254   
    #[allow(missing_docs)] // documentation missing in model
         255  +
                           /* BuilderGenerator.kt:336 */
  145    256   
    pub fn get_false_boolean_value(&self) -> &::std::option::Option<bool> {
         257  +
        /* BuilderGenerator.kt:337 */
  146    258   
        &self.false_boolean_value
         259  +
        /* BuilderGenerator.kt:336 */
  147    260   
    }
         261  +
    /* BuilderGenerator.kt:286 */
  148    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* BuilderGenerator.kt:291 */
  149    264   
    pub fn byte_value(mut self, input: i8) -> Self {
         265  +
        /* BuilderGenerator.kt:292 */
  150    266   
        self.byte_value = ::std::option::Option::Some(input);
         267  +
        /* BuilderGenerator.kt:293 */
  151    268   
        self
         269  +
        /* BuilderGenerator.kt:291 */
  152    270   
    }
         271  +
    /* BuilderGenerator.kt:312 */
  153    272   
    #[allow(missing_docs)] // documentation missing in model
         273  +
                           /* BuilderGenerator.kt:314 */
  154    274   
    pub fn set_byte_value(mut self, input: ::std::option::Option<i8>) -> Self {
         275  +
        /* BuilderGenerator.kt:315 */
  155    276   
        self.byte_value = input;
  156    277   
        self
         278  +
        /* BuilderGenerator.kt:314 */
  157    279   
    }
         280  +
    /* BuilderGenerator.kt:334 */
  158    281   
    #[allow(missing_docs)] // documentation missing in model
         282  +
                           /* BuilderGenerator.kt:336 */
  159    283   
    pub fn get_byte_value(&self) -> &::std::option::Option<i8> {
         284  +
        /* BuilderGenerator.kt:337 */
  160    285   
        &self.byte_value
         286  +
        /* BuilderGenerator.kt:336 */
  161    287   
    }
         288  +
    /* BuilderGenerator.kt:286 */
  162    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* BuilderGenerator.kt:291 */
  163    291   
    pub fn short_value(mut self, input: i16) -> Self {
         292  +
        /* BuilderGenerator.kt:292 */
  164    293   
        self.short_value = ::std::option::Option::Some(input);
         294  +
        /* BuilderGenerator.kt:293 */
  165    295   
        self
         296  +
        /* BuilderGenerator.kt:291 */
  166    297   
    }
         298  +
    /* BuilderGenerator.kt:312 */
  167    299   
    #[allow(missing_docs)] // documentation missing in model
         300  +
                           /* BuilderGenerator.kt:314 */
  168    301   
    pub fn set_short_value(mut self, input: ::std::option::Option<i16>) -> Self {
         302  +
        /* BuilderGenerator.kt:315 */
  169    303   
        self.short_value = input;
  170    304   
        self
         305  +
        /* BuilderGenerator.kt:314 */
  171    306   
    }
         307  +
    /* BuilderGenerator.kt:334 */
  172    308   
    #[allow(missing_docs)] // documentation missing in model
         309  +
                           /* BuilderGenerator.kt:336 */
  173    310   
    pub fn get_short_value(&self) -> &::std::option::Option<i16> {
         311  +
        /* BuilderGenerator.kt:337 */
  174    312   
        &self.short_value
         313  +
        /* BuilderGenerator.kt:336 */
  175    314   
    }
         315  +
    /* BuilderGenerator.kt:286 */
  176    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* BuilderGenerator.kt:291 */
  177    318   
    pub fn integer_value(mut self, input: i32) -> Self {
         319  +
        /* BuilderGenerator.kt:292 */
  178    320   
        self.integer_value = ::std::option::Option::Some(input);
         321  +
        /* BuilderGenerator.kt:293 */
  179    322   
        self
         323  +
        /* BuilderGenerator.kt:291 */
  180    324   
    }
         325  +
    /* BuilderGenerator.kt:312 */
  181    326   
    #[allow(missing_docs)] // documentation missing in model
         327  +
                           /* BuilderGenerator.kt:314 */
  182    328   
    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
         329  +
        /* BuilderGenerator.kt:315 */
  183    330   
        self.integer_value = input;
  184    331   
        self
         332  +
        /* BuilderGenerator.kt:314 */
  185    333   
    }
         334  +
    /* BuilderGenerator.kt:334 */
  186    335   
    #[allow(missing_docs)] // documentation missing in model
         336  +
                           /* BuilderGenerator.kt:336 */
  187    337   
    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
         338  +
        /* BuilderGenerator.kt:337 */
  188    339   
        &self.integer_value
         340  +
        /* BuilderGenerator.kt:336 */
  189    341   
    }
         342  +
    /* BuilderGenerator.kt:286 */
  190    343   
    #[allow(missing_docs)] // documentation missing in model
         344  +
                           /* BuilderGenerator.kt:291 */
  191    345   
    pub fn long_value(mut self, input: i64) -> Self {
         346  +
        /* BuilderGenerator.kt:292 */
  192    347   
        self.long_value = ::std::option::Option::Some(input);
         348  +
        /* BuilderGenerator.kt:293 */
  193    349   
        self
         350  +
        /* BuilderGenerator.kt:291 */
  194    351   
    }
         352  +
    /* BuilderGenerator.kt:312 */
  195    353   
    #[allow(missing_docs)] // documentation missing in model
         354  +
                           /* BuilderGenerator.kt:314 */
  196    355   
    pub fn set_long_value(mut self, input: ::std::option::Option<i64>) -> Self {
         356  +
        /* BuilderGenerator.kt:315 */
  197    357   
        self.long_value = input;
  198    358   
        self
         359  +
        /* BuilderGenerator.kt:314 */
  199    360   
    }
         361  +
    /* BuilderGenerator.kt:334 */
  200    362   
    #[allow(missing_docs)] // documentation missing in model
         363  +
                           /* BuilderGenerator.kt:336 */
  201    364   
    pub fn get_long_value(&self) -> &::std::option::Option<i64> {
         365  +
        /* BuilderGenerator.kt:337 */
  202    366   
        &self.long_value
         367  +
        /* BuilderGenerator.kt:336 */
  203    368   
    }
         369  +
    /* BuilderGenerator.kt:286 */
  204    370   
    #[allow(missing_docs)] // documentation missing in model
         371  +
                           /* BuilderGenerator.kt:291 */
  205    372   
    pub fn float_value(mut self, input: f32) -> Self {
         373  +
        /* BuilderGenerator.kt:292 */
  206    374   
        self.float_value = ::std::option::Option::Some(input);
         375  +
        /* BuilderGenerator.kt:293 */
  207    376   
        self
         377  +
        /* BuilderGenerator.kt:291 */
  208    378   
    }
         379  +
    /* BuilderGenerator.kt:312 */
  209    380   
    #[allow(missing_docs)] // documentation missing in model
         381  +
                           /* BuilderGenerator.kt:314 */
  210    382   
    pub fn set_float_value(mut self, input: ::std::option::Option<f32>) -> Self {
         383  +
        /* BuilderGenerator.kt:315 */
  211    384   
        self.float_value = input;
  212    385   
        self
         386  +
        /* BuilderGenerator.kt:314 */
  213    387   
    }
         388  +
    /* BuilderGenerator.kt:334 */
  214    389   
    #[allow(missing_docs)] // documentation missing in model
         390  +
                           /* BuilderGenerator.kt:336 */
  215    391   
    pub fn get_float_value(&self) -> &::std::option::Option<f32> {
         392  +
        /* BuilderGenerator.kt:337 */
  216    393   
        &self.float_value
         394  +
        /* BuilderGenerator.kt:336 */
  217    395   
    }
         396  +
    /* BuilderGenerator.kt:286 */
  218    397   
    #[allow(missing_docs)] // documentation missing in model
         398  +
                           /* BuilderGenerator.kt:291 */
  219    399   
    pub fn double_value(mut self, input: f64) -> Self {
         400  +
        /* BuilderGenerator.kt:292 */
  220    401   
        self.double_value = ::std::option::Option::Some(input);
         402  +
        /* BuilderGenerator.kt:293 */
  221    403   
        self
         404  +
        /* BuilderGenerator.kt:291 */
  222    405   
    }
         406  +
    /* BuilderGenerator.kt:312 */
  223    407   
    #[allow(missing_docs)] // documentation missing in model
         408  +
                           /* BuilderGenerator.kt:314 */
  224    409   
    pub fn set_double_value(mut self, input: ::std::option::Option<f64>) -> Self {
         410  +
        /* BuilderGenerator.kt:315 */
  225    411   
        self.double_value = input;
  226    412   
        self
         413  +
        /* BuilderGenerator.kt:314 */
  227    414   
    }
         415  +
    /* BuilderGenerator.kt:334 */
  228    416   
    #[allow(missing_docs)] // documentation missing in model
         417  +
                           /* BuilderGenerator.kt:336 */
  229    418   
    pub fn get_double_value(&self) -> &::std::option::Option<f64> {
         419  +
        /* BuilderGenerator.kt:337 */
  230    420   
        &self.double_value
         421  +
        /* BuilderGenerator.kt:336 */
  231    422   
    }
  232         -
    /// Consumes the builder and constructs a [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         423  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
         424  +
    /* BuilderGenerator.kt:253 */
  233    425   
    pub fn build(self) -> crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput {
         426  +
        /* BuilderGenerator.kt:477 */
  234    427   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput {
  235         -
            foo: self.foo,
         428  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         429  +
            /* BuilderGenerator.kt:481 */
  236    430   
            string_value: self.string_value,
         431  +
            /* BuilderGenerator.kt:481 */
  237    432   
            true_boolean_value: self.true_boolean_value,
         433  +
            /* BuilderGenerator.kt:481 */
  238    434   
            false_boolean_value: self.false_boolean_value,
         435  +
            /* BuilderGenerator.kt:481 */
  239    436   
            byte_value: self.byte_value,
         437  +
            /* BuilderGenerator.kt:481 */
  240    438   
            short_value: self.short_value,
         439  +
            /* BuilderGenerator.kt:481 */
  241    440   
            integer_value: self.integer_value,
         441  +
            /* BuilderGenerator.kt:481 */
  242    442   
            long_value: self.long_value,
         443  +
            /* BuilderGenerator.kt:481 */
  243    444   
            float_value: self.float_value,
         445  +
            /* BuilderGenerator.kt:481 */
  244    446   
            double_value: self.double_value,
         447  +
            /* BuilderGenerator.kt:477 */
  245    448   
        }
         449  +
        /* BuilderGenerator.kt:253 */
  246    450   
    }
         451  +
    /* BuilderGenerator.kt:355 */
  247    452   
}

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

@@ -1,1 +250,322 @@
    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::simple_scalar_properties::_simple_scalar_properties_output::SimpleScalarPropertiesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::simple_scalar_properties::_simple_scalar_properties_input::SimpleScalarPropertiesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
    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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.simple_scalar_properties();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `SimpleScalarProperties`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `SimpleScalarProperties`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct SimpleScalarPropertiesFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder,
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   34     40   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   35     41   
    > for SimpleScalarPropertiesFluentBuilder
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   43     49   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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 SimpleScalarPropertiesFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `SimpleScalarPropertiesFluentBuilder`.
   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 SimpleScalarProperties as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
   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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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::simple_scalar_properties::SimpleScalarProperties::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::simple_scalar_properties::SimpleScalarProperties::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::simple_scalar_properties::SimpleScalarPropertiesOutput,
   96    106   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   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 foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.foo(input.into());
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_foo(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_foo(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_foo()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn string_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  126    145   
        self.inner = self.inner.string_value(input.into());
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_string_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  131    152   
        self.inner = self.inner.set_string_value(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_string_value(&self) -> &::std::option::Option<::std::string::String> {
  136    159   
        self.inner.get_string_value()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn true_boolean_value(mut self, input: bool) -> Self {
  140    165   
        self.inner = self.inner.true_boolean_value(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_true_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
  145    172   
        self.inner = self.inner.set_true_boolean_value(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_true_boolean_value(&self) -> &::std::option::Option<bool> {
  150    179   
        self.inner.get_true_boolean_value()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn false_boolean_value(mut self, input: bool) -> Self {
  154    185   
        self.inner = self.inner.false_boolean_value(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_false_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
  159    192   
        self.inner = self.inner.set_false_boolean_value(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_false_boolean_value(&self) -> &::std::option::Option<bool> {
  164    199   
        self.inner.get_false_boolean_value()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:498 */
  166    202   
    #[allow(missing_docs)] // documentation missing in model
         203  +
                           /* FluentBuilderGenerator.kt:500 */
  167    204   
    pub fn byte_value(mut self, input: i8) -> Self {
  168    205   
        self.inner = self.inner.byte_value(input);
  169    206   
        self
  170    207   
    }
         208  +
    /* FluentBuilderGenerator.kt:498 */
  171    209   
    #[allow(missing_docs)] // documentation missing in model
         210  +
                           /* FluentBuilderGenerator.kt:500 */
  172    211   
    pub fn set_byte_value(mut self, input: ::std::option::Option<i8>) -> Self {
  173    212   
        self.inner = self.inner.set_byte_value(input);
  174    213   
        self
  175    214   
    }
         215  +
    /* FluentBuilderGenerator.kt:518 */
  176    216   
    #[allow(missing_docs)] // documentation missing in model
         217  +
                           /* FluentBuilderGenerator.kt:520 */
  177    218   
    pub fn get_byte_value(&self) -> &::std::option::Option<i8> {
  178    219   
        self.inner.get_byte_value()
  179    220   
    }
         221  +
    /* FluentBuilderGenerator.kt:498 */
  180    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* FluentBuilderGenerator.kt:500 */
  181    224   
    pub fn short_value(mut self, input: i16) -> Self {
  182    225   
        self.inner = self.inner.short_value(input);
  183    226   
        self
  184    227   
    }
         228  +
    /* FluentBuilderGenerator.kt:498 */
  185    229   
    #[allow(missing_docs)] // documentation missing in model
         230  +
                           /* FluentBuilderGenerator.kt:500 */
  186    231   
    pub fn set_short_value(mut self, input: ::std::option::Option<i16>) -> Self {
  187    232   
        self.inner = self.inner.set_short_value(input);
  188    233   
        self
  189    234   
    }
         235  +
    /* FluentBuilderGenerator.kt:518 */
  190    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* FluentBuilderGenerator.kt:520 */
  191    238   
    pub fn get_short_value(&self) -> &::std::option::Option<i16> {
  192    239   
        self.inner.get_short_value()
  193    240   
    }
         241  +
    /* FluentBuilderGenerator.kt:498 */
  194    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* FluentBuilderGenerator.kt:500 */
  195    244   
    pub fn integer_value(mut self, input: i32) -> Self {
  196    245   
        self.inner = self.inner.integer_value(input);
  197    246   
        self
  198    247   
    }
         248  +
    /* FluentBuilderGenerator.kt:498 */
  199    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* FluentBuilderGenerator.kt:500 */
  200    251   
    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
  201    252   
        self.inner = self.inner.set_integer_value(input);
  202    253   
        self
  203    254   
    }
         255  +
    /* FluentBuilderGenerator.kt:518 */
  204    256   
    #[allow(missing_docs)] // documentation missing in model
         257  +
                           /* FluentBuilderGenerator.kt:520 */
  205    258   
    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
  206    259   
        self.inner.get_integer_value()
  207    260   
    }
         261  +
    /* FluentBuilderGenerator.kt:498 */
  208    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* FluentBuilderGenerator.kt:500 */
  209    264   
    pub fn long_value(mut self, input: i64) -> Self {
  210    265   
        self.inner = self.inner.long_value(input);
  211    266   
        self
  212    267   
    }
         268  +
    /* FluentBuilderGenerator.kt:498 */
  213    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* FluentBuilderGenerator.kt:500 */
  214    271   
    pub fn set_long_value(mut self, input: ::std::option::Option<i64>) -> Self {
  215    272   
        self.inner = self.inner.set_long_value(input);
  216    273   
        self
  217    274   
    }
         275  +
    /* FluentBuilderGenerator.kt:518 */
  218    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* FluentBuilderGenerator.kt:520 */
  219    278   
    pub fn get_long_value(&self) -> &::std::option::Option<i64> {
  220    279   
        self.inner.get_long_value()
  221    280   
    }
         281  +
    /* FluentBuilderGenerator.kt:498 */
  222    282   
    #[allow(missing_docs)] // documentation missing in model
         283  +
                           /* FluentBuilderGenerator.kt:500 */
  223    284   
    pub fn float_value(mut self, input: f32) -> Self {
  224    285   
        self.inner = self.inner.float_value(input);
  225    286   
        self
  226    287   
    }
         288  +
    /* FluentBuilderGenerator.kt:498 */
  227    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* FluentBuilderGenerator.kt:500 */
  228    291   
    pub fn set_float_value(mut self, input: ::std::option::Option<f32>) -> Self {
  229    292   
        self.inner = self.inner.set_float_value(input);
  230    293   
        self
  231    294   
    }
         295  +
    /* FluentBuilderGenerator.kt:518 */
  232    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* FluentBuilderGenerator.kt:520 */
  233    298   
    pub fn get_float_value(&self) -> &::std::option::Option<f32> {
  234    299   
        self.inner.get_float_value()
  235    300   
    }
         301  +
    /* FluentBuilderGenerator.kt:498 */
  236    302   
    #[allow(missing_docs)] // documentation missing in model
         303  +
                           /* FluentBuilderGenerator.kt:500 */
  237    304   
    pub fn double_value(mut self, input: f64) -> Self {
  238    305   
        self.inner = self.inner.double_value(input);
  239    306   
        self
  240    307   
    }
         308  +
    /* FluentBuilderGenerator.kt:498 */
  241    309   
    #[allow(missing_docs)] // documentation missing in model
         310  +
                           /* FluentBuilderGenerator.kt:500 */
  242    311   
    pub fn set_double_value(mut self, input: ::std::option::Option<f64>) -> Self {
  243    312   
        self.inner = self.inner.set_double_value(input);
  244    313   
        self
  245    314   
    }
         315  +
    /* FluentBuilderGenerator.kt:518 */
  246    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* FluentBuilderGenerator.kt:520 */
  247    318   
    pub fn get_double_value(&self) -> &::std::option::Option<f64> {
  248    319   
        self.inner.get_double_value()
  249    320   
    }
         321  +
    /* FluentBuilderGenerator.kt:282 */
  250    322   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/sparse_json_lists.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 `SparseJsonLists`.
           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 SparseJsonLists;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl SparseJsonLists {
    7         -
    /// Creates a new `SparseJsonLists`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `SparseJsonLists`
          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::sparse_json_lists::SparseJsonListsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::sparse_json_lists::SparseJsonListsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::sparse_json_lists::SparseJsonListsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +269,286 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for SparseJsonLists {
   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("SparseJsonLists");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            SparseJsonListsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            SparseJsonListsResponseDeserializer,
  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   
            "SparseJsonLists",
  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("SparseJsonLists")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(SparseJsonListsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::sparse_json_lists::SparseJsonListsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::sparse_json_lists::SparseJsonListsError,
  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 SparseJsonListsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SparseJsonListsResponseDeserializer {
  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_sparse_json_lists::de_sparse_json_lists_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_sparse_json_lists::de_sparse_json_lists_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 SparseJsonListsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SparseJsonListsRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::sparse_json_lists::SparseJsonListsInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::sparse_json_lists::SparseJsonListsInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/SparseJsonLists").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::sparse_json_lists::SparseJsonListsInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_sparse_json_lists::ser_sparse_json_lists_input(&input)?);
  196    209   
        if let Some(content_length) = body.content_length() {
  197    210   
            let content_length = content_length.to_string();
  198    211   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  199    212   
        }
  200    213   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  201    214   
    }
  202    215   
}
         216  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  203    217   
#[derive(Debug)]
  204    218   
struct SparseJsonListsEndpointParamsInterceptor;
  205    219   
  206    220   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SparseJsonListsEndpointParamsInterceptor {
  207    221   
    fn name(&self) -> &'static str {
  208    222   
        "SparseJsonListsEndpointParamsInterceptor"
  209    223   
    }
  210    224   
  211    225   
    fn read_before_execution(
  212    226   
        &self,
  213    227   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  214    228   
            '_,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  218    232   
        >,
  219    233   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    234   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    235   
        let _input = context
  222    236   
            .input()
  223    237   
            .downcast_ref::<SparseJsonListsInput>()
  224    238   
            .ok_or("failed to downcast to SparseJsonListsInput")?;
  225    239   
  226    240   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    241   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    242   
        })?;
  229    243   
        cfg.interceptor_state()
  230    244   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  231    245   
        ::std::result::Result::Ok(())
  232    246   
    }
  233    247   
}
  234    248   
  235    249   
// The get_* functions below are generated from JMESPath expressions in the
  236    250   
// operationContextParams trait. They target the operation's input shape.
  237    251   
         252  +
/* RustType.kt:516 */
  238    253   
#[allow(unreachable_code, unused_variables)]
         254  +
/* RustType.kt:516 */
  239    255   
#[cfg(test)]
         256  +
/* ProtocolTestGenerator.kt:98 */
  240    257   
mod sparse_json_lists_test {
  241    258   
  242    259   
    /// Serializes null values in sparse lists
  243    260   
    /// Test ID: RestJsonSparseListsSerializeNull
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
  246    263   
    async fn rest_json_sparse_lists_serialize_null_request() {
  247    264   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  248    265   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  249    266   
@@ -303,320 +432,508 @@
  323    340   
            parsed.sparse_string_list,
  324    341   
            expected_output.sparse_string_list,
  325    342   
            "Unexpected value for `sparse_string_list`"
  326    343   
        );
  327    344   
        ::pretty_assertions::assert_eq!(
  328    345   
            parsed.sparse_short_list,
  329    346   
            expected_output.sparse_short_list,
  330    347   
            "Unexpected value for `sparse_short_list`"
  331    348   
        );
  332    349   
    }
         350  +
         351  +
    /* ProtocolTestGenerator.kt:98 */
  333    352   
}
  334    353   
         354  +
/* OperationErrorGenerator.kt:79 */
  335    355   
/// Error type for the `SparseJsonListsError` operation.
         356  +
/* RustType.kt:516 */
  336    357   
#[non_exhaustive]
         358  +
/* RustType.kt:516 */
  337    359   
#[derive(::std::fmt::Debug)]
  338         -
pub enum SparseJsonListsError {
         360  +
pub /* OperationErrorGenerator.kt:81 */ enum SparseJsonListsError {
         361  +
    /* OperationErrorGenerator.kt:88 */
  339    362   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  340    363   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  341    364   
    variable wildcard pattern and check `.code()`:
  342    365   
     \
  343    366   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  344    367   
     \
  345    368   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SparseJsonListsError) for what information is available for the error.")]
  346    369   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         370  +
    /* OperationErrorGenerator.kt:81 */
  347    371   
}
         372  +
/* OperationErrorGenerator.kt:218 */
  348    373   
impl SparseJsonListsError {
         374  +
    /* OperationErrorGenerator.kt:219 */
  349    375   
    /// Creates the `SparseJsonListsError::Unhandled` variant from any error type.
  350    376   
    pub fn unhandled(
  351    377   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  352    378   
    ) -> Self {
  353    379   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  354    380   
            source: err.into(),
  355    381   
            meta: ::std::default::Default::default(),
  356    382   
        })
  357    383   
    }
  358    384   
  359    385   
    /// Creates the `SparseJsonListsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  360    386   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  361    387   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  362    388   
            source: err.clone().into(),
  363    389   
            meta: err,
  364    390   
        })
  365    391   
    }
  366         -
    ///
         392  +
    /// /* OperationErrorGenerator.kt:236 */
  367    393   
    /// Returns error metadata, which includes the error code, message,
  368    394   
    /// request ID, and potentially additional information.
  369    395   
    ///
         396  +
    /* OperationErrorGenerator.kt:242 */
  370    397   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         398  +
        /* OperationErrorGenerator.kt:243 */
  371    399   
        match self {
  372         -
            Self::Unhandled(e) => &e.meta,
         400  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         401  +
            /* OperationErrorGenerator.kt:243 */
  373    402   
        }
         403  +
        /* OperationErrorGenerator.kt:242 */
  374    404   
    }
         405  +
    /* OperationErrorGenerator.kt:218 */
  375    406   
}
         407  +
/* OperationErrorGenerator.kt:269 */
  376    408   
impl ::std::error::Error for SparseJsonListsError {
         409  +
    /* OperationErrorGenerator.kt:270 */
  377    410   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         411  +
        /* OperationErrorGenerator.kt:318 */
  378    412   
        match self {
  379         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         413  +
            /* OperationErrorGenerator.kt:326 */
         414  +
            Self::Unhandled(_inner) => {
         415  +
                /* OperationErrorGenerator.kt:279 */
         416  +
                ::std::option::Option::Some(&*_inner.source)
         417  +
                /* OperationErrorGenerator.kt:326 */
         418  +
            } /* OperationErrorGenerator.kt:318 */
  380    419   
        }
         420  +
        /* OperationErrorGenerator.kt:270 */
  381    421   
    }
         422  +
    /* OperationErrorGenerator.kt:269 */
  382    423   
}
         424  +
/* OperationErrorGenerator.kt:133 */
  383    425   
impl ::std::fmt::Display for SparseJsonListsError {
         426  +
    /* OperationErrorGenerator.kt:134 */
  384    427   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         428  +
        /* OperationErrorGenerator.kt:318 */
  385    429   
        match self {
         430  +
            /* OperationErrorGenerator.kt:326 */
  386    431   
            Self::Unhandled(_inner) => {
         432  +
                /* OperationErrorGenerator.kt:139 */
  387    433   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  388    434   
                    write!(f, "unhandled error ({code})")
  389    435   
                } else {
  390    436   
                    f.write_str("unhandled error")
  391    437   
                }
  392         -
            }
         438  +
                /* OperationErrorGenerator.kt:326 */
         439  +
            } /* OperationErrorGenerator.kt:318 */
  393    440   
        }
         441  +
        /* OperationErrorGenerator.kt:134 */
  394    442   
    }
         443  +
    /* OperationErrorGenerator.kt:133 */
  395    444   
}
         445  +
/* OperationErrorGenerator.kt:182 */
  396    446   
impl ::aws_smithy_types::retry::ProvideErrorKind for SparseJsonListsError {
         447  +
    /* OperationErrorGenerator.kt:186 */
  397    448   
    fn code(&self) -> ::std::option::Option<&str> {
         449  +
        /* OperationErrorGenerator.kt:187 */
  398    450   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         451  +
        /* OperationErrorGenerator.kt:186 */
  399    452   
    }
         453  +
    /* OperationErrorGenerator.kt:190 */
  400    454   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         455  +
        /* OperationErrorGenerator.kt:197 */
  401    456   
        ::std::option::Option::None
         457  +
        /* OperationErrorGenerator.kt:190 */
  402    458   
    }
         459  +
    /* OperationErrorGenerator.kt:182 */
  403    460   
}
         461  +
/* OperationErrorGenerator.kt:163 */
  404    462   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SparseJsonListsError {
         463  +
    /* OperationErrorGenerator.kt:164 */
  405    464   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         465  +
        /* OperationErrorGenerator.kt:318 */
  406    466   
        match self {
  407         -
            Self::Unhandled(_inner) => &_inner.meta,
         467  +
            /* OperationErrorGenerator.kt:326 */
         468  +
            Self::Unhandled(_inner) => {
         469  +
                /* OperationErrorGenerator.kt:168 */
         470  +
                &_inner.meta
         471  +
                /* OperationErrorGenerator.kt:326 */
         472  +
            } /* OperationErrorGenerator.kt:318 */
  408    473   
        }
         474  +
        /* OperationErrorGenerator.kt:164 */
  409    475   
    }
         476  +
    /* OperationErrorGenerator.kt:163 */
  410    477   
}
         478  +
/* OperationErrorGenerator.kt:109 */
  411    479   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SparseJsonListsError {
         480  +
    /* OperationErrorGenerator.kt:110 */
  412    481   
    fn create_unhandled_error(
  413    482   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  414    483   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  415    484   
    ) -> Self {
         485  +
        /* OperationErrorGenerator.kt:121 */
  416    486   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  417    487   
            source,
  418    488   
            meta: meta.unwrap_or_default(),
  419    489   
        })
         490  +
        /* OperationErrorGenerator.kt:110 */
  420    491   
    }
         492  +
    /* OperationErrorGenerator.kt:109 */
  421    493   
}
  422    494   
         495  +
/* CodegenDelegator.kt:255 */
  423    496   
pub use crate::operation::sparse_json_lists::_sparse_json_lists_output::SparseJsonListsOutput;
  424    497   
         498  +
/* CodegenDelegator.kt:255 */
  425    499   
pub use crate::operation::sparse_json_lists::_sparse_json_lists_input::SparseJsonListsInput;
  426    500   
         501  +
/* RustModule.kt:172 */
  427    502   
mod _sparse_json_lists_input;
  428    503   
         504  +
/* RustModule.kt:172 */
  429    505   
mod _sparse_json_lists_output;
  430    506   
  431         -
/// Builders
         507  +
/// /* CodegenDelegator.kt:51 */Builders
  432    508   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/sparse_json_lists/_sparse_json_lists_input.rs

@@ -1,1 +87,156 @@
    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 SparseJsonListsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct SparseJsonListsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub sparse_string_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub sparse_short_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl SparseJsonListsInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
   13         -
    ///
   14         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sparse_string_list.is_none()`.
          21  +
    /// /* StructureGenerator.kt:162 */
          22  +
    /// /* 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 `.sparse_string_list.is_none()`.
          23  +
    /* StructureGenerator.kt:166 */
   15     24   
    pub fn sparse_string_list(&self) -> &[::std::option::Option<::std::string::String>] {
   16         -
        self.sparse_string_list.as_deref().unwrap_or_default()
          25  +
        /* StructureGenerator.kt:169 */
          26  +
        self.sparse_string_list
          27  +
            .as_deref()
          28  +
            /* StructureGenerator.kt:175 */
          29  +
            .unwrap_or_default()
          30  +
        /* StructureGenerator.kt:166 */
   17     31   
    }
          32  +
    /* StructureGenerator.kt:231 */
   18     33   
    #[allow(missing_docs)] // documentation missing in model
   19         -
    ///
   20         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sparse_short_list.is_none()`.
          34  +
    /// /* StructureGenerator.kt:162 */
          35  +
    /// /* 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 `.sparse_short_list.is_none()`.
          36  +
    /* StructureGenerator.kt:166 */
   21     37   
    pub fn sparse_short_list(&self) -> &[::std::option::Option<i16>] {
   22         -
        self.sparse_short_list.as_deref().unwrap_or_default()
          38  +
        /* StructureGenerator.kt:169 */
          39  +
        self.sparse_short_list
          40  +
            .as_deref()
          41  +
            /* StructureGenerator.kt:175 */
          42  +
            .unwrap_or_default()
          43  +
        /* StructureGenerator.kt:166 */
   23     44   
    }
          45  +
    /* StructureGenerator.kt:135 */
   24     46   
}
          47  +
/* ClientCodegenVisitor.kt:237 */
   25     48   
impl SparseJsonListsInput {
   26         -
    /// Creates a new builder-style object to manufacture [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
          49  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
          50  +
    /* BuilderGenerator.kt:175 */
   27     51   
    pub fn builder() -> crate::operation::sparse_json_lists::builders::SparseJsonListsInputBuilder {
          52  +
        /* BuilderGenerator.kt:176 */
   28     53   
        crate::operation::sparse_json_lists::builders::SparseJsonListsInputBuilder::default()
          54  +
        /* BuilderGenerator.kt:175 */
   29     55   
    }
          56  +
    /* ClientCodegenVisitor.kt:237 */
   30     57   
}
   31     58   
   32         -
/// A builder for [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
          59  +
/// /* BuilderGenerator.kt:342 */A builder for [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
          60  +
/* RustType.kt:516 */
   33     61   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          62  +
/* RustType.kt:516 */
   34     63   
#[non_exhaustive]
          64  +
/* BuilderGenerator.kt:345 */
   35     65   
pub struct SparseJsonListsInputBuilder {
          66  +
    /* BuilderGenerator.kt:275 */
   36     67   
    pub(crate) sparse_string_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
          68  +
    /* BuilderGenerator.kt:275 */
   37     69   
    pub(crate) sparse_short_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>,
          70  +
    /* BuilderGenerator.kt:345 */
   38     71   
}
          72  +
/* BuilderGenerator.kt:355 */
   39     73   
impl SparseJsonListsInputBuilder {
   40         -
    /// Appends an item to `sparse_string_list`.
          74  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `sparse_string_list`.
          75  +
    /* BuilderGenerator.kt:411 */
   41     76   
    ///
   42         -
    /// To override the contents of this collection use [`set_sparse_string_list`](Self::set_sparse_string_list).
          77  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_sparse_string_list`](Self::set_sparse_string_list).
          78  +
    /* BuilderGenerator.kt:413 */
   43     79   
    ///
          80  +
    /* BuilderGenerator.kt:418 */
   44     81   
    pub fn sparse_string_list(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          82  +
        /* BuilderGenerator.kt:419 */
   45     83   
        let mut v = self.sparse_string_list.unwrap_or_default();
   46     84   
        v.push(input);
   47     85   
        self.sparse_string_list = ::std::option::Option::Some(v);
   48     86   
        self
          87  +
        /* BuilderGenerator.kt:418 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:312 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:314 */
   51     92   
    pub fn set_sparse_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>) -> Self {
          93  +
        /* BuilderGenerator.kt:315 */
   52     94   
        self.sparse_string_list = input;
   53     95   
        self
          96  +
        /* BuilderGenerator.kt:314 */
   54     97   
    }
          98  +
    /* BuilderGenerator.kt:334 */
   55     99   
    #[allow(missing_docs)] // documentation missing in model
         100  +
                           /* BuilderGenerator.kt:336 */
   56    101   
    pub fn get_sparse_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>> {
         102  +
        /* BuilderGenerator.kt:337 */
   57    103   
        &self.sparse_string_list
         104  +
        /* BuilderGenerator.kt:336 */
   58    105   
    }
   59         -
    /// Appends an item to `sparse_short_list`.
         106  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `sparse_short_list`.
         107  +
    /* BuilderGenerator.kt:411 */
   60    108   
    ///
   61         -
    /// To override the contents of this collection use [`set_sparse_short_list`](Self::set_sparse_short_list).
         109  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_sparse_short_list`](Self::set_sparse_short_list).
         110  +
    /* BuilderGenerator.kt:413 */
   62    111   
    ///
         112  +
    /* BuilderGenerator.kt:418 */
   63    113   
    pub fn sparse_short_list(mut self, input: ::std::option::Option<i16>) -> Self {
         114  +
        /* BuilderGenerator.kt:419 */
   64    115   
        let mut v = self.sparse_short_list.unwrap_or_default();
   65    116   
        v.push(input);
   66    117   
        self.sparse_short_list = ::std::option::Option::Some(v);
   67    118   
        self
         119  +
        /* BuilderGenerator.kt:418 */
   68    120   
    }
         121  +
    /* BuilderGenerator.kt:312 */
   69    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* BuilderGenerator.kt:314 */
   70    124   
    pub fn set_sparse_short_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>) -> Self {
         125  +
        /* BuilderGenerator.kt:315 */
   71    126   
        self.sparse_short_list = input;
   72    127   
        self
         128  +
        /* BuilderGenerator.kt:314 */
   73    129   
    }
         130  +
    /* BuilderGenerator.kt:334 */
   74    131   
    #[allow(missing_docs)] // documentation missing in model
         132  +
                           /* BuilderGenerator.kt:336 */
   75    133   
    pub fn get_sparse_short_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>> {
         134  +
        /* BuilderGenerator.kt:337 */
   76    135   
        &self.sparse_short_list
         136  +
        /* BuilderGenerator.kt:336 */
   77    137   
    }
   78         -
    /// Consumes the builder and constructs a [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
         138  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`SparseJsonListsInput`](crate::operation::sparse_json_lists::SparseJsonListsInput).
         139  +
    /* BuilderGenerator.kt:253 */
   79    140   
    pub fn build(
   80    141   
        self,
   81    142   
    ) -> ::std::result::Result<crate::operation::sparse_json_lists::SparseJsonListsInput, ::aws_smithy_types::error::operation::BuildError> {
   82         -
        ::std::result::Result::Ok(crate::operation::sparse_json_lists::SparseJsonListsInput {
   83         -
            sparse_string_list: self.sparse_string_list,
   84         -
            sparse_short_list: self.sparse_short_list,
   85         -
        })
         143  +
        /* BuilderGenerator.kt:254 */
         144  +
        ::std::result::Result::Ok(
         145  +
            /* BuilderGenerator.kt:477 */
         146  +
            crate::operation::sparse_json_lists::SparseJsonListsInput {
         147  +
                /* BuilderGenerator.kt:481 */ sparse_string_list: self.sparse_string_list,
         148  +
                /* BuilderGenerator.kt:481 */
         149  +
                sparse_short_list: self.sparse_short_list,
         150  +
                /* BuilderGenerator.kt:477 */
         151  +
            }, /* BuilderGenerator.kt:254 */
         152  +
        )
         153  +
        /* BuilderGenerator.kt:253 */
   86    154   
    }
         155  +
    /* BuilderGenerator.kt:355 */
   87    156   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/sparse_json_lists/_sparse_json_lists_output.rs

@@ -1,1 +85,151 @@
    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 SparseJsonListsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct SparseJsonListsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub sparse_string_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub sparse_short_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl SparseJsonListsOutput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
   13         -
    ///
   14         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sparse_string_list.is_none()`.
          21  +
    /// /* StructureGenerator.kt:162 */
          22  +
    /// /* 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 `.sparse_string_list.is_none()`.
          23  +
    /* StructureGenerator.kt:166 */
   15     24   
    pub fn sparse_string_list(&self) -> &[::std::option::Option<::std::string::String>] {
   16         -
        self.sparse_string_list.as_deref().unwrap_or_default()
          25  +
        /* StructureGenerator.kt:169 */
          26  +
        self.sparse_string_list
          27  +
            .as_deref()
          28  +
            /* StructureGenerator.kt:175 */
          29  +
            .unwrap_or_default()
          30  +
        /* StructureGenerator.kt:166 */
   17     31   
    }
          32  +
    /* StructureGenerator.kt:231 */
   18     33   
    #[allow(missing_docs)] // documentation missing in model
   19         -
    ///
   20         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sparse_short_list.is_none()`.
          34  +
    /// /* StructureGenerator.kt:162 */
          35  +
    /// /* 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 `.sparse_short_list.is_none()`.
          36  +
    /* StructureGenerator.kt:166 */
   21     37   
    pub fn sparse_short_list(&self) -> &[::std::option::Option<i16>] {
   22         -
        self.sparse_short_list.as_deref().unwrap_or_default()
          38  +
        /* StructureGenerator.kt:169 */
          39  +
        self.sparse_short_list
          40  +
            .as_deref()
          41  +
            /* StructureGenerator.kt:175 */
          42  +
            .unwrap_or_default()
          43  +
        /* StructureGenerator.kt:166 */
   23     44   
    }
          45  +
    /* StructureGenerator.kt:135 */
   24     46   
}
          47  +
/* ClientCodegenVisitor.kt:237 */
   25     48   
impl SparseJsonListsOutput {
   26         -
    /// Creates a new builder-style object to manufacture [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
          49  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
          50  +
    /* BuilderGenerator.kt:175 */
   27     51   
    pub fn builder() -> crate::operation::sparse_json_lists::builders::SparseJsonListsOutputBuilder {
          52  +
        /* BuilderGenerator.kt:176 */
   28     53   
        crate::operation::sparse_json_lists::builders::SparseJsonListsOutputBuilder::default()
          54  +
        /* BuilderGenerator.kt:175 */
   29     55   
    }
          56  +
    /* ClientCodegenVisitor.kt:237 */
   30     57   
}
   31     58   
   32         -
/// A builder for [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
          59  +
/// /* BuilderGenerator.kt:342 */A builder for [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
          60  +
/* RustType.kt:516 */
   33     61   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          62  +
/* RustType.kt:516 */
   34     63   
#[non_exhaustive]
          64  +
/* BuilderGenerator.kt:345 */
   35     65   
pub struct SparseJsonListsOutputBuilder {
          66  +
    /* BuilderGenerator.kt:275 */
   36     67   
    pub(crate) sparse_string_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
          68  +
    /* BuilderGenerator.kt:275 */
   37     69   
    pub(crate) sparse_short_list: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>,
          70  +
    /* BuilderGenerator.kt:345 */
   38     71   
}
          72  +
/* BuilderGenerator.kt:355 */
   39     73   
impl SparseJsonListsOutputBuilder {
   40         -
    /// Appends an item to `sparse_string_list`.
          74  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `sparse_string_list`.
          75  +
    /* BuilderGenerator.kt:411 */
   41     76   
    ///
   42         -
    /// To override the contents of this collection use [`set_sparse_string_list`](Self::set_sparse_string_list).
          77  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_sparse_string_list`](Self::set_sparse_string_list).
          78  +
    /* BuilderGenerator.kt:413 */
   43     79   
    ///
          80  +
    /* BuilderGenerator.kt:418 */
   44     81   
    pub fn sparse_string_list(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          82  +
        /* BuilderGenerator.kt:419 */
   45     83   
        let mut v = self.sparse_string_list.unwrap_or_default();
   46     84   
        v.push(input);
   47     85   
        self.sparse_string_list = ::std::option::Option::Some(v);
   48     86   
        self
          87  +
        /* BuilderGenerator.kt:418 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:312 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:314 */
   51     92   
    pub fn set_sparse_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>) -> Self {
          93  +
        /* BuilderGenerator.kt:315 */
   52     94   
        self.sparse_string_list = input;
   53     95   
        self
          96  +
        /* BuilderGenerator.kt:314 */
   54     97   
    }
          98  +
    /* BuilderGenerator.kt:334 */
   55     99   
    #[allow(missing_docs)] // documentation missing in model
         100  +
                           /* BuilderGenerator.kt:336 */
   56    101   
    pub fn get_sparse_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>> {
         102  +
        /* BuilderGenerator.kt:337 */
   57    103   
        &self.sparse_string_list
         104  +
        /* BuilderGenerator.kt:336 */
   58    105   
    }
   59         -
    /// Appends an item to `sparse_short_list`.
         106  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `sparse_short_list`.
         107  +
    /* BuilderGenerator.kt:411 */
   60    108   
    ///
   61         -
    /// To override the contents of this collection use [`set_sparse_short_list`](Self::set_sparse_short_list).
         109  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_sparse_short_list`](Self::set_sparse_short_list).
         110  +
    /* BuilderGenerator.kt:413 */
   62    111   
    ///
         112  +
    /* BuilderGenerator.kt:418 */
   63    113   
    pub fn sparse_short_list(mut self, input: ::std::option::Option<i16>) -> Self {
         114  +
        /* BuilderGenerator.kt:419 */
   64    115   
        let mut v = self.sparse_short_list.unwrap_or_default();
   65    116   
        v.push(input);
   66    117   
        self.sparse_short_list = ::std::option::Option::Some(v);
   67    118   
        self
         119  +
        /* BuilderGenerator.kt:418 */
   68    120   
    }
         121  +
    /* BuilderGenerator.kt:312 */
   69    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* BuilderGenerator.kt:314 */
   70    124   
    pub fn set_sparse_short_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>) -> Self {
         125  +
        /* BuilderGenerator.kt:315 */
   71    126   
        self.sparse_short_list = input;
   72    127   
        self
         128  +
        /* BuilderGenerator.kt:314 */
   73    129   
    }
         130  +
    /* BuilderGenerator.kt:334 */
   74    131   
    #[allow(missing_docs)] // documentation missing in model
         132  +
                           /* BuilderGenerator.kt:336 */
   75    133   
    pub fn get_sparse_short_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>> {
         134  +
        /* BuilderGenerator.kt:337 */
   76    135   
        &self.sparse_short_list
         136  +
        /* BuilderGenerator.kt:336 */
   77    137   
    }
   78         -
    /// Consumes the builder and constructs a [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
         138  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`SparseJsonListsOutput`](crate::operation::sparse_json_lists::SparseJsonListsOutput).
         139  +
    /* BuilderGenerator.kt:253 */
   79    140   
    pub fn build(self) -> crate::operation::sparse_json_lists::SparseJsonListsOutput {
         141  +
        /* BuilderGenerator.kt:477 */
   80    142   
        crate::operation::sparse_json_lists::SparseJsonListsOutput {
   81         -
            sparse_string_list: self.sparse_string_list,
         143  +
            /* BuilderGenerator.kt:481 */ sparse_string_list: self.sparse_string_list,
         144  +
            /* BuilderGenerator.kt:481 */
   82    145   
            sparse_short_list: self.sparse_short_list,
         146  +
            /* BuilderGenerator.kt:477 */
   83    147   
        }
         148  +
        /* BuilderGenerator.kt:253 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:355 */
   85    151   
}

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

@@ -1,1 +148,172 @@
    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::sparse_json_lists::_sparse_json_lists_output::SparseJsonListsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::sparse_json_lists::_sparse_json_lists_input::SparseJsonListsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::sparse_json_lists::builders::SparseJsonListsInputBuilder {
    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::sparse_json_lists::SparseJsonListsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::sparse_json_lists::SparseJsonListsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.sparse_json_lists();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `SparseJsonLists`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `SparseJsonLists`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct SparseJsonListsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::sparse_json_lists::builders::SparseJsonListsInputBuilder,
   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::sparse_json_lists::SparseJsonListsOutput,
   34     40   
        crate::operation::sparse_json_lists::SparseJsonListsError,
   35     41   
    > for SparseJsonListsFluentBuilder
   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::sparse_json_lists::SparseJsonListsOutput,
   43     49   
            crate::operation::sparse_json_lists::SparseJsonListsError,
   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 SparseJsonListsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `SparseJsonListsFluentBuilder`.
   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 SparseJsonLists as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::sparse_json_lists::builders::SparseJsonListsInputBuilder {
   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::sparse_json_lists::SparseJsonListsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::sparse_json_lists::SparseJsonListsError,
   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::sparse_json_lists::SparseJsonLists::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::sparse_json_lists::SparseJsonLists::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::sparse_json_lists::SparseJsonListsOutput,
   96    106   
        crate::operation::sparse_json_lists::SparseJsonListsError,
   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 `sparseStringList`.
  112    123   
    ///
  113    124   
    /// To override the contents of this collection use [`set_sparse_string_list`](Self::set_sparse_string_list).
  114    125   
    ///
         126  +
    /* FluentBuilderGenerator.kt:443 */
  115    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:446 */
  116    129   
    pub fn sparse_string_list(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    130   
        self.inner = self.inner.sparse_string_list(input);
  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_sparse_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>) -> Self {
  122    137   
        self.inner = self.inner.set_sparse_string_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_sparse_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>> {
  127    144   
        self.inner.get_sparse_string_list()
  128    145   
    }
  129         -
    ///
         146  +
    /// /* FluentBuilderGenerator.kt:436 */
  130    147   
    /// Appends an item to `sparseShortList`.
  131    148   
    ///
  132    149   
    /// To override the contents of this collection use [`set_sparse_short_list`](Self::set_sparse_short_list).
  133    150   
    ///
         151  +
    /* FluentBuilderGenerator.kt:443 */
  134    152   
    #[allow(missing_docs)] // documentation missing in model
         153  +
                           /* FluentBuilderGenerator.kt:446 */
  135    154   
    pub fn sparse_short_list(mut self, input: ::std::option::Option<i16>) -> Self {
  136    155   
        self.inner = self.inner.sparse_short_list(input);
  137    156   
        self
  138    157   
    }
         158  +
    /* FluentBuilderGenerator.kt:498 */
  139    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* FluentBuilderGenerator.kt:500 */
  140    161   
    pub fn set_sparse_short_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>>) -> Self {
  141    162   
        self.inner = self.inner.set_sparse_short_list(input);
  142    163   
        self
  143    164   
    }
         165  +
    /* FluentBuilderGenerator.kt:518 */
  144    166   
    #[allow(missing_docs)] // documentation missing in model
         167  +
                           /* FluentBuilderGenerator.kt:520 */
  145    168   
    pub fn get_sparse_short_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<i16>>> {
  146    169   
        self.inner.get_sparse_short_list()
  147    170   
    }
         171  +
    /* FluentBuilderGenerator.kt:282 */
  148    172   
}