Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/simple_struct_operation/builders.rs

@@ -1,1 +418,562 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::simple_struct_operation::_simple_struct_operation_output::SimpleStructOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::simple_struct_operation::_simple_struct_operation_input::SimpleStructOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::simple_struct_operation::builders::SimpleStructOperationInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::simple_struct_operation::SimpleStructOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::simple_struct_operation::SimpleStructOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.simple_struct_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `SimpleStructOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `SimpleStructOperation`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct SimpleStructOperationFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::simple_struct_operation::builders::SimpleStructOperationInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl
   32     38   
    crate::client::customize::internal::CustomizableSend<
   33     39   
        crate::operation::simple_struct_operation::SimpleStructOperationOutput,
   34     40   
        crate::operation::simple_struct_operation::SimpleStructOperationError,
   35     41   
    > for SimpleStructOperationFluentBuilder
   36     42   
{
   37     43   
    fn send(
   38     44   
        self,
   39     45   
        config_override: crate::config::Builder,
   40     46   
    ) -> crate::client::customize::internal::BoxFuture<
   41     47   
        crate::client::customize::internal::SendResult<
   42     48   
            crate::operation::simple_struct_operation::SimpleStructOperationOutput,
   43     49   
            crate::operation::simple_struct_operation::SimpleStructOperationError,
   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 SimpleStructOperationFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `SimpleStructOperationFluentBuilder`.
   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 SimpleStructOperation as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::simple_struct_operation::builders::SimpleStructOperationInputBuilder {
   60     69   
        &self.inner
   61     70   
    }
          71  +
    /* FluentBuilderGenerator.kt:145 */
   62     72   
    /// Sends the request and returns the response.
   63     73   
    ///
   64     74   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     75   
    /// can be matched against.
   66     76   
    ///
   67     77   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     78   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     79   
    /// set when configuring the client.
   70     80   
    pub async fn send(
   71     81   
        self,
   72     82   
    ) -> ::std::result::Result<
   73     83   
        crate::operation::simple_struct_operation::SimpleStructOperationOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::simple_struct_operation::SimpleStructOperationError,
   76     86   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     87   
        >,
   78     88   
    > {
   79     89   
        let input = self
   80     90   
            .inner
   81     91   
            .build()
   82     92   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83     93   
        let runtime_plugins = crate::operation::simple_struct_operation::SimpleStructOperation::operation_runtime_plugins(
   84     94   
            self.handle.runtime_plugins.clone(),
   85     95   
            &self.handle.conf,
   86     96   
            self.config_override,
   87     97   
        );
   88     98   
        crate::operation::simple_struct_operation::SimpleStructOperation::orchestrate(&runtime_plugins, input).await
   89     99   
    }
   90    100   
   91    101   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92    102   
    pub fn customize(
   93    103   
        self,
   94    104   
    ) -> crate::client::customize::CustomizableOperation<
   95    105   
        crate::operation::simple_struct_operation::SimpleStructOperationOutput,
   96    106   
        crate::operation::simple_struct_operation::SimpleStructOperationError,
   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 blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
  112    125   
        self.inner = self.inner.blob(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_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
  117    132   
        self.inner = self.inner.set_blob(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_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
  122    139   
        self.inner.get_blob()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:498 */
  124    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* FluentBuilderGenerator.kt:500 */
  125    144   
    pub fn boolean(mut self, input: bool) -> Self {
  126    145   
        self.inner = self.inner.boolean(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_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
  131    152   
        self.inner = self.inner.set_boolean(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_boolean(&self) -> &::std::option::Option<bool> {
  136    159   
        self.inner.get_boolean()
  137    160   
    }
         161  +
    /* FluentBuilderGenerator.kt:498 */
  138    162   
    #[allow(missing_docs)] // documentation missing in model
         163  +
                           /* FluentBuilderGenerator.kt:500 */
  139    164   
    pub fn string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  140    165   
        self.inner = self.inner.string(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_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  145    172   
        self.inner = self.inner.set_string(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_string(&self) -> &::std::option::Option<::std::string::String> {
  150    179   
        self.inner.get_string()
  151    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:498 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:500 */
  153    184   
    pub fn byte(mut self, input: i8) -> Self {
  154    185   
        self.inner = self.inner.byte(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_byte(mut self, input: ::std::option::Option<i8>) -> Self {
  159    192   
        self.inner = self.inner.set_byte(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_byte(&self) -> &::std::option::Option<i8> {
  164    199   
        self.inner.get_byte()
  165    200   
    }
         201  +
    /* FluentBuilderGenerator.kt:498 */
  166    202   
    #[allow(missing_docs)] // documentation missing in model
         203  +
                           /* FluentBuilderGenerator.kt:500 */
  167    204   
    pub fn short(mut self, input: i16) -> Self {
  168    205   
        self.inner = self.inner.short(input);
  169    206   
        self
  170    207   
    }
         208  +
    /* FluentBuilderGenerator.kt:498 */
  171    209   
    #[allow(missing_docs)] // documentation missing in model
         210  +
                           /* FluentBuilderGenerator.kt:500 */
  172    211   
    pub fn set_short(mut self, input: ::std::option::Option<i16>) -> Self {
  173    212   
        self.inner = self.inner.set_short(input);
  174    213   
        self
  175    214   
    }
         215  +
    /* FluentBuilderGenerator.kt:518 */
  176    216   
    #[allow(missing_docs)] // documentation missing in model
         217  +
                           /* FluentBuilderGenerator.kt:520 */
  177    218   
    pub fn get_short(&self) -> &::std::option::Option<i16> {
  178    219   
        self.inner.get_short()
  179    220   
    }
         221  +
    /* FluentBuilderGenerator.kt:498 */
  180    222   
    #[allow(missing_docs)] // documentation missing in model
         223  +
                           /* FluentBuilderGenerator.kt:500 */
  181    224   
    pub fn integer(mut self, input: i32) -> Self {
  182    225   
        self.inner = self.inner.integer(input);
  183    226   
        self
  184    227   
    }
         228  +
    /* FluentBuilderGenerator.kt:498 */
  185    229   
    #[allow(missing_docs)] // documentation missing in model
         230  +
                           /* FluentBuilderGenerator.kt:500 */
  186    231   
    pub fn set_integer(mut self, input: ::std::option::Option<i32>) -> Self {
  187    232   
        self.inner = self.inner.set_integer(input);
  188    233   
        self
  189    234   
    }
         235  +
    /* FluentBuilderGenerator.kt:518 */
  190    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* FluentBuilderGenerator.kt:520 */
  191    238   
    pub fn get_integer(&self) -> &::std::option::Option<i32> {
  192    239   
        self.inner.get_integer()
  193    240   
    }
         241  +
    /* FluentBuilderGenerator.kt:498 */
  194    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* FluentBuilderGenerator.kt:500 */
  195    244   
    pub fn long(mut self, input: i64) -> Self {
  196    245   
        self.inner = self.inner.long(input);
  197    246   
        self
  198    247   
    }
         248  +
    /* FluentBuilderGenerator.kt:498 */
  199    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* FluentBuilderGenerator.kt:500 */
  200    251   
    pub fn set_long(mut self, input: ::std::option::Option<i64>) -> Self {
  201    252   
        self.inner = self.inner.set_long(input);
  202    253   
        self
  203    254   
    }
         255  +
    /* FluentBuilderGenerator.kt:518 */
  204    256   
    #[allow(missing_docs)] // documentation missing in model
         257  +
                           /* FluentBuilderGenerator.kt:520 */
  205    258   
    pub fn get_long(&self) -> &::std::option::Option<i64> {
  206    259   
        self.inner.get_long()
  207    260   
    }
         261  +
    /* FluentBuilderGenerator.kt:498 */
  208    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
                           /* FluentBuilderGenerator.kt:500 */
  209    264   
    pub fn float(mut self, input: f32) -> Self {
  210    265   
        self.inner = self.inner.float(input);
  211    266   
        self
  212    267   
    }
         268  +
    /* FluentBuilderGenerator.kt:498 */
  213    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* FluentBuilderGenerator.kt:500 */
  214    271   
    pub fn set_float(mut self, input: ::std::option::Option<f32>) -> Self {
  215    272   
        self.inner = self.inner.set_float(input);
  216    273   
        self
  217    274   
    }
         275  +
    /* FluentBuilderGenerator.kt:518 */
  218    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* FluentBuilderGenerator.kt:520 */
  219    278   
    pub fn get_float(&self) -> &::std::option::Option<f32> {
  220    279   
        self.inner.get_float()
  221    280   
    }
         281  +
    /* FluentBuilderGenerator.kt:498 */
  222    282   
    #[allow(missing_docs)] // documentation missing in model
         283  +
                           /* FluentBuilderGenerator.kt:500 */
  223    284   
    pub fn double(mut self, input: f64) -> Self {
  224    285   
        self.inner = self.inner.double(input);
  225    286   
        self
  226    287   
    }
         288  +
    /* FluentBuilderGenerator.kt:498 */
  227    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* FluentBuilderGenerator.kt:500 */
  228    291   
    pub fn set_double(mut self, input: ::std::option::Option<f64>) -> Self {
  229    292   
        self.inner = self.inner.set_double(input);
  230    293   
        self
  231    294   
    }
         295  +
    /* FluentBuilderGenerator.kt:518 */
  232    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* FluentBuilderGenerator.kt:520 */
  233    298   
    pub fn get_double(&self) -> &::std::option::Option<f64> {
  234    299   
        self.inner.get_double()
  235    300   
    }
         301  +
    /* FluentBuilderGenerator.kt:498 */
  236    302   
    #[allow(missing_docs)] // documentation missing in model
         303  +
                           /* FluentBuilderGenerator.kt:500 */
  237    304   
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  238    305   
        self.inner = self.inner.timestamp(input);
  239    306   
        self
  240    307   
    }
         308  +
    /* FluentBuilderGenerator.kt:498 */
  241    309   
    #[allow(missing_docs)] // documentation missing in model
         310  +
                           /* FluentBuilderGenerator.kt:500 */
  242    311   
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  243    312   
        self.inner = self.inner.set_timestamp(input);
  244    313   
        self
  245    314   
    }
         315  +
    /* FluentBuilderGenerator.kt:518 */
  246    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* FluentBuilderGenerator.kt:520 */
  247    318   
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  248    319   
        self.inner.get_timestamp()
  249    320   
    }
         321  +
    /* FluentBuilderGenerator.kt:498 */
  250    322   
    #[allow(missing_docs)] // documentation missing in model
         323  +
                           /* FluentBuilderGenerator.kt:500 */
  251    324   
    pub fn r#enum(mut self, input: crate::types::Suit) -> Self {
  252    325   
        self.inner = self.inner.r#enum(input);
  253    326   
        self
  254    327   
    }
         328  +
    /* FluentBuilderGenerator.kt:498 */
  255    329   
    #[allow(missing_docs)] // documentation missing in model
         330  +
                           /* FluentBuilderGenerator.kt:500 */
  256    331   
    pub fn set_enum(mut self, input: ::std::option::Option<crate::types::Suit>) -> Self {
  257    332   
        self.inner = self.inner.set_enum(input);
  258    333   
        self
  259    334   
    }
         335  +
    /* FluentBuilderGenerator.kt:518 */
  260    336   
    #[allow(missing_docs)] // documentation missing in model
         337  +
                           /* FluentBuilderGenerator.kt:520 */
  261    338   
    pub fn get_enum(&self) -> &::std::option::Option<crate::types::Suit> {
  262    339   
        self.inner.get_enum()
  263    340   
    }
         341  +
    /* FluentBuilderGenerator.kt:498 */
  264    342   
    #[allow(missing_docs)] // documentation missing in model
         343  +
                           /* FluentBuilderGenerator.kt:500 */
  265    344   
    pub fn required_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
  266    345   
        self.inner = self.inner.required_blob(input);
  267    346   
        self
  268    347   
    }
         348  +
    /* FluentBuilderGenerator.kt:498 */
  269    349   
    #[allow(missing_docs)] // documentation missing in model
         350  +
                           /* FluentBuilderGenerator.kt:500 */
  270    351   
    pub fn set_required_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
  271    352   
        self.inner = self.inner.set_required_blob(input);
  272    353   
        self
  273    354   
    }
         355  +
    /* FluentBuilderGenerator.kt:518 */
  274    356   
    #[allow(missing_docs)] // documentation missing in model
         357  +
                           /* FluentBuilderGenerator.kt:520 */
  275    358   
    pub fn get_required_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
  276    359   
        self.inner.get_required_blob()
  277    360   
    }
         361  +
    /* FluentBuilderGenerator.kt:498 */
  278    362   
    #[allow(missing_docs)] // documentation missing in model
         363  +
                           /* FluentBuilderGenerator.kt:500 */
  279    364   
    pub fn required_boolean(mut self, input: bool) -> Self {
  280    365   
        self.inner = self.inner.required_boolean(input);
  281    366   
        self
  282    367   
    }
         368  +
    /* FluentBuilderGenerator.kt:498 */
  283    369   
    #[allow(missing_docs)] // documentation missing in model
         370  +
                           /* FluentBuilderGenerator.kt:500 */
  284    371   
    pub fn set_required_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
  285    372   
        self.inner = self.inner.set_required_boolean(input);
  286    373   
        self
  287    374   
    }
         375  +
    /* FluentBuilderGenerator.kt:518 */
  288    376   
    #[allow(missing_docs)] // documentation missing in model
         377  +
                           /* FluentBuilderGenerator.kt:520 */
  289    378   
    pub fn get_required_boolean(&self) -> &::std::option::Option<bool> {
  290    379   
        self.inner.get_required_boolean()
  291    380   
    }
         381  +
    /* FluentBuilderGenerator.kt:498 */
  292    382   
    #[allow(missing_docs)] // documentation missing in model
         383  +
                           /* FluentBuilderGenerator.kt:500 */
  293    384   
    pub fn required_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  294    385   
        self.inner = self.inner.required_string(input.into());
  295    386   
        self
  296    387   
    }
         388  +
    /* FluentBuilderGenerator.kt:498 */
  297    389   
    #[allow(missing_docs)] // documentation missing in model
         390  +
                           /* FluentBuilderGenerator.kt:500 */
  298    391   
    pub fn set_required_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  299    392   
        self.inner = self.inner.set_required_string(input);
  300    393   
        self
  301    394   
    }
         395  +
    /* FluentBuilderGenerator.kt:518 */
  302    396   
    #[allow(missing_docs)] // documentation missing in model
         397  +
                           /* FluentBuilderGenerator.kt:520 */
  303    398   
    pub fn get_required_string(&self) -> &::std::option::Option<::std::string::String> {
  304    399   
        self.inner.get_required_string()
  305    400   
    }
         401  +
    /* FluentBuilderGenerator.kt:498 */
  306    402   
    #[allow(missing_docs)] // documentation missing in model
         403  +
                           /* FluentBuilderGenerator.kt:500 */
  307    404   
    pub fn required_byte(mut self, input: i8) -> Self {
  308    405   
        self.inner = self.inner.required_byte(input);
  309    406   
        self
  310    407   
    }
         408  +
    /* FluentBuilderGenerator.kt:498 */
  311    409   
    #[allow(missing_docs)] // documentation missing in model
         410  +
                           /* FluentBuilderGenerator.kt:500 */
  312    411   
    pub fn set_required_byte(mut self, input: ::std::option::Option<i8>) -> Self {
  313    412   
        self.inner = self.inner.set_required_byte(input);
  314    413   
        self
  315    414   
    }
         415  +
    /* FluentBuilderGenerator.kt:518 */
  316    416   
    #[allow(missing_docs)] // documentation missing in model
         417  +
                           /* FluentBuilderGenerator.kt:520 */
  317    418   
    pub fn get_required_byte(&self) -> &::std::option::Option<i8> {
  318    419   
        self.inner.get_required_byte()
  319    420   
    }
         421  +
    /* FluentBuilderGenerator.kt:498 */
  320    422   
    #[allow(missing_docs)] // documentation missing in model
         423  +
                           /* FluentBuilderGenerator.kt:500 */
  321    424   
    pub fn required_short(mut self, input: i16) -> Self {
  322    425   
        self.inner = self.inner.required_short(input);
  323    426   
        self
  324    427   
    }
         428  +
    /* FluentBuilderGenerator.kt:498 */
  325    429   
    #[allow(missing_docs)] // documentation missing in model
         430  +
                           /* FluentBuilderGenerator.kt:500 */
  326    431   
    pub fn set_required_short(mut self, input: ::std::option::Option<i16>) -> Self {
  327    432   
        self.inner = self.inner.set_required_short(input);
  328    433   
        self
  329    434   
    }
         435  +
    /* FluentBuilderGenerator.kt:518 */
  330    436   
    #[allow(missing_docs)] // documentation missing in model
         437  +
                           /* FluentBuilderGenerator.kt:520 */
  331    438   
    pub fn get_required_short(&self) -> &::std::option::Option<i16> {
  332    439   
        self.inner.get_required_short()
  333    440   
    }
         441  +
    /* FluentBuilderGenerator.kt:498 */
  334    442   
    #[allow(missing_docs)] // documentation missing in model
         443  +
                           /* FluentBuilderGenerator.kt:500 */
  335    444   
    pub fn required_integer(mut self, input: i32) -> Self {
  336    445   
        self.inner = self.inner.required_integer(input);
  337    446   
        self
  338    447   
    }
         448  +
    /* FluentBuilderGenerator.kt:498 */
  339    449   
    #[allow(missing_docs)] // documentation missing in model
         450  +
                           /* FluentBuilderGenerator.kt:500 */
  340    451   
    pub fn set_required_integer(mut self, input: ::std::option::Option<i32>) -> Self {
  341    452   
        self.inner = self.inner.set_required_integer(input);
  342    453   
        self
  343    454   
    }
         455  +
    /* FluentBuilderGenerator.kt:518 */
  344    456   
    #[allow(missing_docs)] // documentation missing in model
         457  +
                           /* FluentBuilderGenerator.kt:520 */
  345    458   
    pub fn get_required_integer(&self) -> &::std::option::Option<i32> {
  346    459   
        self.inner.get_required_integer()
  347    460   
    }
         461  +
    /* FluentBuilderGenerator.kt:498 */
  348    462   
    #[allow(missing_docs)] // documentation missing in model
         463  +
                           /* FluentBuilderGenerator.kt:500 */
  349    464   
    pub fn required_long(mut self, input: i64) -> Self {
  350    465   
        self.inner = self.inner.required_long(input);
  351    466   
        self
  352    467   
    }
         468  +
    /* FluentBuilderGenerator.kt:498 */
  353    469   
    #[allow(missing_docs)] // documentation missing in model
         470  +
                           /* FluentBuilderGenerator.kt:500 */
  354    471   
    pub fn set_required_long(mut self, input: ::std::option::Option<i64>) -> Self {
  355    472   
        self.inner = self.inner.set_required_long(input);
  356    473   
        self
  357    474   
    }
         475  +
    /* FluentBuilderGenerator.kt:518 */
  358    476   
    #[allow(missing_docs)] // documentation missing in model
         477  +
                           /* FluentBuilderGenerator.kt:520 */
  359    478   
    pub fn get_required_long(&self) -> &::std::option::Option<i64> {
  360    479   
        self.inner.get_required_long()
  361    480   
    }
         481  +
    /* FluentBuilderGenerator.kt:498 */
  362    482   
    #[allow(missing_docs)] // documentation missing in model
         483  +
                           /* FluentBuilderGenerator.kt:500 */
  363    484   
    pub fn required_float(mut self, input: f32) -> Self {
  364    485   
        self.inner = self.inner.required_float(input);
  365    486   
        self
  366    487   
    }
         488  +
    /* FluentBuilderGenerator.kt:498 */
  367    489   
    #[allow(missing_docs)] // documentation missing in model
         490  +
                           /* FluentBuilderGenerator.kt:500 */
  368    491   
    pub fn set_required_float(mut self, input: ::std::option::Option<f32>) -> Self {
  369    492   
        self.inner = self.inner.set_required_float(input);
  370    493   
        self
  371    494   
    }
         495  +
    /* FluentBuilderGenerator.kt:518 */
  372    496   
    #[allow(missing_docs)] // documentation missing in model
         497  +
                           /* FluentBuilderGenerator.kt:520 */
  373    498   
    pub fn get_required_float(&self) -> &::std::option::Option<f32> {
  374    499   
        self.inner.get_required_float()
  375    500   
    }
         501  +
    /* FluentBuilderGenerator.kt:498 */
  376    502   
    #[allow(missing_docs)] // documentation missing in model
         503  +
                           /* FluentBuilderGenerator.kt:500 */
  377    504   
    pub fn required_double(mut self, input: f64) -> Self {
  378    505   
        self.inner = self.inner.required_double(input);
  379    506   
        self
  380    507   
    }
         508  +
    /* FluentBuilderGenerator.kt:498 */
  381    509   
    #[allow(missing_docs)] // documentation missing in model
         510  +
                           /* FluentBuilderGenerator.kt:500 */
  382    511   
    pub fn set_required_double(mut self, input: ::std::option::Option<f64>) -> Self {
  383    512   
        self.inner = self.inner.set_required_double(input);
  384    513   
        self
  385    514   
    }
         515  +
    /* FluentBuilderGenerator.kt:518 */
  386    516   
    #[allow(missing_docs)] // documentation missing in model
         517  +
                           /* FluentBuilderGenerator.kt:520 */
  387    518   
    pub fn get_required_double(&self) -> &::std::option::Option<f64> {
  388    519   
        self.inner.get_required_double()
  389    520   
    }
         521  +
    /* FluentBuilderGenerator.kt:498 */
  390    522   
    #[allow(missing_docs)] // documentation missing in model
         523  +
                           /* FluentBuilderGenerator.kt:500 */
  391    524   
    pub fn required_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  392    525   
        self.inner = self.inner.required_timestamp(input);
  393    526   
        self
  394    527   
    }
         528  +
    /* FluentBuilderGenerator.kt:498 */
  395    529   
    #[allow(missing_docs)] // documentation missing in model
         530  +
                           /* FluentBuilderGenerator.kt:500 */
  396    531   
    pub fn set_required_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  397    532   
        self.inner = self.inner.set_required_timestamp(input);
  398    533   
        self
  399    534   
    }
         535  +
    /* FluentBuilderGenerator.kt:518 */
  400    536   
    #[allow(missing_docs)] // documentation missing in model
         537  +
                           /* FluentBuilderGenerator.kt:520 */
  401    538   
    pub fn get_required_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  402    539   
        self.inner.get_required_timestamp()
  403    540   
    }
         541  +
    /* FluentBuilderGenerator.kt:498 */
  404    542   
    #[allow(missing_docs)] // documentation missing in model
         543  +
                           /* FluentBuilderGenerator.kt:500 */
  405    544   
    pub fn required_enum(mut self, input: crate::types::Suit) -> Self {
  406    545   
        self.inner = self.inner.required_enum(input);
  407    546   
        self
  408    547   
    }
         548  +
    /* FluentBuilderGenerator.kt:498 */
  409    549   
    #[allow(missing_docs)] // documentation missing in model
         550  +
                           /* FluentBuilderGenerator.kt:500 */
  410    551   
    pub fn set_required_enum(mut self, input: ::std::option::Option<crate::types::Suit>) -> Self {
  411    552   
        self.inner = self.inner.set_required_enum(input);
  412    553   
        self
  413    554   
    }
         555  +
    /* FluentBuilderGenerator.kt:518 */
  414    556   
    #[allow(missing_docs)] // documentation missing in model
         557  +
                           /* FluentBuilderGenerator.kt:520 */
  415    558   
    pub fn get_required_enum(&self) -> &::std::option::Option<crate::types::Suit> {
  416    559   
        self.inner.get_required_enum()
  417    560   
    }
         561  +
    /* FluentBuilderGenerator.kt:282 */
  418    562   
}

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation/_single_member_struct_operation_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation/_single_member_struct_operation_output.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation/builders.rs

@@ -1,1 +124,142 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::single_member_struct_operation::_single_member_struct_operation_output::SingleMemberStructOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::single_member_struct_operation::_single_member_struct_operation_input::SingleMemberStructOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationInputBuilder {
    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::single_member_struct_operation::SingleMemberStructOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.single_member_struct_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `SingleMemberStructOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `SingleMemberStructOperation`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct SingleMemberStructOperationFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationInputBuilder,
   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::single_member_struct_operation::SingleMemberStructOperationOutput,
   34     40   
        crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   35     41   
    > for SingleMemberStructOperationFluentBuilder
   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::single_member_struct_operation::SingleMemberStructOperationOutput,
   43     49   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   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 SingleMemberStructOperationFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `SingleMemberStructOperationFluentBuilder`.
   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 SingleMemberStructOperation as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationInputBuilder {
   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::single_member_struct_operation::SingleMemberStructOperationOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   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::single_member_struct_operation::SingleMemberStructOperation::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::single_member_struct_operation::SingleMemberStructOperation::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::single_member_struct_operation::SingleMemberStructOperationOutput,
   96    106   
        crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   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 message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.message(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_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_message(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_message(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_message()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/primitives.rs

@@ -1,1 +9,10 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
    3      4   
pub use ::aws_smithy_types::Blob;
    4         -
pub use ::aws_smithy_types::DateTime;
           5  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;
    5      6   
    6         -
/// Event stream related primitives such as `Message` or `Header`.
           7  +
/// /* ClientRustModule.kt:121 */Event stream related primitives such as `Message` or `Header`.
    7      8   
pub mod event_stream;
    8      9   
    9     10   
pub(crate) mod sealed_enum_unknown;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/primitives/sealed_enum_unknown.rs

@@ -1,1 +21,29 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
           2  +
/* ClientEnumGenerator.kt:189 */
           3  +
/// /* ClientEnumGenerator.kt:189 */Opaque struct used as inner data for the `Unknown` variant defined in enums in
    4      4   
/// the crate.
    5      5   
///
    6      6   
/// This is not intended to be used directly.
           7  +
/* RustType.kt:516 */
    7      8   
#[non_exhaustive]
           9  +
/* RustType.kt:516 */
    8     10   
#[derive(
    9     11   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   10     12   
)]
   11         -
pub struct UnknownVariantValue(pub(crate) ::std::string::String);
          13  +
pub /* ClientEnumGenerator.kt:203 */ struct UnknownVariantValue(pub(crate) ::std::string::String);
          14  +
/* ClientEnumGenerator.kt:204 */
   12     15   
impl UnknownVariantValue {
          16  +
    /* ClientEnumGenerator.kt:206 */
   13     17   
    pub(crate) fn as_str(&self) -> &str {
          18  +
        /* ClientEnumGenerator.kt:207 */
   14     19   
        &self.0
          20  +
        /* ClientEnumGenerator.kt:206 */
   15     21   
    }
          22  +
    /* ClientEnumGenerator.kt:204 */
   16     23   
}
          24  +
/* ClientEnumGenerator.kt:210 */
   17     25   
impl ::std::fmt::Display for UnknownVariantValue {
   18     26   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
   19     27   
        write!(f, "{}", self.0)
   20     28   
    }
   21     29   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResponseDeserializerGenerator.kt:170 */
    2      3   
pub(crate) fn type_erase_result<O, E>(
    3      4   
    result: ::std::result::Result<O, E>,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6      7   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7      8   
>
    8      9   
where
    9     10   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     11   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     12   
{

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_list.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:616 */
    2      3   
pub(crate) fn de_complex_list(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
    6      7   
    ::aws_smithy_cbor::decode::DeserializeError,
    7      8   
> {
    8      9   
    fn member(
    9     10   
        mut list: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
   10     11   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   11     12   
    ) -> ::std::result::Result<

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_map.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:659 */
    2      3   
pub(crate) fn de_complex_map(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>, ::aws_smithy_cbor::decode::DeserializeError>
    5      6   
{
    6      7   
    fn pair(
    7      8   
        mut map: ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>,
    8      9   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9     10   
    ) -> ::std::result::Result<
   10     11   
        ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>,
   11     12   
        ::aws_smithy_cbor::decode::DeserializeError,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_struct.rs

@@ -1,1 +34,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:692 */
    2      3   
pub(crate) fn de_complex_struct(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::ComplexStruct, ::aws_smithy_cbor::decode::DeserializeError> {
           6  +
    /* CborParserGenerator.kt:700 */
    5      7   
    #[allow(clippy::match_single_binding)]
    6      8   
    fn pair(
    7      9   
        mut builder: crate::types::builders::ComplexStructBuilder,
    8     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9     11   
    ) -> ::std::result::Result<crate::types::builders::ComplexStructBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   10     12   
        builder = match decoder.str()?.as_ref() {
   11     13   
            "structure" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| {
   12     14   
                Ok(builder.set_structure(Some(crate::protocol_serde::shape_simple_struct::de_simple_struct(decoder)?)))
   13     15   
            })?,
   14     16   
            "emptyStructure" => ::aws_smithy_cbor::decode::set_optional(builder, decoder, |builder, decoder| {
@@ -36,38 +153,237 @@
   56     58   
                    builder = pair(builder, decoder)?;
   57     59   
                }
   58     60   
            };
   59     61   
        },
   60     62   
        Some(n) => {
   61     63   
            for _ in 0..n {
   62     64   
                builder = pair(builder, decoder)?;
   63     65   
            }
   64     66   
        }
   65     67   
    };
          68  +
    /* CborParserGenerator.kt:726 */
   66     69   
    #[allow(clippy::needless_question_mark)]
          70  +
    /* CborParserGenerator.kt:727 */
   67     71   
    {
          72  +
        /* CborParserGenerator.kt:728 */
   68     73   
        return Ok(crate::serde_util::complex_struct_correct_errors(builder)
   69     74   
            .build()
   70     75   
            .map_err(|err| ::aws_smithy_cbor::decode::DeserializeError::custom(err.to_string(), decoder.position()))?);
          76  +
        /* CborParserGenerator.kt:727 */
   71     77   
    }
          78  +
    /* CborParserGenerator.kt:692 */
   72     79   
}
   73     80   
          81  +
/* CborSerializerGenerator.kt:369 */
   74     82   
pub fn ser_complex_struct(
   75     83   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   76     84   
    #[allow(unused)] input: &crate::types::ComplexStruct,
   77     85   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          86  +
    /* CborSerializerGenerator.kt:377 */
   78     87   
    encoder.begin_map();
          88  +
    /* CborSerializerGenerator.kt:414 */
   79     89   
    if let Some(var_1) = &input.structure {
          90  +
        /* CborSerializerGenerator.kt:486 */
   80     91   
        encoder.str("structure");
          92  +
        /* CborSerializerGenerator.kt:403 */
   81     93   
        crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, var_1)?;
          94  +
        /* CborSerializerGenerator.kt:414 */
   82     95   
    }
          96  +
    /* CborSerializerGenerator.kt:414 */
   83     97   
    if let Some(var_2) = &input.empty_structure {
          98  +
        /* CborSerializerGenerator.kt:486 */
   84     99   
        encoder.str("emptyStructure");
         100  +
        /* CborSerializerGenerator.kt:403 */
   85    101   
        crate::protocol_serde::shape_empty_struct::ser_empty_struct(encoder, var_2)?;
         102  +
        /* CborSerializerGenerator.kt:414 */
   86    103   
    }
         104  +
    /* CborSerializerGenerator.kt:414 */
   87    105   
    if let Some(var_3) = &input.list {
         106  +
        /* CborSerializerGenerator.kt:486 */
   88    107   
        encoder.str("list");
         108  +
        /* CborSerializerGenerator.kt:504 */
   89    109   
        encoder.array((*var_3).len());
         110  +
        /* CborSerializerGenerator.kt:506 */
   90    111   
        for item_4 in var_3 {
         112  +
            /* SerializerUtil.kt:42 */
   91    113   
            {
         114  +
                /* CborSerializerGenerator.kt:462 */
   92    115   
                encoder.str(item_4.as_str());
         116  +
                /* SerializerUtil.kt:42 */
   93    117   
            }
         118  +
            /* CborSerializerGenerator.kt:506 */
   94    119   
        }
         120  +
        /* CborSerializerGenerator.kt:414 */
   95    121   
    }
         122  +
    /* CborSerializerGenerator.kt:414 */
   96    123   
    if let Some(var_5) = &input.map {
         124  +
        /* CborSerializerGenerator.kt:486 */
   97    125   
        encoder.str("map");
         126  +
        /* CborSerializerGenerator.kt:517 */
   98    127   
        encoder.map((*var_5).len());
         128  +
        /* CborSerializerGenerator.kt:518 */
   99    129   
        for (key_6, value_7) in var_5 {
         130  +
            /* SerializerUtil.kt:42 */
  100    131   
            {
         132  +
                /* CborSerializerGenerator.kt:466 */
  101    133   
                encoder.str(key_6.as_str()).integer(*value_7);
         134  +
                /* SerializerUtil.kt:42 */
  102    135   
            }
         136  +
            /* CborSerializerGenerator.kt:518 */
  103    137   
        }
         138  +
        /* CborSerializerGenerator.kt:414 */
  104    139   
    }
         140  +
    /* CborSerializerGenerator.kt:414 */
  105    141   
    if let Some(var_8) = &input.union {
         142  +
        /* CborSerializerGenerator.kt:486 */
  106    143   
        encoder.str("union");
         144  +
        /* CborSerializerGenerator.kt:571 */
  107    145   
        crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, var_8)?;
         146  +
        /* CborSerializerGenerator.kt:414 */
  108    147   
    }
         148  +
    /* CborSerializerGenerator.kt:414 */
  109    149   
    if let Some(var_9) = &input.unit_union {
         150  +
        /* CborSerializerGenerator.kt:486 */
  110    151   
        encoder.str("unitUnion");
         152  +
        /* CborSerializerGenerator.kt:571 */
  111    153   
        crate::protocol_serde::shape_unit_union::ser_unit_union(encoder, var_9)?;
         154  +
        /* CborSerializerGenerator.kt:414 */
  112    155   
    }
         156  +
    /* CborSerializerGenerator.kt:414 */
  113    157   
    if let Some(var_10) = &input.structure_list {
         158  +
        /* CborSerializerGenerator.kt:486 */
  114    159   
        encoder.str("structureList");
         160  +
        /* CborSerializerGenerator.kt:504 */
  115    161   
        encoder.array((*var_10).len());
         162  +
        /* CborSerializerGenerator.kt:506 */
  116    163   
        for item_11 in var_10 {
         164  +
            /* SerializerUtil.kt:42 */
  117    165   
            {
         166  +
                /* CborSerializerGenerator.kt:403 */
  118    167   
                crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, item_11)?;
         168  +
                /* SerializerUtil.kt:42 */
  119    169   
            }
         170  +
            /* CborSerializerGenerator.kt:506 */
  120    171   
        }
         172  +
        /* CborSerializerGenerator.kt:414 */
  121    173   
    }
         174  +
    /* SerializerUtil.kt:42 */
  122    175   
    {
         176  +
        /* CborSerializerGenerator.kt:486 */
  123    177   
        encoder.str("complexList");
         178  +
        /* CborSerializerGenerator.kt:504 */
  124    179   
        encoder.array((input.complex_list).len());
         180  +
        /* CborSerializerGenerator.kt:506 */
  125    181   
        for item_12 in &input.complex_list {
         182  +
            /* SerializerUtil.kt:42 */
  126    183   
            {
         184  +
                /* CborSerializerGenerator.kt:517 */
  127    185   
                encoder.map((*item_12).len());
         186  +
                /* CborSerializerGenerator.kt:518 */
  128    187   
                for (key_13, value_14) in item_12 {
         188  +
                    /* SerializerUtil.kt:42 */
  129    189   
                    {
         190  +
                        /* CborSerializerGenerator.kt:486 */
  130    191   
                        encoder.str(key_13.as_str());
         192  +
                        /* CborSerializerGenerator.kt:571 */
  131    193   
                        crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, value_14)?;
         194  +
                        /* SerializerUtil.kt:42 */
  132    195   
                    }
         196  +
                    /* CborSerializerGenerator.kt:518 */
  133    197   
                }
         198  +
                /* SerializerUtil.kt:42 */
  134    199   
            }
         200  +
            /* CborSerializerGenerator.kt:506 */
  135    201   
        }
         202  +
        /* SerializerUtil.kt:42 */
  136    203   
    }
         204  +
    /* SerializerUtil.kt:42 */
  137    205   
    {
         206  +
        /* CborSerializerGenerator.kt:486 */
  138    207   
        encoder.str("complexMap");
         208  +
        /* CborSerializerGenerator.kt:517 */
  139    209   
        encoder.map((input.complex_map).len());
         210  +
        /* CborSerializerGenerator.kt:518 */
  140    211   
        for (key_15, value_16) in &input.complex_map {
         212  +
            /* SerializerUtil.kt:42 */
  141    213   
            {
         214  +
                /* CborSerializerGenerator.kt:486 */
  142    215   
                encoder.str(key_15.as_str());
         216  +
                /* CborSerializerGenerator.kt:571 */
  143    217   
                crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, value_16)?;
         218  +
                /* SerializerUtil.kt:42 */
  144    219   
            }
         220  +
            /* CborSerializerGenerator.kt:518 */
  145    221   
        }
         222  +
        /* SerializerUtil.kt:42 */
  146    223   
    }
         224  +
    /* SerializerUtil.kt:42 */
  147    225   
    {
         226  +
        /* CborSerializerGenerator.kt:486 */
  148    227   
        encoder.str("complexUnion");
         228  +
        /* CborSerializerGenerator.kt:571 */
  149    229   
        crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, &input.complex_union)?;
         230  +
        /* SerializerUtil.kt:42 */
  150    231   
    }
         232  +
    /* CborSerializerGenerator.kt:393 */
  151    233   
    encoder.end();
         234  +
    /* CborSerializerGenerator.kt:394 */
  152    235   
    Ok(())
         236  +
    /* CborSerializerGenerator.kt:369 */
  153    237   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_struct_operation.rs

@@ -1,1 +104,134 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_complex_struct_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::complex_struct_operation::ComplexStructOperationOutput,
    9     11   
    crate::operation::complex_struct_operation::ComplexStructOperationError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:122 */
   15     21   
    let error_code = match generic.code() {
   16     22   
        Some(code) => code,
   17     23   
        None => {
   18     24   
            return Err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled(
   19     25   
                generic,
   20     26   
            ))
   21     27   
        }
   22     28   
    };
   23     29   
   24     30   
    let _error_message = generic.message().map(|msg| msg.to_owned());
          31  +
    /* ProtocolParserGenerator.kt:133 */
   25     32   
    Err(match error_code {
          33  +
        /* ProtocolParserGenerator.kt:139 */
   26     34   
        "ValidationException" => crate::operation::complex_struct_operation::ComplexStructOperationError::ValidationError({
          35  +
            /* RustType.kt:516 */
   27     36   
            #[allow(unused_mut)]
   28         -
            let mut tmp = {
   29         -
                #[allow(unused_mut)]
   30         -
                let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
   31         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_cbor_err(_response_body, output)
   32         -
                    .map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?;
   33         -
                let output = output.meta(generic);
   34         -
                crate::serde_util::validation_exception_correct_errors(output)
   35         -
                    .build()
   36         -
                    .map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?
   37         -
            };
          37  +
            /* ProtocolParserGenerator.kt:145 */let mut tmp =
          38  +
                /* ProtocolParserGenerator.kt:146 */ {
          39  +
                    /* RustType.kt:516 */#[allow(unused_mut)]
          40  +
                    /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
          41  +
                    /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_validation_exception::de_validation_exception_cbor_err(_response_body, output).map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?;
          42  +
                    /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
          43  +
                    /* ClientBuilderInstantiator.kt:46 */crate::serde_util::validation_exception_correct_errors(output).build().map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?
          44  +
                /* ProtocolParserGenerator.kt:146 */}
          45  +
            /* ProtocolParserGenerator.kt:145 */;
          46  +
            /* ProtocolParserGenerator.kt:179 */
   38     47   
            tmp
          48  +
            /* ProtocolParserGenerator.kt:139 */
   39     49   
        }),
   40         -
        _ => crate::operation::complex_struct_operation::ComplexStructOperationError::generic(generic),
          50  +
        /* ProtocolParserGenerator.kt:182 */
          51  +
        _ => crate::operation::complex_struct_operation::ComplexStructOperationError::generic(generic), /* ProtocolParserGenerator.kt:133 */
   41     52   
    })
          53  +
    /* ProtocolParserGenerator.kt:99 */
   42     54   
}
   43     55   
          56  +
/* RustType.kt:516 */
   44     57   
#[allow(clippy::unnecessary_wraps)]
          58  +
/* ProtocolParserGenerator.kt:71 */
   45     59   
pub fn de_complex_struct_operation_http_response(
   46     60   
    _response_status: u16,
   47     61   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   48     62   
    _response_body: &[u8],
   49     63   
) -> std::result::Result<
   50     64   
    crate::operation::complex_struct_operation::ComplexStructOperationOutput,
   51     65   
    crate::operation::complex_struct_operation::ComplexStructOperationError,
   52     66   
> {
          67  +
    /* ProtocolParserGenerator.kt:77 */
   53     68   
    Ok({
          69  +
        /* RustType.kt:516 */
   54     70   
        #[allow(unused_mut)]
          71  +
        /* ProtocolParserGenerator.kt:240 */
   55     72   
        let mut output = crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::default();
          73  +
        /* ProtocolParserGenerator.kt:247 */
   56     74   
        output = crate::protocol_serde::shape_complex_struct_operation::de_complex_struct_operation(_response_body, output)
   57     75   
            .map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?;
          76  +
        /* ClientBuilderInstantiator.kt:46 */
   58     77   
        crate::serde_util::complex_struct_operation_output_output_correct_errors(output)
   59     78   
            .build()
   60     79   
            .map_err(crate::operation::complex_struct_operation::ComplexStructOperationError::unhandled)?
          80  +
        /* ProtocolParserGenerator.kt:77 */
   61     81   
    })
          82  +
    /* ProtocolParserGenerator.kt:71 */
   62     83   
}
   63     84   
          85  +
/* CborSerializerGenerator.kt:285 */
   64     86   
pub fn ser_complex_struct_operation_input(
   65     87   
    input: &crate::operation::complex_struct_operation::ComplexStructOperationInput,
   66     88   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          89  +
    /* CborSerializerGenerator.kt:289 */
   67     90   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          91  +
    /* CborSerializerGenerator.kt:292 */
   68     92   
    {
          93  +
        /* CborSerializerGenerator.kt:293 */
   69     94   
        let encoder = &mut encoder;
          95  +
        /* CborSerializerGenerator.kt:403 */
   70     96   
        crate::protocol_serde::shape_complex_struct_operation_input::ser_complex_struct_operation_input_input(encoder, input)?;
          97  +
        /* CborSerializerGenerator.kt:292 */
   71     98   
    }
          99  +
    /* CborSerializerGenerator.kt:296 */
   72    100   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
         101  +
    /* CborSerializerGenerator.kt:285 */
   73    102   
}
   74    103   
         104  +
/* CborParserGenerator.kt:482 */
   75    105   
pub(crate) fn de_complex_struct_operation(
   76    106   
    value: &[u8],
   77    107   
    mut builder: crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder,
   78    108   
) -> ::std::result::Result<
   79    109   
    crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder,
   80    110   
    ::aws_smithy_cbor::decode::DeserializeError,
   81    111   
> {
   82    112   
    #[allow(clippy::match_single_binding)]
   83    113   
    fn pair(
   84    114   
        mut builder: crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_struct_operation_input.rs

@@ -1,1 +81,158 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_complex_struct_operation_input_input(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::operation::complex_struct_operation::ComplexStructOperationInput,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* CborSerializerGenerator.kt:377 */
    6      8   
    encoder.begin_map();
           9  +
    /* CborSerializerGenerator.kt:414 */
    7     10   
    if let Some(var_1) = &input.structure {
          11  +
        /* CborSerializerGenerator.kt:486 */
    8     12   
        encoder.str("structure");
          13  +
        /* CborSerializerGenerator.kt:403 */
    9     14   
        crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, var_1)?;
          15  +
        /* CborSerializerGenerator.kt:414 */
   10     16   
    }
          17  +
    /* CborSerializerGenerator.kt:414 */
   11     18   
    if let Some(var_2) = &input.empty_structure {
          19  +
        /* CborSerializerGenerator.kt:486 */
   12     20   
        encoder.str("emptyStructure");
          21  +
        /* CborSerializerGenerator.kt:403 */
   13     22   
        crate::protocol_serde::shape_empty_struct::ser_empty_struct(encoder, var_2)?;
          23  +
        /* CborSerializerGenerator.kt:414 */
   14     24   
    }
          25  +
    /* CborSerializerGenerator.kt:414 */
   15     26   
    if let Some(var_3) = &input.list {
          27  +
        /* CborSerializerGenerator.kt:486 */
   16     28   
        encoder.str("list");
          29  +
        /* CborSerializerGenerator.kt:504 */
   17     30   
        encoder.array((*var_3).len());
          31  +
        /* CborSerializerGenerator.kt:506 */
   18     32   
        for item_4 in var_3 {
          33  +
            /* SerializerUtil.kt:42 */
   19     34   
            {
          35  +
                /* CborSerializerGenerator.kt:462 */
   20     36   
                encoder.str(item_4.as_str());
          37  +
                /* SerializerUtil.kt:42 */
   21     38   
            }
          39  +
            /* CborSerializerGenerator.kt:506 */
   22     40   
        }
          41  +
        /* CborSerializerGenerator.kt:414 */
   23     42   
    }
          43  +
    /* CborSerializerGenerator.kt:414 */
   24     44   
    if let Some(var_5) = &input.map {
          45  +
        /* CborSerializerGenerator.kt:486 */
   25     46   
        encoder.str("map");
          47  +
        /* CborSerializerGenerator.kt:517 */
   26     48   
        encoder.map((*var_5).len());
          49  +
        /* CborSerializerGenerator.kt:518 */
   27     50   
        for (key_6, value_7) in var_5 {
          51  +
            /* SerializerUtil.kt:42 */
   28     52   
            {
          53  +
                /* CborSerializerGenerator.kt:466 */
   29     54   
                encoder.str(key_6.as_str()).integer(*value_7);
          55  +
                /* SerializerUtil.kt:42 */
   30     56   
            }
          57  +
            /* CborSerializerGenerator.kt:518 */
   31     58   
        }
          59  +
        /* CborSerializerGenerator.kt:414 */
   32     60   
    }
          61  +
    /* CborSerializerGenerator.kt:414 */
   33     62   
    if let Some(var_8) = &input.union {
          63  +
        /* CborSerializerGenerator.kt:486 */
   34     64   
        encoder.str("union");
          65  +
        /* CborSerializerGenerator.kt:571 */
   35     66   
        crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, var_8)?;
          67  +
        /* CborSerializerGenerator.kt:414 */
   36     68   
    }
          69  +
    /* CborSerializerGenerator.kt:414 */
   37     70   
    if let Some(var_9) = &input.unit_union {
          71  +
        /* CborSerializerGenerator.kt:486 */
   38     72   
        encoder.str("unitUnion");
          73  +
        /* CborSerializerGenerator.kt:571 */
   39     74   
        crate::protocol_serde::shape_unit_union::ser_unit_union(encoder, var_9)?;
          75  +
        /* CborSerializerGenerator.kt:414 */
   40     76   
    }
          77  +
    /* CborSerializerGenerator.kt:414 */
   41     78   
    if let Some(var_10) = &input.structure_list {
          79  +
        /* CborSerializerGenerator.kt:486 */
   42     80   
        encoder.str("structureList");
          81  +
        /* CborSerializerGenerator.kt:504 */
   43     82   
        encoder.array((*var_10).len());
          83  +
        /* CborSerializerGenerator.kt:506 */
   44     84   
        for item_11 in var_10 {
          85  +
            /* SerializerUtil.kt:42 */
   45     86   
            {
          87  +
                /* CborSerializerGenerator.kt:403 */
   46     88   
                crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, item_11)?;
          89  +
                /* SerializerUtil.kt:42 */
   47     90   
            }
          91  +
            /* CborSerializerGenerator.kt:506 */
   48     92   
        }
          93  +
        /* CborSerializerGenerator.kt:414 */
   49     94   
    }
          95  +
    /* CborSerializerGenerator.kt:414 */
   50     96   
    if let Some(var_12) = &input.complex_list {
          97  +
        /* CborSerializerGenerator.kt:486 */
   51     98   
        encoder.str("complexList");
          99  +
        /* CborSerializerGenerator.kt:504 */
   52    100   
        encoder.array((*var_12).len());
         101  +
        /* CborSerializerGenerator.kt:506 */
   53    102   
        for item_13 in var_12 {
         103  +
            /* SerializerUtil.kt:42 */
   54    104   
            {
         105  +
                /* CborSerializerGenerator.kt:517 */
   55    106   
                encoder.map((*item_13).len());
         107  +
                /* CborSerializerGenerator.kt:518 */
   56    108   
                for (key_14, value_15) in item_13 {
         109  +
                    /* SerializerUtil.kt:42 */
   57    110   
                    {
         111  +
                        /* CborSerializerGenerator.kt:486 */
   58    112   
                        encoder.str(key_14.as_str());
         113  +
                        /* CborSerializerGenerator.kt:571 */
   59    114   
                        crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, value_15)?;
         115  +
                        /* SerializerUtil.kt:42 */
   60    116   
                    }
         117  +
                    /* CborSerializerGenerator.kt:518 */
   61    118   
                }
         119  +
                /* SerializerUtil.kt:42 */
   62    120   
            }
         121  +
            /* CborSerializerGenerator.kt:506 */
   63    122   
        }
         123  +
        /* CborSerializerGenerator.kt:414 */
   64    124   
    }
         125  +
    /* CborSerializerGenerator.kt:414 */
   65    126   
    if let Some(var_16) = &input.complex_map {
         127  +
        /* CborSerializerGenerator.kt:486 */
   66    128   
        encoder.str("complexMap");
         129  +
        /* CborSerializerGenerator.kt:517 */
   67    130   
        encoder.map((*var_16).len());
         131  +
        /* CborSerializerGenerator.kt:518 */
   68    132   
        for (key_17, value_18) in var_16 {
         133  +
            /* SerializerUtil.kt:42 */
   69    134   
            {
         135  +
                /* CborSerializerGenerator.kt:486 */
   70    136   
                encoder.str(key_17.as_str());
         137  +
                /* CborSerializerGenerator.kt:571 */
   71    138   
                crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, value_18)?;
         139  +
                /* SerializerUtil.kt:42 */
   72    140   
            }
         141  +
            /* CborSerializerGenerator.kt:518 */
   73    142   
        }
         143  +
        /* CborSerializerGenerator.kt:414 */
   74    144   
    }
         145  +
    /* CborSerializerGenerator.kt:414 */
   75    146   
    if let Some(var_19) = &input.complex_union {
         147  +
        /* CborSerializerGenerator.kt:486 */
   76    148   
        encoder.str("complexUnion");
         149  +
        /* CborSerializerGenerator.kt:571 */
   77    150   
        crate::protocol_serde::shape_complex_union::ser_complex_union(encoder, var_19)?;
         151  +
        /* CborSerializerGenerator.kt:414 */
   78    152   
    }
         153  +
    /* CborSerializerGenerator.kt:393 */
   79    154   
    encoder.end();
         155  +
    /* CborSerializerGenerator.kt:394 */
   80    156   
    Ok(())
         157  +
    /* CborSerializerGenerator.kt:369 */
   81    158   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_union.rs

@@ -1,1 +81,138 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:749 */
    2      3   
pub(crate) fn de_complex_union(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::ComplexUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(
    6      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    7      8   
    ) -> ::std::result::Result<crate::types::ComplexUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    8      9   
        Ok(match decoder.str()?.as_ref() {
    9     10   
            "complexStruct" => crate::types::ComplexUnion::ComplexStruct(crate::protocol_serde::shape_complex_struct::de_complex_struct(decoder)?),
   10     11   
            "structure" => crate::types::ComplexUnion::Structure(crate::protocol_serde::shape_simple_struct::de_simple_struct(decoder)?),
   11     12   
            "list" => crate::types::ComplexUnion::List(crate::protocol_serde::shape_simple_list::de_simple_list(decoder)?),
   12     13   
            "map" => crate::types::ComplexUnion::Map(crate::protocol_serde::shape_simple_map::de_simple_map(decoder)?),
   13     14   
            "union" => crate::types::ComplexUnion::Union(crate::protocol_serde::shape_simple_union::de_simple_union(decoder)?),
   14     15   
            _ => {
   15     16   
                decoder.skip()?;
   16     17   
                crate::types::ComplexUnion::Unknown
   17     18   
            }
   18     19   
        })
   19     20   
    }
   20     21   
   21     22   
    match decoder.map()? {
   22     23   
        None => {
   23     24   
            let variant = pair(decoder)?;
   24     25   
            match decoder.datatype()? {
   25     26   
                ::aws_smithy_cbor::data::Type::Break => {
   26     27   
                    decoder.skip()?;
   27     28   
                    Ok(variant)
   28     29   
                }
   29     30   
                ty => Err(::aws_smithy_cbor::decode::DeserializeError::unexpected_union_variant(
   30     31   
                    ty,
   31     32   
                    decoder.position(),
   32     33   
                )),
   33     34   
            }
   34     35   
        }
   35     36   
        Some(1) => pair(decoder),
   36     37   
        Some(_) => Err(::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position())),
   37     38   
    }
   38     39   
}
   39     40   
          41  +
/* CborSerializerGenerator.kt:528 */
   40     42   
pub fn ser_complex_union(
   41     43   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   42     44   
    input: &crate::types::ComplexUnion,
   43     45   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          46  +
    /* CborSerializerGenerator.kt:545 */
   44     47   
    encoder.map(1);
          48  +
    /* CborSerializerGenerator.kt:548 */
   45     49   
    match input {
          50  +
        /* CborSerializerGenerator.kt:556 */
   46     51   
        crate::types::ComplexUnion::ComplexStruct(inner) => {
   47         -
            encoder.str("complexStruct");
   48         -
            crate::protocol_serde::shape_complex_struct::ser_complex_struct(encoder, inner)?;
          52  +
            /* SerializerUtil.kt:42 */
          53  +
            {
          54  +
                /* CborSerializerGenerator.kt:486 */
          55  +
                encoder.str("complexStruct");
          56  +
                /* CborSerializerGenerator.kt:403 */
          57  +
                crate::protocol_serde::shape_complex_struct::ser_complex_struct(encoder, inner)?;
          58  +
                /* SerializerUtil.kt:42 */
          59  +
            }
          60  +
            /* CborSerializerGenerator.kt:556 */
   49     61   
        }
          62  +
        /* CborSerializerGenerator.kt:556 */
   50     63   
        crate::types::ComplexUnion::Structure(inner) => {
   51         -
            encoder.str("structure");
   52         -
            crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, inner)?;
          64  +
            /* SerializerUtil.kt:42 */
          65  +
            {
          66  +
                /* CborSerializerGenerator.kt:486 */
          67  +
                encoder.str("structure");
          68  +
                /* CborSerializerGenerator.kt:403 */
          69  +
                crate::protocol_serde::shape_simple_struct::ser_simple_struct(encoder, inner)?;
          70  +
                /* SerializerUtil.kt:42 */
          71  +
            }
          72  +
            /* CborSerializerGenerator.kt:556 */
   53     73   
        }
          74  +
        /* CborSerializerGenerator.kt:556 */
   54     75   
        crate::types::ComplexUnion::List(inner) => {
   55         -
            encoder.str("list");
   56         -
            encoder.array((*inner).len());
   57         -
            for item_1 in inner {
   58         -
                {
   59         -
                    encoder.str(item_1.as_str());
          76  +
            /* SerializerUtil.kt:42 */
          77  +
            {
          78  +
                /* CborSerializerGenerator.kt:486 */
          79  +
                encoder.str("list");
          80  +
                /* CborSerializerGenerator.kt:504 */
          81  +
                encoder.array((*inner).len());
          82  +
                /* CborSerializerGenerator.kt:506 */
          83  +
                for item_1 in inner {
          84  +
                    /* SerializerUtil.kt:42 */
          85  +
                    {
          86  +
                        /* CborSerializerGenerator.kt:462 */
          87  +
                        encoder.str(item_1.as_str());
          88  +
                        /* SerializerUtil.kt:42 */
          89  +
                    }
          90  +
                    /* CborSerializerGenerator.kt:506 */
   60     91   
                }
          92  +
                /* SerializerUtil.kt:42 */
   61     93   
            }
          94  +
            /* CborSerializerGenerator.kt:556 */
   62     95   
        }
          96  +
        /* CborSerializerGenerator.kt:556 */
   63     97   
        crate::types::ComplexUnion::Map(inner) => {
   64         -
            encoder.str("map");
   65         -
            encoder.map((*inner).len());
   66         -
            for (key_2, value_3) in inner {
   67         -
                {
   68         -
                    encoder.str(key_2.as_str()).integer(*value_3);
          98  +
            /* SerializerUtil.kt:42 */
          99  +
            {
         100  +
                /* CborSerializerGenerator.kt:486 */
         101  +
                encoder.str("map");
         102  +
                /* CborSerializerGenerator.kt:517 */
         103  +
                encoder.map((*inner).len());
         104  +
                /* CborSerializerGenerator.kt:518 */
         105  +
                for (key_2, value_3) in inner {
         106  +
                    /* SerializerUtil.kt:42 */
         107  +
                    {
         108  +
                        /* CborSerializerGenerator.kt:466 */
         109  +
                        encoder.str(key_2.as_str()).integer(*value_3);
         110  +
                        /* SerializerUtil.kt:42 */
         111  +
                    }
         112  +
                    /* CborSerializerGenerator.kt:518 */
   69    113   
                }
         114  +
                /* SerializerUtil.kt:42 */
   70    115   
            }
         116  +
            /* CborSerializerGenerator.kt:556 */
   71    117   
        }
         118  +
        /* CborSerializerGenerator.kt:556 */
   72    119   
        crate::types::ComplexUnion::Union(inner) => {
   73         -
            encoder.str("union");
   74         -
            crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, inner)?;
         120  +
            /* SerializerUtil.kt:42 */
         121  +
            {
         122  +
                /* CborSerializerGenerator.kt:486 */
         123  +
                encoder.str("union");
         124  +
                /* CborSerializerGenerator.kt:571 */
         125  +
                crate::protocol_serde::shape_simple_union::ser_simple_union(encoder, inner)?;
         126  +
                /* SerializerUtil.kt:42 */
         127  +
            }
         128  +
            /* CborSerializerGenerator.kt:556 */
   75    129   
        }
         130  +
        /* CborSerializerGenerator.kt:561 */
   76    131   
        crate::types::ComplexUnion::Unknown => {
   77    132   
            return ::std::result::Result::Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ComplexUnion"))
   78         -
        }
         133  +
        } /* CborSerializerGenerator.kt:548 */
   79    134   
    }
         135  +
    /* CborSerializerGenerator.kt:568 */
   80    136   
    ::std::result::Result::Ok(())
         137  +
    /* CborSerializerGenerator.kt:528 */
   81    138   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_empty_struct.rs

@@ -1,1 +52,64 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:692 */
    2      3   
pub(crate) fn de_empty_struct(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::types::EmptyStruct, ::aws_smithy_cbor::decode::DeserializeError> {
           6  +
    /* CborParserGenerator.kt:700 */
    5      7   
    #[allow(clippy::match_single_binding)]
    6      8   
    fn pair(
    7      9   
        mut builder: crate::types::builders::EmptyStructBuilder,
    8     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9     11   
    ) -> ::std::result::Result<crate::types::builders::EmptyStructBuilder, ::aws_smithy_cbor::decode::DeserializeError> {
   10     12   
        builder = match decoder.str()?.as_ref() {
   11     13   
            _ => {
   12     14   
                decoder.skip()?;
   13     15   
                builder
   14     16   
            }
   15     17   
        };
   16     18   
        Ok(builder)
   17     19   
    }
   18     20   
   19     21   
    let mut builder = crate::types::builders::EmptyStructBuilder::default();
   20     22   
   21     23   
    match decoder.map()? {
   22     24   
        None => loop {
   23     25   
            match decoder.datatype()? {
   24     26   
                ::aws_smithy_cbor::data::Type::Break => {
   25     27   
                    decoder.skip()?;
   26     28   
                    break;
   27     29   
                }
   28     30   
                _ => {
   29     31   
                    builder = pair(builder, decoder)?;
   30     32   
                }
   31     33   
            };
   32     34   
        },
   33     35   
        Some(n) => {
   34     36   
            for _ in 0..n {
   35     37   
                builder = pair(builder, decoder)?;
   36     38   
            }
   37     39   
        }
   38     40   
    };
          41  +
    /* CborParserGenerator.kt:726 */
   39     42   
    #[allow(clippy::needless_question_mark)]
          43  +
    /* CborParserGenerator.kt:727 */
   40     44   
    {
          45  +
        /* CborParserGenerator.kt:728 */
   41     46   
        return Ok(builder.build());
          47  +
        /* CborParserGenerator.kt:727 */
   42     48   
    }
          49  +
    /* CborParserGenerator.kt:692 */
   43     50   
}
   44     51   
          52  +
/* CborSerializerGenerator.kt:369 */
   45     53   
pub fn ser_empty_struct(
   46     54   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   47     55   
    #[allow(unused)] input: &crate::types::EmptyStruct,
   48     56   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          57  +
    /* CborSerializerGenerator.kt:377 */
   49     58   
    encoder.begin_map();
          59  +
    /* CborSerializerGenerator.kt:393 */
   50     60   
    encoder.end();
          61  +
    /* CborSerializerGenerator.kt:394 */
   51     62   
    Ok(())
          63  +
    /* CborSerializerGenerator.kt:369 */
   52     64   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_empty_struct_operation.rs

@@ -1,1 +43,66 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_empty_struct_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::empty_struct_operation::EmptyStructOperationOutput,
    9     11   
    crate::operation::empty_struct_operation::EmptyStructOperationError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::cbor_errors::parse_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::empty_struct_operation::EmptyStructOperationError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::empty_struct_operation::EmptyStructOperationError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_empty_struct_operation_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::empty_struct_operation::EmptyStructOperationOutput,
   25     34   
    crate::operation::empty_struct_operation::EmptyStructOperationError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::empty_struct_operation::builders::EmptyStructOperationOutputBuilder::default();
          42  +
        /* ClientBuilderInstantiator.kt:56 */
   30     43   
        output.build()
          44  +
        /* ProtocolParserGenerator.kt:77 */
   31     45   
    })
          46  +
    /* ProtocolParserGenerator.kt:71 */
   32     47   
}
   33     48   
          49  +
/* CborSerializerGenerator.kt:285 */
   34     50   
pub fn ser_empty_struct_operation_input(
   35     51   
    input: &crate::operation::empty_struct_operation::EmptyStructOperationInput,
   36     52   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          53  +
    /* CborSerializerGenerator.kt:289 */
   37     54   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
          55  +
    /* CborSerializerGenerator.kt:292 */
   38     56   
    {
          57  +
        /* CborSerializerGenerator.kt:293 */
   39     58   
        let encoder = &mut encoder;
          59  +
        /* CborSerializerGenerator.kt:403 */
   40     60   
        crate::protocol_serde::shape_empty_struct_operation_input::ser_empty_struct_operation_input_input(encoder, input)?;
          61  +
        /* CborSerializerGenerator.kt:292 */
   41     62   
    }
          63  +
    /* CborSerializerGenerator.kt:296 */
   42     64   
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
          65  +
    /* CborSerializerGenerator.kt:285 */
   43     66   
}