Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +398,518 @@
    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::input_and_output_with_headers::_input_and_output_with_headers_output::InputAndOutputWithHeadersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::input_and_output_with_headers::_input_and_output_with_headers_input::InputAndOutputWithHeadersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersInputBuilder {
    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::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.input_and_output_with_headers();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `InputAndOutputWithHeaders`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `InputAndOutputWithHeaders`.
   24     27   
///
   25         -
/// The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct InputAndOutputWithHeadersFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   35     41   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   36     42   
    > for InputAndOutputWithHeadersFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   44     50   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl InputAndOutputWithHeadersFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `InputAndOutputWithHeadersFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the InputAndOutputWithHeaders as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::input_and_output_with_headers::InputAndOutputWithHeaders::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeaders::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   97    107   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn header_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.header_string(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_header_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_header_string(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_header_string(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_header_string()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn header_byte(mut self, input: i8) -> Self {
  127    146   
        self.inner = self.inner.header_byte(input);
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_header_byte(mut self, input: ::std::option::Option<i8>) -> Self {
  132    153   
        self.inner = self.inner.set_header_byte(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_header_byte(&self) -> &::std::option::Option<i8> {
  137    160   
        self.inner.get_header_byte()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:498 */
  139    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* FluentBuilderGenerator.kt:500 */
  140    165   
    pub fn header_short(mut self, input: i16) -> Self {
  141    166   
        self.inner = self.inner.header_short(input);
  142    167   
        self
  143    168   
    }
         169  +
    /* FluentBuilderGenerator.kt:498 */
  144    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* FluentBuilderGenerator.kt:500 */
  145    172   
    pub fn set_header_short(mut self, input: ::std::option::Option<i16>) -> Self {
  146    173   
        self.inner = self.inner.set_header_short(input);
  147    174   
        self
  148    175   
    }
         176  +
    /* FluentBuilderGenerator.kt:518 */
  149    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* FluentBuilderGenerator.kt:520 */
  150    179   
    pub fn get_header_short(&self) -> &::std::option::Option<i16> {
  151    180   
        self.inner.get_header_short()
  152    181   
    }
         182  +
    /* FluentBuilderGenerator.kt:498 */
  153    183   
    #[allow(missing_docs)] // documentation missing in model
         184  +
                           /* FluentBuilderGenerator.kt:500 */
  154    185   
    pub fn header_integer(mut self, input: i32) -> Self {
  155    186   
        self.inner = self.inner.header_integer(input);
  156    187   
        self
  157    188   
    }
         189  +
    /* FluentBuilderGenerator.kt:498 */
  158    190   
    #[allow(missing_docs)] // documentation missing in model
         191  +
                           /* FluentBuilderGenerator.kt:500 */
  159    192   
    pub fn set_header_integer(mut self, input: ::std::option::Option<i32>) -> Self {
  160    193   
        self.inner = self.inner.set_header_integer(input);
  161    194   
        self
  162    195   
    }
         196  +
    /* FluentBuilderGenerator.kt:518 */
  163    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* FluentBuilderGenerator.kt:520 */
  164    199   
    pub fn get_header_integer(&self) -> &::std::option::Option<i32> {
  165    200   
        self.inner.get_header_integer()
  166    201   
    }
         202  +
    /* FluentBuilderGenerator.kt:498 */
  167    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* FluentBuilderGenerator.kt:500 */
  168    205   
    pub fn header_long(mut self, input: i64) -> Self {
  169    206   
        self.inner = self.inner.header_long(input);
  170    207   
        self
  171    208   
    }
         209  +
    /* FluentBuilderGenerator.kt:498 */
  172    210   
    #[allow(missing_docs)] // documentation missing in model
         211  +
                           /* FluentBuilderGenerator.kt:500 */
  173    212   
    pub fn set_header_long(mut self, input: ::std::option::Option<i64>) -> Self {
  174    213   
        self.inner = self.inner.set_header_long(input);
  175    214   
        self
  176    215   
    }
         216  +
    /* FluentBuilderGenerator.kt:518 */
  177    217   
    #[allow(missing_docs)] // documentation missing in model
         218  +
                           /* FluentBuilderGenerator.kt:520 */
  178    219   
    pub fn get_header_long(&self) -> &::std::option::Option<i64> {
  179    220   
        self.inner.get_header_long()
  180    221   
    }
         222  +
    /* FluentBuilderGenerator.kt:498 */
  181    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* FluentBuilderGenerator.kt:500 */
  182    225   
    pub fn header_float(mut self, input: f32) -> Self {
  183    226   
        self.inner = self.inner.header_float(input);
  184    227   
        self
  185    228   
    }
         229  +
    /* FluentBuilderGenerator.kt:498 */
  186    230   
    #[allow(missing_docs)] // documentation missing in model
         231  +
                           /* FluentBuilderGenerator.kt:500 */
  187    232   
    pub fn set_header_float(mut self, input: ::std::option::Option<f32>) -> Self {
  188    233   
        self.inner = self.inner.set_header_float(input);
  189    234   
        self
  190    235   
    }
         236  +
    /* FluentBuilderGenerator.kt:518 */
  191    237   
    #[allow(missing_docs)] // documentation missing in model
         238  +
                           /* FluentBuilderGenerator.kt:520 */
  192    239   
    pub fn get_header_float(&self) -> &::std::option::Option<f32> {
  193    240   
        self.inner.get_header_float()
  194    241   
    }
         242  +
    /* FluentBuilderGenerator.kt:498 */
  195    243   
    #[allow(missing_docs)] // documentation missing in model
         244  +
                           /* FluentBuilderGenerator.kt:500 */
  196    245   
    pub fn header_double(mut self, input: f64) -> Self {
  197    246   
        self.inner = self.inner.header_double(input);
  198    247   
        self
  199    248   
    }
         249  +
    /* FluentBuilderGenerator.kt:498 */
  200    250   
    #[allow(missing_docs)] // documentation missing in model
         251  +
                           /* FluentBuilderGenerator.kt:500 */
  201    252   
    pub fn set_header_double(mut self, input: ::std::option::Option<f64>) -> Self {
  202    253   
        self.inner = self.inner.set_header_double(input);
  203    254   
        self
  204    255   
    }
         256  +
    /* FluentBuilderGenerator.kt:518 */
  205    257   
    #[allow(missing_docs)] // documentation missing in model
         258  +
                           /* FluentBuilderGenerator.kt:520 */
  206    259   
    pub fn get_header_double(&self) -> &::std::option::Option<f64> {
  207    260   
        self.inner.get_header_double()
  208    261   
    }
         262  +
    /* FluentBuilderGenerator.kt:498 */
  209    263   
    #[allow(missing_docs)] // documentation missing in model
         264  +
                           /* FluentBuilderGenerator.kt:500 */
  210    265   
    pub fn header_true_bool(mut self, input: bool) -> Self {
  211    266   
        self.inner = self.inner.header_true_bool(input);
  212    267   
        self
  213    268   
    }
         269  +
    /* FluentBuilderGenerator.kt:498 */
  214    270   
    #[allow(missing_docs)] // documentation missing in model
         271  +
                           /* FluentBuilderGenerator.kt:500 */
  215    272   
    pub fn set_header_true_bool(mut self, input: ::std::option::Option<bool>) -> Self {
  216    273   
        self.inner = self.inner.set_header_true_bool(input);
  217    274   
        self
  218    275   
    }
         276  +
    /* FluentBuilderGenerator.kt:518 */
  219    277   
    #[allow(missing_docs)] // documentation missing in model
         278  +
                           /* FluentBuilderGenerator.kt:520 */
  220    279   
    pub fn get_header_true_bool(&self) -> &::std::option::Option<bool> {
  221    280   
        self.inner.get_header_true_bool()
  222    281   
    }
         282  +
    /* FluentBuilderGenerator.kt:498 */
  223    283   
    #[allow(missing_docs)] // documentation missing in model
         284  +
                           /* FluentBuilderGenerator.kt:500 */
  224    285   
    pub fn header_false_bool(mut self, input: bool) -> Self {
  225    286   
        self.inner = self.inner.header_false_bool(input);
  226    287   
        self
  227    288   
    }
         289  +
    /* FluentBuilderGenerator.kt:498 */
  228    290   
    #[allow(missing_docs)] // documentation missing in model
         291  +
                           /* FluentBuilderGenerator.kt:500 */
  229    292   
    pub fn set_header_false_bool(mut self, input: ::std::option::Option<bool>) -> Self {
  230    293   
        self.inner = self.inner.set_header_false_bool(input);
  231    294   
        self
  232    295   
    }
         296  +
    /* FluentBuilderGenerator.kt:518 */
  233    297   
    #[allow(missing_docs)] // documentation missing in model
         298  +
                           /* FluentBuilderGenerator.kt:520 */
  234    299   
    pub fn get_header_false_bool(&self) -> &::std::option::Option<bool> {
  235    300   
        self.inner.get_header_false_bool()
  236    301   
    }
  237         -
    ///
         302  +
    /// /* FluentBuilderGenerator.kt:436 */
  238    303   
    /// Appends an item to `headerStringList`.
  239    304   
    ///
  240    305   
    /// To override the contents of this collection use [`set_header_string_list`](Self::set_header_string_list).
  241    306   
    ///
         307  +
    /* FluentBuilderGenerator.kt:443 */
  242    308   
    #[allow(missing_docs)] // documentation missing in model
         309  +
                           /* FluentBuilderGenerator.kt:446 */
  243    310   
    pub fn header_string_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  244    311   
        self.inner = self.inner.header_string_list(input.into());
  245    312   
        self
  246    313   
    }
         314  +
    /* FluentBuilderGenerator.kt:498 */
  247    315   
    #[allow(missing_docs)] // documentation missing in model
         316  +
                           /* FluentBuilderGenerator.kt:500 */
  248    317   
    pub fn set_header_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  249    318   
        self.inner = self.inner.set_header_string_list(input);
  250    319   
        self
  251    320   
    }
         321  +
    /* FluentBuilderGenerator.kt:518 */
  252    322   
    #[allow(missing_docs)] // documentation missing in model
         323  +
                           /* FluentBuilderGenerator.kt:520 */
  253    324   
    pub fn get_header_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  254    325   
        self.inner.get_header_string_list()
  255    326   
    }
  256         -
    ///
         327  +
    /// /* FluentBuilderGenerator.kt:436 */
  257    328   
    /// Appends an item to `headerStringSet`.
  258    329   
    ///
  259    330   
    /// To override the contents of this collection use [`set_header_string_set`](Self::set_header_string_set).
  260    331   
    ///
         332  +
    /* FluentBuilderGenerator.kt:443 */
  261    333   
    #[allow(missing_docs)] // documentation missing in model
         334  +
                           /* FluentBuilderGenerator.kt:446 */
  262    335   
    pub fn header_string_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  263    336   
        self.inner = self.inner.header_string_set(input.into());
  264    337   
        self
  265    338   
    }
         339  +
    /* FluentBuilderGenerator.kt:498 */
  266    340   
    #[allow(missing_docs)] // documentation missing in model
         341  +
                           /* FluentBuilderGenerator.kt:500 */
  267    342   
    pub fn set_header_string_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  268    343   
        self.inner = self.inner.set_header_string_set(input);
  269    344   
        self
  270    345   
    }
         346  +
    /* FluentBuilderGenerator.kt:518 */
  271    347   
    #[allow(missing_docs)] // documentation missing in model
         348  +
                           /* FluentBuilderGenerator.kt:520 */
  272    349   
    pub fn get_header_string_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  273    350   
        self.inner.get_header_string_set()
  274    351   
    }
  275         -
    ///
         352  +
    /// /* FluentBuilderGenerator.kt:436 */
  276    353   
    /// Appends an item to `headerIntegerList`.
  277    354   
    ///
  278    355   
    /// To override the contents of this collection use [`set_header_integer_list`](Self::set_header_integer_list).
  279    356   
    ///
         357  +
    /* FluentBuilderGenerator.kt:443 */
  280    358   
    #[allow(missing_docs)] // documentation missing in model
         359  +
                           /* FluentBuilderGenerator.kt:446 */
  281    360   
    pub fn header_integer_list(mut self, input: i32) -> Self {
  282    361   
        self.inner = self.inner.header_integer_list(input);
  283    362   
        self
  284    363   
    }
         364  +
    /* FluentBuilderGenerator.kt:498 */
  285    365   
    #[allow(missing_docs)] // documentation missing in model
         366  +
                           /* FluentBuilderGenerator.kt:500 */
  286    367   
    pub fn set_header_integer_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  287    368   
        self.inner = self.inner.set_header_integer_list(input);
  288    369   
        self
  289    370   
    }
         371  +
    /* FluentBuilderGenerator.kt:518 */
  290    372   
    #[allow(missing_docs)] // documentation missing in model
         373  +
                           /* FluentBuilderGenerator.kt:520 */
  291    374   
    pub fn get_header_integer_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  292    375   
        self.inner.get_header_integer_list()
  293    376   
    }
  294         -
    ///
         377  +
    /// /* FluentBuilderGenerator.kt:436 */
  295    378   
    /// Appends an item to `headerBooleanList`.
  296    379   
    ///
  297    380   
    /// To override the contents of this collection use [`set_header_boolean_list`](Self::set_header_boolean_list).
  298    381   
    ///
         382  +
    /* FluentBuilderGenerator.kt:443 */
  299    383   
    #[allow(missing_docs)] // documentation missing in model
         384  +
                           /* FluentBuilderGenerator.kt:446 */
  300    385   
    pub fn header_boolean_list(mut self, input: bool) -> Self {
  301    386   
        self.inner = self.inner.header_boolean_list(input);
  302    387   
        self
  303    388   
    }
         389  +
    /* FluentBuilderGenerator.kt:498 */
  304    390   
    #[allow(missing_docs)] // documentation missing in model
         391  +
                           /* FluentBuilderGenerator.kt:500 */
  305    392   
    pub fn set_header_boolean_list(mut self, input: ::std::option::Option<::std::vec::Vec<bool>>) -> Self {
  306    393   
        self.inner = self.inner.set_header_boolean_list(input);
  307    394   
        self
  308    395   
    }
         396  +
    /* FluentBuilderGenerator.kt:518 */
  309    397   
    #[allow(missing_docs)] // documentation missing in model
         398  +
                           /* FluentBuilderGenerator.kt:520 */
  310    399   
    pub fn get_header_boolean_list(&self) -> &::std::option::Option<::std::vec::Vec<bool>> {
  311    400   
        self.inner.get_header_boolean_list()
  312    401   
    }
  313         -
    ///
         402  +
    /// /* FluentBuilderGenerator.kt:436 */
  314    403   
    /// Appends an item to `headerTimestampList`.
  315    404   
    ///
  316    405   
    /// To override the contents of this collection use [`set_header_timestamp_list`](Self::set_header_timestamp_list).
  317    406   
    ///
         407  +
    /* FluentBuilderGenerator.kt:443 */
  318    408   
    #[allow(missing_docs)] // documentation missing in model
         409  +
                           /* FluentBuilderGenerator.kt:446 */
  319    410   
    pub fn header_timestamp_list(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  320    411   
        self.inner = self.inner.header_timestamp_list(input);
  321    412   
        self
  322    413   
    }
         414  +
    /* FluentBuilderGenerator.kt:498 */
  323    415   
    #[allow(missing_docs)] // documentation missing in model
         416  +
                           /* FluentBuilderGenerator.kt:500 */
  324    417   
    pub fn set_header_timestamp_list(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>) -> Self {
  325    418   
        self.inner = self.inner.set_header_timestamp_list(input);
  326    419   
        self
  327    420   
    }
         421  +
    /* FluentBuilderGenerator.kt:518 */
  328    422   
    #[allow(missing_docs)] // documentation missing in model
         423  +
                           /* FluentBuilderGenerator.kt:520 */
  329    424   
    pub fn get_header_timestamp_list(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>> {
  330    425   
        self.inner.get_header_timestamp_list()
  331    426   
    }
         427  +
    /* FluentBuilderGenerator.kt:498 */
  332    428   
    #[allow(missing_docs)] // documentation missing in model
         429  +
                           /* FluentBuilderGenerator.kt:500 */
  333    430   
    pub fn header_enum(mut self, input: crate::types::FooEnum) -> Self {
  334    431   
        self.inner = self.inner.header_enum(input);
  335    432   
        self
  336    433   
    }
         434  +
    /* FluentBuilderGenerator.kt:498 */
  337    435   
    #[allow(missing_docs)] // documentation missing in model
         436  +
                           /* FluentBuilderGenerator.kt:500 */
  338    437   
    pub fn set_header_enum(mut self, input: ::std::option::Option<crate::types::FooEnum>) -> Self {
  339    438   
        self.inner = self.inner.set_header_enum(input);
  340    439   
        self
  341    440   
    }
         441  +
    /* FluentBuilderGenerator.kt:518 */
  342    442   
    #[allow(missing_docs)] // documentation missing in model
         443  +
                           /* FluentBuilderGenerator.kt:520 */
  343    444   
    pub fn get_header_enum(&self) -> &::std::option::Option<crate::types::FooEnum> {
  344    445   
        self.inner.get_header_enum()
  345    446   
    }
  346         -
    ///
         447  +
    /// /* FluentBuilderGenerator.kt:436 */
  347    448   
    /// Appends an item to `headerEnumList`.
  348    449   
    ///
  349    450   
    /// To override the contents of this collection use [`set_header_enum_list`](Self::set_header_enum_list).
  350    451   
    ///
         452  +
    /* FluentBuilderGenerator.kt:443 */
  351    453   
    #[allow(missing_docs)] // documentation missing in model
         454  +
                           /* FluentBuilderGenerator.kt:446 */
  352    455   
    pub fn header_enum_list(mut self, input: crate::types::FooEnum) -> Self {
  353    456   
        self.inner = self.inner.header_enum_list(input);
  354    457   
        self
  355    458   
    }
         459  +
    /* FluentBuilderGenerator.kt:498 */
  356    460   
    #[allow(missing_docs)] // documentation missing in model
         461  +
                           /* FluentBuilderGenerator.kt:500 */
  357    462   
    pub fn set_header_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  358    463   
        self.inner = self.inner.set_header_enum_list(input);
  359    464   
        self
  360    465   
    }
         466  +
    /* FluentBuilderGenerator.kt:518 */
  361    467   
    #[allow(missing_docs)] // documentation missing in model
         468  +
                           /* FluentBuilderGenerator.kt:520 */
  362    469   
    pub fn get_header_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  363    470   
        self.inner.get_header_enum_list()
  364    471   
    }
         472  +
    /* FluentBuilderGenerator.kt:498 */
  365    473   
    #[allow(missing_docs)] // documentation missing in model
         474  +
                           /* FluentBuilderGenerator.kt:500 */
  366    475   
    pub fn header_integer_enum(mut self, input: i32) -> Self {
  367    476   
        self.inner = self.inner.header_integer_enum(input);
  368    477   
        self
  369    478   
    }
         479  +
    /* FluentBuilderGenerator.kt:498 */
  370    480   
    #[allow(missing_docs)] // documentation missing in model
         481  +
                           /* FluentBuilderGenerator.kt:500 */
  371    482   
    pub fn set_header_integer_enum(mut self, input: ::std::option::Option<i32>) -> Self {
  372    483   
        self.inner = self.inner.set_header_integer_enum(input);
  373    484   
        self
  374    485   
    }
         486  +
    /* FluentBuilderGenerator.kt:518 */
  375    487   
    #[allow(missing_docs)] // documentation missing in model
         488  +
                           /* FluentBuilderGenerator.kt:520 */
  376    489   
    pub fn get_header_integer_enum(&self) -> &::std::option::Option<i32> {
  377    490   
        self.inner.get_header_integer_enum()
  378    491   
    }
  379         -
    ///
         492  +
    /// /* FluentBuilderGenerator.kt:436 */
  380    493   
    /// Appends an item to `headerIntegerEnumList`.
  381    494   
    ///
  382    495   
    /// To override the contents of this collection use [`set_header_integer_enum_list`](Self::set_header_integer_enum_list).
  383    496   
    ///
         497  +
    /* FluentBuilderGenerator.kt:443 */
  384    498   
    #[allow(missing_docs)] // documentation missing in model
         499  +
                           /* FluentBuilderGenerator.kt:446 */
  385    500   
    pub fn header_integer_enum_list(mut self, input: i32) -> Self {
  386    501   
        self.inner = self.inner.header_integer_enum_list(input);
  387    502   
        self
  388    503   
    }
         504  +
    /* FluentBuilderGenerator.kt:498 */
  389    505   
    #[allow(missing_docs)] // documentation missing in model
         506  +
                           /* FluentBuilderGenerator.kt:500 */
  390    507   
    pub fn set_header_integer_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
  391    508   
        self.inner = self.inner.set_header_integer_enum_list(input);
  392    509   
        self
  393    510   
    }
         511  +
    /* FluentBuilderGenerator.kt:518 */
  394    512   
    #[allow(missing_docs)] // documentation missing in model
         513  +
                           /* FluentBuilderGenerator.kt:520 */
  395    514   
    pub fn get_header_integer_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
  396    515   
        self.inner.get_header_integer_enum_list()
  397    516   
    }
         517  +
    /* FluentBuilderGenerator.kt:282 */
  398    518   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_blobs.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 `JsonBlobs`.
           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 JsonBlobs;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl JsonBlobs {
    7         -
    /// Creates a new `JsonBlobs`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `JsonBlobs`
          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::json_blobs::JsonBlobsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::json_blobs::JsonBlobsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::json_blobs::JsonBlobsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +261,278 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for JsonBlobs {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("JsonBlobs");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            JsonBlobsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            JsonBlobsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "JsonBlobs",
  105    116   
            "Rest Json Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("JsonBlobs")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(JsonBlobsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::json_blobs::JsonBlobsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::json_blobs::JsonBlobsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct JsonBlobsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for JsonBlobsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_json_blobs::de_json_blobs_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_json_blobs::de_json_blobs_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct JsonBlobsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for JsonBlobsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input.downcast::<crate::operation::json_blobs::JsonBlobsInput>().expect("correct type");
  161    174   
        let _header_serialization_settings = _cfg
  162    175   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  163    176   
            .cloned()
  164    177   
            .unwrap_or_default();
  165    178   
        let mut request_builder = {
  166    179   
            fn uri_base(
  167    180   
                _input: &crate::operation::json_blobs::JsonBlobsInput,
  168    181   
                output: &mut ::std::string::String,
  169    182   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  170    183   
                use ::std::fmt::Write as _;
  171    184   
                ::std::write!(output, "/JsonBlobs").expect("formatting should succeed");
  172    185   
                ::std::result::Result::Ok(())
  173    186   
            }
  174    187   
            #[allow(clippy::unnecessary_wraps)]
  175    188   
            fn update_http_builder(
  176    189   
                input: &crate::operation::json_blobs::JsonBlobsInput,
  177    190   
                builder: ::http::request::Builder,
  178    191   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  179    192   
                let mut uri = ::std::string::String::new();
  180    193   
                uri_base(input, &mut uri)?;
  181    194   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  182    195   
            }
  183    196   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  184    197   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  185    198   
            builder
  186    199   
        };
  187    200   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_blobs::ser_json_blobs_input(&input)?);
  188    201   
        if let Some(content_length) = body.content_length() {
  189    202   
            let content_length = content_length.to_string();
  190    203   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  191    204   
        }
  192    205   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  193    206   
    }
  194    207   
}
         208  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  195    209   
#[derive(Debug)]
  196    210   
struct JsonBlobsEndpointParamsInterceptor;
  197    211   
  198    212   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonBlobsEndpointParamsInterceptor {
  199    213   
    fn name(&self) -> &'static str {
  200    214   
        "JsonBlobsEndpointParamsInterceptor"
  201    215   
    }
  202    216   
  203    217   
    fn read_before_execution(
  204    218   
        &self,
  205    219   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  206    220   
            '_,
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  210    224   
        >,
  211    225   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  212    226   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  213    227   
        let _input = context
  214    228   
            .input()
  215    229   
            .downcast_ref::<JsonBlobsInput>()
  216    230   
            .ok_or("failed to downcast to JsonBlobsInput")?;
  217    231   
  218    232   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  220    234   
        })?;
  221    235   
        cfg.interceptor_state()
  222    236   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  223    237   
        ::std::result::Result::Ok(())
  224    238   
    }
  225    239   
}
  226    240   
  227    241   
// The get_* functions below are generated from JMESPath expressions in the
  228    242   
// operationContextParams trait. They target the operation's input shape.
  229    243   
         244  +
/* RustType.kt:516 */
  230    245   
#[allow(unreachable_code, unused_variables)]
         246  +
/* RustType.kt:516 */
  231    247   
#[cfg(test)]
         248  +
/* ProtocolTestGenerator.kt:98 */
  232    249   
mod json_blobs_test {
  233    250   
  234    251   
    /// Blobs are base64 encoded
  235    252   
    /// Test ID: RestJsonJsonBlobs
  236    253   
    #[::tokio::test]
  237    254   
    #[::tracing_test::traced_test]
  238    255   
    async fn rest_json_json_blobs_request() {
  239    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  240    257   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  241    258   
@@ -274,291 +403,479 @@
  294    311   
                )))
  295    312   
            });
  296    313   
            de.deserialize_nonstreaming(&http_response)
  297    314   
        });
  298    315   
        let parsed = parsed
  299    316   
            .expect("should be successful response")
  300    317   
            .downcast::<crate::operation::json_blobs::JsonBlobsOutput>()
  301    318   
            .unwrap();
  302    319   
        ::pretty_assertions::assert_eq!(parsed.data, expected_output.data, "Unexpected value for `data`");
  303    320   
    }
         321  +
         322  +
    /* ProtocolTestGenerator.kt:98 */
  304    323   
}
  305    324   
         325  +
/* OperationErrorGenerator.kt:79 */
  306    326   
/// Error type for the `JsonBlobsError` operation.
         327  +
/* RustType.kt:516 */
  307    328   
#[non_exhaustive]
         329  +
/* RustType.kt:516 */
  308    330   
#[derive(::std::fmt::Debug)]
  309         -
pub enum JsonBlobsError {
         331  +
pub /* OperationErrorGenerator.kt:81 */ enum JsonBlobsError {
         332  +
    /* OperationErrorGenerator.kt:88 */
  310    333   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  311    334   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  312    335   
    variable wildcard pattern and check `.code()`:
  313    336   
     \
  314    337   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  315    338   
     \
  316    339   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-JsonBlobsError) for what information is available for the error.")]
  317    340   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         341  +
    /* OperationErrorGenerator.kt:81 */
  318    342   
}
         343  +
/* OperationErrorGenerator.kt:218 */
  319    344   
impl JsonBlobsError {
         345  +
    /* OperationErrorGenerator.kt:219 */
  320    346   
    /// Creates the `JsonBlobsError::Unhandled` variant from any error type.
  321    347   
    pub fn unhandled(
  322    348   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  323    349   
    ) -> Self {
  324    350   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  325    351   
            source: err.into(),
  326    352   
            meta: ::std::default::Default::default(),
  327    353   
        })
  328    354   
    }
  329    355   
  330    356   
    /// Creates the `JsonBlobsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  331    357   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  332    358   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  333    359   
            source: err.clone().into(),
  334    360   
            meta: err,
  335    361   
        })
  336    362   
    }
  337         -
    ///
         363  +
    /// /* OperationErrorGenerator.kt:236 */
  338    364   
    /// Returns error metadata, which includes the error code, message,
  339    365   
    /// request ID, and potentially additional information.
  340    366   
    ///
         367  +
    /* OperationErrorGenerator.kt:242 */
  341    368   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         369  +
        /* OperationErrorGenerator.kt:243 */
  342    370   
        match self {
  343         -
            Self::Unhandled(e) => &e.meta,
         371  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         372  +
            /* OperationErrorGenerator.kt:243 */
  344    373   
        }
         374  +
        /* OperationErrorGenerator.kt:242 */
  345    375   
    }
         376  +
    /* OperationErrorGenerator.kt:218 */
  346    377   
}
         378  +
/* OperationErrorGenerator.kt:269 */
  347    379   
impl ::std::error::Error for JsonBlobsError {
         380  +
    /* OperationErrorGenerator.kt:270 */
  348    381   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         382  +
        /* OperationErrorGenerator.kt:318 */
  349    383   
        match self {
  350         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         384  +
            /* OperationErrorGenerator.kt:326 */
         385  +
            Self::Unhandled(_inner) => {
         386  +
                /* OperationErrorGenerator.kt:279 */
         387  +
                ::std::option::Option::Some(&*_inner.source)
         388  +
                /* OperationErrorGenerator.kt:326 */
         389  +
            } /* OperationErrorGenerator.kt:318 */
  351    390   
        }
         391  +
        /* OperationErrorGenerator.kt:270 */
  352    392   
    }
         393  +
    /* OperationErrorGenerator.kt:269 */
  353    394   
}
         395  +
/* OperationErrorGenerator.kt:133 */
  354    396   
impl ::std::fmt::Display for JsonBlobsError {
         397  +
    /* OperationErrorGenerator.kt:134 */
  355    398   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         399  +
        /* OperationErrorGenerator.kt:318 */
  356    400   
        match self {
         401  +
            /* OperationErrorGenerator.kt:326 */
  357    402   
            Self::Unhandled(_inner) => {
         403  +
                /* OperationErrorGenerator.kt:139 */
  358    404   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  359    405   
                    write!(f, "unhandled error ({code})")
  360    406   
                } else {
  361    407   
                    f.write_str("unhandled error")
  362    408   
                }
  363         -
            }
         409  +
                /* OperationErrorGenerator.kt:326 */
         410  +
            } /* OperationErrorGenerator.kt:318 */
  364    411   
        }
         412  +
        /* OperationErrorGenerator.kt:134 */
  365    413   
    }
         414  +
    /* OperationErrorGenerator.kt:133 */
  366    415   
}
         416  +
/* OperationErrorGenerator.kt:182 */
  367    417   
impl ::aws_smithy_types::retry::ProvideErrorKind for JsonBlobsError {
         418  +
    /* OperationErrorGenerator.kt:186 */
  368    419   
    fn code(&self) -> ::std::option::Option<&str> {
         420  +
        /* OperationErrorGenerator.kt:187 */
  369    421   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         422  +
        /* OperationErrorGenerator.kt:186 */
  370    423   
    }
         424  +
    /* OperationErrorGenerator.kt:190 */
  371    425   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         426  +
        /* OperationErrorGenerator.kt:197 */
  372    427   
        ::std::option::Option::None
         428  +
        /* OperationErrorGenerator.kt:190 */
  373    429   
    }
         430  +
    /* OperationErrorGenerator.kt:182 */
  374    431   
}
         432  +
/* OperationErrorGenerator.kt:163 */
  375    433   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for JsonBlobsError {
         434  +
    /* OperationErrorGenerator.kt:164 */
  376    435   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         436  +
        /* OperationErrorGenerator.kt:318 */
  377    437   
        match self {
  378         -
            Self::Unhandled(_inner) => &_inner.meta,
         438  +
            /* OperationErrorGenerator.kt:326 */
         439  +
            Self::Unhandled(_inner) => {
         440  +
                /* OperationErrorGenerator.kt:168 */
         441  +
                &_inner.meta
         442  +
                /* OperationErrorGenerator.kt:326 */
         443  +
            } /* OperationErrorGenerator.kt:318 */
  379    444   
        }
         445  +
        /* OperationErrorGenerator.kt:164 */
  380    446   
    }
         447  +
    /* OperationErrorGenerator.kt:163 */
  381    448   
}
         449  +
/* OperationErrorGenerator.kt:109 */
  382    450   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for JsonBlobsError {
         451  +
    /* OperationErrorGenerator.kt:110 */
  383    452   
    fn create_unhandled_error(
  384    453   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  385    454   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  386    455   
    ) -> Self {
         456  +
        /* OperationErrorGenerator.kt:121 */
  387    457   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  388    458   
            source,
  389    459   
            meta: meta.unwrap_or_default(),
  390    460   
        })
         461  +
        /* OperationErrorGenerator.kt:110 */
  391    462   
    }
         463  +
    /* OperationErrorGenerator.kt:109 */
  392    464   
}
  393    465   
         466  +
/* CodegenDelegator.kt:255 */
  394    467   
pub use crate::operation::json_blobs::_json_blobs_output::JsonBlobsOutput;
  395    468   
         469  +
/* CodegenDelegator.kt:255 */
  396    470   
pub use crate::operation::json_blobs::_json_blobs_input::JsonBlobsInput;
  397    471   
         472  +
/* RustModule.kt:172 */
  398    473   
mod _json_blobs_input;
  399    474   
         475  +
/* RustModule.kt:172 */
  400    476   
mod _json_blobs_output;
  401    477   
  402         -
/// Builders
         478  +
/// /* CodegenDelegator.kt:51 */Builders
  403    479   
pub mod builders;

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

@@ -1,1 +47,91 @@
    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 JsonBlobsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct JsonBlobsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub data: ::std::option::Option<::aws_smithy_types::Blob>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl JsonBlobsInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn data(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.data.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl JsonBlobsInput {
   16         -
    /// Creates a new builder-style object to manufacture [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::json_blobs::builders::JsonBlobsInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::json_blobs::builders::JsonBlobsInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          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 JsonBlobsInputBuilder {
   26         -
    pub(crate) data: ::std::option::Option<::aws_smithy_types::Blob>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) data: ::std::option::Option<::aws_smithy_types::Blob>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl JsonBlobsInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn data(mut self, input: ::aws_smithy_types::Blob) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.data = ::std::option::Option::Some(input);
          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_data(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.data = 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_data(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.data
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`JsonBlobsInput`](crate::operation::json_blobs::JsonBlobsInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> ::std::result::Result<crate::operation::json_blobs::JsonBlobsInput, ::aws_smithy_types::error::operation::BuildError> {
   45         -
        ::std::result::Result::Ok(crate::operation::json_blobs::JsonBlobsInput { data: self.data })
          80  +
        /* BuilderGenerator.kt:254 */
          81  +
        ::std::result::Result::Ok(
          82  +
            /* BuilderGenerator.kt:477 */
          83  +
            crate::operation::json_blobs::JsonBlobsInput {
          84  +
                /* BuilderGenerator.kt:481 */ data: self.data,
          85  +
                /* BuilderGenerator.kt:477 */
          86  +
            }, /* BuilderGenerator.kt:254 */
          87  +
        )
          88  +
        /* BuilderGenerator.kt:253 */
   46     89   
    }
          90  +
    /* BuilderGenerator.kt:355 */
   47     91   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_blobs/_json_blobs_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 JsonBlobsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct JsonBlobsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub data: ::std::option::Option<::aws_smithy_types::Blob>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl JsonBlobsOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn data(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.data.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl JsonBlobsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::json_blobs::builders::JsonBlobsOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::json_blobs::builders::JsonBlobsOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          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 JsonBlobsOutputBuilder {
   26         -
    pub(crate) data: ::std::option::Option<::aws_smithy_types::Blob>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) data: ::std::option::Option<::aws_smithy_types::Blob>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl JsonBlobsOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn data(mut self, input: ::aws_smithy_types::Blob) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.data = ::std::option::Option::Some(input);
          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_data(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.data = 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_data(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.data
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`JsonBlobsOutput`](crate::operation::json_blobs::JsonBlobsOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::json_blobs::JsonBlobsOutput {
   45         -
        crate::operation::json_blobs::JsonBlobsOutput { data: self.data }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::json_blobs::JsonBlobsOutput {
          82  +
            /* BuilderGenerator.kt:481 */ data: self.data,
          83  +
            /* BuilderGenerator.kt:477 */
          84  +
        }
          85  +
        /* BuilderGenerator.kt:253 */
   46     86   
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/json_enums.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 `JsonEnums`.
           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 JsonEnums;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl JsonEnums {
    7         -
    /// Creates a new `JsonEnums`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `JsonEnums`
          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::json_enums::JsonEnumsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::json_enums::JsonEnumsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::json_enums::JsonEnumsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +261,278 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for JsonEnums {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("JsonEnums");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            JsonEnumsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            JsonEnumsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "JsonEnums",
  105    116   
            "Rest Json Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("JsonEnums")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(JsonEnumsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::json_enums::JsonEnumsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::json_enums::JsonEnumsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct JsonEnumsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for JsonEnumsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_json_enums::de_json_enums_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_json_enums::de_json_enums_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct JsonEnumsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for JsonEnumsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input.downcast::<crate::operation::json_enums::JsonEnumsInput>().expect("correct type");
  161    174   
        let _header_serialization_settings = _cfg
  162    175   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  163    176   
            .cloned()
  164    177   
            .unwrap_or_default();
  165    178   
        let mut request_builder = {
  166    179   
            fn uri_base(
  167    180   
                _input: &crate::operation::json_enums::JsonEnumsInput,
  168    181   
                output: &mut ::std::string::String,
  169    182   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  170    183   
                use ::std::fmt::Write as _;
  171    184   
                ::std::write!(output, "/JsonEnums").expect("formatting should succeed");
  172    185   
                ::std::result::Result::Ok(())
  173    186   
            }
  174    187   
            #[allow(clippy::unnecessary_wraps)]
  175    188   
            fn update_http_builder(
  176    189   
                input: &crate::operation::json_enums::JsonEnumsInput,
  177    190   
                builder: ::http::request::Builder,
  178    191   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  179    192   
                let mut uri = ::std::string::String::new();
  180    193   
                uri_base(input, &mut uri)?;
  181    194   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  182    195   
            }
  183    196   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  184    197   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  185    198   
            builder
  186    199   
        };
  187    200   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_enums::ser_json_enums_input(&input)?);
  188    201   
        if let Some(content_length) = body.content_length() {
  189    202   
            let content_length = content_length.to_string();
  190    203   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  191    204   
        }
  192    205   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  193    206   
    }
  194    207   
}
         208  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  195    209   
#[derive(Debug)]
  196    210   
struct JsonEnumsEndpointParamsInterceptor;
  197    211   
  198    212   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonEnumsEndpointParamsInterceptor {
  199    213   
    fn name(&self) -> &'static str {
  200    214   
        "JsonEnumsEndpointParamsInterceptor"
  201    215   
    }
  202    216   
  203    217   
    fn read_before_execution(
  204    218   
        &self,
  205    219   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  206    220   
            '_,
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  210    224   
        >,
  211    225   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  212    226   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  213    227   
        let _input = context
  214    228   
            .input()
  215    229   
            .downcast_ref::<JsonEnumsInput>()
  216    230   
            .ok_or("failed to downcast to JsonEnumsInput")?;
  217    231   
  218    232   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  220    234   
        })?;
  221    235   
        cfg.interceptor_state()
  222    236   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  223    237   
        ::std::result::Result::Ok(())
  224    238   
    }
  225    239   
}
  226    240   
  227    241   
// The get_* functions below are generated from JMESPath expressions in the
  228    242   
// operationContextParams trait. They target the operation's input shape.
  229    243   
         244  +
/* RustType.kt:516 */
  230    245   
#[allow(unreachable_code, unused_variables)]
         246  +
/* RustType.kt:516 */
  231    247   
#[cfg(test)]
         248  +
/* ProtocolTestGenerator.kt:98 */
  232    249   
mod json_enums_test {
  233    250   
  234    251   
    /// Serializes simple scalar properties
  235    252   
    /// Test ID: RestJsonJsonEnums
  236    253   
    #[::tokio::test]
  237    254   
    #[::tracing_test::traced_test]
  238    255   
    async fn rest_json_json_enums_request() {
  239    256   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  240    257   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  241    258   
@@ -335,352 +464,540 @@
  355    372   
        ::pretty_assertions::assert_eq!(parsed.foo_enum2, expected_output.foo_enum2, "Unexpected value for `foo_enum2`");
  356    373   
        ::pretty_assertions::assert_eq!(parsed.foo_enum3, expected_output.foo_enum3, "Unexpected value for `foo_enum3`");
  357    374   
        ::pretty_assertions::assert_eq!(
  358    375   
            parsed.foo_enum_list,
  359    376   
            expected_output.foo_enum_list,
  360    377   
            "Unexpected value for `foo_enum_list`"
  361    378   
        );
  362    379   
        ::pretty_assertions::assert_eq!(parsed.foo_enum_set, expected_output.foo_enum_set, "Unexpected value for `foo_enum_set`");
  363    380   
        ::pretty_assertions::assert_eq!(parsed.foo_enum_map, expected_output.foo_enum_map, "Unexpected value for `foo_enum_map`");
  364    381   
    }
         382  +
         383  +
    /* ProtocolTestGenerator.kt:98 */
  365    384   
}
  366    385   
         386  +
/* OperationErrorGenerator.kt:79 */
  367    387   
/// Error type for the `JsonEnumsError` operation.
         388  +
/* RustType.kt:516 */
  368    389   
#[non_exhaustive]
         390  +
/* RustType.kt:516 */
  369    391   
#[derive(::std::fmt::Debug)]
  370         -
pub enum JsonEnumsError {
         392  +
pub /* OperationErrorGenerator.kt:81 */ enum JsonEnumsError {
         393  +
    /* OperationErrorGenerator.kt:88 */
  371    394   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  372    395   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  373    396   
    variable wildcard pattern and check `.code()`:
  374    397   
     \
  375    398   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  376    399   
     \
  377    400   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-JsonEnumsError) for what information is available for the error.")]
  378    401   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         402  +
    /* OperationErrorGenerator.kt:81 */
  379    403   
}
         404  +
/* OperationErrorGenerator.kt:218 */
  380    405   
impl JsonEnumsError {
         406  +
    /* OperationErrorGenerator.kt:219 */
  381    407   
    /// Creates the `JsonEnumsError::Unhandled` variant from any error type.
  382    408   
    pub fn unhandled(
  383    409   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  384    410   
    ) -> Self {
  385    411   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  386    412   
            source: err.into(),
  387    413   
            meta: ::std::default::Default::default(),
  388    414   
        })
  389    415   
    }
  390    416   
  391    417   
    /// Creates the `JsonEnumsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  392    418   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  393    419   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  394    420   
            source: err.clone().into(),
  395    421   
            meta: err,
  396    422   
        })
  397    423   
    }
  398         -
    ///
         424  +
    /// /* OperationErrorGenerator.kt:236 */
  399    425   
    /// Returns error metadata, which includes the error code, message,
  400    426   
    /// request ID, and potentially additional information.
  401    427   
    ///
         428  +
    /* OperationErrorGenerator.kt:242 */
  402    429   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         430  +
        /* OperationErrorGenerator.kt:243 */
  403    431   
        match self {
  404         -
            Self::Unhandled(e) => &e.meta,
         432  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         433  +
            /* OperationErrorGenerator.kt:243 */
  405    434   
        }
         435  +
        /* OperationErrorGenerator.kt:242 */
  406    436   
    }
         437  +
    /* OperationErrorGenerator.kt:218 */
  407    438   
}
         439  +
/* OperationErrorGenerator.kt:269 */
  408    440   
impl ::std::error::Error for JsonEnumsError {
         441  +
    /* OperationErrorGenerator.kt:270 */
  409    442   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         443  +
        /* OperationErrorGenerator.kt:318 */
  410    444   
        match self {
  411         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         445  +
            /* OperationErrorGenerator.kt:326 */
         446  +
            Self::Unhandled(_inner) => {
         447  +
                /* OperationErrorGenerator.kt:279 */
         448  +
                ::std::option::Option::Some(&*_inner.source)
         449  +
                /* OperationErrorGenerator.kt:326 */
         450  +
            } /* OperationErrorGenerator.kt:318 */
  412    451   
        }
         452  +
        /* OperationErrorGenerator.kt:270 */
  413    453   
    }
         454  +
    /* OperationErrorGenerator.kt:269 */
  414    455   
}
         456  +
/* OperationErrorGenerator.kt:133 */
  415    457   
impl ::std::fmt::Display for JsonEnumsError {
         458  +
    /* OperationErrorGenerator.kt:134 */
  416    459   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         460  +
        /* OperationErrorGenerator.kt:318 */
  417    461   
        match self {
         462  +
            /* OperationErrorGenerator.kt:326 */
  418    463   
            Self::Unhandled(_inner) => {
         464  +
                /* OperationErrorGenerator.kt:139 */
  419    465   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  420    466   
                    write!(f, "unhandled error ({code})")
  421    467   
                } else {
  422    468   
                    f.write_str("unhandled error")
  423    469   
                }
  424         -
            }
         470  +
                /* OperationErrorGenerator.kt:326 */
         471  +
            } /* OperationErrorGenerator.kt:318 */
  425    472   
        }
         473  +
        /* OperationErrorGenerator.kt:134 */
  426    474   
    }
         475  +
    /* OperationErrorGenerator.kt:133 */
  427    476   
}
         477  +
/* OperationErrorGenerator.kt:182 */
  428    478   
impl ::aws_smithy_types::retry::ProvideErrorKind for JsonEnumsError {
         479  +
    /* OperationErrorGenerator.kt:186 */
  429    480   
    fn code(&self) -> ::std::option::Option<&str> {
         481  +
        /* OperationErrorGenerator.kt:187 */
  430    482   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         483  +
        /* OperationErrorGenerator.kt:186 */
  431    484   
    }
         485  +
    /* OperationErrorGenerator.kt:190 */
  432    486   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         487  +
        /* OperationErrorGenerator.kt:197 */
  433    488   
        ::std::option::Option::None
         489  +
        /* OperationErrorGenerator.kt:190 */
  434    490   
    }
         491  +
    /* OperationErrorGenerator.kt:182 */
  435    492   
}
         493  +
/* OperationErrorGenerator.kt:163 */
  436    494   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for JsonEnumsError {
         495  +
    /* OperationErrorGenerator.kt:164 */
  437    496   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         497  +
        /* OperationErrorGenerator.kt:318 */
  438    498   
        match self {
  439         -
            Self::Unhandled(_inner) => &_inner.meta,
         499  +
            /* OperationErrorGenerator.kt:326 */
         500  +
            Self::Unhandled(_inner) => {
         501  +
                /* OperationErrorGenerator.kt:168 */
         502  +
                &_inner.meta
         503  +
                /* OperationErrorGenerator.kt:326 */
         504  +
            } /* OperationErrorGenerator.kt:318 */
  440    505   
        }
         506  +
        /* OperationErrorGenerator.kt:164 */
  441    507   
    }
         508  +
    /* OperationErrorGenerator.kt:163 */
  442    509   
}
         510  +
/* OperationErrorGenerator.kt:109 */
  443    511   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for JsonEnumsError {
         512  +
    /* OperationErrorGenerator.kt:110 */
  444    513   
    fn create_unhandled_error(
  445    514   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  446    515   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  447    516   
    ) -> Self {
         517  +
        /* OperationErrorGenerator.kt:121 */
  448    518   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  449    519   
            source,
  450    520   
            meta: meta.unwrap_or_default(),
  451    521   
        })
         522  +
        /* OperationErrorGenerator.kt:110 */
  452    523   
    }
         524  +
    /* OperationErrorGenerator.kt:109 */
  453    525   
}
  454    526   
         527  +
/* CodegenDelegator.kt:255 */
  455    528   
pub use crate::operation::json_enums::_json_enums_output::JsonEnumsOutput;
  456    529   
         530  +
/* CodegenDelegator.kt:255 */
  457    531   
pub use crate::operation::json_enums::_json_enums_input::JsonEnumsInput;
  458    532   
         533  +
/* RustModule.kt:172 */
  459    534   
mod _json_enums_input;
  460    535   
         536  +
/* RustModule.kt:172 */
  461    537   
mod _json_enums_output;
  462    538   
  463         -
/// Builders
         539  +
/// /* CodegenDelegator.kt:51 */Builders
  464    540   
pub mod builders;

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

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

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

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

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

@@ -1,1 +207,255 @@
    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::json_enums::_json_enums_output::JsonEnumsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::json_enums::_json_enums_input::JsonEnumsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::json_enums::builders::JsonEnumsInputBuilder {
    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::json_enums::JsonEnumsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::json_enums::JsonEnumsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.json_enums();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `JsonEnums`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `JsonEnums`.
   24     27   
///
   25         -
/// This example serializes enums as top level properties, in lists, sets, and maps.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example serializes enums as top level properties, in lists, sets, and maps.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct JsonEnumsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::json_enums::builders::JsonEnumsInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl crate::client::customize::internal::CustomizableSend<crate::operation::json_enums::JsonEnumsOutput, crate::operation::json_enums::JsonEnumsError>
   33     39   
    for JsonEnumsFluentBuilder
   34     40   
{
   35     41   
    fn send(
   36     42   
        self,
   37     43   
        config_override: crate::config::Builder,
   38     44   
    ) -> crate::client::customize::internal::BoxFuture<
   39     45   
        crate::client::customize::internal::SendResult<crate::operation::json_enums::JsonEnumsOutput, crate::operation::json_enums::JsonEnumsError>,
   40     46   
    > {
   41     47   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   42     48   
    }
   43     49   
}
          50  +
/* FluentBuilderGenerator.kt:282 */
   44     51   
impl JsonEnumsFluentBuilder {
          52  +
    /* FluentBuilderGenerator.kt:288 */
   45     53   
    /// Creates a new `JsonEnumsFluentBuilder`.
   46     54   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   47     55   
        Self {
   48     56   
            handle,
   49     57   
            inner: ::std::default::Default::default(),
   50     58   
            config_override: ::std::option::Option::None,
   51     59   
        }
   52     60   
    }
          61  +
    /* FluentBuilderGenerator.kt:301 */
   53     62   
    /// Access the JsonEnums as a reference.
   54     63   
    pub fn as_input(&self) -> &crate::operation::json_enums::builders::JsonEnumsInputBuilder {
   55     64   
        &self.inner
   56     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:145 */
   57     67   
    /// Sends the request and returns the response.
   58     68   
    ///
   59     69   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   60     70   
    /// can be matched against.
   61     71   
    ///
   62     72   
    /// By default, any retryable failures will be retried twice. Retry behavior
   63     73   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   64     74   
    /// set when configuring the client.
   65     75   
    pub async fn send(
   66     76   
        self,
   67     77   
    ) -> ::std::result::Result<
   68     78   
        crate::operation::json_enums::JsonEnumsOutput,
   69     79   
        ::aws_smithy_runtime_api::client::result::SdkError<
   70     80   
            crate::operation::json_enums::JsonEnumsError,
   71     81   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   72     82   
        >,
   73     83   
    > {
   74     84   
        let input = self
   75     85   
            .inner
   76     86   
            .build()
   77     87   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   78     88   
        let runtime_plugins = crate::operation::json_enums::JsonEnums::operation_runtime_plugins(
   79     89   
            self.handle.runtime_plugins.clone(),
   80     90   
            &self.handle.conf,
   81     91   
            self.config_override,
   82     92   
        );
   83     93   
        crate::operation::json_enums::JsonEnums::orchestrate(&runtime_plugins, input).await
   84     94   
    }
   85     95   
   86     96   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   87     97   
    pub fn customize(
   88     98   
        self,
   89     99   
    ) -> crate::client::customize::CustomizableOperation<
   90    100   
        crate::operation::json_enums::JsonEnumsOutput,
   91    101   
        crate::operation::json_enums::JsonEnumsError,
   92    102   
        Self,
   93    103   
    > {
   94    104   
        crate::client::customize::CustomizableOperation::new(self)
   95    105   
    }
         106  +
    /* FluentBuilderGenerator.kt:315 */
   96    107   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
   97    108   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
   98    109   
        self
   99    110   
    }
  100    111   
  101    112   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  102    113   
        self.config_override = config_override;
  103    114   
        self
  104    115   
    }
         116  +
    /* FluentBuilderGenerator.kt:498 */
  105    117   
    #[allow(missing_docs)] // documentation missing in model
         118  +
                           /* FluentBuilderGenerator.kt:500 */
  106    119   
    pub fn foo_enum1(mut self, input: crate::types::FooEnum) -> Self {
  107    120   
        self.inner = self.inner.foo_enum1(input);
  108    121   
        self
  109    122   
    }
         123  +
    /* FluentBuilderGenerator.kt:498 */
  110    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* FluentBuilderGenerator.kt:500 */
  111    126   
    pub fn set_foo_enum1(mut self, input: ::std::option::Option<crate::types::FooEnum>) -> Self {
  112    127   
        self.inner = self.inner.set_foo_enum1(input);
  113    128   
        self
  114    129   
    }
         130  +
    /* FluentBuilderGenerator.kt:518 */
  115    131   
    #[allow(missing_docs)] // documentation missing in model
         132  +
                           /* FluentBuilderGenerator.kt:520 */
  116    133   
    pub fn get_foo_enum1(&self) -> &::std::option::Option<crate::types::FooEnum> {
  117    134   
        self.inner.get_foo_enum1()
  118    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:498 */
  119    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:500 */
  120    139   
    pub fn foo_enum2(mut self, input: crate::types::FooEnum) -> Self {
  121    140   
        self.inner = self.inner.foo_enum2(input);
  122    141   
        self
  123    142   
    }
         143  +
    /* FluentBuilderGenerator.kt:498 */
  124    144   
    #[allow(missing_docs)] // documentation missing in model
         145  +
                           /* FluentBuilderGenerator.kt:500 */
  125    146   
    pub fn set_foo_enum2(mut self, input: ::std::option::Option<crate::types::FooEnum>) -> Self {
  126    147   
        self.inner = self.inner.set_foo_enum2(input);
  127    148   
        self
  128    149   
    }
         150  +
    /* FluentBuilderGenerator.kt:518 */
  129    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* FluentBuilderGenerator.kt:520 */
  130    153   
    pub fn get_foo_enum2(&self) -> &::std::option::Option<crate::types::FooEnum> {
  131    154   
        self.inner.get_foo_enum2()
  132    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:498 */
  133    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:500 */
  134    159   
    pub fn foo_enum3(mut self, input: crate::types::FooEnum) -> Self {
  135    160   
        self.inner = self.inner.foo_enum3(input);
  136    161   
        self
  137    162   
    }
         163  +
    /* FluentBuilderGenerator.kt:498 */
  138    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* FluentBuilderGenerator.kt:500 */
  139    166   
    pub fn set_foo_enum3(mut self, input: ::std::option::Option<crate::types::FooEnum>) -> Self {
  140    167   
        self.inner = self.inner.set_foo_enum3(input);
  141    168   
        self
  142    169   
    }
         170  +
    /* FluentBuilderGenerator.kt:518 */
  143    171   
    #[allow(missing_docs)] // documentation missing in model
         172  +
                           /* FluentBuilderGenerator.kt:520 */
  144    173   
    pub fn get_foo_enum3(&self) -> &::std::option::Option<crate::types::FooEnum> {
  145    174   
        self.inner.get_foo_enum3()
  146    175   
    }
  147         -
    ///
         176  +
    /// /* FluentBuilderGenerator.kt:436 */
  148    177   
    /// Appends an item to `fooEnumList`.
  149    178   
    ///
  150    179   
    /// To override the contents of this collection use [`set_foo_enum_list`](Self::set_foo_enum_list).
  151    180   
    ///
         181  +
    /* FluentBuilderGenerator.kt:443 */
  152    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:446 */
  153    184   
    pub fn foo_enum_list(mut self, input: crate::types::FooEnum) -> Self {
  154    185   
        self.inner = self.inner.foo_enum_list(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_foo_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  159    192   
        self.inner = self.inner.set_foo_enum_list(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_foo_enum_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  164    199   
        self.inner.get_foo_enum_list()
  165    200   
    }
  166         -
    ///
         201  +
    /// /* FluentBuilderGenerator.kt:436 */
  167    202   
    /// Appends an item to `fooEnumSet`.
  168    203   
    ///
  169    204   
    /// To override the contents of this collection use [`set_foo_enum_set`](Self::set_foo_enum_set).
  170    205   
    ///
         206  +
    /* FluentBuilderGenerator.kt:443 */
  171    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
                           /* FluentBuilderGenerator.kt:446 */
  172    209   
    pub fn foo_enum_set(mut self, input: crate::types::FooEnum) -> Self {
  173    210   
        self.inner = self.inner.foo_enum_set(input);
  174    211   
        self
  175    212   
    }
         213  +
    /* FluentBuilderGenerator.kt:498 */
  176    214   
    #[allow(missing_docs)] // documentation missing in model
         215  +
                           /* FluentBuilderGenerator.kt:500 */
  177    216   
    pub fn set_foo_enum_set(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FooEnum>>) -> Self {
  178    217   
        self.inner = self.inner.set_foo_enum_set(input);
  179    218   
        self
  180    219   
    }
         220  +
    /* FluentBuilderGenerator.kt:518 */
  181    221   
    #[allow(missing_docs)] // documentation missing in model
         222  +
                           /* FluentBuilderGenerator.kt:520 */
  182    223   
    pub fn get_foo_enum_set(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FooEnum>> {
  183    224   
        self.inner.get_foo_enum_set()
  184    225   
    }
  185         -
    ///
         226  +
    /// /* FluentBuilderGenerator.kt:466 */
  186    227   
    /// Adds a key-value pair to `fooEnumMap`.
  187    228   
    ///
  188    229   
    /// To override the contents of this collection use [`set_foo_enum_map`](Self::set_foo_enum_map).
  189    230   
    ///
         231  +
    /* FluentBuilderGenerator.kt:473 */
  190    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* FluentBuilderGenerator.kt:475 */
  191    234   
    pub fn foo_enum_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::FooEnum) -> Self {
  192    235   
        self.inner = self.inner.foo_enum_map(k.into(), v);
  193    236   
        self
  194    237   
    }
         238  +
    /* FluentBuilderGenerator.kt:498 */
  195    239   
    #[allow(missing_docs)] // documentation missing in model
         240  +
                           /* FluentBuilderGenerator.kt:500 */
  196    241   
    pub fn set_foo_enum_map(
  197    242   
        mut self,
  198    243   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::FooEnum>>,
  199    244   
    ) -> Self {
  200    245   
        self.inner = self.inner.set_foo_enum_map(input);
  201    246   
        self
  202    247   
    }
         248  +
    /* FluentBuilderGenerator.kt:518 */
  203    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* FluentBuilderGenerator.kt:520 */
  204    251   
    pub fn get_foo_enum_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::FooEnum>> {
  205    252   
        self.inner.get_foo_enum_map()
  206    253   
    }
         254  +
    /* FluentBuilderGenerator.kt:282 */
  207    255   
}

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

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

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