Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +166,202 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::operation_with_defaults::_operation_with_defaults_output::OperationWithDefaultsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::operation_with_defaults::_operation_with_defaults_input::OperationWithDefaultsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.operation_with_defaults();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `OperationWithDefaults`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `OperationWithDefaults`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct OperationWithDefaultsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl
   32     38   
    crate::client::customize::internal::CustomizableSend<
   33     39   
        crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   34     40   
        crate::operation::operation_with_defaults::OperationWithDefaultsError,
   35     41   
    > for OperationWithDefaultsFluentBuilder
   36     42   
{
   37     43   
    fn send(
   38     44   
        self,
   39     45   
        config_override: crate::config::Builder,
   40     46   
    ) -> crate::client::customize::internal::BoxFuture<
   41     47   
        crate::client::customize::internal::SendResult<
   42     48   
            crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   43     49   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   44     50   
        >,
   45     51   
    > {
   46     52   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   47     53   
    }
   48     54   
}
          55  +
/* FluentBuilderGenerator.kt:282 */
   49     56   
impl OperationWithDefaultsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `OperationWithDefaultsFluentBuilder`.
   51     59   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   52     60   
        Self {
   53     61   
            handle,
   54     62   
            inner: ::std::default::Default::default(),
   55     63   
            config_override: ::std::option::Option::None,
   56     64   
        }
   57     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:301 */
   58     67   
    /// Access the OperationWithDefaults as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::operation_with_defaults::builders::OperationWithDefaultsInputBuilder {
   60     69   
        &self.inner
   61     70   
    }
          71  +
    /* FluentBuilderGenerator.kt:145 */
   62     72   
    /// Sends the request and returns the response.
   63     73   
    ///
   64     74   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     75   
    /// can be matched against.
   66     76   
    ///
   67     77   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     78   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     79   
    /// set when configuring the client.
   70     80   
    pub async fn send(
   71     81   
        self,
   72     82   
    ) -> ::std::result::Result<
   73     83   
        crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::operation_with_defaults::OperationWithDefaultsError,
   76     86   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     87   
        >,
   78     88   
    > {
   79     89   
        let input = self
   80     90   
            .inner
   81     91   
            .build()
   82     92   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83     93   
        let runtime_plugins = crate::operation::operation_with_defaults::OperationWithDefaults::operation_runtime_plugins(
   84     94   
            self.handle.runtime_plugins.clone(),
   85     95   
            &self.handle.conf,
   86     96   
            self.config_override,
   87     97   
        );
   88     98   
        crate::operation::operation_with_defaults::OperationWithDefaults::orchestrate(&runtime_plugins, input).await
   89     99   
    }
   90    100   
   91    101   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92    102   
    pub fn customize(
   93    103   
        self,
   94    104   
    ) -> crate::client::customize::CustomizableOperation<
   95    105   
        crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
   96    106   
        crate::operation::operation_with_defaults::OperationWithDefaultsError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
         121  +
    /* FluentBuilderGenerator.kt:498 */
  110    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* FluentBuilderGenerator.kt:500 */
  111    124   
    pub fn defaults(mut self, input: crate::types::Defaults) -> Self {
  112    125   
        self.inner = self.inner.defaults(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_defaults(mut self, input: ::std::option::Option<crate::types::Defaults>) -> Self {
  117    132   
        self.inner = self.inner.set_defaults(input);
  118    133   
        self
  119    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:518 */
  120    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:520 */
  121    138   
    pub fn get_defaults(&self) -> &::std::option::Option<crate::types::Defaults> {
  122    139   
        self.inner.get_defaults()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn client_optional_defaults(mut self, input: crate::types::ClientOptionalDefaults) -> Self {
  126    145   
        self.inner = self.inner.client_optional_defaults(input);
  127    146   
        self
  128    147   
    }
         148  +
    /* FluentBuilderGenerator.kt:498 */
  129    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* FluentBuilderGenerator.kt:500 */
  130    151   
    pub fn set_client_optional_defaults(mut self, input: ::std::option::Option<crate::types::ClientOptionalDefaults>) -> Self {
  131    152   
        self.inner = self.inner.set_client_optional_defaults(input);
  132    153   
        self
  133    154   
    }
         155  +
    /* FluentBuilderGenerator.kt:518 */
  134    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:520 */
  135    158   
    pub fn get_client_optional_defaults(&self) -> &::std::option::Option<crate::types::ClientOptionalDefaults> {
  136    159   
        self.inner.get_client_optional_defaults()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn top_level_default(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  140    165   
        self.inner = self.inner.top_level_default(input.into());
  141    166   
        self
  142    167   
    }
         168  +
    /* FluentBuilderGenerator.kt:498 */
  143    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* FluentBuilderGenerator.kt:500 */
  144    171   
    pub fn set_top_level_default(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  145    172   
        self.inner = self.inner.set_top_level_default(input);
  146    173   
        self
  147    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:518 */
  148    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:520 */
  149    178   
    pub fn get_top_level_default(&self) -> &::std::option::Option<::std::string::String> {
  150    179   
        self.inner.get_top_level_default()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn other_top_level_default(mut self, input: i32) -> Self {
  154    185   
        self.inner = self.inner.other_top_level_default(input);
  155    186   
        self
  156    187   
    }
         188  +
    /* FluentBuilderGenerator.kt:498 */
  157    189   
    #[allow(missing_docs)] // documentation missing in model
         190  +
                           /* FluentBuilderGenerator.kt:500 */
  158    191   
    pub fn set_other_top_level_default(mut self, input: ::std::option::Option<i32>) -> Self {
  159    192   
        self.inner = self.inner.set_other_top_level_default(input);
  160    193   
        self
  161    194   
    }
         195  +
    /* FluentBuilderGenerator.kt:518 */
  162    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* FluentBuilderGenerator.kt:520 */
  163    198   
    pub fn get_other_top_level_default(&self) -> &::std::option::Option<i32> {
  164    199   
        self.inner.get_other_top_level_default()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:282 */
  166    202   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/optional_input_output.rs

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `OptionalInputOutput`.
           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 OptionalInputOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl OptionalInputOutput {
    7         -
    /// Creates a new `OptionalInputOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `OptionalInputOutput`
          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::optional_input_output::OptionalInputOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::optional_input_output::OptionalInputOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::optional_input_output::OptionalInputOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +269,286 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for OptionalInputOutput {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("OptionalInputOutput");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            OptionalInputOutputRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            OptionalInputOutputResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "OptionalInputOutput",
  105    116   
            "RpcV2Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("OptionalInputOutput")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(OptionalInputOutputEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::optional_input_output::OptionalInputOutputError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::optional_input_output::OptionalInputOutputError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct OptionalInputOutputResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OptionalInputOutputResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_optional_input_output::de_optional_input_output_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_optional_input_output::de_optional_input_output_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct OptionalInputOutputRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OptionalInputOutputRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::optional_input_output::OptionalInputOutputInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::optional_input_output::OptionalInputOutputInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/service/RpcV2Protocol/operation/OptionalInputOutput").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::optional_input_output::OptionalInputOutputInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
  187    200   
            builder =
  188    201   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  189    202   
            builder =
  190    203   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  191    204   
            builder
  192    205   
        };
  193    206   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_optional_input_output::ser_optional_input_output_input(
  194    207   
            &input,
  195    208   
        )?);
  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 OptionalInputOutputEndpointParamsInterceptor;
  205    219   
  206    220   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OptionalInputOutputEndpointParamsInterceptor {
  207    221   
    fn name(&self) -> &'static str {
  208    222   
        "OptionalInputOutputEndpointParamsInterceptor"
  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::<OptionalInputOutputInput>()
  224    238   
            .ok_or("failed to downcast to OptionalInputOutputInput")?;
  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 optional_input_output_test {
  241    258   
  242    259   
    /// When input is empty we write CBOR equivalent of {}
  243    260   
    /// Test ID: optional_input
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
  246    263   
    async fn optional_input_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   
@@ -283,300 +412,488 @@
  303    320   
                )))
  304    321   
            });
  305    322   
            de.deserialize_nonstreaming(&http_response)
  306    323   
        });
  307    324   
        let parsed = parsed
  308    325   
            .expect("should be successful response")
  309    326   
            .downcast::<crate::operation::optional_input_output::OptionalInputOutputOutput>()
  310    327   
            .unwrap();
  311    328   
        ::pretty_assertions::assert_eq!(parsed.value, expected_output.value, "Unexpected value for `value`");
  312    329   
    }
         330  +
         331  +
    /* ProtocolTestGenerator.kt:98 */
  313    332   
}
  314    333   
         334  +
/* OperationErrorGenerator.kt:79 */
  315    335   
/// Error type for the `OptionalInputOutputError` operation.
         336  +
/* RustType.kt:516 */
  316    337   
#[non_exhaustive]
         338  +
/* RustType.kt:516 */
  317    339   
#[derive(::std::fmt::Debug)]
  318         -
pub enum OptionalInputOutputError {
         340  +
pub /* OperationErrorGenerator.kt:81 */ enum OptionalInputOutputError {
         341  +
    /* OperationErrorGenerator.kt:88 */
  319    342   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  320    343   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  321    344   
    variable wildcard pattern and check `.code()`:
  322    345   
     \
  323    346   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  324    347   
     \
  325    348   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-OptionalInputOutputError) for what information is available for the error.")]
  326    349   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         350  +
    /* OperationErrorGenerator.kt:81 */
  327    351   
}
         352  +
/* OperationErrorGenerator.kt:218 */
  328    353   
impl OptionalInputOutputError {
         354  +
    /* OperationErrorGenerator.kt:219 */
  329    355   
    /// Creates the `OptionalInputOutputError::Unhandled` variant from any error type.
  330    356   
    pub fn unhandled(
  331    357   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  332    358   
    ) -> Self {
  333    359   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  334    360   
            source: err.into(),
  335    361   
            meta: ::std::default::Default::default(),
  336    362   
        })
  337    363   
    }
  338    364   
  339    365   
    /// Creates the `OptionalInputOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  340    366   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  341    367   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  342    368   
            source: err.clone().into(),
  343    369   
            meta: err,
  344    370   
        })
  345    371   
    }
  346         -
    ///
         372  +
    /// /* OperationErrorGenerator.kt:236 */
  347    373   
    /// Returns error metadata, which includes the error code, message,
  348    374   
    /// request ID, and potentially additional information.
  349    375   
    ///
         376  +
    /* OperationErrorGenerator.kt:242 */
  350    377   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         378  +
        /* OperationErrorGenerator.kt:243 */
  351    379   
        match self {
  352         -
            Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         381  +
            /* OperationErrorGenerator.kt:243 */
  353    382   
        }
         383  +
        /* OperationErrorGenerator.kt:242 */
  354    384   
    }
         385  +
    /* OperationErrorGenerator.kt:218 */
  355    386   
}
         387  +
/* OperationErrorGenerator.kt:269 */
  356    388   
impl ::std::error::Error for OptionalInputOutputError {
         389  +
    /* OperationErrorGenerator.kt:270 */
  357    390   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         391  +
        /* OperationErrorGenerator.kt:318 */
  358    392   
        match self {
  359         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         393  +
            /* OperationErrorGenerator.kt:326 */
         394  +
            Self::Unhandled(_inner) => {
         395  +
                /* OperationErrorGenerator.kt:279 */
         396  +
                ::std::option::Option::Some(&*_inner.source)
         397  +
                /* OperationErrorGenerator.kt:326 */
         398  +
            } /* OperationErrorGenerator.kt:318 */
  360    399   
        }
         400  +
        /* OperationErrorGenerator.kt:270 */
  361    401   
    }
         402  +
    /* OperationErrorGenerator.kt:269 */
  362    403   
}
         404  +
/* OperationErrorGenerator.kt:133 */
  363    405   
impl ::std::fmt::Display for OptionalInputOutputError {
         406  +
    /* OperationErrorGenerator.kt:134 */
  364    407   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         408  +
        /* OperationErrorGenerator.kt:318 */
  365    409   
        match self {
         410  +
            /* OperationErrorGenerator.kt:326 */
  366    411   
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:139 */
  367    413   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  368    414   
                    write!(f, "unhandled error ({code})")
  369    415   
                } else {
  370    416   
                    f.write_str("unhandled error")
  371    417   
                }
  372         -
            }
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  373    420   
        }
         421  +
        /* OperationErrorGenerator.kt:134 */
  374    422   
    }
         423  +
    /* OperationErrorGenerator.kt:133 */
  375    424   
}
         425  +
/* OperationErrorGenerator.kt:182 */
  376    426   
impl ::aws_smithy_types::retry::ProvideErrorKind for OptionalInputOutputError {
         427  +
    /* OperationErrorGenerator.kt:186 */
  377    428   
    fn code(&self) -> ::std::option::Option<&str> {
         429  +
        /* OperationErrorGenerator.kt:187 */
  378    430   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         431  +
        /* OperationErrorGenerator.kt:186 */
  379    432   
    }
         433  +
    /* OperationErrorGenerator.kt:190 */
  380    434   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         435  +
        /* OperationErrorGenerator.kt:197 */
  381    436   
        ::std::option::Option::None
         437  +
        /* OperationErrorGenerator.kt:190 */
  382    438   
    }
         439  +
    /* OperationErrorGenerator.kt:182 */
  383    440   
}
         441  +
/* OperationErrorGenerator.kt:163 */
  384    442   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OptionalInputOutputError {
         443  +
    /* OperationErrorGenerator.kt:164 */
  385    444   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         445  +
        /* OperationErrorGenerator.kt:318 */
  386    446   
        match self {
  387         -
            Self::Unhandled(_inner) => &_inner.meta,
         447  +
            /* OperationErrorGenerator.kt:326 */
         448  +
            Self::Unhandled(_inner) => {
         449  +
                /* OperationErrorGenerator.kt:168 */
         450  +
                &_inner.meta
         451  +
                /* OperationErrorGenerator.kt:326 */
         452  +
            } /* OperationErrorGenerator.kt:318 */
  388    453   
        }
         454  +
        /* OperationErrorGenerator.kt:164 */
  389    455   
    }
         456  +
    /* OperationErrorGenerator.kt:163 */
  390    457   
}
         458  +
/* OperationErrorGenerator.kt:109 */
  391    459   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for OptionalInputOutputError {
         460  +
    /* OperationErrorGenerator.kt:110 */
  392    461   
    fn create_unhandled_error(
  393    462   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  394    463   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  395    464   
    ) -> Self {
         465  +
        /* OperationErrorGenerator.kt:121 */
  396    466   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  397    467   
            source,
  398    468   
            meta: meta.unwrap_or_default(),
  399    469   
        })
         470  +
        /* OperationErrorGenerator.kt:110 */
  400    471   
    }
         472  +
    /* OperationErrorGenerator.kt:109 */
  401    473   
}
  402    474   
         475  +
/* CodegenDelegator.kt:255 */
  403    476   
pub use crate::operation::optional_input_output::_optional_input_output_output::OptionalInputOutputOutput;
  404    477   
         478  +
/* CodegenDelegator.kt:255 */
  405    479   
pub use crate::operation::optional_input_output::_optional_input_output_input::OptionalInputOutputInput;
  406    480   
         481  +
/* RustModule.kt:172 */
  407    482   
mod _optional_input_output_input;
  408    483   
         484  +
/* RustModule.kt:172 */
  409    485   
mod _optional_input_output_output;
  410    486   
  411         -
/// Builders
         487  +
/// /* CodegenDelegator.kt:51 */Builders
  412    488   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/optional_input_output/_optional_input_output_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/optional_input_output/_optional_input_output_output.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/optional_input_output/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/recursive_shapes/_recursive_shapes_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/recursive_shapes/_recursive_shapes_output.rs

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

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

@@ -1,1 +124,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::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   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct RecursiveShapesFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::recursive_shapes::builders::RecursiveShapesInputBuilder,
   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::recursive_shapes::RecursiveShapesOutput,
   34     40   
        crate::operation::recursive_shapes::RecursiveShapesError,
   35     41   
    > for RecursiveShapesFluentBuilder
   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::recursive_shapes::RecursiveShapesOutput,
   43     49   
            crate::operation::recursive_shapes::RecursiveShapesError,
   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 RecursiveShapesFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `RecursiveShapesFluentBuilder`.
   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 RecursiveShapes as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::recursive_shapes::builders::RecursiveShapesInputBuilder {
   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::recursive_shapes::RecursiveShapesOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::recursive_shapes::RecursiveShapesError,
   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::recursive_shapes::RecursiveShapes::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::recursive_shapes::RecursiveShapes::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::recursive_shapes::RecursiveShapesOutput,
   96    106   
        crate::operation::recursive_shapes::RecursiveShapesError,
   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 nested(mut self, input: crate::types::RecursiveShapesInputOutputNested1) -> Self {
  112    125   
        self.inner = self.inner.nested(input);
  113    126   
        self
  114    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:498 */
  115    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* FluentBuilderGenerator.kt:500 */
  116    131   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::RecursiveShapesInputOutputNested1>) -> Self {
  117    132   
        self.inner = self.inner.set_nested(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_nested(&self) -> &::std::option::Option<crate::types::RecursiveShapesInputOutputNested1> {
  122    139   
        self.inner.get_nested()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/rpc_v2_cbor_dense_maps.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 `RpcV2CborDenseMaps`.
           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 RpcV2CborDenseMaps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl RpcV2CborDenseMaps {
    7         -
    /// Creates a new `RpcV2CborDenseMaps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `RpcV2CborDenseMaps`
          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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +269,286 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RpcV2CborDenseMaps {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RpcV2CborDenseMaps");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            RpcV2CborDenseMapsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            RpcV2CborDenseMapsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "RpcV2CborDenseMaps",
  105    116   
            "RpcV2Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RpcV2CborDenseMaps")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(RpcV2CborDenseMapsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct RpcV2CborDenseMapsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RpcV2CborDenseMapsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::de_rpc_v2_cbor_dense_maps_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::de_rpc_v2_cbor_dense_maps_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct RpcV2CborDenseMapsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RpcV2CborDenseMapsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
  187    200   
            builder =
  188    201   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  189    202   
            builder =
  190    203   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  191    204   
            builder
  192    205   
        };
  193    206   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::ser_rpc_v2_cbor_dense_maps_input(
  194    207   
            &input,
  195    208   
        )?);
  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 RpcV2CborDenseMapsEndpointParamsInterceptor;
  205    219   
  206    220   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RpcV2CborDenseMapsEndpointParamsInterceptor {
  207    221   
    fn name(&self) -> &'static str {
  208    222   
        "RpcV2CborDenseMapsEndpointParamsInterceptor"
  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::<RpcV2CborDenseMapsInput>()
  224    238   
            .ok_or("failed to downcast to RpcV2CborDenseMapsInput")?;
  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 rpc_v2_cbor_dense_maps_test {
  241    258   
  242    259   
    /// Serializes maps
  243    260   
    /// Test ID: RpcV2CborMaps
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
  246    263   
    async fn rpc_v2_cbor_maps_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   
@@ -652,669 +791,890 @@
  672    689   
            parsed.dense_string_map,
  673    690   
            expected_output.dense_string_map,
  674    691   
            "Unexpected value for `dense_string_map`"
  675    692   
        );
  676    693   
        ::pretty_assertions::assert_eq!(
  677    694   
            parsed.dense_set_map,
  678    695   
            expected_output.dense_set_map,
  679    696   
            "Unexpected value for `dense_set_map`"
  680    697   
        );
  681    698   
    }
         699  +
         700  +
    /* ProtocolTestGenerator.kt:98 */
  682    701   
}
  683    702   
         703  +
/* OperationErrorGenerator.kt:79 */
  684    704   
/// Error type for the `RpcV2CborDenseMapsError` operation.
         705  +
/* RustType.kt:516 */
  685    706   
#[non_exhaustive]
         707  +
/* RustType.kt:516 */
  686    708   
#[derive(::std::fmt::Debug)]
  687         -
pub enum RpcV2CborDenseMapsError {
  688         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         709  +
pub /* OperationErrorGenerator.kt:81 */ enum RpcV2CborDenseMapsError {
         710  +
    /// /* OperationErrorGenerator.kt:83 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         711  +
    /* OperationErrorGenerator.kt:86 */
  689    712   
    ValidationError(crate::types::error::ValidationError),
         713  +
    /* OperationErrorGenerator.kt:88 */
  690    714   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  691    715   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  692    716   
    variable wildcard pattern and check `.code()`:
  693    717   
     \
  694    718   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  695    719   
     \
  696    720   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RpcV2CborDenseMapsError) for what information is available for the error.")]
  697    721   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         722  +
    /* OperationErrorGenerator.kt:81 */
  698    723   
}
         724  +
/* OperationErrorGenerator.kt:218 */
  699    725   
impl RpcV2CborDenseMapsError {
         726  +
    /* OperationErrorGenerator.kt:219 */
  700    727   
    /// Creates the `RpcV2CborDenseMapsError::Unhandled` variant from any error type.
  701    728   
    pub fn unhandled(
  702    729   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  703    730   
    ) -> Self {
  704    731   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  705    732   
            source: err.into(),
  706    733   
            meta: ::std::default::Default::default(),
  707    734   
        })
  708    735   
    }
  709    736   
  710    737   
    /// Creates the `RpcV2CborDenseMapsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  711    738   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  712    739   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  713    740   
            source: err.clone().into(),
  714    741   
            meta: err,
  715    742   
        })
  716    743   
    }
  717         -
    ///
         744  +
    /// /* OperationErrorGenerator.kt:236 */
  718    745   
    /// Returns error metadata, which includes the error code, message,
  719    746   
    /// request ID, and potentially additional information.
  720    747   
    ///
         748  +
    /* OperationErrorGenerator.kt:242 */
  721    749   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         750  +
        /* OperationErrorGenerator.kt:243 */
  722    751   
        match self {
  723         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  724         -
            Self::Unhandled(e) => &e.meta,
         752  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         753  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         754  +
            /* OperationErrorGenerator.kt:243 */
  725    755   
        }
         756  +
        /* OperationErrorGenerator.kt:242 */
  726    757   
    }
         758  +
    /* OperationErrorGenerator.kt:257 */
  727    759   
    /// Returns `true` if the error kind is `RpcV2CborDenseMapsError::ValidationError`.
         760  +
    /* OperationErrorGenerator.kt:258 */
  728    761   
    pub fn is_validation_error(&self) -> bool {
         762  +
        /* OperationErrorGenerator.kt:259 */
  729    763   
        matches!(self, Self::ValidationError(_))
         764  +
        /* OperationErrorGenerator.kt:258 */
  730    765   
    }
         766  +
    /* OperationErrorGenerator.kt:218 */
  731    767   
}
         768  +
/* OperationErrorGenerator.kt:269 */
  732    769   
impl ::std::error::Error for RpcV2CborDenseMapsError {
         770  +
    /* OperationErrorGenerator.kt:270 */
  733    771   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         772  +
        /* OperationErrorGenerator.kt:318 */
  734    773   
        match self {
  735         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  736         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         774  +
            /* OperationErrorGenerator.kt:321 */
         775  +
            Self::ValidationError(_inner) =>
         776  +
            /* OperationErrorGenerator.kt:283 */
         777  +
            {
         778  +
                ::std::option::Option::Some(_inner)
         779  +
            }
         780  +
            ,
         781  +
            /* OperationErrorGenerator.kt:326 */
         782  +
            Self::Unhandled(_inner) => {
         783  +
                /* OperationErrorGenerator.kt:279 */
         784  +
                ::std::option::Option::Some(&*_inner.source)
         785  +
                /* OperationErrorGenerator.kt:326 */
         786  +
            } /* OperationErrorGenerator.kt:318 */
  737    787   
        }
         788  +
        /* OperationErrorGenerator.kt:270 */
  738    789   
    }
         790  +
    /* OperationErrorGenerator.kt:269 */
  739    791   
}
         792  +
/* OperationErrorGenerator.kt:133 */
  740    793   
impl ::std::fmt::Display for RpcV2CborDenseMapsError {
         794  +
    /* OperationErrorGenerator.kt:134 */
  741    795   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         796  +
        /* OperationErrorGenerator.kt:318 */
  742    797   
        match self {
  743         -
            Self::ValidationError(_inner) => _inner.fmt(f),
         798  +
            /* OperationErrorGenerator.kt:321 */
         799  +
            Self::ValidationError(_inner) =>
         800  +
            /* OperationErrorGenerator.kt:151 */
         801  +
            {
         802  +
                _inner.fmt(f)
         803  +
            }
         804  +
            ,
         805  +
            /* OperationErrorGenerator.kt:326 */
  744    806   
            Self::Unhandled(_inner) => {
         807  +
                /* OperationErrorGenerator.kt:139 */
  745    808   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  746    809   
                    write!(f, "unhandled error ({code})")
  747    810   
                } else {
  748    811   
                    f.write_str("unhandled error")
  749    812   
                }
  750         -
            }
         813  +
                /* OperationErrorGenerator.kt:326 */
         814  +
            } /* OperationErrorGenerator.kt:318 */
  751    815   
        }
         816  +
        /* OperationErrorGenerator.kt:134 */
  752    817   
    }
         818  +
    /* OperationErrorGenerator.kt:133 */
  753    819   
}
         820  +
/* OperationErrorGenerator.kt:182 */
  754    821   
impl ::aws_smithy_types::retry::ProvideErrorKind for RpcV2CborDenseMapsError {
         822  +
    /* OperationErrorGenerator.kt:186 */
  755    823   
    fn code(&self) -> ::std::option::Option<&str> {
         824  +
        /* OperationErrorGenerator.kt:187 */
  756    825   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         826  +
        /* OperationErrorGenerator.kt:186 */
  757    827   
    }
         828  +
    /* OperationErrorGenerator.kt:190 */
  758    829   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         830  +
        /* OperationErrorGenerator.kt:197 */
  759    831   
        ::std::option::Option::None
         832  +
        /* OperationErrorGenerator.kt:190 */
  760    833   
    }
         834  +
    /* OperationErrorGenerator.kt:182 */
  761    835   
}
         836  +
/* OperationErrorGenerator.kt:163 */
  762    837   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RpcV2CborDenseMapsError {
         838  +
    /* OperationErrorGenerator.kt:164 */
  763    839   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         840  +
        /* OperationErrorGenerator.kt:318 */
  764    841   
        match self {
  765         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  766         -
            Self::Unhandled(_inner) => &_inner.meta,
         842  +
            /* OperationErrorGenerator.kt:321 */
         843  +
            Self::ValidationError(_inner) =>
         844  +
            /* OperationErrorGenerator.kt:169 */
         845  +
            {
         846  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         847  +
            }
         848  +
            ,
         849  +
            /* OperationErrorGenerator.kt:326 */
         850  +
            Self::Unhandled(_inner) => {
         851  +
                /* OperationErrorGenerator.kt:168 */
         852  +
                &_inner.meta
         853  +
                /* OperationErrorGenerator.kt:326 */
         854  +
            } /* OperationErrorGenerator.kt:318 */
  767    855   
        }
         856  +
        /* OperationErrorGenerator.kt:164 */
  768    857   
    }
         858  +
    /* OperationErrorGenerator.kt:163 */
  769    859   
}
         860  +
/* OperationErrorGenerator.kt:109 */
  770    861   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RpcV2CborDenseMapsError {
         862  +
    /* OperationErrorGenerator.kt:110 */
  771    863   
    fn create_unhandled_error(
  772    864   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  773    865   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  774    866   
    ) -> Self {
         867  +
        /* OperationErrorGenerator.kt:121 */
  775    868   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  776    869   
            source,
  777    870   
            meta: meta.unwrap_or_default(),
  778    871   
        })
         872  +
        /* OperationErrorGenerator.kt:110 */
  779    873   
    }
         874  +
    /* OperationErrorGenerator.kt:109 */
  780    875   
}
  781    876   
         877  +
/* CodegenDelegator.kt:255 */
  782    878   
pub use crate::operation::rpc_v2_cbor_dense_maps::_rpc_v2_cbor_dense_maps_output::RpcV2CborDenseMapsOutput;
  783    879   
         880  +
/* CodegenDelegator.kt:255 */
  784    881   
pub use crate::operation::rpc_v2_cbor_dense_maps::_rpc_v2_cbor_dense_maps_input::RpcV2CborDenseMapsInput;
  785    882   
         883  +
/* RustModule.kt:172 */
  786    884   
mod _rpc_v2_cbor_dense_maps_input;
  787    885   
         886  +
/* RustModule.kt:172 */
  788    887   
mod _rpc_v2_cbor_dense_maps_output;
  789    888   
  790         -
/// Builders
         889  +
/// /* CodegenDelegator.kt:51 */Builders
  791    890   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/rpc_v2_cbor_dense_maps/_rpc_v2_cbor_dense_maps_input.rs

@@ -1,1 +182,304 @@
    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 RpcV2CborDenseMapsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct RpcV2CborDenseMapsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub dense_struct_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub dense_boolean_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub dense_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub dense_set_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
          24  +
    /* StructureGenerator.kt:201 */
   16     25   
}
          26  +
/* StructureGenerator.kt:135 */
   17     27   
impl RpcV2CborDenseMapsInput {
          28  +
    /* StructureGenerator.kt:231 */
   18     29   
    #[allow(missing_docs)] // documentation missing in model
          30  +
                           /* StructureGenerator.kt:166 */
   19     31   
    pub fn dense_struct_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          32  +
        /* StructureGenerator.kt:170 */
   20     33   
        self.dense_struct_map.as_ref()
          34  +
        /* StructureGenerator.kt:166 */
   21     35   
    }
          36  +
    /* StructureGenerator.kt:231 */
   22     37   
    #[allow(missing_docs)] // documentation missing in model
          38  +
                           /* StructureGenerator.kt:166 */
   23     39   
    pub fn dense_number_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
          40  +
        /* StructureGenerator.kt:170 */
   24     41   
        self.dense_number_map.as_ref()
          42  +
        /* StructureGenerator.kt:166 */
   25     43   
    }
          44  +
    /* StructureGenerator.kt:231 */
   26     45   
    #[allow(missing_docs)] // documentation missing in model
          46  +
                           /* StructureGenerator.kt:166 */
   27     47   
    pub fn dense_boolean_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, bool>> {
          48  +
        /* StructureGenerator.kt:170 */
   28     49   
        self.dense_boolean_map.as_ref()
          50  +
        /* StructureGenerator.kt:166 */
   29     51   
    }
          52  +
    /* StructureGenerator.kt:231 */
   30     53   
    #[allow(missing_docs)] // documentation missing in model
          54  +
                           /* StructureGenerator.kt:166 */
   31     55   
    pub fn dense_string_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          56  +
        /* StructureGenerator.kt:170 */
   32     57   
        self.dense_string_map.as_ref()
          58  +
        /* StructureGenerator.kt:166 */
   33     59   
    }
          60  +
    /* StructureGenerator.kt:231 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* StructureGenerator.kt:166 */
   35     63   
    pub fn dense_set_map(
   36     64   
        &self,
   37     65   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
          66  +
        /* StructureGenerator.kt:170 */
   38     67   
        self.dense_set_map.as_ref()
          68  +
        /* StructureGenerator.kt:166 */
   39     69   
    }
          70  +
    /* StructureGenerator.kt:135 */
   40     71   
}
          72  +
/* ClientCodegenVisitor.kt:237 */
   41     73   
impl RpcV2CborDenseMapsInput {
   42         -
    /// Creates a new builder-style object to manufacture [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
          74  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
          75  +
    /* BuilderGenerator.kt:175 */
   43     76   
    pub fn builder() -> crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsInputBuilder {
          77  +
        /* BuilderGenerator.kt:176 */
   44     78   
        crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsInputBuilder::default()
          79  +
        /* BuilderGenerator.kt:175 */
   45     80   
    }
          81  +
    /* ClientCodegenVisitor.kt:237 */
   46     82   
}
   47     83   
   48         -
/// A builder for [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
          84  +
/// /* BuilderGenerator.kt:342 */A builder for [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
          85  +
/* RustType.kt:516 */
   49     86   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          87  +
/* RustType.kt:516 */
   50     88   
#[non_exhaustive]
          89  +
/* BuilderGenerator.kt:345 */
   51     90   
pub struct RpcV2CborDenseMapsInputBuilder {
          91  +
    /* BuilderGenerator.kt:275 */
   52     92   
    pub(crate) dense_struct_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   53         -
    pub(crate) dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          93  +
    /* BuilderGenerator.kt:275 */ pub(crate) dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          94  +
    /* BuilderGenerator.kt:275 */
   54     95   
    pub(crate) dense_boolean_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>,
          96  +
    /* BuilderGenerator.kt:275 */
   55     97   
    pub(crate) dense_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          98  +
    /* BuilderGenerator.kt:275 */
   56     99   
    pub(crate) dense_set_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         100  +
    /* BuilderGenerator.kt:345 */
   57    101   
}
         102  +
/* BuilderGenerator.kt:355 */
   58    103   
impl RpcV2CborDenseMapsInputBuilder {
   59         -
    /// Adds a key-value pair to `dense_struct_map`.
         104  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_struct_map`.
         105  +
    /* BuilderGenerator.kt:437 */
   60    106   
    ///
   61         -
    /// To override the contents of this collection use [`set_dense_struct_map`](Self::set_dense_struct_map).
         107  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_struct_map`](Self::set_dense_struct_map).
         108  +
    /* BuilderGenerator.kt:439 */
   62    109   
    ///
         110  +
    /* BuilderGenerator.kt:445 */
   63    111   
    pub fn dense_struct_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
         112  +
        /* BuilderGenerator.kt:448 */
   64    113   
        let mut hash_map = self.dense_struct_map.unwrap_or_default();
   65    114   
        hash_map.insert(k.into(), v);
   66    115   
        self.dense_struct_map = ::std::option::Option::Some(hash_map);
   67    116   
        self
         117  +
        /* BuilderGenerator.kt:445 */
   68    118   
    }
         119  +
    /* BuilderGenerator.kt:312 */
   69    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* BuilderGenerator.kt:314 */
   70    122   
    pub fn set_dense_struct_map(
   71    123   
        mut self,
   72    124   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   73    125   
    ) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   74    127   
        self.dense_struct_map = input;
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:314 */
   76    130   
    }
         131  +
    /* BuilderGenerator.kt:334 */
   77    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:336 */
   78    134   
    pub fn get_dense_struct_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
         135  +
        /* BuilderGenerator.kt:337 */
   79    136   
        &self.dense_struct_map
         137  +
        /* BuilderGenerator.kt:336 */
   80    138   
    }
   81         -
    /// Adds a key-value pair to `dense_number_map`.
         139  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_number_map`.
         140  +
    /* BuilderGenerator.kt:437 */
   82    141   
    ///
   83         -
    /// To override the contents of this collection use [`set_dense_number_map`](Self::set_dense_number_map).
         142  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_number_map`](Self::set_dense_number_map).
         143  +
    /* BuilderGenerator.kt:439 */
   84    144   
    ///
         145  +
    /* BuilderGenerator.kt:445 */
   85    146   
    pub fn dense_number_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: i32) -> Self {
         147  +
        /* BuilderGenerator.kt:448 */
   86    148   
        let mut hash_map = self.dense_number_map.unwrap_or_default();
   87    149   
        hash_map.insert(k.into(), v);
   88    150   
        self.dense_number_map = ::std::option::Option::Some(hash_map);
   89    151   
        self
         152  +
        /* BuilderGenerator.kt:445 */
   90    153   
    }
         154  +
    /* BuilderGenerator.kt:312 */
   91    155   
    #[allow(missing_docs)] // documentation missing in model
         156  +
                           /* BuilderGenerator.kt:314 */
   92    157   
    pub fn set_dense_number_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>) -> Self {
         158  +
        /* BuilderGenerator.kt:315 */
   93    159   
        self.dense_number_map = input;
   94    160   
        self
         161  +
        /* BuilderGenerator.kt:314 */
   95    162   
    }
         163  +
    /* BuilderGenerator.kt:334 */
   96    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* BuilderGenerator.kt:336 */
   97    166   
    pub fn get_dense_number_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, i32>> {
         167  +
        /* BuilderGenerator.kt:337 */
   98    168   
        &self.dense_number_map
         169  +
        /* BuilderGenerator.kt:336 */
   99    170   
    }
  100         -
    /// Adds a key-value pair to `dense_boolean_map`.
         171  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_boolean_map`.
         172  +
    /* BuilderGenerator.kt:437 */
  101    173   
    ///
  102         -
    /// To override the contents of this collection use [`set_dense_boolean_map`](Self::set_dense_boolean_map).
         174  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_boolean_map`](Self::set_dense_boolean_map).
         175  +
    /* BuilderGenerator.kt:439 */
  103    176   
    ///
         177  +
    /* BuilderGenerator.kt:445 */
  104    178   
    pub fn dense_boolean_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: bool) -> Self {
         179  +
        /* BuilderGenerator.kt:448 */
  105    180   
        let mut hash_map = self.dense_boolean_map.unwrap_or_default();
  106    181   
        hash_map.insert(k.into(), v);
  107    182   
        self.dense_boolean_map = ::std::option::Option::Some(hash_map);
  108    183   
        self
         184  +
        /* BuilderGenerator.kt:445 */
  109    185   
    }
         186  +
    /* BuilderGenerator.kt:312 */
  110    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* BuilderGenerator.kt:314 */
  111    189   
    pub fn set_dense_boolean_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>) -> Self {
         190  +
        /* BuilderGenerator.kt:315 */
  112    191   
        self.dense_boolean_map = input;
  113    192   
        self
         193  +
        /* BuilderGenerator.kt:314 */
  114    194   
    }
         195  +
    /* BuilderGenerator.kt:334 */
  115    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* BuilderGenerator.kt:336 */
  116    198   
    pub fn get_dense_boolean_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, bool>> {
         199  +
        /* BuilderGenerator.kt:337 */
  117    200   
        &self.dense_boolean_map
         201  +
        /* BuilderGenerator.kt:336 */
  118    202   
    }
  119         -
    /// Adds a key-value pair to `dense_string_map`.
         203  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_string_map`.
         204  +
    /* BuilderGenerator.kt:437 */
  120    205   
    ///
  121         -
    /// To override the contents of this collection use [`set_dense_string_map`](Self::set_dense_string_map).
         206  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_string_map`](Self::set_dense_string_map).
         207  +
    /* BuilderGenerator.kt:439 */
  122    208   
    ///
         209  +
    /* BuilderGenerator.kt:445 */
  123    210   
    pub fn dense_string_map(
  124    211   
        mut self,
  125    212   
        k: impl ::std::convert::Into<::std::string::String>,
  126    213   
        v: impl ::std::convert::Into<::std::string::String>,
  127    214   
    ) -> Self {
         215  +
        /* BuilderGenerator.kt:448 */
  128    216   
        let mut hash_map = self.dense_string_map.unwrap_or_default();
  129    217   
        hash_map.insert(k.into(), v.into());
  130    218   
        self.dense_string_map = ::std::option::Option::Some(hash_map);
  131    219   
        self
         220  +
        /* BuilderGenerator.kt:445 */
  132    221   
    }
         222  +
    /* BuilderGenerator.kt:312 */
  133    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* BuilderGenerator.kt:314 */
  134    225   
    pub fn set_dense_string_map(
  135    226   
        mut self,
  136    227   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  137    228   
    ) -> Self {
         229  +
        /* BuilderGenerator.kt:315 */
  138    230   
        self.dense_string_map = input;
  139    231   
        self
         232  +
        /* BuilderGenerator.kt:314 */
  140    233   
    }
         234  +
    /* BuilderGenerator.kt:334 */
  141    235   
    #[allow(missing_docs)] // documentation missing in model
         236  +
                           /* BuilderGenerator.kt:336 */
  142    237   
    pub fn get_dense_string_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         238  +
        /* BuilderGenerator.kt:337 */
  143    239   
        &self.dense_string_map
         240  +
        /* BuilderGenerator.kt:336 */
  144    241   
    }
  145         -
    /// Adds a key-value pair to `dense_set_map`.
         242  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_set_map`.
         243  +
    /* BuilderGenerator.kt:437 */
  146    244   
    ///
  147         -
    /// To override the contents of this collection use [`set_dense_set_map`](Self::set_dense_set_map).
         245  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_set_map`](Self::set_dense_set_map).
         246  +
    /* BuilderGenerator.kt:439 */
  148    247   
    ///
         248  +
    /* BuilderGenerator.kt:445 */
  149    249   
    pub fn dense_set_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
         250  +
        /* BuilderGenerator.kt:448 */
  150    251   
        let mut hash_map = self.dense_set_map.unwrap_or_default();
  151    252   
        hash_map.insert(k.into(), v);
  152    253   
        self.dense_set_map = ::std::option::Option::Some(hash_map);
  153    254   
        self
         255  +
        /* BuilderGenerator.kt:445 */
  154    256   
    }
         257  +
    /* BuilderGenerator.kt:312 */
  155    258   
    #[allow(missing_docs)] // documentation missing in model
         259  +
                           /* BuilderGenerator.kt:314 */
  156    260   
    pub fn set_dense_set_map(
  157    261   
        mut self,
  158    262   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
  159    263   
    ) -> Self {
         264  +
        /* BuilderGenerator.kt:315 */
  160    265   
        self.dense_set_map = input;
  161    266   
        self
         267  +
        /* BuilderGenerator.kt:314 */
  162    268   
    }
         269  +
    /* BuilderGenerator.kt:334 */
  163    270   
    #[allow(missing_docs)] // documentation missing in model
         271  +
                           /* BuilderGenerator.kt:336 */
  164    272   
    pub fn get_dense_set_map(
  165    273   
        &self,
  166    274   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         275  +
        /* BuilderGenerator.kt:337 */
  167    276   
        &self.dense_set_map
         277  +
        /* BuilderGenerator.kt:336 */
  168    278   
    }
  169         -
    /// Consumes the builder and constructs a [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
         279  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RpcV2CborDenseMapsInput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput).
         280  +
    /* BuilderGenerator.kt:253 */
  170    281   
    pub fn build(
  171    282   
        self,
  172    283   
    ) -> ::std::result::Result<crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput, ::aws_smithy_types::error::operation::BuildError>
  173    284   
    {
  174         -
        ::std::result::Result::Ok(crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput {
  175         -
            dense_struct_map: self.dense_struct_map,
  176         -
            dense_number_map: self.dense_number_map,
  177         -
            dense_boolean_map: self.dense_boolean_map,
  178         -
            dense_string_map: self.dense_string_map,
  179         -
            dense_set_map: self.dense_set_map,
  180         -
        })
         285  +
        /* BuilderGenerator.kt:254 */
         286  +
        ::std::result::Result::Ok(
         287  +
            /* BuilderGenerator.kt:477 */
         288  +
            crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsInput {
         289  +
                /* BuilderGenerator.kt:481 */ dense_struct_map: self.dense_struct_map,
         290  +
                /* BuilderGenerator.kt:481 */
         291  +
                dense_number_map: self.dense_number_map,
         292  +
                /* BuilderGenerator.kt:481 */
         293  +
                dense_boolean_map: self.dense_boolean_map,
         294  +
                /* BuilderGenerator.kt:481 */
         295  +
                dense_string_map: self.dense_string_map,
         296  +
                /* BuilderGenerator.kt:481 */
         297  +
                dense_set_map: self.dense_set_map,
         298  +
                /* BuilderGenerator.kt:477 */
         299  +
            }, /* BuilderGenerator.kt:254 */
         300  +
        )
         301  +
        /* BuilderGenerator.kt:253 */
  181    302   
    }
         303  +
    /* BuilderGenerator.kt:355 */
  182    304   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/rpc_v2_cbor_dense_maps/_rpc_v2_cbor_dense_maps_output.rs

@@ -1,1 +179,298 @@
    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 RpcV2CborDenseMapsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct RpcV2CborDenseMapsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub dense_struct_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub dense_boolean_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub dense_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub dense_set_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
          24  +
    /* StructureGenerator.kt:201 */
   16     25   
}
          26  +
/* StructureGenerator.kt:135 */
   17     27   
impl RpcV2CborDenseMapsOutput {
          28  +
    /* StructureGenerator.kt:231 */
   18     29   
    #[allow(missing_docs)] // documentation missing in model
          30  +
                           /* StructureGenerator.kt:166 */
   19     31   
    pub fn dense_struct_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          32  +
        /* StructureGenerator.kt:170 */
   20     33   
        self.dense_struct_map.as_ref()
          34  +
        /* StructureGenerator.kt:166 */
   21     35   
    }
          36  +
    /* StructureGenerator.kt:231 */
   22     37   
    #[allow(missing_docs)] // documentation missing in model
          38  +
                           /* StructureGenerator.kt:166 */
   23     39   
    pub fn dense_number_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
          40  +
        /* StructureGenerator.kt:170 */
   24     41   
        self.dense_number_map.as_ref()
          42  +
        /* StructureGenerator.kt:166 */
   25     43   
    }
          44  +
    /* StructureGenerator.kt:231 */
   26     45   
    #[allow(missing_docs)] // documentation missing in model
          46  +
                           /* StructureGenerator.kt:166 */
   27     47   
    pub fn dense_boolean_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, bool>> {
          48  +
        /* StructureGenerator.kt:170 */
   28     49   
        self.dense_boolean_map.as_ref()
          50  +
        /* StructureGenerator.kt:166 */
   29     51   
    }
          52  +
    /* StructureGenerator.kt:231 */
   30     53   
    #[allow(missing_docs)] // documentation missing in model
          54  +
                           /* StructureGenerator.kt:166 */
   31     55   
    pub fn dense_string_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          56  +
        /* StructureGenerator.kt:170 */
   32     57   
        self.dense_string_map.as_ref()
          58  +
        /* StructureGenerator.kt:166 */
   33     59   
    }
          60  +
    /* StructureGenerator.kt:231 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* StructureGenerator.kt:166 */
   35     63   
    pub fn dense_set_map(
   36     64   
        &self,
   37     65   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
          66  +
        /* StructureGenerator.kt:170 */
   38     67   
        self.dense_set_map.as_ref()
          68  +
        /* StructureGenerator.kt:166 */
   39     69   
    }
          70  +
    /* StructureGenerator.kt:135 */
   40     71   
}
          72  +
/* ClientCodegenVisitor.kt:237 */
   41     73   
impl RpcV2CborDenseMapsOutput {
   42         -
    /// Creates a new builder-style object to manufacture [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
          74  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
          75  +
    /* BuilderGenerator.kt:175 */
   43     76   
    pub fn builder() -> crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsOutputBuilder {
          77  +
        /* BuilderGenerator.kt:176 */
   44     78   
        crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsOutputBuilder::default()
          79  +
        /* BuilderGenerator.kt:175 */
   45     80   
    }
          81  +
    /* ClientCodegenVisitor.kt:237 */
   46     82   
}
   47     83   
   48         -
/// A builder for [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
          84  +
/// /* BuilderGenerator.kt:342 */A builder for [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
          85  +
/* RustType.kt:516 */
   49     86   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          87  +
/* RustType.kt:516 */
   50     88   
#[non_exhaustive]
          89  +
/* BuilderGenerator.kt:345 */
   51     90   
pub struct RpcV2CborDenseMapsOutputBuilder {
          91  +
    /* BuilderGenerator.kt:275 */
   52     92   
    pub(crate) dense_struct_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   53         -
    pub(crate) dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          93  +
    /* BuilderGenerator.kt:275 */ pub(crate) dense_number_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          94  +
    /* BuilderGenerator.kt:275 */
   54     95   
    pub(crate) dense_boolean_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>,
          96  +
    /* BuilderGenerator.kt:275 */
   55     97   
    pub(crate) dense_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          98  +
    /* BuilderGenerator.kt:275 */
   56     99   
    pub(crate) dense_set_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         100  +
    /* BuilderGenerator.kt:345 */
   57    101   
}
         102  +
/* BuilderGenerator.kt:355 */
   58    103   
impl RpcV2CborDenseMapsOutputBuilder {
   59         -
    /// Adds a key-value pair to `dense_struct_map`.
         104  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_struct_map`.
         105  +
    /* BuilderGenerator.kt:437 */
   60    106   
    ///
   61         -
    /// To override the contents of this collection use [`set_dense_struct_map`](Self::set_dense_struct_map).
         107  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_struct_map`](Self::set_dense_struct_map).
         108  +
    /* BuilderGenerator.kt:439 */
   62    109   
    ///
         110  +
    /* BuilderGenerator.kt:445 */
   63    111   
    pub fn dense_struct_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
         112  +
        /* BuilderGenerator.kt:448 */
   64    113   
        let mut hash_map = self.dense_struct_map.unwrap_or_default();
   65    114   
        hash_map.insert(k.into(), v);
   66    115   
        self.dense_struct_map = ::std::option::Option::Some(hash_map);
   67    116   
        self
         117  +
        /* BuilderGenerator.kt:445 */
   68    118   
    }
         119  +
    /* BuilderGenerator.kt:312 */
   69    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* BuilderGenerator.kt:314 */
   70    122   
    pub fn set_dense_struct_map(
   71    123   
        mut self,
   72    124   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   73    125   
    ) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   74    127   
        self.dense_struct_map = input;
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:314 */
   76    130   
    }
         131  +
    /* BuilderGenerator.kt:334 */
   77    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:336 */
   78    134   
    pub fn get_dense_struct_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
         135  +
        /* BuilderGenerator.kt:337 */
   79    136   
        &self.dense_struct_map
         137  +
        /* BuilderGenerator.kt:336 */
   80    138   
    }
   81         -
    /// Adds a key-value pair to `dense_number_map`.
         139  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_number_map`.
         140  +
    /* BuilderGenerator.kt:437 */
   82    141   
    ///
   83         -
    /// To override the contents of this collection use [`set_dense_number_map`](Self::set_dense_number_map).
         142  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_number_map`](Self::set_dense_number_map).
         143  +
    /* BuilderGenerator.kt:439 */
   84    144   
    ///
         145  +
    /* BuilderGenerator.kt:445 */
   85    146   
    pub fn dense_number_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: i32) -> Self {
         147  +
        /* BuilderGenerator.kt:448 */
   86    148   
        let mut hash_map = self.dense_number_map.unwrap_or_default();
   87    149   
        hash_map.insert(k.into(), v);
   88    150   
        self.dense_number_map = ::std::option::Option::Some(hash_map);
   89    151   
        self
         152  +
        /* BuilderGenerator.kt:445 */
   90    153   
    }
         154  +
    /* BuilderGenerator.kt:312 */
   91    155   
    #[allow(missing_docs)] // documentation missing in model
         156  +
                           /* BuilderGenerator.kt:314 */
   92    157   
    pub fn set_dense_number_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>) -> Self {
         158  +
        /* BuilderGenerator.kt:315 */
   93    159   
        self.dense_number_map = input;
   94    160   
        self
         161  +
        /* BuilderGenerator.kt:314 */
   95    162   
    }
         163  +
    /* BuilderGenerator.kt:334 */
   96    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* BuilderGenerator.kt:336 */
   97    166   
    pub fn get_dense_number_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, i32>> {
         167  +
        /* BuilderGenerator.kt:337 */
   98    168   
        &self.dense_number_map
         169  +
        /* BuilderGenerator.kt:336 */
   99    170   
    }
  100         -
    /// Adds a key-value pair to `dense_boolean_map`.
         171  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_boolean_map`.
         172  +
    /* BuilderGenerator.kt:437 */
  101    173   
    ///
  102         -
    /// To override the contents of this collection use [`set_dense_boolean_map`](Self::set_dense_boolean_map).
         174  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_boolean_map`](Self::set_dense_boolean_map).
         175  +
    /* BuilderGenerator.kt:439 */
  103    176   
    ///
         177  +
    /* BuilderGenerator.kt:445 */
  104    178   
    pub fn dense_boolean_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: bool) -> Self {
         179  +
        /* BuilderGenerator.kt:448 */
  105    180   
        let mut hash_map = self.dense_boolean_map.unwrap_or_default();
  106    181   
        hash_map.insert(k.into(), v);
  107    182   
        self.dense_boolean_map = ::std::option::Option::Some(hash_map);
  108    183   
        self
         184  +
        /* BuilderGenerator.kt:445 */
  109    185   
    }
         186  +
    /* BuilderGenerator.kt:312 */
  110    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* BuilderGenerator.kt:314 */
  111    189   
    pub fn set_dense_boolean_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>) -> Self {
         190  +
        /* BuilderGenerator.kt:315 */
  112    191   
        self.dense_boolean_map = input;
  113    192   
        self
         193  +
        /* BuilderGenerator.kt:314 */
  114    194   
    }
         195  +
    /* BuilderGenerator.kt:334 */
  115    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* BuilderGenerator.kt:336 */
  116    198   
    pub fn get_dense_boolean_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, bool>> {
         199  +
        /* BuilderGenerator.kt:337 */
  117    200   
        &self.dense_boolean_map
         201  +
        /* BuilderGenerator.kt:336 */
  118    202   
    }
  119         -
    /// Adds a key-value pair to `dense_string_map`.
         203  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_string_map`.
         204  +
    /* BuilderGenerator.kt:437 */
  120    205   
    ///
  121         -
    /// To override the contents of this collection use [`set_dense_string_map`](Self::set_dense_string_map).
         206  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_string_map`](Self::set_dense_string_map).
         207  +
    /* BuilderGenerator.kt:439 */
  122    208   
    ///
         209  +
    /* BuilderGenerator.kt:445 */
  123    210   
    pub fn dense_string_map(
  124    211   
        mut self,
  125    212   
        k: impl ::std::convert::Into<::std::string::String>,
  126    213   
        v: impl ::std::convert::Into<::std::string::String>,
  127    214   
    ) -> Self {
         215  +
        /* BuilderGenerator.kt:448 */
  128    216   
        let mut hash_map = self.dense_string_map.unwrap_or_default();
  129    217   
        hash_map.insert(k.into(), v.into());
  130    218   
        self.dense_string_map = ::std::option::Option::Some(hash_map);
  131    219   
        self
         220  +
        /* BuilderGenerator.kt:445 */
  132    221   
    }
         222  +
    /* BuilderGenerator.kt:312 */
  133    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* BuilderGenerator.kt:314 */
  134    225   
    pub fn set_dense_string_map(
  135    226   
        mut self,
  136    227   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  137    228   
    ) -> Self {
         229  +
        /* BuilderGenerator.kt:315 */
  138    230   
        self.dense_string_map = input;
  139    231   
        self
         232  +
        /* BuilderGenerator.kt:314 */
  140    233   
    }
         234  +
    /* BuilderGenerator.kt:334 */
  141    235   
    #[allow(missing_docs)] // documentation missing in model
         236  +
                           /* BuilderGenerator.kt:336 */
  142    237   
    pub fn get_dense_string_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         238  +
        /* BuilderGenerator.kt:337 */
  143    239   
        &self.dense_string_map
         240  +
        /* BuilderGenerator.kt:336 */
  144    241   
    }
  145         -
    /// Adds a key-value pair to `dense_set_map`.
         242  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `dense_set_map`.
         243  +
    /* BuilderGenerator.kt:437 */
  146    244   
    ///
  147         -
    /// To override the contents of this collection use [`set_dense_set_map`](Self::set_dense_set_map).
         245  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_dense_set_map`](Self::set_dense_set_map).
         246  +
    /* BuilderGenerator.kt:439 */
  148    247   
    ///
         248  +
    /* BuilderGenerator.kt:445 */
  149    249   
    pub fn dense_set_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
         250  +
        /* BuilderGenerator.kt:448 */
  150    251   
        let mut hash_map = self.dense_set_map.unwrap_or_default();
  151    252   
        hash_map.insert(k.into(), v);
  152    253   
        self.dense_set_map = ::std::option::Option::Some(hash_map);
  153    254   
        self
         255  +
        /* BuilderGenerator.kt:445 */
  154    256   
    }
         257  +
    /* BuilderGenerator.kt:312 */
  155    258   
    #[allow(missing_docs)] // documentation missing in model
         259  +
                           /* BuilderGenerator.kt:314 */
  156    260   
    pub fn set_dense_set_map(
  157    261   
        mut self,
  158    262   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
  159    263   
    ) -> Self {
         264  +
        /* BuilderGenerator.kt:315 */
  160    265   
        self.dense_set_map = input;
  161    266   
        self
         267  +
        /* BuilderGenerator.kt:314 */
  162    268   
    }
         269  +
    /* BuilderGenerator.kt:334 */
  163    270   
    #[allow(missing_docs)] // documentation missing in model
         271  +
                           /* BuilderGenerator.kt:336 */
  164    272   
    pub fn get_dense_set_map(
  165    273   
        &self,
  166    274   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         275  +
        /* BuilderGenerator.kt:337 */
  167    276   
        &self.dense_set_map
         277  +
        /* BuilderGenerator.kt:336 */
  168    278   
    }
  169         -
    /// Consumes the builder and constructs a [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
         279  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RpcV2CborDenseMapsOutput`](crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput).
         280  +
    /* BuilderGenerator.kt:253 */
  170    281   
    pub fn build(self) -> crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput {
         282  +
        /* BuilderGenerator.kt:477 */
  171    283   
        crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput {
  172         -
            dense_struct_map: self.dense_struct_map,
         284  +
            /* BuilderGenerator.kt:481 */ dense_struct_map: self.dense_struct_map,
         285  +
            /* BuilderGenerator.kt:481 */
  173    286   
            dense_number_map: self.dense_number_map,
         287  +
            /* BuilderGenerator.kt:481 */
  174    288   
            dense_boolean_map: self.dense_boolean_map,
         289  +
            /* BuilderGenerator.kt:481 */
  175    290   
            dense_string_map: self.dense_string_map,
         291  +
            /* BuilderGenerator.kt:481 */
  176    292   
            dense_set_map: self.dense_set_map,
         293  +
            /* BuilderGenerator.kt:477 */
  177    294   
        }
         295  +
        /* BuilderGenerator.kt:253 */
  178    296   
    }
         297  +
    /* BuilderGenerator.kt:355 */
  179    298   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/rpc_v2_cbor_dense_maps/builders.rs

@@ -1,1 +221,263 @@
    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::rpc_v2_cbor_dense_maps::_rpc_v2_cbor_dense_maps_output::RpcV2CborDenseMapsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::rpc_v2_cbor_dense_maps::_rpc_v2_cbor_dense_maps_input::RpcV2CborDenseMapsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsInputBuilder {
    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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.rpc_v2_cbor_dense_maps();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `RpcV2CborDenseMaps`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `RpcV2CborDenseMaps`.
   24     27   
///
   25         -
/// The example tests basic map serialization.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests basic map serialization.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct RpcV2CborDenseMapsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsInputBuilder,
   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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   35     41   
        crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   36     42   
    > for RpcV2CborDenseMapsFluentBuilder
   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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   44     50   
            crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   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 RpcV2CborDenseMapsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `RpcV2CborDenseMapsFluentBuilder`.
   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 RpcV2CborDenseMaps as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::rpc_v2_cbor_dense_maps::builders::RpcV2CborDenseMapsInputBuilder {
   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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMaps::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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMaps::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::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsOutput,
   97    107   
        crate::operation::rpc_v2_cbor_dense_maps::RpcV2CborDenseMapsError,
   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   
    }
  111         -
    ///
         122  +
    /// /* FluentBuilderGenerator.kt:466 */
  112    123   
    /// Adds a key-value pair to `denseStructMap`.
  113    124   
    ///
  114    125   
    /// To override the contents of this collection use [`set_dense_struct_map`](Self::set_dense_struct_map).
  115    126   
    ///
         127  +
    /* FluentBuilderGenerator.kt:473 */
  116    128   
    #[allow(missing_docs)] // documentation missing in model
         129  +
                           /* FluentBuilderGenerator.kt:475 */
  117    130   
    pub fn dense_struct_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
  118    131   
        self.inner = self.inner.dense_struct_map(k.into(), v);
  119    132   
        self
  120    133   
    }
         134  +
    /* FluentBuilderGenerator.kt:498 */
  121    135   
    #[allow(missing_docs)] // documentation missing in model
         136  +
                           /* FluentBuilderGenerator.kt:500 */
  122    137   
    pub fn set_dense_struct_map(
  123    138   
        mut self,
  124    139   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
  125    140   
    ) -> Self {
  126    141   
        self.inner = self.inner.set_dense_struct_map(input);
  127    142   
        self
  128    143   
    }
         144  +
    /* FluentBuilderGenerator.kt:518 */
  129    145   
    #[allow(missing_docs)] // documentation missing in model
         146  +
                           /* FluentBuilderGenerator.kt:520 */
  130    147   
    pub fn get_dense_struct_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
  131    148   
        self.inner.get_dense_struct_map()
  132    149   
    }
  133         -
    ///
         150  +
    /// /* FluentBuilderGenerator.kt:466 */
  134    151   
    /// Adds a key-value pair to `denseNumberMap`.
  135    152   
    ///
  136    153   
    /// To override the contents of this collection use [`set_dense_number_map`](Self::set_dense_number_map).
  137    154   
    ///
         155  +
    /* FluentBuilderGenerator.kt:473 */
  138    156   
    #[allow(missing_docs)] // documentation missing in model
         157  +
                           /* FluentBuilderGenerator.kt:475 */
  139    158   
    pub fn dense_number_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: i32) -> Self {
  140    159   
        self.inner = self.inner.dense_number_map(k.into(), v);
  141    160   
        self
  142    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:498 */
  143    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* FluentBuilderGenerator.kt:500 */
  144    165   
    pub fn set_dense_number_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>) -> Self {
  145    166   
        self.inner = self.inner.set_dense_number_map(input);
  146    167   
        self
  147    168   
    }
         169  +
    /* FluentBuilderGenerator.kt:518 */
  148    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* FluentBuilderGenerator.kt:520 */
  149    172   
    pub fn get_dense_number_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, i32>> {
  150    173   
        self.inner.get_dense_number_map()
  151    174   
    }
  152         -
    ///
         175  +
    /// /* FluentBuilderGenerator.kt:466 */
  153    176   
    /// Adds a key-value pair to `denseBooleanMap`.
  154    177   
    ///
  155    178   
    /// To override the contents of this collection use [`set_dense_boolean_map`](Self::set_dense_boolean_map).
  156    179   
    ///
         180  +
    /* FluentBuilderGenerator.kt:473 */
  157    181   
    #[allow(missing_docs)] // documentation missing in model
         182  +
                           /* FluentBuilderGenerator.kt:475 */
  158    183   
    pub fn dense_boolean_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: bool) -> Self {
  159    184   
        self.inner = self.inner.dense_boolean_map(k.into(), v);
  160    185   
        self
  161    186   
    }
         187  +
    /* FluentBuilderGenerator.kt:498 */
  162    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* FluentBuilderGenerator.kt:500 */
  163    190   
    pub fn set_dense_boolean_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, bool>>) -> Self {
  164    191   
        self.inner = self.inner.set_dense_boolean_map(input);
  165    192   
        self
  166    193   
    }
         194  +
    /* FluentBuilderGenerator.kt:518 */
  167    195   
    #[allow(missing_docs)] // documentation missing in model
         196  +
                           /* FluentBuilderGenerator.kt:520 */
  168    197   
    pub fn get_dense_boolean_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, bool>> {
  169    198   
        self.inner.get_dense_boolean_map()
  170    199   
    }
  171         -
    ///
         200  +
    /// /* FluentBuilderGenerator.kt:466 */
  172    201   
    /// Adds a key-value pair to `denseStringMap`.
  173    202   
    ///
  174    203   
    /// To override the contents of this collection use [`set_dense_string_map`](Self::set_dense_string_map).
  175    204   
    ///
         205  +
    /* FluentBuilderGenerator.kt:473 */
  176    206   
    #[allow(missing_docs)] // documentation missing in model
         207  +
                           /* FluentBuilderGenerator.kt:475 */
  177    208   
    pub fn dense_string_map(
  178    209   
        mut self,
  179    210   
        k: impl ::std::convert::Into<::std::string::String>,
  180    211   
        v: impl ::std::convert::Into<::std::string::String>,
  181    212   
    ) -> Self {
  182    213   
        self.inner = self.inner.dense_string_map(k.into(), v.into());
  183    214   
        self
  184    215   
    }
         216  +
    /* FluentBuilderGenerator.kt:498 */
  185    217   
    #[allow(missing_docs)] // documentation missing in model
         218  +
                           /* FluentBuilderGenerator.kt:500 */
  186    219   
    pub fn set_dense_string_map(
  187    220   
        mut self,
  188    221   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  189    222   
    ) -> Self {
  190    223   
        self.inner = self.inner.set_dense_string_map(input);
  191    224   
        self
  192    225   
    }
         226  +
    /* FluentBuilderGenerator.kt:518 */
  193    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* FluentBuilderGenerator.kt:520 */
  194    229   
    pub fn get_dense_string_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
  195    230   
        self.inner.get_dense_string_map()
  196    231   
    }
  197         -
    ///
         232  +
    /// /* FluentBuilderGenerator.kt:466 */
  198    233   
    /// Adds a key-value pair to `denseSetMap`.
  199    234   
    ///
  200    235   
    /// To override the contents of this collection use [`set_dense_set_map`](Self::set_dense_set_map).
  201    236   
    ///
         237  +
    /* FluentBuilderGenerator.kt:473 */
  202    238   
    #[allow(missing_docs)] // documentation missing in model
         239  +
                           /* FluentBuilderGenerator.kt:475 */
  203    240   
    pub fn dense_set_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
  204    241   
        self.inner = self.inner.dense_set_map(k.into(), v);
  205    242   
        self
  206    243   
    }
         244  +
    /* FluentBuilderGenerator.kt:498 */
  207    245   
    #[allow(missing_docs)] // documentation missing in model
         246  +
                           /* FluentBuilderGenerator.kt:500 */
  208    247   
    pub fn set_dense_set_map(
  209    248   
        mut self,
  210    249   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
  211    250   
    ) -> Self {
  212    251   
        self.inner = self.inner.set_dense_set_map(input);
  213    252   
        self
  214    253   
    }
         254  +
    /* FluentBuilderGenerator.kt:518 */
  215    255   
    #[allow(missing_docs)] // documentation missing in model
         256  +
                           /* FluentBuilderGenerator.kt:520 */
  216    257   
    pub fn get_dense_set_map(
  217    258   
        &self,
  218    259   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
  219    260   
        self.inner.get_dense_set_map()
  220    261   
    }
         262  +
    /* FluentBuilderGenerator.kt:282 */
  221    263   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/rpc_v2_cbor_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 `RpcV2CborLists`.
           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 RpcV2CborLists;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl RpcV2CborLists {
    7         -
    /// Creates a new `RpcV2CborLists`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `RpcV2CborLists`
          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::rpc_v2_cbor_lists::RpcV2CborListsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::rpc_v2_cbor_lists::RpcV2CborListsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::rpc_v2_cbor_lists::RpcV2CborListsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +267,284 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RpcV2CborLists {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RpcV2CborLists");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            RpcV2CborListsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            RpcV2CborListsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "RpcV2CborLists",
  105    116   
            "RpcV2Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RpcV2CborLists")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(RpcV2CborListsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::rpc_v2_cbor_lists::RpcV2CborListsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::rpc_v2_cbor_lists::RpcV2CborListsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct RpcV2CborListsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RpcV2CborListsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_rpc_v2_cbor_lists::de_rpc_v2_cbor_lists_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_rpc_v2_cbor_lists::de_rpc_v2_cbor_lists_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct RpcV2CborListsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RpcV2CborListsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::rpc_v2_cbor_lists::RpcV2CborListsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::rpc_v2_cbor_lists::RpcV2CborListsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/service/RpcV2Protocol/operation/RpcV2CborLists").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::rpc_v2_cbor_lists::RpcV2CborListsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
  187    200   
            builder =
  188    201   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  189    202   
            builder =
  190    203   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  191    204   
            builder
  192    205   
        };
  193    206   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_rpc_v2_cbor_lists::ser_rpc_v2_cbor_lists_input(&input)?);
  194    207   
        if let Some(content_length) = body.content_length() {
  195    208   
            let content_length = content_length.to_string();
  196    209   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  197    210   
        }
  198    211   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    212   
    }
  200    213   
}
         214  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  201    215   
#[derive(Debug)]
  202    216   
struct RpcV2CborListsEndpointParamsInterceptor;
  203    217   
  204    218   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RpcV2CborListsEndpointParamsInterceptor {
  205    219   
    fn name(&self) -> &'static str {
  206    220   
        "RpcV2CborListsEndpointParamsInterceptor"
  207    221   
    }
  208    222   
  209    223   
    fn read_before_execution(
  210    224   
        &self,
  211    225   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  212    226   
            '_,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  216    230   
        >,
  217    231   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  218    232   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  219    233   
        let _input = context
  220    234   
            .input()
  221    235   
            .downcast_ref::<RpcV2CborListsInput>()
  222    236   
            .ok_or("failed to downcast to RpcV2CborListsInput")?;
  223    237   
  224    238   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  225    239   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  226    240   
        })?;
  227    241   
        cfg.interceptor_state()
  228    242   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  229    243   
        ::std::result::Result::Ok(())
  230    244   
    }
  231    245   
}
  232    246   
  233    247   
// The get_* functions below are generated from JMESPath expressions in the
  234    248   
// operationContextParams trait. They target the operation's input shape.
  235    249   
         250  +
/* RustType.kt:516 */
  236    251   
#[allow(unreachable_code, unused_variables)]
         252  +
/* RustType.kt:516 */
  237    253   
#[cfg(test)]
         254  +
/* ProtocolTestGenerator.kt:98 */
  238    255   
mod rpc_v2_cbor_lists_test {
  239    256   
  240    257   
    /// Serializes RpcV2 Cbor lists
  241    258   
    /// Test ID: RpcV2CborLists
  242    259   
    #[::tokio::test]
  243    260   
    #[::tracing_test::traced_test]
  244    261   
    async fn rpc_v2_cbor_lists_request() {
  245    262   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  246    263   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  247    264   
@@ -646,663 +785,884 @@
  666    683   
            expected_output.nested_string_list,
  667    684   
            "Unexpected value for `nested_string_list`"
  668    685   
        );
  669    686   
        ::pretty_assertions::assert_eq!(
  670    687   
            parsed.structure_list,
  671    688   
            expected_output.structure_list,
  672    689   
            "Unexpected value for `structure_list`"
  673    690   
        );
  674    691   
        ::pretty_assertions::assert_eq!(parsed.blob_list, expected_output.blob_list, "Unexpected value for `blob_list`");
  675    692   
    }
         693  +
         694  +
    /* ProtocolTestGenerator.kt:98 */
  676    695   
}
  677    696   
         697  +
/* OperationErrorGenerator.kt:79 */
  678    698   
/// Error type for the `RpcV2CborListsError` operation.
         699  +
/* RustType.kt:516 */
  679    700   
#[non_exhaustive]
         701  +
/* RustType.kt:516 */
  680    702   
#[derive(::std::fmt::Debug)]
  681         -
pub enum RpcV2CborListsError {
  682         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         703  +
pub /* OperationErrorGenerator.kt:81 */ enum RpcV2CborListsError {
         704  +
    /// /* OperationErrorGenerator.kt:83 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         705  +
    /* OperationErrorGenerator.kt:86 */
  683    706   
    ValidationError(crate::types::error::ValidationError),
         707  +
    /* OperationErrorGenerator.kt:88 */
  684    708   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  685    709   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  686    710   
    variable wildcard pattern and check `.code()`:
  687    711   
     \
  688    712   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  689    713   
     \
  690    714   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RpcV2CborListsError) for what information is available for the error.")]
  691    715   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         716  +
    /* OperationErrorGenerator.kt:81 */
  692    717   
}
         718  +
/* OperationErrorGenerator.kt:218 */
  693    719   
impl RpcV2CborListsError {
         720  +
    /* OperationErrorGenerator.kt:219 */
  694    721   
    /// Creates the `RpcV2CborListsError::Unhandled` variant from any error type.
  695    722   
    pub fn unhandled(
  696    723   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  697    724   
    ) -> Self {
  698    725   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  699    726   
            source: err.into(),
  700    727   
            meta: ::std::default::Default::default(),
  701    728   
        })
  702    729   
    }
  703    730   
  704    731   
    /// Creates the `RpcV2CborListsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  705    732   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  706    733   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  707    734   
            source: err.clone().into(),
  708    735   
            meta: err,
  709    736   
        })
  710    737   
    }
  711         -
    ///
         738  +
    /// /* OperationErrorGenerator.kt:236 */
  712    739   
    /// Returns error metadata, which includes the error code, message,
  713    740   
    /// request ID, and potentially additional information.
  714    741   
    ///
         742  +
    /* OperationErrorGenerator.kt:242 */
  715    743   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         744  +
        /* OperationErrorGenerator.kt:243 */
  716    745   
        match self {
  717         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  718         -
            Self::Unhandled(e) => &e.meta,
         746  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         747  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         748  +
            /* OperationErrorGenerator.kt:243 */
  719    749   
        }
         750  +
        /* OperationErrorGenerator.kt:242 */
  720    751   
    }
         752  +
    /* OperationErrorGenerator.kt:257 */
  721    753   
    /// Returns `true` if the error kind is `RpcV2CborListsError::ValidationError`.
         754  +
    /* OperationErrorGenerator.kt:258 */
  722    755   
    pub fn is_validation_error(&self) -> bool {
         756  +
        /* OperationErrorGenerator.kt:259 */
  723    757   
        matches!(self, Self::ValidationError(_))
         758  +
        /* OperationErrorGenerator.kt:258 */
  724    759   
    }
         760  +
    /* OperationErrorGenerator.kt:218 */
  725    761   
}
         762  +
/* OperationErrorGenerator.kt:269 */
  726    763   
impl ::std::error::Error for RpcV2CborListsError {
         764  +
    /* OperationErrorGenerator.kt:270 */
  727    765   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         766  +
        /* OperationErrorGenerator.kt:318 */
  728    767   
        match self {
  729         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  730         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         768  +
            /* OperationErrorGenerator.kt:321 */
         769  +
            Self::ValidationError(_inner) =>
         770  +
            /* OperationErrorGenerator.kt:283 */
         771  +
            {
         772  +
                ::std::option::Option::Some(_inner)
         773  +
            }
         774  +
            ,
         775  +
            /* OperationErrorGenerator.kt:326 */
         776  +
            Self::Unhandled(_inner) => {
         777  +
                /* OperationErrorGenerator.kt:279 */
         778  +
                ::std::option::Option::Some(&*_inner.source)
         779  +
                /* OperationErrorGenerator.kt:326 */
         780  +
            } /* OperationErrorGenerator.kt:318 */
  731    781   
        }
         782  +
        /* OperationErrorGenerator.kt:270 */
  732    783   
    }
         784  +
    /* OperationErrorGenerator.kt:269 */
  733    785   
}
         786  +
/* OperationErrorGenerator.kt:133 */
  734    787   
impl ::std::fmt::Display for RpcV2CborListsError {
         788  +
    /* OperationErrorGenerator.kt:134 */
  735    789   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         790  +
        /* OperationErrorGenerator.kt:318 */
  736    791   
        match self {
  737         -
            Self::ValidationError(_inner) => _inner.fmt(f),
         792  +
            /* OperationErrorGenerator.kt:321 */
         793  +
            Self::ValidationError(_inner) =>
         794  +
            /* OperationErrorGenerator.kt:151 */
         795  +
            {
         796  +
                _inner.fmt(f)
         797  +
            }
         798  +
            ,
         799  +
            /* OperationErrorGenerator.kt:326 */
  738    800   
            Self::Unhandled(_inner) => {
         801  +
                /* OperationErrorGenerator.kt:139 */
  739    802   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  740    803   
                    write!(f, "unhandled error ({code})")
  741    804   
                } else {
  742    805   
                    f.write_str("unhandled error")
  743    806   
                }
  744         -
            }
         807  +
                /* OperationErrorGenerator.kt:326 */
         808  +
            } /* OperationErrorGenerator.kt:318 */
  745    809   
        }
         810  +
        /* OperationErrorGenerator.kt:134 */
  746    811   
    }
         812  +
    /* OperationErrorGenerator.kt:133 */
  747    813   
}
         814  +
/* OperationErrorGenerator.kt:182 */
  748    815   
impl ::aws_smithy_types::retry::ProvideErrorKind for RpcV2CborListsError {
         816  +
    /* OperationErrorGenerator.kt:186 */
  749    817   
    fn code(&self) -> ::std::option::Option<&str> {
         818  +
        /* OperationErrorGenerator.kt:187 */
  750    819   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         820  +
        /* OperationErrorGenerator.kt:186 */
  751    821   
    }
         822  +
    /* OperationErrorGenerator.kt:190 */
  752    823   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         824  +
        /* OperationErrorGenerator.kt:197 */
  753    825   
        ::std::option::Option::None
         826  +
        /* OperationErrorGenerator.kt:190 */
  754    827   
    }
         828  +
    /* OperationErrorGenerator.kt:182 */
  755    829   
}
         830  +
/* OperationErrorGenerator.kt:163 */
  756    831   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RpcV2CborListsError {
         832  +
    /* OperationErrorGenerator.kt:164 */
  757    833   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         834  +
        /* OperationErrorGenerator.kt:318 */
  758    835   
        match self {
  759         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  760         -
            Self::Unhandled(_inner) => &_inner.meta,
         836  +
            /* OperationErrorGenerator.kt:321 */
         837  +
            Self::ValidationError(_inner) =>
         838  +
            /* OperationErrorGenerator.kt:169 */
         839  +
            {
         840  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         841  +
            }
         842  +
            ,
         843  +
            /* OperationErrorGenerator.kt:326 */
         844  +
            Self::Unhandled(_inner) => {
         845  +
                /* OperationErrorGenerator.kt:168 */
         846  +
                &_inner.meta
         847  +
                /* OperationErrorGenerator.kt:326 */
         848  +
            } /* OperationErrorGenerator.kt:318 */
  761    849   
        }
         850  +
        /* OperationErrorGenerator.kt:164 */
  762    851   
    }
         852  +
    /* OperationErrorGenerator.kt:163 */
  763    853   
}
         854  +
/* OperationErrorGenerator.kt:109 */
  764    855   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RpcV2CborListsError {
         856  +
    /* OperationErrorGenerator.kt:110 */
  765    857   
    fn create_unhandled_error(
  766    858   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  767    859   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  768    860   
    ) -> Self {
         861  +
        /* OperationErrorGenerator.kt:121 */
  769    862   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  770    863   
            source,
  771    864   
            meta: meta.unwrap_or_default(),
  772    865   
        })
         866  +
        /* OperationErrorGenerator.kt:110 */
  773    867   
    }
         868  +
    /* OperationErrorGenerator.kt:109 */
  774    869   
}
  775    870   
         871  +
/* CodegenDelegator.kt:255 */
  776    872   
pub use crate::operation::rpc_v2_cbor_lists::_rpc_v2_cbor_lists_output::RpcV2CborListsOutput;
  777    873   
         874  +
/* CodegenDelegator.kt:255 */
  778    875   
pub use crate::operation::rpc_v2_cbor_lists::_rpc_v2_cbor_lists_input::RpcV2CborListsInput;
  779    876   
         877  +
/* RustModule.kt:172 */
  780    878   
mod _rpc_v2_cbor_lists_input;
  781    879   
         880  +
/* RustModule.kt:172 */
  782    881   
mod _rpc_v2_cbor_lists_output;
  783    882   
  784         -
/// Builders
         883  +
/// /* CodegenDelegator.kt:51 */Builders
  785    884   
pub mod builders;